On Fri, Mar 18, 2022 at 06:22:08PM -0400, Sam Varshavchik wrote:
The only thing that https://docs.fedoraproject.org/en-US/packaging-
guidelines/Scriptlets/ tells me to do is to put
%systemd_postun_with_restart in my %post. However:
1) systemd complains that it wants a daemon-reload, in order to pick
up an updated .service file
2) I still must manually run systemctl reload-or-restart --marked, in
order to actually restart an updated service
It seems to be there's a missing step, in here. By comparison I
prepared comparable .deb packages for Ubuntu, using dh_installsystemd
in the install script. The end result:
A) The initial .deb install enabled and started the service.
B) Bumping the release, rebuilding, and installing the newer package
results in an automatic daemon-reload and restart, restarting the
service.
Overall .deb's systemd integration seems to go smoother (compared to
the rest of the .deb packaging process) than rpm's.
Is there a specific reason why %systemd_postun_with_restart stops
before finishing the job? Am I missing something that I can install,
to have this happen auto-magically?
I think daemon-reload changed to file triggers in systemd 228:
https://github.com/systemd/systemd/commit/873e413323dfff4023604849c70944674ae5cd29
However, the scriptlets documentation[1] states to use %systemd_post
with %post and %systemd_postun_with_restart with %postun. %Perhaps that
you're using %systemd_postun_with_restart in %post is the source of your
problems?
[1]: https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_systemd
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure