summaryrefslogtreecommitdiffstats
path: root/hosts/profitbricks-build4-amd64/etc/pbuilder/rebuild-hooks
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-08-09 14:45:51 +0200
committerHolger Levsen <holger@layer-acht.org>2015-08-09 14:45:51 +0200
commitcf22f33fdc00edcafe2fe7c620dcb0bd0bd56be4 (patch)
tree8a4c6efba193d41305e2539b6b99a6b655b291aa /hosts/profitbricks-build4-amd64/etc/pbuilder/rebuild-hooks
parente7e0c7fe95dc26e404ebd007e14c5ca4ca4fa108 (diff)
downloadjenkins.debian.net-cf22f33fdc00edcafe2fe7c620dcb0bd0bd56be4.tar.xz
rebootstrap: add new build node, profitbricks-build4-amd64, still missing the appropriate definitions in bin/reproducible_node_wrapper.sh...
Diffstat (limited to 'hosts/profitbricks-build4-amd64/etc/pbuilder/rebuild-hooks')
-rwxr-xr-xhosts/profitbricks-build4-amd64/etc/pbuilder/rebuild-hooks/D01_modify_environment12
1 files changed, 12 insertions, 0 deletions
diff --git a/hosts/profitbricks-build4-amd64/etc/pbuilder/rebuild-hooks/D01_modify_environment b/hosts/profitbricks-build4-amd64/etc/pbuilder/rebuild-hooks/D01_modify_environment
new file mode 100755
index 00000000..d9550045
--- /dev/null
+++ b/hosts/profitbricks-build4-amd64/etc/pbuilder/rebuild-hooks/D01_modify_environment
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+set -e
+
+# exit if we are in the same UTS namespace than init
+[ "$(readlink /proc/1/ns/uts)" = "$(readlink /proc/self/ns/uts)" ] && exit 0
+
+echo "I: Changing hostname to test build reproducibility" >&2
+sed -e '/^127.0.0.1/s/$/ i-capture-the-hostname i-capture-the-hostname.i-capture-the-domain/' -i /etc/hosts
+hostname i-capture-the-hostname
+domainname i-capture-the-domain
+export CAPTURE_ENVIRONMENT="I capture the environment"