source: trunk/debathena/third/schroot/man/schroot-setup.5.in @ 24167

Revision 24167, 6.6 KB checked in by broder, 15 years ago (diff)
Import schroot upstream into subversion.
Line 
1.\" Copyright © 2005-2008  Roger Leigh <rleigh@debian.org>
2.\"
3.\" schroot is free software: you can redistribute it and/or modify it
4.\" under the terms of the GNU General Public License as published by
5.\" the Free Software Foundation, either version 3 of the License, or
6.\" (at your option) any later version.
7.\"
8.\" schroot is distributed in the hope that it will be useful, but
9.\" WITHOUT ANY WARRANTY; without even the implied warranty of
10.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11.\" General Public License for more details.
12.\"
13.\" You should have received a copy of the GNU General Public License
14.\" along with this program.  If not, see
15.\" <http://www.gnu.org/licenses/>.
16.\"
17.TH SCHROOT\-SETUP 5 "@RELEASE_DATE@" "Version @VERSION@" "Debian sbuild"
18.SH NAME
19schroot\-setup \- schroot chroot setup scripts
20.SH DESCRIPTION
21\fBschroot\fP uses scripts to set up and then clean up the chroot environment.
22The directory \f[BI]@SCHROOT_CONF_SETUP_D@\fP contains scripts run when a
23chroot is created and destroyed.  Several environment variables are set while
24the scripts are being run, which allows their behaviour to be customised,
25depending upon, for example, the type of chroot in use.
26.PP
27The scripts are run in name order, like those run by
28.BR init (8),
29by using the same style of execution as
30.BR run-parts (8).
31.PP
32The setup scripts are all invoked with two options:
33.IP 1
34The action to perform.
35.IP
36When a session is first started, the chroot is set up by running the scripts in
37@SCHROOT_CONF_SETUP_D@ with the \[oq]setup\-start\[cq] option.  When the
38session is ended, the scripts in \fI@SCHROOT_CONF_SETUP_D@\fP are run in
39reverse order with the \[oq]setup\-stop\[cq] option.
40.IP 2
41The chroot status.
42.IP
43This is either \[oq]ok\[cq] if there are no problems, or \[oq]fail\[cq] if
44something went wrong.  For example, particular actions may be skipped on
45failure.
46.PP
47Note that the scripts should be \fIidempotent\fP.  They \fBmust\fP be
48idempotent during the \[oq]setup\-stop\[cq] phase, because they may be run more
49than once, for example on failure.
50.SH ENVIRONMENT
51.SS General variables
52.TP
53AUTH_USER
54The username of the user the command in the chroot will run as.
55.TP
56AUTH_VERBOSITY
57Set to \[oq]quiet\[cq] if only error messages should be printed,
58\[oq]normal\[cq] if other messages may be printed as well, and
59\[oq]verbose\[cq] if all messages may be printed.
60.TP
61MOUNT_DIR
62The directory under which non-filesystem chroots are mounted (e.g. block
63devices and LVM snapshots).
64.TP
65LIBEXEC_DIR
66The directory under which helper programs are located.
67.TP
68PID
69The process ID of the schroot process.
70.TP
71SESSION_ID
72The session identifier.
73.TP
74CHROOT_SESSION_CREATE
75Set to \[oq]true\[cq] if a session will be created, otherwise \[oq]false\[cq].
76.TP
77CHROOT_SESSION_CLONE
78Set to \[oq]true\[cq] if a session will be cloned, otherwise \[oq]false\[cq].
79.TP
80CHROOT_SESSION_PURGE
81Set to \[oq]true\[cq] if a session will be purged, otherwise \[oq]false\[cq].
82.TP
83CHROOT_TYPE
84The type of the chroot.  This is useful for restricting a setup task to
85particular types of chroot (e.g. only block devices or LVM snapshots).
86.TP
87CHROOT_NAME
88The name of the chroot.  This is useful for restricting a setup task to a
89particular chroot, or set of chroots.
90.TP
91CHROOT_DESCRIPTION
92The description of the chroot.
93.TP
94CHROOT_MOUNT_LOCATION
95The location to mount the chroot.  It is used for mount point creation and
96mounting.
97.TP
98CHROOT_LOCATION
99The location of the chroot inside the mount point.  This is to allow multiple
100chroots on a single filesystem.  Set for all mountable chroot types.
101.TP
102CHROOT_PATH
103The absolute path to the chroot.  This is typically CHROOT_MOUNT_LOCATION and
104CHROOT_LOCATION concatenated together.  This is the path which should be used
105to access the chroots.
106.SS Plain and directory chroot variables
107These chroot types use only general variables.
108.SS File variables
109.TP
110CHROOT_FILE
111The file containing the chroot files.
112.TP
113CHROOT_FILE_REPACK
114Set to \[oq]true\[cq] to repack the chroot into an archive file on ending a
115session, otherwise \[oq]false\[cq].
116.SS Mountable chroot variables
117.PP
118These variables are only set for directly mountable chroot types.
119.TP
120CHROOT_MOUNT_DEVICE
121The device to mount containing the chroot.
122mounting.
123.TP
124CHROOT_MOUNT_OPTIONS
125Options to pass to
126.BR mount (8).
127.TP
128CHROOT_LOCATION
129The location of the chroot inside the mount point.  This allows the existence
130of multiple chroots on a single filesystem.
131.SS Filesystem union variables
132.TP
133CHROOT_UNION_TYPE
134Union filesystem type.
135.TP
136CHROOT_UNION_MOUNT_OPTIONS
137Union filesystem mount options.
138.TP
139CHROOT_UNION_OVERLAY_DIRECTORY
140Union filesystem overlay directory (writable).
141.TP
142CHROOT_UNION_UNDERLAY_DIRECTORY
143Union filesystem underlay directory (read-only).
144.SS Block device variables
145.TP
146CHROOT_DEVICE
147The device containing the chroot root filesystem.  This is usually, but not
148necessarily, the device which will be mounted.  For example, an LVM snapshot
149this will be the original logical volume.
150.SS LVM snapshot variables
151.TP
152CHROOT_LVM_SNAPSHOT_NAME
153Snapshot name to pass to
154.BR lvcreate (8).
155.TP
156CHROOT_LVM_SNAPSHOT_DEVICE
157The name of the LVM snapshot device.
158.TP
159CHROOT_LVM_SNAPSHOT_OPTIONS
160Options to pass to
161.BR lvcreate (8).
162.SH FILES
163.SS \f[BI]@SCHROOT_CONF_SETUP_D@\fP
164The system-wide chroot setup directory.
165.TP
166\f[BI]00check\fP
167Print debugging diagnostics and perform basic sanity checking.
168.TP
169\f[BI]05file\fP
170Unpack, clean up, and repack file-based chroots.
171.TP
172\f[BI]05fsunion\fP
173Create and remove union filesystems.
174.TP
175\f[BI]05lvm\fP
176Create and remove LVM snapshots.
177.TP
178\f[BI]10mount\fP
179Mount and unmount filesystems.
180.TP
181\f[BI]20copyfiles\fP
182Copy files from th host system into the chroot.  Configure networking by
183copying hosts and resolv.conf, and user accounts by copying passwd, shadow and
184groups.
185.TP
186\f[BI]50chrootname\fP
187Set the chroot name (\fI/etc/debian_chroot\fP) in the chroot.  This may be used
188by the shell prompt to display the current chroot.
189.TP
190\f[BI]50sbuild\fP
191If
192.BR sbuild (1)
193is installed, set up the build directories, including ownership and
194permissions, inside the chroot for use by sbuild.
195.SH AUTHORS
196Roger Leigh.
197.SH COPYRIGHT
198Copyright \(co 2005\-2008  Roger Leigh \f[CR]<rleigh@debian.org>\fP
199.PP
200\fBschroot\fP is free software: you can redistribute it and/or modify it under
201the terms of the GNU General Public License as published by the Free Software
202Foundation, either version 3 of the License, or (at your option) any later
203version.
204.SH SEE ALSO
205.BR schroot (1),
206.BR schroot.conf (5),
207.BR schroot\-script\-config (5),
208.BR run\-parts (8).
209.\"#
210.\"# The following sets edit modes for GNU EMACS
211.\"# Local Variables:
212.\"# mode:nroff
213.\"# fill-column:79
214.\"# End:
Note: See TracBrowser for help on using the repository browser.