summaryrefslogtreecommitdiffstats
path: root/man/sbuild-qemu.1.in
blob: cdb983c124b9d6204f4f20a10d6b604aaa129445 (plain)
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-2022 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 [ \-\-image=IMAGE ]
.RB [ \-\-ram\-size=MiB ]
.RB [ \-\-cpus=CPUs ]
.RB [ \-\-overlay\-dir=OVERLAY_DIR ]
.RB [ \-\-noexec ]
.RB [ \-\-autopkgtest\-debug ]
.RB [ <sbuild-options> ]
.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(1), though the options \fB\-\-dist\fR, \fB\-\-arch\fR
and \fB\-\-build\fR are peeked at when looking for images. The image will be
started in \fB\-snapshot\fR mode, so the image is never modified. 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\-\-image\fR=IMAGE
QEMU image file to use for building. If not specified, sbuild-qemu will look
for an image with the name \fBDIST\-autopkgtest\-ARCH.img\fR, where DIST is
taken from \fB\-\-dist\fR if present, and ARCH is taken from \fB\-\-arch\fR
or \fB\-\-build\fR if present. Otherwise, DIST defaults to 'unstable', and
ARCH to the host architecture. sbuild-qemu will first look in the current
directory for such an image, and then in the directory \fB$IMAGEDIR\fR. A
suitable image can be created with sbuild\-qemu\-create(1).
.TP
\fB\-\-ram\-size\fR=MiB
VM memory size in MB. Default: 2048
.TP
\fB\-\-cpus\fR=CPUs
VM CPU count. Default: 2
.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.
.TP
\fB\-\-autopkgtest\-debug\fR
Enable debug output for the autopkgtest\-virt\-qemu(1) driver.
.TP
\fB\-\-boot\fR=auto,bios,efi,ieee1275,none
How to boot the image. Default is BIOS on amd64 and i386, EFI on arm64 and
armhf, and IEEE1275 on ppc64el.
.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-2022 Christian Kastner <ckk@debian.org>
.SH "SEE ALSO"
.BR sbuild (1),
.BR sbuild\-qemu\-create (1),
.BR sbuild\-qemu\-update (1).