]> git.ipfire.org Git - thirdparty/systemd.git/commit
rpm: add %systemd_postun_with_reload and %systemd_user_postun_with_reload
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 26 Jul 2023 07:02:04 +0000 (09:02 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 7 Aug 2023 10:12:55 +0000 (12:12 +0200)
commit631d2b05ec5195d1f8f8fbff8a2dfcbf23d0b7aa
tree2eb07cc8e48c2293a7312b2deabea8ad04b195a7
parent8ea8e23f4013dbc4f4a66c81eb786f0505434f2e
rpm: add %systemd_postun_with_reload and %systemd_user_postun_with_reload

For some units, the package would like to issue a reload. The machinery was
already in place since c9615f73521986b3607b852c139036d58973043c:

  systemctl reload-or-restart --marked

  Enqueues restart jobs for all units that have the 'needs-restart'
  mark, and reload jobs for units that have the 'needs-reload' mark.
  When a unit marked for reload does not support reload, restart will
  be queued.

The new macros allow a reload to be issued instead of a restart.

Based on the discussion on fedora-devel:
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/IJSUGIEJNYZZRE53FF4YFUEBRHRAVIXR/

Tested using dummy package https://github.com/keszybz/rpm-test-reload.
src/rpm/macros.systemd.in
src/rpm/systemd-update-helper.in