From 011bef2cb827cea35dc851c8da7740b8167571a3 Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Tue, 2 Aug 2016 15:21:06 +0200 Subject: reproducible/openwrt|lede: remove openwrt_mktempdir Use the same directory across multiple nodes Signed-off-by: Holger Levsen --- bin/reproducible_openwrt_common.sh | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'bin/reproducible_openwrt_common.sh') diff --git a/bin/reproducible_openwrt_common.sh b/bin/reproducible_openwrt_common.sh index 64e341c1..5eb3b087 100644 --- a/bin/reproducible_openwrt_common.sh +++ b/bin/reproducible_openwrt_common.sh @@ -9,10 +9,6 @@ GENERIC_NODE1=profitbricks-build3-amd64.debian.net GENERIC_NODE2=profitbricks-build4-amd64.debian.net -openwrt_mktempdir() { - mktemp --tmpdir=/srv/workspace/chroots/ -d -t rbuild-lede-build-XXXXXXXX -} - # only called direct on a remote build node openwrt_cleanup_tmpdirs() { export TMPDIR=$1 @@ -216,6 +212,13 @@ openwrt_build() { local CONFIG=$4 export TMPDIR=$5 export TMPBUILDDIR=$TMPDIR/build/ + + if [ -d $TMPDIR ] ; then + echo "=============================================================================" + echo "TMPDIR already exists! $TMPDIR" + echo "=============================================================================" + exit 1 + fi mkdir -p $TMPBUILDDIR # we have also to set the TMP @@ -261,21 +264,18 @@ build_two_times() { ## first run RUN=b1 - TMPDIR_B1=$(ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_mktempdir) - ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_build $TYPE $RUN $TARGET $CONFIG $TMPDIR_B1 - - ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_get_banner $TMPDIR_B1 $TYPE > $BANNER_HTML + ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_build $TYPE $RUN $TARGET $CONFIG $TMPDIR + ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_get_banner $TMPDIR $TYPE > $BANNER_HTML # rsync back logs and images - rsync -a $GENERIC_NODE1:$TMPDIR_B1/$RUN/ $TMPDIR/$RUN/ - ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_cleanup_tmpdirs $TMPDIR_B1 + rsync -a $GENERIC_NODE1:$TMPDIR/$RUN/ $TMPDIR/$RUN/ + ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_cleanup_tmpdirs $TMPDIR ## second run RUN=b2 - TMPDIR_B2=$(ssh $GENERIC_NODE2 reproducible_$TYPE node openwrt_mktempdir) - ssh $GENERIC_NODE2 reproducible_$TYPE node openwrt_build $TYPE $RUN $TARGET $CONFIG $TMPDIR_B2 + ssh $GENERIC_NODE2 reproducible_$TYPE node openwrt_build $TYPE $RUN $TARGET $CONFIG $TMPDIR # rsync back logs and images - rsync -a $GENERIC_NODE2:$TMPDIR_B2/$RUN/ $TMPDIR/$RUN/ - ssh $GENERIC_NODE2 reproducible_$TYPE node openwrt_cleanup_tmpdirs $TMPDIR_B2 + rsync -a $GENERIC_NODE2:$TMPDIR/$RUN/ $TMPDIR/$RUN/ + ssh $GENERIC_NODE2 reproducible_$TYPE node openwrt_cleanup_tmpdirs $TMPDIR } -- cgit v1.2.3-70-g09d2