Initial commit

This commit is contained in:
lagertonne 2020-06-28 14:25:53 +02:00
commit 212f014894
6 changed files with 63 additions and 0 deletions

5
auto/build Executable file
View file

@ -0,0 +1,5 @@
#!/bin/sh
set -e
lb build noauto "${@}" 2>&1 | tee build.log

8
auto/clean Executable file
View file

@ -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

9
auto/config Executable file
View file

@ -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" \
"${@}"

28
build-live-cd.sh Executable file
View file

@ -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

10
config/build Normal file
View file

@ -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

View file

@ -0,0 +1,3 @@
live-boot
live-config
live-config-systemd