Student Application Template
Name: Alexander Sulfrian
Contact/Email:
xmpp: alexanders@animux.de
- irc: irc.freenode.net Nick: AlexanderS
Background:
I am a MSc. student in computer science at the Freie Universität Berlin in Germany. Personally I use Gentoo for my workstation/laptop since several years (since the time "etch" was not released yet). So I am very familiar with OpenRC. I am using it since the first working version for Gentoo was released. I do many things with linux-vserver and the boot process of the container simply worked with OpenRC out of the box.
At the university I am member of a project by students for students called spline. There we have several servers and maintaining services for students. The main distributions used for the servers there are Debian and Gentoo (we have about 50 linux-vserver on 6 physical machines for our services half with Debian and half with Gentoo). There I got a lot of experience with the sys-v init system of Debian. Sometimes it is very frustrating if some daemon does not start and the init script nothing says than "Done". On Gentoo with OpenRC this does not happen. OpenRC has also in contrast to sys-v-init some sort of state caching. It knows the state of each init script and only start/stop it if it is not in the requested state. While maintaining the several services for spline, I wrote a lot of initscripts for Gentoo and Debian. So I know both worlds.
For a special project we have at spline (we manage the servers with bcfg2), I ported main parts of portage and layman to Debian. I is used in a prefix to calculate dependencies for packages on the managed hosts. So I am experienced in porting Gentoo stuff to Debian. I have also set up a personal Debian repository at spline and created some custom packages, so I am also experienced with creating Debian packages and the build process.
I took part in GSoC the last two years, too (first time for VLC and linux-minidisc and last year for the Python Software Foundation). So I have experience and know how google summer of code works.
Project title: OpenRC init system in Debian
Project details:
Getting OpenRC running on Debian should be trivial, but there are some adaptation required. Debian and Gentoo have some other objectives. There are some trivial adjustments (like renaming the /etc/conf.d directory to /etc/defaults) but some other may be harder. For example the networking initialization is totally different and /etc/init.d/net is part of OpenRC. It should be question if the OpenRC variants should be used with possible braking compatibility to network configurations with classic Debian sys-v-init.
One major task on this project is the support of the then legacy init scripts. There are many different scripts out there (some scripts maybe starting multiple daemons at once) that an automatic conversion of the whole initscripts could not be done. The layout is to different. So it could work link the legacy support in systemd (another init system). Systemd could start sys-v initscripts without modification, but does not support all features. So maybe we could translate the lsb headers for the dependency calculation and start the sys-v initscripts in the old way. Then we loose the feature to have the state of the daemon recored, but we are able to use the legacy scripts without modification. The problem that persists, is that OpenRC normally uses named runlevels in contrast to the 0-6 runlevels used by Debian. A mapping of the old numbers to the new names could be created, but that maybe break some customizations.
Another problem is the whole ecosystem that Debian has for controlling the init system. The update-rc.d does not work with OpenRC. There should be created a wrapper for controlling the new rc-update (of openrc) with the old interface of update-rc.d.
While replacing sys-v-init with OpenRC, you should also consider to replace the debian start-stop-daemon with the OpenRC version. While the Gentoo start-stop-daemon is originally coming from Debian, the Gentoo version has some more features and is more reliable when starting processes.
Synopsis: Port OpenRC init system to Debian and add support for legacy initscripts.
Benefits to Debian: Debian will get a modern init system with reliable daemon starts, correct dependency calculation and easy support for container startups.
Deliverables: Working OpenRC debian packet that could be used as replacement for sysv-rc. All init scripts that comes with OpenRC itself should work out of the box. It should be possible to continue to use all other existing init scripts. It would be nice to have an alternative debian-installer images, that installs the new OpenRC package by default and drops sysv-rv right from the beginning.
Project schedule:
- Community bonding period: In this time slot, I mainly want to write mails to Debian mailing lists to discuss the alternative approaches if converting legacy configuration files and user interfaces of command-line tools to the required new format. After this time, it should be clear it the majority prefers compatibility with old installations or the new features and config formats (like for /etc/init.d/net). A alternative possibility would be to provide even for that case a legacy mode, so that systems that update from the old sysv-rc could choose to stay with the old format and the networking init script in lsb-legacy mode and systems that starts with a clean install get the new default config.
The main coding work should be separated into some smaller task. The following list may not be final. New tasks could of cause appear during the coding:- First step would be to create a very basic Debian package. That simply contain all the daemons contained in the ebuild (Gentoo package format) of OpenRC. This should be done in at most a few hours.
- The next step would identify init scripts that are not needed anymore from the classic initscripts package and remove these scripts that are satisfied by some OpenRC-script (at most a few days).
- The next big task would be the lsb header parsing. That could be done with a script that converts the header on demand, but in my opinion this should be handled in the OpenRC-core itself. It is to expect that there still exists initscripts with lsb-header for several years. The parsing could be activating with a commandline switch. The shebang in existing initscript has to be rewritten in every case, so the command line could contain the old interpreter (someone maybe has written an initscript in perl,python or php) and activate lsb-header parsing. After determining the dependencies the initscript could be starting then by invoking the original interpreter. (Implementing the legacy mode should at most take two weeks).
- The most time before midterm (most of June) will take the creation of transition scripts, that take the old configurations and convert it into the new format for the new initscripts. Because the most existing and future configurations are plain shell files it should be not so hard, but there are a lot of corner cases to watch out for. There should also be an transition script that marks started daemon as running for OpenRC (that is pain sometimes while using Gentoo because it forces me to reboot, because it does not know what daemons are running already after an update).
- Midterm: There should be a Debian package of OpenRC available that could be installed without worry that it will break everything (but do not expect all the helpers (like update-rc.d) to be ready).
- After midterm there should be time to build wrapper for the ecosystem used by Debian. It should be possible that postinst/postrm scripts of other packages could continue to call update-rc.d and all works with the new OpenRC init. The creation of these wrapper should last about two weeks.
- The remaining time until the suggested pencil down date should be used to integrate the new package into the existing debian-installer images and make it possible to install a Debian/OpenRC with debootstrap.
- The last two weeks before the final pencil down date should be used to fix all lintian warnings and finish the documentation (in the wiki).
- Community bonding period: In this time slot, I mainly want to write mails to Debian mailing lists to discuss the alternative approaches if converting legacy configuration files and user interfaces of command-line tools to the required new format. After this time, it should be clear it the majority prefers compatibility with old installations or the new features and config formats (like for /etc/init.d/net). A alternative possibility would be to provide even for that case a legacy mode, so that systems that update from the old sysv-rc could choose to stay with the old format and the networking init script in lsb-legacy mode and systems that starts with a clean install get the new default config.
Exams and other commitments: The semester ends at 13th of July. Until then I have on course (Tuesday 12am-2pm, Friday 10am-12am). The week before the 13th of July I have to write 1 exam. So I will need some time to repeat the content of the lectures.
Other summer plans: I have no other plans for the summer.
Why Debian?: Debian is a very popular system on servers. So it is very important that this distribution gets a modern and reliable init system.
- Are you applying for other projects in SoC? Yes