From d0f8006993deb976071ccdef823c61bdd1b9bbfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sun, 16 May 2021 16:45:51 +0200 Subject: [PATCH] rpm: use %_bindir not @bindir@ We were using both in various places. To keep things simple, let rpm do the substitution. --- src/rpm/macros.systemd.in | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/rpm/macros.systemd.in b/src/rpm/macros.systemd.in index 244c274d297..0d27c1703ae 100644 --- a/src/rpm/macros.systemd.in +++ b/src/rpm/macros.systemd.in @@ -46,9 +46,9 @@ OrderWithRequires(postun): systemd \ %systemd_post() \ %{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_post}} \ -if [ $1 -eq 1 ] && [ -x @bindir@/systemctl ]; then \ +if [ $1 -eq 1 ] && [ -x %{_bindir}/systemctl ]; then \ # Initial installation \ - @bindir@/systemctl --no-reload preset %{?*} || : \ + %{_bindir}/systemctl --no-reload preset %{?*} || : \ fi \ %{nil} @@ -56,21 +56,21 @@ fi \ %systemd_preun() \ %{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_preun}} \ -if [ $1 -eq 0 ] && [ -x @bindir@/systemctl ]; then \ +if [ $1 -eq 0 ] && [ -x %{_bindir}/systemctl ]; then \ # Package removal, not upgrade \ if [ -d /run/systemd/system ]; then \ - @bindir@/systemctl --no-reload disable --now %{?*} || : \ + %{_bindir}/systemctl --no-reload disable --now %{?*} || : \ else \ - @bindir@/systemctl --no-reload disable %{?*} || : \ + %{_bindir}/systemctl --no-reload disable %{?*} || : \ fi \ fi \ %{nil} %systemd_user_preun() \ %{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_user_preun}} \ -if [ $1 -eq 0 ] && [ -x @bindir@/systemctl ]; then \ +if [ $1 -eq 0 ] && [ -x %{_bindir}/systemctl ]; then \ # Package removal, not upgrade \ - @bindir@/systemctl --global disable %{?*} || : \ + %{_bindir}/systemctl --global disable %{?*} || : \ fi \ %{nil} @@ -84,10 +84,10 @@ fi \ %systemd_postun_with_restart() \ %{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# systemd_postun_with_restart}} \ -if [ $1 -ge 1 ] && [ -x @bindir@/systemctl ]; then \ +if [ $1 -ge 1 ] && [ -x %{_bindir}/systemctl ]; then \ # Package upgrade, not uninstall \ for unit in %{?*}; do \ - @bindir@/systemctl set-property $unit Markers=+needs-restart || : \ + %{_bindir}/systemctl set-property $unit Markers=+needs-restart || : \ done \ fi \ %{nil} @@ -105,17 +105,17 @@ fi \ # Deprecated. Use %tmpfiles_create_package instead %tmpfiles_create() \ %{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# tmpfiles_create}} \ -[ -x @bindir@/systemd-tmpfiles ] && @bindir@/systemd-tmpfiles --create %{?*} || : \ +[ -x %{_bindir}/systemd-tmpfiles ] && %{_bindir}/systemd-tmpfiles --create %{?*} || : \ %{nil} # Deprecated. Use %sysusers_create_package instead %sysusers_create() \ %{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# sysusers_create}} \ -[ -x @bindir@/systemd-sysusers ] && @bindir@/systemd-sysusers %{?*} || : \ +[ -x %{_bindir}/systemd-sysusers ] && %{_bindir}/systemd-sysusers %{?*} || : \ %{nil} %sysusers_create_inline() \ -[ -x @bindir@/systemd-sysusers ] && @bindir@/systemd-sysusers - <