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)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 8 Oct 2024 15:39:12 +0000 (16:39 +0100)
commitd1f11d909f673ade60a4e66a4733c200f9013be3
tree1c998e75e346e2ff3290abdee71ab4280d33db89
parent7323feef9b14fdc5c178525306a06c1bd9020d6b
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.

(cherry picked from commit 9fd8a9dffe9b8f29da52e4e1481926bceed5ce6c)
src/rpm/macros.systemd.in