[opensuse-packaging] Fwd: killing two old options in fillup_and_insserv macro
Hi, if you never read about the fillup_and_insserv or fillup_only rpm macros in openSUSE, you can probaby stop reading here (and be happy ... ;) After long years (SuSE Linux 8.0 has been a while away) I went over the fillup_and_insserv and related macros and killed the support for the rc.config file migration and the old START_XXX variables. Additionally the option "-p" which has been a no-op since just as long has been removed. this means: fillup_and_insserv will error out if the options "-s" or "-p" are used, currently with echoing a line explaining the problem, later on by cleanly removing the options from the rpm declaration so that rpm will just error out with "unknown option for ..." As a general note: - for a new package, fillup_and_insserv should almost _never_ be needed at all, to just use fillup on the sysconfig file, the macro fillup_only should be used. It's really only needed if a service should be active by default with either "-y" or "-Y" depending if it should be activated only on first installation of a package or on any installation/update of a package. - fillup_and_insserv was invented during the days when we migrated from rc.config to the /etc/sysconfig structure and at the same time removed all the START_* variables and added the dynamic list of initscripts using "insserv". Back then the macro was needed even for packages with services defaulting to "off", but this use-case is not relevant any more. mgration example: old call: apache2/apache2.spec:%{fillup_and_insserv -ns apache2 apache2 START_HTTPD} new call (step1): apache2/apache2.spec:%{fillup_and_insserv -n apache2 apache2} or even (step2): apache2/apache2.spec:%{fillup_and_insserv apache2} (since "-n apache2" is a no-op, since -n is there to overwrite %{name}, which is apache2 again) or (since we are not activating by default): apache2/apache2.spec:%{fillup_only -n apache2} or shorter (see above, -n works the same way here) apache2/apache2.spec:%{fillup_only} PS: thus shrinking the length of most postinstall scripts dramatically, as I learnt over the years: each and every line of pre/post/... scripts should be eliminated if at all possible ;) -- with kind regards (mit freundlichem Grinsen), Ruediger Oertel (ro@novell.com,ro@suse.de,bugfinder@t-online.de) ---------------------------------------------------------------------- Linux MacBookRudi 2.6.26-14-default #1 SMP 2008-08-08 13:52:24 +0200 x86_64 Key fingerprint = 17DC 6553 86A7 384B 53C5 CA5C 3CE4 F2E7 23F2 B417 SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
* Ruediger Oertel (ro@suse.de) [20080821 02:40]:
if you never read about the fillup_and_insserv or fillup_only rpm macros in openSUSE, you can probaby stop reading here (and be happy ... ;)
Would you mind also updating http://en.opensuse.org/SUSE_Package_Conventions/RPM_Macros#3.6._.25fillup_an... ? Philipp --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
On Thursday 21 August 2008 15:02:04 Philipp Thomas wrote:
* Ruediger Oertel (ro@suse.de) [20080821 02:40]:
if you never read about the fillup_and_insserv or fillup_only rpm macros in openSUSE, you can probaby stop reading here (and be happy ... ;)
Would you mind also updating http://en.opensuse.org/SUSE_Package_Conventions/RPM_Macros#3.6._.25fillup_a nd_insserv ?
done (at least the subtractive part and some corrections) -- with kind regards (mit freundlichem Grinsen), Ruediger Oertel (ro@novell.com,ro@suse.de,bugfinder@t-online.de) ---------------------------------------------------------------------- Linux Fatou 2.6.26-14-default #1 SMP 2008-08-08 13:52:24 +0200 x86_64 Key fingerprint = 17DC 6553 86A7 384B 53C5 CA5C 3CE4 F2E7 23F2 B417 SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org
participants (2)
-
Philipp Thomas
-
Ruediger Oertel