summaryrefslogtreecommitdiffstats
path: root/bin/reproducible_coreboot.sh
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/reproducible_coreboot.sh
parent9432849adfc4c466a55d80a60a96f5b111f8af4c (diff)
downloadjenkins.debian.net-ed081206891781087f2cec0edaf4ade648cc50e9.tar.xz
reproducible openwrt and coreboot: build on tmpfs
Diffstat (limited to 'bin/reproducible_coreboot.sh')
-rwxr-xr-xbin/reproducible_coreboot.sh19
1 files changed, 9 insertions, 10 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