summaryrefslogtreecommitdiff
path: root/testing/systemd
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-08-12 00:04:05 +0000
committerroot <root@rshg054.dnsready.net>2012-08-12 00:04:05 +0000
commit012c4b7f27441c85d7f9c46a619a3b356c94cab7 (patch)
tree3d07a327d03ab3277405e9f8083afa603f468571 /testing/systemd
parent073a889144d77058f1eff2100ad48a538bdc0422 (diff)
Sun Aug 12 00:04:05 UTC 2012
Diffstat (limited to 'testing/systemd')
-rw-r--r--testing/systemd/0001-shutdown-recursively-mark-root-as-private-before-piv.patch31
-rw-r--r--testing/systemd/0001-systemctl-fix-issue-with-systemctl-daemon-reexec.patch73
-rw-r--r--testing/systemd/PKGBUILD16
3 files changed, 118 insertions, 2 deletions
diff --git a/testing/systemd/0001-shutdown-recursively-mark-root-as-private-before-piv.patch b/testing/systemd/0001-shutdown-recursively-mark-root-as-private-before-piv.patch
new file mode 100644
index 000000000..5c6085c95
--- /dev/null
+++ b/testing/systemd/0001-shutdown-recursively-mark-root-as-private-before-piv.patch
@@ -0,0 +1,31 @@
+From 4bfa638d43c05e8db052cd55818765bb3575a405 Mon Sep 17 00:00:00 2001
+From: Dave Reisner <dreisner@archlinux.org>
+Date: Fri, 10 Aug 2012 11:02:03 -0400
+Subject: [PATCH] shutdown: recursively mark root as private before pivot
+
+Because root is now recursively marked as shared on bootup, we need to
+recursively mark root as private. This prevents a pivot_root failure on
+shutdown:
+
+ Cannot finalize remaining file systems and devices, giving up.
+ pivot failed: Invalid argument
+---
+ src/core/shutdown.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/core/shutdown.c b/src/core/shutdown.c
+index 105a604..0b7cbd8 100644
+--- a/src/core/shutdown.c
++++ b/src/core/shutdown.c
+@@ -109,7 +109,7 @@ static int pivot_to_new_root(void) {
+ It works for pivot_root, but the ref count for the root device
+ is not decreasing :-/
+ */
+- if (mount(NULL, "/", NULL, MS_PRIVATE, NULL) < 0) {
++ if (mount(NULL, "/", NULL, MS_REC|MS_PRIVATE, NULL) < 0) {
+ log_error("Failed to make \"/\" private mount %m");
+ return -errno;
+ }
+--
+1.7.11.4
+
diff --git a/testing/systemd/0001-systemctl-fix-issue-with-systemctl-daemon-reexec.patch b/testing/systemd/0001-systemctl-fix-issue-with-systemctl-daemon-reexec.patch
new file mode 100644
index 000000000..3aec94edc
--- /dev/null
+++ b/testing/systemd/0001-systemctl-fix-issue-with-systemctl-daemon-reexec.patch
@@ -0,0 +1,73 @@
+From c516c8d17f77a1c761447f4c40c8dfffeda2e06d Mon Sep 17 00:00:00 2001
+From: Simon Peeters <peeters.simon@gmail.com>
+Date: Fri, 10 Aug 2012 17:32:19 +0200
+Subject: [PATCH] systemctl: fix issue with systemctl daemon-reexec
+
+---
+ src/shared/dbus-common.c | 3 ++-
+ src/systemctl/systemctl.c | 11 ++++++++---
+ 2 files changed, 10 insertions(+), 4 deletions(-)
+
+diff --git a/src/shared/dbus-common.c b/src/shared/dbus-common.c
+index 7f0dce5..da2dc2e 100644
+--- a/src/shared/dbus-common.c
++++ b/src/shared/dbus-common.c
+@@ -1287,7 +1287,8 @@ int bus_method_call_with_reply(DBusConnection *bus,
+ reply = dbus_connection_send_with_reply_and_block(bus, m, -1, &error);
+ dbus_message_unref(m);
+ if (!reply) {
+- log_error("Failed to issue method call: %s", bus_error_message(&error));
++ if (!return_error)
++ log_error("Failed to issue method call: %s", bus_error_message(&error));
+ if (bus_error_is_no_service(&error))
+ r = -ENOENT;
+ else if (dbus_error_has_name(&error, DBUS_ERROR_ACCESS_DENIED))
+diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
+index 2e0aaaa..13e0f91 100644
+--- a/src/systemctl/systemctl.c
++++ b/src/systemctl/systemctl.c
+@@ -1537,11 +1537,12 @@ static int start_unit_one(
+ DBUS_TYPE_INVALID);
+ free(n);
+ if (r) {
+- if (r == -ENOENT && arg_action != ACTION_SYSTEMCTL ) {
++ if (r == -ENOENT && arg_action != ACTION_SYSTEMCTL )
+ /* There's always a fallback possible for
+ * legacy actions. */
+ r = -EADDRNOTAVAIL;
+- }
++ else
++ log_error("Failed to issue method call: %s", bus_error_message(error));
+ goto finish;
+ }
+
+@@ -3143,6 +3144,7 @@ finish:
+ static int daemon_reload(DBusConnection *bus, char **args) {
+ int r;
+ const char *method;
++ DBusError error;
+
+ if (arg_action == ACTION_RELOAD)
+ method = "Reload";
+@@ -3171,7 +3173,7 @@ static int daemon_reload(DBusConnection *bus, char **args) {
+ "org.freedesktop.systemd1.Manager",
+ method,
+ NULL,
+- NULL,
++ &error,
+ DBUS_TYPE_INVALID);
+
+ if (r == -ENOENT && arg_action != ACTION_SYSTEMCTL)
+@@ -3182,6 +3184,9 @@ static int daemon_reload(DBusConnection *bus, char **args) {
+ /* On reexecution, we expect a disconnect, not
+ * a reply */
+ r = 0;
++ else if (r)
++ log_error("Failed to issue method call: %s", bus_error_message(&error));
++ dbus_error_free(&error);
+
+ return r;
+ }
+--
+1.7.11.4
+
diff --git a/testing/systemd/PKGBUILD b/testing/systemd/PKGBUILD
index 482d2e8bb..b20882fd5 100644
--- a/testing/systemd/PKGBUILD
+++ b/testing/systemd/PKGBUILD
@@ -4,7 +4,7 @@
pkgbase=systemd
pkgname=('systemd' 'libsystemd' 'systemd-tools' 'systemd-sysvcompat')
pkgver=188
-pkgrel=1
+pkgrel=2
arch=('i686' 'x86_64')
url="http://www.freedesktop.org/wiki/Software/systemd"
license=('GPL2' 'LGPL2.1' 'MIT')
@@ -17,6 +17,8 @@ source=("http://www.freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz"
'initcpio-install-timestamp'
'0001-Reinstate-TIMEOUT-handling.patch'
'locale.sh'
+ 0001-shutdown-recursively-mark-root-as-private-before-piv.patch
+ 0001-systemctl-fix-issue-with-systemctl-daemon-reexec.patch
'use-split-usr-path.patch')
md5sums=('d89b42699695554949d072ef46c0dfc9'
'e99e9189aa2f6084ac28b8ddf605aeb8'
@@ -24,6 +26,8 @@ md5sums=('d89b42699695554949d072ef46c0dfc9'
'df69615503ad293c9ddf9d8b7755282d'
'5543be25f205f853a21fa5ee68e03f0d'
'f15956945052bb911e5df81cf5e7e5dc'
+ '49d145ef3ca299025c085555314212b6'
+ 'bccb994f4cfbd251b6c34d7d90a6ba0f'
'482dba45a783f06c2239f1355f4ce72f')
build() {
@@ -31,7 +35,15 @@ build() {
# still waiting on ipw2x00 to get fixed...
patch -Np1 <"$srcdir/0001-Reinstate-TIMEOUT-handling.patch"
- patch -Np1 < "$srcdir/use-split-usr-path.patch"
+ patch -Np1 <"$srcdir/use-split-usr-path.patch"
+
+ # http://bugs.archlinux.org/task/31089
+ # upstream c516c8d17f77a1c761447f4c40c8dfffeda2e06d
+ patch -Np1 <"$srcdir/0001-systemctl-fix-issue-with-systemctl-daemon-reexec.patch"
+
+ # http://bugs.archlinux.org/task/31092
+ # upstream 4bfa638d43c05e8db052cd55818765bb3575a405
+ patch -Np1 <"$srcdir/0001-shutdown-recursively-mark-root-as-private-before-piv.patch"
./configure \
--libexecdir=/usr/lib \