[OE-core] [RFC] systemd units packaging

Koen Kooi koen at dominion.thruhere.net
Fri May 6 14:51:49 UTC 2011


Op 6 mei 2011, om 16:20 heeft Richard Purdie het volgende geschreven:

> On Fri, 2011-05-06 at 15:39 +0200, Koen Kooi wrote:
>> Now onto my issues:
>> 
>> packaging:
>> 	In OE .dev I added FILES_${PN} += "${base_libdir}/systemd" to udev,
>> dbus, rsyslog and avahi. This means we end up with both sysV script
>> and systemd units. What I would like to have is ${PN}-sysvinit and
>> ${PN}-systemd and the image recipe can choose which init systems gets
>> used. Is something like that possible?
> 
> I'm not sure that it is to be honest. We simply don't have the
> capability in the package managers to be able to say "if systemd is
> installed, install *-systemd where * is any currently installed
> package". Its the same problem we have with locales.
> 
> Now if we had that functionality, great, but we simply don't :(.
> 
>> Are there better ways? Note that systemd support sysV initscripts as
>> well, but it needs some care with naming. As I understand it, if a
>> unit is found with the same name as a sysV script, only the unit will
>> get used.
>> A rootfs postprocess command that deletes /etc/init.d won't work,
>> since it will come back when upgrading the packages.
>> 
>> building:
>> 	At the moment systemd enabled software installs the units regardless
>> or config options. What should be do with software that has an option
>> for that? And what if we need to patch the units files in? The
>> initsystem is a choice at the image level, so artificially limiting it
>> to a distro choice is not a good idea.
> 
> Its an artificial limit but our tools don't give us any other option,
> for now I think this has to be a distro config choice.

Not quite, if we name the units correctly (or just alias them inside) the sysv scripts will get skipped. So if having both systemd and sysv files installed isn't a dealbreaker them we can make it an image choice. On debian and gentoo it's parallel installable with sysvinit, making it a matter of doing either init=/sbin/init  or init=/bin/systemd in your bootloader.

So, is having both sets inside ${PN} a dealbreaker?

regards,

Koen



More information about the Openembedded-core mailing list