From 80f3457426fac1e047ac0d050cf73bb701925214 Mon Sep 17 00:00:00 2001 From: HW42 Date: Sun, 6 Nov 2016 21:59:47 +0100 Subject: reproducible Debian: vary the source dir name This hapens for example when some builders use 'dpkg-source -x' and others build out of a SCM. Signed-off-by: Holger Levsen --- .../etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 hosts/odxu4b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir (limited to 'hosts/odxu4b-armhf-rb/etc/pbuilder/rebuild-hooks') diff --git a/hosts/odxu4b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir b/hosts/odxu4b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir new file mode 100755 index 00000000..7750fdfe --- /dev/null +++ b/hosts/odxu4b-armhf-rb/etc/pbuilder/rebuild-hooks/A01_modfiy_src_dir @@ -0,0 +1,20 @@ +#!/bin/bash + +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 + +cd $BUILDDIR + +if [ "$(basename $(pwd))" != "2nd" ]; then + # build path variation disabled, so do nothing + exit 0 +fi + +# There should be only one file, the source directory. +src_dir=$(ls | head -n 1) + +# We want to keep the build path length to minimise the diff. So we just +# replace the first char of the source dir. +mv $src_dir _${src_dir:1} -- cgit v1.2.3-70-g09d2