linux-qubasis

linux oasis port as a qubes template

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

commit 52de7a5548fecab341d14cb74b20a7389448d070
parent 9f843f77b13868c299620e3d00899fe19e4ef14e
Author: Jul <jul@9o.is>
Date:   Wed, 19 Nov 2025 23:45:18 -0500

qvm_create handles deps for templates

Diffstat:
Dqubes/30-build.policy | 1-
Aqubes/dom0/30-build.policy | 1+
Aqubes/dom0/gen.sh | 1+
Aqubes/example-app/gen.sh | 1+
Mqubes/gen.sh | 3++-
Mqubes/genfn.sh | 26+++++++++++++++++++-------
6 files changed, 24 insertions(+), 9 deletions(-)

diff --git a/qubes/30-build.policy b/qubes/30-build.policy @@ -1 +0,0 @@ -* * build * allow diff --git a/qubes/dom0/30-build.policy b/qubes/dom0/30-build.policy @@ -0,0 +1 @@ +#* * build * allow diff --git a/qubes/dom0/gen.sh b/qubes/dom0/gen.sh @@ -0,0 +1 @@ +qubes_policy 30-build.policy diff --git a/qubes/example-app/gen.sh b/qubes/example-app/gen.sh @@ -0,0 +1 @@ +qvm_create --template example --label black diff --git a/qubes/gen.sh b/qubes/gen.sh @@ -14,9 +14,10 @@ var pkgexclude import rules.sh import genfn.sh -qubes_policy 30-build.policy qubes_prefs clockvm sys-net +qvm dom0 +qvm example-app qvm example phony build $BUILDS diff --git a/qubes/genfn.sh b/qubes/genfn.sh @@ -1,6 +1,5 @@ BUILDS= INSTALL= -POLICIES= qvm() { BUILDS="$BUILDS $dir/$1/build" @@ -30,8 +29,10 @@ fini_qvm() { phony build $outdir/nofspecs fi - if [ "$INSTALL" ]; then + if [ "$INSTALL" ] && [ $1 = dom0 ]; then phony install $INSTALL + elif [ "$INSTALL" ]; then + phony install $INSTALL '||' ./qubes/dom0/install else touch noinstall phony install $outdir/noinstall @@ -75,19 +76,18 @@ pkgexclude() { qubes_policy() { _file=${1##*/} - _out=$outdir/policy/$_file + _out=$outdir/$_file _name=${_file%.*} build qubes_policy $_out $1 bind policy $_name - POLICIES="$POLICIES $_out" INSTALL="$INSTALL $_out" } qubes_prefs() { _out=$outdir/qubes-pref-$1 - build qubes_prefs $_out '||' $POLICIES + build qubes_prefs $_out bind args $* INSTALL="$INSTALL $_out" @@ -95,8 +95,20 @@ qubes_prefs() { qvm_create() { _out=$outdir/created - build qvm_create $_out '||' $POLICIES - bind args $* + _args= + _deps= + + while [ $# -gt 0 ]; do + case $1 in + --template) _deps=./qubes/$2/create + esac + _args="$_args $1" + shift + done + + build qvm_create $_out '||' $_deps + bind args $_args + phony create $_out INSTALL="$INSTALL $_out" }