naemon / naemon-core

Networks, Applications and Event Monitor
http://www.naemon.io/
GNU General Public License v2.0
151 stars 63 forks source link

fix(rpm): Delay Naemon restart until posttrans #456

Closed imre-sidn closed 6 months ago

imre-sidn commented 6 months ago

The posttrans scriptlet executes after the RPM transaction has concluded, i.e. when all packages have been installed or upgraded. Delaying the Naemon restart until posttrans prevents API compatibility issues when naemon-core upgrades before naemon-livestatus. See https://github.com/naemon/naemon-core/issues/454.

Note that it is not possible to infer the RPM operation (install or upgrade) from the posttrans scriptlet argument, since they are the same: https://en.opensuse.org/openSUSE:Packaging_scriptlet_snippets#Syntax This should not cause any problems since the scriptlet only restarts Naemon if it was already running. In other words, it won't cause Naemon to start immediately after installation.

imre-sidn commented 6 months ago

I've tested this change in a Rocky Linux 8 container, by upgrading from the previous 1.4.1 version. I have also tested RPM installs.

sni commented 6 months ago

thanks for digging into and fixing this. This comes just in time, the next release will come with rebuild neb modules again.