diff options
author | Tadej Janež <tadej.j@nez.si> | 2015-11-22 20:38:05 +0100 |
---|---|---|
committer | Tadej Janež <tadej.j@nez.si> | 2015-11-22 20:38:05 +0100 |
commit | e67ba783696f21782ad5c2ba00515d387016e785 (patch) | |
tree | fdba4708e29757af569ce292f269373e1775b978 /src/core/macros.systemd.in | |
parent | Merge pull request #1979 from evverx/build-install-systemd-path-completion (diff) | |
download | systemd-e67ba783696f21782ad5c2ba00515d387016e785.tar.xz systemd-e67ba783696f21782ad5c2ba00515d387016e785.zip |
rpm: fix %systemd_user_post() macro.
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.
Diffstat (limited to 'src/core/macros.systemd.in')
-rw-r--r-- | src/core/macros.systemd.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/macros.systemd.in b/src/core/macros.systemd.in index 8a0e44b58c..2cace3d3ba 100644 --- a/src/core/macros.systemd.in +++ b/src/core/macros.systemd.in @@ -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 \ |