Wed May 29 15:14:49 2013 UTC ()
- add missing `--mounthost=host' option (and adjust the list width
  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.


(wiz)
diff -r1.3 -r1.4 pkgsrc/pkgtools/mksandbox/files/mksandbox.8

cvs diff -r1.3 -r1.4 pkgsrc/pkgtools/mksandbox/files/mksandbox.8 (expand / switch to unified diff)

--- pkgsrc/pkgtools/mksandbox/files/mksandbox.8 2012/08/26 22:13:18 1.3
+++ pkgsrc/pkgtools/mksandbox/files/mksandbox.8 2013/05/29 15:14:49 1.4
@@ -1,120 +1,125 @@ @@ -1,120 +1,125 @@
1.\" $NetBSD: mksandbox.8,v 1.3 2012/08/26 22:13:18 wiz Exp $ 1.\" $NetBSD: mksandbox.8,v 1.4 2013/05/29 15:14:49 wiz Exp $
2.\" 2.\"
3.\" Copyright (c) 2012 Thomas Klausner <wiz@NetBSD.org> 3.\" Copyright (c) 2012 Thomas Klausner <wiz@NetBSD.org>
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" Redistribution and use in source and binary forms, with or without 6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions 7.\" modification, are permitted provided that the following conditions
8.\" are met: 8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright 9.\" 1. Redistributions of source code must retain the above copyright
10.\" notice, this list of conditions and the following disclaimer. 10.\" notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\" notice, this list of conditions and the following disclaimer in the 12.\" notice, this list of conditions and the following disclaimer in the
13.\" documentation and/or other materials provided with the distribution. 13.\" documentation and/or other materials provided with the distribution.
14.\" 14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 18.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25.\" 25.\"
26.Dd August 26, 2012 26.Dd May 29, 2013
27.Dt MKSANDBOX 8 27.Dt MKSANDBOX 8
28.Os 28.Os
29.Sh NAME 29.Sh NAME
30.Nm mksandbox 30.Nm mksandbox
31.Nd set up a sandbox 31.Nd set up a sandbox
32.Sh SYNOPSIS 32.Sh SYNOPSIS
33.Nm 33.Nm
 34.Op Fl Fl mounthost Ns = Ns Ar host
34.Op Fl Fl pkgsrc Ns = Ns Ar dir 35.Op Fl Fl pkgsrc Ns = Ns Ar dir
35.Op Fl Fl src Ns = Ns Ar srcdir 36.Op Fl Fl src Ns = Ns Ar srcdir
36.Op Fl Fl verbose 37.Op Fl Fl verbose
37.Op Fl Fl without-x 38.Op Fl Fl without-x
38.Op Fl Fl xsrc Ns = Ns Ar xsrcdir 39.Op Fl Fl xsrc Ns = Ns Ar xsrcdir
39.Ar sandbox-dir 40.Ar sandbox-dir
40.Sh DESCRIPTION 41.Sh DESCRIPTION
41.Nm 42.Nm
42is a small shell script to set up a sandbox (usually for a pkgsrc bulk 43is a small shell script to set up a sandbox (usually for a pkgsrc bulk
43build), using null mounts. 44build), using null mounts.
44The sandbox is set up for the target directory 45The sandbox is set up for the target directory
45.Ar sandbox-dir . 46.Ar sandbox-dir .
46.Pp 47.Pp
47The supported options are: 48The following options are available:
48.Bl -tag -width "Xpkgsrc=dirXXX" 49.Bl -tag -width "Xmounthost=hostXXX"
 50.It Fl Fl mounthost Ns = Ns Ar host
 51Use
 52.Ar host
 53as the mount host.
49.It Fl Fl pkgsrc Ns = Ns Ar dir 54.It Fl Fl pkgsrc Ns = Ns Ar dir
50Look for the pkgsrc files in 55Look for the pkgsrc files in
51.Ar dir 56.Ar dir
52instead of the default 57instead of the default
53.Pa /usr/pkgsrc . 58.Pa /usr/pkgsrc .
54.It Fl Fl src Ns = Ns Ar srcdir 59.It Fl Fl src Ns = Ns Ar srcdir
55Look for the 60Look for the
56.Nx 61.Nx
57src files in 62src files in
58.Ar dir 63.Ar srcdir
59instead of the default 64instead of the default
60.Pa /usr/src 65.Pa /usr/src
61(only needed for some packages that compile kernel modules). 66(only needed for some packages that compile kernel modules).
62.It Fl Fl verbose 67.It Fl Fl verbose
63More verbose output. 68More verbose output.
64.It Fl Fl without-x 69.It Fl Fl without-x
65Do not include X files in the sandbox. 70Do not include X files in the sandbox.
66.It Fl Fl xsrc Ns = Ns Ar xsrcdir 71.It Fl Fl xsrc Ns = Ns Ar xsrcdir
67Look for the 72Look for the
68.Nx 73.Nx
69xsrc files in 74xsrc files in
70.Ar dir 75.Ar xsrcdir
71instead of the default 76instead of the default
72.Pa /usr/src 77.Pa /usr/xsrc
73(only needed for some packages). 78(only needed for some packages).
74.El 79.El
75.Sh USAGE 80.Sh USAGE
76After 81After
77.Nm 82.Nm
78has finished successfully, 83has finished successfully,
79.Ar sandbox-dir 84.Ar sandbox-dir
80will contain a file 85will contain a file
81.Pa sandbox 86.Pa sandbox
82which can be used to set up and tear down the sandbox, as well as 87which can be used to set up and tear down the sandbox, as well as
83execute commands inside. 88execute commands inside.
84The 89The
85.Pa sandbox 90.Pa sandbox
86script supports the following commands: 91script supports the following commands:
87.Bl -tag -width XanythingXelseXXX 92.Bl -tag -width XXnoXargumentXXXX
88.It Ic mount 93.It Ic mount
89Set up the sandbox. 94Set up the sandbox.
90.It Ic umount 95.It Ic umount
91Tear down the sandbox. 96Tear down the sandbox.
92.It (no argument) 97.It (no argument)
93Start 98Start
94.Xr ksh 1 99.Xr ksh 1
95inside the sandbox. 100inside the sandbox.
96Can only be called after 101Can only be called after
97.Ic mount . 102.Ic mount .
98.It anything-else 103.It Ic command
99Try running 104Try running
100.Pa anything-else 105.Pa command
101inside the sandbox. 106inside the sandbox.
102Fails if the argument is not an executable. 107Fails if the argument is not an executable.
103Can only be called after 108Can only be called after
104.Ic mount . 109.Ic mount .
105.El 110.El
106.Sh EXAMPLES 111.Sh EXAMPLES
107The most common usage is running mksandbox once, e.g. 112The most common usage is running mksandbox once, e.g.,
108.Dl mksandbox /home/user/sandboxdir 113.Dl mksandbox /home/user/sandboxdir
109and then reusing this sandbox. 114and then reusing this sandbox.
110Once the sandbox exists, the most common usage is: 115Once the sandbox exists, the most common usage is:
111.Bd -literal -offset indent 116.Bd -literal -offset indent
112cd /home/user/sandboxdir 117cd /home/user/sandboxdir
113\&./sandbox mount 118\&./sandbox mount
114\&./sandbox 119\&./sandbox
115(do something inside, like a bulk build or building one package by hand) 120(do something inside, like a bulk build or building one package by hand)
116(CTRL-D or logout, to leave the shell inside the sandbox) 121(CTRL-D or logout, to leave the shell inside the sandbox)
117\&./sandbox umount 122\&./sandbox umount
118.Ed 123.Ed
119.Sh AUTHORS 124.Sh AUTHORS
120.An Alistair G. Crooks 125.An Alistair G. Crooks