From 80e6baaef710ccafa4c59e4132155ddd1a531254 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 29 Aug 2015 10:38:32 +0200 Subject: reproducible: only use disorderfs if it's available --- hosts/jenkins/etc/pbuilder/rebuild-hooks/B01_cleanup | 6 ++++-- hosts/jenkins/etc/pbuilder/rebuild-hooks/C01_cleanup | 6 ++++-- hosts/jenkins/etc/pbuilder/rebuild-hooks/D01_modify_environment | 8 ++++++-- 3 files changed, 14 insertions(+), 6 deletions(-) (limited to 'hosts/jenkins') 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 -- cgit v1.2.3-70-g09d2