OS is essentially the same as FreeBSD from our configuration point of view, with
the exception of the name of utiliy for nullfs mounts.
Tested on DragonFly 5.3-DEVELOPMENT.
Unsorted entries in PLIST files have generated a pkglint warning for at
least 12 years. Somewhat more recently, pkglint has learned to sort
PLIST files automatically. Since pkglint 5.4.23, the sorting is only
done in obvious, simple cases. These have been applied by running:
pkglint -Cnone,PLIST -Wnone,plist-sort -r -F
- Handle /run/resolvconf/resolv.conf explicitly rather than mounting all of
/run. If /run exists then systemd will dynamically create /run/user/uid
tmpfs mounts inside the chroot which mksandbox is unable to unmount.
- Only copy $kernel if it exists, fixes warning on OSX 10.10 which moves
the kernel location to a directory we already mount, noted by J. Lewis
Muir on pkgsrc-users.
- Add NO_CHECKSUM=yes to appease pkglint.
- 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.
* Mount /proc read-write on Linux, it appears to be required for e.g.
groupadd to function correctly.
* Add new --rodirs and --rwdirs options, which allow arbitrary lists
of directories to be mounted appropriately inside the chroot.
* Add --without-pkgsrc which prevents the default pkgsrc directories
from being mounted.
This allows mksandbox to be easily used for chrooted pbulk setups, using
a simple invocation such as:
mksandbox --without-pkgsrc --rodirs=/usr/pbulk --rwdirs=/shared /chroot
for that);
- use more common option list header line;
- correct argument names of `--src' and `--xsrc' in the text;
- correct default `xsrcdir' directory;
- choose different argument wording (then also using appropriate
macro) in the arbitrary sandbox command running explanation (and
adjust the list width with it);
- add comma after ``e.g.'';
- bump date.
From Bug Hunting.
A small shell script to set up a sandbox (usually for a pkgsrc bulk
build), using null mounts.
The file lived in pkgsrc/mk/bulk/mksandbox, but is worthy of its own
package IMHO. New: with manpage.