From a8fb4b957d1c37ace38162572b35b36f588572b1 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Tue, 22 Sep 2015 20:02:09 +0200 Subject: reproducible: add comments and refactor --- bin/reproducible_setup_pbuilder.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/reproducible_setup_pbuilder.sh b/bin/reproducible_setup_pbuilder.sh index 02e198d1..b4e93027 100755 --- a/bin/reproducible_setup_pbuilder.sh +++ b/bin/reproducible_setup_pbuilder.sh @@ -79,8 +79,8 @@ setup_pbuilder() { shift NAME=$1 shift - PACKAGES="$@" - EXTRA_PACKAGES="locales-all fakeroot disorderfs" + PACKAGES="$@" # from our repo + EXTRA_PACKAGES="locales-all fakeroot disorderfs" # from sid echo "$(date) - creating /var/cache/pbuilder/${NAME}.tgz now..." TMPFILE=$(mktemp --tmpdir=$TEMPDIR pbuilder-XXXXXXXXX) LOG=$(mktemp --tmpdir=$TEMPDIR pbuilder-XXXXXXXX) @@ -94,12 +94,15 @@ setup_pbuilder() { echo "echo '$(cat /etc/apt/apt.conf.d/80proxy)' > /etc/apt/apt.conf.d/80proxy" >> ${TMPFILE} pbuilder_http_proxy="--http-proxy $http_proxy" fi - create_setup_tmpfile ${TMPFILE} "${PACKAGES}" + # setup base.tgz sudo pbuilder --create $pbuilder_http_proxy --basetgz /var/cache/pbuilder/${NAME}-new.tgz --distribution $SUITE --extrapackages "$EXTRA_PACKAGES" + # apply further customisations, eg. install $PACKAGES from our repo + create_setup_tmpfile ${TMPFILE} "${PACKAGES}" if [ "$DEBUG" = "true" ] ; then cat "$TMPFILE" fi sudo pbuilder --execute $pbuilder_http_proxy --save-after-exec --basetgz /var/cache/pbuilder/${NAME}-new.tgz -- ${TMPFILE} | tee ${LOG} + # finally, confirm things are as they should be echo echo "Now let's see whether the correct packages where installed..." for PKG in ${PACKAGES} ; do -- cgit v1.2.3-70-g09d2