images -> chroots

This commit is contained in:
Alexandre Aubin 2020-05-07 15:11:46 +00:00
parent f77f7fc8aa
commit 5756e8f221
7 changed files with 13 additions and 11 deletions

3
.gitignore vendored
View file

@ -1,2 +1,3 @@
images/* chroots/*
config/keys/* config/keys/*
gitrepos/*

View file

@ -1,20 +1,21 @@
#!/bin/bash #!/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 DISTRIB=buster
readonly INIT_DIR=$PWD readonly INIT_DIR=$PWD
readonly ARCHS="amd64" #readonly ARCHS="amd64"
#readonly ARCHS="amd64 i386 armhf armel arm64" #readonly ARCHS="i386 armhf armel arm64"
readonly ARCHS="arm64"
function main() function main()
{ {
for ARCH in $ARCHS for ARCH in $ARCHS
do do
build_image $ARCH build_chroot $ARCH
done done
} }
function build_image() function build_chroot()
{ {
local ARCH=$1 local ARCH=$1
local CHROOT=chroot-${DISTRIB}-${ARCH} local CHROOT=chroot-${DISTRIB}-${ARCH}
@ -48,7 +49,7 @@ function build_image()
tar -czf $INIT_DIR/${DISTRIB}-${ARCH}.tgz ./* tar -czf $INIT_DIR/${DISTRIB}-${ARCH}.tgz ./*
echo "" 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 "" echo ""
} }

View file

@ -25,7 +25,7 @@ GIT_REPOS="$HOME_VINAIGRETTE/gitrepos/"
REPO_DIR="/var/www/repo/debian" REPO_DIR="/var/www/repo/debian"
PBUILDER_HOME="$HOME_VINAIGRETTE/scripts/pbuilder/" PBUILDER_HOME="$HOME_VINAIGRETTE/scripts/pbuilder/"
PBUILDER_IMAGES="$HOME_VINAIGRETTE/images/" PBUILDER_CHROOTS="$HOME_VINAIGRETTE/chroots/"
PBUILDER_RESULTS="$PBUILDER_HOME/result" PBUILDER_RESULTS="$PBUILDER_HOME/result"
DAILY_PACKAGES="$PBUILDER_HOME/packages/" DAILY_PACKAGES="$PBUILDER_HOME/packages/"
PBUILDER_CONF="$HOME_VINAIGRETTE/config/pbuilder/" PBUILDER_CONF="$HOME_VINAIGRETTE/config/pbuilder/"

View file

@ -40,7 +40,7 @@ ln -s $VINAIGRETTE_HOME/config/rebuildd.conf /etc/rebuildd/rebuilddrc
rm /etc/default/rebuildd rm /etc/default/rebuildd
ln -s $VINAIGRETTE_HOME/config/rebuildd.default /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 ln -s /var/cache/pbuilder/result $PBUILDER_RESULTS
rm -f /etc/pbuilderrc rm -f /etc/pbuilderrc

View file

@ -12,7 +12,7 @@ export DEBSIGN_KEYID
export DEBFULLNAME export DEBFULLNAME
export DEBEMAIL export DEBEMAIL
readonly IMG="${PBUILDER_IMAGES}/${DISTRIB}-amd64.tgz" readonly IMG="${PBUILDER_CHROOTS}/${DISTRIB}-amd64.tgz"
# ##### # # ##### #
# Usage # # Usage #

View file

@ -37,7 +37,7 @@ echo "######################"
# Format needed pbuilder arguments # Format needed pbuilder arguments
DSC_FILE="${package}_${version}.dsc" DSC_FILE="${package}_${version}.dsc"
BASE_TGZ="${PBUILDER_IMAGES}/${codename}-${arch}.tgz" BASE_TGZ="${PBUILDER_CHROOTS}/${codename}-${arch}.tgz"
EXTRA_OPTS=() EXTRA_OPTS=()
CONFIGFILE="" CONFIGFILE=""