summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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