Re: Subdirectories as service dependencies

2020-08-03 Thread Laurent Bercot
The log directory is currently treated as a special case, but what if it didn't need to be? The only reason for specialcasing the log directory is that s6-svscan will maintain a pipe between the service's stdout and the logger's stdin. It's a feature directly inherited from daemontools'

Re: service wait for prereqs

2020-07-15 Thread Laurent Bercot
Is there a way to wait starting a service until a device is ready for being used? That's a service-specific and nonportable thing, so, there's no generic solution. However, if for a given service you have a way to wait until the device appears, then it's easy. Pure s6 solution: put the

Re: packaging for skalibs-2.9.2.1.tar.gz

2020-06-22 Thread Laurent Bercot
the package is missing a few bits, as in mostly everything not a directory at top level! Not sure where you're getting the package from. The tarball on skarnet.org has everything in it. https://skarnet.org/software/skalibs/skalibs-2.9.2.1.tar.gz -- Laurent

[announce] s6-2.9.2.0

2020-06-16 Thread Laurent Bercot
Hello, s6-2.9.2.0 is out. This release is happening a lot earlier than I intended, but I made a mistake: I released s6-linux-init-1.0.4.1 (a bugfix version) and it depends on the new feature of s6-2.9.2.0. So, in order to keep the latest versions in sync, I have to release s6-2.9.2.0 now.

Re: [PATCH] s6-unquote*: it's memchr(str, char, len), not memchr(str, len, char)

2020-06-13 Thread Laurent Bercot
-if (!memchr(delim, delimlen, *s)) +if (!memchr(delim, *s, delimlen)) Ouch. I blame djb's byte_chr(), which has arguments 2 and 3 inverted, for that one. :) Applied, thanks! -- Laurent

[announce] execline-2.6.1.0

2020-06-09 Thread Laurent Bercot
Hello, execline-2.6.1.0 is out. This version features a more expressive format for the envfile binary. Most of the files that are suitable for a systemd EnvironmentFile= directive are now parsable with envfile: double quotes are supported, backslashed newlines are supported, a few C escape

Re: s6-tlsserver versus $TCPLOCALPORT

2020-05-06 Thread Laurent Bercot
Done, please try with "s6-tlsserver -e" in the latest s6-networking git head. If you need an official release, I'll plan one for this month. -- Laurent

Re: s6-tlsserver versus $TCPLOCALPORT

2020-05-06 Thread Laurent Bercot
Correction, s6-tlsserver *already* accepts s6-tlsserver options. I remember keeping s6-tcpserver-access out of it at first, but apparently I realized the problem and added support early on. However, s6-tcpserver-access only gets invoked if you use an option that explicitly requires it; by

Re: s6-tlsserver versus $TCPLOCALPORT

2020-05-06 Thread Laurent Bercot
Hi. I ran into a problem while porting a service from William Baxter's ucspi-ssl to s6-tlsserver: $TCPLOCALPORT wasn't being set. I see that you've designed s6-tcpserver-access to handle setting that variable, but it doesn't work when run under s6-tlsserver, where it gets a pipe instead of the

Re: fd_close() conceals errors

2020-04-27 Thread Laurent Bercot
I think that depends on the situation. In many cases, you're right, there is nothing the program can do about the failure. But in a program with user interaction, for example, it may make sense to prompt the user to retry or ignore the failure. Abort, Ignore, Retry? Remember that dreaded

Re: fd_close() conceals errors

2020-04-27 Thread Laurent Bercot
Ignoring errors on close isn't good enough for reliably composable programs. close() generating errors isn't good enough for reliably composable programs. Yes, it's a problem. Fixing it isn't my job. It's the job of the person who implements close(). I agreee that POSIX semantics for

Re: fd_close() conceals errors

2020-04-27 Thread Laurent Bercot
Hi Laurent. It's been a while. :) Long time no see. :) We'd love to have you on #s6, if you can! I'm updating my packages to catch up with skalibs, gcc warnings, etc., and fd_close() returning void is one of the changes that hit me. Looking over past discussions, I agree that POSIX is a

[announce] skalibs-2.9.2.1

2020-04-06 Thread Laurent Bercot
Hello, skalibs-2.9.2.1 is out. I don't typically announce just-bugfix releases, but this one is important. It fixes a potentially crash-inducing and show-stopping bug on non-Linux. (I would have caught it during build tests if I had seen the compiler warnings, but trying to tailor

Re: Emacs Daemon as Service

2020-03-25 Thread Laurent Bercot
#!/usr/bin/execlineb -P s6-setuidgid uros emacs --fg-daemon --user uros ``` Though the server starts it cannot connect to the X display. I assume there's an explicit way to handle this in s6. Here emacs is launched by your supervision tree, not your user environment, so it doesn't have access

Re: *** No rule to make target '-lexecline', needed by 's6-ftrig-listen'

2020-03-24 Thread Laurent Bercot
Good catch, thanks for the report. Your fix isn't ideal though: the correct way is to replace LIBEXECLINE with EXECLINE_LIB in configure and deps-exe/*, and run gen-deps.sh again. (LIBFOOBAR is for in-package libraries, and EXECLINE_LIB for external ones; gen-deps.sh handles the difference

Re: Fail to build s6 on GNU/Hurd

2020-03-21 Thread Laurent Bercot
For s6 latest release 2.9.1.0, I fail to build it on GNU/Hurd. Hi Shengjing, Thanks for the report! It's a bug indeed - and a pretty tricky one. In order to work around POSIX violations by some systems, skalibs provides certain headers that need to be included *before* system headers, and

Re: Question About the Purpose of s6-rc

2020-03-20 Thread Laurent Bercot
Under the hood, s6-svc -w? forks s6-svwait -?, which itself forks s6-ftrigrd to monitor the event/ directory. As such, using s6-svc -w? without a command is equivalent (though slightly slower) than using s6-svwait directly. Nitpick: (using s6-svc -uwU as an example; -u to tell s6-supervise to

Re: s6-linux-init-runleveld

2020-03-14 Thread Laurent Bercot
Currently, the s6-linux-init-runleveld service is an s6-sudod process invoked with options -0, -1 and -2. Therefore, if the scripts/runlevel script prints messages to its standard output, they are lost, because it is redirected to /dev/null. So it can't do that. And messages printed to its

[announce] skarnet.org March 2020 release

2020-03-02 Thread Laurent Bercot
Hello, New versions of all the skarnet.org packages are available. This is mostly a bugfix release (there was an installation bug in some circumstances with shared libraries) but some packages, notably execline and s6, have new, useful features. The new versions are the following:

Re: s6-tlsd immediately sending EOF during TLS handshake

2020-02-14 Thread Laurent Bercot
Do you think that the handshake completes? I'm not sure that execution is even reaching the stls_run() call; the segfault could have happened during the tls_handshake() call in stls_s6tlsd() (i.e. while executing LibreSSL code), and the tls_handshake() call in stls_s6tlsc() would report a failed

Re: s6-tlsd immediately sending EOF during TLS handshake

2020-02-13 Thread Laurent Bercot
I am unable to reproduce the problem on x86_64 with LibreSSL 3.0.2 and the latest git heads of the skarnet.org software stack. I haven't tried with the latest stable releases (the next ones are due soon). Could you please try with the latest gits and see if you still experience the crash?

Re: s6-tlsd immediately sending EOF during TLS handshake

2020-02-13 Thread Laurent Bercot
So I guess that means there is either a bug in LibreSSL (oh no), or in s6-networking's LibreSSL code? Probably the latter; given your trace, it seems to be the tunnel code not handling it correctly when it receives a EOF just after the handshake. I don't have time to debug it right now, but

Re: Can s6-tlsd use openssl, rather than libressl?

2020-02-11 Thread Laurent Bercot
Thanks to Ilaia's email, I looked into using s6-tlsd, but I'm a bit confused about what libraries are needed, and hopefully not libressl? s6-networking can be built against either bearssl or libressl; it's a choice you make at configure time. LibreSSL was chosen, you guessed it, because of

Re: s6-tlsd immediately sending EOF during TLS handshake

2020-02-11 Thread Laurent Bercot
s6-tcpserver4d: info: end pid 29407 ip [redacted] signal 11 "signal 11" is a segfault, so you may have found a bug in s6-tlsd, but I haven't managed to reproduce it. Did you build s6-networking against bearssl or libressl, and which version are you using? Can you please do a "strace -vf -s

Re: unexport and importas -u bug?

2020-02-10 Thread Laurent Bercot
I'm using execline on alpine edge (synced today), i noticed that `unexport` and `importas -u` don't remove the variable from the environment. Thanks for the report! I confirm that it's a bug - not in execline, but in skalibs. It is now fixed in the skalibs git head. A new release should happen

Re: Using s6 and s6-rc tools with an unprivileged user

2020-02-02 Thread Laurent Bercot
These are good questions, and I haven't thought about all of them thoroughly enough. * s6-rc-db: Changing the group of the 'lock' file in a compiled dababase and making it group writable allows the group's members to use the command. s6-rc-db cannot change the database or the service

Re: State of skarnet.org projects

2020-02-02 Thread Laurent Bercot
Do you mean they don't like editing files and creating symlinks? Do they want a GUI interface to the service directory tree and the symlink tree? No, it's about service startup with s6-rc. They don't want to dive into the unpalatable blobs that are the set of systemd unit files or the set of

Re: Project funding: was State of skarnet.org projects

2020-02-02 Thread Laurent Bercot
Finding long term sponsors is a kind of sales I'm not experienced in, but I can probably get people to contribute on a one-time or intermittent basis. Do you have a contributions page that takes Paypal? I don't, for the reasons explained here:

State of skarnet.org projects

2020-02-02 Thread Laurent Bercot
Hello, A small update on my current projects. - Most important skarnet.org packages are due a new release. If only to fix a bug that prevents them from properly installing shared libraries in some cases. - The release hasn't been cut yet because things are still evolving and I don't

Re: s6-svscan can't find shared libraries

2019-12-03 Thread Laurent Bercot
/opt/local/bin/s6-svscan: error while loading shared libraries: libs6.so.2.9: cannot open shared object file: No such file or directory Is this because the '-rpath' linker option is not used at compile time to add the library directory to the runtime library search path? You could say that -

Re: Compiling execline shared fails without --with-lib configure opt

2019-12-02 Thread Laurent Bercot
Since I'm not using static libraries, I would not expect to need the "--with-lib" configure option. The --disable-static flag only tells the build system not to build the static execline library. By default, executables are still built against the static version of skalibs. If you want to

Re: Two skalibs compiler warnings on RHEL 7

2019-12-02 Thread Laurent Bercot
src/libunixonacid/textclient_server_init_fromsocket.c:56:3: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] *(int *)CMSG_DATA(c) = fd[1] ; ^ Yeah, some compilers actually print that warning. It's annoying, because this is the official

Re: s6-linux-init: rc.shutdown's and rc.shutdown.final's messages

2019-11-28 Thread Laurent Bercot
Alternatively, one could use the catch-all logger variant that echoes logged messages to /dev/console (created by s6-linux-init-maker's '-1' option), or perform redirections directly in rc.shutdown and rc.shutdown.final. The first alternative, however, affects logging for all processes. If the

Re: False positive in skalibs system feature test

2019-10-25 Thread Laurent Bercot
Not familiar with autoconf, but I found the following snippet in autoconf code. https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/c.m4?h=v2.69#n179 ``` #if defined __stub_$1 || defined __stub___$1 choke me #endif ``` I checked on GNU Hurd, __stub_getrandom is defined. Good

Re: False positive in skalibs system feature test

2019-10-24 Thread Laurent Bercot
Excellent analysis, as always. :) Thank you. * If GNU libc is used, a 'choose cl' test is unreliable. * GNU/Hurd and GNU/k*BSD would be 'getrandom: no' OSes, at least until the libc is updated to make a system call on GNU/kFreeBSD [1] * A 'choose clr' test would be reliable. * Any other

Re: False positive in skalibs system feature test

2019-10-23 Thread Laurent Bercot
While building skalibs-2.9.1.0, I notice that the getrandom option isn't available on FreeBSD 12.1 Stable. What I have from ./configure --help is: "... Sysdeps autodetection override: --with-sysdep-K=V assume sysdep K has the value V [autodetected] List of mandatory K for

Re: False positive in skalibs system feature test

2019-10-23 Thread Laurent Bercot
Overridable for the win ;) Are we giving advice again without checking first, hmmm? ./configure --with-sysdep-getrandom=no <-- Try it. :P My point is that ld *should* be a reliable way to autodetect those things, and I want to make sure it works too. -- Laurent

Re: False positive in skalibs system feature test

2019-10-23 Thread Laurent Bercot
/usr/bin/ld: src/librandom/random_string.lo: in function `random_string': ./src/librandom/random_string.c:26: warning: getrandom is not implemented and will always fail And this, ladies and gentlemen, is why 'choose clr' is more reliable than 'choose cl'. Unfortunately, the former isn't

[announce] October 2019 release: spooky bug squashing and ghosts of POSIX

2019-10-21 Thread Laurent Bercot
Hello, New versions of all the skarnet.org packages are available. This is mostly a bugfix release, as shown by the *.1 version numbers. It just squashes a couple build bugs that prevented proper cross-compilation. If you are not cross-compiling skarnet.org packages, you can mostly ignore

Re: [PATCH execline] Fix CC variable in cross compile environment

2019-10-21 Thread Laurent Bercot
Since a new release is coming soon, is there any chance to apply another cross compile patch[1]? Applied, thanks for the reminder. New versions pushed, release announcement coming soon. -- Laurent

Re: [PATCH execline] Fix CC variable in cross compile environment

2019-10-21 Thread Laurent Bercot
Confirmed; I must have been confused when testing earlier. Fix pushed, thanks Shengjing. Bugfix releases coming soon. -- Laurent

Re: [PATCH execline] Fix CC variable in cross compile environment

2019-10-20 Thread Laurent Bercot
Makefile uses CC instead of $(CROSS_COMPILE)$(CC), So CC shouldn't strip cross prefix when configure. That sounds right, but ISTR testing it when I made the change and it worked when cross-compiling. There must have been something else going on; I will test tomorrow and possibly apply.

Re: Porting skalibs to GNU Hurd

2019-10-18 Thread Laurent Bercot
So, whoever calls s6_supervise_lock_mode() should correctly die, as there is an actual error (that should be reported to the Hurd developers); libs6, libskarnet and the libc are just the messengers. Commenting out the errno check just sweeps the error under the carpet. I assumed the OS was

Re: skarnet software license files

2019-10-17 Thread Laurent Bercot
AFAIU skarnet software released under ISC License should include a license file in it's release tar files as ISC License expects to have a year and an owner mentioned in the license, isn't it? There is one. It's conventionally called COPYING. -- Laurent

Re: Porting skalibs to GNU Hurd

2019-10-17 Thread Laurent Bercot
A reasonable detection in configure stage is definitively to prefer. Not necessarily. It would work, obviously, but would bloat the build. Compile-time generated headers are kinda painful to manage, and I'd like to keep their number in check. Also, using configure detection would make

Re: Porting skalibs to GNU Hurd

2019-10-17 Thread Laurent Bercot
__gnu_hurd__ That's perfect. I replaced __GLIBC__ with this. So skalibs/nonposix.h will define _GNU_SOURCE on Linux and Hurd, i.e. the systems whose function visibility benefits the most from it. Testing kernel ftms is generally ugly, but it's the right thing for nonposix.h whose goal is

Re: Porting skalibs to GNU Hurd

2019-10-17 Thread Laurent Bercot
The errno I got on Hurd is `EIEIO 1073741928 Computer bought the farm`... Seems a Hurd specific errno... That is really non-conformant, and deserves to be reported to the Hurd team. What is happening is that "control" is a named pipe, and the attempted operation is open(control, O_WRONLY |

Re: Porting skalibs to GNU Hurd

2019-10-17 Thread Laurent Bercot
If compiler predefined macros like __linux__ or __NetBSD__ are OK for , how about #if defined(__linux__) || defined(__GNU__)? GCC predefines both __GNU__ and __gnu_hurd__ (I think, can be checked with 'cpp -dM - Do you mean __GNUC__ instead of __GNU__ ? Testing defined(__GNUC__) would yield

Re: Porting skalibs to GNU Hurd

2019-10-16 Thread Laurent Bercot
Hi Shengjing, With using `CPPFLAGS += -D_GNU_SOURCE -DPATH_MAX=4096`, skalibs builds on Hurd, execline works fine. (Though I failed to run s6.) What problems did you get with s6? It should be able to run without trouble. To me that's a more important issue than the ones you listed below.

Re: Fwd: Warning from skaware@list.skarnet.org

2019-09-25 Thread Laurent Bercot
Has anyone else gotten such a warning from the listserv? Can't do much about it, sorry. ezmlm comes from a time when e-mail was simpler and less broken (or, at least, broken in different ways from today). Your server is rejecting some mails for reasons unknown. Likely a misconfiguration. Or it

[announce] skarnet.org September 2019 release

2019-09-22 Thread Laurent Bercot
Hello, New versions of all the skarnet.org packages are available. (This only concerns software that already has a numbered release. Packages that are git-only because they are not complete enough to warrant an initial release yet, such as bcnm, have been updated in git, but are not mentioned

Re: cross-compile skalibs

2019-09-20 Thread Laurent Bercot
What I *can* do, though, is change the skalibs build system so that on cross-compilation, you only need to provide the few sysdeps that cannot be probed at all. I spent today on this, and managed to bring down the necessary amount of manually provided sysdeps to one (1). The skalibs git head

Re: cross-compile skalibs

2019-09-20 Thread Laurent Bercot
It's a difference whether you have to run the entire configure stage for a new target on the target first or know maybe platform, cpu, library or kernel issues before and can "cache" these ;) You mean... like adding specific -l flags and a list of kernel issues to a database you then read

Re: cross-compile skalibs

2019-09-17 Thread Laurent Bercot
On 9/14/2019 2:11 PM, Jens Rehsack wrote: I don't have such a database and such a database is imposible to have. That's a real shame, because it's the *only way* cross-compilation can ever work. You praise autotools for supporting ac_cv_$check variables, that can be supported from the

Re: close safe wrapper may be broken

2019-09-17 Thread Laurent Bercot
On 9/17/2019 7:37 PM, eadwar...@disroot.org wrote: Posix says about close(2): "If close() is interrupted by a signal that is to be caught, it shall return -1 with errno set to [EINTR] and the state of fildes is unspecified." Tell me about it... The fact that close() can be

Re: s6-log timestamp bug after resuming; Plan 9 $path and /package

2019-09-01 Thread Laurent Bercot
Thanks Guillermo. I should have thought about this. So Linux is doing the right thing (fixing CLOCK_REALTIME on resume), and the problem only appears with CLOCK_MONOTONIC. It is indeed one of the drawbacks of using --enable-monotonic when you need a wall clock. And it is a skalibs problem that

Re: s6-log timestamp bug after resuming; Plan 9 $path and /package

2019-09-01 Thread Laurent Bercot
Doesn't s6-log (indirectly) use clock_gettime() with a CLOCK_MONOTONIC argument if skalibs was built with --enable-monotonic? Yes, it does. But --enable-monotonic is a bad idea for long-lived processes that need timestamping. I need better clock interfaces in skalibs, the current ones don't

Re: s6-log timestamp bug after resuming; Plan 9 $path and /package

2019-09-01 Thread Laurent Bercot
1. After resuming from suspension or hibernation, s6-log no longer shows the correct timestamp. Can this be fixed? Thanks. This is a much more complicated issue than it sounds. Short answer: no, the system needs to readjust the system clock when resuming from suspension/hibernation; it's

Re: [PATCH skalibs] Make build reproducible

2019-08-19 Thread Laurent Bercot
Applied, thanks. I didn't bother before because a make build is inherently non-deterministic, unless the author manually defines a total order on all the prerequisites of a target. I suspect the implementation of GNU make to implicitly define such an order, but there's nothing of the sort in

Re: Ctrl + Alt + Del setup in s6-linux-init?

2019-08-01 Thread Laurent Bercot
s6-linux-init-maker creates an .s6-svscan/SIGINT script that reboots the computer, and Adélie Linux' packaging of s6-linux-init-1.0.2.0 appears to contain an /etc/sysctl.d/ctrlaltdel.conf file that says "kernel.ctrl-alt-del = 0". So one might think that having the kernel send a SIGINT signal to

Re: s6-linux-init-shutdownd: copy & paste error?

2019-07-18 Thread Laurent Bercot
if (WIFSIGNALED(wstat)) //... else if (WEXITSTATUS(wstat)) //… else if (WEXITSTATUS(wstat)) //… Good catch, thanks! Fixed in the latest git. Bugfix release coming at some point in the future. (I'm not hurrying because it's only a display bug.) -- Laurent

Re: s6-envuidgid: Weird errors with GNU libc's getgrent() and endgrent()

2019-06-09 Thread Laurent Bercot
But it turns out that, with this configuration, __nss_endent() *also* wants to call the implementation of endgrent(3) from each of these services. And the one from libnss_db.so, named _nss_db_endgrent(), is just a wrapper around a munmap(2) system call, via an intermediate internal_endent()

Re: s6-envuidgid: Weird errors with GNU libc's getgrent() and endgrent()

2019-06-03 Thread Laurent Bercot
Adelie (musl-posix) must be getting really close to replacing sysv/openrc with full s6. sysv is done: on Adélie, you can now choose between sysvinit and s6-linux-init as your init system. Both are supported. Providing a packaged alternative to OpenRC, however, will be much more difficult

Re: s6-envuidgid: Weird errors with GNU libc's getgrent() and endgrent()

2019-06-02 Thread Laurent Bercot
Short version: For recent libc releases, and at least on Gentoo, getgrent() and endgrent() seem to magically set errno to EINVAL (I think), except when errno's value is actually meaningful. > (...) End of file or error (errno = Success) errno = Invalid argument POSIX says:

[announce] s6-linux-init-1.0.1.0

2019-05-20 Thread Laurent Bercot
Hello, Following some UX reports in the #s6 IRC channel, a new version of the s6-linux-init package is out. * s6-linux-init-1.0.1.0 - - Binaries have less restrictive permissions. Root-only binaries are now readable (though still not executable) by normal users. -

[announce] s6-linux-init-1.0.0.0

2019-05-14 Thread Laurent Bercot
Hello, A new version of the s6-linux-init-package is out. * s6-linux-init-1.0.0.0 - - It is a complete rewrite, and very different from the 0.4 series. - The s6-halt, s6-poweroff and s6-reboot commands have disappeared. - The s6-linux-init-maker remains; it has

[announce] skalibs-2.8.1.0, s6-2.8.0.1

2019-05-14 Thread Laurent Bercot
Hello, Some minor updates are available. * skalibs-2.8.1.0 --- - Small bugfixes. - A new wrapper, skalibs_regcomp(), has been provided as a portable replacement for regcomp(). Some systems (looking at you again, BSDs) do not accept empty regular expressions and regcomp()

Re: Git cloning all skarnet software by Using Debian Stretch 9 gives error

2019-03-28 Thread Laurent Bercot
fatal: unable to access 'https://git.skarnet.org/cgi-bin/cgit.cgi/skalibs': GnuTLS recv error (-110): The TLS connection was non-properly terminated. Right. Sigh. cgit apparently does not craft a Content-Length header, and the TLS layer over the skarnet.org web server does not use

Re: S6 integration in mainstream linux distributions

2019-03-18 Thread Laurent Bercot
Our view is, that using an non-mainstream distribution is a lot of work for our purpose of being an PaaS provider. That would in the end mean packaging a lot of services on our own. Today the mainstream distribution doesn't package anymore all needed services in the needed versions. In practice

Re: S6 integration in mainstream linux distributions

2019-03-15 Thread Laurent Bercot
The next question was the long-term strategy with systemd: we have 2 approaches 1) mix systemd (PID 1) to use the boot phase (especially one shots) and later (after system initialization) use s6 to manage all services. 2) just use s6 My question to the list is, what do you use today? Do you

Re: skalibs: macOS errors

2019-02-05 Thread Laurent Bercot
Hi all - I just wanted to file a quick report. I tried cloning down the skalibs git repo to my macOS box, which uses the default, case-insensitive filesystem. Since there's both mkltemp.c and mkLtemp.c, I immediately ran into problems with git reporting modifications I hand't made, etc. Ah,

Re: [PATCH] fix null-pointer behavior in fmt and fmtlist functions

2019-02-05 Thread Laurent Bercot
This fixes a segfault when a user calls uint320_fmt(NULL,...), and makes the fmtlist functions return the correct number of characters when called with NULL. Applied, thanks! -- Laurent

[announce] utmps-0.2.0.0

2019-01-06 Thread Laurent Bercot
Hello, utmps-0.0.2.0 is out. It features an important bugfix in utmps-wtmpd, as well as a new feature in utmps-utmpd (members of the utmp group can now write to the utmp file, as opposed to only root). https://skarnet.org/software/utmps/ git://git.skarnet.org/utmps Enjoy, Bug-reports

Re: s6-rc-compile doesn't include 'check' script

2018-12-24 Thread Laurent Bercot
I suppose I could move it to the 'data' directory, but as 's6-notifyoncheck' by default searches for the 'check' script in the service directory itself, that doesn't feel right. https://git.skarnet.org/cgi-bin/cgit.cgi/s6/tree/src/supervision/s6-notifyoncheck.c?h=v2.7.2.2#n130 shows that by

Re: [PATCH] nsss_unix_shadow_get: parse null/empty fields

2018-09-28 Thread Laurent Bercot
nsss_unix_shadow_get experiences a bug where entries with null values aren't returned. This patch instead treats empty fields as a null string or -1. I agree that nsss_unix_shadow_get should be fixed, but I disagree with the patch, because the patched version will also accept entries with

Re: [PATCH] s6-ps: fix compilation on clang

2018-09-27 Thread Laurent Bercot
s6-ps fails to compile under clang due to using a variable length array in a structure. This is gcc-specific behavior. Ah, yes. I didn't catch this one because my only clang test machine is a FreeBSD, which s6-linux-utils obviously doesn't build on. I'll add a linux/clang build somewhere.

Re: s6-cp and s6-mv

2018-09-21 Thread Laurent Bercot
Probably a dumb question, but is there a reason there is no `cp` and no `mv` in `s6-portable-utils`? Because reimplementing a full POSIX utility suite isn't a goal. There are already a lot of those you can choose from (coreutils, busybox, toybox, sbase+ubase, etc.) That said, if you don't

Re: Question about enable-absolute-paths option

2018-09-09 Thread Laurent Bercot
> [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906250#22 That's an incredibly disingenuous argument. Debian isn't POSIX- compliant by any stretch of the imagination, and they currently don't provide POSIX-compliant cd/umask/wait binaries because they have correctly identified that

Re: Question about enable-absolute-paths option

2018-09-04 Thread Laurent Bercot
However the binaries(cd, umask, wait) that cause problem are not dependency of s6. Those binaries are not causing problems. What *is* causing problems is fellow developers who *think* those binaries are problematic, for reasons that all come from ignorance of how Unix (and the shell) works.

Re: On lh-bootstrap and mkroot

2018-09-03 Thread Laurent Bercot
The existence of my toolchains, and Zach's, is relatively independent from the existence of lh-bootstrap and mkroot. As far as I'm concerned, the creation of these toolchains was an exercise in working with musl-cross-make at start - and then some people found them useful, so I built them

Re: Question about enable-absolute-paths option

2018-09-03 Thread Laurent Bercot
Maybe I could just name the package like libexecline(which has binaries as helper programs). Then users will think they can't get an execline pacakge. This would confuse users, because execline is not a library, it's a package with binaries (and that also includes a library for execline helper

Re: Question about enable-absolute-paths option

2018-09-02 Thread Laurent Bercot
But I probably will not install binaries like `if, exec, wait` to default PATH(like /usr/bin). Although I understand this is possible technically(and currently no other programs claim these names). The actual reason is that I can't afford time to argue with other developers. When I ask on

Re: Question about enable-absolute-paths option

2018-09-02 Thread Laurent Bercot
Thanks for this note, I haven't looked at these packages. At first I thought execline binaries will only be called inside execlinep scripts. Could you give some examples that s6 calls these binaries directly except exelinep? In addition to what Casper said: for instance, some of the

Re: Question about enable-absolute-paths option

2018-09-01 Thread Laurent Bercot
I intend to package skarnet softwares in Debian. When packaging execline, I find it produces a lot of binaries with common names. Thus I want to put them in path like /usr/lib/execline/. Do not do this. Several programs, including s6 and s6-rc, rely on execline binaries to be in their PATH.

Re: [announce] skarnet.org Summer 2018 release

2018-08-22 Thread Laurent Bercot
Oh. That's kind of drastic. I re-read the documentation of nsss and utmps, in case I missed it the first time, and still think none of it suggests that this is the intended behaviour. You're right, the documentation should mention that libc header files will be replaced. I'll add something.

[announce] skarnet.org Summer 2018 release

2018-08-14 Thread Laurent Bercot
Hello, New releases of some skarnet.org packages are available, as well as a new package. * skalibs-2.7.0.0 --- This is a major version release of skalibs, so compatibility with previous versions is not guaranteed. Make sure to also upgrade the rest of the skarnet.org

Re: When running from a script execlineb does not use separated args

2018-07-31 Thread Laurent Bercot
#!/bin/execlineb -W -S 1 You're running into an unfortunate side effect of shebang lines where only the first argument is available. Exactly. Shebang parsing is done by the kernel, which does not have a complete command line parser. (If it had, the execlineb program would be redundant: we

Re: Little correction on fdmove doc

2018-07-29 Thread Laurent Bercot
I've found the command intuitive but the documentation confused me a little bit. So here's a patch. ISTR you actually submitted the same thing a few months ago and I did not react. Sorry, I should have replied sooner. The documentation is correct and I won't apply the patch. But it's not

Re: execlineb -S does not stop the command from running

2018-07-29 Thread Laurent Bercot
`execline` does indeed exits when not given arguments, and displays the error `execlineb: warning: too few arguments: expecting at least 1 but got 0` but the first command gets run. ``` $ execlineb -S1 -c 'echo wrong' execlineb: warning: too few arguments: expecting at least 1 but got 0 wrong

Re: Naming of execlineb

2018-07-27 Thread Laurent Bercot
I believe the original execline didn't support blocks; then the block syntax was added as execlineb; and then it turned out that block support is so useful that having the old version of execline around was pointless. Indeed.

Re: execline, s6-portable-utils: print a file to stdout

2018-07-24 Thread Laurent Bercot
I haven’t found a way to print a file to stdout with either execline nor s6-portable-utils. The `s6-cat` utility only echoes stuff that is already coming from stdin, and unlike the shell, execline doesn’t have `<`. https://skarnet.org/software/execline/redirfd.html "redirfd -r 0 $file

Re: execline: returning something from ifthenelse blocks

2018-07-24 Thread Laurent Bercot
So I’d like to have an ifthenelse and return the same envvar from both branches. https://www.mail-archive.com/skaware@list.skarnet.org/msg00311.html -- Laurent

Re: execline globbing

2018-07-24 Thread Laurent Bercot
That brings me to another question: is there a collection of more execline utilities somewhere? I suspect the standard GNU coreutils are not quite to your liking in a lot of cases. The execline package has all the execline-specific utilities you need to perform execline scripting (although if

Re: execline globbing

2018-07-24 Thread Laurent Bercot
elglob -0 fs somedir/* if { test -n $fs } ln -t otherdir $fs the test will fail if there’s more than one file in `somedir`. Is there a way to put a split variable into one variable again? Your next door "echo" command will do just that (or s6-echo if you risk having dashes and want reliable

Re: [announce] utmps-0.0.1.0

2018-07-07 Thread Laurent Bercot
So, I noticed the package includes example OpenRC service scripts (wow!) for utmps-utmpd and utmps-wtmpd. Probably not the kind of testing you hoped for, but for the sake of correctness: they won't work :-P On the contrary, that's exactly the kind of testing I appreciate. :) I've managed to do

[announce] utmps-0.0.1.0

2018-06-07 Thread Laurent Bercot
Hello, It's been there for some time but there's now a release number. utmps-0.0.1.0 is out. It's a secure implementation of the POSIX utmpx.h functions, using daemons to access the utmp and wtmp database instead of imposing suid or sgid on applications. It still needs a lot of testing.

Re: execline-in-execline

2018-06-06 Thread Laurent Bercot
``` #!execline define url example.com s6-tcpclient $url 80 execlineb " foreground { fdmove 1 7 echo -en \"…\" fdmove 0 6 cat } " ``` I have trouble understanding what you want to do in the general case, because in this example, s6-tcpclient takes a whole command line, so you do not have to

Re: avltree / genalloc

2018-04-12 Thread Laurent Bercot
Ok, so let me ask you this: I want to delete my avltree. That is, I'd like to remove all its nodes and be done with it, i.e. I need to free all memory associated with it. I guess avltree_free() is enough, no need to delete each node individually? Yes, avltree_free() is enough, because an

Re: avltree / genalloc

2018-04-12 Thread Laurent Bercot
- When using avltree_iter() we need to pass a avliterfunc_t_ref, which takes 3 arguments. If I understand correctly, first is the uint32_t index, then the tree's "internal" (unsigned int) index, and my pointer. "The uint32_t index" is confusing terminology, so to clarify, I call this number

Re: [PATCH] change localip is6 flag based on destination ip

2018-04-11 Thread Laurent Bercot
Applied, thanks! -- Laurent

  1   2   3   4   >