[announce] skarnet.org Summer 2022 release

2022-06-14 Thread Laurent Bercot
Hello, New versions of some skarnet.org packages are available. skalibs has undergone a major update, mostly to yet again revamp librandom. This time I am happy with the API and implementation: I believe it finally addresses all the cases in a satisfying way, providing cross- platform

Re: Unprivileged Shutdown?

2022-05-28 Thread Laurent Bercot
I have been using simple privilege escalation to poweroff the machine, but looking through the source code for s6-linux-init-shutdownd and friends, it appears the only constraint on interacting with the daemon is the permissions on run-image/service/s6-linux-init-shutdownd/fifo. The default

Re: s6 xinit replacement?

2022-05-14 Thread Laurent Bercot
Is the purpose of executing setsid() in s6-supervise to allow for the services to continue beyond the termination of the supervision tree? It's actually the opposite: it's to protect the supervision tree against misbehaved services. :) setsid() makes sure the service is isolated, and a

Re: Supervision on the BSD's

2022-04-09 Thread Laurent Bercot
In searching, I found some messages on the Skaware lists about running s6 as PID 1 on FreeBSD; has that work been published anywhere? I'm not sure if I want to go so far as replacing PID 1 right out of the gate, but having some existing service directories would be nice. I have done some

Re: s6-linux-init and ttys in lxc containers

2022-03-08 Thread Laurent Bercot
s6-linux-init: warning: unable to ttyname stdout: No such device I suspect this is due to the mechanism described on https://github.com/lxc/lxd/issues/1724#issuecomment-194412831, although I’m not using LXD, only lxc (which does not have a daemon running as root). You're right, it's the

[announce] Small skarnet.org update

2022-03-07 Thread Laurent Bercot
Hello, New versions of some skarnet.org packages are available. The changes are minor, mostly quality-of-life and small additions driven by the new version of s6-overlay. There are bugfixes all around, so users are encouraged to upgrade even if they're not using s6-overlay. The new

Re: s6-svscan shutdown notification

2022-02-23 Thread Laurent Bercot
What's the cleanest way to wait on s6-svscan to shut down after issuing of a SIGTERM (say s6 via-svscanctl -t)? Be its parent, and wait for it. :) On SIGTERM, s6-svscan will not exit until the supervision tree is entirely down, so that will work. If you're not the parent, then you'll have

Re: s6-log weirdness

2022-02-04 Thread Laurent Bercot
I noticed that in some cases s6-log exits cleanly but does not log anything. What's worse, it depends on the message content. Hi Vallo, That's the difference between '!zstd -q' and '!zstd' -q ;) When -q isn't a part of your processor command, but a part of the s6-log command line, it is

Re: [announce] skarnet.org Winter 2021-2022 release

2021-12-22 Thread Laurent Bercot
I think trying to explain s6-linux-init + s6-rc through the lens of runit's stages isn't a good idea. Carlos is correct - both here and in his explanation of s6-linux-init stages. When designing s6-linux-init, I kept runit's "stage" terminology because at the time it was a useful framework

[announce] skarnet.org Winter 2021-2022 release

2021-12-21 Thread Laurent Bercot
Hello, New versions of all the skarnet.org packages are available. The changes are, for the most part, minimal: essentially, the new versions fix a bug in the build system that made cross-building under slashpackage more difficult than intended. Very few people should have been impacted

Re: A program that can get exactly the log of a supervised process?

2021-10-25 Thread Laurent Bercot
Why not have the grepper listen on the log file directly? You'll need to have a timestamp in the log and know where the log is, but those can be known at the time of writing the service script. There's no such thing as "the log file". There's the log backendS, which can be one or more

Re: A program that can get exactly the log of a supervised process?

2021-10-25 Thread Laurent Bercot
Well, I do realise the lifespan issue of the loggrep program, which is why I asked the question in the first place. But I really never thought of directly inserting loggrep into the logging chain as a new node; instead, what I have thought is making loggrep a program "attachable" to the logger.

Re: A program that can get exactly the log of a supervised process?

2021-10-24 Thread Laurent Bercot
Any idea on how the log "teeing" may be done cleanly (and portably if possible; something akin to `tail -f' seems unsuitable because of potential log rotation), and perhaps any flaw or redundancy in the design above? The obstacle I have always bumped against when trying to do similar things is

Re: logging services with shell interaction

2021-10-19 Thread Laurent Bercot
we have a fair number of services which allow (and occasionally require) user interaction via a (built-in) shell. All the shell interaction is supposed to be logged, in addition to all the messages that are issued spontaneously by the process. So we cannot directly use a logger attached to the

Re: Service watchdog

2021-10-19 Thread Laurent Bercot
Yes, in my usecase this would be used at the place where sd_notify() is used if the service runs under systemd. Then periodically executed watchdog could check the service makes progress and react if it doesn't. The question is how to implement the watchdog then - it could be either a global

Re: Readiness notification using signals

2021-09-29 Thread Laurent Bercot
Hi Carlos, I'm supervising an instance of an X Server using s6. X.Org has a built-in readiness notification mechanism: it sends a USR1 to its parent process once it's ready. From what I know, it would be s6-supervise. This...  this is appalling. This mechanism is a terrible way to

Re: [announce] skarnet.org Fall 2021 release

2021-09-26 Thread Laurent Bercot
just a minor thing. You probably didn't push to s6-rc repository. I don't see the new v0.5.2.3 version commit and tag. Weird. I must have missed a case with my script. Thanks for the report; it should be fixed now. :) -- Laurent

[announce] skarnet.org Fall 2021 release

2021-09-26 Thread Laurent Bercot
Hello, New versions of all the skarnet.org packages are available. skalibs has undergone a major update, with a few APIs having disappeared, and others having changed. Compatibility with previous versions is *not* assured. Consequently, all the rest of the skarnet.org software has

Re: First time caller to the show - am I understanding the fifo trick correctly?

2021-08-25 Thread Laurent Bercot
Forgiving privilege separation failures and minor grammatical mistakes, does it look as if I understand the fifo trick's application in practice? Hi Ellenor, Yes, I think you have the right idea. The goal here is to redirect s6-svscan's own stdout and stderr to the stdin of the catch-all

Re: s6-rc-init verbose equivalent messages?

2021-08-19 Thread Laurent Bercot
# /usr/local/bin/s6-rc-init -c /s/comp -l /s/run /s/scan s6-rc-init: fatal: unable to supervise service directories in /s/run/servicedirs: No such file or directory I've completed a disk-disk copy, as I need to integrate s6 into hardenedbsd. Do you have a s6-svscan process running on /s/scan ?

Re: S6 Queries

2021-08-11 Thread Laurent Bercot
Thanks Laurent for the detailed explanations. We did a bootup speed comparison between S6 and systemd. S6 is able to boot up slightly faster than systemd. Actual result is 4-4.5% faster but we were expecting something near to 20%. Ours is a bit complex setup with more than 140 services

Re: S6 Queries

2021-08-02 Thread Laurent Bercot
Do you think this is any better? = #!/bin/sh test_for_myrequirement || exit 1 exec mydaemon -myarg1 -myarg2 = This does not accomplish the same thing at all: it does not ensure that myrequirement is at least attempted before mydaemon

Re: S6 Queries

2021-08-02 Thread Laurent Bercot
I thought the way to do what the OP asked is: = #!/bin/sh s6-svc -u myrequirement || exit 1 exec mydaemon -myarg1 -myarg2 = This is not a good idea in a s6-rc installation, because it sends raw s6 commands, which may mess with the

Re: S6 Queries

2021-08-02 Thread Laurent Bercot
1. In systemd, the services are grouped as targets and each target depends on another target as well. They start as targets. [ex: Reached local-fs.target, Reached network.target, Reached UI target,...]. Is there any way in S6 to start the init system based on bundles? Yes, that is what bundles

Re: Query on S6 system shutdown

2021-07-29 Thread Laurent Bercot
I believe the finish script is not being called by s6-svc. When I run it manually , the finish script runs and kills the process and graceful shutdown is happening as expected. What may be the cause for not triggering the finish script of critical service. The finish script, which is entirely

Re: Query on s6-log and s6-supervise

2021-06-09 Thread Laurent Bercot
I have checked the Private_Dirty memory in "smaps" of a s6-supervise process and I don't see any consuming above 8kB. Just posting it here for reference. Indeed, each mapping is small, but you have *a lot* of them. The sum of all the Private_Dirty in your mappings, that should be shown in

Re: Suspend s6-log writing to log file and resume it back after sometime

2021-06-08 Thread Laurent Bercot
Any pointers on how I can go about this? Is there any hack or tricks that could be done in s6-log to achieve this? Sorry, but no, nothing comes to mind - s6-log was not designed for this. I don't think expecting services to keep running while not logging to disk, whether or not in

Re: Query on s6-log and s6-supervise

2021-06-08 Thread Laurent Bercot
1. Why do we need to have separate supervisors for producer and consumer long run services? Is it possible to have one supervisor for both producer and consumer, because anyhow the consumer service need not to run when the producer is down. I can understand that s6 supervisor is

Re: [PATCH] s6-rc-compile: Fix setting of flag-essential

2021-06-03 Thread Laurent Bercot
Don't set the bitposition (which is 0 for 'flag-essential') to the flags, but the bit at the position. Ha, nice catch. Applied, thanks! -- Laurent

[announce] #s6 is moving from Freenode to OFTC

2021-05-24 Thread Laurent Bercot
Hello, As some of you are aware of, last week, the Freenode IRC network was subjected to a forceful change of its operational control. The history and details of the change are deeply political in nature and very much off-topic for our lists, and I really do not wish this event to be

[announce] New hypermail archives of skarnet.org mailing lists

2021-05-09 Thread Laurent Bercot
Hello, ezmlm-cgi, the web interface to the archives of the skarnet.org mailing-lists, has been broken for... forever, resulting in an inability to display certain messages. I tried debugging it, but could not find out what was happening within a reasonable amount of time dedicated to it. A

Re: S6 logging

2021-03-09 Thread Laurent Bercot
I am trying to log the prints coming from daemons like dropbear using s6-log, but couldn't make it. Am I missing something? You really need to improve on your way of asking for help. "couldn't make it" is not an actionable report. You need to say: - exactly what you did (you did that, good,

Re: Path monitoring support in s6-services

2021-02-17 Thread Laurent Bercot
Since it requires individual instances of inotifyd for each service(s) [which depends on multiple files/paths modifications) to get started] Have you tried it and noticed an impact on your boot times? (AKA: "Profile, don't speculate.") -- Laurent

Re: Path monitoring support in s6-services

2021-02-17 Thread Laurent Bercot
inotifyd (or something similar) + s6-svc (or s6-rc)? Thought of the same but I have many such services;Just thinking of cpu overhead during the initial boot up. What makes you think this would have a noticeable impact on your CPU load? -- Laurent

Re: Some suggestions on old-fashioned usage with s6 2.10.x

2021-02-15 Thread Laurent Bercot
(Apologies for the broken threading, I originally sent my answer with the incorrect From: and it was rightfully rejected.)

Re: Some suggestions on old-fashioned usage with s6 2.10.x

2021-02-15 Thread Laurent Bercot
I do not really understand their excuse here. CLI incompatibility is trivially solvable by creating links (or so) for `halt' / `poweroff' / `reboot', and even the `shutdown' command can be a wrapper for an `atd' based mechanism. The options! The options need to be all compatible. :) And

Re: [s6-svperms] Handling service permissions at creation time.

2021-02-15 Thread Laurent Bercot
Services can fix their own permissions so if s6-rc is going to grow that functionality it should be in the generated run, not in some rarely used outboard helper service. As answered on IRC, for ML completeness: no, because permissions should be fixed when the supervisor starts, not when the

Re: [s6-svperms] Handling service permissions at creation time.

2021-02-15 Thread Laurent Bercot
The s6-svperms is a great feature but it only handle permissions control of a service at runtime. That means that we need to change the permissions of the service everytime that a reboot occurs. For a server, this is not really a big deal but for a desktop machine this can be really hard to

Re: timer support for s6 services

2021-02-10 Thread Laurent Bercot
Is there a way to set a timer option on a particular service 'X', so that 'X' gets restarted for every timer seconds ? You can achieve that with another service that just sleeps for 'timer' seconds then sends a s6-svc -r command to the service you want restarted. -- Laurent

Re: stage2 as a service

2021-02-01 Thread Laurent Bercot
For the normal case you are absolutly right. But with stage 2 as a service you have a race condition between stage 2 and s6-svscan-log. The usual trick for stage 2 solves this problem. Ah, now I get it: stage 2 must not start before the catch-all logger is ready, so you open the fifo for

Re: stage2 as a service [was: Some suggestions on old-fashioned usage with s6 2.10.x]

2021-01-31 Thread Laurent Bercot
Hi Stefan, Long time no see! A few comments: # optional: -- Question: Is this necessary? redirfd -w 0 ${SCANDIR}/service/s6-svscan-log/fifo # now the catch all logger runs fdclose 0 I'm not sure what you're trying to do here. The catch-all logger should be automatically

Re: Some suggestions on old-fashioned usage with s6 2.10.x

2021-01-29 Thread Laurent Bercot
But even `s6-reboot' from older s6-linux-init, or `busybox reboot' with slew can already do that... Yes. And as your sharp mind undoubtedly noticed, those commands are not the same as "reboot". Which means burden on users. Yes, I also thought it was a small burden at first, but it's not.

Re: Some suggestions on old-fashioned usage with s6 2.10.x

2021-01-29 Thread Laurent Bercot
Currently I do not understand the `s6-linux-init-shutdown(d)' way well, so the old-fashioned way is retained at least for now, given its simplicity in implementation and seemingly better flexibility. Frankly it is my intuition that the new way costs more than the old way, but does not provide

Re: Some suggestions on old-fashioned usage with s6 2.10.x

2021-01-29 Thread Laurent Bercot
Actually I do visit the CGit web interface fairly often Oh, my bad, the links in the skaware documents actually point to https://git.skarnet.org/something. Fair enough then, I have made git.skarnet.org an explicit alias to skarnet.org. Perhaps I need to batch change all

Re: Some suggestions on old-fashioned usage with s6 2.10.x

2021-01-28 Thread Laurent Bercot
BTW, seems to be returning empty HTTP replies now; both and work as expected though. That is a side effect of a recent s6-networking addition, where s6-tlsd passes the SNI server name to the application via an

Re: Some suggestions on old-fashioned usage with s6 2.10.x

2021-01-28 Thread Laurent Bercot
I did not actively follow the recent evolution of s6, and have just been bitten badly by s6 2.10.x on my Alpine servers (where slew [1] is used of course) when it comes along with other updates. Sorry. This bears repeating: major version upgrades may break things. Compatibility is a good

[announce] skalibs-2.10.0.1, execline-2.7.0.1, s6-2.10.0.1

2021-01-25 Thread Laurent Bercot
Hello, New skarnet.org packages are available: skalibs-2.10.0.1 execline-2.7.0.1 s6-2.10.0.1 Those are bugfix releases. I normally don't announce bugfix releases, but the bugs that have been fixed here are pretty visible (sorry about that!), so all users are encouraged to upgrade

Re: s6-man-pages updated to 2.10.0.0

2021-01-22 Thread Laurent Bercot
Very nice. Not to nitpick though, the standard way of handling out-of-version versioning is with an underscore, not an additional dot. So your releases would be v2.10.0.0_1 (and so on). The additional dot was on my suggestion, to avoid conflicting with distros wanting to package s6-man-pages.

Re: The multisubstitute commands in the run script generated by s6-usertree-maker are in a wrong order

2021-01-22 Thread Laurent Bercot
As shown above, the multisubstitute command that contains XDG_RUNTIME_DIR is put after the one that contains USER, HOME, UID, GID, and GIDLIST. If for example XDG_RUNTIME_DIR=/run/user/$UID, the $UID here will not be substituted with the user's UID since by the time $UID is substituted,

[announce] skarnet.org New Year 2021 release

2021-01-10 Thread Laurent Bercot
Hello, Happy New Year to everyone! New versions of the skarnet.org packages are available. This is a major release. The skalibs major version number has been bumped, which means that compatibility with previous versions is not ensured. Other packages have been updated to build against the

Re: Answers to some GitHub questions

2021-01-09 Thread Laurent Bercot
Is there a migration guide from runit to s6? I added a very basic list of things to do as a FAQ in https://skarnet.org/software/s6-linux-init/quickstart.html Please comment if there are things that need change or clarification. (The prose is bad, I know; please stick to content

Re: Why are there 3 programs in s6 that do the same thing?

2020-12-29 Thread Laurent Bercot
s6 has three programs to set UID / GID of a process: s6-setuidgid, s6-applyuidgid and s6-envuidgid. All three of those seem to do the same thing, with some *slight* differences. Why are all three included in s6? Those three programs don't do the same thing at all. They do *related* things;

Answers to some GitHub questions

2020-12-25 Thread Laurent Bercot
Hi, Someone on GitHub asked a series of questions about s6. I decided to answer them here, in order to have the post in the ML archives and a place (outside of GitHub) to refer people to if similar questions arise in the future. * Benefits of s6 over runit? s6 has multiple benefits over

Re: How to recover from s6-rc broken pipe?

2020-12-16 Thread Laurent Bercot
sudo rsync -avr --delete compiled/ /etc/s6-rc/compiled/ sudo s6-rc-update /etc/s6-rc/compiled/ There's your problem. You're overwriting the live database; that will throw a wrench into everything. s6-rc-update needs to run while the live database is still the old one. Only after

Re: How to recover from s6-rc broken pipe?

2020-12-16 Thread Laurent Bercot
I'm using s6-rc to manage services and have been changing databases. For some unknown reason sometimes the update fails with the error: s6-rc-update: fatal: unable to read /run/s6-rc/state: Broken pipe That should definitely not happen. Have your databases been built with the same

Re: service creation in s6

2020-12-16 Thread Laurent Bercot
Is there a way of setting capability binding in S6? like "CapabilityBoundingSet=CAP_NET_ADMIN" https://www.man7.org/linux/man-pages/man8/setcap.8.html -- Laurent

Re: s6-supervise: use of nosetsid

2020-12-03 Thread Laurent Bercot
It seems I missed the addition of s6-svscan's -X option; I saw it one day in the output of 'ps' on a VM that was using s6-linux-init, didn't recognize it, but then forgot to look up what it did :P But I would have to 'tag' messages in some way, so that the catch-all logger recognizes them and

Re: s6-supervise: use of nosetsid

2020-12-03 Thread Laurent Bercot
I remember occasionally using 'nosetsid' files for the convenience of being able to redirect the output of 'run' and 'finish' to /dev/tty (the controlling terminal of the shell I used to run s6-svscan) so that I could see certain messages during tests in which s6-svscan had its stdout & stderr

Re: s6-supervise: use of nosetsid

2020-12-03 Thread Laurent Bercot
dcron crashes without it, which is why [1] exists. The log says `setpgid: Operation not permitted'. I have not investigated further. The problem happens here: https://github.com/dubiousjim/dcron/blob/master/main.c#L272 dcron assumes that it's not a session leader when run in the

s6-supervise: use of nosetsid

2020-12-03 Thread Laurent Bercot
Hello, The next version of s6 will be a major bump, with a few long-awaited QoL changes - mainly a thorough cleanup of how s6-svscan handles signals and the various commands sent by s6-svscanctl, but also some goodies that you should like. :) One issue that has been often reported by users

Re: Expected behaviour zombie processes

2020-12-01 Thread Laurent Bercot
Hi everybody I've observed the following situation: root 490 0.0 0.0 13004 1596 ?SNov05 0:00 s6-supervise lxe root 2738 0.6 0.0 0 0 ?Zsl Nov05 251:13 [lxe] So you see a zombie process. What is the expected behaviour of s6-supervise

Re: How can I make the stdin of a longrun process available to other processes by writing to a file?

2020-11-20 Thread Laurent Bercot
- Using a named pipe and have `skabus-dyntee` read from it (and it dies as soon as the writer program ends). Yes, that's normal. If you want to avoid this, you need to keep the named pipe open, and that can be done via having another process opening the named pipe for writing, and not dying.

Re: s6-rc: timeout questions

2020-11-18 Thread Laurent Bercot
Could you elaborate a little more about the state transition failures of oneshots caused by timeouts? Let's say for example the oneshot's up script times out, so the transition fails. From s6-rc's point of view the oneshot is still down. What actually happens to the process running the up

Re: s6-permafailon not acting as expected

2020-11-18 Thread Laurent Bercot
Sounds good. So what kind of interface changes should we expect? I mean will they require updating the service definitions, run/finish scripts, that sort of thing? (Sorry, I missed it indeed.) Nothing that drastic; service definitions will not change. They are the core of s6, and such a

Re: s6-rc: timeout questions

2020-11-17 Thread Laurent Bercot
- Am I correct in thinking that if a service has properly configured timeout-kill and timeout-finish, timeout-down becomes unnecessary and even undesirable as it can leave services in an undefined state limbo? I know the documentation pretty much says so, but I'm still a bit confused by the

Re: s6-permafailon not acting as expected

2020-11-17 Thread Laurent Bercot
Back to s6-permafailon.c: the sigset_t sigs is not initialized either... Looks like it needs a call to sigemptyset(). Gah! -_- Fixed. Thanks. -- Laurent

Re: s6-permafailon not acting as expected

2020-11-16 Thread Laurent Bercot
The service did die with exit code 0, but s6-permafail is wrong, since exit code 0 is not specified in the filter. Looking at the source code in s6-permafailon.c, it seems to me that the codes[32] bitarray is not initialized with zeroes before calling bitarray_set(n). You're probably right

Re: Missing "$@" at the end of the s6-linux-init invocation in basedir/bin/init script

2020-11-10 Thread Laurent Bercot
So, is that "$@" supposed to be there or not? It absolutely is! You found a bug. Thanks for the report! Now fixed in release 1.0.5.1, which I cut immediately because it is pretty critical. -- Laurent

Re: Handling environment in s6

2020-11-10 Thread Laurent Bercot
Is there anything in s6 equivalent to below of systemd? /bin/systemctl set-environment SERVICEFILE=$SERVICEFILE There is not. The process supervisor itself (s6-supervise) and the service scanner (s6-svscan) do not use the environment. Services can define their own environment in their run

Re: s6 in production on Ubuntu - yeah!

2020-11-04 Thread Laurent Bercot
we're proud to announce, that we have s6 in production in context of platform as a service for our customers. That's awesome! Glad it's working, and thanks for your return! Thanks Laurent for supporting us to develop the integration of s6 in ubuntu 16 and 20. We can definitly recommend to

Re: socket based service bringup

2020-11-03 Thread Laurent Bercot
Is it s6-ipcserver which can be used to make an s6 socket based service equivalent .socket service in systemd? For unix-domain sockets, yes, it is. For inet-domain sockets, the equivalent is s6-tcpserver, available in the s6-networking package. -- Laurent

Re: writing s6 services

2020-10-28 Thread Laurent Bercot
1) Is there a possibility to add an ENV variable dynamically? I have a shell script which fills out some variables like IPADDRESS, SERVER etc .. which I need to use in starting a process later as part of starting a service/stopping a service. You can do whatever you want in a run script, as

Re: Can you use s6-rc with the sysvinit PID1?

2020-10-23 Thread Laurent Bercot
If I use sysvinit's PID1, is it possible for me to use s6-rc by declaring an s6-rc program in /etc/inittab? Yes. You have to tell /etc/inittab to launch a s6 supervision tree first, then s6-rc-init, then s6-rc -u change top (if "top" is the bundle containing all the services you need), as

Re: External health Check Process

2020-10-23 Thread Laurent Bercot
I just miss the elegance of the solution: I personally want to model one service with one s6 service. For me it would mean thinking about a wrapper around s6 to get that. Maybe I get now the slew thing. The thing is, s6 is a *process supervision* suite, so one s6 "service" is really one

Re: External health Check Process

2020-10-22 Thread Laurent Bercot
I know you can model a service in s6, which watches another service and kills it, so in fact the problem is solved outside of s6. But I wanted to ask to develop a feature to get a simple way to model that within s6. Usually it's good enough to call a external command with a timeout and watches

Re: Dependencies in S6

2020-10-21 Thread Laurent Bercot
Hi Amaresh, As long as service B depends on service A, A and B will never start in parallel; B will always start when A is ready. "A is ready" means: - if A is a oneshot: when the script has completed - if A is a longrun: * if there is a notification-fd file in the service

Re: Module-load binary for S6

2020-10-09 Thread Laurent Bercot
Is the module-load binary is available for S6 to load all the kernel module ? Is there any support for volatile binds in S6 ( S6 tool for volatile bind ) Hi Amaresh, Those are operations that are totally irrelevant to s6; you should use the tools that your distribution provides you. To

Re: s6 v2.9.2.0 compiles only disabling execline

2020-10-08 Thread Laurent Bercot
Which advantages does this design bring to the table? - Header files are execline/*.h, it's logical to put static library files in execline/*.a - /lib and /usr/lib are places where the dynamic linker looks for shared libraries. Despite sharing the name "library", static and shared libraries

Re: s6 v2.9.2.0 compiles only disabling execline

2020-10-07 Thread Laurent Bercot
I'm building s6 from source on latest git tags and it seems to fail because it cannot link execline: ./configure --disable-execline; make # works ./configure; make # fails with message exec gcc -o s6-ftrig-listen -pipe -Wall -std=c99 -fno-exceptions -fno-unwind-tables

Re: s6-rc : Anomalies or normal behaviour

2020-10-06 Thread Laurent Bercot
Glad it's working for you! A significant reduction in complexity. However, and the reason for my delay in replying. Magic happened! I was now transmitting data which crossed jail barriers (from b3 "named" to b2 "named logging"). I needed to consult with one of the FreeBSD developers to

Re: Network-online.target

2020-10-05 Thread Laurent Bercot
How to port network-online.target of systemd to S6 ? Some of the services requires network-online.target to be executed Hi Amaresh, It's basically impossible to answer this question without understanding the bigger picture. What are you trying to do? systemd relies on the existence of a

[announce] skarnet.org October 2020 release

2020-10-04 Thread Laurent Bercot
Hello, New versions of some of the skarnet.org packages are available. This is mostly a bugfix release: bugs have been fixed in every released package. A .0 release number means that the minor has been bumped because there are also new features, in which case details are provided below.

Re: s6-rc : Anomalies or normal behaviour

2020-10-03 Thread Laurent Bercot
Apologies, my earlier email, item 2, pointed to emptyenv as the cause of zombie processes on FreeBSD 12.2S, actually it is due to background. Ah, then everything is working as intended and there's no anomaly. background spawns a process as a direct child, so if the parent execs into a

Re: s6-rc : Anomalies or normal behaviour

2020-10-03 Thread Laurent Bercot
1. I expected to see the date in seconds since time epoch, but result is variable name # execlineb -Pc 'backtick D { date "+%s" } echo $D' $D Normal behaviour, since there's no shell to interpret $D as the contents of variable D. Try using "importas D D" before the echo: it will read the value

Re: Disable autostart of service

2020-10-01 Thread Laurent Bercot
How to disable the autostart of service during boot up in S6. touch ./down https://skarnet.org/software/s6/servicedir.html -- Laurent

Re: Understanding the syslogd-linux Service Script

2020-09-12 Thread Laurent Bercot
My particular environment uses glibc, so the old version of the example seems to work well. I omit the syslog service's log directory and the log lines appear on my container's stdout, which was my goal. If your goal is to have syslog messages appear on your container's stdout, then you should

Re: Understanding the syslogd-linux Service Script

2020-09-12 Thread Laurent Bercot
The s6-ipcserverd docs specifically state that it expects a bound and listening SOCK_STREAM socket, and this led me to the `ipc_accept()` call that the program makes. Out of curiosity, is there another s6-family program that handles SOCK_DGRAM sockets? Otherwise, I'll look in to socklog as

Re: s6-man-pages update

2020-09-09 Thread Laurent Bercot
Fair enough. :-) My thought is, to help distros with packaging, i can add tags to the s6-man-pages repo to match the corresponding s6 version on which they were based. So at the completion of this current process, i could add a 2.9.2.0 tag (assuming that the current docs on skarnet.org are

Re: s6-man-pages update

2020-09-09 Thread Laurent Bercot
Do you think it would make sense to include the man pages in tarball releases of s6 software? It would help with packaging efforts across distros, I think. Only downside would be that, since you dislike the mdoc format, any changes to the man pages would have to be coordinated and finished by

Re: s6-man-pages update

2020-09-09 Thread Laurent Bercot
i've now completed the linting pass for the s6 man pages. The few remaining lint issues are either commented in the sources, or aren't actually an issue in this context. As per Laurent's request, i've also added a Makefile to facilitate installation; details in the repo README:

Re: Understanding the syslogd-linux Service Script

2020-09-09 Thread Laurent Bercot
One thing that I forgot to mention here is that depending on the age of the libc this might not work properly as written. Newer libc's use datagram connections for syslog and because of that you need to hand-write the entire s6-ipcserver chain (since the s6-ipcserver entrypoint doesn't currently

Re: Update early logger logging path after remounting root as rw

2020-09-05 Thread Laurent Bercot
I'm configuring my linux to use s6-rc. It works fairly well so far. One thing I want to improve though, is that the early logger logs to /run/uncaught-logs. It's nice to have a log file during early boot and it helped my debugging easier. But it would be cool to able to change the location to

Re: possible s6-rc redesign

2020-09-02 Thread Laurent Bercot
1. In order to provide the -sane- functionality of systemd, a system needs to use linux-only interfaces. I am absolutely not saying that cgroups, namespaces etc should be tightly integrated to a service manager/init system. Most of the work can be done on dedicated programs but they are needed if

Re: possible s6-rc redesign

2020-09-01 Thread Laurent Bercot
1. There is one **huge** disadvantage for the second option. It is not a technical one, so it may carry little weight on your final decision. There already different implementations of init systems based on s6/s6-rc, some of them successfully used on distributions. They will almost certainly have

Re: [request for review] Port of s6 documentation to mdoc(7)

2020-09-01 Thread Laurent Bercot
* We negotiate a HTML schema your documentation can be written in, which is based on current documentation; existing HTML documentation will be converted to the schema, with minimised changes. (The structuredness of HTML helps; now you also see why knowing some Lisp is beneficial :)

possible s6-rc redesign (was: [request for review] Port of s6 documentation to mdoc(7))

2020-09-01 Thread Laurent Bercot
I have only seen one new feature committed to the Git repository so far. Is it too early to ask what are you planning to change? The new feature is orthogonal - or, rather, it will be used if I end up *not* redesigning s6-rc. The trend with distributions is to make service managers reactive

Re: [request for review] Port of s6 documentation to mdoc(7)

2020-08-31 Thread Laurent Bercot
For the people who are not on #s6 and have missed the countless resurgences of this discussion, here is my position regarding documentation formats. I hope that by the end of this mail things are quite clear for everyone and I won't need to talk about this again, ever. - Doc formats seem

Re: [request for review] Port of s6 documentation to mdoc(7)

2020-08-31 Thread Laurent Bercot
Of course, you'd also have to convert the existing HTML documentation into DocBook and then generate the mdoc and HTML from that. I would understand concern over adding a dependency on a potentially heavy DocBook toolchain in order to generate the HTML. One possible way around this, though,

Re: [request for review] Port of s6 documentation to mdoc(7)

2020-08-31 Thread Laurent Bercot
Certainly. i'll do that once i've completed a linting pass. Excellent. Sure, i'd be happy to reflect any changes. And the people rejoiced and celebrated, because they would soon, finally, have s6 man pages. Ah, okay - thanks for the heads-up. Also a heads-up for people who are

Re: [request for review] Port of s6 documentation to mdoc(7)

2020-08-30 Thread Laurent Bercot
i've spent the last couple of weeks porting the s6 documentation to mdoc(7) format: https://github.com/flexibeast/s6-man-pages Excellent, thank you. There is a lot of talk (especially on the #s6 IRC channel, but occasionally on the mailing-list too) about people wanting to have s6 man pages,

  1   2   3   4   5   >