From b7f93adf227d4a8352b844417a1716f86959533fdfafac7653de86adae2d43f8 Mon Sep 17 00:00:00 2001 From: Frederic Crozat Date: Thu, 29 Sep 2011 14:00:16 +0000 Subject: [PATCH] Accepting request 85458 from home:fcrozat:systemd - Add detect-non-running.patch: fix assertion when running systemctl under non systemd system (git). - Requires presets branding package. - Improve macros a little bit. OBS-URL: https://build.opensuse.org/request/show/85458 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=202 --- detect-non-running.patch | 30 ++++++++++++++++++++++++++++++ macros.systemd | 8 ++++---- systemd-gtk.changes | 8 ++++++++ systemd.changes | 8 ++++++++ systemd.spec | 3 +++ 5 files changed, 53 insertions(+), 4 deletions(-) create mode 100644 detect-non-running.patch diff --git a/detect-non-running.patch b/detect-non-running.patch new file mode 100644 index 00000000..eedcac3c --- /dev/null +++ b/detect-non-running.patch @@ -0,0 +1,30 @@ +From 8185a5090a34531b9ef0a65ed3e948e7b6839754 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Thu, 29 Sep 2011 15:31:53 +0200 +Subject: [PATCH] systemctl: fix detection whether the dbus connection is available + +--- + src/systemctl.c | 7 +++++++ + 1 files changed, 7 insertions(+), 0 deletions(-) + +diff --git a/src/systemctl.c b/src/systemctl.c +index 848d6a8..7af0f73 100644 +--- a/src/systemctl.c ++++ b/src/systemctl.c +@@ -4989,6 +4989,13 @@ static int systemctl_main(DBusConnection *bus, int argc, char *argv[], DBusError + return 0; + } + ++ if (!bus) { ++ log_error("Failed to get D-Bus connection: %s", error->message); ++ return -EIO; ++ } ++ ++ } else { ++ + if (!bus && !avoid_bus()) { + log_error("Failed to get D-Bus connection: %s", error->message); + return -EIO; +-- +1.7.3.4 + diff --git a/macros.systemd b/macros.systemd index 8995a9a7..87621abe 100644 --- a/macros.systemd +++ b/macros.systemd @@ -34,12 +34,12 @@ test -n "$FIRST_ARG" || FIRST_ARG=$1 \ # disable migration if initial install under systemd \ if [ $FIRST_ARG -eq 1 ]; then \ for service in %{?*} ; do \ - sysv_service=`echo $service | sed -e 's/\\.[a-z]*//g'` \ + sysv_service=${service%.*} \ touch "/var/lib/systemd/migrated/$sysv_service" \ done \ else \ for service in %{?*} ; do \ - sysv_service=`echo $service | sed -e 's/\\.[a-z]*//g'` \ + sysv_service=${service%.*} \ if [ ! -e "/var/lib/systemd/migrated/$sysv_service" ]; then \ services_to_migrate="$services_to_migrate $sysv_service" \ fi \ @@ -54,7 +54,7 @@ fi \ %service_add_post() \ test -n "$FIRST_ARG" || FIRST_ARG=$1 \ for service in %{?*} ; do \ - sysv_service=`echo $service | sed -e 's/\\.[a-z]*//g'` \ + sysv_service=${service%.*} \ if [ ! -e "/var/lib/systemd/migrated/$sysv_service" ]; then \ services_to_migrate="$services_to_migrate $sysv_service" \ touch "/var/lib/systemd/migrated/$sysv_service" \ @@ -85,7 +85,7 @@ if [ $FIRST_ARG -ge 1 ]; then \ /bin/systemctl try-restart %{?*} >/dev/null 2>&1 || : \ else # package uninstall \ for service in %{?*} ; do \ - sysv_service=`echo $service | sed -e 's/\\.[a-z]*//g'` \ + sysv_service=${service%.*} \ rm -f "/var/lib/systemd/migrated/$sysv_service" 2> /dev/null \ done \ /bin/systemctl daemon-reload >/dev/null 2>&1 || : \ diff --git a/systemd-gtk.changes b/systemd-gtk.changes index 7f8c2257..f33c0c0b 100644 --- a/systemd-gtk.changes +++ b/systemd-gtk.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Sep 29 13:43:00 UTC 2011 - fcrozat@suse.com + +- Add detect-non-running.patch: fix assertion when running + systemctl under non systemd system (git). +- Requires presets branding package. +- Improve macros a little bit. + ------------------------------------------------------------------- Mon Sep 26 14:52:46 UTC 2011 - fcrozat@suse.com diff --git a/systemd.changes b/systemd.changes index 7f8c2257..f33c0c0b 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Sep 29 13:43:00 UTC 2011 - fcrozat@suse.com + +- Add detect-non-running.patch: fix assertion when running + systemctl under non systemd system (git). +- Requires presets branding package. +- Improve macros a little bit. + ------------------------------------------------------------------- Mon Sep 26 14:52:46 UTC 2011 - fcrozat@suse.com diff --git a/systemd.spec b/systemd.spec index 3b98d1f4..9709b4c9 100644 --- a/systemd.spec +++ b/systemd.spec @@ -44,6 +44,7 @@ Requires: dbus-1 >= 1.4.0 Requires: kbd Requires: util-linux >= 2.19 Requires: pam-config +Requires: systemd-presets-branding Conflicts: filesystem < 11.5 Conflicts: mkinitrd < 2.7.0 Source0: http://www.freedesktop.org/software/systemd/%{name}-%{version}.tar.bz2 @@ -69,6 +70,7 @@ Patch10: revert_insserv_conf_parsing.patch Patch9: 0001-execute-fix-bus-serialization-for-commands.patch # PATCH-FIX-UPSTREAM fix-reload.patch fcrozat@suse.com bnc#719221 -- Fix daemon-reload and conditions when service is starting Patch11: fix-reload.patch +Patch12: detect-non-running.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -124,6 +126,7 @@ Plymouth integration for systemd %patch9 -p1 %patch10 -p1 %patch11 -p1 +%patch12 -p1 %build autoreconf -fiv