commit 212f01489449f7dae9e0932de80fc53fa0e9ef4b Author: lagertonne Date: Sun Jun 28 14:25:53 2020 +0200 Initial commit diff --git a/auto/build b/auto/build new file mode 100755 index 0000000..f8d8346 --- /dev/null +++ b/auto/build @@ -0,0 +1,5 @@ +#!/bin/sh + +set -e + +lb build noauto "${@}" 2>&1 | tee build.log diff --git a/auto/clean b/auto/clean new file mode 100755 index 0000000..69874ee --- /dev/null +++ b/auto/clean @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e + +lb clean noauto "${@}" + +rm -f config/binary config/bootstrap config/chroot config/common config/source +rm -f build.log diff --git a/auto/config b/auto/config new file mode 100755 index 0000000..46c27ac --- /dev/null +++ b/auto/config @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +lb config noauto \ + -d buster \ + --debian-installer false \ + --bootappend-live "boot=live components locales=de_DE.UTF-8" \ + "${@}" diff --git a/build-live-cd.sh b/build-live-cd.sh new file mode 100755 index 0000000..8fae8ec --- /dev/null +++ b/build-live-cd.sh @@ -0,0 +1,28 @@ +BASEDIR=/var/lib/machines +ID=$(uuidgen | tr -d -) +NAME=debian-live-cd-$ID +DIR=$BASEDIR/$NAME + +echo "Generating container under $DIR" +zfs snapshot ztstor/ROOT/archie/var/lib/machines/buster-template@${ID} +zfs clone \ + -o mountpoint=$DIR \ + ztstor/ROOT/archie/var/lib/machines/buster-template@${ID} \ + ztstor/ROOT/archie/var/lib/machines/$NAME + +mkdir $DIR/var/live-build/ +rsync -av . $DIR/var/live-build/ + +# Execute stuff inside container +systemd-nspawn -q --pipe -D $DIR /bin/bash << EOF +apt update +apt install -y live-build binutils +cd /var/live-build/ +lb clean --purge +lb config +lb build +EOF + + +echo "Removing container..." +zfs destroy ztstor/ROOT/archie/var/lib/machines/$NAME diff --git a/config/build b/config/build new file mode 100644 index 0000000..ad71056 --- /dev/null +++ b/config/build @@ -0,0 +1,10 @@ +[Image] +Architecture: amd64 +Archive-Areas: main +Distribution: buster +Mirror-Bootstrap: http://deb.debian.org/debian/ + +[FIXME] +Configuration-Version: 1:20190311 +Name: live-image +Type: iso-hybrid diff --git a/config/package-lists/live.list.chroot b/config/package-lists/live.list.chroot new file mode 100644 index 0000000..1e6ef96 --- /dev/null +++ b/config/package-lists/live.list.chroot @@ -0,0 +1,3 @@ +live-boot +live-config +live-config-systemd