[opensuse-packaging] %fillup_and_insserv not working during zypper install ?? Leap 42.3

All, I've just created a virgin Leap 42.3 VM. I want to test out request_tracker from devel:languages:perl. I've added the repo, but when it fails in the %pre section of "zypper in request_tracker". The spec file has these 3 lines in the %pre section: # enable needed services %fillup_and_insserv -f apache2 %fillup_and_insserv -f mysql %fillup_and_insserv -f postfix It errors out with: Error: Subprocess failed. Error: RPM failed: /var/tmp/rpm-tmp.LhHfVl: line 23: /etc/init.d/apache2: No such file or directory It's correct that doesn't exist because 42.3 is systemd based (I assume that's the reason). %fillup_and_insserv is a common macro which surely should work fine in a 42.3 machine. What in the world is going on? Greg -- Greg Freemyer Advances are made by answering questions. Discoveries are made by questioning answers. — Bernard Haisch -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

Hi, On Wed, Jan 10, Greg Freemyer wrote:
Error: Subprocess failed. Error: RPM failed: /var/tmp/rpm-tmp.LhHfVl: line 23: /etc/init.d/apache2: No such file or directory
It's correct that doesn't exist because 42.3 is systemd based (I assume that's the reason).
%fillup_and_insserv is a common macro which surely should work fine in a 42.3 machine.
What in the world is going on?
You are using a macro for SYSV Init scripts, but you are not using a sysv init script, but systemd units. So the solution is simple: use the right macros. There are macros for fillup and there are macros for systemd. And for insserv, which you don't need anymore. If you want to force enable services by default during installation: you are not allowed to do that in a post install script. Please read the openSUSE wiki about systemd and preset of services. Thorsten -- Thorsten Kukuk, Distinguished Engineer, Senior Architect SLES & CaaSP SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org

The reference is here: https://en.opensuse.org/openSUSE:Systemd_packaging_guidelines -- Erico Mendonça Dedicated Support Engineer SUSE Em 11/01/2018 05:10, "Thorsten Kukuk" <kukuk@suse.de> escreveu: Hi, On Wed, Jan 10, Greg Freemyer wrote: > Error: Subprocess failed. Error: RPM failed: /var/tmp/rpm-tmp.LhHfVl: > line 23: /etc/init.d/apache2: No such file or directory > > It's correct that doesn't exist because 42.3 is systemd based (I > assume that's the reason). > > %fillup_and_insserv is a common macro which surely should work fine in > a 42.3 machine. > > What in the world is going on? You are using a macro for SYSV Init scripts, but you are not using a sysv init script, but systemd units. So the solution is simple: use the right macros. There are macros for fillup and there are macros for systemd. And for insserv, which you don't need anymore. If you want to force enable services by default during installation: you are not allowed to do that in a post install script. Please read the openSUSE wiki about systemd and preset of services. Thorsten -- Thorsten Kukuk, Distinguished Engineer, Senior Architect SLES & CaaSP SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany GF: Felix Imendoerffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nuernberg) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (3)
-
Erico Mendonca
-
Greg Freemyer
-
Thorsten Kukuk