1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 23:21:22 +03:00

rpm: use %_bindir not @bindir@

We were using both in various places. To keep things simple, let
rpm do the substitution.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2021-05-16 16:45:51 +02:00 committed by Yu Watanabe
parent 54e6c7624f
commit d0f8006993

View File

@ -46,9 +46,9 @@ OrderWithRequires(postun): systemd \
%systemd_post() \ %systemd_post() \
%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# 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 \ # Initial installation \
@bindir@/systemctl --no-reload preset %{?*} || : \ %{_bindir}/systemctl --no-reload preset %{?*} || : \
fi \ fi \
%{nil} %{nil}
@ -56,21 +56,21 @@ fi \
%systemd_preun() \ %systemd_preun() \
%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# 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 \ # Package removal, not upgrade \
if [ -d /run/systemd/system ]; then \ if [ -d /run/systemd/system ]; then \
@bindir@/systemctl --no-reload disable --now %{?*} || : \ %{_bindir}/systemctl --no-reload disable --now %{?*} || : \
else \ else \
@bindir@/systemctl --no-reload disable %{?*} || : \ %{_bindir}/systemctl --no-reload disable %{?*} || : \
fi \ fi \
fi \ fi \
%{nil} %{nil}
%systemd_user_preun() \ %systemd_user_preun() \
%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# 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 \ # Package removal, not upgrade \
@bindir@/systemctl --global disable %{?*} || : \ %{_bindir}/systemctl --global disable %{?*} || : \
fi \ fi \
%{nil} %{nil}
@ -84,10 +84,10 @@ fi \
%systemd_postun_with_restart() \ %systemd_postun_with_restart() \
%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# 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 \ # Package upgrade, not uninstall \
for unit in %{?*}; do \ for unit in %{?*}; do \
@bindir@/systemctl set-property $unit Markers=+needs-restart || : \ %{_bindir}/systemctl set-property $unit Markers=+needs-restart || : \
done \ done \
fi \ fi \
%{nil} %{nil}
@ -105,17 +105,17 @@ fi \
# Deprecated. Use %tmpfiles_create_package instead # Deprecated. Use %tmpfiles_create_package instead
%tmpfiles_create() \ %tmpfiles_create() \
%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# 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} %{nil}
# Deprecated. Use %sysusers_create_package instead # Deprecated. Use %sysusers_create_package instead
%sysusers_create() \ %sysusers_create() \
%{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# sysusers_create}} \ %{expand:%%{?__systemd_someargs_%#:%%__systemd_someargs_%# sysusers_create}} \
[ -x @bindir@/systemd-sysusers ] && @bindir@/systemd-sysusers %{?*} || : \ [ -x %{_bindir}/systemd-sysusers ] && %{_bindir}/systemd-sysusers %{?*} || : \
%{nil} %{nil}
%sysusers_create_inline() \ %sysusers_create_inline() \
[ -x @bindir@/systemd-sysusers ] && @bindir@/systemd-sysusers - <<SYSTEMD_INLINE_EOF || : \ [ -x %{_bindir}/systemd-sysusers ] && %{_bindir}/systemd-sysusers - <<SYSTEMD_INLINE_EOF || : \
%{?*} \ %{?*} \
SYSTEMD_INLINE_EOF\ SYSTEMD_INLINE_EOF\
%{nil} %{nil}