summaryrefslogtreecommitdiffstats
path: root/hosts
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-08-28 22:48:42 +0200
committerHolger Levsen <holger@layer-acht.org>2015-08-29 10:00:15 +0200
commite5ddf396a38e4e76b742272991560761cc807814 (patch)
tree47c5d522fb2f27f16d15ae327d198c307bd2df39 /hosts
parentb3a691482d117fae51f9d294e33da0a6d5b67763 (diff)
downloadjenkins.debian.net-e5ddf396a38e4e76b742272991560761cc807814.tar.xz
reproducible: use disorderfs in the 2nd build
Diffstat (limited to 'hosts')
-rwxr-xr-xhosts/jenkins/etc/pbuilder/rebuild-hooks/B01_cleanup10
-rwxr-xr-xhosts/jenkins/etc/pbuilder/rebuild-hooks/C01_cleanup10
-rwxr-xr-xhosts/jenkins/etc/pbuilder/rebuild-hooks/D01_modify_environment4
3 files changed, 24 insertions, 0 deletions
diff --git a/hosts/jenkins/etc/pbuilder/rebuild-hooks/B01_cleanup b/hosts/jenkins/etc/pbuilder/rebuild-hooks/B01_cleanup
new file mode 100755
index 00000000..b35b5c56
--- /dev/null
+++ b/hosts/jenkins/etc/pbuilder/rebuild-hooks/B01_cleanup
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+# exit if we are in the same UTS namespace as init ( != 2nd build )
+[ "$(readlink /proc/1/ns/uts)" = "$(readlink /proc/self/ns/uts)" ] && exit 0
+
+# cease using disorderfs
+fusermount -u /tmp/buildd
+mv /tmp/disorderfs /tmp/buildd
diff --git a/hosts/jenkins/etc/pbuilder/rebuild-hooks/C01_cleanup b/hosts/jenkins/etc/pbuilder/rebuild-hooks/C01_cleanup
new file mode 100755
index 00000000..b35b5c56
--- /dev/null
+++ b/hosts/jenkins/etc/pbuilder/rebuild-hooks/C01_cleanup
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+set -e
+
+# exit if we are in the same UTS namespace as init ( != 2nd build )
+[ "$(readlink /proc/1/ns/uts)" = "$(readlink /proc/self/ns/uts)" ] && exit 0
+
+# cease using disorderfs
+fusermount -u /tmp/buildd
+mv /tmp/disorderfs /tmp/buildd
diff --git a/hosts/jenkins/etc/pbuilder/rebuild-hooks/D01_modify_environment b/hosts/jenkins/etc/pbuilder/rebuild-hooks/D01_modify_environment
index 5fa48a20..9046fdc1 100755
--- a/hosts/jenkins/etc/pbuilder/rebuild-hooks/D01_modify_environment
+++ b/hosts/jenkins/etc/pbuilder/rebuild-hooks/D01_modify_environment
@@ -11,3 +11,7 @@ hostname i-capture-the-hostname
domainname i-capture-the-domain
echo "I: Adding a custom variable just for the fun of it..." >&2
export CAPTURE_ENVIRONMENT="I capture the environment"
+
+# use disorderfs
+mv /tmp/buildd /tmp/disorderfs
+disorderfs /tmp/disorderfs /tmp/buildd