linux-qubasis

linux oasis port as a qubes template

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

commit 1cb9355ca1b4f03c350345e2eba0dad620071d26
parent 78d9631f3dc52eda0bda8aac4ab5d42d64871544
Author: Jul <jul@9o.is>
Date:   Fri, 22 Aug 2025 14:10:30 +0800

create chroot script

Diffstat:
Ascript/chroot | 27+++++++++++++++++++++++++++
1 file changed, 27 insertions(+), 0 deletions(-)

diff --git a/script/chroot b/script/chroot @@ -0,0 +1,27 @@ +#!/bin/sh +set -e + +if [ "$#" != 2 ] ; then + echo 'usage: chroot template prog' >&2 + exit 2 +fi + +basedir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)/.." +cd $basedir + +template="tpl/$1" +shell="$2" +rootdir=out/$template/root + +if [ ! -d "$basedir/$template" ]; then + echo 'error: template does not exist' >&2 + exit 2 +fi + +samu $template/configure +samu $template/build + +mkdir $rootdir/dev +sudo mount --bind /dev $rootdir/dev + +sudo chroot $rootdir $shell