linux-qubasis

linux oasis port as a qubes template

git clone https://9o.is/git/linux-qubasis.git

commit 0eda8d2f06d06f6a9eef5349ca93f0910ea002dd
parent 3a2ec066016c1a9613dcb1ac2315f9dcdd33a61a
Author: Jul <jul@9o.is>
Date:   Sun, 19 Oct 2025 13:21:29 -0400

add f42 test template

Diffstat:
Mgen.sh | 5+++--
Mninja/functions.sh | 7++++---
Mninja/qubes-fspec.sh | 11++++++-----
Mninja/rules.ninja | 2+-
Atpl/f42/gen.sh | 12++++++++++++
5 files changed, 26 insertions(+), 11 deletions(-)

diff --git a/gen.sh b/gen.sh @@ -55,7 +55,8 @@ subgen pkg/xz-embedded subgen pkg/zlib subgen pkg/zstd -#subgen tpl/example -subgen tpl/alpine-template +# subgen tpl/example +# subgen tpl/alpine-template +subgen tpl/f42 default build diff --git a/ninja/functions.sh b/ninja/functions.sh @@ -219,8 +219,8 @@ headers_exist() { } template() { - if [ $# -eq 1 ]; then - _ninja_template="$1" + if [ $# -lt 3 ]; then + _ninja_template="$1 $2" return fi @@ -613,9 +613,10 @@ _ninja_flush_build() { if [ "$_ninja_template" ]; then set -- $_ninja_template - if [ $# -eq 1 ]; then + if [ $# -lt 3 ]; then build qubes-fspec $outdir/qubes-installed '|' $basedir/ninja/qubes-fspec.sh $hostdir/pax $outdir/root.tar.zstd bind template $1 + bind path $2 bind tar $outdir/root.tar.zstd else build qubes-install $outdir/qubes-installed '|' $basedir/ninja/qubes-install.sh $hostdir/pax $outdir/root.tar.zstd diff --git a/ninja/qubes-fspec.sh b/ninja/qubes-fspec.sh @@ -1,16 +1,17 @@ set -eu template=$1 -tar=$2 +path=$2 +tar=$3 # Don't forget to add the following policies to dom0. Replace "{vm}" with the # name of the this vm, and tag the template vms with "build-client". VMs tagged # with build-client should have rpc /etc/qubes-rpc/oasis.FspecUpdate that # extracts the archive. # -# admin.vm.CurrentState * {vm} @tag:build-client allow target=dom0 -# admin.vm.Shutdown * {vm} @tag:build-client allow target=dom0 -# build.FspecUpdate * {vm} @tag:build-client allow +# admin.vm.CurrentState * {vm} @tag:build-client allow target=dom0 +# admin.vm.Shutdown * {vm} @tag:build-client allow target=dom0 +# build.FspecUpdate +{path} {vm} @tag:build-client allow error() { printf "Failed installing qubes fspec '%s': %s\n" "$template" "$*" @@ -46,7 +47,7 @@ set_running() { } update() { - zstd -d --stdout $tar | qrexec-client-vm $template build.FspecUpdate 1>/dev/null 2>&1 + zstd -d --stdout $tar | qrexec-client-vm $template build.FspecUpdate+$path 1>/dev/null 2>&1 status=$? if [ $status -ne 0 ]; then diff --git a/ninja/rules.ninja b/ninja/rules.ninja @@ -103,5 +103,5 @@ rule qubes-install pool = console rule qubes-fspec - command = sh $basedir/ninja/qubes-fspec.sh $template $tar && touch $out + command = sh $basedir/ninja/qubes-fspec.sh $template $path $tar && touch $out description = QUBES-FSPEC $template diff --git a/tpl/f42/gen.sh b/tpl/f42/gen.sh @@ -0,0 +1,12 @@ +template f42 build + +pkg ag +pkg fe +pkg less +pkg mandoc +pkg oksh +pkg pax +pkg sbase +pkg st +pkg ubase +pkg vis