commit 5bb70b8d36a704288e64b30c5d30e75483e0b005
parent 055d24bac572481d7dedba7d4ec9df37f620fbfd
Author: Jan Pobrislo <ccx@te2000.cz>
Date: Sun, 28 Dec 2025 13:36:08 +0000
rework linkdep to allow non-executables, use data/consolefonts for setfont
Diffstat:
4 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/Makefile b/Makefile
@@ -34,9 +34,9 @@ build/fstab.awk: fstab.aat parse_fs.include.awk rc-common.aat
out/s6-rc.fileset: build/s6-rc.qawk build/s6-rc-mount.awk fs build/config
mkdir -p out
- rm -f ./build/execfile
- $(AWK) -v sort_tmpfile=./build/s6-rc-mount.awk.tmp_sort -v execfile=./build/execfile -f version_path.awk -f build/s6-rc-mount.awk fs >'$@.new'
- $(AWK) -v sort_tmpfile=./build/s6-rc.qawk.tmp_sort -v execfile=./build/execfile -f build/s6-rc.qawk build/config >>'$@.new'
+ rm -f ./build/linkdep_list
+ $(AWK) -v sort_tmpfile=./build/s6-rc-mount.awk.tmp_sort -v linkdep_list=./build/linkdep_list -f version_path.awk -f build/s6-rc-mount.awk fs >'$@.new'
+ $(AWK) -v sort_tmpfile=./build/s6-rc.qawk.tmp_sort -v linkdep_list=./build/linkdep_list -f build/s6-rc.qawk build/config >>'$@.new'
if test -d out/s6-rc-source; then rm -r out/s6-rc-source; fi
mkdir ./out/s6-rc-source
fsapply ./out/s6-rc-source "$$PWD/"'$@.new'
diff --git a/config.aat b/config.aat
@@ -9,7 +9,7 @@ tty_max=4
# Number of gettys to spawn (should be less 9 to not overlap with rescue getty)
getty_max=4
-tty_setfont=ter-v16n
+tty_setfont=ter-v16n.pcf.gz
dev_manager=mdevd
diff --git a/s6-rc.aat b/s6-rc.aat
@@ -107,12 +107,14 @@
|}
|if(get("tty_setfont")) {
+|fontpath = get("tty_setfont")
+|fontpath = fontpath ~ "/" ? q(fontpath) : qdep("data/consolefonts/"fontpath)
|add_to_bundle("ok-all-but-tty", "setfont")
|for(tty=1; tty<=(<tty_max>+0); tty++) {
|start_oneshot("setfont-tty" tty)
|in_bundle("setfont")
|up()
- redirfd -r 0 /dev/tty{{tty}} setfont {<tty_setfont>}
+ redirfd -r 0 /dev/tty{{tty}} {{qexec("setfont")}} {{fontpath}}
|end()
|}
|}
diff --git a/version_path.awk b/version_path.awk
@@ -6,13 +6,17 @@ function get_package_path(name) {
return ENVIRON["pthbs_path_"name]
}
-function exec_path(name) {
- if(!length(execfile)) {
- print "version_path.awk: Fatal: 'execfile' variable not specified" >"/dev/stderr"
+function envdep_path(name) {
+ if(!length(linkdep_list)) {
+ print "version_path.awk: Fatal: 'linkdep_list' variable not specified" >"/dev/stderr"
exit 2
}
- print name >>execfile
- return get_package_path("system-config") "/deps/command/" name
+ print name >>linkdep_list
+ return get_package_path("system-config") "/deps/" name
+}
+
+function exec_path(name) {
+ envdep_path("command/"name)
}
function q(s) { # quote string for execline
@@ -26,6 +30,10 @@ function qexec(s) {
return q(exec_path(s))
}
+function qdep(s) {
+ return q(envdep_path(s))
+}
+
function config_path(name) {
return get_package_path("system-config") "/config/" name
}