From 385d843820d3a2f5561f0eb7ea7372f1e7fdbaa8 Mon Sep 17 00:00:00 2001 From: Jérémy Bobbio Date: Mon, 19 Jan 2015 18:56:06 +0100 Subject: reproducible: change the hostname in the second build --- etc/pbuilder/rebuild-hooks/D01_hostname | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 etc/pbuilder/rebuild-hooks/D01_hostname (limited to 'etc/pbuilder/rebuild-hooks') diff --git a/etc/pbuilder/rebuild-hooks/D01_hostname b/etc/pbuilder/rebuild-hooks/D01_hostname new file mode 100755 index 00000000..1bf4c2d2 --- /dev/null +++ b/etc/pbuilder/rebuild-hooks/D01_hostname @@ -0,0 +1,10 @@ +#!/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 /etc/hosts +hostname i-capture-the-hostname -- cgit v1.2.3-70-g09d2