Skip to content

Commit

Permalink
rpm: fix %systemd_user_post() macro.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tjanez committed Nov 22, 2015
1 parent 0c203f1 commit e67ba78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/macros.systemd.in
Expand Up @@ -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 \
Expand Down

0 comments on commit e67ba78

Please sign in to comment.