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