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 |
---|
19 | schroot\-setup \- schroot chroot setup scripts |
---|
20 | .SH DESCRIPTION |
---|
21 | \fBschroot\fP uses scripts to set up and then clean up the chroot environment. |
---|
22 | The directory \f[BI]@SCHROOT_CONF_SETUP_D@\fP contains scripts run when a |
---|
23 | chroot is created and destroyed. Several environment variables are set while |
---|
24 | the scripts are being run, which allows their behaviour to be customised, |
---|
25 | depending upon, for example, the type of chroot in use. |
---|
26 | .PP |
---|
27 | The scripts are run in name order, like those run by |
---|
28 | .BR init (8), |
---|
29 | by using the same style of execution as |
---|
30 | .BR run-parts (8). |
---|
31 | .PP |
---|
32 | The setup scripts are all invoked with two options: |
---|
33 | .IP 1 |
---|
34 | The action to perform. |
---|
35 | .IP |
---|
36 | When 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 |
---|
38 | session is ended, the scripts in \fI@SCHROOT_CONF_SETUP_D@\fP are run in |
---|
39 | reverse order with the \[oq]setup\-stop\[cq] option. |
---|
40 | .IP 2 |
---|
41 | The chroot status. |
---|
42 | .IP |
---|
43 | This is either \[oq]ok\[cq] if there are no problems, or \[oq]fail\[cq] if |
---|
44 | something went wrong. For example, particular actions may be skipped on |
---|
45 | failure. |
---|
46 | .PP |
---|
47 | Note that the scripts should be \fIidempotent\fP. They \fBmust\fP be |
---|
48 | idempotent during the \[oq]setup\-stop\[cq] phase, because they may be run more |
---|
49 | than once, for example on failure. |
---|
50 | .SH ENVIRONMENT |
---|
51 | .SS General variables |
---|
52 | .TP |
---|
53 | AUTH_USER |
---|
54 | The username of the user the command in the chroot will run as. |
---|
55 | .TP |
---|
56 | AUTH_VERBOSITY |
---|
57 | Set 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 |
---|
61 | MOUNT_DIR |
---|
62 | The directory under which non-filesystem chroots are mounted (e.g. block |
---|
63 | devices and LVM snapshots). |
---|
64 | .TP |
---|
65 | LIBEXEC_DIR |
---|
66 | The directory under which helper programs are located. |
---|
67 | .TP |
---|
68 | PID |
---|
69 | The process ID of the schroot process. |
---|
70 | .TP |
---|
71 | SESSION_ID |
---|
72 | The session identifier. |
---|
73 | .TP |
---|
74 | CHROOT_SESSION_CREATE |
---|
75 | Set to \[oq]true\[cq] if a session will be created, otherwise \[oq]false\[cq]. |
---|
76 | .TP |
---|
77 | CHROOT_SESSION_CLONE |
---|
78 | Set to \[oq]true\[cq] if a session will be cloned, otherwise \[oq]false\[cq]. |
---|
79 | .TP |
---|
80 | CHROOT_SESSION_PURGE |
---|
81 | Set to \[oq]true\[cq] if a session will be purged, otherwise \[oq]false\[cq]. |
---|
82 | .TP |
---|
83 | CHROOT_TYPE |
---|
84 | The type of the chroot. This is useful for restricting a setup task to |
---|
85 | particular types of chroot (e.g. only block devices or LVM snapshots). |
---|
86 | .TP |
---|
87 | CHROOT_NAME |
---|
88 | The name of the chroot. This is useful for restricting a setup task to a |
---|
89 | particular chroot, or set of chroots. |
---|
90 | .TP |
---|
91 | CHROOT_DESCRIPTION |
---|
92 | The description of the chroot. |
---|
93 | .TP |
---|
94 | CHROOT_MOUNT_LOCATION |
---|
95 | The location to mount the chroot. It is used for mount point creation and |
---|
96 | mounting. |
---|
97 | .TP |
---|
98 | CHROOT_LOCATION |
---|
99 | The location of the chroot inside the mount point. This is to allow multiple |
---|
100 | chroots on a single filesystem. Set for all mountable chroot types. |
---|
101 | .TP |
---|
102 | CHROOT_PATH |
---|
103 | The absolute path to the chroot. This is typically CHROOT_MOUNT_LOCATION and |
---|
104 | CHROOT_LOCATION concatenated together. This is the path which should be used |
---|
105 | to access the chroots. |
---|
106 | .SS Plain and directory chroot variables |
---|
107 | These chroot types use only general variables. |
---|
108 | .SS File variables |
---|
109 | .TP |
---|
110 | CHROOT_FILE |
---|
111 | The file containing the chroot files. |
---|
112 | .TP |
---|
113 | CHROOT_FILE_REPACK |
---|
114 | Set to \[oq]true\[cq] to repack the chroot into an archive file on ending a |
---|
115 | session, otherwise \[oq]false\[cq]. |
---|
116 | .SS Mountable chroot variables |
---|
117 | .PP |
---|
118 | These variables are only set for directly mountable chroot types. |
---|
119 | .TP |
---|
120 | CHROOT_MOUNT_DEVICE |
---|
121 | The device to mount containing the chroot. |
---|
122 | mounting. |
---|
123 | .TP |
---|
124 | CHROOT_MOUNT_OPTIONS |
---|
125 | Options to pass to |
---|
126 | .BR mount (8). |
---|
127 | .TP |
---|
128 | CHROOT_LOCATION |
---|
129 | The location of the chroot inside the mount point. This allows the existence |
---|
130 | of multiple chroots on a single filesystem. |
---|
131 | .SS Filesystem union variables |
---|
132 | .TP |
---|
133 | CHROOT_UNION_TYPE |
---|
134 | Union filesystem type. |
---|
135 | .TP |
---|
136 | CHROOT_UNION_MOUNT_OPTIONS |
---|
137 | Union filesystem mount options. |
---|
138 | .TP |
---|
139 | CHROOT_UNION_OVERLAY_DIRECTORY |
---|
140 | Union filesystem overlay directory (writable). |
---|
141 | .TP |
---|
142 | CHROOT_UNION_UNDERLAY_DIRECTORY |
---|
143 | Union filesystem underlay directory (read-only). |
---|
144 | .SS Block device variables |
---|
145 | .TP |
---|
146 | CHROOT_DEVICE |
---|
147 | The device containing the chroot root filesystem. This is usually, but not |
---|
148 | necessarily, the device which will be mounted. For example, an LVM snapshot |
---|
149 | this will be the original logical volume. |
---|
150 | .SS LVM snapshot variables |
---|
151 | .TP |
---|
152 | CHROOT_LVM_SNAPSHOT_NAME |
---|
153 | Snapshot name to pass to |
---|
154 | .BR lvcreate (8). |
---|
155 | .TP |
---|
156 | CHROOT_LVM_SNAPSHOT_DEVICE |
---|
157 | The name of the LVM snapshot device. |
---|
158 | .TP |
---|
159 | CHROOT_LVM_SNAPSHOT_OPTIONS |
---|
160 | Options to pass to |
---|
161 | .BR lvcreate (8). |
---|
162 | .SH FILES |
---|
163 | .SS \f[BI]@SCHROOT_CONF_SETUP_D@\fP |
---|
164 | The system-wide chroot setup directory. |
---|
165 | .TP |
---|
166 | \f[BI]00check\fP |
---|
167 | Print debugging diagnostics and perform basic sanity checking. |
---|
168 | .TP |
---|
169 | \f[BI]05file\fP |
---|
170 | Unpack, clean up, and repack file-based chroots. |
---|
171 | .TP |
---|
172 | \f[BI]05fsunion\fP |
---|
173 | Create and remove union filesystems. |
---|
174 | .TP |
---|
175 | \f[BI]05lvm\fP |
---|
176 | Create and remove LVM snapshots. |
---|
177 | .TP |
---|
178 | \f[BI]10mount\fP |
---|
179 | Mount and unmount filesystems. |
---|
180 | .TP |
---|
181 | \f[BI]20copyfiles\fP |
---|
182 | Copy files from th host system into the chroot. Configure networking by |
---|
183 | copying hosts and resolv.conf, and user accounts by copying passwd, shadow and |
---|
184 | groups. |
---|
185 | .TP |
---|
186 | \f[BI]50chrootname\fP |
---|
187 | Set the chroot name (\fI/etc/debian_chroot\fP) in the chroot. This may be used |
---|
188 | by the shell prompt to display the current chroot. |
---|
189 | .TP |
---|
190 | \f[BI]50sbuild\fP |
---|
191 | If |
---|
192 | .BR sbuild (1) |
---|
193 | is installed, set up the build directories, including ownership and |
---|
194 | permissions, inside the chroot for use by sbuild. |
---|
195 | .SH AUTHORS |
---|
196 | Roger Leigh. |
---|
197 | .SH COPYRIGHT |
---|
198 | Copyright \(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 |
---|
201 | the terms of the GNU General Public License as published by the Free Software |
---|
202 | Foundation, either version 3 of the License, or (at your option) any later |
---|
203 | version. |
---|
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: |
---|