Add %posttrans versions of the systemd %postun scriptlets
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 30 Sep 2024 14:08:17 +0000 (16:08 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 1 Oct 2024 10:12:40 +0000 (12:12 +0200)
commit9fd8a9dffe9b8f29da52e4e1481926bceed5ce6c
treec25a8c9e0858056129f06ea0899162fb67fa3506
parent0c96911afb67fc1632866548efe151f6f10191b0
Add %posttrans versions of the systemd %postun scriptlets

On upgrades, only the %postun scriptlets of the old package version
run. This means that any changes related to restarting daemons require
two releases before they're actually used.

%postun is used because it runs after the old package has been removed,
which is important as it means any lingering dropins from the old package
will have been removed as well.

To allow deploying fixes in just a single release while still running after
the old package has been removed, let's introduce %posttrans versions of these
scriptlets as %posttrans of the new package runs on upgrade and install after
the old package has been removed.
src/rpm/macros.systemd.in