Contributed by jj on from the all your system is belong to us dept.
This summer I, along with my mentors Landry Breuil and Antoine Jacoutot, worked on systemd shim-like replacements for four D-Bus daemons systemd provides, namely hostnamed, localed, timedated, and logind.
Now let's clear some things up:
The purpose of this GSoC was (is) not to port systemd to *BSD in way, shape or form. Nor is it to replace the existing init(8), boot(8) or rc(8) programs. Systemd and *BSD differ fundamentally in terms of philosophy and development practices and special care was taken to only wrap the functionality of the aforementioned daemons and not create any new systemd-like functionality.
You can find the repository here
Upon completion and review, my code will most likely end up as a port to be installed along with the GNOME suite, or any other ports that depend on systemd (upstream) and need a compatibility layer to work properly on non-systemd operating systems. It goes without saying that none of my code will end up (or belongs) in the base system.
Hostnamed (formally systemd-hostnamed) is a D-Bus daemon that handles setting system hostnames (in our case, that's through the sethostname(3) call and the /etc/myname file) as well as provides system information mostly found through uname(1). Hostnamed also handles determining the system's chassis type, whether it be a server, desktop, laptop, handheld, VM, etc. and providing a proper icon from that information.
Localed and timedated are more straightforward daemons that allow setting system/xorg locales/keymaps and times/dates/timezones/NTP settings respectively.
Logind (currently unfinished) is a rather large daemon that encompasses many aspects of a user's login session. This includes everything from getting current users and any PIDs under them, as well as system suspension and shutdown/reboot preparation. We are still researching a proper way to implement this as native systemd uses PAM for authentication, something we do not want to do on OpenBSD.
Overall, it was an excellent summer. I took this project because I was fed up with what systemd was doing to my then-main computer running Arch Linux. I figured this would be a great way to make the move to OpenBSD and I couldn't be happier. I dearly hope you'll be seeing more of me in the future ;)
As a fun aside, me and some friends all turned 21 around the beginning of August (the tail end of GSoC) and decided to pool our pennies together to take a road trip together to Colorado. This led to some interesting circumstances. All I can say is that there is stable LTE service between Texas and Colorado that work at speed in excess of eighty-eight miles per hour and that one can do a lot with a macbook charger, a working alternator, a bit of cabling and entry-level electrical engineering knowledge.
Thanks for the report, and hope you didn't get too tainted with systemd.
(Comments are closed)
By Noryungi (noryungi) email@example.com on
One obvious question, but which is very important for me, is to know whether or not a portable version of these utilities is planned?
There are still some (sane) Linux distributions that do not plan on shipping with systemd -- porting systembsd under these distros would be a great way to maintain their independence.
How BSD-specific are these utilities? Do you think porting them to Linux would mean significant rewrites?
Second question: apart from logind, how would you rate the difficulty of writing these utilities?
Again, thanks for all the hard work!
By ian (184.108.40.206) firstname.lastname@example.org on https://kremlin.cc
> One obvious question, but which is very important for me, is to know whether or not a portable version of these utilities is planned?
yes, the original outline for the project included a bit about OS-agnosticism. my approach to this was to use GLib overall, so porting it will not be an enormous headache. there are some more fundamental differences (such as how hostnames are handled) that will require a bit more proactive porting effort, however.
i've recently been talking to someone who is interested in working with me + my code to port it to a minimal, busybox-like system which would require stripping out GLib, so that is just another thing on the horizon
> There are still some (sane) Linux distributions that do not plan on shipping with systemd -- porting systembsd under these distros would be a great way to maintain their independence.
> How BSD-specific are these utilities? Do you think porting them to Linux would mean significant rewrites?
hostnamed is probably the most bsd-specific right now, localed much less so and timedated even less. logind will probably be more bsd-specific due to the sheer complexity and responsibilities it covers.
> Second question: apart from logind, how would you rate the difficulty of writing these utilities?
i would say about 70% of this project was dealing with all the framework and scaffolding that is D-Bus + friends, which was particularly excruciating at first. even using GDBus (wrapper lib for D-Bus whose first page of documentation has "If you use this low-level API directly, you're signing up for some pain." in bold letters) it was quite a pain to learn, but once you get the hang of it, it is somewhat less of a nightmare.
the other 30% was the actual implementation of the methods on openbsd, which was much less complicated and straightforward. it was the fun part!
> Again, thanks for all the hard work!
you are welcome! :)
By Noryungi (noryungi) on
> you are welcome! :)
And thanks again for taking the time to answer my questions!
By Ypnose (220.127.116.11) on
By Anonymous Coward (18.104.22.168) on
From the article: "It goes without saying that none of my code will end up (or belongs) in the base system."
By phessler (phessler) on http://www.openbsdfoundation.org/donations.html
This will end up in ports, as protection for systemd-tainted packages.
By Ypnose (22.214.171.124) on
> This will end up in ports, as protection for systemd-tainted packages.
Yes, true. I did a mistake because I didn't read the entire article. I will read it more carefully next time.
By Marc Paul Rubin (126.96.36.199) on
By ian (188.8.131.52) email@example.com on https://kremlin.cc
porting to other BSDs will certainly be less of a hassle than porting to linux, and from what i have researched it should be very little trouble overall.
in fact, a freebsd committer (bapt@) has recently begun creating a patch set you can find here: https://people.freebsd.org/~bapt/systembsd/
By Lars Schotte (184.108.40.206) firstname.lastname@example.org on http://gustik.eu/
By Anonymous Coward (220.127.116.11) on
i don't think its really going places: https://wiki.freebsd.org/launchd
it was a GSoC 2005 project. its 2014.
this is still outside of the scope of the replacement tools talked about here however, they are not and will never replace init.
By loreb (18.104.22.168) on
> i don't think its really going places: https://wiki.freebsd.org/launchd
> it was a GSoC 2005 project. its 2014.
> this is still outside of the scope of the replacement tools talked about here however, they are not and will never replace init.
Does anyone know if http://homepage.ntlworld.com/jonathan.deboynepollard/Softwares/nosh.html was considered/rejected/whatever? While it is meant to replace init it looks modular enough that one could just use a few pieces of it.
By Ilyas Bakirov (22.214.171.124) on