summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-02-24 21:12:58 +0100
committerHolger Levsen <holger@layer-acht.org>2015-02-25 14:06:38 +0100
commit20f51422ccc288977d134ee0a3fb898504971155 (patch)
treea4d096b83c7a44b0fcae8ad2f5c1f551a737baf0 /etc
parentc7e77f61a42aa96ad1ca25b2f9fa2af3ffe35af0 (diff)
downloadjenkins.debian.net-20f51422ccc288977d134ee0a3fb898504971155.tar.xz
reproducible: add comments, simplify code
Diffstat (limited to 'etc')
-rw-r--r--etc/pbuilderrc9
1 files changed, 4 insertions, 5 deletions
diff --git a/etc/pbuilderrc b/etc/pbuilderrc
index c3385f7d..af22e71c 100644
--- a/etc/pbuilderrc
+++ b/etc/pbuilderrc
@@ -12,10 +12,9 @@ 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
+# Use a different umask, but only do so when the UTS namespace differs from pid 1's UTS namespace.
+# This is only the case for the 2nd pbuilder run, which is started by bin/reproducible_build.sh
+# using 'unshare --uts'...
+if [ "$(readlink /proc/1/ns/uts)" != "$(readlink /proc/self/ns/uts)" ]; then
umask 0002
fi