summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2023-02-10 13:55:00 +0000
committerLaurent Bercot <ska@appnovation.com>2023-02-10 13:55:00 +0000
commitba92397f9a89b92485b684f7435a844f53b4b60a (patch)
tree3218b43da61dcd8cf750f6fe9e79c6d2c17083ea
parentb30d4de9db9bdadd75110e901d578e23e40c91f7 (diff)
downloadlh-bootstrap-ba92397f9a89b92485b684f7435a844f53b4b60a.tar.xz
Add nsss, fix s6li dep on utmps
Signed-off-by: Laurent Bercot <ska@appnovation.com>
-rw-r--r--layout/rootfs/etc/group1
-rw-r--r--layout/rootfs/etc/passwd1
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/btmpd/dependencies.d/nsssd (renamed from layout/rootfs/etc/s6-rc/source-base/utmpd/dependencies.d/mount-rwfs)0
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/mdevd/dependencies.d/nsssd0
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/nsssd/dependencies.d/000
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/nsssd/notification-fd1
-rwxr-xr-xlayout/rootfs/etc/s6-rc/source-base/nsssd/run7
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/nsssd/type1
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/utmpd/dependencies.d/nsssd0
-rw-r--r--layout/rootfs/etc/s6-rc/source-base/wtmpd/dependencies.d/nsssd0
-rw-r--r--layout/rootfs/etc/shadow1
-rw-r--r--sub/skarnet.org/Makefile25
12 files changed, 26 insertions, 11 deletions
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/utmpd/dependencies.d/mount-rwfs b/layout/rootfs/etc/s6-rc/source-base/btmpd/dependencies.d/nsssd
index e69de29..e69de29 100644
--- a/layout/rootfs/etc/s6-rc/source-base/utmpd/dependencies.d/mount-rwfs
+++ b/layout/rootfs/etc/s6-rc/source-base/btmpd/dependencies.d/nsssd
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
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/mdevd/dependencies.d/nsssd
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
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/nsssd/dependencies.d/00
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/nsssd b/layout/rootfs/etc/s6-rc/source-base/utmpd/dependencies.d/nsssd
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/utmpd/dependencies.d/nsssd
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
--- /dev/null
+++ b/layout/rootfs/etc/s6-rc/source-base/wtmpd/dependencies.d/nsssd
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 $@