66 0.9.2.0 and 66-tools 0.3.0.0 released
Dear Obarun Community,
New releases of 66 (0.9.2.0) and 66-tools (0.3.0.0) are available in the Obarun
testing repositories. 66 becomes more predictable and easier to debug, and 66-tools brings
a web interface to drive 66 from a browser, a 66-dbus-launch without any external D-Bus
library and a deeply reviewed 66-ns. Below is what you have to do to upgrade,
followed by an overview of the changes.
Upgrading
The migration is automatic and, coming from 0.9.1.x, it works without a reboot. The first
66 command after the upgrade takes a snapshot named system@<version>, converts the files of
66 and restarts the helpers whose behaviour changed, so a running machine keeps working.
Synchronize and upgrade. This brings oblibs to 0.4.1.0, needed by both releases:
# pacman -Syu
Then trigger the migration as root first, then as each regular user that has a 66 ecosystem:
# 66 status
$ 66 status
Warning
A shutdown planned before the upgrade, with 66 reboot +<minutes> or
66 poweroff <hh:mm>, is dropped. Plan it again once the upgrade is done.
What you must check
On the 66 side:
- Remove the
LIVE=line from/etc/66/init.confif you edited that file. It is ignored without a word. - Drop
-lfrom any personal script that passes it to66,66-hpror66-shutdownd,clone=from66 tree createor66 tree admin, and-Pfrom66 remove. They are now refused. - A personal service name ending with
-logis reserved to the loggers, and a service or tree name starting with a dot is refused. Rename such a frontend. The migration removes a service already parsed with the-logsuffix, its frontend stays. - A service that must never be killed on its way down needs
[Stop] Timeout = 0in its frontend. - A script that relied on
-Ptaking the logger along must now name the logger itself. 66 fdholder start|stop|restartis replaced by66 internal start|stop|restart fdholderd.- Several exit codes moved from
111to100for refusals. A script that tested them must be adjusted.
On the 66-tools side:
- The D-Bus session socket moves from
/run/user/UID/dbusto/run/user/UID/bus. Update any configuration or script of yours that names the old path. - Run
66-web passwdonce before the first66-web serve. Without a credential, the interface serves nothing. - If your services use the rule files of
66-ns, check them:kernel-logs.ruleandkernel-tunables.rulenow really apply,system-strict.rulenow makes/bootand/tmpread-only as well. When you combine several rule files, putsystem-strict.rulelast.
66 0.9.2.0
Debugging
The verbosity you set for the boot, VERBOSITY in /etc/66/init.conf or on the kernel
command line, now reaches every 66 tool: the scandir, the supervisors, the internal helpers
and the services themselves. When you debug a boot at a high verbosity, you get their trace as
well. A VERBOSITY exported in your shell does the same for the 66 commands you type.
Stopping a service
A service that does not stop is now killed after 10 seconds, unless its frontend sets its own
[Stop] Timeout. [Stop] Timeout = 0 keeps waiting without end. A shutdown or a 66 stop can
no longer hang forever on one stuck service.
Oneshots
A oneshot that runs past its timeout is stopped together with every process it started,
instead of leaving them behind. 66 status tells you whether its script failed, was killed by
a signal or could not be run at all.
A reactor can now act when a oneshot finishes, the same way it already could for a long-running service:
[Event]
EventType = service
From = ( oneshot_service )
On = ( done )
A broken service no longer stops everything
A tree, the boot and the shutdown now start or stop every service that is fine, and only leave aside a broken service, one whose files cannot be read or that sits in a dependency loop, together with the services that depend on it. The broken service is named with the command that repairs it. Before, the tree stopped at the first refusal, and one bad service could leave a whole boot half started.
The new 66 reconfigure -c is that repair: it removes what the service left on disk, parses its
frontend again and puts it back in the state it was in.
Commands you can trust
A command that refuses one of the services you named changes nothing at all, instead of acting
on some of them. -P acts on the services you named and nothing else, not even their logger.
Two 66 commands run at the same time no longer write over each other, they take turns. A
service can therefore run 66 itself, for instance Execute = ( 66 start serviceA ).
Names and providers
A name now means one thing: either the service that bears it, or the service that provides it
with Provide, never both. A provider can take over the name of a disabled service:
# 66 disable -P dbus
# 66 enable dbus-launch
66 remove network, where network is only provided by connmand, now tells you to run
66 remove connmand instead of removing connmand behind your back.
Frontend files
66 now reads and runs the Execute line of your frontends itself. execl-cmdline is no
longer needed around a command, a syntax error stops the start with a message naming the
service, and a variable left empty in [Environment] no longer breaks the start.
Other new things
66 internal start|stop|restart|statusacts on the three helpers of a scandir:fdholderd,oneshotdandeventd. For instance66 internal restart eventdwhen the reactors no longer answer.66 statusaccepts several services and shows them in the order66starts them.66 statusand66 runstatetell how a oneshot ended:exited,signaledorexec-failed.
Many bugs are fixed as well, among them 66 snapshot remove "" which destroyed every snapshot,
and the parser taking a capitalised word inside a script for a key. The complete list is in
the changelog.
66-tools 0.3.0.0
66-web
A single program serves a web page and a JSON API to list services and trees, read their state, follow their changes live and act on them. It handles the services of the user that runs it and nothing else. See 66-web.
Set a credential first, the interface serves nothing without it. Then start the server:
$ 66-web passwd
$ 66-web serve
66-dbus-launch
The launcher no longer needs any external D-Bus library. It reads system.conf or
session.conf by itself, follows their includes and applies the resulting policy. A rule
installed in system.d used to require a restart of the whole bus, which cut every client, a
SIGHUP to the launcher is now enough.
66-userd
66-userd, which starts the services of a user at login, is now reliable on fresh accounts and
right after boot. It works on an account that never used 66, leaves the system accounts
alone, waits for the supervision to listen before starting the trees, and can be restarted.
66-ns
The sandbox tool went through a deep review. Several of its mounts landed in the wrong place or
silently did nothing, they now do what the documentation says. It can run a program on another
root than the one of the host, such as a directory where pacman -r installed a system, and its
rule files now are compatible with the sandboxing options of systemd, with a
conversion table
in its documentation.
Deprecated tools
execl-cmdline, 66-getenv, 66-gnwenv and 66-writenv are deprecated. They write a
warning at each run and will be removed in the next release. The last three complemented 66
when it ran on top of s6 and s6-rc, and 66-execute now does the job of execl-cmdline.
Documentation
- 66 changelog and upgrade notes: 66-upgrade
- 66-tools changelog: upgrade
- The internal helpers: 66 internal
- The web interface: 66-web
- The sandbox tool: 66-ns
Feedback is welcome. Report anything that went wrong on the forum or on git.obarun.org.
Thank you for your continued support of Obarun.
Eric Vidal: [email protected]