From 5756e8f2215adce4c497830a8e905576e3ccc708 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Thu, 7 May 2020 15:11:46 +0000 Subject: [PATCH] images -> chroots --- .gitignore | 3 ++- {images => chroots}/.gitkeep | 0 images/make-images => chroots/make-chroots | 13 +++++++------ config/config | 2 +- init.sh | 2 +- scripts/build_deb | 2 +- scripts/rebuildd/build-binaries | 2 +- 7 files changed, 13 insertions(+), 11 deletions(-) rename {images => chroots}/.gitkeep (100%) rename images/make-images => chroots/make-chroots (70%) diff --git a/.gitignore b/.gitignore index d33d4ea..6de2a8e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ -images/* +chroots/* config/keys/* +gitrepos/* diff --git a/images/.gitkeep b/chroots/.gitkeep similarity index 100% rename from images/.gitkeep rename to chroots/.gitkeep diff --git a/images/make-images b/chroots/make-chroots similarity index 70% rename from images/make-images rename to chroots/make-chroots index 429eaa3..37cd5c2 100755 --- a/images/make-images +++ b/chroots/make-chroots @@ -1,20 +1,21 @@ #!/bin/bash -# For some reason, building images for buster from stretch requires libdebian-installer4 0.119 instead of 0.110, c.f. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=904699 ... installed it by manually downloading and dpkg -i the .deb +# For some reason, building chroots for buster from stretch requires libdebian-installer4 0.119 instead of 0.110, c.f. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=904699 ... installed it by manually downloading and dpkg -i the .deb readonly DISTRIB=buster readonly INIT_DIR=$PWD -readonly ARCHS="amd64" -#readonly ARCHS="amd64 i386 armhf armel arm64" +#readonly ARCHS="amd64" +#readonly ARCHS="i386 armhf armel arm64" +readonly ARCHS="arm64" function main() { for ARCH in $ARCHS do - build_image $ARCH + build_chroot $ARCH done } -function build_image() +function build_chroot() { local ARCH=$1 local CHROOT=chroot-${DISTRIB}-${ARCH} @@ -48,7 +49,7 @@ function build_image() tar -czf $INIT_DIR/${DISTRIB}-${ARCH}.tgz ./* echo "" - echo "Output image should be available as $INIT_DIR/${DISTRIB}-${ARCH}.tgz" + echo "Output chroot archive should be available as $INIT_DIR/${DISTRIB}-${ARCH}.tgz" echo "" } diff --git a/config/config b/config/config index f566ccd..8587e9e 100644 --- a/config/config +++ b/config/config @@ -25,7 +25,7 @@ GIT_REPOS="$HOME_VINAIGRETTE/gitrepos/" REPO_DIR="/var/www/repo/debian" PBUILDER_HOME="$HOME_VINAIGRETTE/scripts/pbuilder/" -PBUILDER_IMAGES="$HOME_VINAIGRETTE/images/" +PBUILDER_CHROOTS="$HOME_VINAIGRETTE/chroots/" PBUILDER_RESULTS="$PBUILDER_HOME/result" DAILY_PACKAGES="$PBUILDER_HOME/packages/" PBUILDER_CONF="$HOME_VINAIGRETTE/config/pbuilder/" diff --git a/init.sh b/init.sh index a8d6538..3ac6e89 100755 --- a/init.sh +++ b/init.sh @@ -40,7 +40,7 @@ ln -s $VINAIGRETTE_HOME/config/rebuildd.conf /etc/rebuildd/rebuilddrc rm /etc/default/rebuildd ln -s $VINAIGRETTE_HOME/config/rebuildd.default /etc/default/rebuildd -ln -s $VINAIGRETTE_HOME/images /var/cache/pbuilder/images +ln -s $VINAIGRETTE_HOME/chroots /var/cache/pbuilder/chroots ln -s /var/cache/pbuilder/result $PBUILDER_RESULTS rm -f /etc/pbuilderrc diff --git a/scripts/build_deb b/scripts/build_deb index daa2cff..54ad54b 100755 --- a/scripts/build_deb +++ b/scripts/build_deb @@ -12,7 +12,7 @@ export DEBSIGN_KEYID export DEBFULLNAME export DEBEMAIL -readonly IMG="${PBUILDER_IMAGES}/${DISTRIB}-amd64.tgz" +readonly IMG="${PBUILDER_CHROOTS}/${DISTRIB}-amd64.tgz" # ##### # # Usage # diff --git a/scripts/rebuildd/build-binaries b/scripts/rebuildd/build-binaries index fb13395..46e65ef 100755 --- a/scripts/rebuildd/build-binaries +++ b/scripts/rebuildd/build-binaries @@ -37,7 +37,7 @@ echo "######################" # Format needed pbuilder arguments DSC_FILE="${package}_${version}.dsc" -BASE_TGZ="${PBUILDER_IMAGES}/${codename}-${arch}.tgz" +BASE_TGZ="${PBUILDER_CHROOTS}/${codename}-${arch}.tgz" EXTRA_OPTS=() CONFIGFILE=""