Hello community, here is the log from the commit of package systemd-rpm-macros for openSUSE:Factory checked in at 2019-03-04 09:08:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/systemd-rpm-macros (Old) and /work/SRC/openSUSE:Factory/.systemd-rpm-macros.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "systemd-rpm-macros" Mon Mar 4 09:08:29 2019 rev:27 rq:680402 version:4 Changes: -------- --- /work/SRC/openSUSE:Factory/systemd-rpm-macros/systemd-rpm-macros.changes 2018-12-10 12:22:18.546887932 +0100 +++ /work/SRC/openSUSE:Factory/.systemd-rpm-macros.new.28833/systemd-rpm-macros.changes 2019-03-04 09:08:35.184725895 +0100 @@ -1,0 +2,71 @@ +Fri Mar 1 08:18:07 UTC 2019 - Franck Bui <[email protected]> + +- Fix %_restart_on_update_force: drop one extra trailing '}' + + Thanks Werner for spotting. + +------------------------------------------------------------------- +Wed Feb 27 17:43:13 UTC 2019 - Franck Bui <[email protected]> + +- Simplify %_restart_on_update and %_stop_on_removal + + There's no need to spawn sub shells when these macros are used. + +------------------------------------------------------------------- +Wed Feb 27 16:57:04 UTC 2019 - Franck Bui <[email protected]> + +- Macros arguments are mandatory + + Especially in %_restart_on_update_never and %_stop_on_removal_never, + let's assume that they always receive unit names as arguments. This + allows to make them slightly simpler (less rpm macro black magic). + + Callers will fail earlier if no arguments are passed anyway. + +------------------------------------------------------------------- +Wed Feb 27 14:13:28 UTC 2019 - Franck Bui <[email protected]> + +- Make sure %_restart_on_update_never and %_stop_on_removal_never + don't expand to the empty string + + Otherwise sequences like the following would result in incorrect + shell syntax: + + if [ ]; then + %_restart_on_update_never + fi + +------------------------------------------------------------------- +Wed Feb 27 12:17:18 UTC 2019 - Franck Bui <[email protected]> + +- Restore one daemon-reload command + + It was erroneously removed during the drop of $YAST_IS_RUNNING. + +------------------------------------------------------------------- +Mon Feb 25 09:55:28 UTC 2019 - Franck Bui <[email protected]> + +- Bump version to 4 + +------------------------------------------------------------------- +Thu Feb 22 13:00:18 UTC 2019 - Franck Bui <[email protected]> + +- Introduce %service_del_postun_without_restart + + This is another step to make the SUSE rpm macros closer to their + upstream counterparts. + + Introduce %service_del_postun_without_restart which should help in + getting rid of '-f' and '-n' switches of %service_del_postun. + +------------------------------------------------------------------- +Thu Feb 21 17:53:18 UTC 2019 - Franck Bui <[email protected]> + +- Drop $YAST_IS_RUNNING in favor of $SYSTEMD_OFFLINE (bsc#1117489) + + libzypp now kindly defines SYSTEMD_OFFLINE when appropriate (see + bsc#1118758). Therefore we don't need to rely on YAST_IS_RUNNING + anymore. It's a tiny step to make the SUSE macros closer to their + upstream counterparts. + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ systemd-rpm-macros.spec ++++++ --- /var/tmp/diff_new_pack.TgrJQE/_old 2019-03-04 09:08:36.636725652 +0100 +++ /var/tmp/diff_new_pack.TgrJQE/_new 2019-03-04 09:08:36.640725652 +0100 @@ -1,7 +1,7 @@ # # spec file for package systemd-rpm-macros # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 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 @@ -17,7 +17,7 @@ Name: systemd-rpm-macros -Version: 3 +Version: 4 Release: 0 Summary: RPM macros for systemd License: LGPL-2.1-or-later ++++++ macros.systemd ++++++ --- /var/tmp/diff_new_pack.TgrJQE/_old 2019-03-04 09:08:36.668725647 +0100 +++ /var/tmp/diff_new_pack.TgrJQE/_new 2019-03-04 09:08:36.672725646 +0100 @@ -18,6 +18,7 @@ # # %postun # %service_del_postun demo.service +# %service_del_postun_without_restart demo.service # %_unitdir /usr/lib/systemd/system @@ -50,33 +51,25 @@ OrderWithRequires(postun): systemd \ %{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} +%_restart_on_update_force() /usr/bin/systemctl try-restart %{*} || : %{nil} +%_restart_on_update_never() : # Restart of %{*} skipped %{nil} + +%_restart_on_update() \ + test -z "$DISABLE_RESTART_ON_UPDATE" -a -f /etc/sysconfig/services &&\\\ + . /etc/sysconfig/services \ + test "$DISABLE_RESTART_ON_UPDATE" != yes -a "$DISABLE_RESTART_ON_UPDATE" != 1 &&\\\ + /usr/bin/systemctl try-restart %{*} || : \ +%{nil} + +%_stop_on_removal_force() /usr/bin/systemctl stop %{*} || : %{nil} +%_stop_on_removal_never() : # Stop of %{*} skipped} %{nil} + +%_stop_on_removal() \ + test -z "$DISABLE_STOP_ON_REMOVAL" -a -f /etc/sysconfig/services &&\\\ + . /etc/sysconfig/services \ + test "$DISABLE_STOP_ON_REMOVAL" != yes -a "$DISABLE_STOP_ON_REMOVAL" != 1 &&\\\ + /usr/bin/systemctl stop %{*} || : \ +%{nil} %service_add_pre() \ test -n "$FIRST_ARG" || FIRST_ARG="$1" \ @@ -115,9 +108,10 @@ test -n "$FIRST_ARG" || FIRST_ARG="$1" \ [ -d /var/lib/systemd/migrated ] || mkdir -p /var/lib/systemd/migrated || : \ \ -if [ "$YAST_IS_RUNNING" != "instsys" -a -x /usr/bin/systemctl ]; then \ - /usr/bin/systemctl daemon-reload || : \ +if [ -x /usr/bin/systemctl ]; then \ + /usr/bin/systemctl daemon-reload || : \ fi \ + \ if [ "$FIRST_ARG" -eq 1 ]; then \ if [ -x /usr/bin/systemctl ]; then \ /usr/bin/systemctl preset %{?*} || : \ @@ -164,34 +158,46 @@ fi \ %{nil} +# On uninstall, tell systemd to reload its unit files. +# On update, tell systemd to reload its unit files but don't restart service. +# +%service_del_postun_without_restart() \ +test -n "$FIRST_ARG" || FIRST_ARG="$1" \ +if [ "$FIRST_ARG" -eq 0 ]; then \ + # Package removal \ + for service in %{?*} ; do \ + sysv_service="${service%.*}" \ + rm -f "/var/lib/systemd/migrated/$sysv_service" || : \ + done \ +fi \ +if [ -x /usr/bin/systemctl ]; then \ + /usr/bin/systemctl daemon-reload || : \ +fi \ +%{nil} + # On uninstall, tell systemd to reload its unit files # # Options used if not in an installation systems -# -f that is fore service restart in removal -# -n that do not touch active service +# -f that is force service restart in removal (deprecated) +# -n that do not touch active service (depredacted) # 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" \ +%service_del_postun_without_restart %{?*} \ if [ "$FIRST_ARG" -ge 1 ]; then \ # Package upgrade, not uninstall \ if [ -x /usr/bin/systemctl ]; then \ - /usr/bin/systemctl daemon-reload || : \ %{expand:%%_restart_on_update%{-f:_force}%{!-f:%{-n:_never}} %{?*}} \ fi \ -else # package uninstall \ - for service in %{?*} ; do \ - sysv_service="${service%.*}" \ - rm -f "/var/lib/systemd/migrated/$sysv_service" || : \ - done \ - if [ -x /usr/bin/systemctl ]; then \ - /usr/bin/systemctl daemon-reload || : \ - fi \ fi \ %{nil} +# +# Upstream variants +# + %systemd_post() \ if [ $1 -eq 1 -a -x /usr/bin/systemctl ] ; then \ # Initial installation \
