summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/reproducible_lede.sh1
-rwxr-xr-xbin/reproducible_openwrt.sh1
-rw-r--r--bin/reproducible_openwrt_common.sh28
3 files changed, 14 insertions, 16 deletions
diff --git a/bin/reproducible_lede.sh b/bin/reproducible_lede.sh
index 6b639ff3..83bc7ed6 100755
--- a/bin/reproducible_lede.sh
+++ b/bin/reproducible_lede.sh
@@ -25,7 +25,6 @@ case $1 in
case $1 in
openwrt_build |\
openwrt_get_banner |\
- openwrt_mktempdir |\
openwrt_cleanup_tmpdirs) ;; # this is the allowed list
*)
echo "Unsupported remote node function $@"
diff --git a/bin/reproducible_openwrt.sh b/bin/reproducible_openwrt.sh
index c8e38d56..c4c2096e 100755
--- a/bin/reproducible_openwrt.sh
+++ b/bin/reproducible_openwrt.sh
@@ -25,7 +25,6 @@ case $1 in
case $1 in
openwrt_build |\
openwrt_get_banner |\
- openwrt_mktempdir |\
openwrt_cleanup_tmpdirs) ;; # this is the allowed list
*)
echo "Unsupported remote node function $@"
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
}