From c6f0727a32484001ec3d49adb6ae33ad67f5e91bacf57025166000be21915f60 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Fri, 30 Oct 2020 17:40:53 +0000 Subject: [PATCH] - Drop DISABLE_STOP_ON_REMOVAL support (jsc#SLE-8968) OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=40 --- macros.systemd | 29 ++--------------------------- systemd-rpm-macros.changes | 5 +++++ systemd-rpm-macros.spec | 2 +- 3 files changed, 8 insertions(+), 28 deletions(-) diff --git a/macros.systemd b/macros.systemd index c8d0f88..a6aa57f 100644 --- a/macros.systemd +++ b/macros.systemd @@ -64,16 +64,6 @@ OrderWithRequires(postun): systemd \ /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() \ # disable migration if initial install under systemd \ [ -d /var/lib/systemd/migrated ] || mkdir -p /var/lib/systemd/migrated || : \ @@ -144,17 +134,10 @@ fi \ # On uninstall, disable and stop services # -# 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) \ if [ $1 -eq 0 -a -x /usr/bin/systemctl ]; then \ # Package removal, not upgrade \ - /usr/bin/systemctl --no-reload disable %{?*} || : \ - %{expand:%%_stop_on_removal%{-f:_force}%{!-f:%{-n:_never}} %{?*}} \ + /usr/bin/systemctl --no-reload disable --now %{?*} || : \ fi \ %{nil} @@ -205,18 +188,10 @@ fi \ %systemd_user_post() %{expand:%systemd_post \\--global %%{?*}} -# -# 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 %{?*} || : \ - %{expand:%%_stop_on_removal%{-f:_force}%{!-f:%{-n:_never}} %{?*}} \ + /usr/bin/systemctl --no-reload disable --now %{?*} || : \ fi \ %{nil} diff --git a/systemd-rpm-macros.changes b/systemd-rpm-macros.changes index 2dcf850..227d515 100644 --- a/systemd-rpm-macros.changes +++ b/systemd-rpm-macros.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Oct 30 17:37:54 UTC 2020 - Franck Bui + +- Drop DISABLE_STOP_ON_REMOVAL support (jsc#SLE-8968) + ------------------------------------------------------------------- Fri Sep 25 09:25:44 UTC 2020 - Franck Bui diff --git a/systemd-rpm-macros.spec b/systemd-rpm-macros.spec index a9ab831..726e0ac 100644 --- a/systemd-rpm-macros.spec +++ b/systemd-rpm-macros.spec @@ -17,7 +17,7 @@ Name: systemd-rpm-macros -Version: 4.1 +Version: 5 Release: 0 Summary: RPM macros for systemd License: LGPL-2.1-or-later