From 507fee538cc413b4b04a648eaccca658942d0baf Mon Sep 17 00:00:00 2001 From: Matthias Klumpp Date: Tue, 4 Oct 2016 22:53:51 +0200 Subject: [PATCH] Initial set of live scripts Forked off from Tanglu. --- auto/build | 7 +++ auto/clean | 13 ++++++ auto/config | 103 ++++++++++++++++++++++++++++++++++++++++++ helper/make_chroot.sh | 9 ++++ 4 files changed, 132 insertions(+) create mode 100755 auto/build create mode 100755 auto/clean create mode 100755 auto/config create mode 100644 helper/make_chroot.sh diff --git a/auto/build b/auto/build new file mode 100755 index 0000000..e29d823 --- /dev/null +++ b/auto/build @@ -0,0 +1,7 @@ +#!/bin/sh + +export RELEASE_green="3.0" + +export DEBOOTSTRAP_OPTIONS="--keyring=/usr/share/keyrings/pureos-archive-keyring.gpg" + +lb build noauto "${@}" 2>&1 | tee build.log diff --git a/auto/clean b/auto/clean new file mode 100755 index 0000000..0f64aca --- /dev/null +++ b/auto/clean @@ -0,0 +1,13 @@ +#!/bin/sh + +lb clean noauto "${@}" + +rm -f config/binary config/bootstrap config/chroot config/common config/source +rm -rf config/includes.chroot/root config/includes.chroot/home +rm -rf config/package-lists +rm -f config/bootloaders/syslinux/splash.svg +rm -f config/bootloaders/isolinux/splash.svg +rm -f config/bootloaders/syslinux/live.cfg.in +rm -f config/bootloaders/isolinux/live.cfg.in +rm -f config/bootloaders/isolinux/grub-efi.cfg +rm -f build.log diff --git a/auto/config b/auto/config new file mode 100755 index 0000000..79b5c4a --- /dev/null +++ b/auto/config @@ -0,0 +1,103 @@ +#!/bin/bash -e + +# some fancy colors +if [ $(tty -s) ]; then + RED=$(tput setaf 1) + BRIGHT=$(tput bold) + NORMAL=$(tput sgr0) +else + RED= + BRIGHT= + NORMAL= +fi + +# current architecture +arch=$(dpkg --print-architecture) + +# options +lb_opts="" +dist="green" +dist_version="3.0" +dist_reltag="" + +# live-build doesn't work if --parent-debian-distribution is unknown of +# debian-cd => we have to put a symlink so that it deals with Tanglu like jessie/sid +if [ ! -e "/usr/share/live/build/data/debian-cd/$dist" ]; then + if [ -w /usr/share/live/build/data/debian-cd ]; then + ln -sf sid "/usr/share/live/build/data/debian-cd/$dist" + else + echo "ERROR: Run this first:" + echo "ln -sf sid /usr/share/live/build/data/debian-cd/$dist" + exit 1 + fi +fi + +# Debian-installer config +debian_installer_opts="--debian-installer-gui true --debian-installer-distribution $dist" + +case "$arch" in + amd64) + debian_installer_opts="$debian_installer_opts --debian-installer live" + ;; + i386) + debian_installer_opts="$debian_installer_opts --debian-installer live --linux-flavours 686-pae" + ;; + *) + echo "WARNING: configuration not tested on arch $arch" >&2 + ;; +esac +# add installer opts to lb config call +lb_opts="$lb_opts $debian_installer_opts" + +# create some directories which we will need later +mkdir -p config/package-lists +mkdir -p config/includes.chroot + +lb_opts="$lb_opts --security false --updates false" + +# FIXME: should be fixed in the live-build autodetection +case "$arch" in + amd64) + kernel_flavour="amd64" + ;; + i386) + kernel_flavour="686-pae" + ;; + *) + echo "WARNING: configuration not tested on arch $arch" >&2 + ;; +esac + +# create package config +cat > config/package-lists/desktop.list.chroot <