Improve schroot documentation. Remove few blank lines.
[mirror/dsa-wiki.git] / input / doc / schroot.mdwn
1 using schroot in debian.org porterboxes
2 =======================================
3
4 When logging into Debian porterbox machine, it should display similar message:
5 <pre><code>
6 Welcome to porterbox.debian.org, the Debian arch porterbox.
7
8 See 'schroot -l' for a list of available chroots.  Start new sessions
9 with 'schroot --begin-session -c <chroot>', run commands in sessions using
10 'schroot --run-session -c <session> [-- command]', and tear down sessions
11 using 'schroot --end-session -c <session>'.  You can run a limited set of
12 privileged commands, for instance some of apt-get, using
13 'dd-schroot-cmd -c <session> <command>'.
14 Use 'schroot --list --all-sessions' or 'schroot-list-sessions [<userglob>]'
15 to list (your) open sessions.
16
17 This server is hosted at data centre.
18 </code></pre>
19
20 The previous description is rather compact and dense, so let's try to describe the usage in more friendly way.
21
22 * List available chroots:
23 <pre><code>
24         $ schroot -l
25 </code></pre>
26
27 * Begin a persistent schroot session on Debian unstable:
28 <pre><code>
29         $ schroot -b -c sid -n mysid
30 </code></pre>
31
32 * Update and upgrade Debian unstable chroot:
33 <pre><code>
34         $ dd-schroot-cmd -c mysid apt-get update
35         $ dd-schroot-cmd -c mysid apt-get upgrade
36         [..]
37         Do it for real [Y/n]: <Enter>
38         [..]
39 </code></pre>
40
41 * Install your broken package build dependencies:
42 <pre><code>
43         $ dd-schroot-cmd -c mysid apt-get build-dep gentoo
44         [..]
45         Do it for real [Y/n]: <Enter>
46         [..]
47 </code></pre>
48
49 * Change root to Debian unstable chroot:
50 <pre><code>
51         $ schroot -r -c mysid
52 </code></pre>
53
54 * Download your broken package source:
55 <pre><code>
56         (sid_arch-dchroot)user@porterbox:~$ apt-get source gentoo
57 </code></pre>
58
59 * You should be able to reproduce your issue, hack on the package, fix the bug. Once you are done with your work, please, finish your schroot session:
60 <pre><code>
61         (sid_arch-dchroot)user@porterbox:~$ exit
62         $ schroot -e -c mysid
63         $ exit
64 </code></pre>
65
66 * You should be done by now. If you find any issue, please report to debian-admin@lists.debian.org.