I guess since the whole "Flatpak creating a dependency on systemd" bullshit has surfaced this week there has been some other conversations about systemd going on throughout the Fediverse.
I've seen some oblique references to Debian making an effort to make OpenRC more viable as an alternate init system. That's about all I've gathered on my hit-n-run timeline surfing the last several days. Not sure if this is an official Debian project or just someone's wish list.
Anyone have the skinny? Links to actual discussions?
Last I heard (a couple years ago?) there was a discussion about making room for optional alternate init systems, and it was shot down.
I have to reiterate (and forgive me for being preachy), that the conversation about systemd has to evolve beyond debating init systems, because systemd is not (merely) an init system. It's way, way more than that.
@rl_dane @RootMoose My understanding of Debian policy is that systemd is the default, not mandatory, and that other init systems are possible (but support for them may be patchy).
So I think if a package *assumes* systemd is present that’s a bug; obviously if it has a hard dependency that’s fine but it should say so, otherwise it shouldn’t assume more than ‘some init system’. In practice packages might not provide init scripts for other systems though.
Interesting, I stand corrected:
https://wiki.debian.org/Init#Changing_the_init_system_-_at_installation_time
@rl_dane @benjamineskola Yeah, this is all dated stuff that doesn't work any more iirc. I could give it a mess around when I find some focused seat time.
I might try throwing it on a vm to test later.
@rl_dane@polymaths.social @RootMoose@mastodon.bsd.cafe @benjamineskola@hachyderm.io
I got it to work in a VM recently.
RE: https://transfem.social/notes/alzqieplv75n0199
fwiw there's a couple folks working a lot lately on bringing debians openrc support in par with gentoo/alpine, moving to native openrc scripts over sysvinit compat, etc, etc
so it might be a good option by then
you'll want https://salsa.debian.org/helmutg/dpkg-root-demo/-/merge_requests/11 and https://salsa.debian.org/debian/openrc/-/commits/wip/native. This works for a bare sysinit, but I did not test more than that. Note that this is highly experimental and you need to build your own packages.
- replies
- 1
- announces
- 0
- likes
- 0
@werdahias @benjamineskola @RootMoose
That's interesting, I didn't even know about debvm.
Is sysvinit better supported in #Debian right now?
@werdahias @benjamineskola @RootMoose
Am disappoint. (But not surprised 🫠)
Though I really like openrc, it is like a mature sysvinit. Once that support has landed and the rough edges are done this should be a very solid experience. The major missing services are ssh, dbus, bluetooth, some dns(avahi?), cron.
Just curious, is there a sample openrc script for ssh? I'd love to see what it looks like.
I'm guessing /sbin/openrc-run is itself a shell script? I was a little confused by the := substitution parameters at first, until I looked them up in the bash manpage.
Ah, it seems the leading ":" pads it so that if the variable is already assigned, it won't interpret it as a comand. That's interesting.
I tend to use
[[ -n ${foo:-} ]] || foo=bar
but I can see how
: ${foo:=bar}
would be preferable. The leading colon looks a little confusing, but it's easy enough to understand.
Overall, looks pretty readable/serviceable!
openrc-run is a c program, it handles starting and synchronizing dependencies, then it spawns a shell script helper that prepares the shell environment (e.g. by defining default functions and such), which then sources the conf.d and init.d
things like the $command variable are used by the default_start function for example
Ah, so it spawns a subshell to interpret the config file? Because it totally looks like valid bash, except for functions which seem to be defined elsewhere. :)
it's just that we have a lot of code before the shell is even spawned to handle reliability
Huh! Pretty sure /bin/sh would choke on the fancier substitution syntax, unless of course the distro defaults to ln -s /bin/bash /bin/sh
sometimes bashisms slip in, but rarely, i run all my gentoo systems with dash as /bin/sh, no issue
Huh, you're right! I always assume POSIX shell lacks tons of features, and I'm usually surprised by how many of what I assumed to be "bashisms" it actually has. =)
Oh Pollyanna, you are far, far, far too good for this world. 🥲
(Hope springs eternal, though!)
🍵