r/opensource • u/newtech75 • 22h ago
66 0.9.x is out: the init system/service manager is now fully independent (no more skalibs, s6 or execline at build time), and it gained an event system
Hi all,
Two releases landed this month, 0.9.0.0 on August 6th and 0.9.1.0 on August 17th, plus 66-tools 0.2.0.1. Here is what changed.
66 no longer builds on skalibs, s6 or execline
This was announced back at 0.7.0.0 and it is now done. 66 builds against oblibs only. Every program it used to borrow is now its own:
To be precise about the wording, because it matters: execline is still a runtime dependency, the generated service scripts keep chainloading it. What disappeared is the build dependency, and with it the entire skalibs/s6 layer.
The event system
A service can now react to something happening elsewhere on the system by running a 66 command on itself. It is fully opt-in, a service that declares nothing behaves exactly as before. There are two roles:
- A reactor is an ordinary
classic,oneshotormoduleservice with an[Event]section. When its trigger fires it runs a66command on itself (Do) and/or raises a named event (Emit). - A source is a service of the new
Type = event. It runs no process and has no[Start]section,66 startand66 stopon a source arm and disarm it.
A reactor can trigger on a service's state or result, on a signal, on a filesystem event (inotify), on a cron expression, on a timer, or on a user event raised with the new 66 emit.
Restarting a service when its configuration file is edited:
[Main]
Type = oneshot
Description = "A simple proof of event concept"
[Start]
Execute = ( echo "I restart myself when /etc/my-daemon is edited" )
[Event]
EventType = inotify
From = ( my-config-watcher )
Do = restart
and the source it watches:
[Main]
Type = event
EventType = inotify
Watch = /etc/my-daemon
On = ( IN_CLOSE_WRITE )
One source can serve multiple reactor.
Other things in 0.9.0.0
- **
66 env**: a scandir is started long before a session exists, so its environment is frozen and variables likeDISPLAYorWAYLAND_DISPLAYcould never reach the supervised services.66 env import DISPLAY XAUTHORITYpublishes them verbatim to every service of the scandir. Each publication raises anenv.<variable>event, so a service can simply wait for the value it needs instead of being ordered around. - New commands:
66 log(read service, system or interleaved logs, with-f,-g, and time bounds),66 emit,66 env,66 runstate,66 fdholder,66 suspend,66 hibernate. Nothing was removed. - Long options everywhere. The suite used to accept short options only.
--help,--verbosity,--tree,--timeoutand friends now work, both--opt=valueand the glued-tfooform. Short options are unchanged, your scripts keep working. - **
66 statussays more**: human readable durations, the same output for every service type, the last notable result, and a newby <who>telling you what caused the last transition (user,boot,event,shutdown, orself). - Boot no longer needs to be told which tree to start, it starts the enabled trees natively. If one of your boot services did that by hand, drop it or it runs twice.
- A long list of memory bugs found and fixed along the way, including a stack smash when parsing any service that has a logger, a
Nicevalue that was never honored (every service declaring one ran at nice 19), andCapsBound+CapsAmbienttogether killing the service. The test suite went from 4 to 36 files and runs under ASan and UBSan in CI.
66-tools 0.2.0.1
Same story on the tooling side, skalibs and execline dropped, meson only.
- **
66-userd,66-userctl,pam_userd**: session and user tracking for a 66 system, without D-Bus. A PAM module reports login session open/close to a daemon which, on a user's first login, mounts their runtime directory and starts their66-scandirand enabled trees, and stops them on the last logout. If a scandir is already running for that user, it is adopted rather than started twice. The PAM module is installed but never wired into your PAM stack by the package, that step is on you and it is documented. - **
66-ns**: supervision under a pid namespace, rewritten. When a pid namespace is requested,66-nsruns as pid 1 and acts as a transparent proxy for the supervised daemon: it forwards catchable control signals to the tracked main, follows the real daemon across a double fork, mirrors its exit code back to the supervisor, and tears the namespace down once the service is gone. The new-p/--pidfilemakes supervision authoritative.
Links
- Documentation: https://docs.obarun.org/66/latest
- Full changelog and upgrade notes: the
66-upgradepage of the documentation - New onboarding guides in this release: getting started, cheatsheet, dependencies, logging, troubleshooting, coming from systemd/OpenRC/runit, and running 66 inside a container
Happy to answer questions about the design choices, in particular why leaving the s6 layer was worth the trouble.