File: sbuild-qemu.1.in

package info (click to toggle)
sbuild 0.81.2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 1,756 kB
  • sloc: perl: 15,954; sh: 1,413; sql: 797; python: 401; makefile: 306; lisp: 304
file content (117 lines) | stat: -rw-r--r-- 4,753 bytes parent folder | download
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
.\" Copyright © 2020       Christian Kastner <ckk@debian.org>
.\"
.\" This program is free software: you can redistribute it and/or modify
.\" it under the terms of the GNU General Public License as published by
.\" the Free Software Foundation, either version 2 of the License, or
.\" (at your option) any later version.
.\"
.\" This program is distributed in the hope that it will be useful, but
.\" WITHOUT ANY WARRANTY; without even the implied warranty of
.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
.\" General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public License
.\" along with this program.  If not, see
.\" <http://www.gnu.org/licenses/>.
.so defs.man
.TH SBUILD\-QEMU "1" "\*[RELEASE_DATE]" "Version \*[VERSION]" "Debian sbuild"
.SH NAME
sbuild\-qemu \- sbuild using QEMU images
.SH SYNOPSIS
.B sbuild\-qemu
.RB [ \-h ]
.RB [ \-\-arch=ARCH ]
.RB [ \-d=DIST ]
.RB [ \-\-image=IMAGE ]
.RB [ \-\-autopkgtest\-debug ]
.RB [ \-\-ram=MiB ]
.RB [ \-\-cpus=CPUs ]
.RB [ \-\-overlay\-dir=OVERLAY_DIR ]
.RB [ \-\-noexec ]
.PP
Build Debian packages with \fBsbuild\fR using QEMU images, by using sbuild's
\fB\-\-chroot\-mode=autopkgtest\fR.
.PP
All options other than the ones described below are passed on through to
\fBsbuild\fR. The image will be started in snapshot mode, so the image is
never changed. Multiple processes can use the same image concurrently.
.SH OPTIONS
.TP
\fB\-h\fR, \fB\-\-help\fR
Show this help message and exit.
.TP
\fB\-\-arch\fR=ARCH
Architecture to use. Default is the host architecture. Currently supported
architectures are: amd64, i386.
.TP
\fB\-d\fR=DIST, \fB\-\-dist\fR=DIST
Distribution (for the .changes file). Default is \fBunstable\fR.
.TP
\fB\-\-image\fR=IMAGE
VM image to use for building. If not specified, will look for an image with the 
name \fBDIST\-autopkgtest\-ARCH.img\fR. Will first look in the current
directory, and if no such file exists there, then the directory
\fB$IMAGEDIR\fR is tried. A suitable image can be created with
sbuild\-qemu\-create(1).
.TP
\fB\-\-autopkgtest\-debug\fR
Enable debug output for the autopkgtest\-virt\-qemu(1) driver.
.TP
\fB\-\-ram\fR=MiB
VM memory size in MB. Default: 2048
.TP
\fB\-\-cpus\fR=CPUs
VM CPU count. Default: Number of physical cores on the host.
.TP
\fB\-\-overlay\-dir\fR=OVERLAY_DIR
Directory for the temporary image overlay instead of autopkgtest's default of
\fI\,/tmp\/\fP (or $TMPDIR).
.TP
\fB\-\-noexec\fR
Don't actually do anything. Just print the sbuild(1) command string that would
be executed, and then exit.
.SH CONSIDERATIONS
Using a fast temporary image overlay is key to faster build times. An overlay
created on a \fItmpfs\fR would be ideal, and can speed up I/O by an order of
magnitude, compared to a slow HDD. If \fI\,/tmp\fR or \fI$TMPDIR\fR are mountpoints
for a tmpfs, then all should be fine by default.
.PP
However, tmpfs filesystems are backed by memory and swap on the host, so a build
needing substantial disk space in the VM may fail. If this happens, the
\-\-overlay\-dir option should be used to point to a host directory with more
available disk space. Note that the base image itself must have been created
with a suitable size, see the \fB\-\-size\fR option to sbuild\-qemu\-create(1).
.SH LIMITATIONS
Due to the nature of sbuild's \fB\-\-chroot\-mode=autopkgtest\fR, not all
sbuild options are supported yet. In particular, getting an interactive
shell, for example using \fB\-\-build\-failed\-command\fR is \fBNOT\fR possible.
However, there are other ways to access the build environment (see below).
.SH "VM ACCESS"
sbuild's \fB\-\-chroot\-mode=autopkgtest\fR uses autopkgtest\-virt\-qemu under
the hood, so you will find an SSH shell on port 10022 (or the first free port
after that) if, and only if, the openssh\-server package is installed in the
VM.
.PP
As a further consequence of this chroot mode, what is stated in
autopkgtest\-virt\-qemu(1) generally also holds here.
.PP
.SH EXAMPLES
\fB$ sbuild\-qemu \-d unstable \-s \-\-arch\-all FOO.dsc\fR
.PP
This will build the package \fBFOO.dsc\fR using \fBunstable\fR as the
Distribution in the generated .changes file.
.PP
Because the \fB\-\-image\fR option was not specified, an image with the name
\fBunstable\-autopkgtest\-amd64.img\fR will be looked for first in the current
directory, and then in \fB$IMAGEDIR\fI.
.PP
The \fB\-s\fR and \fB\-\-arch\-all\fR aren't known to sbuild-qemu, and
are therefore will be passed on through to sbuild for it to use.
.SH ENVIRONMENT
\fB$IMAGEDIR\fR defaults to \fI~/.cache/sbuild\fR.
.SH COPYRIGHT
Copyright \[co] 2020 Christian Kastner <ckk@debian.org>
.SH "SEE ALSO"
.BR sbuild (1),
.BR sbuild\-qemu\-create (1),
.BR sbuild\-qemu\-update (1).