Re: nosh on GNU/Linux: missing <sys/event.h>

From: Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups_at_NTLWorld.com>
Date: Sun, 07 Jun 2015 23:51:02 +0100

Guess who didn't spot that it was Cc:ed to a mailing list? (-:

Some of the salient points that others may be interested in from what I
sent privately, plus some extra general-audience stuff:

Yes, kqueue. Being in the very first bullet point right along with the
other important API dependencies is not really not mentioning it, in
fairness. (-:

(I might have mentioned this before, but it bears repeating: If you are
writing a service manager, kevent() on the BSDs is well worth
investigating. One can track orphaned daemon children with NOTE_TRACK
on EVFILT_PROC. The Linux library version has a rather nasty open file
descriptor security vulnerability, and a sneaky doco change to cover up
a difference in signal semantics, both of which are the cause of the
majority of the conditional compilation in nosh. But you'll notice that
I've not needed to write a "fghack" equivalent. The nosh
service-manager is quite happy with the
old you-have-to-turn-an-undocumented-debug-option-on-to-stop-it
forking Vixie cron on FreeBSD.)

No, redo isn't entering a loop. It simply traverses multiple dependency
paths to end at the same failing leaves. There are several paths to
some object files, and of course several leaves to end up at in the
dependency tree that require the kqueue API. It does stop eventually.
Turn on the --verbose option (with REDOFLAGS is easiest) to see.

In early versions, one had to build from source. There were no binary
packages. In some ways that's the BSD influence at work, where
downloading something from the ports collection and building it from
source is the norm. I hadn't even looked at the BSD binary packaging
system until quite recently.

The downside of building from source is that you won't reap the benefit
of all of the work that I've recently put into maintainer scripts to
automatically do all of the service bundle setup. package/export is not
the whole story, as the source package page warns. But I'm sure that
the package/debian/*.{post,pre}inst scripts won't prove that cryptic to
non-Debian Linux people. (BSD people can enjoy the
package/bsd/*.{post,pre}-* scripts.) There are some maintainer script
bugfixes coming in version 1.17, note.

If you are planning to run under systemd, the Debian maintainer scripts
will show you the way. If you are planning to run fully
nosh-system-manager-manged, note that packaging that up is still on the
roadmap. At the moment you'll have to do some things by hand. There are
no prepackaged services yet for loading sysctl settings and loading
kernel modules; and running udev and a system-wide dbus are slightly
shaky. And how you arrange for init=/bin/system-manager and running
something like mdev or s6-devd instead of udev is up to you. (-:

In version 1.17 I hope to have ready the tool for auto-creating the
mount_at_*, fsck@*, ttylogin@*, dump@*, and swap@* service bundles from
/etc/ttys and /etc/fstab, as also mentioned on the roadmap. I already
have some of it. Of course, you can already run the underlying
convert-fstab-services command and do things longhand, but a nice set of
redo scripts to do it from a simple "redo all" (and thus only regenerate
things when the configuration files change) seems to be turning out to
be a good idea in practice. As a consequence preset has had to gain a
--fstab option which you will see in version 1.17. A kmod_at_* bundle
generator has yet to be written, though. But you can always
convert-systemd-units a new kmod_at_wibble.service service, or copy one of
the existing kernel module service bundles that are provided.
Received on Sun Jun 07 2015 - 22:51:02 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC