Live data from Hacker News

20 years as a Debian maintainer

suihkulokki.blogspot.com

61–70 of 126 posts

Re: 20 years as a Debian maintainer

#61
post #57

Earlier quoted context omitted.

Having just set up a Debian server this weekend (Windows dev diving into Linux for the first time), can I ask what the main difference between init and systemd are? Mostly from a operational/security stand point.

Init-scripts are a bunch of file system conventions and shell scripts; it's an imperative way of bringing a system into a particular state (networking, services etc.). Init itself is the very first process the the OS executes; all processes in -nix are created by forking. When using init-scripts, init is extremely simple. Systemd replaces init and uses a declarative approach for the system and its services, and the d…

One of the most informative writings I've read on the topic of systemd and its benefits and comparison with other tools was written by Russ Allbery, which explains his contribution to Debian's choice to adopt it [1]:

> I did a fairly extensive evaluation of both upstart and systemd by converting one of my packages[] to a native configuration with both systems. []I tried to approach each init system on its own terms and investigate what full, native support of that init system would look like, both from a Debian packaging perspective and from an upstream perspective. I also tried to work through the upgrade path from an existing init script with an external /etc/default configuration file and how that would be handled with both systemd and upstart.

> I started this process with the expectation that systemd and upstart would be roughly evenly matched in capabilities. My expectation was that I would uncover some minor differences and variations, and some different philosophical approaches, but no deeply compelling differentiation.

> To my surprise, that's not what happened. Rather, I concluded that systemd has a substantial technical advantage over upstart, primarily in terms of available useful features, but also in terms of fundamental design.

The essay goes on to elaborate on the details. I personally found this and other writings a compelling argument in favor of the approach. Another useful article was "Why systemd?" [2]. There's also the blog post series "Systemd for Administrators" [3].

What systemd strives for makes a lot of sense to me. It allows you to describe the startup of services with declarative configuration in a simple and easy-to-understand format. Systemd is natively integrated with OS namespaces, cgroups, and the process hierarchy. Russ gives an example in his essay of how this allows systemd to track and display more information about daemons than the alternatives. It might be more complicated than the alternatives in one sense, but that buys you the power to do things like: activate services on-demand, when requested by a client; automatically launch services per user session, and clean them up on logout; concurrently start services for a fast boot; consign managed services to an OS namespace. By supporting these features in the init and process management system, it frees individual services from redundantly building this logic in their shell scripts and daemonization routines. That reduces complexity, and makes the entire system more feature-rich, more secure, and easier to manage.

As far as security, systemd makes it substantially easier to employ kernel namespace, cgroups, capabilities, and other isolation facilities with simple configuration switches. Let's say that we'd like to run some daemon with a private /tmp directory for isolation. This is as simple as adding "PrivateTmp=yes" to its configuration. What if we want to change the run-as user, or even launch the service in an isolated user namespace? Perhaps we want the daemon to have a private network or private /dev? It's as simple as setting User=, PrivateUsers=, PrivateNetwork=, PrivateDevices=, etc. respectively:

  [Unit]
  Description=Demo service

  [Service]
  Type=forking
  ExecStart=/usr/sbin/my-daemon -d
  User=foo
  PrivateTmp=yes
  PrivateUsers=yes
  PrivateNetwork=yes
Take a look at all the options you can apply in [4]. CPUAffinity=, CapabilityBoundingSet=, IOSchedulingPriority=, etc. It's great to be able to set all of these options in a single consistent place for all daemons.

[1] https://lists.debian.org/debian-ctte/2013/12/msg00234.html

[2] http://blog.jorgenschaefer.de/2014/07/why-systemd.html

[3] https://gist.github.com/bcremer/8cdf6900c35dda65f387

[4] https://www.freedesktop.org/software/systemd/man/systemd.exe...

Re: 20 years as a Debian maintainer

#62
post #57

Earlier quoted context omitted.

Having just set up a Debian server this weekend (Windows dev diving into Linux for the first time), can I ask what the main difference between init and systemd are? Mostly from a operational/security stand point.

Init-scripts are a bunch of file system conventions and shell scripts; it's an imperative way of bringing a system into a particular state (networking, services etc.). Init itself is the very first process the the OS executes; all processes in -nix are created by forking. When using init-scripts, init is extremely simple. Systemd replaces init and uses a declarative approach for the system and its services, and the d…

This is probably one of the better-quality neutral write-ups I've seen.

Re: 20 years as a Debian maintainer

#63
post #14

Even though I use ubuntu on my desktop, it is from Debian, and I ran Debian on my servers for years. Debian is the most important software for me for decades. For that I thank you, Riku, and everybody else contributes to Debian!

What prevents you from using Debian on the desktop? I'm using Debian testing for quite a while already, and it works rather well. The only annoyance is the the freeze period, but it got shorter lately.

Re: 20 years as a Debian maintainer

#65

Earlier quoted context omitted.

I'm not rxlim, but considering that the release after Wheezy - Jessie - introduced systemd as the default init systemd, it's not hard to guess.

I went into systemd with an open mind, hoping the changes would be worthwhile to learn. I've come out the other end looking for alternatives... In the meantime I'll stick to an OS that uses init, and hope systemd get's better given enough time.

I looked into this a little bit. Alternatives include OpenRC (complements but does not replace init), runit, upstart (looks like most distributions that used upstart are switching to systemd), and GNU Shepherd.

I am looking at trying out GNU Shepherd as it is the init system of the Guix distribution, so you get both Nix-style package management and an init system that is not systemd, both written and configured in Guile Scheme.

https://www.gnu.org/software/shepherd/ https://www.gnu.org/software/guix/

Re: 20 years as a Debian maintainer

#66
post #19

Earlier quoted context omitted.

> Packaging is a complicated task and isn't as automatable as you'd think I think the Solus guys would have a word with you. Even with no packaging experience it is pretty simple to create a package for Solus Project. Here a short intro: https://wiki.solus-project.com/Packaging

Come back when they have done this for 24000 third-party packages.

I don't see the connection. I didn't say that they have more packages, just that they have very good packaging tooling that makes it simple to make consistent packages.

Re: 20 years as a Debian maintainer

#67
post #57

Earlier quoted context omitted.

Having just set up a Debian server this weekend (Windows dev diving into Linux for the first time), can I ask what the main difference between init and systemd are? Mostly from a operational/security stand point.

Init-scripts are a bunch of file system conventions and shell scripts; it's an imperative way of bringing a system into a particular state (networking, services etc.). Init itself is the very first process the the OS executes; all processes in -nix are created by forking. When using init-scripts, init is extremely simple. Systemd replaces init and uses a declarative approach for the system and its services, and the d…

You've made the mistake of assuming that the old system couldn't start up stuff in parallel. That's simply not true; Debian had insserv/startpar to create a global dependency graph and run the scripts in parallel while satisfying all dependency constraints.

(As an ex Debian developer myself, I spent many many hours working on this stuff while I was one of the sysvinit maintainers.)

Re: 20 years as a Debian maintainer

#68
post #63
post #14

Even though I use ubuntu on my desktop, it is from Debian, and I ran Debian on my servers for years. Debian is the most important software for me for decades. For that I thank you, Riku, and everybody else contributes to Debian!

What prevents you from using Debian on the desktop? I'm using Debian testing for quite a while already, and it works rather well. The only annoyance is the the freeze period, but it got shorter lately.

Too many software development environments are using ubuntu out-of-the-box these days, I thus follow that to save some setup time. If I use desktop for simply surfing or office needs then yes Debian will be my preference.

Re: 20 years as a Debian maintainer

#69

Earlier quoted context omitted.

It can be easy for certain kinds of software: https://wiki.debian.org/AutomaticPackagingTools https://manpages.debian.org/man/1/dh_auto_configure https://manpages.debian.org/man/1/dh_auto_build https://manpages.debian.org/man/1/dh_auto_install

What I find complicated about Debian packaging is not how to use the tools and how to arrange the package, although that is certainly complicated, but not intractable. What I don't understand is once you have a package, why it is such a long and complicated process to get it into Debian. You can't just upload it and forget, you have to sign up and become associated with that work, you have distribute your keys and ge…

"Upload and forget" leads to packages which are uploaded once and then abandoned. This then becomes a burden. While the Debian process is time consuming and arcane it does select for people who are prepared to commit to maintaining packages for the longer term.

That said, the Debian processes are over 20 years old. I find contributing to the FreeBSD ports and MacOS X homebrew package collections simpler, and without the same level of jumping through hoops. Homebrew's git-based submission, review and CI testing is simple to use. Likewise submitting a patch for the FreeBSD ports. Debian could do something similar, but its workflows predate this significantly. Were Debian to adopt a similar process, I think it would make the process significantly more transparent. The existing practice is still oriented around single individuals maintaining and uploading single packages (though it can also be done by groups with their own private version control for the package/group). The newer methods are significantly more open with much lower barrier to entry.

Re: 20 years as a Debian maintainer

#70

A couple of weeks before they got accepted? Wow! I considered become a DD about 10 years ago, but a friend was going through the process and it took them over a year with at least one restart-from-scratch because the bureaucracy had been lost or something. > Regis NM did start somewhere in 2003. There was a period of him being on hold, in 2006 we did continue the process, which used some time, but most of the delay u…

While such delay is frustrating, do bear in mind that these "inefficient" people are entirely unpaid volunteers doing this on their own time and at their own expense. Which is not to say that the process could not be improved, of course. They did introduce the "maintainer" status, which makes it simpler to get some level of privileges, which removed some of the blockers.
Post reply on HN