Mailinglist Archive: opensuse-packaging (220 mails)

< Previous Next >
Re: [opensuse-packaging] Packaging policy for systemd .unit file - Proposal
Le lundi 20 juin 2011 à 17:07 +0200, Ludwig Nussel a écrit :
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?

Good question. I guess this should be discussed with upstream folks.

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 :-)

Unfortunately, that isn't part of the syntax choosen by systemd and it
wouldn't mix very well with the /lib vs /etc override which is quite
handy IMO ;)

What about packages that have both .service and .socket? Prefer .socket?

Good question again. We also have the issue for .target / .device
and .swap

Maybe we should restrict service_* macro to .service files and add
similar macros for sockets. Or handle both.. Probably worth discussing
with upstream.

--
Frederic Crozat <fcrozat@xxxxxxxx>
SUSE

--
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-packaging+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups