Learn more about these different git repos.
Other Git URLs
91bf03f
@@ -200,7 +200,9 @@
%systemd_preun copr-backend.target
%postun
- %systemd_postun_with_restart copr-backend.target
+ %systemd_postun_with_restart copr-backend-log.service
+ %systemd_postun_with_restart copr-backend-build.service
+ %systemd_postun_with_restart copr-backend-action.service
%files
%license LICENSE
Fix #2141
Build succeeded.
Hm, I'm curious why %systemd_postun_with_restart copr-backend.target doesn't work the way we need? Is that because we use *.target?
%systemd_postun_with_restart copr-backend.target
*.target
I believe that the restart is done by %postun Here is the relevant part of documentation https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_scriptlets
And the postun expands to:
$ rpm --eval '%systemd_postun_with_restart foo' if [ $1 -ge 1 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then # Package upgrade, not uninstall /usr/lib/systemd/systemd-update-helper mark-restart-system-units foo || : fi
That's what I've seen too, but for some reason the set of services in the copr-backend.target really isn't restarted. I'm curious if this is a bug in the macro, systemd, or we misuse it.
rebased onto 91bf03f
I asked on #fedora-devel about restarting a target and the response was "What would restarting target even mean?". I also didn't find any mentions of restarting targets in the documentation.
#fedora-devel
The man systemd.target doesn't go into detail about the possible use-cases of targets, it only mentions "grouping units and as well-known synchronization points during start-up."
man systemd.target
ArchWiki even equates targets to SysV runlevels, https://wiki.archlinux.org/title/systemd#Targets so in this context, restarting targets doesn't make sense as well.
I don't know if our copr-backend.target is a valid use-case but it IMHO doesn't matter. We can file a RFE for supporting targets in %systemd_postun_with_restart but for the time being, I would just change our specfile and list all services that should be restarted.
copr-backend.target
%systemd_postun_with_restart
+1
FTR, I also asked on #systemd and no answer so far.
#systemd
Commit f55c883 fixes this pull-request
Pull-Request has been merged by praiskup
Fix #2141