Skip to content

Commit

Permalink
[dist] define missing macros
Browse files Browse the repository at this point in the history
macros.systemd no longer defines the _restart_on_update and
_restart_on_update_never macros.
  • Loading branch information
andreas-schwab committed Oct 2, 2024
1 parent cde1918 commit 4df9f55
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions dist/obs-server.spec
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,20 @@ Requires: ruby(abi) = %{__obs_ruby_abi_version}\
"$DISABLE_RESTART_ON_UPDATE" = 1 && exit 0\
%{?*:/usr/bin/systemctl force-reload %{*}}\
) || : %{nil}
%if ! %{defined _restart_on_update_never}
%define _restart_on_update_never() : # Restart of %{*} skipped %{nil}
%define _restart_on_update() %{?nil:
if [ -e /etc/sysconfig/services ]; then
DISABLE_RESTART_ON_UPDATE=
. /etc/sysconfig/services
case "$DISABLE_RESTART_ON_UPDATE" in
yes|1) ;;
*) /usr/bin/systemctl try-restart %{*} || :
esac
fi
%{nil}
}
%endif

%define service_del_postun(fnr) \
test -n "$FIRST_ARG" || FIRST_ARG="$1" \
Expand Down

0 comments on commit 4df9f55

Please sign in to comment.