From 9c1f03c0b43d1eac23c8f7fe8ef21c36df3673d2a7ec736b57c1d0928262d2d1 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 16 Oct 2014 14:07:21 +0000 Subject: [PATCH] Accepting request 256883 from home:tsaupe:branches:Base:System make systemd aware of changed unit file content after update OBS-URL: https://build.opensuse.org/request/show/256883 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=5 --- systemd-daemon-reload-before-service-restart.patch | 11 +++++++++++ systemd-rpm-macros.changes | 6 ++++++ systemd-rpm-macros.spec | 4 ++++ 3 files changed, 21 insertions(+) create mode 100644 systemd-daemon-reload-before-service-restart.patch diff --git a/systemd-daemon-reload-before-service-restart.patch b/systemd-daemon-reload-before-service-restart.patch new file mode 100644 index 0000000..03b6c4a --- /dev/null +++ b/systemd-daemon-reload-before-service-restart.patch @@ -0,0 +1,11 @@ +diff -Naur orig/macros.systemd mod/macros.systemd +--- orig/macros.systemd 2014-10-14 08:54:56.264889350 +0200 ++++ mod/macros.systemd 2014-10-15 13:10:43.134133358 +0200 +@@ -108,6 +108,7 @@ + if [ $FIRST_ARG -ge 1 ]; then \ + # Package upgrade, not uninstall \ + if test "$YAST_IS_RUNNING" != "instsys" -a "$DISABLE_RESTART_ON_UPDATE" != yes ; then \ ++ /usr/bin/systemctl daemon-reload >/dev/null 2>&1 || : \ + /usr/bin/systemctl try-restart %{?*} >/dev/null 2>&1 || : \ + fi \ + else # package uninstall \ diff --git a/systemd-rpm-macros.changes b/systemd-rpm-macros.changes index 02e1f2f..c05d947 100644 --- a/systemd-rpm-macros.changes +++ b/systemd-rpm-macros.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Oct 15 09:28:36 UTC 2014 - thomas.blume@suse.com + +- make systemd aware of changed unit file content after update + add systemd-daemon-reload-before-service-restart.patch + ------------------------------------------------------------------- Thu Mar 27 14:44:53 UTC 2014 - werner@suse.de diff --git a/systemd-rpm-macros.spec b/systemd-rpm-macros.spec index 89aadd1..c45cbf4 100644 --- a/systemd-rpm-macros.spec +++ b/systemd-rpm-macros.spec @@ -29,12 +29,16 @@ Source0: macros.systemd Requires: coreutils BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch +# make systemd aware of changed unit file content after update +Patch0: systemd-daemon-reload-before-service-restart.patch %description Starting with openSUSE 12.1, several RPM macros must be used to package systemd services files. This package provides these macros. %prep +cd %{_sourcedir} +%patch0 -p1 %build