Subject: Re: mksandbox
To: None <pkgsrc-users@NetBSD.org>
From: Alexander Nasonov <alnsn@yandex.ru>
List: pkgsrc-users
Date: 04/23/2007 10:53:26
--/04w6evG8XlLl3ft
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Alexander Nasonov wrote:
> see attached patch.
Oops. Now really attached.

-- 
Alexander Nasonov
http://nasonov.blogspot.com

If you can`t accept losing, you can`t win. -- Vince Lombardi --

This quote is generated by: 
	/usr/pkg/bin/curl -L http://tinyurl.com/veusy         \
	  | sed -e 's/^document\.write(.//' -e 's/.);$/ --/'  \
	        -e 's/<[^>]*>//g' -e 's/^More quotes from //' \
	  | fmt | tee ~/.signature-quote

--/04w6evG8XlLl3ft
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="mksandbox.diff"

? build.conf
Index: mksandbox
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bulk/mksandbox,v
retrieving revision 1.45
diff -u -r1.45 mksandbox
--- mksandbox	15 Dec 2006 13:15:06 -0000	1.45
+++ mksandbox	23 Apr 2007 06:52:48 -0000
@@ -133,6 +133,19 @@
 	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"
 	sandboxEmptyDirs="$sandboxEmptyDirs /usr/tmp /var/tmp"
 	;;
+FreeBSD)
+	bmakeprog=bmake
+	chmodprog=/bin/chmod
+	chownprog=/usr/sbin/chown
+	cpprog=/bin/cp
+	gtarprog=/usr/bin/tar
+	idprog=/usr/bin/id
+	mkdirprog="/bin/mkdir -p"
+	mountflags="-t nullfs"
+	mountprog=/sbin/mount
+	paxprog=/bin/pax
+	sedprog=/usr/bin/sed
+	;;
 *)
 	echo "Unknown Operating System ($opsys) - good luck"
 	bmakeprog=bmake
@@ -232,6 +245,10 @@
 	$cpprog /dev/MAKEDEV* $sandbox/dev
 	(cd $sandbox/dev; ./MAKEDEV generic)
 	;;
+FreeBSD)
+	$mountprog -t devfs none $sandbox/dev
+	echo "none /dev devfs \\" >> $sandbox_script
+    ;;
 *)
 	$cpprog /dev/MAKEDEV* $sandbox/dev
 	(cd $sandbox/dev; ./MAKEDEV all)
@@ -330,6 +347,7 @@
 		case \$rwro in
 			ro) mount $mountflags -r \$fs \$sandbox/\$mntpoint || exit 1 ;;
 			rw) mount $mountflags \$fs \$sandbox/\$mntpoint || exit 1 ;;
+			devfs) mount -t devfs \$fs \$sandbox/\$mntpoint || exit 1 ;;
 		esac
 	done
 	;;

--/04w6evG8XlLl3ft--