[pbuilder] 01/02: pbuilder-modules: Don't mount a tmpfs on /dev/shm on hurd

James Clarke jrtc27 at moszumanska.debian.org
Wed Jan 18 11:39:50 UTC 2017


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

jrtc27 pushed a commit to branch master
in repository pbuilder.

commit 845885381cffdb8689bbd2cd7785c375984a8128
Author: James Clarke <jrtc27 at debian.org>
Date:   Wed Jan 18 11:34:17 2017 +0000

    pbuilder-modules: Don't mount a tmpfs on /dev/shm on hurd
    
    Doing so crashes /hurd/tmps. /dev is bind-mounted anyway, so we can just
    use the host's /dev/shm.
---
 pbuilder-modules | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/pbuilder-modules b/pbuilder-modules
index 81da639..f009426 100644
--- a/pbuilder-modules
+++ b/pbuilder-modules
@@ -281,7 +281,7 @@ function umountproc () {
     if [ "$DEB_BUILD_ARCH_OS" = "kfreebsd" ] || [ "$USEDEVFS" = "yes" ]; then
         umount_one "dev"
     fi
-    if [ "$USESHM" = "yes" ]; then
+    if [ "$DEB_BUILD_ARCH_OS" != "hurd" ] && [ "$USESHM" = "yes" ]; then
         umount_one "dev/shm"
     fi
     if [ "$USEPROC" = "yes" ]; then
@@ -368,8 +368,14 @@ function mountproc () {
         # old releases might not have /run.  We create it nonetheless, can't harm
         mkdir -p "$BUILDPLACE/run"
         ln -s /dev/shm "$BUILDPLACE/run/shm"
-        mount -t tmpfs tmpfs "$BUILDPLACE/dev/shm"
-        mounted[${#mounted[@]}]="$BUILDPLACE/dev/shm"
+        # /dev gets bind-mounted on hurd. In theory this is before that, but
+        # debootstrap will already have mounted it during chroot creation.
+        # This seems to cause /hurd/tmpfs to crash, but we can just use the
+        # host's /dev/shm.
+        if [ "$DEB_BUILD_ARCH_OS" != "hurd" ]; then
+            mount -t tmpfs tmpfs "$BUILDPLACE/dev/shm"
+            mounted[${#mounted[@]}]="$BUILDPLACE/dev/shm"
+        fi
     fi
     if [ "$DEB_BUILD_ARCH_OS" = "linux" ] && [ "$USEDEVPTS" = "yes" ]; then
         log.i "mounting /dev/pts filesystem"

-- 
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