Hi! I'm having trouble with systemd services that are supposed to be configured on package update. In particular, I want one service of the previous package version to be stopped and removed and a new service that is being shipped with the new package version to be installed and started. The package in question is google-compute-engine and the affected services are google-ip-forwarding-daemon (to be stopped and removed) google-network-daemon (to be installed and started). I have been following the packaging guidelines from [1] and added the services in question to %pre/post and %preun/postun. However, when installing the new package version over the old one, google-ip-forwarding-daemon gets disabled but not stopped and google-network-daemon is enabled but not started. Hence, a reboot is necessary to make the desired changes effective. I have tried adding "-f" to %service_del_preun and %service_del_preun but that didn't help. Analyzing the RPM scripts with "rpm --scripts -qf <RPM file>" showed that the postinstall script uses "systemctl preset ..." which explains why the services are enabled but not started. Looking at the generated scripts for preuninstall and postuninstall, it seems the case of stopping and removing a service upon upgrade does not seem to be covered. The generated script contains "systemctl try-restart ...". Does anyone have a suggestion what the correct way is to achieve the service changes I have mentioned above? The spec file can be found in [2]. Thanks, Adrian
[1] https://en.opensuse.org/openSUSE:Systemd_packaging_guidelines#Register_syste... [2] https://build.opensuse.org/package/view_file/Cloud:Tools/google-compute-engi... -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org