Frederic Crozat wrote:
[...] Here is a proposal I plan to submit upstream if it is fine with people here. I've reused Michael Schröder proposal from FOSDEM 2006, adapted to systemd.
For openSUSE, we could modify slightly this proposal to call % fillup_and_insserv / %stop_on_removal / %restart_on_update when package hasn't migrated to systemd (I didn't add this part to systemd proposal, since it is distro specific) and would keep compat for current users of service_add / service_del_preun / service_del_post
(proposed at fosdem 2006) %service_add() if [ "$1" -eq 1 ] ; then # Initial installation /bin/systemctl daemon-reload >/dev/null 2>&1 || : fi
%service_add_enabled() if [ "$1" -eq 1 ] ; then # Initial installation /bin/systemctl enable %{1}.service >/dev/null 2>&1 || : fi
There are some packages that directly package the symlink in e.g. multi-user.target.wants. I suppose that shouldn't be done in favor of the macro then? I think it would be better if the "default enable flag" was an actual entry in the config file though. That would allow to easily check whether an existing system has all mandatory services enabled and to reset it to the default state if needed. Also, being able to parse an ini file rather than some script language makes an rpmlint check easier and more reliable :-) What about packages that have both .service and .socket? Prefer .socket? cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.de/ SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org