mrrl

Minimal Reliable Reproducible Linux
git clone https://ccx.te2000.cz/git/mrrl
Log | Files | Refs | Submodules | README

commit 294598cf442b5d6bb7464c1b304ee5f9d3e698e1
parent 743c9930d6cd14bb8ccc5087800706b0bcd6dd6c
Author: Jan Pobrislo <ccx@te2000.cz>
Date:   Sun, 28 Dec 2025 13:37:55 +0000

package terminus, make sure deps/ link is created for it

Diffstat:
Mcommitlist.sha1 | 1+
Mfilelist.sha256 | 1+
Mtemplates/pkg/system-config | 43++++++++++++++++++++++++++++++++-----------
Atemplates/pkg/terminus-consolefont | 16++++++++++++++++
Mvariants/ccx-x86_64/default.environment | 6+++---
Mvariants/ccx-x86_64/system-config | 49+++++++++++++++++++++++++++++++++++--------------
Mvariants/ccx-x86_64/system-config-init | 4++--
Mvariants/ccx-x86_64/system-config-rc | 4++--
Avariants/ccx-x86_64/terminus-consolefont | 106+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mvariants/root-x86_64/default.environment | 6+++---
Mvariants/root-x86_64/system-config | 49+++++++++++++++++++++++++++++++++++--------------
Mvariants/root-x86_64/system-config-init | 4++--
Mvariants/root-x86_64/system-config-rc | 4++--
Avariants/root-x86_64/terminus-consolefont | 106+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
14 files changed, 346 insertions(+), 53 deletions(-)

diff --git a/commitlist.sha1 b/commitlist.sha1 @@ -942,6 +942,7 @@ fe6a7178c290979b822e287014f7c2f93aa0a732 sources/skalibs ff066bd37e692daadc573fbd3ef622c3f1e8ec6a sources/skalibs e9d8af262eb5e25536ea9778e3ed57aebb55488c sources/snaprep 055d24bac572481d7dedba7d4ec9df37f620fbfd sources/system-config +5bb70b8d36a704288e64b30c5d30e75483e0b005 sources/system-config f9d071a4c5870d42d00d0ca496efac527388e6f4 sources/system-config dc793695cc0632a808af9d4415f3b0cf0f4dfba2 sources/system-config-scripts 1390434aaa6e044fc713547a232f20f2aa17f972 sources/system-config-zsh diff --git a/filelist.sha256 b/filelist.sha256 @@ -108,6 +108,7 @@ c7d3e7ef077d7673567d2f0c34ba2ebd689dab1250286ab482a3064c73ff7d7c files/s6_clone df0c24312e4941b1035a6292504fbf569f0f8b81b083835d7df84586decef25c files/sandbox-rootns-python.in b3102e75103977f72729fed6a3123b5140e815b7d966fd4fb41367257b17eda6 files/sandbox-rootns.in 37d93db7135d47852dbe763f1b18b3aeab142431a6f5268a17fc700387a326e4 files/strace-6.5-static.patch +a0b181b534ae7496de729ccb50b19bbf2bd4e981f08b0f4142d54f38bf8bb677 files/terminus-consolefont-4.49.1.tar e0ea17940260f9c1fdd2d35f74eec141d21f09844eaea91131993cb950901a16 files/tree.h 07c3c30dab68c905d5608124e729592a30b2c087f24e7b76940f5321786128b1 files/update-links 664430d033e0b491a5ed90cb39cb17cddb57ac0be9f3f2bf014264f3c17d55df files/user-env diff --git a/templates/pkg/system-config b/templates/pkg/system-config @@ -14,6 +14,7 @@ #+{{pkg_install_name("fileset")}} #+{{pkg_install_name("rsync")}} #+{{pkg_install_name("execline")}} +#+{{pkg_install_name("terminus-consolefont")}} #+{{pkg_install_name("kbd")}} #+{{pkg_install_name("mdevd")}} #+{{pkg_install_name("s6-linux-utils")}} @@ -26,19 +27,39 @@ #+{{pkg_install_name(["busybox-modutils", "busybox:modutils"][kernel is defined|int])}} {% endblock %} {% block build_and_install -%} -err_notfound() { - printf >&2 'Executable not found for command "%s"\n' "$1" +err() { + printf >&2 'Error: %s\n' "$1" exit 1 } +err_notfound() { + err "File not provided by environment: '$1'" +} linkdep() { - exe=$(command which "$1") || err_notfound "$1" - exe=$(realpath "$exe") - name=$(basename "$1") - if ! test -x "$exe"; then - printf 'Error: executable not found: %s\n' "$1" + test -e "$pthbs_build_environment/$1") || err_notfound "$1" + rp=$(realpath "$1") || err_notfound "$1" + case $1 in + (/*) + err "malformed linkdep path: '$1'" + ;; + (*/) + err "malformed linkdep path: '$1'" + ;; + (command/*) + if ! test -x "$rp"; then + err "not an executable: '$rp' (linked from '$1')" + fi + ;; + (*) + if ! test -f "$rp"; then + err "not a file: '$rp' (linked from '$1')" + fi + ;; + esac + if test -e "$dest/deps/$1"; then + err "Already linked deps/$1 to $(realpath "$dest/deps/$1"), want $rp" fi - mkdir -p "$dest/deps/{{bindir}}" - ln -sf $exe "$dest/deps/{{bindir}}/$name" + mkdir -p "$dest/deps/$(dirname "$1")" + ln -sf $exe "$dest/deps/$1" } printf '%s\n' >{{configdir}}/etc/motd \ @@ -56,8 +77,8 @@ env 'pthbs_path_{{name}}'="$prefix" \ 'pthbs_path_mdevd={{pkg_install_dir("mdevd.environment")}}' \ {{make}} all -sort -u build/execfile | while IFS= read exename; do - linkdep "$exename" +sort -u build/linkdep_list | while IFS= read fname; do + linkdep "$fname" done mkdir "$dest/{{bindir}}" diff --git a/templates/pkg/terminus-consolefont b/templates/pkg/terminus-consolefont @@ -0,0 +1,16 @@ +{%- set src_dir="." -%} +{%- set pkg_version="4.49.1" -%} +{% extends "genlinks_mini" %} +{% block package_deps -%} +#@untar::sha256:{{files["terminus-consolefont-"~pkg_version~".tar"]}}:consolefonts +{% endblock package_deps %} +{% block build_and_install -%} +mkdir -p "$dest"/{{datadir|shesc}} +mv -v consolefonts "$dest"/{{datadir|shesc}}/ +{% endblock build_and_install %} +{% block genlinks_begin %} + x["./{{datadir}}/consolefonts/ter-v16b.psf.gz"]=1 + x["./{{datadir}}/consolefonts/ter-v16n.psf.gz"]=1 + x["./{{datadir}}/consolefonts/ter-v16v.psf.gz"]=1 +{% endblock %} + diff --git a/variants/ccx-x86_64/default.environment b/variants/ccx-x86_64/default.environment @@ -88,9 +88,9 @@ #+squashfs-tools.e58b08a6012ee3dc4429378aaaf55f620da924cf444b3556520fc4e6efb10946 #+mandoc.f9203b401ae6346801b1e100da2e79879b24b86f7f31c457fb4add63cf1ed170 #+tinyssh.9940616c43114ecd7767fc10062ce00eb76a738453248a490f64cd79854343d7 -#+system-config.11b02507d8438f3829ffe150c472ba1cf925fda612fb634897a26cc04792b39c -#+system-config-rc.7ce43e2b3fecc5e879ebd625a56b005be1a814769703b471a5403bcc3047d570 +#+system-config.26befadec515b0ba4d4a278b81e148a95a27021003c775a6b5991cb48bab7837 +#+system-config-rc.64f11f1d367722e174813e0cf0570b53ce8ea7c15d2e789268a9e4d9d3dc06cf #+system-config-scripts.35c642cad58c3945c2c3caa525fce3946ba87d0710adaf13efec1db79da75729 -#+system-config-init.530a276952e6579177b307a4ea6797b8767aa11b9989539f9048e3837f2b5282 +#+system-config-init.0492fd802c70c617c6b8624cd050b40f2aa6efdc5174ac54a682a8f33745c00d #+system-config-zsh.a8d29ac3c60ef9b666edf51a0bfd60aee2be60f3aa898ed8285afd8c2955baab #+busybox.aea69a6a1ec89241b2fd65771f228ede99e7184ee9a34e97af68423d27117348 \ No newline at end of file diff --git a/variants/ccx-x86_64/system-config b/variants/ccx-x86_64/system-config @@ -51,6 +51,7 @@ #+fileset.a3b5845ff158d4a14da356583bcbbc7de921ea437f40d47d1f91d28549b384c0 #+rsync.3060eb88668700798b531a6f6d3647352e1a572ad8f5b55a75fd22a3326de06a #+execline.403a4e1645c681e8c2ca9a75704a27658b788db460265916951d1d7a1e59ce8a +#+terminus-consolefont.2bcd283c7333cf50e6b94e91323f68afdc45b4232b9772cacde6c959464e53e0 #+kbd.16464f49621bdefb0c896c157cbba70f6702c2b8834da0c3701159aacb87c00a #+mdevd.9e13a4a3ebe4ab99da1dc591d9646ec1287bfa575ee0845a154c8df885cdb17b #+s6-linux-utils.e02e2527a80df5d5fe98615c278f0d9db7451b7a7002c1c817d47ca469d0d03f @@ -61,7 +62,7 @@ #+system-config-scripts.35c642cad58c3945c2c3caa525fce3946ba87d0710adaf13efec1db79da75729 #+logincaps.d839c73ac83675a836e60420d7f1daec2664c4473f2728eba621ce388de634c0 #+busybox.aea69a6a1ec89241b2fd65771f228ede99e7184ee9a34e97af68423d27117348 -#@git:055d24bac572481d7dedba7d4ec9df37f620fbfd:system-config +#@git:5bb70b8d36a704288e64b30c5d30e75483e0b005:system-config # - build script start - @@ -71,25 +72,45 @@ dest=${pthbs_destdir%/}${prefix} cd 'system-config' -err_notfound() { - printf >&2 'Executable not found for command "%s"\n' "$1" +err() { + printf >&2 'Error: %s\n' "$1" exit 1 } +err_notfound() { + err "File not provided by environment: '$1'" +} linkdep() { - exe=$(command which "$1") || err_notfound "$1" - exe=$(realpath "$exe") - name=$(basename "$1") - if ! test -x "$exe"; then - printf 'Error: executable not found: %s\n' "$1" + test -e "$pthbs_build_environment/$1") || err_notfound "$1" + rp=$(realpath "$1") || err_notfound "$1" + case $1 in + (/*) + err "malformed linkdep path: '$1'" + ;; + (*/) + err "malformed linkdep path: '$1'" + ;; + (command/*) + if ! test -x "$rp"; then + err "not an executable: '$rp' (linked from '$1')" + fi + ;; + (*) + if ! test -f "$rp"; then + err "not a file: '$rp' (linked from '$1')" + fi + ;; + esac + if test -e "$dest/deps/$1"; then + err "Already linked deps/$1 to $(realpath "$dest/deps/$1"), want $rp" fi - mkdir -p "$dest/deps/command" - ln -sf $exe "$dest/deps/command/$name" + mkdir -p "$dest/deps/$(dirname "$1")" + ln -sf $exe "$dest/deps/$1" } printf '%s\n' >config/etc/motd \ "Welcome to $(cat ./config/hostname)!" \ - 'Current running configuration was generated from system-config:055d24bac572481d7dedba7d4ec9df37f620fbfd' \ - 'Last change on 2025-11-27 20:24:27 +0000 by Jan Pobrislo' + 'Current running configuration was generated from system-config:5bb70b8d36a704288e64b30c5d30e75483e0b005' \ + 'Last change on 2025-12-28 13:36:08 +0000 by Jan Pobrislo' printf '%s\n' >config/etc/skel/loginexec \ "#!$(which execlineb) -S0" \ @@ -101,8 +122,8 @@ env 'pthbs_path_system-config'="$prefix" \ 'pthbs_path_mdevd=/home/ccx/versions/env.573bdf8e058f17c8c28d0114414bf6b38879c6157460409cac78dfd7cf560b27' \ make -j${JOBS:-1} -l$((1+${JOBS:-1})) all -sort -u build/execfile | while IFS= read exename; do - linkdep "$exename" +sort -u build/linkdep_list | while IFS= read fname; do + linkdep "$fname" done mkdir "$dest/command" diff --git a/variants/ccx-x86_64/system-config-init b/variants/ccx-x86_64/system-config-init @@ -50,7 +50,7 @@ #+s6-portable-utils.ed9b2a1a2b2eade3f210e876b2e8c08d680c2fb0f4f5a1ec4137dd262a3d9e3d #+s6-linux-init.7af048a1da88cb89e227afc4ce78f722cfde5a4bbe2f8fef1b1c4c37b1a12b8d #+execline.403a4e1645c681e8c2ca9a75704a27658b788db460265916951d1d7a1e59ce8a -#+system-config-rc.7ce43e2b3fecc5e879ebd625a56b005be1a814769703b471a5403bcc3047d570 +#+system-config-rc.64f11f1d367722e174813e0cf0570b53ce8ea7c15d2e789268a9e4d9d3dc06cf # - build script start - @@ -75,7 +75,7 @@ dest=${pthbs_destdir%/}${prefix} cd '.' -s6rcdb=/home/ccx/versions/system-config-rc.7ce43e2b3fecc5e879ebd625a56b005be1a814769703b471a5403bcc3047d570/config/s6-rc-db +s6rcdb=/home/ccx/versions/system-config-rc.64f11f1d367722e174813e0cf0570b53ce8ea7c15d2e789268a9e4d9d3dc06cf/config/s6-rc-db # Generate init (${dest} must not exist but parent dir does) mkdir -p "$pthbs_destdir//home/ccx/versions" diff --git a/variants/ccx-x86_64/system-config-rc b/variants/ccx-x86_64/system-config-rc @@ -30,7 +30,7 @@ #+busybox-diffutils.eed6ca067c994ab56e63b8b97a60f6e9f3625d3f9aeda53306e23bb42186ce78 #+s6-rc.9aac5b15b54c183366ab03f193a967d0fc66134b1623410032766e062e77bc5d #+fileset.a3b5845ff158d4a14da356583bcbbc7de921ea437f40d47d1f91d28549b384c0 -#+system-config.11b02507d8438f3829ffe150c472ba1cf925fda612fb634897a26cc04792b39c +#+system-config.26befadec515b0ba4d4a278b81e148a95a27021003c775a6b5991cb48bab7837 # - build script start - @@ -40,7 +40,7 @@ dest=${pthbs_destdir%/}${prefix} cd '.' -src=/home/ccx/versions/system-config.11b02507d8438f3829ffe150c472ba1cf925fda612fb634897a26cc04792b39c/config/s6-rc-source +src=/home/ccx/versions/system-config.26befadec515b0ba4d4a278b81e148a95a27021003c775a6b5991cb48bab7837/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/variants/ccx-x86_64/terminus-consolefont b/variants/ccx-x86_64/terminus-consolefont @@ -0,0 +1,106 @@ +#!/usr/bin/env pthbs-build +#+busybox.504428034e649f598212c8994966e36667178683ec90987355f495ad3ca4abac +#+busybox-bzip2.4ea548a271f41e7147568dc02e5071fb200eab38a9a22e733d3106b71e354812 +#+busybox-gzip.0999e8c6a8b7df82fc1cf10ade2468fb2bc4352f76d4b1d2af5099a65ccada9b +#+busybox-lzop.f0d93621bfd8ca106a8590562d93158b05087e5ef48068c7a84d9967b67d2d25 +#+busybox-unzip.737f61aac20ef6c0554fca59bb599bf98e4fb77fbd97fba65a3692ac9d4afb84 +#+busybox-xz.639cf99dd37a7d6f719b937d13af92202e01adf11c130f8647574c1d9ef5b0d2 +#+busybox-cpio.d22266c2b6c056c0ea96873402d06591aa23368ea24d91f1fbf8a8327cb210f8 +#+busybox-dpkg.2b0dd2fa41e946e98f2f8948ae3d3a152a069c77460768d9c76d41f56974e514 +#+busybox-rpm.62bb242b4fbb3fd51b233ed9ce6c257ab997b1ee3a68ef3048656addc98f3d97 +#+busybox-tar.dd3d9b0075fc038df431ce2a16fc1b140de521e1aa6d154dc7b607f9403d5ac0 +#+busybox-ed.6ff6cd59168705c6b256d800cde7e8c69dd05c556520317dae6a0b492029fe6b +#+busybox-sed.8793bcd2536ab32fa528bbb0c22f0c014663ac5e045193aa7bd113a07f58c5b9 +#+busybox-vi.db3d29c62845a55b7c5491d057cb9ea6c6deba93c567f4ef9eb15f06be8ad171 +#+busybox-xxd.9dff38f0c9dbf57856a0824bc23cc99cb31a67ce5138de7a6de2e255880a5696 +#+busybox-process-extra.448a35fa5362e576a23ef306ec6e0da2f625adae08cc5c3b12a01d5d28f76ce6 +#+busybox-procps.835712dc539d5583773d175255a5c4e27b5823d97e855948d27cc2c194247b0f +#+busybox-psmisc.f2434b74cd3e07ddea335da52c222567bc111b621f0f060afef8bcc26a8d96fd +#+busybox-ash.039eb4051853cdde4d03b8dbd5d6128957bf933be5ac398471666e5db0d33dab +#+busybox-bc.e731e83c11906525d676777835256a3f478779eafe7152701adfc46558d73009 +#+busybox-coreutils.a57a12f85d58388c284d4f93f6c485d4bc2a7eac0d0f4be57b20d2ddbd4c8b8f +#+busybox-coreutils-extra.09de38ce2d65026888577e8314766e4b17205b2a99a4fecfdd5cd89c1cd82aed +#+busybox-daemontools.d12e277e7154028f0beaae44ad1e2c7e1cd12d28549b6861604fc634c3e09aaf +#+busybox-grep.474abd8ddad6afb320c55141078cb4507d02c4610181a4d72a4d98ba93434a60 +#+busybox-misc.ea211db457ee098923eeff82a4388d5864254a6c2718f38471b5b2867c73d158 +#+busybox-sh.49a7505969c9882c8a9a7ad3f5dba6d1382add3559f4da21ceafb2708d3fd4c8 +#+busybox-util-linux-unpriv.95b792cd49d1f00d5488b15d93809166916ef3b8a63a69ea11f3bf6e92a74f24 +#+busybox-findutils.db22f512240124b15d61cf8d0ceafebc98649f6f137608a2d1bd66f18e81ad8c +#+nawk.ec8a7f9ea4618a151470a1c1a0026f688a5032eb06b8e459510fe82316c17a60 +#@untar::sha256:a0b181b534ae7496de729ccb50b19bbf2bd4e981f08b0f4142d54f38bf8bb677:consolefonts + + +# - build script start - + +prefix=/home/ccx/versions/$pthbs_package +dest=${pthbs_destdir%/}${prefix} +cd '.' + + +mkdir -p "$dest"/'data' +mv -v consolefonts "$dest"/'data'/ + + + +cd "$pthbs_destdir/home/ccx/versions/$pthbs_package" +find -type d -o -print | awk -F/ ' +BEGIN { + x["./data/consolefonts/ter-v16b.psf.gz"]=1 + x["./data/consolefonts/ter-v16n.psf.gz"]=1 + x["./data/consolefonts/ter-v16v.psf.gz"]=1 +} + +function r1(s) { + sub("^[.]/[^/]*", ".", s) + return s +} +function s1(repl, s) { + sub("^[.]/[^/]*", "./"repl, s) + return s +} +function link(src) { + x[$0]=0 + printf "%s\t%s\n", $0, src + printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr" +} +$1!="."{exit 1} +$2 == "env" { link($0); next } +$2 == ".env-template" { link($0); next } + +$2 == "command" { link($0); next } +$2 == "command" { link($0); next } +$2 == "bin" { link(s1("command", $0)); next } +$2 == "sbin" { link(s1("command", $0)); next } + +$2 == "library.so" { link($0); next } +$2 == "library" { link($0); next } +$2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next } +$2 == "lib" && $NF ~ /\.so(\..*)?$/ { link(s1("library.so", $0)); next } + +$2 == "share" && $3 == "info" { link(s1("info", r1($0))); next } +$2 == "share" && $3 == "man" { link(s1("man", r1($0))); next } +$2 == "share" && $3 == "doc" { link(s1("doc", r1($0))); next } + +$2 == "config" { link($0); next } +$2 == "man" { link($0); next } +$2 == "info" { link($0); next } +$2 == "doc" { link($0); next } +$2 == "data" { link($0); next } +$2 == "include" { link($0); next } + + +{ printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" } + +END { + for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" } + retcode = 0 + for(fname in x) { + if(x[fname]) { + printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr" + retcode = 3 + } + } + exit retcode +}' >.install-links.new +mv .install-links.new .install-links + diff --git a/variants/root-x86_64/default.environment b/variants/root-x86_64/default.environment @@ -88,9 +88,9 @@ #+squashfs-tools.1b91e9f3f87cc15a2eb60ab5b95325158a49b03c20c1262801491563d93311c6 #+mandoc.24165da5b9553ff75b2b70a43d8e584d7f71ab38aa329769e7425e57790e5712 #+tinyssh.b86b96a90e668bd3500db7bac7652e8654ec0dafd0b6c9486a02682cd31f515a -#+system-config.b07753930ea401fda8cc5d69b5afb349cc9431cd3b40081aba09e4c28ed59b51 -#+system-config-rc.ec5437ee08ceff66bf944bfd885fe37f57fdecc270ce4ef90a0337178222d0ed +#+system-config.23843929ebd3343d02b5d1df0013497a15cec5a62dd92dbf5c234cf76993198e +#+system-config-rc.fc26e9866e99069d76d78b6c88abed91155e94e0c98231937e20194ee2b45b07 #+system-config-scripts.bfe6189587fc33d037051c22a904d60dab3f025f4d33de17745f1ea1ecc919bc -#+system-config-init.62d9b03f161671a0b9539edbc5b1ab7217cfb77054cd36371130f696dec877e4 +#+system-config-init.7229b921022453578410ebc54842f92ecda7716f0348203e7983bc80b401b588 #+system-config-zsh.f00ec445d6e46a6d06e6d33b32483662b1574b30616960465e4b3d0325d53668 #+busybox-modutils.4aef0ae5907514beeff60f30370a78d0e294055c92d2409920150a5ebeedca2a \ No newline at end of file diff --git a/variants/root-x86_64/system-config b/variants/root-x86_64/system-config @@ -51,6 +51,7 @@ #+fileset.2156fb8cabd628b062bc9fcc2f673d772a25574dfe5c2c2b779ada64fe9d9d08 #+rsync.0862e31de38b4a570ee619a737c7cd3f382d195dcfeee77fab3c00386fd8609b #+execline.4e773f1ba308227aa5402fd63038f6dcbaf3866ca3fa70555a8bec9b81c8e2d2 +#+terminus-consolefont.df9c7058b4e92943008d50fe24117953423c2840ce9b15d46c4cdec9700223ec #+kbd.8335c364d0912b8b2b25dbf85fa2bd61713505eaf91487dfc178b5eff18fcc6d #+mdevd.3ba58bb7f820dbc30d791987f1034862f021d75dd171e9a8e93e8abc81575bf5 #+s6-linux-utils.34bdcec91aae280416c16a52959e513382aeb67ffd9f68bcdec6f5967434b445 @@ -61,7 +62,7 @@ #+system-config-scripts.bfe6189587fc33d037051c22a904d60dab3f025f4d33de17745f1ea1ecc919bc #+logincaps.30ff2bc38921d839f88b68800716056cc26ffcf61dc953c80e77cb9daadb1be5 #+busybox-modutils.4aef0ae5907514beeff60f30370a78d0e294055c92d2409920150a5ebeedca2a -#@git:055d24bac572481d7dedba7d4ec9df37f620fbfd:system-config +#@git:5bb70b8d36a704288e64b30c5d30e75483e0b005:system-config # - build script start - @@ -71,25 +72,45 @@ dest=${pthbs_destdir%/}${prefix} cd 'system-config' -err_notfound() { - printf >&2 'Executable not found for command "%s"\n' "$1" +err() { + printf >&2 'Error: %s\n' "$1" exit 1 } +err_notfound() { + err "File not provided by environment: '$1'" +} linkdep() { - exe=$(command which "$1") || err_notfound "$1" - exe=$(realpath "$exe") - name=$(basename "$1") - if ! test -x "$exe"; then - printf 'Error: executable not found: %s\n' "$1" + test -e "$pthbs_build_environment/$1") || err_notfound "$1" + rp=$(realpath "$1") || err_notfound "$1" + case $1 in + (/*) + err "malformed linkdep path: '$1'" + ;; + (*/) + err "malformed linkdep path: '$1'" + ;; + (command/*) + if ! test -x "$rp"; then + err "not an executable: '$rp' (linked from '$1')" + fi + ;; + (*) + if ! test -f "$rp"; then + err "not a file: '$rp' (linked from '$1')" + fi + ;; + esac + if test -e "$dest/deps/$1"; then + err "Already linked deps/$1 to $(realpath "$dest/deps/$1"), want $rp" fi - mkdir -p "$dest/deps/command" - ln -sf $exe "$dest/deps/command/$name" + mkdir -p "$dest/deps/$(dirname "$1")" + ln -sf $exe "$dest/deps/$1" } printf '%s\n' >config/etc/motd \ "Welcome to $(cat ./config/hostname)!" \ - 'Current running configuration was generated from system-config:055d24bac572481d7dedba7d4ec9df37f620fbfd' \ - 'Last change on 2025-11-27 20:24:27 +0000 by Jan Pobrislo' + 'Current running configuration was generated from system-config:5bb70b8d36a704288e64b30c5d30e75483e0b005' \ + 'Last change on 2025-12-28 13:36:08 +0000 by Jan Pobrislo' printf '%s\n' >config/etc/skel/loginexec \ "#!$(which execlineb) -S0" \ @@ -101,8 +122,8 @@ env 'pthbs_path_system-config'="$prefix" \ 'pthbs_path_mdevd=/versions/env.b72996087d5776ae6cc04527da2721badc870ebacff57bafde63913d7bcfad2a' \ make -j${JOBS:-1} -l$((1+${JOBS:-1})) all -sort -u build/execfile | while IFS= read exename; do - linkdep "$exename" +sort -u build/linkdep_list | while IFS= read fname; do + linkdep "$fname" done mkdir "$dest/command" diff --git a/variants/root-x86_64/system-config-init b/variants/root-x86_64/system-config-init @@ -50,7 +50,7 @@ #+s6-portable-utils.215fcbacf399929de5124e7f2b5d6ca4549007ccd2319a874170887bedca9a08 #+s6-linux-init.de74cb1d43a63d9c9e4e2a44ee5a7f9a50deab7776bd2b2bd0c3d67cb44f01c3 #+execline.4e773f1ba308227aa5402fd63038f6dcbaf3866ca3fa70555a8bec9b81c8e2d2 -#+system-config-rc.ec5437ee08ceff66bf944bfd885fe37f57fdecc270ce4ef90a0337178222d0ed +#+system-config-rc.fc26e9866e99069d76d78b6c88abed91155e94e0c98231937e20194ee2b45b07 # - build script start - @@ -75,7 +75,7 @@ dest=${pthbs_destdir%/}${prefix} cd '.' -s6rcdb=/versions/system-config-rc.ec5437ee08ceff66bf944bfd885fe37f57fdecc270ce4ef90a0337178222d0ed/config/s6-rc-db +s6rcdb=/versions/system-config-rc.fc26e9866e99069d76d78b6c88abed91155e94e0c98231937e20194ee2b45b07/config/s6-rc-db # Generate init (${dest} must not exist but parent dir does) mkdir -p "$pthbs_destdir//versions" diff --git a/variants/root-x86_64/system-config-rc b/variants/root-x86_64/system-config-rc @@ -30,7 +30,7 @@ #+busybox-diffutils.895f7a6bf6d00136038d8bafa91a6fb1e7027ce5a32e1e3b64a9119fe69ef19a #+s6-rc.e09e2d9c42a1bbc18b406ff114d945db0d3187fd09b703ddd7c28a4d64357ad3 #+fileset.2156fb8cabd628b062bc9fcc2f673d772a25574dfe5c2c2b779ada64fe9d9d08 -#+system-config.b07753930ea401fda8cc5d69b5afb349cc9431cd3b40081aba09e4c28ed59b51 +#+system-config.23843929ebd3343d02b5d1df0013497a15cec5a62dd92dbf5c234cf76993198e # - build script start - @@ -40,7 +40,7 @@ dest=${pthbs_destdir%/}${prefix} cd '.' -src=/versions/system-config.b07753930ea401fda8cc5d69b5afb349cc9431cd3b40081aba09e4c28ed59b51/config/s6-rc-source +src=/versions/system-config.23843929ebd3343d02b5d1df0013497a15cec5a62dd92dbf5c234cf76993198e/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/variants/root-x86_64/terminus-consolefont b/variants/root-x86_64/terminus-consolefont @@ -0,0 +1,106 @@ +#!/usr/bin/env pthbs-build +#+busybox.7f0e4d86f69de7624b0468018b9933c3e3c1757c8ff73938746c292196f916dd +#+busybox-bzip2.52d2053dff44277d3c6f700eec6807d2c64c226e0f1bf589372ff5ff625be40e +#+busybox-gzip.085fc42ce36be284c89a9dec6889cca59dedd07b9ba93a21d3198c4adcac5840 +#+busybox-lzop.bccd8f86de85a74d466d34f802ab1ea355f0a9d9886bdfa4d7bb4a785d695be6 +#+busybox-unzip.237a4ec36283b7fbdb85df583c7c77c0aaf70d335b1cbae09a40a9bb4b6c82bb +#+busybox-xz.db25ed2ffbfc91e7b5cff54faf2e80de59ab5b15167c2c5bb338fa1ee62de122 +#+busybox-cpio.307e9495bcd9b79fd9559882115d55d22c5b687e08886e696f1e53d8db7eebcd +#+busybox-dpkg.3aec8347093bb5b774a0c25795cdf9e624268a3b04cc48e867d74e4e06461db7 +#+busybox-rpm.8435251ea7058aea0cbcd41478b144b1a15c5aa121509af887847c0ef45bf5aa +#+busybox-tar.c77139157bce13db8820740b756572c22e29cfbd8bb8c2a3b22b465b70e2eae9 +#+busybox-ed.4ac872215d7b9c8096c4cfd508434fbd2e825aebd9a9ea8589a0033b8e50aac2 +#+busybox-sed.14269a860b3706f7122b827818365fecaa0e62ce5bc3273e89948685c0953f2d +#+busybox-vi.7e41b306c9c47aaaa281aa8347b9fa6dca260788fd73f53a7ba9260b315627ee +#+busybox-xxd.9df3407fd75b89cb640d65870298eaba77327d6e387d25d8ce1ebab01cb47857 +#+busybox-process-extra.65afeaded3cb8fdeea327262f28f08e50f18d51a2b456ea97b293d200c7f558e +#+busybox-procps.e5dc609521d29d8aec8253147269314439131c088a6beeacc172fc07594c4a37 +#+busybox-psmisc.7d760b69f45bb1b8d458f2f408b9cb3a42e919e8022f0508c440a5fd20ebb66f +#+busybox-ash.fd5d266905d40248735e0e2e1ae22165b6f0d42c0bacb652660f69f39c1ee71e +#+busybox-bc.6f2fe17efab2237c3036eba1c37d432d696d1b5dba130e21365016ceae0a3184 +#+busybox-coreutils.7e581faa6901f832a2a022d72b2858c3091f47afc80a4a463adb2f2a68f1843d +#+busybox-coreutils-extra.5ab183b839676b0780a9a83d75cc345a06221fa34627c44aa3732c4a5a47f9b9 +#+busybox-daemontools.bcea69c867a61fe1d49d2f6a27e406959c484ed20d54fd7c0341828d3cdbd428 +#+busybox-grep.ac20e6a4295eb7fb0a09d700e10e5fe55e2009d2858e0a1525e461d4914e820b +#+busybox-misc.7f0588b97809fac8061c489b686424de1a7dd17d8eb3431aae56513c7288f1e7 +#+busybox-sh.288f0583edc783a176bbbc59a3e854b186258ba2605291377a545cc3191c3d52 +#+busybox-util-linux-unpriv.5a286246aa7204f7fa8c9a247f1c93c751979690a65200030f29e255645c1eae +#+busybox-findutils.207f73a9f41a8f9e279072e920cbf0c38ba6516734fa3cf2c1faf55565613487 +#+nawk.84c186be0a6d09a951a8c6a5377d16b0ba0a9e476e6b554c0c832d6407ebb5b2 +#@untar::sha256:a0b181b534ae7496de729ccb50b19bbf2bd4e981f08b0f4142d54f38bf8bb677:consolefonts + + +# - build script start - + +prefix=/versions/$pthbs_package +dest=${pthbs_destdir%/}${prefix} +cd '.' + + +mkdir -p "$dest"/'data' +mv -v consolefonts "$dest"/'data'/ + + + +cd "$pthbs_destdir/versions/$pthbs_package" +find -type d -o -print | awk -F/ ' +BEGIN { + x["./data/consolefonts/ter-v16b.psf.gz"]=1 + x["./data/consolefonts/ter-v16n.psf.gz"]=1 + x["./data/consolefonts/ter-v16v.psf.gz"]=1 +} + +function r1(s) { + sub("^[.]/[^/]*", ".", s) + return s +} +function s1(repl, s) { + sub("^[.]/[^/]*", "./"repl, s) + return s +} +function link(src) { + x[$0]=0 + printf "%s\t%s\n", $0, src + printf "genlinks >>%s\t%s<<\n", $0, src >>"/dev/stderr" +} +$1!="."{exit 1} +$2 == "env" { link($0); next } +$2 == ".env-template" { link($0); next } + +$2 == "command" { link($0); next } +$2 == "command" { link($0); next } +$2 == "bin" { link(s1("command", $0)); next } +$2 == "sbin" { link(s1("command", $0)); next } + +$2 == "library.so" { link($0); next } +$2 == "library" { link($0); next } +$2 == "lib" && $NF ~ /\.l?a$/ { link(s1("library", $0)); next } +$2 == "lib" && $NF ~ /\.so(\..*)?$/ { link(s1("library.so", $0)); next } + +$2 == "share" && $3 == "info" { link(s1("info", r1($0))); next } +$2 == "share" && $3 == "man" { link(s1("man", r1($0))); next } +$2 == "share" && $3 == "doc" { link(s1("doc", r1($0))); next } + +$2 == "config" { link($0); next } +$2 == "man" { link($0); next } +$2 == "info" { link($0); next } +$2 == "doc" { link($0); next } +$2 == "data" { link($0); next } +$2 == "include" { link($0); next } + + +{ printf "genlinks ##%s## skipped\n", $0 >>"/dev/stderr" } + +END { + for(fname in x) { printf "DEBUG: x[\"%s\"]=\"%s\"\n", fname, x[fname] >"/dev/stderr" } + retcode = 0 + for(fname in x) { + if(x[fname]) { + printf "ERROR: missing expected file \"%s\"\n", fname >"/dev/stderr" + retcode = 3 + } + } + exit retcode +}' >.install-links.new +mv .install-links.new .install-links +