spec: fix warnings during the package upgrade

Currently, upgrading osbuild-composer produces these warnings:

Failed to try-restart osbuild-worker@.service: Unit name
osbuild-worker@.service is missing the instance name.
See system logs and 'systemctl status osbuild-worker@.service' for details.
Failed to try-restart osbuild-remote-worker@.service: Unit name
osbuild-remote-worker@.service is missing the instance name.
See system logs and 'systemctl status osbuild-remote-worker@.service'
for details.

%systemd_postun_with_restart calls on a package upgrade this:
systemctl try-restart [ARGS...]

However, try-restart requires using a wildcard when restarting all
the services created from a template unit. This commit therefore adds the
wildcards.
This commit is contained in:
Ondřej Budai 2020-04-28 10:51:30 +02:00
parent 37ff79229b
commit e3acf45588
2 changed files with 4 additions and 2 deletions

View file

@ -193,7 +193,8 @@ The worker for osbuild-composer
%systemd_preun osbuild-worker@.service osbuild-remote-worker@.service
%postun worker
%systemd_postun_with_restart osbuild-worker@.service osbuild-remote-worker@.service
# restart all the worker services
%systemd_postun_with_restart "osbuild-worker@*.service" "osbuild-remote-worker@*.service"
%package tests
Summary: Integration tests

View file

@ -217,7 +217,8 @@ The worker for osbuild-composer
%systemd_preun osbuild-worker@.service osbuild-remote-worker@.service
%postun worker
%systemd_postun_with_restart osbuild-worker@.service osbuild-remote-worker@.service
# restart all the worker services
%systemd_postun_with_restart "osbuild-worker@*.service" "osbuild-remote-worker@*.service"
%if %{with tests}