[pbuilder] 01/01: dragons, broken

Mattia Rizzolo mattia at debian.org
Fri Jan 13 16:07:15 UTC 2017


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to branch wip/shm
in repository pbuilder.

commit df96cc7b8addfdf7dc15b187eef9beb18920bd86
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Fri Jan 13 17:06:50 2017 +0100

    dragons, broken
---
 pbuilder-loadconfig |  5 +++++
 pbuilder-modules    | 16 +++++++++-------
 pbuilderrc          |  2 +-
 pbuilderrc.5        | 15 +++++++++++++--
 4 files changed, 28 insertions(+), 10 deletions(-)

diff --git a/pbuilder-loadconfig b/pbuilder-loadconfig
index e088857..f469b03 100644
--- a/pbuilder-loadconfig
+++ b/pbuilder-loadconfig
@@ -36,4 +36,9 @@ for RCFILE in \
         echo "W: PKGNAME_LOGFILE_EXTENTION will be removed at some point, please update your config!"
         PKGNAME_LOGFILE_EXTENSION="$PKGNAME_LOGFILE_EXTENTION"
     fi
+    # deprecated in v0.228
+    if [ -n "${USERUNSHM-}" ]; then
+        # wait some more before warning about this deprecation
+        USESHM="$USERUNSHM"
+    fi
 done
diff --git a/pbuilder-modules b/pbuilder-modules
index 98171ef..47cfcd7 100644
--- a/pbuilder-modules
+++ b/pbuilder-modules
@@ -281,8 +281,8 @@ function umountproc () {
     if [ "$DEB_BUILD_ARCH_OS" = "kfreebsd" ] || [ "$USEDEVFS" = "yes" ]; then
         umount_one "dev"
     fi
-    if [ "$USERUNSHM" = "yes" ] && [ "$DEB_BUILD_ARCH_OS" != "hurd" ]; then
-        umount_one "run/shm"
+    if [ "$USESHM" = "yes" ]; then
+        umount_one "dev/shm"
     fi
     if [ "$USEPROC" = "yes" ]; then
         if [ "$DEB_BUILD_ARCH_OS" = "linux" ] && [ -e "$BUILDPLACE/proc/sys/fs/binfmt_misc/status" ]; then
@@ -360,11 +360,13 @@ function mountproc () {
         esac
         mounted[${#mounted[@]}]="$BUILDPLACE/sys"
     fi
-    if [ "$DEB_BUILD_ARCH_OS" = "linux" ] && [ "$USERUNSHM" = "yes" ]; then
-        log.i "mounting /run/shm filesystem"
-        mkdir -p "$BUILDPLACE/run/shm" || true
-        mount -t tmpfs tmpfs "$BUILDPLACE/run/shm"
-        mounted[${#mounted[@]}]="$BUILDPLACE/run/shm"
+    if [ "$USESHM" = "yes" ]; then
+        log.i "creating /{dev,run}/shm"
+        rm -df "$BUILDPLACE/dev/shm" "$BUILDPLACE/run/shm"
+        mkdir -p "$BUILDPLACE/dev/shm"
+        ln -s /dev/shm "$BUILDPLACE/run/shm"
+        mount -t tmpfs tmpfs "$BUILDPLACE/dev/shm"
+        mounted[${#mounted[@]}]="$BUILDPLACE/dev/shm"
     fi
     if [ "$DEB_BUILD_ARCH_OS" = "linux" ] && [ "$USEDEVPTS" = "yes" ]; then
         log.i "mounting /dev/pts filesystem"
diff --git a/pbuilderrc b/pbuilderrc
index 9302e68..0598a6b 100644
--- a/pbuilderrc
+++ b/pbuilderrc
@@ -27,12 +27,12 @@ BUILD_HOME=/nonexistent
 MIRRORSITE=http://httpredir.debian.org/debian
 #OTHERMIRROR="deb http://www.home.com/updates/ ./"
 #export http_proxy=http://your-proxy:8080/
+USESHM=yes
 USEPROC=yes
 USEDEVFS=no
 USEDEVPTS=yes
 USESYSFS=yes
 USENETWORK=no
-USERUNSHM=yes
 BUILDRESULT=/var/cache/pbuilder/result/
 
 # specifying the distribution forces the distribution on "pbuilder update"
diff --git a/pbuilderrc.5 b/pbuilderrc.5
index 4381968..9937eea 100644
--- a/pbuilderrc.5
+++ b/pbuilderrc.5
@@ -452,12 +452,23 @@ Network is not available on a Debian buildd, so you might
 want to keep the default.
 Disabling network access currently only works on Linux.
 .TP
-.BI "USERUNSHM=" "yes"
+.BI "USESHM=" "yes"
 Specify
 .B yes
 when it is desired to mount
-.B /run/shm
+.B /dev/shm
 mount point. It is usually a good idea in order to work with software that expect shm to work.
+.br
+.B /run/shm
+will be configured as a symbolic link to
+.BR /dev/shm .
+.br
+This option used to be named
+.BR USERUNSHM ,
+for compatibility purpose the old name is still supported, and if set it'll
+override any
+.BR USESHM .
+
 .TP
 .BI "USE_PDEBUILD_INTERNAL=" "yes"
 When this option is set to

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pbuilder/pbuilder.git



More information about the Pbuilder-maint mailing list