linux-qubasis
linux oasis port as a qubes template
git clone https://9o.is/git/linux-qubasis.git
commit 9f843f77b13868c299620e3d00899fe19e4ef14e parent e21ec8816aef8805a88756d2a7414b054d45963d Author: Jul <jul@9o.is> Date: Wed, 19 Nov 2025 10:00:37 -0500 add qvm_create Diffstat:
| M | qubes/example/gen.sh | | | 2 | ++ |
| M | qubes/genfn.sh | | | 17 | ++++++++++++++--- |
| M | qubes/rules.sh | | | 3 | +++ |
3 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/qubes/example/gen.sh b/qubes/example/gen.sh @@ -1,5 +1,7 @@ var prefix /usr +qvm_create --class TemplateVM --label black + pkgexclude $libdir/.* pkgexclude $includedir/.* diff --git a/qubes/genfn.sh b/qubes/genfn.sh @@ -11,7 +11,6 @@ qvm() { init_qvm() { FSPECS= INSTALL= - POLICIES= PKGEXCLUDE= var qvm $1 @@ -31,8 +30,12 @@ fini_qvm() { phony build $outdir/nofspecs fi - touch noinstall - phony install $outdir/noinstall + if [ "$INSTALL" ]; then + phony install $INSTALL + else + touch noinstall + phony install $outdir/noinstall + fi } pkg() { @@ -89,3 +92,11 @@ qubes_prefs() { INSTALL="$INSTALL $_out" } + +qvm_create() { + _out=$outdir/created + build qvm_create $_out '||' $POLICIES + bind args $* + + INSTALL="$INSTALL $_out" +} diff --git a/qubes/rules.sh b/qubes/rules.sh @@ -27,3 +27,6 @@ bind description 'QUBES POLICY $policy' rule qubes_prefs 'qubes-prefs $args && touch $out' bind description 'QUBES PREFS $args' + +rule qvm_create 'qvm-create $qvm $args 2>&1 | xargs -0 | grep -qE "^(|.* already exists)$$" && touch $out' +bind description 'QVM CREATE $qvm'