[opensuse-packaging] Disabling systemd services in %post for upgrades
Hi! I am working on updating the google-compute-engine package which needs to disable two systemd services that have been removed in the upstream package. Upstream contains this systemd-specific code to achieve that in %post [1]: if [ -f /lib/systemd/system/google-ip-forwarding-daemon.service ]; then systemctl stop --no-block google-ip-forwarding-daemon systemctl disable google-ip-forwarding-daemon.service fi if [ -f /lib/systemd/system/google-network-setup.service ]; then systemctl stop --no-block google-network-setup systemctl disable google-network-setup.service fi Since we have RPM macros for disabling services on preun and post [2], namely %service_del_preun and %service_del_postun, I was wondering whether there is an equivalent that can be used in %post. Or should I just use systemctl as above but limit the use with suse_version to > 1140? Thanks, Adrian
[1] https://github.com/GoogleCloudPlatform/compute-image-packages/blob/master/sp... [2] https://en.opensuse.org/openSUSE:Systemd_packaging_guidelines#Register_syste... -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On 05/09/2018 02:50 PM, John Paul Adrian Glaubitz wrote:
Since we have RPM macros for disabling services on preun and post [2], namely %service_del_preun and %service_del_postun, I was wondering whether there is an equivalent that can be used in %post.
Or should I just use systemctl as above but limit the use with suse_version to > 1140?
Hmm, on second thought, I think this might not even be necessary as %postun should be executed on package upgrade, isn't it? Adrian -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Mittwoch, 9. Mai 2018 15:13:44 CEST John Paul Adrian Glaubitz wrote:
On 05/09/2018 02:50 PM, John Paul Adrian Glaubitz wrote:
Since we have RPM macros for disabling services on preun and post [2], namely %service_del_preun and %service_del_postun, I was wondering whether there is an equivalent that can be used in %post.
Or should I just use systemctl as above but limit the use with suse_version to > 1140?
Hmm, on second thought, I think this might not even be necessary as %postun should be executed on package upgrade, isn't it?
Both %post and %postun will be executed on upgrade, see http://ftp.rpm.org/max-rpm/s1-rpm-inside-scripts.html#S2-RPM-INSIDE-ERASE-TI... Please do not use a conditional for 1140, this is so EOLed it is completely useless noise. Regards, Stefan-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On 05/09/2018 03:33 PM, Brüns, Stefan wrote:
Hmm, on second thought, I think this might not even be necessary as %postun should be executed on package upgrade, isn't it?
Both %post and %postun will be executed on upgrade, see http://ftp.rpm.org/max-rpm/s1-rpm-inside-scripts.html#S2-RPM-INSIDE-ERASE-TI...
Thanks for confirming this.
Please do not use a conditional for 1140, this is so EOLed it is completely useless noise.
Unfortunately, I have to keep the SLE11SP4 stuff until it's actually EOL'd which end of March 2019. Adrian -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Wed, 2018-05-09 at 16:30 +0200, John Paul Adrian Glaubitz wrote:
On 05/09/2018 03:33 PM, Brüns, Stefan wrote:
Hmm, on second thought, I think this might not even be necessary as %postun should be executed on package upgrade, isn't it?
Both %post and %postun will be executed on upgrade, see http://ftp.rpm.org/max-rpm/s1-rpm-inside-scripts.html#S2-RPM-INSIDE-ERASE-TI...
Thanks for confirming this.
Please do not use a conditional for 1140, this is so EOLed it is completely useless noise.
Unfortunately, I have to keep the SLE11SP4 stuff until it's actually EOL'd which end of March 2019.
SLE11SP4 has no relation to suse_version 1140. SLE11SP4 is suse_version == 1110 Cheers Dominique
On May 10, 2018, at 3:42 PM, Dominique Leuenberger / DimStar
wrote: On Wed, 2018-05-09 at 16:30 +0200, John Paul Adrian Glaubitz wrote: On 05/09/2018 03:33 PM, Brüns, Stefan wrote:
Hmm, on second thought, I think this might not even be necessary as %postun should be executed on package upgrade, isn't it?
Both %post and %postun will be executed on upgrade, see http://ftp.rpm.org/max-rpm/s1-rpm-inside-scripts.html#S2-RPM-INSIDE-ERASE-TI...
Thanks for confirming this.
Please do not use a conditional for 1140, this is so EOLed it is completely useless noise.
Unfortunately, I have to keep the SLE11SP4 stuff until it's actually EOL'd which end of March 2019.
SLE11SP4 has no relation to suse_version 1140. SLE11SP4 is suse_version == 1110
Seems very inconsistent and confusing to me. Adrian-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On jeudi, 10 mai 2018 15.52:46 h CEST John Paul Adrian Glaubitz wrote:
On May 10, 2018, at 3:42 PM, Dominique Leuenberger / DimStar
wrote: On Wed, 2018-05-09 at 16:30 +0200, John Paul Adrian Glaubitz wrote:
On 05/09/2018 03:33 PM, Brüns, Stefan wrote:
Hmm, on second thought, I think this might not even be necessary as %postun should be executed on package upgrade, isn't it?
Both %post and %postun will be executed on upgrade, see http://ftp.rpm.org/max-rpm/s1-rpm-inside-scripts.html#S2-RPM-INSIDE-ERAS E-TIME-SCRIPTS>> Thanks for confirming this.
Please do not use a conditional for 1140, this is so EOLed it is completely useless noise.
Unfortunately, I have to keep the SLE11SP4 stuff until it's actually EOL'd which end of March 2019.
SLE11SP4 has no relation to suse_version 1140. SLE11SP4 is suse_version == 1110 Seems very inconsistent and confusing to me.
Adrian--
History, everything behind Leap 42 / SLE 12 will be a pain ;-) And the last «bastard» alive in this series is SLE11SP4 ... -- Bruno Friedmann Ioda-Net Sàrl www.ioda-net.ch Bareos Partner, openSUSE Member, fsfe fellowship GPG KEY : D5C9B751C4653227 irc: tigerfoot -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hi, On Thu, 10 May 2018, John Paul Adrian Glaubitz wrote:
SLE11SP4 has no relation to suse_version 1140. SLE11SP4 is suse_version == 1110
Seems very inconsistent and confusing to me.
It's not anymore when you know how it came to be, so: * SLE codestreams use the same suse_version for all service packs * hence, SLE11 suse_version is the earliest for that code stream * SLE11 was split off openSUSE 11.1 (which had suse_version 1110) * So SLE11 suse_version is same (to differentiate there's %sles_version) * for SLE12 the convention was adjusted to also tick up suse_version after split-off (from oS 13.1; suse_version 1310 to 1315) * for SLE15 there was an failed attempt to get rid of %suse_version, plus the fact that openSUSE became rolling, which in the end resulted in some inconsistencies to before, e.g. %sle_version (not %sles_version anymore), and %suse_version 1500 * the above SLE11 convention also held for SLES7, SLES8, SLE9 and SLE10 Ciao, Michael. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (5)
-
Bruno Friedmann
-
Brüns, Stefan
-
Dominique Leuenberger / DimStar
-
John Paul Adrian Glaubitz
-
Michael Matz