]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
rpm: fix %systemd_user_post() macro. 1986/head
authorTadej Janež <tadej.j@nez.si>
Sun, 22 Nov 2015 19:38:05 +0000 (20:38 +0100)
committerTadej Janež <tadej.j@nez.si>
Sun, 22 Nov 2015 19:38:05 +0000 (20:38 +0100)
Escape "--user" and "--global" arguments with "\\" since rpm treats
arguments starting with "-" as macro options which causes "Unknown
option" rpm error.
Use %{expand:...} to force expansion of the inner macro. Otherwise %{?*}
is recursively defined as "\--user \--global {%?*}" which causes
"Too many levels of recursion in macro expansion" rpm error.

Thanks to Michael Mráka for helping me fix the above issues.

src/core/macros.systemd.in

index 8a0e44b58c9c48b3e51a43ff5a3c11a690750816..2cace3d3ba5f6463fdc95bec07f50b7ab6dadc89 100644 (file)
@@ -43,7 +43,7 @@ if [ $1 -eq 1 ] ; then \
 fi \
 %{nil}
 
-%systemd_user_post() %systemd_post --user --global %{?*}
+%systemd_user_post() %{expand:%systemd_post \\--user \\--global %%{?*}}
 
 %systemd_preun() \
 if [ $1 -eq 0 ] ; then \