[Reproducible-commits] [misc] 05/07: prebuilder: inline builder to make room to more wrappers
Jérémy Bobbio
lunar at moszumanska.debian.org
Thu Mar 19 16:30:33 UTC 2015
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch master
in repository misc.
commit 64fa95fdbcb211574e3f48937930a254a01f510c
Author: Jérémy Bobbio <lunar at debian.org>
Date: Thu Mar 19 16:41:24 2015 +0100
prebuilder: inline builder to make room to more wrappers
---
prebuilder/rebuild.sh | 26 ++++++++++++--------------
1 file changed, 12 insertions(+), 14 deletions(-)
diff --git a/prebuilder/rebuild.sh b/prebuilder/rebuild.sh
index 5becfd5..cac0e1d 100755
--- a/prebuilder/rebuild.sh
+++ b/prebuilder/rebuild.sh
@@ -1,35 +1,33 @@
#!/bin/sh
BASEPATH="/var/cache/pbuilder/base-reproducible.tgz"
-COWBUILDER=false
+USE_COWBUILDER=
SCRIPT_DIR="$(dirname "$0")"
while getopts b:c o; do
case $o in
b ) BASEPATH="$OPTARG"
- [ "${BASEPATH%.cow}" != "${BASEPATH}" ] && COWBUILDER=true
+ [ "${BASEPATH%.cow}" != "${BASEPATH}" ] && USE_COWBUILDER=true
;;
- c ) COWBUILDER=true;;
+ c ) USE_COWBUILDER=true;;
esac
done
shift "$(expr $OPTIND - 1)"
-sudo_pbuilder() {
- local cmd="$1"
- shift
- if $COWBUILDER; then
- sudo $SUDO_ENV unshare --uts -- cowbuilder "$cmd" --basepath "$BASEPATH" "$@"
- else
- sudo $SUDO_ENV unshare --uts -- pbuilder "$cmd" --basetgz "$BASEPATH" "$@"
- fi
-}
+if [ -n "$USE_COWBUILDER" ]; then
+ BUILDER=cowbuilder
+ BUILDER_OPTS="--basepath $BASEPATH"
+else
+ BUILDER=pbuilder
+ BUILDER_OPTS="--basetgz $BASEPATH"
+fi
PACKAGE="$1"
rm -r b1 b2
mkdir -p b1 b2 logs
-SUDO_ENV="DEB_BUILD_OPTIONS=nocheck TZ=/usr/share/zoneinfo/Etc/GMT+12 LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8" sudo_pbuilder --build --debbuildopts '-b' --buildresult b1 --logfile logs/${PACKAGE}.build1 ${PACKAGE}_*.dsc
+sudo DEB_BUILD_OPTIONS="nocheck" TZ="/usr/share/zoneinfo/Etc/GMT+12" LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" unshare --uts -- $BUILDER --build $BUILDER_OPTS --debbuildopts '-b' --buildresult b1 --logfile logs/${PACKAGE}.build1 ${PACKAGE}_*.dsc
xz < logs/${PACKAGE}.build1 > logs/${PACKAGE}.build1.xz
# Let's make a tarball of the build result. This allows us
@@ -43,7 +41,7 @@ TMPTAR="$TMPDIR/initial_build.tar"
(cd b1 && tar -cf "$TMPTAR" $(dcmd ${PACKAGE}_*.changes))
-SUDO_ENV="DEB_BUILD_OPTIONS=nocheck TZ=/usr/share/zoneinfo/Etc/GMT-14 LANG=fr_CH.UTF-8 LC_ALL=fr_CH.UTF-8" sudo_pbuilder --build --configfile "$SCRIPT_DIR/pbuilderrc.rebuild" --debbuildopts '-b' --buildresult b2 --logfile logs/${PACKAGE}.build2 --hookdir "$SCRIPT_DIR/pbuilderhooks" --inputfile "$TMPTAR" ${PACKAGE}_*.dsc
+sudo DEB_BUILD_OPTIONS="nocheck" TZ="/usr/share/zoneinfo/Etc/GMT-14" LANG="fr_CH.UTF-8" LC_ALL="fr_CH.UTF-8" unshare --uts -- $BUILDER --build $BUILDER_OPTS --configfile "$SCRIPT_DIR/pbuilderrc.rebuild" --debbuildopts '-b' --buildresult b2 --logfile logs/${PACKAGE}.build2 --hookdir "$SCRIPT_DIR/pbuilderhooks" --inputfile "$TMPTAR" ${PACKAGE}_*.dsc
xz < logs/${PACKAGE}.build2 > logs/${PACKAGE}.build2.xz
if [ -f /var/cache/pbuilder/result/debbindiff.html ]; then
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/misc.git
More information about the Reproducible-commits
mailing list