3
0

- 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

OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd-rpm-macros?expand=0&rev=35
This commit is contained in:
Franck Bui 2019-02-27 14:16:36 +00:00 committed by Git OBS Bridge
parent ec2ade1bb2
commit 7b2e3f4d22
2 changed files with 19 additions and 2 deletions

View File

@ -54,7 +54,9 @@ OrderWithRequires(postun): systemd \
%_restart_on_update_force() (\
%{?*:/usr/bin/systemctl try-restart %{*}} \
) || : %{nil}
%_restart_on_update_never() %{?*:# Restart of %{*} skipped} %{nil}
%_restart_on_update_never() %{?*: : # Restart of %{*} skipped} %{nil}
%_restart_on_update() (\
test -f /etc/sysconfig/services -a \\\
-z "$DISABLE_RESTART_ON_UPDATE" && . /etc/sysconfig/services\
@ -66,7 +68,9 @@ OrderWithRequires(postun): systemd \
%_stop_on_removal_force() ( \
%{?*:/usr/bin/systemctl stop %{*}}\
) || : %{nil}
%_stop_on_removal_never() %{?*:# Stop of %{*} skipped} %{nil}
%_stop_on_removal_never() %{?*: : # Stop of %{*} skipped} %{nil}
%_stop_on_removal() (\
test -f /etc/sysconfig/services -a \\\
-z "$DISABLE_STOP_ON_REMOVAL" && . /etc/sysconfig/services\

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Wed Feb 27 14:13:28 UTC 2019 - Franck Bui <fbui@suse.com>
- 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 <fbui@suse.com>