diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-10-16 17:58:06 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-10-16 17:58:06 +0200 |
commit | 1cc177bd9f009fdf63f2ec7e1730cae40aba59b7 (patch) | |
tree | 77b86e117f6ba0c56f2eb8f5f8940863254bbb76 | |
parent | df9ec72433891e5e3f1cc367e51255e3c47ec11c (diff) | |
download | jenkins.debian.net-1cc177bd9f009fdf63f2ec7e1730cae40aba59b7.tar.xz |
reproducible arch: randomize schroot session names
-rwxr-xr-x | bin/reproducible_build_arch_pkg.sh | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/bin/reproducible_build_arch_pkg.sh b/bin/reproducible_build_arch_pkg.sh index c75caf74..dee34e9d 100755 --- a/bin/reproducible_build_arch_pkg.sh +++ b/bin/reproducible_build_arch_pkg.sh @@ -17,7 +17,7 @@ cleanup_all() { rm $TMPDIR -r echo "$(date -u) - $TMPDIR deleted." if [ "$MODE" != "master" ] ; then - schroot --end-session -c arch-$SRCPACKAGE > /dev/null 2>&1 || true + schroot --end-session -c arch-$SRCPACKAGE-$(basename $TMDPIR) > /dev/null 2>&1 || true fi } @@ -37,10 +37,11 @@ first_build() { echo "Date UTC: $(date -u)" echo "=============================================================================" set -x - schroot --begin-session --session-name=arch-$SRCPACKAGE -c jenkins-reproducible-arch - schroot --run-session -c arch-$SRCPACKAGE --directory /tmp -- cp -r /var/abs/core/$SRCPACKAGE /tmp - schroot --run-session -c arch-$SRCPACKAGE --directory /tmp/$SRCPACKAGE -- makepkg --skippgpcheck - schroot --end-session -c arch-$SRCPACKAGE + local SESSION="arch-$SRCPACKAGE-$(basename $TMDPIR)" + schroot --begin-session --session-name=$SESSION -c jenkins-reproducible-arch + schroot --run-session -c $SESSION --directory /tmp -- cp -r /var/abs/core/$SRCPACKAGE /tmp + schroot --run-session -c $SESSION --directory /tmp/$SRCPACKAGE -- makepkg --skippgpcheck + schroot --end-session -c $SESSION if ! "$DEBUG" ; then set +x ; fi } @@ -51,10 +52,11 @@ second_build() { echo "Date UTC: $(date -u)" echo "=============================================================================" set -x - schroot --begin-session --session-name=arch-$SRCPACKAGE -c jenkins-reproducible-arch - schroot --run-session -c arch-$SRCPACKAGE --directory /tmp -- cp -r /var/abs/core/$SRCPACKAGE /tmp - schroot --run-session -c arch-$SRCPACKAGE --directory /tmp/$SRCPACKAGE -- makepkg --skippgpcheck - schroot --end-session -c arch-$SRCPACKAGE + local SESSION="arch-$SRCPACKAGE-$(basename $TMDPIR)" + schroot --begin-session --session-name=$SESSION -c jenkins-reproducible-arch + schroot --run-session -c $SESSION --directory /tmp -- cp -r /var/abs/core/$SRCPACKAGE /tmp + schroot --run-session -c $SESSION --directory /tmp/$SRCPACKAGE -- makepkg --skippgpcheck + schroot --end-session -c $SESSION if ! "$DEBUG" ; then set +x ; fi } |