summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2016-10-12 18:37:36 +0200
committerHolger Levsen <holger@layer-acht.org>2016-10-12 18:40:01 +0200
commit093579017eb890caf5f2278f273200750f736f7e (patch)
tree3a8333298b6721f542aca075575e945b887fe7af
parent3d39a1dac89946d07d7771055e2f56d533384ebc (diff)
downloadjenkins.debian.net-093579017eb890caf5f2278f273200750f736f7e.tar.xz
reproducible/openwrt|lede: add command node_create_tmpdirs
create tmpdir in a spereate step Signed-off-by: Holger Levsen <holger@layer-acht.org>
-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/