summaryrefslogtreecommitdiff
path: root/core/systemd
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2013-03-27 00:05:42 -0700
committerroot <root@rshg054.dnsready.net>2013-03-27 00:05:42 -0700
commit87fbcb30b652672a7e110b66a4c15342e27df826 (patch)
tree7604502956a186acbfe9983a159a2abd564c3142 /core/systemd
parentc16968d4179be76966c262f854c9e1fb827dc3ec (diff)
Wed Mar 27 00:05:42 PDT 2013
Diffstat (limited to 'core/systemd')
-rw-r--r--core/systemd/0001-Fix-vacuum-logic-error.patch40
-rw-r--r--core/systemd/0001-journal-pass-the-pid-to-sd_pid_get_owner_uid.patch25
-rw-r--r--core/systemd/0001-rules-move-builtin-calls-before-the-permissions-sect.patch57
-rw-r--r--core/systemd/0001-strv-fix-STRV_FOREACH_PAIR-macro-definition.patch25
-rw-r--r--core/systemd/PKGBUILD26
5 files changed, 169 insertions, 4 deletions
diff --git a/core/systemd/0001-Fix-vacuum-logic-error.patch b/core/systemd/0001-Fix-vacuum-logic-error.patch
new file mode 100644
index 000000000..a0a6e85ee
--- /dev/null
+++ b/core/systemd/0001-Fix-vacuum-logic-error.patch
@@ -0,0 +1,40 @@
+From 6c142648aaced56ab681fcc97a71b06d588122a9 Mon Sep 17 00:00:00 2001
+From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
+Date: Wed, 20 Mar 2013 21:32:05 +0100
+Subject: [PATCH] Fix vacuum logic error
+
+The vacuum code used to stop vacuuming after one deletion, even
+when max_use was still exceeded.
+
+Also make usage a uint64_t, as the code already pretends it is one.
+
+Signed-off-by: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
+---
+ src/journal/journal-vacuum.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/journal/journal-vacuum.c b/src/journal/journal-vacuum.c
+index 731f6c7..4a3a5a9 100644
+--- a/src/journal/journal-vacuum.c
++++ b/src/journal/journal-vacuum.c
+@@ -36,7 +36,7 @@
+ #include "util.h"
+
+ struct vacuum_info {
+- off_t usage;
++ uint64_t usage;
+ char *filename;
+
+ uint64_t realtime;
+@@ -293,7 +293,7 @@ int journal_directory_vacuum(
+ if (unlinkat(dirfd(d), list[i].filename, 0) >= 0) {
+ log_debug("Deleted archived journal %s/%s.", directory, list[i].filename);
+
+- if ((uint64_t) list[i].usage > sum)
++ if (list[i].usage < sum)
+ sum -= list[i].usage;
+ else
+ sum = 0;
+--
+1.8.2
+
diff --git a/core/systemd/0001-journal-pass-the-pid-to-sd_pid_get_owner_uid.patch b/core/systemd/0001-journal-pass-the-pid-to-sd_pid_get_owner_uid.patch
new file mode 100644
index 000000000..cd2d70756
--- /dev/null
+++ b/core/systemd/0001-journal-pass-the-pid-to-sd_pid_get_owner_uid.patch
@@ -0,0 +1,25 @@
+From 83d7d83bcc6c462ecbb4c8003e3a8b41f3b88d46 Mon Sep 17 00:00:00 2001
+From: Kay Sievers <kay@vrfy.org>
+Date: Sat, 16 Mar 2013 16:10:22 +0100
+Subject: [PATCH] journal: pass the *pid* to sd_pid_get_owner_uid()
+
+---
+ src/journal/journald-server.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
+index ac565c7..364ab0f 100644
+--- a/src/journal/journald-server.c
++++ b/src/journal/journald-server.c
+@@ -593,7 +593,7 @@ static void dispatch_message_real(
+ IOVEC_SET_STRING(iovec[n++], session);
+ }
+
+- if (sd_pid_get_owner_uid(ucred->uid, &owner) >= 0) {
++ if (sd_pid_get_owner_uid(ucred->pid, &owner) >= 0) {
+ owner_valid = true;
+ if (asprintf(&owner_uid, "_SYSTEMD_OWNER_UID=%lu", (unsigned long) owner) >= 0)
+ IOVEC_SET_STRING(iovec[n++], owner_uid);
+--
+1.8.2
+
diff --git a/core/systemd/0001-rules-move-builtin-calls-before-the-permissions-sect.patch b/core/systemd/0001-rules-move-builtin-calls-before-the-permissions-sect.patch
new file mode 100644
index 000000000..88dabe9d3
--- /dev/null
+++ b/core/systemd/0001-rules-move-builtin-calls-before-the-permissions-sect.patch
@@ -0,0 +1,57 @@
+From 34b99a8bf7b769b31ad59ff0d60f8572bd0adab5 Mon Sep 17 00:00:00 2001
+From: Kay Sievers <kay@vrfy.org>
+Date: Wed, 20 Mar 2013 01:26:17 +0100
+Subject: [PATCH] rules: move builtin calls before the permissions section
+
+<heftig> kay: systemd commit 22582bb broke cups usb printing for me
+<heftig> because the "lp" group isn't applied anymore
+<heftig> SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", GROUP="lp"
+<heftig> moving this line to the end of 50-udev-default.rules restores correct behavior, as it's after usb_id
+
+Conflicts:
+ rules/50-udev-default.rules
+---
+ rules/50-udev-default.rules | 17 ++++++++++-------
+ 1 file changed, 10 insertions(+), 7 deletions(-)
+
+diff --git a/rules/50-udev-default.rules b/rules/50-udev-default.rules
+index 5d8bde5..ce0a4ef 100644
+--- a/rules/50-udev-default.rules
++++ b/rules/50-udev-default.rules
+@@ -1,5 +1,13 @@
+ # do not edit this file, it will be overwritten on update
+
++SUBSYSTEM=="rtc", ATTR{hctosys}=="1", SYMLINK+="rtc"
++SUBSYSTEM=="virtio-ports", KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}"
++
++SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb"
++SUBSYSTEM=="input", ENV{ID_INPUT}=="", IMPORT{builtin}="input_id"
++SUBSYSTEM=="firmware", ACTION=="add", IMPORT{builtin}="firmware"
++ENV{MODALIAS}!="", IMPORT{builtin}="hwdb --subsystem=$env{SUBSYSTEM}"
++
+ ACTION!="add", GOTO="default_permissions_end"
+
+ SUBSYSTEM=="tty", KERNEL=="ptmx", GROUP="tty", MODE="0666"
+@@ -8,6 +16,8 @@ SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620"
+ SUBSYSTEM=="vc", KERNEL=="vcs*|vcsa*", GROUP="tty"
+ KERNEL=="tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout"
+
++SUBSYSTEM=="rtc", ATTR{hctosys}=="1", MODE="0644"
++
+ SUBSYSTEM=="mem", KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640"
+
+ SUBSYSTEM=="input", KERNEL=="mouse*|mice|event*", MODE="0640"
+@@ -59,10 +69,3 @@ KERNEL=="tun", MODE="0666", OPTIONS+="static_node=net/tun"
+ KERNEL=="fuse", MODE="0666", OPTIONS+="static_node=fuse"
+
+ LABEL="default_permissions_end"
+-SUBSYSTEM=="rtc", ATTR{hctosys}=="1", MODE="0644", SYMLINK+="rtc"
+-SUBSYSTEM=="virtio-ports", KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}"
+-
+-SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb"
+-SUBSYSTEM=="input", ENV{ID_INPUT}=="", IMPORT{builtin}="input_id"
+-SUBSYSTEM=="firmware", ACTION=="add", IMPORT{builtin}="firmware"
+-ENV{MODALIAS}!="", IMPORT{builtin}="hwdb --subsystem=$env{SUBSYSTEM}"
+--
+1.8.2
+
diff --git a/core/systemd/0001-strv-fix-STRV_FOREACH_PAIR-macro-definition.patch b/core/systemd/0001-strv-fix-STRV_FOREACH_PAIR-macro-definition.patch
new file mode 100644
index 000000000..6d8d9aad4
--- /dev/null
+++ b/core/systemd/0001-strv-fix-STRV_FOREACH_PAIR-macro-definition.patch
@@ -0,0 +1,25 @@
+From 961e4526925b7b1e1d3582f2fc9fb38035e2b5fb Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart@poettering.net>
+Date: Fri, 15 Mar 2013 16:41:13 +0100
+Subject: [PATCH] strv: fix STRV_FOREACH_PAIR macro definition
+
+---
+ src/shared/strv.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/shared/strv.h b/src/shared/strv.h
+index da9fae6..49058f8 100644
+--- a/src/shared/strv.h
++++ b/src/shared/strv.h
+@@ -77,7 +77,7 @@ bool strv_overlap(char **a, char **b);
+ for (; (l) && ((s) >= (l)); (s)--)
+
+ #define STRV_FOREACH_PAIR(x, y, l) \
+- for ((x) = (l), (y) = (x+1); (x) && *(x) && *(y); (x) += 2)
++ for ((x) = (l), (y) = (x+1); (x) && *(x) && *(y); (x) += 2, (y) = (x + 1))
+
+
+ char **strv_sort(char **l);
+--
+1.8.2
+
diff --git a/core/systemd/PKGBUILD b/core/systemd/PKGBUILD
index 0ba718aa0..0e03a7707 100644
--- a/core/systemd/PKGBUILD
+++ b/core/systemd/PKGBUILD
@@ -4,7 +4,7 @@
pkgbase=systemd
pkgname=('systemd' 'systemd-sysvcompat')
pkgver=198
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64')
url="http://www.freedesktop.org/wiki/Software/systemd"
license=('GPL2' 'LGPL2.1' 'MIT')
@@ -16,11 +16,19 @@ source=("http://www.freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz"
'initcpio-hook-udev'
'initcpio-install-udev'
'initcpio-install-timestamp'
+ '0001-journal-pass-the-pid-to-sd_pid_get_owner_uid.patch'
+ '0001-strv-fix-STRV_FOREACH_PAIR-macro-definition.patch'
+ '0001-rules-move-builtin-calls-before-the-permissions-sect.patch'
+ '0001-Fix-vacuum-logic-error.patch'
'use-split-usr-path.patch')
md5sums=('26a75e2a310f8c1c1ea9ec26ddb171c5'
'e99e9189aa2f6084ac28b8ddf605aeb8'
'fb37e34ea006c79be1c54cbb0f803414'
'df69615503ad293c9ddf9d8b7755282d'
+ 'c93785560cd33e25013224ac84689aa3'
+ '80db2672a49667a3add02fb07dee9dca'
+ 'a0d3aca35ff7f71d1a5a79022b715ae0'
+ '7ae8e22cef30e57de02ca623b0673f76'
'76bf83fe34c5b40533abc5dc940576a6')
build() {
@@ -29,6 +37,19 @@ build() {
# hang onto this until we do the /{,s}bin merge
patch -Np1 <"$srcdir/use-split-usr-path.patch"
+ # upstream commit 83d7d83bcc6c462ecbb4c8003e3a8b41f3b88d46
+ patch -Np1 <"$srcdir"/0001-journal-pass-the-pid-to-sd_pid_get_owner_uid.patch
+
+ # upstream commit 961e4526925b7b1e1d3582f2fc9fb38035e2b5fb
+ patch -Np1 <"$srcdir"/0001-strv-fix-STRV_FOREACH_PAIR-macro-definition.patch
+
+ # upstream commit bbb7f2ae5035105575365750592caa87213d7072
+ # - modified to avoid pulling in disabling of firmware loading
+ patch -Np1 <"$srcdir"/0001-rules-move-builtin-calls-before-the-permissions-sect.patch
+
+ # upstream commit 6c142648aaced56ab681fcc97a71b06d588122a9
+ patch -Np1 <"$srcdir"/0001-Fix-vacuum-logic-error.patch
+
./configure \
--enable-static \
--libexecdir=/usr/lib \
@@ -112,9 +133,6 @@ package_systemd() {
install -dm755 "$srcdir"/_sysvcompat/usr/share/man/man8/
mv "$pkgdir"/usr/share/man/man8/{telinit,halt,reboot,poweroff,runlevel,shutdown}.8 \
"$srcdir"/_sysvcompat/usr/share/man/man8
-
- # create /var/log/journal. users can control the actual log destination via journald.conf
- install -dm755 "$pkgdir/var/log/journal"
}
package_systemd-sysvcompat() {