summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-06-12 17:35:25 +0200
committerHolger Levsen <holger@layer-acht.org>2015-06-12 17:35:25 +0200
commited081206891781087f2cec0edaf4ade648cc50e9 (patch)
tree1edfcdd15bff845e609dcdaecd818329620e97e2 /bin
parent9432849adfc4c466a55d80a60a96f5b111f8af4c (diff)
downloadjenkins.debian.net-ed081206891781087f2cec0edaf4ade648cc50e9.tar.xz
reproducible openwrt and coreboot: build on tmpfs
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_coreboot.sh19
-rwxr-xr-xbin/reproducible_openwrt.sh19
2 files changed, 18 insertions, 20 deletions
diff --git a/bin/reproducible_coreboot.sh b/bin/reproducible_coreboot.sh
index 972bb8a3..84795f32 100755
--- a/bin/reproducible_coreboot.sh
+++ b/bin/reproducible_coreboot.sh
@@ -16,9 +16,10 @@ set -e
# build for different architectures
ARCHS="i386-elf x86_64-elf armv7a-eabi aarch64-elf mipsel-elf riscv-elf"
-cleanup_tmpdir() {
+cleanup_tmpdirs() {
cd
rm -r $TMPDIR
+ rm -r $TMPBUILDDIR
}
create_results_dirs() {
@@ -70,15 +71,13 @@ call_debbindiff() {
#
# main
#
-
-TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d) # where everything actually happens
-trap cleanup_tmpdir INT TERM EXIT
-cd $TMPDIR
-
+TMPBUILDDIR=$(mktemp --tmpdir=/srv/workspace/chroots/ -d -t coreboot-XXXXXXXX) # used to build on tmpfs
+TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d) # accessable in schroots, used to compare results
DATE=$(date -u +'%Y-%m-%d')
START=$(date +'%s')
-mkdir b1 b2
+trap cleanup_tmpdirs INT TERM EXIT
+cd $TMPBUILDDIR
echo "============================================================================="
echo "$(date -u) - Cloning the coreboot git repository with submodules now."
echo "============================================================================="
@@ -151,7 +150,7 @@ cd coreboot-builds
for i in * ; do
# abuild and sharedutils are build results but not the results we are looking for...
if [ "$i" != "abuild" ] && [ "$i" != "sharedutils" ] ; then
- mkdir $TMPDIR/b1/$i
+ mkdir -p $TMPDIR/b1/$i
if [ -f $i/coreboot.rom ] ; then
cp -p $i/coreboot.rom $TMPDIR/b1/$i/
fi
@@ -186,7 +185,7 @@ umask 0022
cd coreboot-builds
for i in * ; do
if [ -f $i/coreboot.rom ] ; then
- mkdir $TMPDIR/b2/$i
+ mkdir -p $TMPDIR/b2/$i
cp -p $i/coreboot.rom $TMPDIR/b2/$i/
fi
done
@@ -280,5 +279,5 @@ irc_message "$REPRODUCIBLE_URL/coreboot/ has been updated. ($GOOD_PERCENT% repro
echo "============================================================================="
# remove everything, we don't need it anymore...
-cleanup_tmpdir
+cleanup_tmpdirs
trap - INT TERM EXIT
diff --git a/bin/reproducible_openwrt.sh b/bin/reproducible_openwrt.sh
index c10879b1..13b8b6b7 100755
--- a/bin/reproducible_openwrt.sh
+++ b/bin/reproducible_openwrt.sh
@@ -12,9 +12,10 @@ common_init "$@"
. /srv/jenkins/bin/reproducible_common.sh
set -e
-cleanup_tmpdir() {
+cleanup_tmpdirs() {
cd
rm -r $TMPDIR
+ rm -r $TMPBUILDDIR
}
create_results_dirs() {
@@ -67,15 +68,13 @@ call_debbindiff() {
#
# main
#
-
-TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d) # where everything actually happens
-trap cleanup_tmpdir INT TERM EXIT
-cd $TMPDIR
-
+TMPBUILDDIR=$(mktemp --tmpdir=/srv/workspace/chroots/ -d -t openwrt-XXXXXXXX) # used to build on tmpfs
+TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d) # accessable in schroots, used to compare results
DATE=$(date -u +'%Y-%m-%d')
START=$(date +'%s')
-mkdir b1 b2
+trap cleanup_tmpdirs INT TERM EXIT
+cd $TMPBUILDDIR
echo "============================================================================="
echo "$(date -u) - Cloning the OpenWRT git repository now."
echo "============================================================================="
@@ -119,7 +118,7 @@ nice ionice -c 3 \
cd bin
for i in * ; do
cd $i
- mkdir $TMPDIR/b1/$i
+ mkdir -p $TMPDIR/b1/$i
for j in $(find . -name "*.bin") ; do
cp -p $j $TMPDIR/b1/$i/
done
@@ -177,7 +176,7 @@ umask 0022
cd bin
for i in * ; do
cd $i
- mkdir $TMPDIR/b2/$i
+ mkdir -p $TMPDIR/b2/$i
for j in $(find . -name "*.bin") ; do
cp -p $j $TMPDIR/b2/$i/
done
@@ -294,5 +293,5 @@ irc_message "$REPRODUCIBLE_URL/openwrt/ has been updated. ($GOOD_PERCENT% reprod
echo "============================================================================="
# remove everything, we don't need it anymore...
-cleanup_tmpdir
+cleanup_tmpdirs
trap - INT TERM EXIT