- 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/package/show/Base:System/systemd?expand=0&rev=202
This commit is contained in:
Frederic Crozat 2011-09-29 14:00:16 +00:00 committed by Git OBS Bridge
parent 19bc7d8865
commit da3c265787
5 changed files with 53 additions and 4 deletions

30
detect-non-running.patch Normal file
View File

@ -0,0 +1,30 @@
From 8185a5090a34531b9ef0a65ed3e948e7b6839754 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
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

View File

@ -34,12 +34,12 @@ test -n "$FIRST_ARG" || FIRST_ARG=$1 \
# disable migration if initial install under systemd \ # disable migration if initial install under systemd \
if [ $FIRST_ARG -eq 1 ]; then \ if [ $FIRST_ARG -eq 1 ]; then \
for service in %{?*} ; do \ for service in %{?*} ; do \
sysv_service=`echo $service | sed -e 's/\\.[a-z]*//g'` \ sysv_service=${service%.*} \
touch "/var/lib/systemd/migrated/$sysv_service" \ touch "/var/lib/systemd/migrated/$sysv_service" \
done \ done \
else \ else \
for service in %{?*} ; do \ 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 \ if [ ! -e "/var/lib/systemd/migrated/$sysv_service" ]; then \
services_to_migrate="$services_to_migrate $sysv_service" \ services_to_migrate="$services_to_migrate $sysv_service" \
fi \ fi \
@ -54,7 +54,7 @@ fi \
%service_add_post() \ %service_add_post() \
test -n "$FIRST_ARG" || FIRST_ARG=$1 \ test -n "$FIRST_ARG" || FIRST_ARG=$1 \
for service in %{?*} ; do \ 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 \ if [ ! -e "/var/lib/systemd/migrated/$sysv_service" ]; then \
services_to_migrate="$services_to_migrate $sysv_service" \ services_to_migrate="$services_to_migrate $sysv_service" \
touch "/var/lib/systemd/migrated/$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 || : \ /bin/systemctl try-restart %{?*} >/dev/null 2>&1 || : \
else # package uninstall \ else # package uninstall \
for service in %{?*} ; do \ 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 \ rm -f "/var/lib/systemd/migrated/$sysv_service" 2> /dev/null \
done \ done \
/bin/systemctl daemon-reload >/dev/null 2>&1 || : \ /bin/systemctl daemon-reload >/dev/null 2>&1 || : \

View File

@ -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 Mon Sep 26 14:52:46 UTC 2011 - fcrozat@suse.com

View File

@ -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 Mon Sep 26 14:52:46 UTC 2011 - fcrozat@suse.com

View File

@ -44,6 +44,7 @@ Requires: dbus-1 >= 1.4.0
Requires: kbd Requires: kbd
Requires: util-linux >= 2.19 Requires: util-linux >= 2.19
Requires: pam-config Requires: pam-config
Requires: systemd-presets-branding
Conflicts: filesystem < 11.5 Conflicts: filesystem < 11.5
Conflicts: mkinitrd < 2.7.0 Conflicts: mkinitrd < 2.7.0
Source0: http://www.freedesktop.org/software/systemd/%{name}-%{version}.tar.bz2 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 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 # PATCH-FIX-UPSTREAM fix-reload.patch fcrozat@suse.com bnc#719221 -- Fix daemon-reload and conditions when service is starting
Patch11: fix-reload.patch Patch11: fix-reload.patch
Patch12: detect-non-running.patch
%description %description
Systemd is a system and service manager, compatible with SysV and LSB Systemd is a system and service manager, compatible with SysV and LSB
@ -124,6 +126,7 @@ Plymouth integration for systemd
%patch9 -p1 %patch9 -p1
%patch10 -p1 %patch10 -p1
%patch11 -p1 %patch11 -p1
%patch12 -p1
%build %build
autoreconf -fiv autoreconf -fiv