From c7e77f61a42aa96ad1ca25b2f9fa2af3ffe35af0 Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Tue, 24 Feb 2015 20:22:31 +0100 Subject: different approach to umask changes * Add it to pbuilderrc, because it is sourced by pbuilder. * Vary 0022 (default) and 0002 as both are common combinations and the write bit actually shows up in ar archives (static libraries). --- etc/pbuilder/rebuild-hooks/D01_modify_environment | 1 - etc/pbuilderrc | 8 ++++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/etc/pbuilder/rebuild-hooks/D01_modify_environment b/etc/pbuilder/rebuild-hooks/D01_modify_environment index 521359f6..57c785b3 100755 --- a/etc/pbuilder/rebuild-hooks/D01_modify_environment +++ b/etc/pbuilder/rebuild-hooks/D01_modify_environment @@ -9,4 +9,3 @@ 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 -umask 0026 diff --git a/etc/pbuilderrc b/etc/pbuilderrc index 964c7cad..c3385f7d 100644 --- a/etc/pbuilderrc +++ b/etc/pbuilderrc @@ -11,3 +11,11 @@ export http_proxy="http://localhost:3128" COMPRESSPROG="pigz" # remove /run/shm bindmount once we are running jessie - this is a workaround for #700591 BINDMOUNTS="$BINDMOUNTS /run/shm /dev/shm" + +if [ "$(readlink /proc/1/ns/uts)" = "$(readlink /proc/self/ns/uts)" ]; then + # regular build + umask 0022 +else + # modified build + umask 0002 +fi -- cgit v1.2.3-70-g09d2