summaryrefslogtreecommitdiffstats
path: root/hosts/jenkins/etc/pbuilder/rebuild-hooks
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-08-29 10:38:32 +0200
committerHolger Levsen <holger@layer-acht.org>2015-08-29 10:38:32 +0200
commit80e6baaef710ccafa4c59e4132155ddd1a531254 (patch)
tree1611d07d0a5ee9f9677b9f70c9378fe7cbbd9ff3 /hosts/jenkins/etc/pbuilder/rebuild-hooks
parent5b09425647212a75aca70b42fc5124082999f4ac (diff)
downloadjenkins.debian.net-80e6baaef710ccafa4c59e4132155ddd1a531254.tar.xz
reproducible: only use disorderfs if it's available
Diffstat (limited to 'hosts/jenkins/etc/pbuilder/rebuild-hooks')
-rwxr-xr-xhosts/jenkins/etc/pbuilder/rebuild-hooks/B01_cleanup6
-rwxr-xr-xhosts/jenkins/etc/pbuilder/rebuild-hooks/C01_cleanup6
-rwxr-xr-xhosts/jenkins/etc/pbuilder/rebuild-hooks/D01_modify_environment8
3 files changed, 14 insertions, 6 deletions
diff --git a/hosts/jenkins/etc/pbuilder/rebuild-hooks/B01_cleanup b/hosts/jenkins/etc/pbuilder/rebuild-hooks/B01_cleanup
index df37129c..f8c545ae 100755
--- a/hosts/jenkins/etc/pbuilder/rebuild-hooks/B01_cleanup
+++ b/hosts/jenkins/etc/pbuilder/rebuild-hooks/B01_cleanup
@@ -6,5 +6,7 @@ set -e
[ "$(readlink /proc/1/ns/uts)" = "$(readlink /proc/self/ns/uts)" ] && exit 0
# cease using disorderfs
-sudo -u pbuilder2 fusermount -u /tmp/buildd
-mv /tmp/disorderfs /tmp/buildd
+if [ -d /tmp/disorderfs ] ; then
+ sudo -u pbuilder2 fusermount -u /tmp/buildd
+ mv /tmp/disorderfs /tmp/buildd
+fi
diff --git a/hosts/jenkins/etc/pbuilder/rebuild-hooks/C01_cleanup b/hosts/jenkins/etc/pbuilder/rebuild-hooks/C01_cleanup
index df37129c..f8c545ae 100755
--- a/hosts/jenkins/etc/pbuilder/rebuild-hooks/C01_cleanup
+++ b/hosts/jenkins/etc/pbuilder/rebuild-hooks/C01_cleanup
@@ -6,5 +6,7 @@ set -e
[ "$(readlink /proc/1/ns/uts)" = "$(readlink /proc/self/ns/uts)" ] && exit 0
# cease using disorderfs
-sudo -u pbuilder2 fusermount -u /tmp/buildd
-mv /tmp/disorderfs /tmp/buildd
+if [ -d /tmp/disorderfs ] ; then
+ sudo -u pbuilder2 fusermount -u /tmp/buildd
+ mv /tmp/disorderfs /tmp/buildd
+fi
diff --git a/hosts/jenkins/etc/pbuilder/rebuild-hooks/D01_modify_environment b/hosts/jenkins/etc/pbuilder/rebuild-hooks/D01_modify_environment
index da5f86c6..68364908 100755
--- a/hosts/jenkins/etc/pbuilder/rebuild-hooks/D01_modify_environment
+++ b/hosts/jenkins/etc/pbuilder/rebuild-hooks/D01_modify_environment
@@ -13,5 +13,9 @@ echo "I: Adding a custom variable just for the fun of it..." >&2
export CAPTURE_ENVIRONMENT="I capture the environment"
# use disorderfs, mount it as user
-mv /tmp/buildd /tmp/disorderfs
-sudo -u pbuilder2 disorderfs /tmp/disorderfs /tmp/buildd
+if [ -x /usr/bin/disorderfs ] ; then
+ mv /tmp/buildd /tmp/disorderfs
+ sudo -u pbuilder2 disorderfs /tmp/disorderfs /tmp/buildd
+else
+ echo "Warning: disorderfs not available."
+fi