pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/mksandbox mksandbox-1.3:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6a5fefb26283
branches:  trunk
changeset: 622077:6a5fefb26283
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Wed Jul 24 22:16:26 2013 +0000

description:
mksandbox-1.3:

 - Add /usr/sfw to SunOS mount dirs, required for certain binaries on
   newer releases.
 - Mount proper instances of /dev and /dev/fd on SunOS rather than relying
   on devfsadm and ucblinks, the latter of which does not exist on newer
   releases.
 - Do not create /var/games if the games user does not exist.

diffstat:

 pkgtools/mksandbox/Makefile        |   4 ++--
 pkgtools/mksandbox/files/mksandbox |  29 +++++++++++++++++++----------
 2 files changed, 21 insertions(+), 12 deletions(-)

diffs (85 lines):

diff -r c1a403b3c841 -r 6a5fefb26283 pkgtools/mksandbox/Makefile
--- a/pkgtools/mksandbox/Makefile       Wed Jul 24 21:15:54 2013 +0000
+++ b/pkgtools/mksandbox/Makefile       Wed Jul 24 22:16:26 2013 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.6 2013/07/20 10:20:42 jperkin Exp $
+# $NetBSD: Makefile,v 1.7 2013/07/24 22:16:26 jperkin Exp $
 
-DISTNAME=      mksandbox-1.2
+DISTNAME=      mksandbox-1.3
 CATEGORIES=    pkgtools
 MASTER_SITES=  # none
 DISTFILES=     # none
diff -r c1a403b3c841 -r 6a5fefb26283 pkgtools/mksandbox/files/mksandbox
--- a/pkgtools/mksandbox/files/mksandbox        Wed Jul 24 21:15:54 2013 +0000
+++ b/pkgtools/mksandbox/files/mksandbox        Wed Jul 24 22:16:26 2013 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: mksandbox,v 1.5 2013/07/20 10:20:42 jperkin Exp $
+# $NetBSD: mksandbox,v 1.6 2013/07/24 22:16:26 jperkin Exp $
 
 # Copyright (c) 2002,2012 Alistair Crooks <agc%NetBSD.org@localhost>
 # All rights reserved.
@@ -150,7 +150,7 @@
        mountprog=/sbin/mount
        paxprog=/bin/pax
        sedprog=/usr/xpg4/bin/sed
-       sandboxMountDirs="/bin /sbin /kernel /lib /proc /opt/SUNWspro /usr/X11R6 /usr/5bin /usr/bin /usr/ccs /usr/dt /usr/games /usr/include /usr/lib /usr/openwin /usr/share /usr/sbin /usr/sadm 
/usr/ucb /usr/ucblib /usr/xpg4 /var/mail /var/sadm"
+       sandboxMountDirs="/bin /sbin /kernel /lib /proc /opt/SUNWspro /usr/X11R6 /usr/5bin /usr/bin /usr/ccs /usr/dt /usr/games /usr/include /usr/lib /usr/openwin /usr/share /usr/sbin /usr/sadm 
/usr/sfw /usr/ucb /usr/ucblib /usr/xpg4 /var/mail /var/sadm"
        sandboxEmptyDirs="$sandboxEmptyDirs /usr/tmp /var/tmp"
        ;;
 *)
@@ -265,10 +265,8 @@
        $mountprog -t devfs devfs $sandbox/dev
        ;;
 SunOS)
-       /usr/sbin/devfsadm -r $sandbox
-       if [ -f /usr/ucblib/ucblinks.awk -a -x /usr/ucb/ucblinks ]; then
-               /usr/ucb/ucblinks -r $sandbox
-       fi
+       $mountprog -F lofs -r /dev $sandbox/dev
+       $mountprog -F fd fd $sandbox/dev/fd
        ;;
 Linux)
        $mountprog $mountflags /dev $sandbox/dev
@@ -319,10 +317,13 @@
 $mkdirprog $sandbox/tmp $sandbox/var/tmp
 $chmodprog 1777 $sandbox/tmp $sandbox/var/tmp
 
-echo "Making /var/games in $sandbox"
-$mkdirprog $sandbox/var/games
-$chownprog games:games $sandbox/var/games
-$chmodprog 2775 $sandbox/var/games
+$idprog games >/dev/null 2>&1
+if [ $? -eq 0 ]; then
+       echo "Making /var/games in $sandbox"
+       $mkdirprog $sandbox/var/games
+       $chownprog games:games $sandbox/var/games
+       $chmodprog 2775 $sandbox/var/games
+fi
 
 for d in $sandboxEmptyDirs; do
        test -d $d || continue
@@ -415,6 +416,10 @@
        Linux)
                $mountprog $mountflags /dev \$sandbox/dev
                ;;
+       SunOS)
+               $mountprog -F lofs -r /dev \$sandbox/dev
+               $mountprog -F fd fd \$sandbox/dev/fd
+               ;;
        esac
        ;;
 xumount)
@@ -430,6 +435,10 @@
        Darwin|FreeBSD|Linux)
                umount \$sandbox/dev
                ;;
+       SunOS)
+               umount \$sandbox/dev/fd
+               umount \$sandbox/dev
+               ;;
        esac
        ;;
 xchroot)



Home | Main Index | Thread Index | Old Index