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.sh13
3 files changed, 14 insertions, 1 deletions
diff --git a/bin/reproducible_lede.sh b/bin/reproducible_lede.sh
index bccc6d00..cf19221f 100755
--- a/bin/reproducible_lede.sh
+++ b/bin/reproducible_lede.sh
@@ -27,6 +27,7 @@ case $1 in
openwrt_build |\
openwrt_download |\
openwrt_get_banner |\
+ node_create_tmpdirs |\
node_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 cf7eedc9..07233d2b 100755
--- a/bin/reproducible_openwrt.sh
+++ b/bin/reproducible_openwrt.sh
@@ -27,6 +27,7 @@ case $1 in
openwrt_build |\
openwrt_download |\
openwrt_get_banner |\
+ node_create_tmpdirs |\
node_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 936a48d4..042a47e8 100644
--- a/bin/reproducible_openwrt_common.sh
+++ b/bin/reproducible_openwrt_common.sh
@@ -23,6 +23,16 @@ node_cleanup_tmpdirs() {
rm -rf $TMPDIR
}
+node_create_tmpdirs() {
+ export TMPDIR=$1
+ # (very simple) check what we are creating
+ if [ "${TMPDIR:0:26}" != "/srv/reproducible-results/" ] || [ ${#TMPDIR} -le 26 ] ; then
+ echo "Something very strange with \$TMPDIR=$TMPDIR exiting instead of doing create."
+ exit 1
+ fi
+ mkdir -p $TMPDIR/download
+}
+
# called as trap handler
# called on cleanup
master_cleanup_tmpdirs() {
@@ -206,7 +216,6 @@ openwrt_download() {
local CONFIG=$3
local TMPDIR=$4
- mkdir -p $TMPDIR/download
cd $TMPDIR/download
# checkout the repo
@@ -295,6 +304,8 @@ build_two_times() {
TARGET=$2
CONFIG=$3
+ ssh $GENERIC_NODE1 reproducible_$TYPE node node_create_tmpdirs $TMPDIR
+ ssh $GENERIC_NODE2 reproducible_$TYPE node node_create_tmpdirs $TMPDIR
# download and prepare openwrt on node b1
ssh $GENERIC_NODE1 reproducible_$TYPE node openwrt_download $TYPE $TARGET $CONFIG $TMPDIR
rsync -a $GENERIC_NODE1:$TMPDIR/download/ $TMPDIR/download/