diff --git a/slurm.changes b/slurm.changes index 8d49d7a..510569e 100644 --- a/slurm.changes +++ b/slurm.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Wed Jul 11 12:04:55 UTC 2018 - eich@suse.com + +- Shield comments between script snippets with a %{!?nil:...} to + avoid them being interpreted as scripts - in which case the update + level is passed as argument (see chapter 'Shared libraries' in: + https://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets) + (bsc#1100850). + ------------------------------------------------------------------- Tue Jun 5 13:24:43 UTC 2018 - cgoll@suse.com diff --git a/slurm.spec b/slurm.spec index 061161a..aca9dbe 100644 --- a/slurm.spec +++ b/slurm.spec @@ -562,12 +562,14 @@ exit 0 %post -n libpmi%{pmi_so} -p /sbin/ldconfig %postun -n libpmi%{pmi_so} -p /sbin/ldconfig +%{!?nil: # On update the %%postun code of the old package restarts the # service. This breaks in case the ABI between slurm and its # plugins has changed as updates are not atomic. Since we cannot # fix the old scripts we need these macros as a workaround. # They should be removed at some point. # Do pretrans in lua: https://fedoraproject.org/wiki/Packaging:Scriptlets +} %define _test_rest() %{?with_systemd: os.remove("/run/%{1}.rst") if os.execute() and os.getenv("YAST_IS_RUNNING") ~= "instsys" then if os.execute("systemctl status %{1} &>/dev/null") then @@ -576,7 +578,9 @@ exit 0 end } %define _rest() %{?with_systemd:[ -e /run/%{1}.rst ] && { systemctl status %{1} &>/dev/null || systemctl restart %{1}; }; rm -f /run/%{1}.rst;} +%{!?nil: # Until a posttrans macro has been added to macros.systemd, we need this +} %define _res_update() %{?with_systemd:%{expand:%%_restart_on_update %{?*}};} %pretrans -p