Hello community,
here is the log from the commit of package systemd-rpm-macros for
openSUSE:Factory checked in at 2016-03-05 13:04:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/systemd-rpm-macros (Old)
and /work/SRC/openSUSE:Factory/.systemd-rpm-macros.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "systemd-rpm-macros"
Changes:
--------
--- /work/SRC/openSUSE:Factory/systemd-rpm-macros/systemd-rpm-macros.changes
2015-11-26 17:00:41.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.systemd-rpm-macros.new/systemd-rpm-macros.changes
2016-03-05 13:04:56.000000000 +0100
@@ -1,0 +2,15 @@
+Thu Mar 3 10:01:52 UTC 2016 - [email protected]
+
+- Allow the packagers to specify the options -f and -n on the
+ macros %service_del_preun(), %service_del_postun(), %systemd_post(),
+ and %systemd_preun() (boo#968405)
+
+-------------------------------------------------------------------
+Sat Feb 27 10:18:55 UTC 2016 - [email protected]
+
+- Also honor DISABLE_STOP_ON_REMOVAL and DISABLE_RESTART_ON_UPDATE
+ when specified by a package directly in the .spec file. Some
+ package know that a restart of their service is fatal
+ (boo#968405).
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ systemd-rpm-macros.spec ++++++
--- /var/tmp/diff_new_pack.35RkCw/_old 2016-03-05 13:04:57.000000000 +0100
+++ /var/tmp/diff_new_pack.35RkCw/_new 2016-03-05 13:04:57.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package systemd-rpm-macros
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
++++++ macros.systemd ++++++
--- /var/tmp/diff_new_pack.35RkCw/_old 2016-03-05 13:04:57.000000000 +0100
+++ /var/tmp/diff_new_pack.35RkCw/_new 2016-03-05 13:04:57.000000000 +0100
@@ -50,17 +50,33 @@
%_ntpunitsdir /usr/lib/systemd/ntp-units.d
%_binfmtdir /usr/lib/binfmt.d
-%_restart_check_systemctl
\
- test -f /etc/sysconfig/services && . /etc/sysconfig/services
\
- test "$YAST_IS_RUNNING" = instsys && exit 0
\
- test "$DISABLE_RESTART_ON_UPDATE" = yes && exit 0
\
- /usr/bin/systemctl try-restart %{nil}
-
-%_stop_check_systemctl
\
- test -f /etc/sysconfig/services && . /etc/sysconfig/services
\
- test "$YAST_IS_RUNNING" = instsys && exit 0
\
- test "$DISABLE_STOP_ON_REMOVAL" = yes && exit 0
\
- /usr/bin/systemctl stop %{nil}
+%_restart_on_update_force() (\
+ test "$YAST_IS_RUNNING" = instsys && exit 0 \
+ %{?*:/usr/bin/systemctl try-restart %{*}} \
+ ) || : %{nil}
+%_restart_on_update_never() %{?*:# Restart of %{*} skipped} %{nil}
+%_restart_on_update() (\
+ test "$YAST_IS_RUNNING" = instsys && exit 0\
+ test -f /etc/sysconfig/services -a \\\
+ -z "$DISABLE_RESTART_ON_UPDATE" && .
/etc/sysconfig/services\
+ test "$DISABLE_RESTART_ON_UPDATE" = yes -o \\\
+ "$DISABLE_RESTART_ON_UPDATE" = 1 && exit 0\
+ %{?*:/usr/bin/systemctl try-restart %{*}}\
+ ) || : %{nil}
+
+%_stop_on_removal_force() ( \
+ test "$YAST_IS_RUNNING" = instsys && exit 0\
+ %{?*:/usr/bin/systemctl stop %{*}}\
+ ) || : %{nil}
+%_stop_on_removal_never() %{?*:# Stop of %{*} skipped} %{nil}
+%_stop_on_removal() (\
+ test "$YAST_IS_RUNNING" = instsys && exit 0\
+ test -f /etc/sysconfig/services -a \\\
+ -z "$DISABLE_STOP_ON_REMOVAL" && . /etc/sysconfig/services\
+ test "$DISABLE_STOP_ON_REMOVAL" = yes -o \\\
+ "$DISABLE_STOP_ON_REMOVAL" = 1 && exit 0\
+ %{?*:/usr/bin/systemctl stop %{*}}\
+ ) || : %{nil}
%service_add_pre()
\
test -n "$FIRST_ARG" || FIRST_ARG="$1"
\
@@ -128,23 +144,38 @@
%{nil}
# On uninstall, disable and stop services
-%service_del_preun()
\
+#
+# Options used if not in an installation systems
+# -f that is fore service stop in removal
+# -n that do not touch active service
+# the default is to check for DISABLE_STOP_ON_REMOVAL environment
+# variable if not found use the value read from /etc/sysconfig/services
+#
+%service_del_preun(fn)
\
test -n "$FIRST_ARG" || FIRST_ARG="$1"
\
if [ "$FIRST_ARG" -eq 0 -a -x /usr/bin/systemctl ]; then
\
# Package removal, not upgrade
\
/usr/bin/systemctl --no-reload disable %{?*} || :
\
- ( %_stop_check_systemctl %{?*} || : )
\
+ %{expand:%%_stop_on_removal%{-f:_force}%{!-f:%{-n:_never}} %{?*}}
\
fi
\
%{nil}
# On uninstall, tell systemd to reload its unit files
-%service_del_postun()
\
+#
+# Options used if not in an installation systems
+# -f that is fore service restart in removal
+# -n that do not touch active service
+# the default is to check for DISABLE_RESTART_ON_UPDATE environment
+# variable if not found use the value read from /etc/sysconfig/services
+#
+
+%service_del_postun(fn)
\
test -n "$FIRST_ARG" || FIRST_ARG="$1"
\
if [ "$FIRST_ARG" -ge 1 ]; then
\
# Package upgrade, not uninstall
\
if [ -x /usr/bin/systemctl ]; then
\
/usr/bin/systemctl daemon-reload || :
\
- ( %_restart_check_systemctl %{?*} || : )
\
+ %{expand:%%_restart_on_update%{-f:_force}%{!-f:%{-n:_never}}
%{?*}} \
fi
\
else # package uninstall
\
for service in %{?*} ; do
\
@@ -157,21 +188,35 @@
fi
\
%{nil}
-%systemd_post()
\
+#
+# Options used if not in an installation systems
+# -f that is fore service stop in removal
+# -n that do not touch active service
+# the default is to check for DISABLE_STOP_ON_REMOVAL environment
+# variable if not found use the value read from /etc/sysconfig/services
+#
+%systemd_post(fn)
\
if [ "$1" -eq 0 -a -x /usr/bin/systemctl ]; then
\
# Package removal, not upgrade
\
/usr/bin/systemctl --no-reload disable %{?*} || :
\
- ( %_stop_check_systemctl %{?*} || : )
\
+ %{expand:%%_stop_on_removal%{-f:_force}%{!-f:%{-n:_never}} %{?*}}
\
fi
\
%{nil}
%systemd_user_post() %systemd_post --user --global %{?*}
-%systemd_preun()
\
+#
+# Options used if not in an installation systems
+# -f that is fore service stop in removal
+# -n that do not touch active service
+# the default is to check for DISABLE_STOP_ON_REMOVAL environment
+# variable if not found use the value read from /etc/sysconfig/services
+#
+%systemd_preun(fn)
\
if [ "$1" -eq 0 -a -x /usr/bin/systemctl ]; then
\
# Package removal, not upgrade
\
/usr/bin/systemctl --no-reload disable %{?*} || :
\
- ( %_stop_check_systemctl %{?*} || : )
\
+ %{expand:%%_stop_on_removal%{-f:_force}%{!-f:%{-n:_never}} %{?*}}
\
fi
\
%{nil}