commit 2a26b4781db75a56799a992aa427f2d4899eb35d
parent db9f7288ceba21dbd76c09244aac3e8309d4ab2f
Author: ccx <ccx@te2000.cz>
Date: Thu, 14 Mar 2024 00:40:22 +0000
Logincaps fixes, add tcb shadow
Diffstat:
12 files changed, 56 insertions(+), 25 deletions(-)
diff --git a/.gitmodules b/.gitmodules
@@ -86,3 +86,6 @@
[submodule "sources/mdev-conf"]
path = sources/mdev-conf
url = https://gitlab.alpinelinux.org/alpine/mdev-conf.git
+[submodule "sources/tcb"]
+ path = sources/tcb
+ url = https://github.com/openwall/tcb
diff --git a/packages/containers b/packages/containers
@@ -3,7 +3,7 @@
#+zsh.762204e14953017be79e356d4bf9f7681625a750ecc951f3510bf144ea7b51bb
#+pthbs-banginstall.d1e43ec62e6d2b3a2a03a2d9ce487f6fe768fb7131c09ce0d2dd9e165233cff1
#+execline.9d9d14aad09d9643f578727ab1ed3363b975772358c4ac8e756abdad4fca7a3d
-#@git:e9d356d5d04d90fc0873524b985c36be14696fa2:containers
+#@git:46881deeefda97f1622fcdfd20772410f1fde8b4:containers
: ${JOBS:=1}
prefix=/versions/$pthbs_package
diff --git a/packages/containers.environment b/packages/containers.environment
@@ -6,7 +6,7 @@
#+s6-linux-utils.198acb1d9ef7c0d4eade19a06d07864bfda68d89e4d65990af8bc1026c069885
#+zsh.762204e14953017be79e356d4bf9f7681625a750ecc951f3510bf144ea7b51bb
#+confz.6658089fa0f90962e97d41b3fd8400d7ea37c6872828f5f7bd122a2d07a9c467
-#+containers.60c1acf0dfce9a977591b80f5ae29b57f6b436815af20c2a4cbd3c28d8308427
+#+containers.5e19e8a2183e64df4f89cace75cb833e201f5239d114714f1d8688f058bae8c9
#+xbps.9831b74b8d46bb8c240d6ba606b13d3a80d67804ddbce5e828bef08377d0f9b0
#+zstd.ab99ab40fa027a935e6012884c3988d7161dc0c6ff10c06566c0a92c694bca07
#+apk-tools.c9cdb867562a26201a1618e0b1bf2147e6cee6aff1a6901909ee911a4462327a
diff --git a/packages/core-system-conf b/packages/core-system-conf
@@ -13,8 +13,8 @@
#+s6.bb3974d7b49c2034b5064bac508beae2d4bfc1a7b6543aefcbc1af9e9e94f1a7
#+zsh.762204e14953017be79e356d4bf9f7681625a750ecc951f3510bf144ea7b51bb
#+core-system-scripts.132a3b1c6b226dee79156049db1244ebeacdf5a4bfcffc74b6b97175dad000fd
-#+logincaps.475e97436e9a1786e39f2a08462f197140ba4de2e17e06c79d5f76d0a5612de2
-#@git:f57730644b1cceeae0dd190f26927883b4cc8cda:core-system-conf
+#+logincaps.5faea56c51b05e8cb2f04ab7cbbb9fe7c6050e1f901fdecd616dca315b365dad
+#@git:56a547f36d1c73961145fc7bf0c6f45a12a1355f:core-system-conf
def_prefix() {
prefix=/versions/$pthbs_package
@@ -40,13 +40,19 @@ linkdep() {
}
cd 'core-system-conf'
+
printf '%s\n' >config/etc/motd \
"Welcome to $(cat ./config/hostname)!" \
- 'Current running configuration was generated from core-system-conf:f57730644b1cceeae0dd190f26927883b4cc8cda' \
- 'Last change on 2024-03-08 19:02:48 +0000 by ccx'
+ 'Current running configuration was generated from core-system-conf:56a547f36d1c73961145fc7bf0c6f45a12a1355f' \
+ 'Last change on 2024-03-13 21:08:28 +0000 by ccx'
+
+printf '%s\n' >config/etc/skel/loginexec \
+ "#!$(which execlineb) -S0" \
+ 'user_loginexec $@'
+chmod +x config/etc/skel/loginexec
env 'pthbs_path_core-system-conf'="$prefix" \
- 'pthbs_path_containers=/versions/env.9cf55586e2295800df02539537b4c0407b2f5a19bf5e648083e92f419eb321e5' \
+ 'pthbs_path_containers=/versions/env.abc1749854fe605481feb9370335dbb2387f5eaed5b40eb7468d126549ede138' \
'pthbs_path_mdevd=/versions/env.9ff4ae1aa76157d331d77b75c4dec8d6fd85395776d90a931bfb285a671a5c32' \
make -j${JOBS:-1} -l$((1+${JOBS:-1})) all
diff --git a/packages/core-system-init b/packages/core-system-init
@@ -5,9 +5,9 @@
#+s6-portable-utils.39f4babb8cd30769f1a931708e5442244b0305c36ddafe32348c7dc30c000b00
#+s6-linux-init.396413eed542c149346f51a569f2d686c03b2104f4d062f52422e444ad9b502d
#+execline.9d9d14aad09d9643f578727ab1ed3363b975772358c4ac8e756abdad4fca7a3d
-#+core-system-rc.9604d0dac18456fc5af77ea9ab16dca585ad5fcb5854945b47281b1295a3f582
+#+core-system-rc.26737ef59793b01492d17c96bbade9bd580efab194821e492908706f2a4eacfa
-s6rcdb=/versions/core-system-rc.9604d0dac18456fc5af77ea9ab16dca585ad5fcb5854945b47281b1295a3f582/config/s6-rc-db
+s6rcdb=/versions/core-system-rc.26737ef59793b01492d17c96bbade9bd580efab194821e492908706f2a4eacfa/config/s6-rc-db
prefix=/versions/$pthbs_package
pkgdir="$pthbs_destdir/$prefix"
diff --git a/packages/core-system-rc b/packages/core-system-rc
@@ -3,7 +3,7 @@
#+busybox-diffutils.4f5a07b29246414b77a7d71b103263af8f1249d75ddcbd9864e00def3d6feded
#+s6-rc.6cefe2791153127e0a783521ab97f3b124f023f21cdc2eddadbb865496ad0b45
#+fileset.22d9abf3009dbbfe507bd7ff93fdd0bf7f86ee0bc317b37b423b89d70ab950a2
-#+core-system-conf.77e085927bd24f87018573434d43d14ea7ac1e92bb2a724bd0786e4e7eb31190
+#+core-system-conf.149bf6cf55a6a2b6ade9608a8cecd571e0cfd6647f29ca4e915e4ddaad47bd49
def_prefix() {
prefix=/versions/$pthbs_package
@@ -13,7 +13,7 @@ def_dest() {
}
def_dest
-src=/versions/core-system-conf.77e085927bd24f87018573434d43d14ea7ac1e92bb2a724bd0786e4e7eb31190/config/s6-rc-source
+src=/versions/core-system-conf.149bf6cf55a6a2b6ade9608a8cecd571e0cfd6647f29ca4e915e4ddaad47bd49/config/s6-rc-source
s6-rc-compile ./s6-rc-db "$src"
mkdir -p "$dest/config"
mv -v s6-rc-db "$dest/config/"
diff --git a/packages/default.environment b/packages/default.environment
@@ -1,7 +1,7 @@
-#+core-system-conf.77e085927bd24f87018573434d43d14ea7ac1e92bb2a724bd0786e4e7eb31190
-#+core-system-rc.9604d0dac18456fc5af77ea9ab16dca585ad5fcb5854945b47281b1295a3f582
+#+core-system-conf.149bf6cf55a6a2b6ade9608a8cecd571e0cfd6647f29ca4e915e4ddaad47bd49
+#+core-system-rc.26737ef59793b01492d17c96bbade9bd580efab194821e492908706f2a4eacfa
#+core-system-scripts.132a3b1c6b226dee79156049db1244ebeacdf5a4bfcffc74b6b97175dad000fd
-#+core-system-init.241086865d7897cba12a880be6343e775307a00c1f47bf9a11b00514d48959a6
+#+core-system-init.d289c5d698f97a06dbfad5ea6b2ad8e7d7073ab6853a7d24cea0ff49d4fe6b49
#+busybox.e60885fe93ee85c01831673bb29f0e62a64903f4ce3094e3dc35bc8ec8887ad9
#+gnu-make.782c9e6625fd7420e2cd38b847afed19db3b3844cae8a0426a0dbf73e10d78e5
#+musl-cross-make.65f98305f5666435bf0c6b9ccedffae2179ff1b3286752756886f760cf7771d2
@@ -24,9 +24,9 @@
#+pthbs-banginstall.d1e43ec62e6d2b3a2a03a2d9ce487f6fe768fb7131c09ce0d2dd9e165233cff1
#+aat.e073f6b23349ea7153987ad737fc80f909241ae4a0c0a22adc12392fcad71597
#+confz.6658089fa0f90962e97d41b3fd8400d7ea37c6872828f5f7bd122a2d07a9c467
-#+containers.60c1acf0dfce9a977591b80f5ae29b57f6b436815af20c2a4cbd3c28d8308427
+#+containers.5e19e8a2183e64df4f89cace75cb833e201f5239d114714f1d8688f058bae8c9
#+fileset.22d9abf3009dbbfe507bd7ff93fdd0bf7f86ee0bc317b37b423b89d70ab950a2
-#+logincaps.475e97436e9a1786e39f2a08462f197140ba4de2e17e06c79d5f76d0a5612de2
+#+logincaps.5faea56c51b05e8cb2f04ab7cbbb9fe7c6050e1f901fdecd616dca315b365dad
#+snaprep.42b7b97b7530a211dd0f01680c9b15362aa2e7249bc27cea0deb0632f7535bb1
#+curl.b82f818e85570a561ca20ca417adba2f1c3214ef5c3e01626c0a4aa099b90f0c
#+git.1839db7305bbee32d184adc0ece64d40ab58132d3c7749b426c4d680659bd4eb
diff --git a/packages/logincaps b/packages/logincaps
@@ -4,7 +4,7 @@
#+pthbs-banginstall.d1e43ec62e6d2b3a2a03a2d9ce487f6fe768fb7131c09ce0d2dd9e165233cff1
#+execline.9d9d14aad09d9643f578727ab1ed3363b975772358c4ac8e756abdad4fca7a3d
#+musl-cross-make.65f98305f5666435bf0c6b9ccedffae2179ff1b3286752756886f760cf7771d2
-#@git:b8c706e2a24a12ec3854d41e777e4b8840f98be2:logincaps
+#@git:fc0f3805f356cd81a210f04a90c1294088cad349:logincaps
: ${JOBS:=1}
prefix=/versions/$pthbs_package
@@ -27,15 +27,22 @@ if test -d zsh-functions; then
mkdir -p "$pkgdir/zsh"
mv -v zsh-functions "$pkgdir/zsh/site-functions"
fi
-cd login
-sh build_static.sh
-cp -a login "$pkgdir/command/"
+
+pthbs-banginstall etc/loginexec "$pkgdir"
+
+mv -v home/loginexec ./user_loginexec
+pthbs-banginstall ./user_loginexec "$pkgdir"
+
cat >"$pkgdir/command/login-keepenv" <<EOF
#!$(which execlineb) -S0
$prefix/command/login -p \$@
EOF
chmod +x "$pkgdir/command/login-keepenv"
+cd login
+sh build_static.sh -DLOGINEXEC_PATH="\"$prefix/command/loginexec\""
+cp -a login "$pkgdir/command/"
+
cd "$pthbs_destdir/versions/$pthbs_package"
find -type d -o -print | awk -F/ '
BEGIN {
diff --git a/packages/userspace.environment b/packages/userspace.environment
@@ -20,9 +20,9 @@
#+pthbs-banginstall.d1e43ec62e6d2b3a2a03a2d9ce487f6fe768fb7131c09ce0d2dd9e165233cff1
#+aat.e073f6b23349ea7153987ad737fc80f909241ae4a0c0a22adc12392fcad71597
#+confz.6658089fa0f90962e97d41b3fd8400d7ea37c6872828f5f7bd122a2d07a9c467
-#+containers.60c1acf0dfce9a977591b80f5ae29b57f6b436815af20c2a4cbd3c28d8308427
+#+containers.5e19e8a2183e64df4f89cace75cb833e201f5239d114714f1d8688f058bae8c9
#+fileset.22d9abf3009dbbfe507bd7ff93fdd0bf7f86ee0bc317b37b423b89d70ab950a2
-#+logincaps.475e97436e9a1786e39f2a08462f197140ba4de2e17e06c79d5f76d0a5612de2
+#+logincaps.5faea56c51b05e8cb2f04ab7cbbb9fe7c6050e1f901fdecd616dca315b365dad
#+snaprep.42b7b97b7530a211dd0f01680c9b15362aa2e7249bc27cea0deb0632f7535bb1
#+curl.b82f818e85570a561ca20ca417adba2f1c3214ef5c3e01626c0a4aa099b90f0c
#+git.1839db7305bbee32d184adc0ece64d40ab58132d3c7749b426c4d680659bd4eb
diff --git a/sources/tcb b/sources/tcb
@@ -0,0 +1 @@
+Subproject commit 11fa125ba2007080776659dd510d8d69be9ad07a
diff --git a/templates/pkg/core-system-conf b/templates/pkg/core-system-conf
@@ -36,11 +36,17 @@ linkdep() {
}
cd '{{name}}'
+
printf '%s\n' >config/etc/motd \
"Welcome to $(cat ./config/hostname)!" \
'Current running configuration was generated from {{name}}:{{submodule.current[name]}}' \
'Last change on {{submodule.commit_info(submodule.current[name])}}'
+printf '%s\n' >config/etc/skel/loginexec \
+ "#!$(which execlineb) -S0" \
+ 'user_loginexec $@'
+chmod +x config/etc/skel/loginexec
+
env 'pthbs_path_{{name}}'="$prefix" \
'pthbs_path_containers={{pkg_install_dir("containers.environment")}}' \
'pthbs_path_mdevd={{pkg_install_dir("mdevd.environment")}}' \
diff --git a/templates/pkg/logincaps b/templates/pkg/logincaps
@@ -4,14 +4,22 @@
#+{{pkg_install_name("musl-cross-make")}}
{%- endblock %}
{%- block extra_script %}
-cd login
-sh build_static.sh
-cp -a login "$pkgdir/command/"
+
+pthbs-banginstall etc/loginexec "$pkgdir"
+
+mv -v home/loginexec ./user_loginexec
+pthbs-banginstall ./user_loginexec "$pkgdir"
+
cat >"$pkgdir/command/login-keepenv" <<EOF
#!$(which execlineb) -S0
$prefix/command/login -p \$@
EOF
chmod +x "$pkgdir/command/login-keepenv"
+
+cd login
+sh build_static.sh -DLOGINEXEC_PATH="\"$prefix/command/loginexec\""
+cp -a login "$pkgdir/command/"
+
{%- endblock %}
{% block genlinks_begin %}
x["./command/zshaskpass_lock"]=1