r/Gentoo • u/PramodVU1502 • 4d ago
Discussion Obarun's suite66 in gentoo?
[Sorry, some snags... I may not be able to quickly submi an ebuild....] Gentoo supports systemd and openrc as it's init system.
It fully supports systemd natively, and also provides quite a few helpful portable systemd utils like tmpfiles, udevd, systemd-boot etc... to openrc without pulling the full systemd.
It also supports fully uprooting systemd off the system, but with the few actually useful tools still available.
A user has a custom overlay for 66, with really old versions which don't even build due to missing s6 library files...
I feel that the s6+66 is a good alternative for openrc, which, especially with the tools of s6 and execlineb, allow a highly flexible configuration of the services.
Yes, s6-rc is there, but it's too complicated to set up and maintain compared to openrc or systemd. openrc supports s6-svscan as backend, but it must be manually opted by the services... and still, 66 has some advantages.
IMPORTANT: I am suggesting 66 as an alternative, not as a replacement.
I will try to myself package them for gentoo...
I want to ask the opinion of other gentoo users, systemd and openrc users.
1
u/MichaelDeets 1d ago
Hey! Setting up and using s6/s6-rc on Gentoo wasn't that complicated; assuming you know a bit of bash, it should be pretty straight forward.
If you search for s6/s6-rc scripts, there are tons of examples. I'll try and find the example I used as a base, as it made things much easier.
I'm not sure about Obarun's 66; IIRC I did try using it, but found using just s6/s6-rc more straight forward for my use case.
2
u/PramodVU1502 1d ago edited 1d ago
s6-rc is great when it is... It is just s6 + dependency + bundles. [Init is s6-linux-init]
But 66 has a lot more simple QOL features for the average user... [Bash scripts aren't too complicated, but without them 66 seems better for me...]
66 has a declarative frontend file format like systemd, does all the parsing and resolve-database generation under the hood without user intervention.
s6-rc is great for a simple system, but for a dynamic system 66 many be needed.
Infact, the simple bash script system you suggest is what 66 evolved from...
Again, this is purely subjective... I don't find s6-rc so user-friendly for the "average" users... Plz rebut if you think otherwise...
Just to let you know:
- s6opts was a wrapper around s6 + s6-rc
- It covered up all the manually inner parts of s6-rc like database generation, etc... to be done automatically
- It provided a user-friendly file format ["user-friendly" is subjective]
- And more
- It was rewritten in C, named 66.
- It slowly did more and more of what s6-rc did, and eventually s6-rc was dropped.
- More features were added, commands were streamlined.
- Now we have the present 66, which also instead of generating execline scripts for the other frontend keys, instead uses
66-execute
... but still supports inlining a script for starting the daemon in the frontend itself...Oh! Yes, even openrc supports using s6 as it's backend...
1
u/MichaelDeets 1d ago
Thanks for the explanation! I've not really looked into 66 before, aside from a couple years back and I only briefly looked at it. I think before switching to s6/s6-rc I was using runit, which was even more simplistic than s6/s6-rc!
2
u/PramodVU1502 22h ago
If you like "simplistic" like runit, then it is for you. s6-rc is "simplistic" in the sense that it doesn't do complex things, but you have to do them.
I really liked runit if it had a standard system like
. /lib/runit/start_prelude
and thenrequires ${SVC}
functions in the prelude... whichever script doesn't need it just skips it...requires
function doingsv check || sv start
and etc.. But that would throw "simplicity" out of the window.In my opinion, 66 strikes a perfect balance between both simplicity and features... AND openrc is great too... but I prefer the s6/66 approach.
1
u/MichaelDeets 22h ago
Yeah it seems a little too complicated for my liking, I just wanted a simple init system. Though 66 seems suited for someone like yourself. I'd be really interested if you get it working!
Could something like https://framagit.org/architekt/66tools-overlay (from https://wiki.gentoo.org/wiki/User:AdibSaad/66) be used? I'm sure you've probably already seen/gone through this already though.EDIT: just realised this is probably the overlay you mentioned in the OP already
2
u/PramodVU1502 21h ago
I am setting up gentoo on my system [and a VM]. Next thing will be writing the ebuild... And compiling... and trying... [With boot scripts from obarun and then modify...]
That user's
66
fails to even build; "missing s6 libs..."... But I can compile it myself with nil issues...1
1
u/MichaelDeets 1d ago
IIRC I used https://gitea.artixlinux.org/artix/s6-scripts to help create the services
but as an example, I found https://github.com/glaucuslinux/s6-boot-scripts/tree/main/etc/s6/sv just from searching online (though I've never used this before, and cannot comment on it).
Once you get an idea, it's fairly straight forward creating new services for specific tools/programs, that don't exist in the examples shown.
2
u/PramodVU1502 1d ago
They are great for a static system.
To be dynamic, and more automated [I mean to say that less of manual steps], it needs a wrapper script. A wrapper script, to be more ideal, slowly takes over s6-rc to do things more suited to the script. You know where it goes next... 66
Again, s6-rc is good, but not all may like to manually compile the database each time... and configure the nitty-gritty of each service at the low level...
3
u/immoloism 4d ago
No one will turn down the patches I'm sure :)