- 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
This commit is contained in:
Franck Bui 2020-10-30 17:40:53 +00:00 committed by Git OBS Bridge
parent a97f57e56e
commit 271343e90b
3 changed files with 8 additions and 28 deletions

View File

@ -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}

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Oct 30 17:37:54 UTC 2020 - Franck Bui <fbui@suse.com>
- Drop DISABLE_STOP_ON_REMOVAL support (jsc#SLE-8968)
-------------------------------------------------------------------
Fri Sep 25 09:25:44 UTC 2020 - Franck Bui <fbui@suse.com>

View File

@ -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