[systemd-devel] [HEADS-UP] Packaging systemd

Lennart Poettering lennart at poettering.net
Tue Jun 22 09:53:34 PDT 2010


A few hints for those who package systemd for the various distributions:

By default systemd will not install replacements of any of the binaries
that upstart or sysvinit provide. That is intended that way, to ease
debugging/testing and allow parallel installation with those other
legacy init systems.

However, systemd actually implements all the compatibility interfaces
these binaries offer (i.e. /sbin/reboot, /sbin/poweroff, /sbin/telinit,
/sbin/init and suchlike). You can activate them by symlinking
/bin/systemctl to most of them, and /bin/systemd to /sbin/init. These
will tools will figure out the way they have been invoked and do the
right thing.

The suggested way to package this is to provide a core package that does
not conflict with upstart/sysvinit, and can be booted into by passing
init=/bin/systemd on the kernel command line. And then, add a second
package on top (maybe called systemd-sysvinit), that creates those
compatibility symlinks and hence provides all the functionality of
sysvinit and replacing it.

That way, users have the choice between the real deal, or just a
minimal, try-out deal.

systemd understands /dev/initctl, the traditional sysvinit client tools
should hence be able to talk to it just fine. Upstart's tools speak
/dev/initctl to a limited degree as well, and hence can also be used as
systemd client -- enough to make the machine reboot. Finally, when
systemctl is called via the sysv compatibility names it will also have
an automatic fallback to /dev/initctl and even the upstart D-Bus APIs,
to also allow to at least make the machine reboot correctly.

In summary: you should be able to make every system reboot with
systemd's native tools, as well as make a systemd system reboot with
both upstart and sysvinit's native tools.

If you need inspiration for packaging, have a look at:

http://cvs.fedoraproject.org/viewvc/devel/systemd/systemd.spec?view=markup

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4


More information about the systemd-devel mailing list