-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdpkg-tmplocal.8
70 lines (70 loc) · 2.1 KB
/
dpkg-tmplocal.8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
.TH dpkg-tmplocal 8 "Release 1.0" "LLNL" "dpkg-tmplocal"
.SH NAME
dpkg-tmplocal \- run process with private copy of /usr/local
.SH SYNOPSIS
.B dpkg-tmplocal
.I "[-v|-p]"
.I "[-d directory]"
.I "cmd [arg] ..."
.SH DESCRIPTION
.B dpkg-tmplocal
is part of dpkg-scripts, a collection of utilities for building
/usr/local-based deb packages.
.LP
.B dpkg-tmplocal
creates a unique, empty temporary directory owned by the invoking user,
binds it over the top of /usr/local in a private namespace,
and runs the specified command in that environment.
With no options, the environment and the temporary directory are
destroyed when the command terminates.
.LP
.B dpkg-tmplocal's
default behavior can be modified as follows:
.TP
\fI-v\fR, \fI--verbose\fR
Report each step as it is performed.
.TP
\fI-p\fR, \fI--preserve\fR
Do not remove the temporary directory after the command completes.
Use \fI--verbose\fR to see the name of the temporary directory as it is created.
.TP
\fI-d\fR, \fI--dir\fR directory
Bind a pre-existing directory on /usr/local. Implies \fI--preserve\fR.
.TP
\fI-o\fR, \fI--slash-opt\fR
Bind on /opt instead of /usr/local.
.SH APPLICATIONS
.B dpkg-tmplocal
was originally designed as a helper for
.B dpkg-mkdeb
which uses it during package creation when the software being
packaged must be installed directly into /usr/local instead of to an
intermediate directory. It also builds packages in a temporary
local popluated only its PKG_BUILDREQUIRES packages to ensure they
are properly specified.
.LP
.B dpkg-tmplocal
is used by
.B dpkg-testdeb
for running a package's unit tests in a temporary /usr/local containing
only its PKG_DEPENDS packages.
.LP
Finally,
.B dpkg-tmplocal
may be used to create a sandbox /usr/local for manual testing and development
of packages. For example:
.IP
.nf
dpkg-tmplocal /bin/bash
$ dpkg-tmplocal -v /bin/bash
dpkg-tmplocal: binding /tmp/tmplocal-jPK0OB on /usr/local
dpkg-tmplocal: dropping root privileges
dpkg-tmplocal: execing /bin/bash
$ dpkg-initialize
$ dpkg -i --force-not-root pkg.deb
$ ...
$ exit
dpkg-tmplocal: removing /tmp/tmplocal-jPK0OB
.fi
.SH "SEE ALSO"
dpkg-mkdeb(8), dpkg-testdeb(8)