From ba92397f9a89b92485b684f7435a844f53b4b60a Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 10 Feb 2023 13:55:00 +0000 Subject: Add nsss, fix s6li dep on utmps Signed-off-by: Laurent Bercot --- layout/rootfs/etc/group | 1 + layout/rootfs/etc/passwd | 1 + .../s6-rc/source-base/btmpd/dependencies.d/nsssd | 0 .../s6-rc/source-base/mdevd/dependencies.d/nsssd | 0 .../etc/s6-rc/source-base/nsssd/dependencies.d/00 | 0 .../etc/s6-rc/source-base/nsssd/notification-fd | 1 + layout/rootfs/etc/s6-rc/source-base/nsssd/run | 7 ++++++ layout/rootfs/etc/s6-rc/source-base/nsssd/type | 1 + .../source-base/utmpd/dependencies.d/mount-rwfs | 0 .../s6-rc/source-base/utmpd/dependencies.d/nsssd | 0 .../s6-rc/source-base/wtmpd/dependencies.d/nsssd | 0 layout/rootfs/etc/shadow | 1 + sub/skarnet.org/Makefile | 25 ++++++++++++---------- 13 files changed, 26 insertions(+), 11 deletions(-) create mode 100644 layout/rootfs/etc/s6-rc/source-base/btmpd/dependencies.d/nsssd create mode 100644 layout/rootfs/etc/s6-rc/source-base/mdevd/dependencies.d/nsssd create mode 100644 layout/rootfs/etc/s6-rc/source-base/nsssd/dependencies.d/00 create mode 100644 layout/rootfs/etc/s6-rc/source-base/nsssd/notification-fd create mode 100755 layout/rootfs/etc/s6-rc/source-base/nsssd/run create mode 100644 layout/rootfs/etc/s6-rc/source-base/nsssd/type delete mode 100644 layout/rootfs/etc/s6-rc/source-base/utmpd/dependencies.d/mount-rwfs create mode 100644 layout/rootfs/etc/s6-rc/source-base/utmpd/dependencies.d/nsssd create mode 100644 layout/rootfs/etc/s6-rc/source-base/wtmpd/dependencies.d/nsssd diff --git a/layout/rootfs/etc/group b/layout/rootfs/etc/group index 9641605..4927100 100644 --- a/layout/rootfs/etc/group +++ b/layout/rootfs/etc/group @@ -5,3 +5,4 @@ nogroup:x:65534: log:x:61: fdh:x:76: utmp:x:99: +nsss:x:97: diff --git a/layout/rootfs/etc/passwd b/layout/rootfs/etc/passwd index 0a7e910..55dc745 100644 --- a/layout/rootfs/etc/passwd +++ b/layout/rootfs/etc/passwd @@ -9,3 +9,4 @@ sysllog:x:104:61:sysllog:/:/nonexistent sysfdh:x:137:76:sysfdh:/:/nonexistent sshlog:x:138:61:sshlog:/var/log/sshd-4:/nonexistent utmp:x:99:99:utmp:/run/utmps:/nonexistent +nsss:x:97:97:nsss:/run/service/nsssd:/nonexistent diff --git a/layout/rootfs/etc/s6-rc/source-base/btmpd/dependencies.d/nsssd b/layout/rootfs/etc/s6-rc/source-base/btmpd/dependencies.d/nsssd new file mode 100644 index 0000000..e69de29 diff --git a/layout/rootfs/etc/s6-rc/source-base/mdevd/dependencies.d/nsssd b/layout/rootfs/etc/s6-rc/source-base/mdevd/dependencies.d/nsssd new file mode 100644 index 0000000..e69de29 diff --git a/layout/rootfs/etc/s6-rc/source-base/nsssd/dependencies.d/00 b/layout/rootfs/etc/s6-rc/source-base/nsssd/dependencies.d/00 new file mode 100644 index 0000000..e69de29 diff --git a/layout/rootfs/etc/s6-rc/source-base/nsssd/notification-fd b/layout/rootfs/etc/s6-rc/source-base/nsssd/notification-fd new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/layout/rootfs/etc/s6-rc/source-base/nsssd/notification-fd @@ -0,0 +1 @@ +3 diff --git a/layout/rootfs/etc/s6-rc/source-base/nsssd/run b/layout/rootfs/etc/s6-rc/source-base/nsssd/run new file mode 100755 index 0000000..df1f556 --- /dev/null +++ b/layout/rootfs/etc/s6-rc/source-base/nsssd/run @@ -0,0 +1,7 @@ +#!/command/execlineb -S1 + +fdmove -c 2 1 +s6-envuidgid nsss +fdmove 1 3 +s6-ipcserver -1 -U -c 1000 -- s +nsssd-unix diff --git a/layout/rootfs/etc/s6-rc/source-base/nsssd/type b/layout/rootfs/etc/s6-rc/source-base/nsssd/type new file mode 100644 index 0000000..5883cff --- /dev/null +++ b/layout/rootfs/etc/s6-rc/source-base/nsssd/type @@ -0,0 +1 @@ +longrun diff --git a/layout/rootfs/etc/s6-rc/source-base/utmpd/dependencies.d/mount-rwfs b/layout/rootfs/etc/s6-rc/source-base/utmpd/dependencies.d/mount-rwfs deleted file mode 100644 index e69de29..0000000 diff --git a/layout/rootfs/etc/s6-rc/source-base/utmpd/dependencies.d/nsssd b/layout/rootfs/etc/s6-rc/source-base/utmpd/dependencies.d/nsssd new file mode 100644 index 0000000..e69de29 diff --git a/layout/rootfs/etc/s6-rc/source-base/wtmpd/dependencies.d/nsssd b/layout/rootfs/etc/s6-rc/source-base/wtmpd/dependencies.d/nsssd new file mode 100644 index 0000000..e69de29 diff --git a/layout/rootfs/etc/shadow b/layout/rootfs/etc/shadow index 445958f..eb9b0f2 100644 --- a/layout/rootfs/etc/shadow +++ b/layout/rootfs/etc/shadow @@ -9,3 +9,4 @@ sysllog:!:14793:::::: sysfdh:!:15041:::::: sshlog:!:14849:::::: utmp:!:14849:::::: +nsss:!:14849:::::: diff --git a/sub/skarnet.org/Makefile b/sub/skarnet.org/Makefile index d33962e..8fa1d27 100644 --- a/sub/skarnet.org/Makefile +++ b/sub/skarnet.org/Makefile @@ -1,8 +1,9 @@ -SKAWARE := SKALIBS UTMPS EXECLINE S6 S6_RC S6_LINUX_INIT S6_PORTABLE_UTILS S6_LINUX_UTILS S6_DNS S6_NETWORKING MDEVD BCNM -SKAWARE_BUILD := SKALIBS UTMPS EXECLINE S6 S6_RC S6_LINUX_INIT S6_PORTABLE_UTILS S6_LINUX_UTILS +SKAWARE := SKALIBS NSSS UTMPS EXECLINE S6 S6_RC S6_LINUX_INIT S6_PORTABLE_UTILS S6_LINUX_UTILS S6_DNS S6_NETWORKING MDEVD BCNM +SKAWARE_BUILD := SKALIBS NSSS UTMPS EXECLINE S6 S6_RC S6_LINUX_INIT S6_PORTABLE_UTILS S6_LINUX_UTILS # SKALIBS_VERSION := v2.13.1.0 SKALIBS_VERSION := a10514072f27ff9f4a6ab308b3bccfd4628ef2aa +NSSS_VERSION := v0.2.0.2 UTMPS_VERSION := v0.1.2.1 # EXECLINE_VERSION := v2.9.2.0 EXECLINE_VERSION := bb748f0e002c8a4f9865ae0a592fcb4fac0aabc7 @@ -23,19 +24,21 @@ BCNM_VERSION := v0.0.1.6 SKALIBS_DEPENDENCIES := -UTMPS_DEPENDENCIES := SKALIBS -EXECLINE_DEPENDENCIES := SKALIBS -S6_DEPENDENCIES := SKALIBS EXECLINE +NSSS_DEPENDENCIES := SKALIBS +UTMPS_DEPENDENCIES := SKALIBS NSSS +EXECLINE_DEPENDENCIES := SKALIBS NSSS +S6_DEPENDENCIES := SKALIBS EXECLINE NSSS S6_RC_DEPENDENCIES := SKALIBS EXECLINE S6 -S6_LINUX_INIT_DEPENDENCIES := SKALIBS UTMPS EXECLINE S6 +S6_LINUX_INIT_DEPENDENCIES := SKALIBS NSSS UTMPS EXECLINE S6 S6_PORTABLE_UTILS_DEPENDENCIES := SKALIBS -S6_LINUX_UTILS_DEPENDENCIES := SKALIBS +S6_LINUX_UTILS_DEPENDENCIES := SKALIBS NSSS S6_DNS_DEPENDENCIES := SKALIBS -S6_NETWORKING_DEPENDENCIES := SKALIBS EXECLINE S6 S6_DNS -MDEVD_DEPENDENCIES := SKALIBS +S6_NETWORKING_DEPENDENCIES := SKALIBS NSSS EXECLINE S6 S6_DNS +MDEVD_DEPENDENCIES := SKALIBS NSSS BCNM_DEPENDENCIES := SKALIBS SKALIBS_CATEGORY := prog +NSSS_CATEGORY := admin UTMPS_CATEGORY := admin EXECLINE_CATEGORY := admin S6_CATEGORY := admin @@ -49,6 +52,7 @@ MDEVD_CATEGORY := admin BCNM_CATEGORY := admin SKALIBS_TOKEN := libskarnet.a.xyzzy +NSSS_TOKEN := nsssd-unix UTMPS_TOKEN := utmps-utmpd EXECLINE_TOKEN := execline S6_TOKEN := s6-supervise @@ -62,7 +66,7 @@ MDEVD_TOKEN := mdevd BCNM_TOKEN := bcnm-waitif SKAWARE_ENV := $(if $(filter true,$(TARGET_STATIC)),,env LDFLAGS=-Wl,-rpath-link,$(OUTPUT)/rootfs/library.so) -SKAWARE_OPTIONS := --enable-slashpackage $(if $(filter true,$(TARGET_STATIC)),--enable-static-libc --disable-shared,--enable-shared --disable-allstatic) +SKAWARE_OPTIONS := --enable-slashpackage --enable-nsss $(if $(filter true,$(TARGET_STATIC)),--enable-static-libc --disable-shared,--enable-shared --disable-allstatic) SKAWARE_BUILD_OPTIONS := --enable-slashpackage --disable-shared --enable-allstatic SKALIBS_OPTIONS := --with-default-path=/command:/usr/bin:/bin --with-sysdep-devurandom=yes --with-sysdep-grndinsecure=no UTMPS_OPTIONS := --enable-libc-includes @@ -132,7 +136,6 @@ $(OUTPUT)/build-$(TRIPLE)/.lh_s6li_laidout: $(OUTPUT)/rootfs/package/admin/s6-li exec $(OUTPUT)/build-build/command/s6-chown -u 98 -g 98 -- $(OUTPUT)/rootfs/etc/s6-linux-init/current/run-image/uncaught-logs exec $(OUTPUT)/build-build/command/s6-chown -u 98 -g 98 -- $(OUTPUT)/rootfs/etc/s6-linux-init/current/run-image/service/s6-svscan-log/fifo exec $(OUTPUT)/build-build/command/s6-chmod 02750 $(OUTPUT)/rootfs/etc/s6-linux-init/current/run-image/uncaught-logs - exec $(OUTPUT)/build-build/command/s6-chown -u 99 -g 99 -- $(OUTPUT)/rootfs/etc/s6-linux-init/current/run-image/utmps for i in `ls -1 $(OUTPUT)/rootfs/etc/s6-linux-init/current/bin` ; do ln -sf ../etc/s6-linux-init/current/bin/$$i $(OUTPUT)/rootfs/bin/$$i ; done exec setuidgid $(NORMALUSER) touch $@ -- cgit v1.2.3