summaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:46:56 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:46:56 +0000
commit8e79ad9f544d1c4a0476e0d96aef0496ca7fc741 (patch)
treecda1743f5820600fd8c638ac7f034f917ac8c381 /man
parentInitial commit. (diff)
downloadsbuild-8e79ad9f544d1c4a0476e0d96aef0496ca7fc741.tar.xz
sbuild-8e79ad9f544d1c4a0476e0d96aef0496ca7fc741.zip
Adding upstream version 0.85.6.upstream/0.85.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'man')
-rw-r--r--man/.gitignore7
-rw-r--r--man/Makefile.am102
-rw-r--r--man/buildd-mail.1.in88
-rw-r--r--man/buildd-uploader.1.in70
-rw-r--r--man/buildd-vlog.1.in72
-rw-r--r--man/buildd-watcher.1.in72
-rw-r--r--man/buildd.1.in75
-rw-r--r--man/buildd.conf.5.in75
-rw-r--r--man/defs.man.in19
-rw-r--r--man/sbuild-abort.1.in61
-rw-r--r--man/sbuild-adduser.8.in71
-rw-r--r--man/sbuild-apt.1.in84
-rw-r--r--man/sbuild-checkpackages.1.in81
-rw-r--r--man/sbuild-createchroot.8.in365
-rw-r--r--man/sbuild-debian-developer-setup.1.in78
-rw-r--r--man/sbuild-debuild.1.in196
-rw-r--r--man/sbuild-destroychroot.8.in57
-rw-r--r--man/sbuild-hold.1.in71
-rw-r--r--man/sbuild-qemu-boot.1.in98
-rw-r--r--man/sbuild-qemu-create.1.in161
-rw-r--r--man/sbuild-qemu-update.1.in77
-rw-r--r--man/sbuild-qemu.1.in117
-rw-r--r--man/sbuild-setup.7.in303
-rw-r--r--man/sbuild-shell.1.in63
-rw-r--r--man/sbuild-update.1.in134
-rw-r--r--man/sbuild.1.in1678
-rw-r--r--man/sbuild.conf.5.in74
27 files changed, 4349 insertions, 0 deletions
diff --git a/man/.gitignore b/man/.gitignore
new file mode 100644
index 0000000..f522167
--- /dev/null
+++ b/man/.gitignore
@@ -0,0 +1,7 @@
+*.1
+*.5
+*.7
+*.8
+sbuild.conf.man
+buildd.conf.man
+defs.man
diff --git a/man/Makefile.am b/man/Makefile.am
new file mode 100644
index 0000000..a210e1b
--- /dev/null
+++ b/man/Makefile.am
@@ -0,0 +1,102 @@
+# sbuild Makefile template
+#
+#
+# Copyright © 2004-2008 Roger Leigh <rleigh@debian.org>
+#
+# sbuild 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 3 of the License, or
+# (at your option) any later version.
+#
+# sbuild 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/>.
+#
+#####################################################################
+
+include $(top_srcdir)/scripts/global.mk
+
+man_MANS = \
+ buildd.1 \
+ buildd.conf.5 \
+ buildd-mail.1 \
+ buildd-uploader.1 \
+ buildd-vlog.1 \
+ buildd-watcher.1 \
+ sbuild.1 \
+ sbuild.conf.5 \
+ sbuild-abort.1 \
+ sbuild-adduser.8 \
+ sbuild-apt.1 \
+ sbuild-checkpackages.1 \
+ sbuild-createchroot.8 \
+ sbuild-debian-developer-setup.1 \
+ sbuild-destroychroot.8 \
+ sbuild-hold.1 \
+ sbuild-qemu.1 \
+ sbuild-qemu-boot.1 \
+ sbuild-qemu-create.1 \
+ sbuild-qemu-update.1 \
+ sbuild-setup.7 \
+ sbuild-shell.1 \
+ sbuild-update.1
+
+sbuild.conf.man: $(abs_top_srcdir)/tools/sbuild-dumpconfig $(abs_top_srcdir)/lib/Sbuild/Conf.pm $(abs_top_srcdir)/lib/Sbuild/ConfBase.pm
+ PERL5LIB=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib \
+ $< sbuild man > $@
+
+buildd.conf.man: $(abs_top_srcdir)/tools/sbuild-dumpconfig $(abs_top_srcdir)/lib/Buildd/Conf.pm
+ PERL5LIB=$(abs_top_srcdir)/lib:$(abs_top_builddir)/lib \
+ $< buildd man > $@
+
+sbuild.conf.5: sbuild.conf.5.in defs.man sbuild.conf.man
+ soelim $< > $@
+
+buildd.conf.5: buildd.conf.5.in defs.man buildd.conf.man
+ soelim $< > $@
+
+%.1: %.1.in defs.man
+ soelim $< > $@
+
+%.5: %.5.in defs.man
+ soelim $< > $@
+
+%.7: %.7.in defs.man
+ soelim $< > $@
+
+%.8: %.8.in defs.man
+ soelim $< > $@
+
+CLEANFILES = \
+ sbuild.conf.man \
+ buildd.conf.man
+
+EXTRA_DIST = \
+ defs.man.in \
+ $(addsuffix .in, $(man_MANS)) \
+ sbuild-debuild.1.in
+
+install-data-hook:
+ ln -sf sbuild-hold.1 $(DESTDIR)$(man1dir)/sbuild-unhold.1
+ ln -sf sbuild-update.1 $(DESTDIR)$(man1dir)/sbuild-upgrade.1
+ ln -sf sbuild-update.1 $(DESTDIR)$(man1dir)/sbuild-distupgrade.1
+ ln -sf sbuild-update.1 $(DESTDIR)$(man1dir)/sbuild-clean.1
+ ln -sf buildd-mail.1 $(DESTDIR)$(man1dir)/buildd-mail-wrapper.1
+ ln -sf sbuild-abort.1 $(DESTDIR)$(man1dir)/buildd-abort.1
+ ln -sf sbuild-update.1 $(DESTDIR)$(man1dir)/buildd-update-chroots.1
+ ln -sf sbuild-createchroot.8 $(DESTDIR)$(man8dir)/buildd-make-chroot.8
+
+uninstall-hook:
+ $(RM) $(DESTDIR)$(man1dir)/sbuild-unhold.1
+ $(RM) $(DESTDIR)$(man1dir)/sbuild-upgrade.1
+ $(RM) $(DESTDIR)$(man1dir)/sbuild-distupgrade.1
+ $(RM) $(DESTDIR)$(man1dir)/sbuild-clean.1
+ $(RM) $(DESTDIR)$(man1dir)/buildd-mail-wrapper.1
+ $(RM) $(DESTDIR)$(man1dir)/buildd-abort.1
+ $(RM) $(DESTDIR)$(man1dir)/buildd-update-chroots.1
+ $(RM) $(DESTDIR)$(man8dir)/buildd-make-chroot.8
diff --git a/man/buildd-mail.1.in b/man/buildd-mail.1.in
new file mode 100644
index 0000000..4d57a37
--- /dev/null
+++ b/man/buildd-mail.1.in
@@ -0,0 +1,88 @@
+.\" Copyright © 2009 Roger Leigh <rleigh@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 BUILDD\-MAIL 1 "\*[RELEASE_DATE]" "Version \*[VERSION]" "Debian sbuild"
+.SH NAME
+buildd\-mail \- mail answer processor for buildd
+.SH SYNOPSIS
+.B buildd\-mail
+.br
+.B buildd\-mail\-wrapper
+.SH VERSION
+This man page documents the packaged version of buildd\-mail. This version
+is maintained by the \fBbuildd-tools\fP project developers on Alioth
+(\f[CR]https://alioth.debian.org/projects/buildd\-tools/\fP).
+.PP
+There is also a version maintained by Ryan Murray which is adapted to build
+daemon needs, with similar functionality. This version should be equally
+capable of working in a buildd setup, but has a number of enhancements aimed at
+making it suitable for use by end-users.
+.SH DESCRIPTION
+\fBbuildd\-mail\fR processes incoming mail for the buildd user.
+.PP
+\fBbuildd\-mail\-wrapper\fR was a setuid wrapper for buildd\-mail, which has
+been removed and is no longer required. It has been kept as a symbolic link to
+buildd\-mail for compatibility purposes, but is obsolete and will removed in a
+future release.
+.SH SETUP
+The buildd user should have a file \fI~/.forward\fP with the following
+contents:
+.PP
+\f[CR]|/usr/bin/buildd-mail-wrapper\fP
+.br
+.PP
+This will ensure all incoming mail will be processed using buildd\-mail.
+.SH FILES
+.TP
+.I /etc/buildd/buildd.conf
+Configuration, maintained by the system administrator. This may be used to
+override the defaults.
+.TP
+.I ~/.builddrc
+User-specific configuration.
+.TP
+.I ~/.forward
+Mail forwarding configuration.
+.SH AUTHORS
+Roman Hodek <Roman.Hodek@informatik.uni\-erlangen.de>.
+.PP
+\fBsbuild\fR is based on debbuild, written by James Troup
+<james@nocrew.org> and has been modified by
+.nf
+Ben Collins <bcollins@debian.org>,
+Ryan Murray <rmurray@debian.org>,
+Francesco Paolo Lovergine <frankie@debian.org>,
+Michael Banck <mbanck@debian.org>, and
+Roger Leigh <rleigh@debian.org>
+.fi
+.SH COPYRIGHT
+.nf
+Copyright \[co] 1998-2000 Roman Hodek <roman\@hodek.net>
+Copyright \[co] 1998-1999 James Troup <troup\@debian.org>
+Copyright \[co] 2003-2006 Ryan Murray <rmurray\@debian.org>
+Copyright \[co] 2001-2003 Rick Younie <younie\@debian.org>
+Copyright \[co] 2003-2004 Francesco Paolo Lovergine <frankie\@debian.org>
+Copyright \[co] 2005 Michael Banck <mbanck\@debian.org>
+Copyright \[co] 2005-2008 Roger Leigh <rleigh\@debian.org>
+.fi
+.SH "SEE ALSO"
+.BR buildd (1).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/man/buildd-uploader.1.in b/man/buildd-uploader.1.in
new file mode 100644
index 0000000..85f0b64
--- /dev/null
+++ b/man/buildd-uploader.1.in
@@ -0,0 +1,70 @@
+.\" Copyright © 2009 Roger Leigh <rleigh@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 BUILDD\-UPLOADER 1 "\*[RELEASE_DATE]" "Version \*[VERSION]" "Debian sbuild"
+.SH NAME
+buildd\-uploader \- upload built packages for buildd
+.SH SYNOPSIS
+.B buildd\-uploader
+.SH VERSION
+This man page documents the packaged version of buildd\-uploader. This version
+is maintained by the \fBbuildd-tools\fP project developers on Alioth
+(\f[CR]https://alioth.debian.org/projects/buildd\-tools/\fP).
+.PP
+There is also a version maintained by Ryan Murray which is adapted to build
+daemon needs, with similar functionality. This version should be equally
+capable of working in a buildd setup, but has a number of enhancements aimed at
+making it suitable for use by end-users.
+.SH DESCRIPTION
+\fBbuildd\-uploader\fR uploads built packages.
+.SH FILES
+.TP
+.I /etc/buildd/buildd.conf
+Configuration, maintained by the system administrator. This may be used to
+override the defaults.
+.TP
+.I ~/.builddrc
+User-specific configuration.
+.SH AUTHORS
+Roman Hodek <Roman.Hodek@informatik.uni\-erlangen.de>.
+.PP
+\fBsbuild\fR is based on debbuild, written by James Troup
+<james@nocrew.org> and has been modified by
+.nf
+Ben Collins <bcollins@debian.org>,
+Ryan Murray <rmurray@debian.org>,
+Francesco Paolo Lovergine <frankie@debian.org>,
+Michael Banck <mbanck@debian.org>, and
+Roger Leigh <rleigh@debian.org>
+.fi
+.SH COPYRIGHT
+.nf
+Copyright \[co] 1998-2000 Roman Hodek <roman\@hodek.net>
+Copyright \[co] 1998-1999 James Troup <troup\@debian.org>
+Copyright \[co] 2003-2006 Ryan Murray <rmurray\@debian.org>
+Copyright \[co] 2001-2003 Rick Younie <younie\@debian.org>
+Copyright \[co] 2003-2004 Francesco Paolo Lovergine <frankie\@debian.org>
+Copyright \[co] 2005 Michael Banck <mbanck\@debian.org>
+Copyright \[co] 2005-2008 Roger Leigh <rleigh\@debian.org>
+.fi
+.SH "SEE ALSO"
+.BR buildd (1).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/man/buildd-vlog.1.in b/man/buildd-vlog.1.in
new file mode 100644
index 0000000..d47944b
--- /dev/null
+++ b/man/buildd-vlog.1.in
@@ -0,0 +1,72 @@
+.\" Copyright © 2009 Roger Leigh <rleigh@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 BUILDD\-VLOG 1 "\*[RELEASE_DATE]" "Version \*[VERSION]" "Debian sbuild"
+.SH NAME
+buildd\-vlog \- view current build log
+.SH SYNOPSIS
+.B buildd\-vlog
+.SH VERSION
+This man page documents the packaged version of buildd\-vlog. This version
+is maintained by the \fBbuildd-tools\fP project developers on Alioth
+(\f[CR]https://alioth.debian.org/projects/buildd\-tools/\fP).
+.PP
+There is also a version maintained by Ryan Murray which is adapted to build
+daemon needs, with similar functionality. This version should be equally
+capable of working in a buildd setup, but has a number of enhancements aimed at
+making it suitable for use by end-users.
+.SH DESCRIPTION
+\fBbuildd\-vlog\fR monitors the build currently in progress and outputs the
+log file during the build in a manner similar to
+.BR tail (1) .
+.SH FILES
+.TP
+.I /etc/buildd/buildd.conf
+Configuration, maintained by the system administrator. This may be used to
+override the defaults.
+.TP
+.I ~/.builddrc
+User-specific configuration.
+.SH AUTHORS
+Roman Hodek <Roman.Hodek@informatik.uni\-erlangen.de>.
+.PP
+\fBsbuild\fR is based on debbuild, written by James Troup
+<james@nocrew.org> and has been modified by
+.nf
+Ben Collins <bcollins@debian.org>,
+Ryan Murray <rmurray@debian.org>,
+Francesco Paolo Lovergine <frankie@debian.org>,
+Michael Banck <mbanck@debian.org>, and
+Roger Leigh <rleigh@debian.org>
+.fi
+.SH COPYRIGHT
+.nf
+Copyright \[co] 1998-2000 Roman Hodek <roman\@hodek.net>
+Copyright \[co] 1998-1999 James Troup <troup\@debian.org>
+Copyright \[co] 2003-2006 Ryan Murray <rmurray\@debian.org>
+Copyright \[co] 2001-2003 Rick Younie <younie\@debian.org>
+Copyright \[co] 2003-2004 Francesco Paolo Lovergine <frankie\@debian.org>
+Copyright \[co] 2005 Michael Banck <mbanck\@debian.org>
+Copyright \[co] 2005-2008 Roger Leigh <rleigh\@debian.org>
+.fi
+.SH "SEE ALSO"
+.BR buildd (1).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/man/buildd-watcher.1.in b/man/buildd-watcher.1.in
new file mode 100644
index 0000000..15ddbff
--- /dev/null
+++ b/man/buildd-watcher.1.in
@@ -0,0 +1,72 @@
+.\" Copyright © 2009 Roger Leigh <rleigh@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 BUILDD\-WATCHER 1 "\*[RELEASE_DATE]" "Version \*[VERSION]" "Debian sbuild"
+.SH NAME
+buildd\-watcher \- watch buildd activity
+.SH SYNOPSIS
+.B buildd\-watcher
+.SH VERSION
+This man page documents the packaged version of buildd\-watcher. This version
+is maintained by the \fBbuildd-tools\fP project developers on Alioth
+(\f[CR]https://alioth.debian.org/projects/buildd\-tools/\fP).
+.PP
+There is also a version maintained by Ryan Murray which is adapted to build
+daemon needs, with similar functionality. This version should be equally
+capable of working in a buildd setup, but has a number of enhancements aimed at
+making it suitable for use by end-users.
+.SH DESCRIPTION
+\fBbuildd\-watcher\fR monitors the activity of the buildd daemon and restarts
+it if required. It additionally cleans up old files, and rotates and archives
+log files.
+.SH FILES
+.TP
+.I /etc/buildd/buildd.conf
+Configuration, maintained by the system administrator. This may be used to
+override the defaults.
+.TP
+.I ~/.builddrc
+User-specific configuration.
+.SH AUTHORS
+Roman Hodek <Roman.Hodek@informatik.uni\-erlangen.de>.
+.PP
+\fBsbuild\fR is based on debbuild, written by James Troup
+<james@nocrew.org> and has been modified by
+.nf
+Ben Collins <bcollins@debian.org>,
+Ryan Murray <rmurray@debian.org>,
+Francesco Paolo Lovergine <frankie@debian.org>,
+Michael Banck <mbanck@debian.org>, and
+Roger Leigh <rleigh@debian.org>
+.fi
+.SH COPYRIGHT
+.nf
+Copyright \[co] 1998-2000 Roman Hodek <roman\@hodek.net>
+Copyright \[co] 1998-1999 James Troup <troup\@debian.org>
+Copyright \[co] 2003-2006 Ryan Murray <rmurray\@debian.org>
+Copyright \[co] 2001-2003 Rick Younie <younie\@debian.org>
+Copyright \[co] 2003-2004 Francesco Paolo Lovergine <frankie\@debian.org>
+Copyright \[co] 2005 Michael Banck <mbanck\@debian.org>
+Copyright \[co] 2005-2008 Roger Leigh <rleigh\@debian.org>
+.fi
+.SH "SEE ALSO"
+.BR buildd (1).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/man/buildd.1.in b/man/buildd.1.in
new file mode 100644
index 0000000..26d7009
--- /dev/null
+++ b/man/buildd.1.in
@@ -0,0 +1,75 @@
+.\" Copyright © 2009 Roger Leigh <rleigh@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 BUILDD 1 "\*[RELEASE_DATE]" "Version \*[VERSION]" "Debian sbuild"
+.SH NAME
+buildd \- package autobuilder daemon
+.SH SYNOPSIS
+.B buildd
+.SH VERSION
+This man page documents the packaged version of buildd. This version
+is maintained by the \fBbuildd-tools\fP project developers on Alioth
+(\f[CR]https://alioth.debian.org/projects/buildd\-tools/\fP).
+.SH DESCRIPTION
+\fBbuildd\fR is a daemon used to automatically build Debian packages from
+source. wanna\-build is used to find and claim packages for building, while
+sbuild is used to build the packages. The helper programs buildd\-mail,
+buildd\-uploader and buildd\-watcher are used to perform various housekeeping
+tasks to keep the system running.
+.SH FILES
+.TP
+.I /etc/buildd/buildd.conf
+Configuration, maintained by the system administrator. This may be used to
+override the defaults.
+.TP
+.I ~/.builddrc
+User-specific configuration.
+.SH AUTHORS
+Roman Hodek <Roman.Hodek@informatik.uni\-erlangen.de>.
+.PP
+\fBsbuild\fR is based on debbuild, written by James Troup
+<james@nocrew.org> and has been modified by
+.nf
+Ben Collins <bcollins@debian.org>,
+Ryan Murray <rmurray@debian.org>,
+Francesco Paolo Lovergine <frankie@debian.org>,
+Michael Banck <mbanck@debian.org>, and
+Roger Leigh <rleigh@debian.org>
+.fi
+.SH COPYRIGHT
+.nf
+Copyright \[co] 1998-2000 Roman Hodek <roman\@hodek.net>
+Copyright \[co] 1998-1999 James Troup <troup\@debian.org>
+Copyright \[co] 2003-2006 Ryan Murray <rmurray\@debian.org>
+Copyright \[co] 2001-2003 Rick Younie <younie\@debian.org>
+Copyright \[co] 2003-2004 Francesco Paolo Lovergine <frankie\@debian.org>
+Copyright \[co] 2005 Michael Banck <mbanck\@debian.org>
+Copyright \[co] 2005-2008 Roger Leigh <rleigh\@debian.org>
+.fi
+.SH "SEE ALSO"
+.BR buildd.conf (5),
+.BR buildd\-mail (1),
+.BR buildd\-uploader (1),
+.BR buildd\-watcher (1),
+.BR buildd\-mail (1),
+.BR wanna\-build (1),
+.BR sbuild (1).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/man/buildd.conf.5.in b/man/buildd.conf.5.in
new file mode 100644
index 0000000..b00003d
--- /dev/null
+++ b/man/buildd.conf.5.in
@@ -0,0 +1,75 @@
+.\" Copyright © 2011 Roger Leigh <rleigh@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 BUILDD.CONF 5 "\*[RELEASE_DATE]" "Version \*[VERSION]" "Debian sbuild"
+.SH NAME
+buildd.conf \- configuration file for buildd
+.SH DESCRIPTION
+\fBbuildd.conf\fR is a Perl script which is sourced by buildd to permit
+configuration. It is run in a sandbox and restricted to setting a small number
+of variables, detailed below, which may be set to configure the behaviour of
+buildd. Each variable has an internal name, shown in all caps, and a perl
+variable showing the default setting. Note that the internal name is not
+accessible within buildd.conf; only the variable may be assigned. Also note
+that some of the defaults are set to be unique for each build, and so some of
+the defaults shown here are unique to the user and system used to build sbuild,
+and will be different for your system.
+.PP
+While buildd permits many aspects of its behaviour to be configured, this
+should not normally be required. The defaults should be adequate for most
+uses, and should only be changed if you are doing something more advanced, or
+have specialist requirements.
+.SH CONFIGURATION
+.so buildd.conf.man
+.SH FILES
+.TP
+.I /etc/buildd/buildd.conf
+Configuration, maintained by the system administrator. This may be used to
+override the defaults.
+.TP
+.I ~/.builddrc
+User-specific configuration.
+.SH AUTHORS
+Roman Hodek <Roman.Hodek@informatik.uni\-erlangen.de>.
+.PP
+\fBsbuild\fR is based on debbuild, written by James Troup
+<james@nocrew.org> and has been modified by
+.nf
+Ben Collins <bcollins@debian.org>,
+Ryan Murray <rmurray@debian.org>,
+Francesco Paolo Lovergine <frankie@debian.org>,
+Michael Banck <mbanck@debian.org>, and
+Roger Leigh <rleigh@debian.org>
+.fi
+.SH COPYRIGHT
+.nf
+Copyright \[co] 1998-2000 Roman Hodek <roman\@hodek.net>
+Copyright \[co] 1998-1999 James Troup <troup\@debian.org>
+Copyright \[co] 2003-2006 Ryan Murray <rmurray\@debian.org>
+Copyright \[co] 2001-2003 Rick Younie <younie\@debian.org>
+Copyright \[co] 2003-2004 Francesco Paolo Lovergine <frankie\@debian.org>
+Copyright \[co] 2005 Michael Banck <mbanck\@debian.org>
+Copyright \[co] 2005-2009 Roger Leigh <rleigh\@debian.org>
+.fi
+.SH "SEE ALSO"
+.BR buildd (1),
+.BR sbuild (1),
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/man/defs.man.in b/man/defs.man.in
new file mode 100644
index 0000000..c553ecc
--- /dev/null
+++ b/man/defs.man.in
@@ -0,0 +1,19 @@
+.ds WANNA_BUILD_CONF @WANNA_BUILD_CONF@
+.ds SCHROOT_CONF @SCHROOT_CONF@
+.ds WANNA_BUILD_SYSCONF_DIR @WANNA_BUILD_SYSCONF_DIR@
+.ds SCHROOT_SYSCONF_DIR @SCHROOT_SYSCONF_DIR@
+.ds BUILDD_CONF @BUILDD_CONF@
+.ds BUILDD_SYSCONF_DIR @BUILDD_SYSCONF_DIR@
+.ds SBUILD_CONF @SBUILD_CONF@
+.ds SBUILD_SYSCONF_DIR @SBUILD_SYSCONF_DIR@
+.ds WANNA_BUILD_LIBEXEC_DIR @WANNA_BUILD_LIBEXEC_DIR@
+.ds SBUILD_LIBEXEC_DIR @SBUILD_LIBEXEC_DIR@
+.ds RELEASE_DATE @RELEASE_DATE@
+.ds VERSION @VERSION@
+.ds PACKAGE @PACKAGE@
+.ds PACKAGE_URL @PACKAGE_URL@
+.ds PACKAGE_BUGREPORT @PACKAGE_BUGREPORT@
+.ds PACKAGE_STRING @PACKAGE_STRING@
+.ds PACKAGE_VERSION @PACKAGE_VERSION@
+.ds PACKAGE_TARNAME @PACKAGE_TARNAME@
+.ds PACKAGE_NAME @PACKAGE_NAME@
diff --git a/man/sbuild-abort.1.in b/man/sbuild-abort.1.in
new file mode 100644
index 0000000..e2e87de
--- /dev/null
+++ b/man/sbuild-abort.1.in
@@ -0,0 +1,61 @@
+.\" Copyright © 2005-2008 Roger Leigh <rleigh@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\-ABORT 1 "\*[RELEASE_DATE]" "Version \*[VERSION]" "Debian sbuild"
+.SH NAME
+sbuild\-abort \- abort the current sbuild build
+.SH SYNOPSIS
+.BR sbuild\-abort
+.RB [ \-h \[or] \-\-help " \[or] " \-V \[or] \-\-version ]
+.br
+.BR buildd\-abort
+.RB [ \-h \[or] \-\-help " \[or] " \-V \[or] \-\-version ]
+.SH DESCRIPTION
+\fBsbuild\-abort\fR kills the currently running \fIdpkg\-buildpackage\fP
+process. It will not kill if more than one process is found.
+.SH OPTIONS
+.SS Actions
+.TP
+.BR \-h ", " \-\-help
+Display this manual.
+.TP
+.BR \-V ", " \-\-version
+Print version information.
+.SH EXAMPLES
+To abort the current build:
+.PP
+\f[CR]% \f[CB]sbuild\-abort\fP\fP\[CR]
+.br
+.SH AUTHORS
+.nf
+Roman Hodek.
+Ryan Murray.
+Roger Leigh.
+.fi
+.SH COPYRIGHT
+.nf
+Copyright \[co] 1998 Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>.
+Copyright \[co] 2003 Ryan Murray <rmurray@debian.org>.
+Copyright \[co] 2006\[en]2008 Roger Leigh <rleigh@debian.org>.
+.fi
+.SH "SEE ALSO"
+.BR sbuild (1).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/man/sbuild-adduser.8.in b/man/sbuild-adduser.8.in
new file mode 100644
index 0000000..174d52a
--- /dev/null
+++ b/man/sbuild-adduser.8.in
@@ -0,0 +1,71 @@
+.\" Copyright © 2005-2008 Roger Leigh <rleigh@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\-ADDUSER 8 "\*[RELEASE_DATE]" "Version \*[VERSION]" "Debian sbuild"
+.SH NAME
+sbuild\-adduser \- add an sbuild user
+.SH SYNOPSIS
+.B sbuild\-adduser
+.RB [ \-h \[or] \-\-help " \[or] " \-V \[or] \-\-version ]
+.BR USER1 " [" USER2 " [" USER\f[BI]n\fP... ]]
+.SH DESCRIPTION
+\fBsbuild\-adduser\fR adds the specified users to the \fIsbuild\fP group,
+granting them the privilege to build packages with
+.BR sbuild (1).
+The
+.BR schroot (1)
+configuration must permit the user to obtain root permissions in the chroot via
+the \f[CI]root\-users\fP and \f[CI]root\-groups\fP options in
+\fIschroot.conf\fP, because this is required to install and remove
+build-dependencies inside the chroot. This is normally done using the
+\fIsbuild\fP group, but additional users or groups may be added in order to
+grant finer-grained permissions, for example to restrict individual users to
+particular chroots.
+.SH OPTIONS
+.SS Actions
+.TP
+.BR \-h ", " \-\-help
+Display this manual.
+.TP
+.BR \-V ", " \-\-version
+Print version information.
+.SS User selection
+.TP
+.B USER
+The user to be granted sbuild access.
+.SH EXAMPLES
+To allow user \fIrleigh\fP sbuild access:
+.PP
+\f[CR]% \f[CB]sudo sbuild\-adduser rleigh\fP\fP
+.br
+.SH AUTHORS
+.nf
+Roger Leigh.
+.fi
+.SH COPYRIGHT
+.nf
+Copyright \[co] 2006\[en]2008 Roger Leigh <rleigh@debian.org>.
+.fi
+.SH "SEE ALSO"
+.BR sbuild (1),
+.BR sbuild\-setup (7),
+.BR schroot.conf (5).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/man/sbuild-apt.1.in b/man/sbuild-apt.1.in
new file mode 100644
index 0000000..bb3eb34
--- /dev/null
+++ b/man/sbuild-apt.1.in
@@ -0,0 +1,84 @@
+.\" Copyright © 2005-2008 Roger Leigh <rleigh@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\-APT 1 "\*[RELEASE_DATE]" "Version \*[VERSION]" "Debian sbuild"
+.SH NAME
+sbuild\-apt \- run apt-get or apt-cache in an sbuild chroot
+.SH SYNOPSIS
+.BR sbuild\-apt
+.RB [ \-h \[or] \-\-help " \[or] " \-V \[or] \-\-version ]
+.B CHROOT
+.RB ( apt\-get \[or] apt\-cache )
+.RB "[" ARG1 " [" ARG2 " [" "ARG\f[BI]n\fP..." ]]]
+.SH DESCRIPTION
+\fBsbuild\-apt\fR runs
+.BR apt\-get (1)
+or
+.BR apt\-cache (1)
+inside the specified chroot, along with any additional arguments.
+.SH OPTIONS
+.SS Actions
+.TP
+.BR \-h ", " \-\-help
+Display this manual.
+.TP
+.BR \-V ", " \-\-version
+Print version information.
+.SS Chroot selection
+.TP
+.B CHROOT
+The chroot to run the command in. Note that \[oq]o\[cq], \[oq]s\[cq],
+\[oq]t\[cq], \[oq]u\[cq] and \[oq]e\[cq] may be used as abbreviations for
+\[oq]oldstable\[cq], \[oq]stable\[cq], \[oq]testing\[cq], \[oq]unstable\[cq]
+and \[oq]experimental\[cq], respectively.
+.SS APT options
+.TP
+.B apt\-get
+Run apt\-get.
+.TP
+.B apt\-cache
+Run apt\-cache.
+.TP
+.B ARG
+Additional arguments to pass to apt\-get or apt\-cache.
+.SH EXAMPLES
+To update the APT package lists in the \fIunstable\fP chroot:
+.PP
+\f[CR]% \f[CB]sbuild\-apt unstable apt-get update\fP\fP
+.PP
+Note that
+.BR sbuild-update (1)
+is a more convenient method for doing the above.
+.SH AUTHORS
+.nf
+Roger Leigh.
+.fi
+.SH COPYRIGHT
+.nf
+Copyright \[co] 2006\[en]2008 Roger Leigh <rleigh@debian.org>.
+.fi
+.SH SEE ALSO
+.BR apt\-cache (1),
+.BR apt\-get (1),
+.BR sbuild (1),
+.BR sbuild\-update (1),
+.BR sbuild\-upgrade (1).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/man/sbuild-checkpackages.1.in b/man/sbuild-checkpackages.1.in
new file mode 100644
index 0000000..a393ef8
--- /dev/null
+++ b/man/sbuild-checkpackages.1.in
@@ -0,0 +1,81 @@
+.\" Copyright © 2005-2008 Roger Leigh <rleigh@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\-CHECKPACKAGES 1 "\*[RELEASE_DATE]" "Version \*[VERSION]" "Debian sbuild"
+.SH NAME
+sbuild\-checkpackages \- check the package list in a sbuild chroot against a reference list
+.SH SYNOPSIS
+.BR sbuild\-checkpackages
+.RB [ \-h \[or] \-\-help " \[or] " \-V \[or] \-\-version
+.RB " \[or] " \-l \[or] \-\-list " \[or] " \-s \[or] \-\-set ]
+.B CHROOT
+.SH DESCRIPTION
+\fBsbuild\-checkpackages\fR compares the package list in an sbuild chroot (dpkg
+status file) against a reference list of packages. The differences between the
+two lists are displayed, showing the changes to remove and install in order to
+return the chroot to match the reference list.
+.PP
+The reference list may be set from the dpkg status file; this must be done
+initially in order to have a baseline reference for comparison. The chroot
+should only include \fBessential\fP and \fBbuild-essential\fP packages, plus
+the extra packages that sbuild needs such as \fBfakeroot\fP.
+.SH OPTIONS
+.SS Actions
+.TP
+.BR \-h ", " \-\-help
+Display this manual.
+.TP
+.BR \-V ", " \-\-version
+Print version information.
+.TP
+.BR \-l ", " \-\-list
+List the differences between the installed packages and the reference file.
+.TP
+.BR \-s ", " \-\-set
+Set the reference file from the currently installed package list.
+.SS Chroot selection
+.TP
+.B CHROOT
+The chroot to use. Note that \[oq]o\[cq], \[oq]s\[cq],
+\[oq]t\[cq], \[oq]u\[cq] and \[oq]e\[cq] may be used as abbreviations for
+\[oq]oldstable\[cq], \[oq]stable\[cq], \[oq]testing\[cq], \[oq]unstable\[cq]
+and \[oq]experimental\[cq], respectively.
+.SH EXAMPLES
+To set the reference file in the \fIunstable\fP chroot:
+.PP
+\f[CR]% \f[CB]sbuild\-checkpackages unstable \-\-set\fP\fP
+.br
+.PP
+To show the differences in the \fIunstable\fP chroot:
+.PP
+\f[CR]% \f[CB]sbuild\-checkpackages unstable \-\-list\fP\fP
+.br
+.SH AUTHORS
+.nf
+Roger Leigh.
+.fi
+.SH COPYRIGHT
+.nf
+Copyright \[co] 2006\[en]2008 Roger Leigh <rleigh@debian.org>.
+.fi
+.SH "SEE ALSO"
+.BR sbuild (1).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/man/sbuild-createchroot.8.in b/man/sbuild-createchroot.8.in
new file mode 100644
index 0000000..23b4b4d
--- /dev/null
+++ b/man/sbuild-createchroot.8.in
@@ -0,0 +1,365 @@
+.\" Copyright © 2005-2008 Roger Leigh <rleigh@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\-CREATECHROOT 8 "\*[RELEASE_DATE]" "Version \*[VERSION]" "Debian sbuild"
+.SH NAME
+sbuild\-createchroot \- create sbuild chroot
+.SH SYNOPSIS
+.B sbuild\-createchroot
+.RB [ \-h \[or] \-\-help " \[or] " \-V \[or] \-\-version ]
+.RB [ \-\-verbose ]
+.RB [ \-\-arch=\fIarch\fP ]
+.RB [ \-\-chroot-prefix=\fIprefix\fP ]
+.RB [ \-\-chroot-suffix=\fIsuffix\fP ]
+.RB [ \-\-chroot-mode=\fIschroot|sudo|unshare\fP ]
+.RB [ \-\-foreign ]
+.RB [ \-\-resolve-deps " \[or] " \-\-no-resolve-deps ]
+.RB [ \-\-merged-usr " \[or] " \-\-no-merged-usr " \[or] " \-\-auto-merged-usr ]
+.RB [ \-\-keep-debootstrap-dir ]
+.RB [ \-\-debootstrap=\fIdebootstrap\fP ]
+.RB [ "\-\-include=\fIpackage1[,package2,[packagen]]\fP" ]
+.RB [ "\-\-exclude=\fIpackage1[,package2,[packagen]]\fP" ]
+.RB [ "\-\-components=\fIcomponent1[,component2,[componentn]]\fP" ]
+.RB [ "\-\-keyring=\fIkeyring-file\fP" ]
+.RB [ "\-\-setup\-only" ]
+.RB [ "\-\-make\-sbuild\-tarball=\fIfile\fP" ]
+.RB [ "\-\-keep\-sbuild\-chroot\-dir" ]
+.RB [ "\-\-no\-deb\-src" ]
+.RB [ "\-\-alias=\fIalias\fP" ]
+.RB [ \-\-extra\-repository=\fIspec\fP ]
+.RB [ "\-\-command\-prefix=\fIprefix\fP" ]
+.B SUITE TARGET-DIRECTORY [DEBIAN-MIRROR-URI
+.RB [ SCRIPT ]]
+.PP
+.B buildd\-create\-chroot
+.B USER SUITE TARGET-DIRECTORY [DEBIAN-MIRROR-URI]
+.SH DESCRIPTION
+\fBsbuild\-createchroot\fR runs
+.BR debootstrap (1)
+to create a chroot suitable for building packages with sbuild. Note that while
+debootstrap may be used directly, sbuild\-createchroot performs additional
+setup tasks such as adding additional packages and configuring various files in
+the chroot. Invoking sbuild\-createchroot is functionally equivalent to
+running \f[CB]debootstrap\ \-\-variant=buildd
+\-\-include=fakeroot,build\-essential\fP, then editing
+\fI/etc/apt/sources.list\fP and \fI/etc/hosts\fP by hand.
+.PP
+The newly-created chroot is set up to work with
+.BR schroot (1)
+by creating a chroot definition file under \fI/etc/schroot/chroot.d\fP. This
+should be edited to finish the chroot configuration after
+sbuild\-createchroot has completed.
+.PP
+\fBbuildd\-create\-chroot\fP, like \fBsbuild\-createchroot\fR, runs
+.BR debootstrap (1)
+to create a chroot for package building. However, this creates a chroot
+specifically for
+.BR buildd (1)
+with an additional mandatory option to specify a user who will be granted sudo
+access inside the chroot. This script mainly differs in its additional
+customisation of \fI/etc/apt/sources.list\fP to use incoming.debian.org and
+security-master.debian.org. It also removes some packages from the
+newly-created chroot. Unless you are setting up an official Debian build
+daemon, \fBsbuild\-createchroot\fP should be used instead. The extra
+functionality will be merged into \fBsbuild\-createchroot\fP in the future.
+.SH OPTIONS
+.SS Actions
+.TP
+.BR \-h ", " \-\-help
+Display this manual.
+.TP
+.BR \-V ", " \-\-version
+Print version information.
+.SS General options
+.TP
+.BR \-v ", " \-\-verbose
+Print all messages.
+.SS Debootstrap options
+Note that
+.BR debootstrap (1)
+is the canonical reference for the meaning of the options; they are passed
+directly to debootstrap.
+.TP
+.BR \-\-arch=\fIarch\fP
+Set the target architecture. This may be used if dpkg is not already
+installed. See also \fI\-\-foreign\fP, below.
+.TP
+.BR \-\-chroot-suffix=\fIsuffix\fP
+Add a custom suffix to the chroot name. Defaults to '\-sbuild'.
+.TP
+.BR \-\-chroot\-prefix=\fIprefix\fP
+Add a custom prefix to the chroot name. Defaults to SUITE. This is useful to
+create variants of a base suite like stretch-backports to which the backports
+archive can be manually added after the base chroot was created using
+sbuild-shell. This way, a normal stretch chroot and a stretch-backports chroot
+can exist side-by-side. Besides this common use case, this functionality can
+also be used to create chroots with any other type of customization. It is a
+shortcut for creating a base chroot and then having to manually copy it and
+edit the configuration files.
+.TP
+.BR \-\-chroot-mode=\fIschroot|sudo|unshare\fP
+The sbuild chroot backend to generate the chroot for. The autopkgtest backend
+is not supported by this method because of the diversity of container types it
+supports. To generate a chroot for schroot and sudo, sbuild-createchroot must
+be executed with superuser privileges (for example by using sudo). Because of
+backwards compatibility, choosing schroot implies sudo (but not the other way
+round). Choosing unshare requires the \fI\-\-make\-sbuild\-tarball\fP option.
+Creating a chroot for the unshare backend can be done by a normal user (without
+sudo) but it requires Linux user namespaces to be enabled (via "sysctl -w
+kernel.unprivileged_userns_clone=1"). Chroot tarballs created for the unshare
+backend are also compatible with the schroot backend if a respective schroot
+config file is manually created by the user or by running sbuild-createchroot
+with the \fI--setup-only\fP option. Defaults to 'schroot'.
+.TP
+.BR \-\-foreign
+Only perform the initial unpack phase of bootstrapping. This is required if
+the target and host architectures do not match. Note that debootstrap requires
+running by hand to complete installation; run the debootstrap
+\fI/debootstrap/debootstrap\fP installed in \fITARGET-DIRECTORY\fP to complete
+the installation.
+.TP
+.BR \-\-resolve-deps
+Automatically resolve missing dependencies. This is the default.
+.TP
+.BR \-\-no-resolve-deps
+Do not automatically resolve missing dependencies.
+.TP
+.BR \-\-keep-debootstrap-dir
+Don't delete the \fI/debootstrap\fP directory in \fITARGET-DIRECTORY\fP after
+completing the installation.
+.TP
+.BR \-\-debootstrap=\fIdebootstrap\fP
+Define a custom debootstrap variant. Defaults to 'debootstrap'.
+.TP
+.BR "\-\-include=\fIpackage1[,package2,[packagen]]\fP"
+Comma separated list of packages which will be added to the list of packages to
+download and extract.
+.TP
+.BR "\-\-exclude=\fIpackage1[,package2,[packagen]]\fP"
+Comma separated list of packages which will be removed from the list of
+packages to download and extract. Note that this can remove essential packages,
+so use with extreme care.
+.TP
+.BR "\-\-components=\fIcomponent1[,component2,[componentn]]\fP"
+Comma separated list of archive components to use (e.g. \[oq]main\[cq],
+\[oq]contrib\[cq], \[oq]non-free\[cq]). Defaults to \[oq]main\[cq].
+.TP
+.BR "\-\-keyring=\fIkeyring-file\fP"
+Download signatures for retrieved \fIRelease\fP files and check them against
+\fIkeyring-file\fP. By default \fI/etc/apt/trusted.gpg\fP is used. Set to an
+empty string to disable signature checking.
+.TP
+.BR \-\-merged-usr
+Create a chroot in which \fI/bin\fP, \fI/sbin\fP and \fI/lib*\fP are
+symbolic links to their counterparts in \fI/usr\fP.
+.TP
+.BR \-\-no-merged-usr
+Create a chroot in which \fI/bin\fP, \fI/sbin\fP and \fI/lib*\fP are
+ordinary directories distinct from their counterparts in \fI/usr\fP.
+.TP
+.BR \-\-auto-merged-usr
+Do not specify whether \fI/bin\fP, \fI/sbin\fP and \fI/lib*\fP are
+symbolic links to their counterparts in \fI/usr\fP. In this case
+debootstrap will use its default behaviour (which is suite-specific).
+This is the default.
+.TP
+.B SUITE
+The distribution to bootstrap (e.g. \[oq]stretch[cq], \[oq]buster\[cq],
+\[oq]bullseye\[cq], \[oq]sid\[cq]). A complete list may be found in
+\fI/usr/share/debootstrap/scripts\fP.
+.TP
+.B TARGET-DIRECTORY
+The directory to create the chroot in. The directory will be created if it
+does not already exist.
+.TP
+.B DEBIAN-MIRROR-URI
+An \f[CR]http://\fP, \f[CR]file:///\fP, or \f[CR]ssh:///\fP URI
+pointing to a suitable archive mirror. Defaults to http://deb.debian.org/debian.
+.TP
+.B SCRIPT
+debootstrap script to run. Not typically required.
+.SS sbuild\-createchroot behaviour
+.TP
+.BR "\-\-setup\-only"
+Don't run debootstrap. Only perform the setup tasks on an already existing
+chroot. This is useful for converting an existing chroot for use with sbuild
+which has already been created using a tool such as debootstrap.
+Some configuration steps can only be carried out on a directory chroot and
+thus, this option is not useful with the unshare backend.
+.TP
+.BR \-\-make\-sbuild\-tarball=\fIfile\fP
+Create a bootstrapped file type chroot ready for use with sbuild and save it as
+\fIfile\fP. The compression format used for the tarball is dependent on the file
+extension used in \fIfile\fP. See the \fBTARBALL FILE\fP section for more
+details.
+.TP
+.BR \-\-keep\-sbuild\-chroot\-dir
+Don't delete the directory used for creating a file type chroot. This option
+does nothing if not creating a file type chroot.
+.TP
+.BR \-\-no\-deb\-src
+Don't add a deb-src line to the \fI/etc/apt/sources.list\fP file in the
+\fITARGET-DIRECTORY\fP after the debootstrap process. This is useful in
+situation when it is known that sbuild will never have to download the source
+package itself but is always given an already downloaded dsc. In that case,
+this option will help to save bandwidth and disk space because the source
+indices don't have to be downloaded and later continually updated.
+.TP
+.BR \-\-alias=\fIalias\fP
+Add an alternative name that the chroot will be known by. This option can be
+given multiple times to add more than one alias. Using an alias is useful for
+chroots of distributions that are known by more than one name. For example
+Debian unstable is also known as sid. Additionally, sbuild chooses the
+distribution by the latest changelog entry which could list \fIUNRELEASED\fP
+for packages that the maintainer is currently working on. For Debian it thus
+makes sense to add \fIUNRELEASED\fP as an alias for a Debian unstable chroot.
+This option is only allowed when choosing \fI--chroot-mode=schroot\fP.
+For similar functionality with \fI--chroot-mode=unshare\fP you can work with
+symlinks.
+See the EXAMPLES section for how to use this option in practice.
+.TP
+.BR \-\-extra\-repository=\fIspec\fP
+Add a repository to the list of apt sources. The repository specification is a
+line suitable for an apt
+.BR sources.list (5)
+file. For instance, you might use
+.nh
+.B \-\-extra\-repository="deb http://deb.debian.org/debian experimental main"
+.hy
+to allow packages in the experimental distribution to fulfill
+build-dependencies. Note that the build chroot must already trust the key of
+this repository. See the EXAMPLES section for how to combine this option with
+--chroot-prefix and --alias.
+.TP
+.BR \-\-command\-prefix=\fIprefix\fP
+Set the chroot \fIcommand-prefix\fP option as specified. A common use-case is
+to specify eatmydata, thereby preventing all commands executed in the chroot
+from syncing data to disk. This option is only allowed when choosing
+\fI--chroot-mode=schroot\fP. See
+.BR schroot.conf (5)
+for more details.
+.SH TARBALL FILE
+When creating an sbuild tarball \fIfile\fP, the compression format used to
+generate the tarball depends on the entension used in \fIfile\fP. Here is a
+listing of the extensions that will be detected and what format the tarball will
+be generated as.
+.TP
+.BR *.tar
+Generates an uncompressed tarball.
+.TP
+.BR *.tar.gz|*.tgz
+Generates a compressed tarball using gzip.
+.TP
+.BR *.tar.bz2|*.tbz
+Generates a compressed tarball using bzip2.
+.TP
+.BR *.tar.lz|*.tlz
+Generates a compressed tarball using lzip.
+.TP
+.BR *.tar.xz|*.txz
+Generates a compressed tarball using xz.
+.PP
+If no extension is specified, sbuild\-createchroot will rename \fIfile\fP to
+\fIfile.tar.gz\fP and generate \fIfile.tar.gz\fP as a compressed tarball using gzip.
+.SH EXAMPLES
+To create a bootstrapped file type sid (unstable) chroot ready for use with
+sbuild and schroot (the default backend), saved in
+\fI/srv/chroot/unstable-amd64.tar.gz\fP using the
+\fIdeb.debian.org\fP Debian http mirror redirector service and using a
+temporary directory as the target:
+.PP
+\f[CR]% \f[CB]sudo sbuild\-createchroot \fP\fP\\
+.br
+ \-\-make\-sbuild\-tarball=/srv/chroot/unstable-amd64.tar.gz \fP\fP\\
+.br
+ unstable `mktemp \-d` \fP\fP\\
+.br
+\f[CB] http://deb.debian.org/debian\fP\[CR]
+.PP
+To create a plain type sid (unstable) schroot chroot in
+\fI/srv/chroot/unstable\fP using the \fIdeb.debian.org\fP Debian http
+mirror redirector service and with aliases for \fIunstable\fP and
+\fIUNRELEASED\fP:
+.PP
+\f[CR]% \f[CB]sudo sbuild\-createchroot unstable /srv/chroot/unstable-amd64 \fP\fP\\
+.br
+ \-\-alias=sid \-\-alias=UNRELEASED \fP\fP\\
+.br
+\f[CB] http://deb.debian.org/debian\fP\[CR]
+.PP
+To create a schroot chroot to build for stretch backports:
+.PP
+\f[CR]% \f[CB]sudo sbuild\-createchroot \fP\fP\\
+.br
+ \-\-extra\-repository="deb http://deb.debian.org/debian stretch-backports main" \fP\fP\\
+.br
+ \-\-chroot-prefix=stretch-backports \fP\fP\\
+.br
+ stretch /srv/chroot/stretch-backports-amd64 \fP\fP\\
+.br
+\f[CB] http://deb.debian.org/debian\fP\[CR]
+.PP
+To create a schroot chroot to build for experimental using a custom chroot prefix:
+.PP
+\f[CR]% \f[CB]sudo sbuild\-createchroot \fP\fP\\
+.br
+ \-\-extra\-repository="deb http://deb.debian.org/debian experimental main" \fP\fP\\
+.br
+ \-\-chroot-prefix=experimental \fP\fP\\
+.br
+ unstable /srv/chroot/unstable-experimental-amd64 \fP\fP\\
+.br
+\f[CB] http://deb.debian.org/debian\fP\[CR]
+.PP
+Creating a chroot for the unshare backend does not require superuser privileges
+(no sudo). The path for the tarball is the default path expected by sbuild for
+the unshare backend:
+.PP
+\f[CR]% \f[CB]sbuild-createchroot --chroot-mode=unshare \\
+.br
+ --make-sbuild-tarball ~/.cache/sbuild/unstable-amd64.tar.gz \\
+.br
+ unstable `mktemp -d` http://deb.debian.org/debian/ \\
+.PP
+.SH HISTORY
+sbuild\-createchroot was previously known as \fBbuildd.chroot\fP.
+buildd.chroot performed exactly the same tasks, but additionally created a
+number of directories in the chroot for use by sbuild. This is now done by
+.BR schroot (1).
+.SH AUTHORS
+.nf
+Roger Leigh.
+Francesco P. Lovergine.
+Andres Mejia.
+.fi
+.SH COPYRIGHT
+.nf
+Copyright \[co] 2004 Francesco P. Lovergine <frankie@debian.org>.
+Copyright \[co] 2007\-2008 Roger Leigh <rleigh@debian.org>.
+Copyright \[co] 2010 Andres Mejia <mcitadel@gmail.com>.
+.fi
+.SH "SEE ALSO"
+.BR debootstrap (8),
+.BR schroot (1),
+.BR sbuild (1),
+.BR sbuild\-setup (7).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
+
diff --git a/man/sbuild-debian-developer-setup.1.in b/man/sbuild-debian-developer-setup.1.in
new file mode 100644
index 0000000..85084ae
--- /dev/null
+++ b/man/sbuild-debian-developer-setup.1.in
@@ -0,0 +1,78 @@
+.\" Copyright © 2018 Michael Stapelberg <stapelberg@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\-DEBIAN\-DEVELOPER\-SETUP 1 "\*[RELEASE_DATE]" "Version \*[VERSION]" "Debian sbuild"
+.SH NAME
+sbuild\-debian\-developer\-setup \- set up sbuild so that packages for Debian unstable can be built
+.SH SYNOPSIS
+.BR sbuild\-debian\-developer\-setup
+.RB [ \-h \[or] \-\-help ]
+.RB [ \-\-distribution=\fIdistribution\fP ]
+.RB [ \-\-suite=\fIsuite\fP ]
+.RB [ \-\-arch=\fIarch\fP ]
+.SH DESCRIPTION
+
+\fBsbuild-debian-developer-setup\fR is a convenience script to set up an sbuild
+environment for Debian Developers.
+
+When run, it adds the current user to the sbuild group, creates a schroot for
+building packages for Debian unstable in
+\fI/srv/chroot/unstable-$arch-sbuild\fP, and creates a cronjob which updates
+said schroot daily.
+
+The script assumes you are on an un-metered internet connection (daily schroot
+updates might be costly otherwise).
+.SH OPTIONS
+.TP
+.BR \-h ", " \-\-help
+Display this manual.
+.TP
+.BR \-V ", " \-\-version
+Print version information.
+.TP
+.BR "\-\-distribution=\fIdistribution\fP"
+Set up an sbuild chroot for \fIdistribution\fP. Defaults to "debian".
+.TP
+.BR "\-\-suite=\fIsuite\fP"
+Set up an sbuild chroot for \fIsuite\fP. Defaults to "unstable".
+.TP
+.BR "\-\-arch=\fIarch\fP"
+Set up an sbuild chroot with architecture \fIarch\fP. Defaults to system arch.
+.SH EXAMPLES
+To set up sbuild and build the hello world Debian package, use:
+.PP
+\f[CR]% \f[CB]sudo sbuild\-debian\-developer\-setup\fP\fP\[CR]
+.br
+\f[CR]% \f[CB]newgrp sbuild\[CR]
+.br
+\f[CR]% \f[CB]sbuild -d unstable hello\[CR]
+.br
+.SH AUTHORS
+.nf
+Michael Stapelberg.
+.fi
+.SH COPYRIGHT
+.nf
+Copyright \[co] 2018 Michael Stapelberg <stapelberg@debian.org>.
+.fi
+.SH "SEE ALSO"
+.BR sbuild (1).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/man/sbuild-debuild.1.in b/man/sbuild-debuild.1.in
new file mode 100644
index 0000000..fd28ecc
--- /dev/null
+++ b/man/sbuild-debuild.1.in
@@ -0,0 +1,196 @@
+.\" Copyright © 2005-2009 Roger Leigh <rleigh@debian.org>
+.\" Copyright © 2009 Andres Mejia <mcitadel@gmail.com>
+.\"
+.\" 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-DEBUILD 1 "\*[RELEASE_DATE]" "Version \*[VERSION]" "Debian sbuild"
+.SH NAME
+sbuild\-debuild \- build debian packages from source in debuild\-like manner
+.SH SYNOPSIS
+.B sbuild\-debuild
+.RB [ \-h \[or] \-\-help " \[or] " \-V \[or] \-\-version ]
+.RB [ \-\-dpkg\-buildpackage\-opts " " \fIstring\fP ]
+.RB [ \-\-dpkg\-buildpackage\-extra\-opts " " \fIstring\fP ]
+.RB [ \-\-sbuild\-opts " " \fIstring\fP ]
+.RB [ \-\-sbuild\-extra\-opts " " \fIstring\fP ]
+.RB [ \-\-lintian\-opts " " \fIstring\fP ]
+.RB [ \-\-lintian\-extra\-opts " " \fIstring\fP ]
+.RB [ \-\-no\-lintian ]
+.RB [ \-\-pre\-dpkg\-buildpackage\-commands " " \fIstring\fP ]
+.RB [ \-\-pre\-sbuild\-commands " " \fIstring\fP ]
+.RB [ \-\-pre\-lintian\-commands " " \fIstring\fP ]
+.RB [ \-\-pre\-exit\-commands " " \fIstring\fP ]
+.BR [PACKAGE1[.dsc] " [" PACKAGE2[.dsc] " [" PACKAGE\f[BI]n\fP[.dsc] ]]]
+.SH DESCRIPTION
+\fBsbuild\-debuild\fR rebuilds Debian binary packages from the corresponding
+Debian source in a manner similar to debuild.
+.PP
+sbuild\-debuild is given a list of packages to process as the arguments
+\fBPACKAGE\f[BI]i\fP[.dsc]\fR. These arguments are in the form of either
+debianized package source directories or a .dsc file.
+.PP
+For arguments given as source directories, dpkg-buildpackage is first run to
+produce a source .dsc file. Then, the package is built using the .dsc produced.
+For arguments given as .dsc files, running dpkg-buildpackage is skipped
+altogether. If no arguments are given, sbuild-debuild acts on the current
+working directory as a source directory to process.
+.PP
+Before a package is built, sbuild-debuild first changes into the directory where
+the corresponding .dsc file resides.
+.PP
+After a successful build, if lintian is installed on the system, lintian is run
+on the resulting .changes file produced after a build.
+.PP
+In between each run of dpkg-buildpackage, sbuild, and lintian for a package,
+a list of commands can be run, similar to running hooks, except that arguments
+can be given and "special" keywords can be given as an argument to these
+commands to have sbuild-debuild convert them into various arguments. See the
+section \fBEXTERNAL COMMANDS\fR for more on this.
+.PP
+The exit status from sbuild-debuild is either 0 or 1. When a package is
+processed, if dpkg-buildpackage, sbuild, or lintian fails, processing of that
+package is stopped immediately and processing of the next package is started
+instead. For external commands, if an external command fails, the next external
+command is run but processing of a package is not halted. If at any point the
+processing of a package failed or an external command failed, sbuild-debuild is
+marked to exit with value 1 (i.e. failure), otherwise it exits with value 0
+(i.e. success).
+.SH OPTIONS
+.TP
+.BR \-h ", " \-\-help
+Display this manual.
+.TP
+.BR \-V ", " \-\-version
+Print version information.
+.TP
+.BR "\-\-dpkg\-buildpackage\-opts \fIstring\fP"
+Override the default options passed to dpkg-buildpackage.
+.br
+Default is \fB"-S -us -uc"\fR.
+.TP
+.BR "\-\-dpkg\-buildpackage\-extra\-opts \fIstring\fP"
+Supply extra options to dpkg-buildpackage.
+.TP
+.BR "\-\-sbuild\-opts \fIstring\fP"
+Override the default options passed to sbuild.
+.br
+Default is no options are given.
+.TP
+.BR "\-\-sbuild\-extra\-opts \fIstring\fP"
+Supply extra options to sbuild.
+.TP
+.BR "\-\-lintian\-opts \fIstring\fP"
+Override the default options passed to lintian.
+.br
+Default is no options are given.
+.TP
+.BR "\-\-lintian\-extra\-opts \fIstring\fP"
+Supply extra options to lintian.
+.TP
+.BR "\-\-no\-lintian"
+Do not run lintian.
+.TP
+.BR "\-\-pre\-dpkg\-buildpackage\-commands \fIstring\fP"
+String of command to run before running dpkg-buildpackage.
+.br
+This option can be supplied multiple times to add more commands.
+.TP
+.BR "\-\-pre\-sbuild\-commands \fIstring\fP"
+String of command to run before running sbuild.
+.br
+This option can be supplied multiple times to add more commands.
+.TP
+.BR "\-\-pre\-lintian\-commands \fIstring\fP"
+String of command to run before running lintian.
+.br
+This option can be supplied multiple times to add more commands.
+.TP
+.BR "\-\-pre\-exit\-commands \fIstring\fP"
+String of command to run before ending the processing of a package.
+.br
+This option can be supplied multiple times to add more commands.
+.SH CONFIG FILES
+.TP
+.I /etc/sbuild/sbuild-debuild.conf
+Configuration, maintained by the system administrator. This may be used to
+override the defaults.
+.TP
+.I ~/.sbuild-debuildrc
+User-specific configuration.
+.SH EXTERNAL COMMANDS
+Support to run external commands during an sbuild-debuild run is provided. A set
+of external commands can be run before running dpkg-buildpackage, before running
+sbuild, before running lintian, and before ending processing of a package.
+Providing commands to run is done through the \fI\-\-pre\-*\-commands\fP options
+given on the command line and through the use of the configuration files. In the
+configuration file, the list of commands to run are placed in an array of
+strings corresponding to the commands to run.
+.PP
+Here's an example of how to edit the configuration files to run "foo" and "bar"
+with arguments before dpkg-buildpackage is run.
+.PP
+\f[CB]$pre_dpkg_buildpackage_commands = ['foo arg1 arg2',\fP
+.br
+\f[CB] 'bar arg1 arg2 arg3',\fP
+.br
+\f[CB] ];\fP
+.PP
+Here's an example of how to do the same with the previous example, except using
+the \fI\-\-pre\-dpkg\-buildpackage\-commands\fP option.
+.PP
+\f[CB]$ sbuild\-debuild \\\fP
+.br
+\f[CB] \-\-pre\-dpkg\-buildpackage\-commands 'foo arg1 arg2' \\\fP
+.br
+\f[CB] \-\-pre\-dpkg\-buildpackage\-commands 'bar arg1 arg2 arg3'\fP
+.PP
+Besides running external commands, sbuild\-debuild can also detect the use of
+certain keywords given as arguments. These keywords are used to allow for a
+command to be supplied with a certain argument depending on the keyword given.
+For example, it could be possible to have an external command be given the
+path to a .changes file.
+.PP
+Here is a listing of keywords and a description of what it's converted to.
+.IP \fB\@SBUILD_DEBUILD_DSC\@\fR
+This keyword is converted to the absolute path to a package's .dsc file.
+.IP \fB\@SBUILD_DEBUILD_SOURCE_CHANGES\@\fR
+This keyword is converted to the absolute path to a package's source .changes
+file.
+.IP \fB\@SBUILD_DEBUILD_BIN_CHANGES\@\fR
+This keyword is converted to the absolute path to a package's .changes file
+depending on architecture.
+.PP
+Here's an example of using a keyword to run piuparts on a .changes file before
+the processing of a package ends.
+.PP
+\f[CB]$ sbuild\-debuild \-\-pre\-exit\-commands \\\fP
+.br
+\f[CB] 'piuparts \@SBUILD_DEBUILD_BIN_CHANGES\@'\fP
+.PP
+One final note, external commands are processed in the order they are given.
+Also, the commands given in a configuration file are processed first, then the
+commands given through the command line options.
+.SH AUTHORS
+Andres Mejia.
+.SH COPYRIGHT
+.nf
+Copyright \[co] 2009 Andres Mejia <mcitadel\@gmail.com>
+.fi
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/man/sbuild-destroychroot.8.in b/man/sbuild-destroychroot.8.in
new file mode 100644
index 0000000..549b2ff
--- /dev/null
+++ b/man/sbuild-destroychroot.8.in
@@ -0,0 +1,57 @@
+.\" Copyright © 2016 Johannes Schauer Marin Rodrigues <josch@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\-DESTROYCHROOT 8 "\*[RELEASE_DATE]" "Version \*[VERSION]" "Debian sbuild"
+.SH NAME
+sbuild\-destroychroot \- destroy sbuild chroot
+.SH SYNOPSIS
+.BR sbuild\-destroychroot
+.RB [ \-h \[or] \-\-help " \[or] " \-V \[or] \-\-version ]
+.B CHROOT
+.SH DESCRIPTION
+\fBsbuild\-destroychroot\fR instructs the user which commands to run to remove
+a chroot as it was created by \fBsbuild\-createchroot\fR. This command will not
+make any changes to the system by itself.
+.SH OPTIONS
+.SS Actions
+.TP
+.BR \-h ", " \-\-help
+Display this manual.
+.TP
+.BR \-V ", " \-\-version
+Print version information.
+.SS Chroot selection
+.TP
+.B CHROOT
+The chroot to use. Note that \[oq]o\[cq], \[oq]s\[cq],
+\[oq]t\[cq], \[oq]u\[cq] and \[oq]e\[cq] may be used as abbreviations for
+\[oq]oldstable\[cq], \[oq]stable\[cq], \[oq]testing\[cq], \[oq]unstable\[cq]
+and \[oq]experimental\[cq], respectively.
+.SH EXAMPLES
+To receive instructions on how to remove an \fIunstable\fP chroot:
+.PP
+\f[CR]% \f[CB]sbuild\-destroychroot unstable\fP\fP\[CR]
+.br
+.SH AUTHORS
+.nf
+Johannes Schauer Marin Rodrigues.
+.fi
+.SH COPYRIGHT
+.nf
+Copyright \[co] 2016 Johannes Schauer Marin Rodrigues <josch@debian.org>.
+.fi
+.SH "SEE ALSO"
+.BR sbuild (1).
diff --git a/man/sbuild-hold.1.in b/man/sbuild-hold.1.in
new file mode 100644
index 0000000..c6b0399
--- /dev/null
+++ b/man/sbuild-hold.1.in
@@ -0,0 +1,71 @@
+.\" Copyright © 2005-2008 Roger Leigh <rleigh@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\-HOLD 1 "\*[RELEASE_DATE]" "Version \*[VERSION]" "Debian sbuild"
+.SH NAME
+sbuild\-hold \- hold packages in an sbuild chroot
+.SH SYNOPSIS
+.BR sbuild\-hold
+.RB [ \-h \[or] \-\-help " \[or] " \-V \[or] \-\-version ]
+.B CHROOT
+.RB "[" PACKAGE1 " [" PACKAGE2 " [" PACKAGE\f[BI]n\fP ]]]
+.br
+.BR sbuild\-unhold
+.RB [ \-h \[or] \-\-help " \[or] " \-V \[or] \-\-version ]
+.B CHROOT
+.RB "[" PACKAGE1 " [" PACKAGE2 " [" PACKAGE\f[BI]n\fP ]]]
+.SH DESCRIPTION
+\fBsbuild\-hold\fR and \fBsbuild\-unhold\fR set and unset the dpkg hold status
+for the specified packages, respectively.
+.SH OPTIONS
+.SS Actions
+.TP
+.BR \-h ", " \-\-help
+Display this manual.
+.TP
+.BR \-V ", " \-\-version
+Print version information.
+.SS Chroot and package selection
+.TP
+.B CHROOT
+The chroot to use. Note that \[oq]o\[cq], \[oq]s\[cq],
+\[oq]t\[cq], \[oq]u\[cq] and \[oq]e\[cq] may be used as abbreviations for
+\[oq]oldstable\[cq], \[oq]stable\[cq], \[oq]testing\[cq], \[oq]unstable\[cq]
+and \[oq]experimental\[cq], respectively.
+.TP
+.B PACKAGE
+The packages for which the hold status is to be changed.
+.SH EXAMPLES
+To hold the libc6 package in the \fIunstable\fP chroot:
+.PP
+\f[CR]% \f[CB]sbuild\-hold unstable libc6\fP\fP
+.br
+.SH AUTHORS
+.nf
+Roger Leigh.
+.fi
+.SH COPYRIGHT
+.nf
+Copyright \[co] 2006\[en]2007 Roger Leigh <rleigh@debian.org>.
+.fi
+.SH "SEE ALSO"
+.BR sbuild (1).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/man/sbuild-qemu-boot.1.in b/man/sbuild-qemu-boot.1.in
new file mode 100644
index 0000000..e6e80dd
--- /dev/null
+++ b/man/sbuild-qemu-boot.1.in
@@ -0,0 +1,98 @@
+.\" 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\-BOOT "1" "\*[RELEASE_DATE]" "Version \*[VERSION]" "Debian sbuild"
+.SH NAME
+sbuild\-qemu\-boot \- Boot a VM using a QEMU image
+.SH SYNOPSIS
+.B sbuild\-qemu\-boot
+.RB [ \-h ]
+.RB [ \-\-read-write ]
+.RB [ \-\-snapshot ]
+.RB [ \-\-shared-dir ]
+.RB [ \-\-arch=ARCH ]
+.RB [ \-\-ram\-size=MiB ]
+.RB [ \-\-cpus=CPUs ]
+.RB [ \-\-ssh\-port=PORT ]
+.RB [ \-\-noexec ]
+.RB IMAGE
+.SH DESCRIPTION
+\fBsbuild\-qemu\-boot\fR boots a QEMU VM using \fBIMAGE\fR into a console. The
+image is in read-only mode by default, as the goal is to support
+experimentation.
+.PP
+The architecture is auto-guessed by stripping any file suffix and then
+splitting the image name on dashes ``\-'', and finally by looking for a Debian
+architecture name. \fIsid\-amd64.img\fR, \fIamd64\-temporary.image\fR or even
+just \fIamd64\fR would all be assumed to be amd64 images, but not
+\fIamd64.rebuild\-tests.img\fR. If this guesses wrong, use the
+\fB\-\-arch\fR option.
+.PP
+Note that you might need to invoke stty(1) within the VM to match your
+host terminal's settings.
+.SH OPTIONS
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+Show this help message and exit.
+.TP
+\fB\-\-read\-write\fR
+Write changes back to the image, instead of using the image in read\-only mode.
+.TP
+\fB\-\-snapshot\fR
+Create a snapshot of the image before changing it. Useful for
+reproducibility purposes. Ignored if the image is not booted in read\-write
+mode, which is the default.
+.TP
+\fB\-\-shared\-dir\fR
+Share this directory on the host with the guest. This will only work when the
+image was created with sbuild-qemu-create(1).
+.TP
+\fB\-\-arch\fR=ARCH
+Architecture to use (instead of attempting to auto\-guess).
+.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\-\-ssh\-port\fR=PORT
+Forward local port PORT to port 22 within the guest. Package
+\fBopenssh\-server\fR must be installed within the guest for this to be useful.
+.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.
+.TP
+\fB\-\-noexec\fR
+Don't actually do anything. Just print the command string that
+would be executed, and then exit.
+.SH EXAMPLES
+\fB$ sbuild\-qemu\-boot \-\-shared\-dir /tmp/foo unstable\-autopkgtest\-amd64.img\fR
+.PP
+This will update the image \fBunstable\-autopkgtest\-amd64.img\fR in
+the current directory. If no such file exists there, then
+\fB$IMAGEDIR/unstable\-autopkgtest\-amd64.img\fR is tried.
+.SH ENVIRONMENT
+If \fB$IMAGEDIR\fR is unset, then \fI~/.cache/sbuild\fR is used.
+.SH COPYRIGHT
+.nf
+Copyright \[co] 2020\-2022 Christian Kastner <ckk@debian.org>
+.fi
+.SH "SEE ALSO"
+.BR sbuild (1),
+.BR sbuild\-qemu (1),
+.BR sbuild\-qemu\-create (1).
diff --git a/man/sbuild-qemu-create.1.in b/man/sbuild-qemu-create.1.in
new file mode 100644
index 0000000..32e15c5
--- /dev/null
+++ b/man/sbuild-qemu-create.1.in
@@ -0,0 +1,161 @@
+.\" 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\-CREATE "1" "\*[RELEASE_DATE]" "Version \*[VERSION]" "Debian sbuild"
+.SH NAME
+sbuild\-qemu\-create \- QEMU image creator for sbuild
+.SH SYNOPSIS
+.B sbuild\-qemu\-create
+.RB [ \-h ]
+.RB [ \-\-arch=ARCH ]
+.RB [ \-\-install\-packages=INSTALL_PACKAGES]
+.RB [ \-\-extra\-deb=EXTRA_DEB]
+.RB [ \-\-components=COMPONENTS ]
+.RB [ \-\-skel=SKEL ]
+.RB [ \-\-authorized\-keys=FILE ]
+.RB [ \-\-size=SIZE ]
+.RB [ \-o=OUT_FILE ]
+.RB [ \-\-noexec ]
+.RB [RELEASE]
+.RB [MIRROR]
+.PP
+Build an image for use with \fBsbuild-qemu\fR and \fBautopkgtest\fR.
+\fBRELEASE\fR will be debootstrapped from \fBMIRROR\fR. This mirror
+will also be used for the \fIsources.list\fR file within the VM.
+See MIRROR below.
+.PP
+Note that sbuild\-qemu\-create is just a simple wrapper around
+autopkgtest\-build\-qemu(1) that automates a few additional steps commonly
+performed for package\-building images.
+.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, arm64, armhf, i386, ppc64el.
+.TP
+\fB\-\-install\-packages\fR=INSTALL_PACKAGES
+Comma\-separated list of additional packages to install using
+\fBapt\-get install\fR from within the image.
+.TP
+\fB\-\-extra\-deb\fR=EXTRA_DEB
+Package file (.deb) from the local filesystem to install. Can be specified more
+than once.
+.TP
+\fB\-\-components\fR=COMPONENTS
+Comma\-separated list of components to use with \fIsources.list\fR entries.
+Default: main.
+.TP
+\fB\-\-skel\fR=SKEL
+Skeleton directory to use for \fI\,/root\/\fP.
+.TP
+\fB\-\-authorized\-keys\fR=FILE
+Install this file as \fI/root/.ssh/authorized_keys\fR within the guest. This
+will automatically install the \fBopenssh-server\fR package. This supersedes
+any copying of this file by the \-\-skel option.
+.TP
+\fB\-\-size\fR=SIZE
+Image size to use. Note that the images will be created in qcow2 format, so
+they won't consume that space right away. Default: 10G.
+.TP
+\fB\-o\fR=OUT_FILE, \fB\-\-out\-file\fR=OUT_FILE
+Output filename. If not supplied, then DIST\-autopkgtest\-ARCH.img will be
+used.
+.TP
+\fB\-\-noexec\fR
+Don't actually do anything. Just print the autopkgtest\-build\-qemu(1) command
+string that would be executed, and then exit.
+.TP
+\fB\-\-boot\fR=auto,bios,efi,ieee1275,none
+How the image should boot. Default is BIOS on amd64 and i386, EFI on arm64 and
+armhf, and IEEE1275 on ppc64el.
+.SH "MIRROR"
+It is \fBhighly recommended\fR that you use an APT cache, like approx(8) or
+apt\-cacher\-ng(8), on the \fBlocal\fR machine (so that the VM can access
+that cache without much hassle) as a mirror. This will dramatically speed up the
+package build process. On the author's local machine, installing the build
+dependencies of even larger packages takes only a few seconds.
+.PP
+If you use a local cache, then ensure that the mirror is accessible from within
+the guest. Using \fIhttp://localhost:9999/debian\fR or similar will
+successfully build the image, but APT will fail within the running VM, because
+to the VM, ``localhost'' is something else. An easy workaround is to use an
+IP address instead, for example \fIhttp://192.168.0.123:9999/debian\fR,
+assuming the host system has the IP 192.168.0.123.
+.SH "SPECIAL CASES"
+If \fBRELEASE\fR is \fBexperimental\fR, \fIsources.list\fR will contain
+entries for both \fBexperimental\fR and \fBunstable\fR.
+.PP
+If \fBRELEASE\fR ends with \fB\-backports\fR, \fIsources.list\fR will contain
+entries for both \fBRELEASE\fR and for the distribution it is based upon. In
+other words, specifying \fIbullseye-backports\fR will also add an entry
+for \fIbullseye\fR.
+.SH "SHARING FILES"
+Among other things, autopkgtest\-virt\-qemu(1) has built-in support for sharing
+a directory on the host with the guest, so no further configuration should be
+necessary when accessing the VM using autopkgtest.
+.PP
+In additon to that, a mount point for a 9p filesystem is added to the
+VM's \fI/etc/fstab\fR. This is for cases where the VM is launched via QEMU
+directly, rather than going through autopkgtest\-virt\-qemu.
+.PP
+To share a directory on the host with the VM, QEMU should be started with
+the following additional options:
+.PP
+\fB \-virtfs local,path=/path/to/host/dir,id=sbuild-qemu,mount_tag=sbuild-qemu,security_model=none
+.SH "TTY GEOMETRY"
+sbuild\-qemu\-creates a file
+\fI/etc/profile.d/sbuild\-qemu\-terminal\-settings.sh\fR within the VM. This file
+reads terminal column and row geometry passed on through from the host, and
+sets the geometry within the guest using stty(1).
+.SH EXAMPLES
+\fB$ sudo sbuild\-qemu\-create unstable http://deb.debian.org/debian\fR
+.PP
+This will create an image \fBunstable\-autopkgtest\-amd64.img\fR (assuming
+that the host architecture is amd64) with the unstable distribution.
+.PP
+\fB$ sudo sbuild\-qemu\-create bullseye\-backports http://deb.debian.org/debian\fR
+.PP
+This will create an image \fBbullseye\-backports\-autopkgtest\-amd64.img\fR,
+with \fIsources.list\fR entries for both bullseye and bullseye-backports.
+.PP
+\fB$ sudo sbuild\-qemu\-create \-\-skel DIR unstable http://deb.debian.org/debian\fR
+.PP
+The files in \fBDIR\fR will be copied into /root (that is, root's $HOME). This
+can be used, for example, to copy an \fB.ssh/authorized_keys\fR file, so that
+one can connect to the running image using SSH (assuming openssh\-server is
+installed).
+.PP
+\fB$ sudo sbuild\-qemu\-create \-\-install\-packages openssh\-server unstable http://deb.debian.org/debian\fR
+.PP
+This would install openssh\-server. The package will be downloaded in the
+target environment using 'apt-get'.
+.PP
+A popular package to pre\-install this way would be \fBdebhelper\fR, as it is a
+build dependency of the vast majority of Debian packages.
+.PP
+\fB$ sudo sbuild\-qemu\-create \-\-extra\-deb FOO.deb unstable http://deb.debian.org/debian\fR
+.PP
+This would install the package \fBFOO.deb\fR from the local filesystem.
+Useful, for example, to install additional keyring packages.
+.SH COPYRIGHT
+Copyright \[co] 2020-2022 Christian Kastner <ckk@debian.org>
+.SH "SEE ALSO"
+.BR sbuild (1),
+.BR sbuild\-qemu (1),
+.BR sbuild\-qemu\-update (1).
diff --git a/man/sbuild-qemu-update.1.in b/man/sbuild-qemu-update.1.in
new file mode 100644
index 0000000..5695556
--- /dev/null
+++ b/man/sbuild-qemu-update.1.in
@@ -0,0 +1,77 @@
+.\" 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\-UPDATE "1" "\*[RELEASE_DATE]" "Version \*[VERSION]" "Debian sbuild"
+.SH NAME
+sbuild\-qemu\-update \- sbuild\-update analog for QEMU images
+.SH SYNOPSIS
+.B sbuild\-qemu\-update
+.RB [ \-h ]
+.RB [ \-\-snapshot ]
+.RB [ \-\-arch=ARCH ]
+.RB [ \-\-noexec ]
+.RB IMAGE
+.SH DESCRIPTION
+\fBsbuild\-qemu\-update\fR boots a QEMU VM using \fBIMAGE\fR and then runs
+\fBapt-get\fR in it, performing \fBupdate\fR, \fBdist-upgrade\fR, \fBclean\fR
+and \fBautoremove\fR. It can optionally create a snapshot before updating.
+.PP
+The architecture is auto-guessed by stripping any file suffix and then
+splitting the image name on dashes ``\-'', and finally by looking for a Debian
+architecture name. \fIsid-amd64.img\fR, \fIamd64-temporary.image\fR or even
+just \fIamd64\fR would all be assumed to be amd64 images, but not
+\fIamd64.rebuild-tests.img\fR. If this guesses wrong, use the
+\fB\-\-arch\fR option.
+.SH OPTIONS
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+Show this help message and exit.
+.TP
+\fB\-\-snapshot\fR
+Create a snapshot of the image before changing it. Useful for
+reproducibility purposes.
+.TP
+\fB\-\-arch\fR=ARCH
+Architecture to use (instead of attempting to auto\-guess).
+.TP
+\fB\-\-timeout\fR=SECS
+Maximum time to wait for command to finish with expected result. Mostly
+relevant for foreign architectures, where \fBapt-get update\fR can take
+quite a while. Default: 600s.
+.TP
+\fB\-\-noexec\fR
+Don't actually do anything. Just print the command string that
+would be executed, and then exit.
+.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 EXAMPLES
+\fB$ sbuild\-qemu\-update unstable\-autopkgtest\-amd64.img\fR
+.PP
+This will update the image \fBunstable\-autopkgtest\-amd64.img\fR in
+the current directory. If no such file exists there, then
+\fB$IMAGEDIR/unstable\-autopkgtest\-amd64.img\fR is tried.
+.SH ENVIRONMENT
+If \fB$IMAGEDIR\fR is unset, then \fI~/.cache/sbuild\fR is used.
+.SH COPYRIGHT
+.nf
+Copyright \[co] 2020-2022 Christian Kastner <ckk@debian.org>
+.fi
+.SH "SEE ALSO"
+.BR sbuild (1),
+.BR sbuild\-qemu (1),
+.BR sbuild\-qemu\-create (1).
diff --git a/man/sbuild-qemu.1.in b/man/sbuild-qemu.1.in
new file mode 100644
index 0000000..cdb983c
--- /dev/null
+++ b/man/sbuild-qemu.1.in
@@ -0,0 +1,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).
diff --git a/man/sbuild-setup.7.in b/man/sbuild-setup.7.in
new file mode 100644
index 0000000..102e4d7
--- /dev/null
+++ b/man/sbuild-setup.7.in
@@ -0,0 +1,303 @@
+.\" t
+.\"
+.\" Copyright © 2005-2008 Roger Leigh <rleigh@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-SETUP 7 "\*[RELEASE_DATE]" "Version \*[VERSION]" "Debian sbuild"
+.SH NAME
+sbuild-setup \- sbuild setup procedure
+.SH DESCRIPTION
+\fBsbuild\fP uses chroots to build packages within, to provide a minimal and
+consistent build environment. This man page describes the procedure to create
+a chroot by hand using debootstrap. These are only guidelines; depending upon
+the setup required, several of the steps may be omitted entirely.
+.SH QUICK START
+Simply running
+.B sbuild-createchroot
+will perform all the setup steps described in detail below. See the section
+\[lq]\fIsbuild-createchroot\fP\[rq] below, as well as
+.BR sbuild\-createchroot (8).
+.SH CHROOT SETUP
+This guide sets up a lenny chroot on a powerpc machine. Adjust the
+names for other suites and architectures.
+.SS 1. Run debootstrap to create the chroot
+\f[CR]# \f[CB]mkdir \-p /srv/chroot/lenny\fP\fP
+.br
+.PP
+The author has each chroot as a separate LVM logical volume (LV). Create and
+mount an LV here if required:
+.PP
+\f[CR]# \f[CB]lvcreate \-L 4G \-n lenny_chroot \-Z y volume-group\fP\fP
+.br
+.PP
+Add to /etc/fstab and mount (see next section for full fstab example).
+Finally, run debootstrap to create the chroot:
+.PP
+\f[CR]# \f[CB]debootstrap \-\-variant=buildd lenny /srv/chroot/lenny http://deb.debian.org/debian/\fP\fP
+.br
+.SS 2. Set up additional mounts
+An example \fI/etc/fstab\fP:
+.PP
+.TS
+lfCR s s s s s.
+/dev/volume-group/lenny_chroot \[rs]
+.T&
+lfCR lfCR lfCR lfCR lfCR lfCR.
+ /srv/chroot/lenny ext3 defaults 0 2
+/dev/pts /srv/chroot/lenny/dev/pts none rw,bind 0 0
+tmpfs /srv/chroot/lenny/dev/shm tmpfs defaults 0 0
+proc /srv/chroot/lenny/proc proc defaults 0 0
+.T&
+lfCR s s s s s.
+/dev/volume-group/home \[rs]
+.T&
+lfCR lfCR lfCR lfCR lfCR lfCR.
+ /srv/chroot/lenny/home ext3 quota 0 0
+/tmp /srv/chroot/lenny/tmp none rw,bind 0 0
+/etc/passwd /srv/chroot/lenny/etc/passwd none ro,bind 0 0
+/etc/shadow /srv/chroot/lenny/etc/shadow none ro,bind 0 0
+/etc/group /srv/chroot/lenny/etc/group none ro,bind 0 0
+/etc/gshadow /srv/chroot/lenny/etc/gshadow none ro,bind 0 0
+.T&
+lfCR s s s s s.
+/etc/resolv.conf \[rs]
+.T&
+lfCR lfCR s s s s.
+ /srv/chroot/lenny/etc/resolv.conf \[rs]
+.T&
+lfCR lfCR lfCR lfCR lfCR lfCR.
+ none ro,bind 0 0
+.TE
+.PP
+If the bind mountpoints don't exist in the chroot, touch them:
+.PP
+\f[CR]# \f[CB]touch /srv/chroot/lenny/etc/resolv.conf\fP\fP
+.PP
+Next, mount them all.
+.PP
+Depending on your kernel version and security considerations, you may wish to
+do this part slightly differently. With a Linux kernel, at least version 2.6
+is required for bind mounts, and devpts (CONFIG_UNIX98_PTYS) for
+\fI/dev/pts\fP. Other guides recommend copying the files, but this method
+keeps them up-to-date at no cost.
+.PP
+If using sbuild with schroot, \fIpasswd\fP, \fIshadow\fP, \fIgroup\fP,
+\fIgshadow\fP and \fIresolv.conf\fP can be updated automatically at the start
+of each build, so no action is required here. schroot can also automatically
+mount all of the extra filesystems, so all the other mounts may be omitted.
+.PP
+To disable networking, don't bind mount \fI/etc/resolv.conf\fP. This will
+prevent APT from working inside the chroot, but prevents package building from
+having working network access (no nameservers).
+.SS 3. Edit \f[BI]sources.list\fP
+Create or edit \fI/srv/chroot/lenny/etc/apt/sources.list\fP, and add all the
+APT sources required to obtain binary and source packages for your chosen
+distribution:
+.PP
+\f[CR]deb http://security.debian.org/ lenny/updates main\fP
+.br
+\f[CR]deb\-src http://security.debian.org/ lenny/updates main\fP
+.br
+\f[CR]\fP
+.br
+\f[CR]deb http://deb.debian.org/debian/ lenny main\fP
+.br
+\f[CR]deb\-src http://deb.debian.org/debian/ lenny main\fP
+.br
+.SS 4. Configure dchroot or schroot
+This is entirely optional, but will make the chroot environment easier to
+access and administer.
+.PP
+For dchroot, add the following line to \fI/etc/dchroot.conf\fP:
+.PP
+\f[CR]lenny /srv/chroot/lenny\fP
+.br
+.PP
+For schroot, add a group to \fI/etc/schroot/schroot.conf\fP (or a new file
+\fI/etc/schroot/chroot.d/lenny\fP), for example:
+.PP
+\f[CR][lenny]\fP
+.br
+\f[CR]type=directory\fP
+.br
+\f[CR]description=Debian lenny (stable)\fP
+.br
+\f[CR]location=/srv/chroot/lenny\fP
+.br
+\f[CR]priority=2\fP
+.br
+\f[CR]groups=root,sbuild\fP
+.br
+\f[CR]root\-groups=sbuild\fP
+.br
+\f[CR]aliases=stable\fP
+.br
+\f[CR]run\-setup\-scripts=true\fP
+.br
+\f[CR]run\-session\-scripts=true\fP
+.br
+.PP
+For sudo, add a symbolic link to the directory \fI/etc/sbuild/chroot\fP, for
+example:
+.PP
+\f[CR]# \f[CB]mkdir \-p /etc/sbuild/chroot\fP\fP
+.br
+\f[CR]# \f[CB]ln \-s /srv/chroot/lenny /etc/sbuild/chroot/lenny\fP\fP
+.br
+.SS 5. Log into chroot
+\f[CR]# \f[CB]dchroot \-c lenny\fP\fP
+.br
+.PP
+or
+.PP
+\f[CR]$ \f[CB]schroot \-c lenny \-u root\fP\fP
+.br
+.SS 6. Set up packages for sbuild
+While running as root inside the chroot:
+.PP
+\f[CR]# \f[CB]apt\-get update\fP\fP
+.br
+\f[CR]# \f[CB]apt\-get dist\-upgrade\fP\fP
+.br
+\f[CR]# \f[CB]apt\-get install debconf\fP\fP
+.br
+\f[CR]# \f[CB]dpkg\-reconfigure \-plow debconf\fP\fP
+.br
+.PP
+Answer the debconf questions as follows:
+.IP \fBinterface\fP
+choose \fI6/Noninteractive\fP
+.IP \fBpriority\fP
+choose \fI1/Critical\fP
+.PP
+You only need to run dpkg-reconfigure if you weren't asked the questions during
+the debconf install. Next, install the packages required for building
+packages:
+.PP
+\f[CR]# \f[CB]apt\-get install fakeroot build\-essential\fP\fP
+.br
+\f[CR]# \f[CB]apt\-get install makedev\fP\fP
+.br
+\f[CR]# \f[CB]cd /dev/\fP\fP
+.br
+\f[CR]# \f[CB]/sbin/MAKEDEV generic\fP\fP
+.br
+\f[CR]# \f[CB]touch /etc/mtab\fP\fP
+.br
+.PP
+For some security, we don't bind mount /dev, so it can't access e.g. USB
+devices
+.SS 7. sbuild setup
+While running as root inside the chroot:
+.PP
+\f[CR]# \f[CB]mkdir /build\fP\fP
+.br
+\f[CR]# \f[CB]chown root:sbuild /build\fP\fP
+.br
+\f[CR]# \f[CB]chmod 02775 /build\fP\fP
+.br
+\f[CR]# \f[CB]mkdir \-p /var/lib/sbuild/srcdep\-lock\fP\fP
+.br
+\f[CR]# \f[CB]chown \-R root:sbuild /var/lib/sbuild\fP\fP
+.br
+\f[CR]# \f[CB]chmod \-R 02775 /var/lib/sbuild\fP\fP
+.br
+.PP
+Note that when using sbuild with schroot, this setup is done at the start of
+each build, so is not required here.
+.SS 8. Finished
+Congratulations! You should now have a fully configured and operational
+chroot.
+.SH SBUILD-CREATECHROOT
+This script will automatically perform a number of the steps described above,
+including:
+.IP \[bu]
+Running debootstrap.
+.IP \[bu]
+Setting up APT sources in \fI/etc/apt/sources.list\fP.
+.IP \[bu]
+Setting up a minimal \fI/etc/passwd\fP
+.IP \[bu]
+Setting up /build and /var/lib/sbuild with appropriate ownership and
+permissions.
+.PP
+After it has done this, you do still need to do some manual setup, completing
+the steps it missed out above, for example.
+.SH USER SETUP
+.SS 1. Group membership
+As root, run:
+.PP
+\f[CR]# \f[CB]sbuild-adduser \f[CBI]user\fP\fP\fP
+.br
+.PP
+Alternatively, add the user to the \fIsbuild\fP group by hand:
+.PP
+\f[CR]# \f[CB]adduser \f[CBI]user\fP sbuild\fP\fP
+.SS 2. \f[BI]~/.sbuildrc\fP
+.br
+Configure the user's \fI~/.sbuildrc\fP:
+.PP
+\f[CR]$ \f[CB]cp /usr/share/doc/sbuild/examples/example.sbuildrc ~\f[CBI]user\fP/.sbuildrc\fP\fP
+.br
+.PP
+Edit to set the correct mail address to send log files to, and the correct
+maintainer name and/or uploader name.
+.PP
+.SS 3. Build directories
+Create directories to contain packages and log files. (.sbuildrc may have
+configured different locations; the default build directory is the current
+directory, and the default $log_dir is ~/logs):
+.PP
+\f[CR]$ \f[CB]mkdir ~/logs\fP\fP
+.br
+.SS 4. sudo setup
+This step not required if schroot is used (which is the default, set in
+\fIsbuild.conf\fP). If using sbuild with sudo (chroot_mode \[lq]split\[rq]),
+sudo needs configuring to give the user permission to install and remove
+packages in the chroot, which requires root privileges. Add the following
+lines to \fI/etc/sudoers\fP:
+.PP
+\f[CR]\f[CI]username\fP ALL=NOPASSWD: ALL\fP
+.br
+\f[CR]Defaults:\f[CI]username\fP env_keep+="APT_CONFIG DEBIAN_FRONTEND SHELL"\fP
+.br
+.PP
+where \fIusername\fP is the name of the user who will run sbuild.
+.SS 5. Finished
+The user should now be able to run sbuild.
+.PP
+\f[CR]$ \f[CB]sbuild ...\fP\fP
+.br
+.SH AUTHORS
+Roger Leigh.
+.SH COPYRIGHT
+Copyright \(co 2005-2008 Roger Leigh <rleigh@debian.org>
+.PP
+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.
+.SH SEE ALSO
+.BR debootstrap (1),
+.BR sbuild (1),
+.BR sbuild\-adduser (8),
+.BR sbuild\-createchroot (8).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/man/sbuild-shell.1.in b/man/sbuild-shell.1.in
new file mode 100644
index 0000000..b0b51a7
--- /dev/null
+++ b/man/sbuild-shell.1.in
@@ -0,0 +1,63 @@
+.\" Copyright © 2005-2008 Roger Leigh <rleigh@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\-SHELL 1 "\*[RELEASE_DATE]" "Version \*[VERSION]" "Debian sbuild"
+.SH NAME
+sbuild\-shell \- run a shell in an sbuild chroot
+.SH SYNOPSIS
+.BR sbuild\-shell
+.RB [ \-h \[or] \-\-help " \[or] " \-V \[or] \-\-version ]
+.B CHROOT
+.SH DESCRIPTION
+\fBsbuild\-shell\fR runs an interactive shell (\fI/bin/sh\fP) inside the
+specified chroot. The changes will not be discarded, so this can be used to
+setup a build chroot.
+.SH OPTIONS
+.SS Actions
+.TP
+.BR \-h ", " \-\-help
+Display this manual.
+.TP
+.BR \-V ", " \-\-version
+Print version information.
+.SS Chroot selection
+.TP
+.B CHROOT
+The chroot to use. Note that \[oq]o\[cq], \[oq]s\[cq],
+\[oq]t\[cq], \[oq]u\[cq] and \[oq]e\[cq] may be used as abbreviations for
+\[oq]oldstable\[cq], \[oq]stable\[cq], \[oq]testing\[cq], \[oq]unstable\[cq]
+and \[oq]experimental\[cq], respectively.
+.SH EXAMPLES
+To run a shell in the \fIunstable\fP chroot:
+.PP
+\f[CR]% \f[CB]sbuild\-shell unstable\fP\fP\[CR]
+.br
+.SH AUTHORS
+.nf
+Roger Leigh.
+.fi
+.SH COPYRIGHT
+.nf
+Copyright \[co] 2006\[en]2008 Roger Leigh <rleigh@debian.org>.
+.fi
+.SH "SEE ALSO"
+.BR sbuild (1).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/man/sbuild-update.1.in b/man/sbuild-update.1.in
new file mode 100644
index 0000000..bc859f4
--- /dev/null
+++ b/man/sbuild-update.1.in
@@ -0,0 +1,134 @@
+.\" Copyright © 2005-2009 Roger Leigh <rleigh@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\-UPDATE 1 "\*[RELEASE_DATE]" "Version \*[VERSION]" "Debian sbuild"
+.SH NAME
+sbuild\-update \- update, upgrade, and clean an sbuild chroot with apt-get
+.SH SYNOPSIS
+.B sbuild\-update
+.RB [ \-h \[or] \-\-help ] " " [ \-V \[or] \-\-version ]
+.RB [ \-\-arch=\fIarchitecture\fP ]
+.RB [ \-u \[or] \-\-update ] " " [ \-g \[or] \-\-upgrade ] " "
+.RB [ \-d \[or] \-\-dist\-upgrade ] " " [ \-c \[or] \-\-clean ] " "
+.RB [ \-a \[or] \-\-autoclean ] " " [ \-r \[or] \-\-autoremove ]
+.RB [ \-\-chroot-mode=\fIschroot|sudo|unshare\fP ]
+.RB CHROOT1 " [" CHROOT2 " [" CHROOT\f[BI]n\fP... ]]
+.br
+.RB "(DEPRECATED) " sbuild\-upgrade
+.RB [ \-h \[or] \-\-help ] " " [ \-V \[or] \-\-version ]
+.RB CHROOT1 " [" CHROOT2 " [" CHROOT\f[BI]n\fP... ]]
+.br
+.RB "(DEPRECATED) " sbuild\-distupgrade
+.RB [ \-h \[or] \-\-help ] " " [ \-V \[or] \-\-version ]
+.RB CHROOT1 " [" CHROOT2 " [" CHROOT\f[BI]n\fP... ]]
+.br
+.RB "(DEPRECATED) " sbuild\-clean
+.RB [ \-h \[or] \-\-help ] " " [ \-V \[or] \-\-version ]
+.RB [ \-c \[or] \-\-clean ] " " [ \-a \[or] \-\-autoclean ] " "
+.RB [ \-r \[or] \-\-autoremove ]
+.RB CHROOT1 " [" CHROOT2 " [" CHROOT\f[BI]n\fP... ]]
+.SH DESCRIPTION
+\fBsbuild\-update\fR runs \f[CB]apt\-get\fP inside the specified chroot
+performing \f[CB]update\fP, \f[CB]upgrade\fP, \f[CB]dist\-upgrade\fP,
+\f[CB]clean\fP, \f[CB]autoclean\fP, and/or \f[CB]autoremove\fP depending on the
+options specified on the command line.
+.PP
+\fBsbuild\-upgrade\fR, \fBsbuild\-distupgrade\fR, and \fBsbuild\-clean\fR, are
+deprecated. They now simply run \fBsbuild\-update\fR with the appropriate
+options (\f[CB]\-\-upgrade\fP or \f[CB]\-\-dist\-upgrade\fP for
+\fBsbuild\-upgrade\fR or \fBsbuild\-distupgrade\fR respectively) along with
+whatever arguments were passed in the scripts.
+.SH OPTIONS
+.SS Actions
+.TP
+.BR \-h ", " \-\-help
+Display this manual.
+.TP
+.BR \-V ", " \-\-version
+Print version information.
+.TP
+.BR "\-\-arch=\fIarchitecture\fP"
+Update chroot for the architecture specified.
+.TP
+.BR \-u ", " \-\-update
+Perform an \f[CB]apt\-get update\fP.
+.TP
+.BR \-g ", " \-\-upgrade
+Perform an \f[CB]apt\-get upgrade\fP.
+.TP
+.BR \-d ", " \-\-dist\-upgrade
+Perform an \f[CB]apt\-get dist\-upgrade\fP.
+.TP
+.BR \-c ", " \-\-clean
+Perform an \f[CB]apt\-get clean\fP.
+.TP
+.BR \-a ", " \-\-autoclean
+Perform an \f[CB]apt\-get autoclean\fP.
+.TP
+.BR \-r ", " \-\-autoremove
+Perform an \f[CB]apt\-get autoremove\fP.
+.SS Chroot selection
+.TP
+.BR \-\-chroot-mode=\fIschroot|sudo|unshare\fP
+The sbuild chroot backend of the chroot to update. The autopkgtest backend is
+not supported by this method because autopkgtest backends are always ephemeral
+and changes never persist. To update a chroot for schroot and sudo,
+sbuild-update must be executed with superuser privileges (for example by using
+sudo). Creating a chroot for the unshare backend can be done by a normal user
+(without sudo) but it requires Linux user namespaces to be enabled (via "sysctl
+-w kernel.unprivileged_userns_clone=1"). Defaults to 'schroot'.
+.TP
+.B CHROOT
+The chroot to use. Note that \[oq]o\[cq], \[oq]s\[cq],
+\[oq]t\[cq], \[oq]u\[cq] and \[oq]e\[cq] may be used as abbreviations for
+\[oq]oldstable\[cq], \[oq]stable\[cq], \[oq]testing\[cq], \[oq]unstable\[cq]
+and \[oq]experimental\[cq], respectively.
+.SH EXAMPLES
+To update the \fIunstable\fP chroot:
+.PP
+\f[CR]% \f[CB]sbuild\-update \-\-update unstable\fP\fP
+.PP
+To upgrade the \fIunstable\fP chroot:
+.PP
+\f[CR]% \f[CB]sbuild\-update \-\-upgrade unstable\fP\fP
+.PP
+To clean the \fIunstable\fP chroot:
+.PP
+\f[CR]% \f[CB]sbuild\-update \-\-clean unstable\fP\fP
+.PP
+To perform an update, dist-upgrade, clean, autoclean, and autoremove for
+the \fIunstable\fP chroot:
+.PP
+\f[CR]% \f[CB]sbuild\-update \-udcar unstable\fP\fP
+.SH AUTHORS
+.nf
+Roger Leigh.
+Andres Mejia.
+.fi
+.SH COPYRIGHT
+.nf
+Copyright \[co] 2006\[en]2009 Roger Leigh <rleigh@debian.org>.
+Copyright \[co] 2010 Andres Mejia <mcitadel@gmail.com>.
+.fi
+.SH "SEE ALSO"
+.BR sbuild (1),
+.BR sbuild\-apt (1),
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/man/sbuild.1.in b/man/sbuild.1.in
new file mode 100644
index 0000000..71a11cd
--- /dev/null
+++ b/man/sbuild.1.in
@@ -0,0 +1,1678 @@
+.\" Copyright © 1998 James Troup <james@nocrew.org>
+.\" Copyright © 2005-2009 Roger Leigh <rleigh@debian.org>
+.\" Copyright © 2008 Simon McVittie <smcv@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 1 "\*[RELEASE_DATE]" "Version \*[VERSION]" "Debian sbuild"
+.SH NAME
+sbuild \- build debian packages from source
+.SH SYNOPSIS
+.B sbuild
+.RB [ \-h \[or] \-\-help " \[or] " \-V \[or] \-\-version ]
+.RB [ \-v \[or] \-\-verbose " \[or] " \-q \[or] \-\-quiet ]
+.RB [ \-D \[or] \-\-debug ]
+.RB [ \-A \[or] \-\-arch\-all ]
+.RB [ \-\-archive=\fIarchive\fP ]
+.RB [ \-d \[or] \-\-dist=\fIdistribution\fP ]
+.RB [ \-c \[or] \-\-chroot=\fIchroot\fP ]
+.RB [ \-\-chroot\-mode=\fIschroot|sudo|autopkgtest|unshare\fP ]
+.RB [ \-\-arch=\fIarchitecture\fP ]
+.RB [ \-\-arch\-any " \[or] " \-\-no\-arch\-any ]
+.RB [ \-\-build=\fIarchitecture\fP ]
+.RB [ \-\-host=\fIarchitecture\fP ]
+.RB [ \-\-profiles=\fIprofile[,...]\fP ]
+.RB [ \-s \[or] \-\-source ]
+.RB [ \-\-force\-orig\-source ]
+.RB [ \-\-make\-binNMU=\fIchangelog-entry\fP ]
+.RB [ \-\-binNMU=\fINMU-version\fP ]
+.RB [ \-\-append\-to\-version=\fIstring\fP ]
+.RB [ \-\-binNMU\-timestamp=\fItimestamp\fP ]
+.RB [ \-\-binNMU\-changelog=\fIchangelog\fP ]
+.RB [ \-\-build\-dir=\fIdirectory\fP ]
+.RB [ \-\-add\-depends=\fIdependency\fP ]
+.RB [ \-\-add\-conflicts=\fIdependency\fP ]
+.RB [ \-\-add\-depends\-arch=\fIdependency\fP ]
+.RB [ \-\-add\-conflicts\-arch=\fIdependency\fP ]
+.RB [ \-\-add\-depends\-indep=\fIdependency\fP ]
+.RB [ \-\-add\-conflicts\-indep=\fIdependency\fP ]
+.RB [ \-m \[or] \-\-maintainer=\fImaintainer\fP ]
+.RB [ \-e \[or] \-\-uploader=\fIuploader\fP ]
+.RB [ \-k \[or] \-\-keyid=\fIkey-id\fP ]
+.RB [ \-\-source\-only\-changes ]
+.RB [ \-\-no\-source\-only\-changes ]
+.RB [ \-j \[or] \-\-jobs=\fIn\fP ]
+.RB [ \-\-debbuildopt=\fIoption\fP ]
+.RB [ \-\-debbuildopts=\fIoptions\fP ]
+.RB [ \-\-dpkg\-source\-opt=\fIoptions\fP ]
+.RB [ \-\-dpkg\-source\-opts=\fIoptions\fP ]
+.RB [ \-\-dpkg\-file\-suffix=\fIsuffix\fP ]
+.RB [ \-p \[or] \-\-purge=\fPpurge-mode\fP ]
+.RB [ \-\-purge\-build=\fPpurge-mode\fP ]
+.RB [ \-\-purge\-deps=\fPpurge-mode\fP ]
+.RB [ \-\-purge\-session=\fPpurge-mode\fP ]
+.RB [ \-b \[or] \-\-batch]
+.RB [ \-n \[or] \-\-nolog ]
+.RB [ \-\-clean\-source ]
+.RB [ \-\-no\-clean\-source ]
+.RB [ \-\-run\-lintian ]
+.RB [ \-\-no\-run\-lintian ]
+.RB [ \-\-lintian\-opt=\fIoptions\fP ]
+.RB [ \-\-lintian\-opts=\fIoptions\fP ]
+.RB [ \-\-run\-piuparts ]
+.RB [ \-\-no\-run\-piuparts ]
+.RB [ \-\-piuparts\-opt=\fIoptions\fP ]
+.RB [ \-\-piuparts\-opts=\fIoptions\fP ]
+.RB [ \-\-piuparts\-root\-arg=\fIoptions\fP ]
+.RB [ \-\-piuparts\-root\-args=\fIoptions\fP ]
+.RB [ \-\-run\-autopkgtest ]
+.RB [ \-\-no\-run\-autopkgtest ]
+.RB [ \-\-autopkgtest\-opt=\fIoptions\fP ]
+.RB [ \-\-autopkgtest\-opts=\fIoptions\fP ]
+.RB [ \-\-autopkgtest\-root\-arg=\fIoptions\fP ]
+.RB [ \-\-autopkgtest\-root\-args=\fIoptions\fP ]
+.RB [ \-\-pre\-build\-commands=\fIstring\fP ]
+.RB [ \-\-chroot\-setup\-commands=\fIstring\fP ]
+.RB [ \-\-chroot\-update\-failed\-commands=\fIstring\fP ]
+.RB [ \-\-build\-deps\-failed\-commands=\fIstring\fP ]
+.RB [ \-\-starting\-build\-commands=\fIstring\fP ]
+.RB [ \-\-finished\-build\-commands=\fIstring\fP ]
+.RB [ \-\-build\-failed\-commands=\fIstring\fP ]
+.RB [ \-\-chroot\-cleanup\-commands=\fIstring\fP ]
+.RB [ \-\-post\-build\-commands=\fIstring\fP ]
+.RB [ \-\-post\-build\-failed\-commands=\fIstring\fP ]
+.RB [ \-\-anything\-failed\-commands=\fIstring\fP ]
+.RB [ \-\-log\-external\-command\-output ]
+.RB [ \-\-log\-external\-command\-error ]
+.RB [ \-\-setup\-hook=\fIhook-script\fP ]
+.RB [ \-\-build\-dep\-resolver=\fIresolver\fP ]
+.RB [ \-\-resolve\-alternatives \[or] \-\-no\-resolve\-alternatives ]
+.RB [ \-\-extra\-package=\fIpackage.deb\fP ]
+.RB [ \-\-extra\-repository=\fIspec\fP ]
+.RB [ \-\-extra\-repository\-key=\fIfile.asc\fP ]
+.RB [ \-\-build\-path=\fIstring\fP ]
+.RB [ \-\-dsc\-dir=\fIstring\fP ]
+.RB [ \-\-autopkgtest\-virt\-server=\fIschroot|lxc|chroot|qemu|ssh\fP ]
+.RB [ \-\-autopkgtest\-virt\-server\-opt=\fIstring\fP ]
+.RB [ \-\-autopkgtest\-virt\-server\-opts=\fIoptions\fP ]
+.RB [ \-\-purge\-extra\-packages\fP ]
+.RB [ \-\-bd\-uninstallable\-explainer=\fIdose3|apt|none\fP ]
+.RB [ PACKAGE [ .dsc ]]
+.SH DESCRIPTION
+\fBsbuild\fR rebuilds Debian binary packages from the corresponding Debian
+source, installing any missing source dependencies. The build takes place in a
+dedicated clean build environment, rather than on the host system. For an
+overview of the supported chroot backends see the section \fBCHROOT MODES\fR.
+.PP
+\fBsbuild\fR can fetch the Debian source over a network, or it can use
+locally available sources.
+.PP
+sbuild is given a packages to process as the argument \fBPACKAGE[.dsc]\fR.
+This argument is in the form of either a debianized package source directory, a
+source package name along with a version in the form \fIpackage_version\fP, a
+source package name, or a .dsc file. If no arguments are given, the current
+working directory is passed as an argument.
+.PP
+For arguments given as source directories, dpkg\-source is first run to produce
+a source .dsc file. Then, the package is built using the .dsc produced. For
+arguments in the form \fIpackage_version\fP or \fIpackage\fP, apt is used to
+download the source package. For arguments given as a .dsc file, sbuild builds
+the source packages directly. For .dsc files in remote locations, the source
+packages are downloaded first, then built.
+.PP
+It is also possible to run external commands with sbuild. See the section
+\fBEXTERNAL COMMANDS\fR for more on this.
+.PP
+\fBsbuild\fR mails the build logs to a user. It is configured by the
+configuration files \fI/etc/sbuild/sbuild.conf\fP and \fI~/.sbuildrc\fP. An
+example sbuildrc is available in
+\fI/usr/share/doc/sbuild/examples/example.sbuildrc\fP.
+A custom path to a configuration file can also be specified through setting the
+\fBSBUILD_CONFIG\fP environment variable to the path of an additional
+configuration file.
+.PP
+You can build either using a local package with its .dsc file or a
+remote one by specifying an explicit dpkg version.
+.SH OPTIONS
+Options set on the command line overwrite settings made in the configuration
+file.
+.TP
+.BR \-h ", " \-\-help
+Display this manual.
+.TP
+.BR \-V ", " \-\-version
+Print version information.
+.TP
+.BR "\-\-add\-depends=\fIdependency\fP"
+.TP
+.BR "\-\-add\-conflicts=\fIdependency\fP"
+.TP
+.BR "\-\-add\-depends\-arch=\fIdependency\fP"
+.TP
+.BR "\-\-add\-conflicts\-arch=\fIdependency\fP"
+.TP
+.BR "\-\-add\-depends\-indep=\fIdependency\fP"
+.TP
+.BR "\-\-add\-conflicts\-indep=\fIdependency\fP"
+These options add a build dependencies to the source package being built, in
+addition to the build dependency information specified in debian/control.
+These dependencies will be concatenated directly to the Build\-Depends,
+Build\-Conflicts, Build\-Depends\-Arch, Build\-Conflicts\-Arch, Build\-Depends\-Indep
+and Build\-Conflicts\-Indep dependencies, respectively. The options may be used
+any number of times to add multiple dependencies. The format is identical to
+the format used in debian/control.
+These command line options append to the \fBMANUAL_DEPENDS\fP, \fBMANUAL_CONFLICTS\fP, \fBMANUAL_DEPENDS_ARCH\fP, \fBMANUAL_CONFLICTS_ARCH\fP, \fBMANUAL_DEPENDS_INDEP\fP and \fBMANUAL_CONFLICTS_INDEP\fP configuration variables, respectively. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR "\-\-arch=\fIarchitecture\fP"
+Build using the architecture specified. A chroot named
+\fI$distribution\-$arch\-sbuild\fP or \fI$distribution\-arch\fP is searched for,
+in that order of preference. The chroot must be installed and configured
+appropriately to build as that architecture, e.g. using
+\fIpersonality=linux32\fP to build i386 packages on an amd64 system. Note that
+this option is equivalent to "\-\-host=architecture \-\-build=architecture".
+This command line option sets the \fBHOST_ARCH\fP and \fBBUILD_ARCH\fP configuration variables. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR "\-\-host=\fIarchitecture\fP"
+Build using the host architecture specified. If $host and $build don't match, a
+chroot named \fI$distribution\-$build\-$host\-sbuild\fP or \fI$distribution\-$build\-$host\fP
+is searched for, falling back to \fI$distribution\-$build\-sbuild\fP or
+\fI$distribution\-$build\fP, in that order of preference. This option is only
+useful for cross-building when used together with \-\-build.
+This command line option sets the \fBHOST_ARCH\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR "\-\-build=\fIarchitecture\fP"
+Build using the build architecture specified. This option is only useful for
+cross-building when used together with \-\-host. If \-\-build is not specified,
+the default system architecture is assumed.
+This command line option sets the \fBBUILD_ARCH\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-A ", " "\-\-arch\-all"
+Also build Architecture: all packages. This is the default behaviour for native builds. This option is the opposite of
+\-\-no\-arch\-all.
+See the section
+.BR "BUILD ARTIFACTS"
+for more information.
+This command line option sets the \fBBUILD_ARCH_ALL\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR "\-\-no\-arch\-all"
+Do not build Architecture: all packages. This is the default behaviour for cross builds. This
+option is the opposite of \-\-arch\-all.
+See the section
+.BR "BUILD ARTIFACTS"
+for more information.
+This command line option sets the \fBBUILD_ARCH_ALL\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR "\-\-arch\-any"
+Build Architecture: any packages. This is the default behavior. This option is
+the opposite of \-\-no\-arch\-any.
+See the section
+.BR "BUILD ARTIFACTS"
+for more information.
+This command line option sets the \fBBUILD_ARCH_ANY\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR "\-\-no\-arch\-any"
+Do not build Architecture: any packages. This option is the opposite
+of \-\-arch\-any and only useful when used together with \-\-arch\-all
+or \-\-source.
+See the section
+.BR "BUILD ARTIFACTS"
+for more information.
+This command line option sets the \fBBUILD_ARCH_ANY\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-b ", " "\-\-batch"
+Operate in batchmode, i.e. write a build-progress file during execution
+and files on shutdown to facilitate a clean restart.
+This command line option sets the \fBBATCH_MODE\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-c ", " "\-\-chroot=\fIchroot\fP"
+Specifies the chroot to use. The effect of this option depends on the selected
+chroot mode. With the \fBschroot\fP chroot mode, this option specifies the
+schroot name or alias to use. If not specified, the default is the first of
+schroot name or alias that matches \fI$distribution\-$arch\-sbuild\fP,
+\fI$distribution\-sbuild\fP, \fI$distribution\-$arch\fP or \fI$distribution\fP
+that exists. With the \fBsudo\fP chroot mode, this option specifies the chroot
+directory to use. The directory is either expected in /etc/sbuild/chroot (in
+buildd sbuild mode) or in the build directory (see \-\-build\-dir), prefixed with "chroot\-" (in
+user sbuild mode, the default). If not specified, the default is to search for
+a directory in the respective locations named in the same way as for the
+schroot mode. With the \fBunshare\fP chroot mode, if this option is a path,
+then it specifies the location of the chroot tarball directly. Otherwise, a
+tarball with equal basename from ~/.cache/sbuild will be used. If not
+specified, the default is to search for a tarball named in the same way as for
+the schroot mode under ~/.cache/sbuild. With the \fBautopkgtest\fP chroot mode
+this option has no effect. The \-\-autopkgtest\-virt\-server\-opts are used to pick
+the chroot in autopkgtest chroot mode.
+This command line option sets the \fBCHROOT\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR "\-\-chroot\-mode=\fIschroot|sudo|autopkgtest|unshare\fP"
+Select the desired chroot mode. Four values are possible: schroot (the
+default), sudo (which uses sudo to execute chroot in a directory from
+/etc/sbuild/chroot or ./chroot), autopkgtest which uses the autopkgtest\-virt\-* binaries
+(selectable via the \-\-autopkgtest\-virt\-server option) and unshare (which uses linux
+namespaces for chroot and doesn't require superuser privileges).
+See the section
+.BR "CHROOT MODES"
+for more information.
+This command line option sets the \fBCHROOT_MODE\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-d ", " "\-\-dist=\fIdistribution\fP"
+Explicitly set the distribution for the package build. This will be selecting
+the correct chroot to use and also sets the value of the Distribution field in
+the created .changes file. Setting this option is necessary when giving sbuild
+a .dsc file or a plain source package name to build. In the latter case it
+specifies the distribution the source package is fetched from.
+This command line option sets the \fBDISTRIBUTION\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-archive=\fIarchive\fP
+Communicate with specified archive.
+This command line option sets the \fBARCHIVE\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-D ", " "\-\-debug"
+Enable debug output.
+.TP
+.BR "\-\-apt\-clean"
+.TQ
+.BR "\-\-no\-apt\-clean"
+Run (or do not run) apt\-get clean in the chroot before executing the build,
+overriding the default setting.
+This command line option sets the \fBAPT_CLEAN\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR "\-\-apt\-update"
+.TQ
+.BR "\-\-no\-apt\-update"
+Run (or do not run) apt\-get update in the chroot before executing the build,
+overriding the default setting.
+This option has no effect on updating the internal sbuild apt repository, the
+repository for extra packages (see \-\-extra\-package) and the repositories given
+via \-\-extra\-repository. These are always updated. Thus, this option only
+influences updates of the default repositories of the chroot.
+This command line option sets the \fBAPT_UPDATE\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR "\-\-apt\-upgrade"
+.TQ
+.BR "\-\-no\-apt\-upgrade"
+Run (or do not run) apt\-get upgrade in the chroot before executing the build,
+overriding the default setting.
+This command line option sets the \fBAPT_UPGRADE\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR "\-\-apt\-distupgrade"
+.TQ
+.BR "\-\-no\-apt\-distupgrade"
+Run (or do not run) apt\-get distupgrade in the chroot before executing the build,
+overriding the default setting.
+This command line option sets the \fBAPT_DISTUPGRADE\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-m ", " "\-\-maintainer=\fImaintainer\fP"
+Specify the identity to use for GPG signing packages, and also used as the
+maintainer for binary NMUs. This does not normally require setting (it
+defaults to the uploader).
+This command line option sets the \fBMAINTAINER_NAME\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-e ", " "\-\-uploader=\fIuploader\fP"
+Passed to dpkg\-genchanges and is used to set the Changed\-by: field in
+the .changes file(s).
+This command line option sets the \fBUPLOADER_NAME\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-k ", " "\-\-keyid=\fIkey-id\fP"
+Passed to debsign and is used to set the key to sign the .changes
+file(s). Default is not using any key and not signing the .changes file(s).
+This command line option sets the \fBKEY_ID\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-source\-only\-changes
+.TQ
+.BR "\-\-no\-source\-only\-changes
+In addition to the .changes file generated by dpkg\-buildpackage, also produce
+(or don't produce) a .changes file suitable for a source-only upload. If
+requested by \-\-keyid, this .changes file will also be signed by debsign.
+This command line option sets
+the \fBSOURCE_ONLY_CHANGES\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-j ", " "\-\-jobs=\fIn\fP"
+Number of jobs to run simultaneously. Passed through to dpkg\-buildpackage.
+This command line option appends the appropriate \fB\-j\fP option to the \fBDPKG_BUILDPACKAGE_USER_OPTIONS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-debbuildopt=\fIoption\fP
+Pass the specified option directly to dpkg\-buildpackage in addition to the
+options already passed by sbuild. This option can be passed multiple times
+(once per dpkg\-buildpackage option) and can be freely mixed with the
+\-\-debbuildopts option. Options will be passed to dpkg\-buildpackage in the
+order that the \-\-debbuildopt and \-\-debbuildopts options are given on the
+command line.
+This command line option appends to the \fBDPKG_BUILDPACKAGE_USER_OPTIONS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-debbuildopts=\fIoptions\fP
+Pass the specified options directly to dpkg\-buildpackage in addition to the
+options already passed by sbuild. The argument will be split by whitespaces and
+the resulting array passed to the dpkg\-buildpackage invocation. If any options
+contain spaces, use \-\-debbuildopt for them. This option can be passed
+multiple times and can be freely mixed with the \-\-debbuildopt option. Options
+will be passed to dpkg\-buildpackage in the order that the \-\-debbuildopt and
+\-\-debbuildopts options are given on the command line.
+This command line option appends to the \fBDPKG_BUILDPACKAGE_USER_OPTIONS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-dpkg\-source\-opt=\fIoptions\fP
+Pass the specified option directly to dpkg\-source in addition to the options
+already passed by sbuild. This is only used when creating a source package from
+a Debianized source directory. This option can be passed multiple times (once
+per dpkg\-source option) and can be freely mixed with the \-\-dpkg\-source\-opts
+option. Options will be passed to dpkg\-source in the order that the
+\-\-dpkg\-source\-opt and \-\-dpkg\-source\-opts options are given on the
+command line.
+This command line option appends to the \fBDPKG_SOURCE_OPTIONS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.br
+\fBNOTE:\fR The '\fI\-b\fP', '\fI\-\-before\-build\fP' and '\fI\-\-after\-build\fP'
+options will always be passed to dpkg\-source, respectively.
+.TP
+.BR \-\-dpkg\-source\-opts=\fIoptions\fP
+Pass the specified options directly to dpkg\-source in addition to the options
+already passed by sbuild. The argument will be split by whitespaces and the
+resulting array passed to the dpkg\-source invocation. This is only used when
+creating a source package from a Debianized source directory. If any options
+contain spaces, use \-\-dpkg\-source\-opt for them. This option can be passed
+multiple times and can be freely mixed with the \-\-dpkg\-source\-opt option.
+Options will be passed to dpkg\-source in the order that the
+\-\-dpkg\-source\-opt and \-\-dpkg\-source\-opts options are given on the
+command line.
+This command line option appends to the \fBDPKG_SOURCE_OPTIONS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.br
+\fBNOTE:\fR The '\fI\-b\fP', '\fI\-\-before\-build\fP' and '\fI\-\-after\-build\fP'
+options will always be passed to dpkg\-source, respectively.
+.TP
+.BR "\-\-dpkg\-file\-suffix=\fIsuffix\fP"
+Add the suffix to the filename of the changes and buildinfo files generated by
+dpkg.
+.br
+\fBNOTE:\fR This option is ignored if dpkg\-dev in the build environment is too
+old to support it. At least dpkg\-dev 1.18.11 is required.
+.TP
+.BR "\-\-mail\-log\-to=\fIemail-address\fP"
+Send the build log to the specified email address.
+This command line option sets the \fBMAILTO\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR "\-\-mailfrom=\fIemail-address\fP"
+Email address used as the sender address for build logs.
+This command line option sets the \fBMAILFROM\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-n ", " "\-\-nolog"
+Do not create a package log file in the \fI$log_dir\fP directory and no build
+log file, but print everything to stdout. Also do not send any log mails.
+This command line option sets the \fBNOLOG\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-profiles=\fIprofile[,...]\fP"
+Specify the profile(s) we build, as a comma-separated list. Defaults to the
+space separated list of profiles in the \fBDEB_BUILD_PROFILES\fP environment
+variable when building natively or the \fBcross\fP and \fBnocheck\fP profiles
+when cross-building.
+This command line option sets the \fBBUILD_PROFILES\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-p ", " "\-\-purge=\fIpurge-mode\fP"
+Convenience option to set \fIpurge-mode\fR for build directory, build
+dependencies and session.
+This command line option sets the \fBPURGE_BUILD_DEPS\fP, \fBPURGE_BUILD_DIRECTORY\fP and \fBPURGE_SESSION\fP configuration variables. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR "\-\-purge\-build=\fIpurge-mode\fP"
+\fIpurge-mode\fR determines if the build directory will be deleted after a
+build. Possible values are \fBalways\fR (default), \fBnever\fR, and
+\fBsuccessful\fR.
+This command line option sets the \fBPURGE_BUILD_DIRECTORY\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR "\-\-purge\-deps=\fIpurge-mode\fP"
+\fIpurge-mode\fR determines if the build dependencies will be removed after a
+build. Possible values are \fBalways\fR (default), \fBnever\fR, and
+\fBsuccessful\fR.
+This command line option sets the \fBPURGE_BUILD_DEPS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR "\-\-purge\-session=\fIpurge-mode\fP"
+Purge the schroot session following a build. This is useful in conjunction
+with the \fI\-\-purge\-build\fP and \fI\-\-purge\-deps\fP options when using
+snapshot chroots, since by default the snapshot will be deleted. Possible
+values are \fBalways\fR (default), \fBnever\fR, and \fBsuccessful\fR.
+This command line option sets the \fBPURGE_SESSION\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-s ", " "\-\-source"
+Build the source package in addition to the other requested build artifacts. By
+default, the dsc will not be rewritten because the source package is the input
+to sbuild, not its output. Even when running from an unpacked source tree
+sbuild will first build the source package using dpkg\-source and then pass that
+on to the sbuild machinery. Use this option only when you know what you are
+doing. This will rewrite the original dsc passed to sbuild.
+See the section
+.BR "BUILD ARTIFACTS"
+for more information.
+This command line option sets the \fBBUILD_SOURCE\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR "\-\-no\-source"
+Don't rebuild the source package. This is the default. It is the opposite of
+\-\-source.
+See the section
+.BR "BUILD ARTIFACTS"
+for more information.
+This command line option sets the \fBBUILD_SOURCE\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR "\-\-force\-orig\-source"
+When used with in conjunction with \-s, this option forces the inclusion of the
+orig.tar.gz file in the generated .changes file, even in cases where it would
+not normally be included, i.e. use dpkg\-buildpackage \-sa.
+This command line option sets the \fBFORCE_ORIG_SOURCE\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR "\-\-use\-snapshot"
+Installs the latest snapshot gcc compiler from the \fIgcc\-snapshot\fP package,
+and alters the build environment to use the snapshot compiler for the build.
+Specifically, this option appends \fI/usr/lib/gcc\-snapshot/lib\fP to the value
+of the \fBLD_LIBRARY_PATH\fP configuration variable and
+\fI/usr/lib/gcc\-snapshot/bin\fP to the value of the \fBPATH\fP configuration
+variable. It also sets the \fBGCC_SNAPSHOT\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-v ", " "\-\-verbose"
+Be verbose, i.e. all information goes to stdout as well as to the log files.
+.TP
+.BR \-q ", " "\-\-quiet"
+Be quiet. This is the opposite of \-\-verbose.
+.TP
+.BR "\-\-make\-binNMU=\fIchangelog-entry\fP"
+With this option, \fBsbuild\fR will create a new changelog entry in
+debian/changelog of every package built. The version number will be in the
+format for binary-only NMUs (see \-\-binNMU); the maintainer is set to the
+maintainer name configured for \fBsbuild\fR. \fIchangelog-entry\fR will be used
+as the changelog entry following \[lq]Binary-only non-maintainer upload for
+ARCH -- no source changes\[rq]. Please note that the versions in the
+\fIPACKAGE_VERSION[.dsc]\fR arguments still have to be the unmodified (non-NMU
+ones) so that the sources can be found. The version number in log files and
+mails will be modified by \fBsbuild\fR automatically.
+The \-\-append\-to\-version option has a similar effect but allows one to
+specify an arbitrary version suffix instead of a custom changelog entry. To
+have a custom version suffix and a custom changelog entry, use \-\-make\-binNMU
+and \-\-append\-to\-version at the same time with \-\-binNMU=0.
+This option is incompatible with \-\-binNMU\-changelog.
+This option implies \-\-no\-arch\-all.
+This command line option sets the \fBBIN_NMU\fP configuration variable and sets the \fBBIN_NMU_VERSION\fP configuration variable to 1 if it was not set yet, for example by the \-\-binNMU option. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR "\-\-binNMU=\fINMU-version\fP"
+The version number of the binary NMU. This option only has an effect if
+combined with \-\-make\-binNMU and/or with \-\-append\-to\-version.
+\fIversion\fP is a single number for the (+b\fIn\fR) format
+used for binary NMUs.
+If the argument is the empty string or zero, then the +b\fIn\fR suffix will not
+be appended.
+The +b\fIn\fR suffix will be appended after the string given via \-\-append\-to\-version.
+This option is incompatible with \-\-binNMU\-changelog.
+This command line option sets the \fBBIN_NMU_VERSION\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR "\-\-append\-to\-version=\fIstring\fP"
+This option is similar to \-\-make\-binNMU except that it allows the user to
+specify an arbitrary string to be appended to the version number (immediately
+before the '+' in the Debian revision if \-\-make\-binNMU is also provided).
+To pass an arbitrary changelog text as well, combine this option with
+\-\-make\-binNMU but be aware that this will also add the +b\fIn\fR suffix
+unless you also pass \-\-binNMU=0 to disable it.
+This option is incompatible with \-\-binNMU\-changelog.
+This option implies \-\-no\-arch\-all.
+This command line option sets the \fBAPPEND_TO_VERSION\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR "\-\-binNMU\-timestamp=\fItimestamp\fP"
+Set the timestamp of the new binNMU changelog entry. By default, the time of
+the build will be used to generate the binNMU changelog timestamp. This option
+allows one to use a custom timestamp instead. The timestamp is either given as
+an integer in Unix time or as a string in the format compatible with Debian
+changelog entries (i.e. as it is generated by date \-R).
+This option is incompatible with \-\-binNMU\-changelog.
+This command line option sets the \fBBIN_NMU_TIMESTAMP\fP configuration
+variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR "\-\-binNMU\-changelog=\fIchangelog\fP"
+Set the complete content of a binary-only changelog entry. This option allows
+full customization of the new changelog entry. It is up to the user to make
+sure that the changelog entry is well-formed. The argument has to include
+all necessary newlines. Leading and trailing newlines will be stripped.
+Sbuild will not interpret any backslash escapes.
+This option is incompatible with \-\-make\-binNMU, \-\-binNMU,
+\-\-append\-to\-version and \-\-binNMU\-timestamp.
+This command line option sets the \fBBIN_NMU_CHANGELOG\fP configuration
+variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR "\-\-build\-dir=\fIdirectory\fP"
+Set the output directory for the build artifacts created by dpkg\-buildpackage
+and the log file. By default, the current directory is used or, when sbuild is
+executed from within an unpacked source directory, the parent directory.
+This command line option sets the \fBBUILD_DIR\fP configuration
+variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-clean\-source
+When executing sbuild from within an unpacked source tree, execute the
+debian/rules clean target. This is the default and might require some of the
+build dependencies installed on the host.
+This command line option sets the \fBCLEAN_SOURCE\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-no\-clean\-source
+When executing sbuild from within an unpacked source tree, do not run the
+debian/rules clean target before building the source package. Only set this if
+you start from a clean checkout and you know what you are doing.
+This command line option sets the \fBCLEAN_SOURCE\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-run\-lintian
+Run lintian after a successful build.
+This command line option sets the \fBRUN_LINTIAN\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-no\-run\-lintian
+Don't run lintian after a successful build. If sbuild is configured to run
+lintian by default, this option will prevent lintian being run.
+This command line option sets the \fBRUN_LINTIAN\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-lintian\-opt=\fIoptions\fP
+Pass the specified option directly to lintian in addition to the options
+already passed by sbuild. This option can be passed multiple times (once per
+lintian option) and can be freely mixed with the \-\-lintian\-opts option.
+Options will be passed to lintian in the order that the \-\-lintian\-opt and
+\-\-lintian\-opts options are given on the command line.
+This command line option appends to the \fBLINTIAN_OPTIONS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-lintian\-opts=\fIoptions\fP
+Pass the specified options directly to lintian in addition to the options
+already passed by sbuild. The argument will be split by whitespaces and the
+resulting array passed to the lintian invocation. If any options contain
+spaces, use \-\-lintian\-opt for them. This option can be passed multiple
+times and can be freely mixed with the \-\-lintian\-opts option. Options will
+be passed to lintian in the order that the \-\-lintian\-opt and
+\-\-lintian\-opts options are given on the command line.
+This command line option appends to the \fBLINTIAN_OPTIONS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-run\-piuparts
+Run piuparts after a successful build.
+This command line option sets the \fBRUN_PIUPARTS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-no\-run\-piuparts
+Don't run piuparts after a successful build. If sbuild is configured to run
+piuparts by default, this option will prevent piuparts being run.
+This command line option sets the \fBRUN_PIUPARTS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-piuparts\-opt=\fIoptions\fP
+Pass the specified option directly to piuparts in addition to the options
+already passed by sbuild. This option can be passed multiple times (once per
+piuparts option) and can be freely mixed with the \-\-piuparts\-opts option.
+Options will be passed to piuparts in the order that the \-\-piuparts\-opt and
+\-\-piuparts\-opts options are given on the command line.
+Certain percent escapes are supported. To write a literal percent sign, escape
+it with another percent sign. See the section
+.BR "OPTION STRING PERCENT ESCAPES"
+for more information.
+This command line option appends to the \fBPIUPARTS_OPTIONS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-piuparts\-opts=\fIoptions\fP
+Pass the specified options directly to piuparts in addition to the options
+already passed by sbuild. The argument will be split by whitespaces and the
+resulting array passed to the piuparts invocation. If any options contain
+spaces, use \-\-piuparts\-opt for them. This option can be passed multiple
+times and can be freely mixed with the \-\-piuparts\-opts option. Options will
+be passed to piuparts in the order that the \-\-piuparts\-opt and
+\-\-piuparts\-opts options are given on the command line.
+Certain percent escapes are supported. To write a literal percent sign, escape
+it with another percent sign. See the section
+.BR "OPTION STRING PERCENT ESCAPES"
+for more information.
+This command line option appends to the \fBPIUPARTS_OPTIONS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-piuparts\-root\-arg=\fIoptions\fP
+Add an argument that is used to launch piuparts as root. Without this option,
+the default is to use "sudo \-\-" to launch piuparts. If an empty string is
+supplied, then piuparts is launched without any prefixed command. This option
+can be specified multiple times. This command line option appends to the
+\fBPIUPARTS_ROOT_ARGS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-piuparts\-root\-args=\fIoptions\fP
+Add arguments that are used to launch piuparts as root. Without this option,
+the default is to use "sudo \-\-" to launch piuparts. If an empty string is
+supplied, then piuparts is launched without any prefixed command. The argument
+will be split by whitespaces. To pass options containing whitespaces use the
+option \-\-piuparts\-root\-arg. This command line option appends to the
+\fBPIUPARTS_ROOT_ARGS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-run\-autopkgtest
+Run autopkgtest after a successful build. This command line option sets the
+\fBRUN_AUTOPKGTEST\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-no\-run\-autopkgtest
+Don't run autopkgtest after a successful build. If sbuild is configured to run
+autopkgtest by default, this option will prevent autopkgtest being run. This
+command line option sets the \fBRUN_AUTOPKGTEST\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-autopkgtest\-opt=\fIoptions\fP
+Pass the specified option directly to autopkgtest in addition to the options
+already passed by sbuild. This option can be passed multiple times (once per
+autopkgtest option) and can be freely mixed with the \-\-autopkgtest\-opts
+option. Options will be passed to autopkgtest in the order that the
+\-\-autopkgtest\-opt and \-\-autopkgtest\-opts options are given on the command
+line.
+Certain percent escapes are supported. To write a literal percent sign, escape
+it with another percent sign. See the section
+.BR "OPTION STRING PERCENT ESCAPES"
+for more information.
+This command line option appends to the \fBAUTOPKGTEST_OPTIONS\fP
+configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-autopkgtest\-opts=\fIoptions\fP
+Pass the specified options directly to autopkgtest in addition to the options
+already passed by sbuild. The argument will be split by whitespaces and the
+resulting array passed to the autopkgtest invocation. If any options contain
+spaces, use \-\-autopkgtest\-opt for them. This option can be passed multiple
+times and can be freely mixed with the \-\-autopkgtest\-opts option. Options
+will be passed to autopkgtest in the order that the \-\-autopkgtest\-opt and
+\-\-autopkgtest\-opts options are given on the command line.
+Certain percent escapes are supported. To write a literal percent sign, escape
+it with another percent sign. See the section
+.BR "OPTION STRING PERCENT ESCAPES"
+for more information.
+This command line
+option appends to the \fBAUTOPKGTEST_OPTIONS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-autopkgtest\-root\-arg=\fIoptions\fP
+Add an argument that is used to launch autopkgtest as root. Without this
+option, the default is to use "sudo \-\-" to launch autopkgtest. If an empty
+string is supplied, then autopkgtest is launched without any prefixed command.
+This option can be specified multiple times. This command line option appends
+to the
+\fBAUTOPKGTEST_ROOT_ARGS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-autopkgtest\-root\-args=\fIoptions\fP
+Add arguments that are used to launch autopkgtest as root. Without this
+option, the default is to use "sudo \-\-" to launch autopkgtest. If an empty
+string is supplied, then autopkgtest is launched without any prefixed command.
+The argument will be split by whitespaces. To pass options containing
+whitespaces use the option \-\-autopkgtest\-root\-arg. This command line
+option appends to the \fBAUTOPKGTEST_ROOT_ARGS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-pre\-build\-commands=\fIstring\fP
+This is the earliest external command which is run right after the chroot
+session has been initialized and before anything else is done (like installing
+the build dependencies). The command is run outside of the chroot. This option
+can be used multiple times to add multiple commands. Certain percent escapes
+are supported. To write a literal percent sign, escape it with another percent
+sign. See the section
+.BR "EXTERNAL COMMANDS"
+for more information.
+This command line option appends to the \fBEXTERNAL_COMMANDS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-chroot\-setup\-commands=\fIstring\fP
+Run these commands after the chroot and variables have been setup but before
+dependencies are installed. The command is run as root inside of the chroot.
+This option can be used multiple times to add multiple commands. Certain
+percent escapes are supported. To write a literal percent sign, escape it with
+another percent sign. See the
+section
+.BR "EXTERNAL COMMANDS"
+for more information.
+This command line option appends to the \fBEXTERNAL_COMMANDS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-chroot\-update\-failed\-commands=\fIstring\fP
+Run these commands after any of 'apt\-get update', 'apt\-get upgrade' or 'apt\-get
+dist\-upgrade' failed.
+This hook is not run for updates of the internal sbuild apt repository, the
+repository for extra packages (see \-\-extra\-package) and the repositories given
+via \-\-extra\-repository.
+The environment is intact, and the failure can be
+investigated. Especially %SBUILD_SHELL is useful here. This option can be used
+multiple times to add multiple commands. Certain percent escapes are supported.
+To write a literal percent sign, escape it with another percent sign.See the
+section
+.BR "EXTERNAL COMMANDS"
+for more information.
+This command line option appends to the \fBEXTERNAL_COMMANDS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-build\-deps\-failed\-commands=\fIstring\fP
+These commands are run if installing the build dependencies has failed directly
+after the failed attempt. The environment is intact, and the failure can be
+investigated. Especially %SBUILD_SHELL is useful here. The command is run as
+root inside the chroot. This option can be used multiple times to add multiple
+commands. Certain percent escapes are supported. To write a literal percent
+sign, escape it with another percent sign. See the section
+.BR "EXTERNAL COMMANDS"
+for more information.
+This command line option appends to the \fBEXTERNAL_COMMANDS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-starting\-build\-commands=\fIstring\fP
+Run these commands after dependencies are installed, just before the package
+build with dpkg\-buildpackage starts. The command is run as the root user
+inside the chroot. This option can be used multiple times to add
+multiple commands. Certain percent escapes are supported. To write a literal
+percent sign, escape it with another percent sign. See the section
+.BR "EXTERNAL COMMANDS"
+for more information.
+This command line option appends to the \fBEXTERNAL_COMMANDS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-finished\-build\-commands=\fIstring\fP
+Run these commands immediately after the timed package build finishes. The
+command is run as the root user inside the chroot. This
+option can be used multiple times to add multiple commands. Certain percent
+escapes are supported. To write a literal percent sign, escape it with another
+percent sign. See the section
+.BR "EXTERNAL COMMANDS"
+for more information.
+This command line option appends to the \fBEXTERNAL_COMMANDS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-build\-failed\-commands=\fIstring\fP
+These commands are run if dpkg\-buildpackage has failed directly after the
+failed attempt. The environment is intact, and the failure can be investigated.
+Especially %SBUILD_SHELL is useful here. The command is run as the root
+user inside the chroot. This option can be used multiple times
+to add multiple commands. Certain percent escapes are supported. To write a
+literal percent sign, escape it with another percent sign. See the section
+.BR "EXTERNAL COMMANDS"
+for more information.
+This command line option appends to the \fBEXTERNAL_COMMANDS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-chroot\-cleanup\-commands=\fIstring\fP
+Run these commands when a chroot is cleaned up, before build directory is
+purged. The command is run as root inside the chroot. This option can be used
+multiple times to add multiple commands. Certain percent escapes are supported.
+To write a literal percent sign, escape it with another percent sign. See the
+section
+.BR "EXTERNAL COMMANDS"
+for more information.
+This command line option appends to the \fBEXTERNAL_COMMANDS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-post\-build\-commands=\fIstring\fP
+Run this command after a successful build. The command is run outside of the
+chroot. This option can be used multiple times to add multiple commands.
+Certain percent escapes are supported. To write a literal percent sign, escape
+it with another percent sign. See the section
+.TP
+.BR \-\-post\-build\-failed\-commands=\fIstring\fP
+Exactly like the above, but when a build fails.
+.BR "EXTERNAL COMMANDS"
+for more information.
+This command line option appends to the \fBEXTERNAL_COMMANDS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-anything\-failed\-commands=\fIstring\fP
+Run these commands for all the \fI\-\-xxx\-failed\-commands\fP options.
+Especially %SBUILD_SHELL is useful here. This option can be used multiple times
+to add multiple commands. Certain percent escapes are supported. To write a
+literal percent sign, escape it with another percent sign. See the section
+.BR "EXTERNAL COMMANDS"
+for more information.
+This command line option appends to the \fBEXTERNAL_COMMANDS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-log\-external\-command\-output
+Write output from external commands to the build log.
+This command line option sets the \fBLOG_EXTERNAL_COMMAND_OUTPUT\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-log\-external\-command\-error
+Write error output from external commands to the build log.
+This command line option sets the \fBLOG_EXTERNAL_COMMAND_ERROR\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR "\-\-setup\-hook=\fIhook-script\fP" " " \fBDEPRECATED\fP
+This option is deprecated. Use of this option will add \fIhook-script\fP to the
+external commands to run via \fIchroot\-setup\-commands\fP.
+This command line option sets the \fBCHROOT_SETUP_SCRIPT\fP configuration variable and appends to the \fBEXTERNAL_COMMANDS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR "\-\-build\-dep\-resolver=\fIresolver\fP"
+Use the specified resolver to handle selecting the build dependencies.
+Supported resolvers are \fIapt\fP (the default), \fIaptitude\fP, \fIaspcud\fP,
+\fIxapt\fP, and \fInull\fP. The apt resolver is the most appropriate resolver
+for most users, for building for unstable, stable and other distributions. If
+alternative build dependencies are used (excluding architecture restrictions),
+only the first alternative will be used; the others will be ignored. The
+aptitude resolver is very similar, but smarter and slower, and it will consider
+all alternatives by default; it is suited to more complex situations, such as
+building packages for the experimental distribution, where packages need
+installing from multiple suites (\fIunstable\fP and \fIexperimental\fP). Due
+to performance issues, aptitude is not recommended for
+use by default. If the dependency situation is so complex that neither apt nor
+aptitude are able to find a solution, then you can use the aspcud resolver.
+This resolver uses apt\-cudf to ask aspcud, a real solver (in the math sense),
+to find a solution to the installation problem. Since aspcud uses a real solver
+(an ASP solver) it will always find a solution if one exists. The solution
+found by the aspcud resolver can be refined by changing the default
+optimization criteria through the \-\-aspcud\-criteria option. The xapt resolver
+is intended only for cross-building, and is a temporary transitional feature
+which will be removed following the complete introduction of multi-arch
+support. Finally, the null resolver is a dummy solver which does not install,
+upgrade or remove any packages. This allows one to completely control package
+installation via hooks.
+This command line option sets the \fBBUILD_DEP_RESOLVER\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-aspcud\-criteria=\fIcriteria\fP
+Optimization criteria in extended MISC 2012 syntax passed to aspcud through
+apt\-cudf. Optimization criteria are separated by commas, sorted by decreasing
+order of priority and are prefixed with a polarity (+ to maximize and - to
+minimize). The default criteria is \fB\-removed,\-changed,\-new\fP which first
+minimizes the number of removed packages, then the number of changed packages
+(up or downgrades) and then the number of new packages. A common task is to
+minimize the number of packages from experimental. To do this you can add a
+criteria like \fB\-count(solution,APT\-Release:=/a=experimental/)\fP to the
+default criteria. This will then minimize the number of packages in the
+solution which contain the string \fIa=experimental\fP in the \fIAPT\-Release\fP
+field of the EDSP output created by apt. For more help on how to write
+optimization criteria, see the
+.BR apt\-cudf (1)
+man page. Specifically the help on the \-\-criteria option.
+This command line option sets the \fBASPCUD_CRITERIA\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-resolve\-alternatives
+Allow the use of alternatives in Build\-Depends, Build\-Depends\-Arch and
+Build\-Depends\-Indep. This is the default for the aptitude dependency resolver.
+This command line option sets the \fBRESOLVE_ALTERNATIVES\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-no\-resolve\-alternatives
+Do not allow the use of alternatives in Build\-Depends, Build\-Depends\-Arch and
+Build\-Depends\-Indep. Note that alternatives for the same package
+(e.g. different versions) are still allowed. This is the default for the
+apt and xapt dependency resolvers.
+This command line option sets the \fBRESOLVE_ALTERNATIVES\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-extra\-package=\fIpackage.deb|directory\fP
+Make \fIpackage.deb\fP available for build-dependency resolution, by
+adding it to a temporary archive created by sbuild. This makes it
+easier to build packages against locally-built build dependencies,
+without waiting for those packages to enter the main archive, or going
+through the hassle of maintaining a local archive and making it
+accessible inside the chroot. \fIpackage.deb\fP is copied into the
+chroot, so it can refer to any path on the host system.
+If a directory is passed instead of a regular file, then all regular files
+inside that directory with a filename that ends in \fI.deb\fP will be added in
+the same fashion as it is done for individual packages.
+This option can be specified multiple times.
+This command line option appends to the \fBEXTRA_PACKAGES\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-extra\-repository=\fIspec\fP
+Add a repository to the list of apt sources during the package build.
+The repository specification is a line suitable for an apt
+.BR sources.list (5)
+file. For instance, you might use
+.nh
+.B \-\-extra\-repository="deb http://deb.debian.org/debian experimental main"
+.hy
+to allow packages in the experimental distribution to fulfill
+build-dependencies. Note that the build chroot must already trust the
+key of this repository or a key must be given with the
+.nh
+.B \-\-extra\-repository\-key
+.hy
+flag (see
+.BR apt\-secure (8)).
+This command line option appends to the \fBEXTRA_REPOSITORIES\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-extra\-repository\-key=\fIfile.asc\fP
+Add \fIfile.asc\fP to the list of trusted keys inside the chroot. The key is
+read from the filename given, and added to the trusted keys. For more
+information, see
+.BR apt\-secure (8).
+This flag is particularly useful if the target in
+.nh
+.B \-\-extra\-repository
+.hy
+is not signed
+with a key that's trusted by the base chroot.
+This command line option appends to the \fBEXTRA_REPOSITORY_KEYS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-build\-path=\fIstring\fP
+By default the package is built in a path of the following format
+/build/packagename\-XXXXXX/packagename\-version/ where XXXXXX is a random ascii
+string. This option allows one to specify a custom path where the package is
+built inside the chroot. The sbuild user in the chroot must have permissions to
+create the path. Common writable locations are subdirectories of /tmp or
+/build. Using /tmp might be dangerous, because (depending on the chroot
+mode) the /tmp inside the chroot might be a world writable location that can
+be accessed by processes outside the chroot. The directory /build can only be
+accessed by the sbuild user and group and should be a safe location. The
+buildpath must be an empty directory because the last component of the path
+will be removed after the build is finished. Notice that depending on the
+chroot mode (see \-\-chroot\-mode), some locations inside the chroot might be
+bind mounts that are shared with other sbuild instances. You must avoid using
+these shared locations as the build path or otherwise concurrent runs of sbuild
+will likely fail. With the default schroot chroot mode, the directory /build
+is shared between multiple schroot sessions. You can change this behaviour in
+/etc/schroot/sbuild/fstab. The behaviour of other chroot modes will vary.
+This command line option sets the \fBBUILD_PATH\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-dsc\-dir=\fIstring\fP
+By default the package is built in a path of the following format
+/build/packagename\-XXXXXX/packagename\-version/ where packagename\-version are
+replaced by the values in debian/changelog. This option allows one to specify a
+custom packagename\-version path where the package is built inside the chroot.
+This is useful to specify a static path for different versions for example for ccache.
+This command line option sets the \fBDSC_DIR\fP configuration variable. See
+.BR sbuild.conf (5) for more information.
+.TP
+.BR \-\-autopkgtest\-virt\-server=\fIschroot|lxc|chroot|qemu|ssh\fP
+The autopkgtest virtualization server. Can be specified with or without the autopkgtest\-virt\-
+prefix. For instance, the following set of command line options will use the
+autopkgtest\-virt\-schroot chroot mode for a package build:
+.nh
+.B \-\-chroot\-mode=autopkgtest \-\-autopkgtest\-virt\-server=schroot \-\-autopkgtest\-virt\-server\-opt=unstable\-amd64\-sbuild
+.hy
+This command line option sets the \fBAUTOPKGTEST_VIRT_SERVER\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-autopkgtest\-virt\-server\-opt=\fIstring\fP
+Pass the specified option directly to the respective autopkgtest\-virt\-* virtualization
+server in addition to the options already passed by sbuild. This option can be
+passed multiple times (once per autopkgtest\-virt\-* option) and can be freely mixed with
+the \-\-autopkgtest\-virt\-server\-opts option. Options will be passed to the respective
+autopkgtest\-virt\-* virtualization server in the order that the \-\-autopkgtest\-virt\-server\-opt
+and \-\-autopkgtest\-virt\-server\-opts options are given on the command line. See the
+manual pages of the respective autopkgtest\-virt\-* commands for more information.
+Certain percent escapes are supported. To write a literal percent sign, escape
+it with another percent sign. See the section
+.BR "OPTION STRING PERCENT ESCAPES"
+for more information.
+This command line option appends to the \fBAUTOPKGTEST_VIRT_SERVER_OPTIONS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-autopkgtest\-virt\-server\-opts=\fIoptions\fP
+Pass the specified options directly to the respective autopkgtest\-virt\-* virtualization
+server in addition to the options already passed by sbuild. The argument will
+be split by whitespaces and the resulting array passed to the autopkgtest\-virt\-*
+invocation. If any options contain spaces, use \-\-autopkgtest\-virt\-server\-opt for
+them. This option can be passed multiple times and can be freely mixed with
+the \-\-autopkgtest\-virt\-server\-opts option. Options will be passed to the
+respective autopkgtest\-virt\-* virtualization server in the order that the
+\-\-autopkgtest\-virt\-server\-opt and \-\-autopkgtest\-virt\-server\-opts options are given on
+the command line. See the manual pages of the respective autopkgtest\-virt\-* commands
+for more information.
+Certain percent escapes are supported. To write a literal percent sign, escape
+it with another percent sign. See the section
+.BR "OPTION STRING PERCENT ESCAPES"
+for more information.
+This command line option appends to the \fBAUTOPKGTEST_VIRT_SERVER_OPTIONS\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-sbuild\-mode=\fImode\fP
+Behaviour changes for use in a buildd environment.
+This command line option sets the \fBSBUILD_MODE\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-stats\-dir=\fIdirectory\fP
+Directory for writing build statistics to.
+This command line option sets the \fBSTATS_DIR\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-purge\-extra\-packages\fP
+This is an experimental option. Only use when you know what you are doing.
+Source packages must be buildable with only their build dependencies, all
+packages marked as Essential:yes, the build\-essential package and their
+transitive dependencies installed. But by default, most chroots will also
+include Priority:required packages and apt as well as their transitive
+dependencies. This option will try to remove all additional packages that are
+not strictly required for the build right after build dependencies were
+installed. This currently works best with the aspcud resolver. The apt resolver
+will not make as much effort to remove all unneeded packages and will keep all
+providers of a virtual package and all packages from any dependency alternative
+that happen to be installed. The aptitude and xapt resolver do not implement
+this feature yet. The removed packages are not (yet) added again after the
+build finished. This can have undesirable side effects like lintian not working
+(because there is no apt to install its dependencies) or bare chroots becoming
+totally unusable after apt was removed from them. Thus, this option should only
+be used with throw-away chroots like schroot provides them where the original
+state is automatically restored after each build. This command line option sets
+the \fBPURGE_EXTRA_PACKAGES\fP configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.TP
+.BR \-\-bd\-uninstallable\-explainer=\fIdose3|apt|none\fP
+If the build dependencies cannot be satisfied by the chosen resolver, sbuild
+will run the selected method to give a better explanation why the build
+dependencies cannot be installed. Possible arguments for this option are dose3
+(the default), apt and none. To disable this feature, pass none or the empty string.
+Depending on the resolver, the dose3 explainer might report a dependency
+situation as satisfiable even if the chosen resolver found it to be
+unsatisfiable. This is especially likely to happen if the apt resolver (the
+default) is used. Such disparities can have two reasons: either the
+understanding of the involved dependency situation of the apt and dose3 solver
+differs (this is a bug) or the apt solver was unable to find a solution if the
+dependency situation is not trivial (for example if it involves packages from
+multiple repositories). In the former case, please report the disparity as a
+bug against the resolvers. In the latter case, use a resolver that is more
+likely to find a solution like the aptitude or aspcud resolvers. Especially the
+aspcud resolver should find a solution if and only if the dose3 solver also
+finds one. This command line option sets the \fBBD_UNINSTALLABLE_EXPLAINER\fP
+configuration variable. See
+.BR sbuild.conf (5)
+for more information.
+.SH CHROOT MODES
+The main purpose of sbuild is to build Debian packages in a clean chroot
+environment. Provisioning and managing these chroot environments is not done by
+sbuild itself but by multiple backends. The default backend (or chroot mode) is
+schroot which is an suid binary that allows regular users to enter a chroot
+environment. But sbuild also allows one to build packages in a qemu virtual
+machine, lxc, lxd or on a remote host reached by ssh using the autopkgtest
+backend. The backend can be chosen using the \f[CB]\-\-chroot\-mode\fP command
+line argument or the \fI$chroot_mode\fP configuration parameter.
+.TP
+.BR schroot
+The default and recommended chroot mode. It is also used on Debian buildd
+machines. The easiest way to set up sbuild for use with the schroot backend is
+by using sbuild\-createchroot which will also write out the necessary schroot
+configuration files in /etc. To use the chroots, the current user has to be
+added to the sbuild group, for example by running sbuild\-adduser. Updating
+these schroot backends can be done using sbuild\-update. See the respective man
+pages for more information about how to use these programs. Schroot supports
+chroots from directories, tarballs, filesystem images and block devices.
+Schroot provides ephemeral chroots either by unpacking a tarball into a
+temporary directory, by using an overlay filesystem for directory chroots or by
+using btrfs or lvm snapshots. Chroots usable by schroot are defined by
+configuration files in /etc/schroot/chroot.d/. When building for a specific
+distribution and architecture, sbuild will choose the chroot that is named (or
+has the alias) \fI$distribution\-$arch\-sbuild\fP, \fI$distribution\-sbuild\fP,
+\fI$distribution\-$arch\fP or \fI$distribution\fP, in that order of preference.
+The used chroot name can be overridden using the \-c or \-\-chroot options.
+.TP
+.BR sudo
+This chroot mode is deprecated and only provided for backwards compatibility
+and testing purposes. It operates by plainly entering the chosen chroot
+directory using "sudo chroot". Thus, this backend also does not provide
+ephemeral chroots. The sudo chroot mode searches for a symlink or directory
+located at \fI/etc/sbuild/chroot/\fP or in the current directory, prefixed with
+\fIchroot\-\fP. The expected names are resolved in the same order as for the
+schroot chroot mode and can be overridden using the \-c or \-\-chroot options.
+.TP
+.BR autopkgtest
+This is an experimental chroot mode that allows one to build packages in any
+chroot supported by autopkgtest. This allows one to build packages in lxc or
+lxd containers, a qemu virtual machine or on a remote host via ssh. Which
+autopkgtest server to use is determined via the
+\f[CB]\-\-autopkgtest\-virt\-server\fP option. Since autopkgtest (in contrast to
+schroot) does not maintain a registry of available containers or (virtual)
+machines, it is necessary to manually specify them using the
+\f[CB]\-\-autopkgtest\-virt\-server\-opts=\fP command line argument. To avoid having
+to manually type the right container or machine name every time when sbuild is
+executed, percent escapes are permitted.
+.TP
+.BR unshare
+This backend allows one to build packages inside chroots provided by arbitrary
+tarballs without superuser privileges. This allows one to set up an arbitrary
+build environment without having to become root. Building packages with schroot
+also doesn't require sudo (schroot is suid root) but setting up and updating
+chroots requires superuser permissions. The unshare backend only makes use of
+two small suid binaries (newuidmap and newgidmap). This backend allows
+arbitrary tarballs containing chroot environments to be used for package
+building. The default tarball location is in ~/.cache/sbuild/. The expected
+names are resolved in the same order as for the schroot chroot mode and can be
+overridden using the \-c or \-\-chroot options.
+
+On buster and earlier Debian releases, unprivileged userns clones
+(/proc/sys/kernel/unprivileged_userns_clone) were disabled by default by means
+of a Debian-specific kernel patch. On these systems, root is required for
+enabling them. This can also done permanently by setting
+kernel.unprivileged_userns_clone=1 in /etc/sysctl.d/.
+.SH BUILD ARTIFACTS
+Sbuild is meant to be used to build architecture specific binary packages from
+a given source package. In addition, sbuild is also able to generate
+architecture independent binary packages as well as to rebuild the original
+source package that was used as input. In summary, sbuild is able to build
+architecture specific binary packages, architecture independent binary packages
+and source packages. What ends up being built is determined by the
+configuration variables \fBBUILD_ARCH_ANY\fR, \fBBUILD_ARCH_ALL\fR and
+\fBBUILD_SOURCE\fR, respectively. See
+.BR sbuild.conf (5)
+for a detailed explanation of these configuration variables.
+.PP
+By default, during native compilation, \fBBUILD_ARCH_ANY\fR and
+\fBBUILD_ARCH_ALL\fR are set to true while \fBBUILD_SOURCE\fR is set to false.
+During cross-compilation, \fBBUILD_ARCH_ALL\fR defaults to false. This
+behaviour can be changed either by using command line options or by modifying
+the configuration variables in your \fI~/.sbuildrc\fP. The relevant command
+line options to change the values of \fBBUILD_ARCH_ANY\fR, \fBBUILD_ARCH_ALL\fR
+and \fBBUILD_SOURCE\fR are \f[CB]\-\-arch\-any/\-\-no\-arch\-any\fP,
+\f[CB]\-\-arch\-all/\-\-no\-arch\-all\fP and \f[CB]\-\-source/\-\-no\-source\fP,
+respectively.
+.PP
+The values of \fBBUILD_ARCH_ANY\fR, \fBBUILD_ARCH_ALL\fR and \fBBUILD_SOURCE\fR
+change the parameter that dpkg\-buildpackage is called with. The following table
+displays the argument passed to dpkg\-buildpackage in the last column depending
+on the configuration options in the first three columns.
+.PP
+.if t \{\
+.ft CW
+\}
+.TS
+l l l l.
+\fBBUILD_ARCH_ANY\fR \fBBUILD_ARCH_ALL\fR \fBBUILD_SOURCE\fR dpkg\-buildpackage flag
+_
+false false false invalid
+false false true \-S
+false true false \-A
+false true true \-g
+true false false \-B
+true false true \-G
+true true false \-b
+true true true no option
+.TE
+.if t \{\
+.in
+.ft P
+\}
+.SH EXTERNAL COMMANDS
+Support to run external commands during an sbuild run is provided. A set of
+external commands can be run at various stages of a build. Providing commands to
+run is done through the appropriate options given on the command line and
+through the use of the configuration files. In the configuration file, the list
+of commands to run are placed in a hash of arrays of arrays of strings
+corresponding to the commands to run.
+.PP
+There are several sets of commands. All command are run inside the chroot as
+root except for the \fIpre/post\-build\-\fP commands which are run as the user
+running sbuild outside of the chroot. To run an external command as another
+user than the root user, prefix your command with \fIrunuser \-u sbuild \-\-\fP.
+.PP
+Here is a summary of the ordering, user, internal/external to chroot for each
+command hook
+.PP
+The following table shows each command hook in the context of the tasks sbuild
+performs. The column \fIroot\fP shows whether the command is run as root (yes)
+or not (no). The column \fIchroot\fP shows whether the command is run inside
+our outside the chroot. The working directory inside the chroot is the one
+marked with \f[CB]<<BUILDDIR>>\fR inside the log. By default, this is a
+directory of the format \f[CB]/build/packagename\-XXXXXX/\f[R] where
+\f[CB]XXXXXX\fR is a random ascii string. Otherwise, it is the directory set
+by \f[CB]\-\-build\-path\fR or by the \f[CB]BUILD_PATH\fR configuration option.
+The working directory outside of the chroot is $HOME. The remaining columns
+show the percent escapes that are defined in each command. Percent escapes
+that are available in all commands (\fB%%\fR, \fB%a\fR, \fB%b\fR, \fB%s\fR) are
+omitted. The value \fImaybe\fP in the column for the \fB%d\fR and \fB%p\fR
+escapes means that the value can not relied upon to be defined in these stages.
+More specifically, these escapes will not be defined at these points if the
+user specified a source package name without a version on the command line. In
+that case, the version will only become known after the source package has been
+retrieved in the "Fetch and unpack source package" stage.
+.PP
+.if t \{\
+.ft CW
+\}
+.TS
+l l l l l l.
+command/action root chroot %c %e %d,%p
+_
+Initialise chroot session
+\f[CB]\-\-pre\-build\-commands\fP no outside no yes maybe
+Setup the chroot and variables
+\f[CB]\-\-chroot\-setup\-commands\fP yes inside no no maybe
+Update and upgrade packages
+\f[CB]\-\-chroot\-update\-failed\-commands\fP yes inside no no maybe
+Fetch and unpack source package
+Install Dependencies
+\f[CB]\-\-build\-deps\-failed\-commands\fP yes inside no no yes
+\f[CB]\-\-starting\-build\-commands\fP yes inside no no yes
+Run dpkg\-buildpackage
+\f[CB]\-\-build\-failed\-commands\fP yes inside no no yes
+\f[CB]\-\-finished\-build\-commands\fP yes inside no no yes
+Run lintian (if configured)
+\f[CB]\-\-chroot\-cleanup\-commands\fP yes inside yes no yes
+Cleanup build files and dependencies
+Run piuparts (if configured)
+Run autopkgtest (if configured)
+Close schroot session
+\f[CB]\-\-post\-build\-commands\fP no outside yes yes yes
+\f[CB]\-\-post\-build\-failed\-commands\fP no outside yes yes yes
+.TE
+.if t \{\
+.in
+.ft P
+\}
+.PP
+The commands can be given in the configuration files. They can be given as
+strings or as a list of arguments. For example, to run "foo" and "bar" with
+arguments before a build starts, specifying the "foo" command as a list and
+"bar" as a string, one could do this:
+.PP
+\f[CB]$external_commands = {\fP
+.br
+\f[CB] "pre\-build\-commands" => [\fP
+.br
+\f[CB] ['foo', 'arg1', 'arg2'],\fP
+.br
+\f[CB] 'bar arg1 arg2 arg3',\fP
+.br
+\f[CB] ],
+.br
+\f[CB]};\fP
+.PP
+Hash keys for commands to run at other stages have the same name as their
+corresponding command-line option name without the preceding '\-\-'.
+.PP
+Here's an example of how to do the same with the previous example, except using
+the \fI\-\-pre\-build\-commands\fP option.
+.PP
+\f[CB]$ sbuild \\\fP
+.br
+\f[CB] \-\-pre\-build\-commands='foo arg1 arg2' \\\fP
+.br
+\f[CB] \-\-pre\-build\-commands='bar arg1 arg2 arg3'\fP
+.PP
+Note that all these commands are executed through the shell in "/bin/sh". If
+specifying the command as a list in the config file, very few shell facilities
+are supported: no redirection, no command concatenation with ; and so on. When
+passing a string (in the config file or on the commandline), the string is
+passed as-is to the shell. So all shell facilities are available, given that
+you escape everything properly, as you would in an interactive shell.
+.PP
+Besides running external commands, sbuild can also detect the use of certain
+percent escapes given as arguments. These are used to allow for a command to be
+supplied with a certain argument depending on the escape given.
+For example, it could be possible to have an external command be given the
+path to a .changes file.
+.PP
+Here is a listing of keywords and a description of what it's converted to.
+.TP
+\fB%%\fR
+Used to escape a '\fI%\fP'.
+.TP
+\fB%d\fR, \fB%SBUILD_DSC\fR
+These escapes are converted to the absolute path to a package's .dsc file.
+.TP
+\fB%c\fR, \fB%SBUILD_CHANGES\fR
+These escapes are converted to the absolute path to a package's source .changes
+file. This is the .changes file generated by the dpkg\-buildpackage invocation
+and not the source-only .changes file that might've been produced additionally
+via \-\-source\-only\-changes. This variable is only set after the build is
+finished, i.e in \f[CB]\-\-chroot\-cleanup\-commands\fP,
+\f[CB]\-\-post\-build\-commands\fP, and
+\f[CB]\-\-post\-build\-failed\-commands\fP.
+.TP
+\fB%a\fR, \fB%SBUILD_HOST_ARCH\fR
+These escapes are converted to the debian name of the architecture the build
+is being built for (e.g amd64, armhf).
+.TP
+\fB%e\fR, \fB%SBUILD_CHROOT_EXEC\fR
+These escapes are converted to a command which can be executed on a host and
+can be given arguments which will then be executed inside the chroot. Standard
+input and output of the process started inside the chroot are connected to the
+program executed on the host. Thus, this command can also be used to copy data
+into the chroot and out of the chroot. The working directory of the process
+started inside the chroot is the root directory of the chroot. The process is
+started as the root user. This variable is not set if the external command is
+run inside the chroot. Thus this escape is only available for
+\f[CB]\-\-pre\-build\-commands\fP,
+\f[CB]\-\-post\-build\-commands\fP, and
+\f[CB]\-\-post\-build\-failed\-commands\fP.
+.TP
+\fB%b\fR, \fB%SBUILD_BUILD_DIR\fR
+These escapes are converted to the absolute path to the build directory inside
+the chroot.
+.TP
+\fB%p\fR, \fB%SBUILD_PKGBUILD_DIR\fR
+These escapes are converted to the absolute path to the package build directory
+inside the chroot.
+.TP
+\fB%s\fR, \fB%SBUILD_SHELL\fR
+This is converted to a command to spawn an interactive "bash" shell
+.TP
+\fB%SBUILD_BUILD_ARCH\fR
+This escape is converted to the Debian name of the architecture that the build
+is being run on (e.g amd64, armhf).
+.PP
+Percent escapes are only substituted when an appropriate value is defined for
+them. At other times, it is left unchanged. In practice this means that there
+are only two escapes that are not available in all external commands: \fB%c\fR
+and \fB%e\fR. For example, a .changes file is only defined at the end of a
+build, so using \fI%c\fR will only be substituted for post\-build\-commands and post\-build\-failed\-commands.
+.PP
+Here's an example of using an escape to run a program foo on a .changes file
+after a build is done.
+.PP
+\f[CB]$ sbuild \-\-post\-build\-commands \\\fP
+.br
+\f[CB] 'foo %SBUILD_CHANGES'\fP
+.PP
+And here's an example that will spawn an interactive shell to investigate the
+problem whenever the build failed:
+.PP
+\f[CB]$ sbuild \-\-build\-failed\-commands '%SBUILD_SHELL'\fP
+.PP
+The following example would copy a file from the host into the chroot:
+.PP
+\f[CB]$ sbuild \-\-pre\-build\-commands \\\fP
+.br
+\f[CB] 'cat blub.txt | %SBUILD_CHROOT_EXEC sh \-c "cat > blub.txt"'\fP
+.PP
+One final note, external commands are processed in the order they are given.
+Also, the commands given in a configuration file are processed first, then the
+commands given through the command line options.
+.SH OPTION STRING PERCENT ESCAPES
+Besides for external command strings, percent escapes can also be used in
+custom options passed to piuparts, autopkgtest and the chosen autopkgtest\-virt server.
+This is for example useful for communicating the right chroot backend to
+piuparts or autopkgtest depending on the distribution or architecture the
+source package was built for.
+.PP
+Here is a listing of keywords and a description of what it's converted to.
+.TP
+\fB%%\fR
+Used to escape a '\fI%\fP'.
+.TP
+\fB%a\fR, \fB%SBUILD_HOST_ARCH\fR
+These escapes are converted to the debian name of the architecture the build
+is being built for (e.g amd64, armhf).
+.TP
+\fB%r\fR, \fB%SBUILD_DISTRIBUTION\fR
+The distribution that the source package was built for. This is the value
+recorded in debian/changelog or the value passed via the \-\-dist option.
+Mnemonic: the \fBr\fR is the first letter in "release".
+.PP
+Here is an example that will run piuparts with the right schroot chroot:
+.PP
+\f[CB]$ sbuild \-\-run\-piuparts \\\fP
+.br
+\f[CB] \-\-piuparts\-opts="\-\-schroot=%r\-%a\-sbuild"
+.PP
+Or an example of running autopkgtest with the right schroot chroot:
+.PP
+\f[CB]$ sbuild \-\-run\-autopkgtest \-\-autopkgtest\-root\-args= \\\fP
+.br
+\f[CB] \-\-autopkgtest\-opts="\-\- schroot %r\-%a\-sbuild"
+.PP
+To achieve the same effect via the configuration file, add the following:
+.PP
+\f[CB]$autopkgtest_root_args = '';\fP
+.br
+\f[CB]$piuparts_opts = [ '\-\-schroot=%r\-%a\-sbuild' ];\fP
+.br
+\f[CB]$autopkgtest_opts = [ '\-\-', 'schroot', '%r\-%a\-sbuild' ];\fP
+.PP
+The \-\-autopkgtest\-root\-args option and the $autopkgtest_root_args configuration
+variable are set to the empty string because the default is to run autopkgtest
+with "sudo \-\-" in front of it which is not needed with the schroot autopkgtest
+backend.
+.PP
+.SH LOCAL ARCHIVE
+The apt and aptitude resolvers create a local archive for installing build
+dependencies. This is an internal implementation detail of the build
+dependency resolver, which is not user configurable, and is intended to be
+entirely transparent to the user. The local archive exists only transiently
+during the package build. It does not persist across builds, and it is only
+used to store the dummy dependency packages created for a single build.
+.PP
+The dependency resolvers do the following:
+.IP \[bu]
+Create a dummy dependency package. This contains the Build\-Depends (and
+optionally Build\-Depends\-Arch and Build\-Depends\-Indep) as Depends, and
+Build\-Conflicts (and optionally Build\-Conflicts\-Arch and Build\-Conflicts\-Indep)
+as Conflicts.
+.IP \[bu]
+Install the dummy dependency package into the local archive,
+.IP \[bu]
+Generate the \fIPackages\fP, \fISources\fP and \fIRelease\fP files.
+.IP \[bu]
+Write a \fIsources.list\fP file for the local archive into
+\fI/etc/apt/sources.list.d\fP.
+.IP \[bu]
+Inject the lists directly into \fI/var/lib/apt/lists\fP. This step is to save
+running updating all apt sources which is undesirable during a build; apt and
+aptitude do not support updating a single source at present.
+.IP \[bu]
+Regenerate the apt caches to ensure everything is in sync.
+.IP \[bu]
+Install the dummy dependency package with apt or aptitude; the dummy package is
+pulled from the local apt archive, while all its dependencies are pulled from
+the regular configured apt sources.
+.PP
+At the end of the build, the local archive is removed, along with the rest of
+the build tree.
+.SH EXAMPLES
+Before you use sbuild for the first time, you have to do some setup depending
+on the chroot mode you are using. The default chroot mode is schroot. To use
+sbuild with the schroot backend, you need to add your user to the sbuild group
+and create a schroot chroot. The latter can be accomplished by using
+sbuild\-createchroot(8). After this one time setup,
+you can now use sbuild to build packages like this:
+.PP
+\f[CR]% \f[CB]sbuild \-d unstable bash\fP\fP
+.PP
+Or on a .dsc:
+.PP
+\f[CR]% \f[CB]sbuild \-d unstable bash.dsc\fP\fP
+.PP
+Or from within an unpacked source package (the \-d parameter is not necessary
+here because the distribution is inferred from debian/changelog):
+.PP
+\f[CR]% \f[CB]sbuild\fP\fP
+.SH ENVIRONMENT VARIABLES
+The following environment variables are used by \fBsbuild\fR:
+.IP "HOME"
+The home directory of the user.
+.IP "LOGNAME"
+Used in lockfiles.
+.IP "SBUILD_CONFIG"
+Path to an additional configuration file on top of the system wide and user
+specific ones.
+.SH FILES
+.TP
+.I /etc/sbuild/sbuild.conf
+Configuration, maintained by the system administrator. This may be used to
+override the defaults.
+.TP
+.I /etc/sbuild/chroot
+Directory containing symbolic links to chroots. This is only used for sudo
+chroot access; schroot access uses the schroot chroot configuration.
+.TP
+.I ~/.sbuildrc
+User-specific configuration. A custom path to a configuration file can also be
+specified through setting the \fBSBUILD_CONFIG\fP environment variable to the
+path of an additional configuration file.
+.TP
+.I /var/lib/sbuild
+Build trees, archive signing keys, build statistics and lock files.
+.SH AUTHORS
+Roman Hodek <Roman.Hodek@informatik.uni\-erlangen.de>.
+.PP
+\fBsbuild\fR is based on debbuild, written by James Troup
+<james@nocrew.org> and has been modified by
+.nf
+Ben Collins <bcollins@debian.org>,
+Ryan Murray <rmurray@debian.org>,
+Francesco Paolo Lovergine <frankie@debian.org>,
+Michael Banck <mbanck@debian.org>, and
+Roger Leigh <rleigh@debian.org>
+.fi
+.SH COPYRIGHT
+.nf
+Copyright \[co] 1998-2000 Roman Hodek <roman\@hodek.net>
+Copyright \[co] 1998-1999 James Troup <troup\@debian.org>
+Copyright \[co] 2003-2006 Ryan Murray <rmurray\@debian.org>
+Copyright \[co] 2001-2003 Rick Younie <younie\@debian.org>
+Copyright \[co] 2003-2004 Francesco Paolo Lovergine <frankie\@debian.org>
+Copyright \[co] 2005 Michael Banck <mbanck\@debian.org>
+Copyright \[co] 2005-2009 Roger Leigh <rleigh\@debian.org>
+.fi
+.SH "SEE ALSO"
+.BR sbuild.conf (5),
+.BR sbuild\-abort (1),
+.BR sbuild\-adduser (8),
+.BR sbuild\-apt (1),
+.BR sbuild\-checkpackages (1),
+.BR sbuild\-createchroot (8),
+.BR sbuild\-distupgrade (1),
+.BR sbuild\-hold (1),
+.BR sbuild\-setup (7).
+.BR sbuild\-shell (1),
+.BR sbuild\-unhold (1),
+.BR sbuild\-update (1),
+.BR sbuild\-upgrade (1),
+.BR schroot (1),
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End:
diff --git a/man/sbuild.conf.5.in b/man/sbuild.conf.5.in
new file mode 100644
index 0000000..03b7d80
--- /dev/null
+++ b/man/sbuild.conf.5.in
@@ -0,0 +1,74 @@
+.\" Copyright © 2011 Roger Leigh <rleigh@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.CONF 5 "\*[RELEASE_DATE]" "Version \*[VERSION]" "Debian sbuild"
+.SH NAME
+sbuild.conf \- configuration file for sbuild
+.SH DESCRIPTION
+\fBsbuild.conf\fR is a Perl script which is sourced by sbuild to permit
+configuration. It is run in a sandbox and restricted to setting a small number
+of variables, detailed below, which may be set to configure the behaviour of
+sbuild. Each variable has an internal name, shown in all caps, and a perl
+variable showing the default setting. Note that the internal name is not
+accessible within sbuild.conf; only the variable may be assigned. Also note
+that some of the defaults are set to be unique for each build, and so some of
+the defaults shown here are unique to the user and system used to build sbuild,
+and will be different for your system.
+.PP
+While sbuild permits many aspects of its behaviour to be configured, this
+should not normally be required. The defaults should be adequate for most
+uses, and should only be changed if you are doing something more advanced, or
+have specialist requirements.
+.SH CONFIGURATION
+.so sbuild.conf.man
+.SH FILES
+.TP
+.I /etc/sbuild/sbuild.conf
+Configuration, maintained by the system administrator. This may be used to
+override the defaults.
+.TP
+.I ~/.sbuildrc
+User-specific configuration.
+.SH AUTHORS
+Roman Hodek <Roman.Hodek@informatik.uni\-erlangen.de>.
+.PP
+\fBsbuild\fR is based on debbuild, written by James Troup
+<james@nocrew.org> and has been modified by
+.nf
+Ben Collins <bcollins@debian.org>,
+Ryan Murray <rmurray@debian.org>,
+Francesco Paolo Lovergine <frankie@debian.org>,
+Michael Banck <mbanck@debian.org>, and
+Roger Leigh <rleigh@debian.org>
+.fi
+.SH COPYRIGHT
+.nf
+Copyright \[co] 1998-2000 Roman Hodek <roman\@hodek.net>
+Copyright \[co] 1998-1999 James Troup <troup\@debian.org>
+Copyright \[co] 2003-2006 Ryan Murray <rmurray\@debian.org>
+Copyright \[co] 2001-2003 Rick Younie <younie\@debian.org>
+Copyright \[co] 2003-2004 Francesco Paolo Lovergine <frankie\@debian.org>
+Copyright \[co] 2005 Michael Banck <mbanck\@debian.org>
+Copyright \[co] 2005-2009 Roger Leigh <rleigh\@debian.org>
+.fi
+.SH "SEE ALSO"
+.BR sbuild (1).
+.\"#
+.\"# The following sets edit modes for GNU EMACS
+.\"# Local Variables:
+.\"# mode:nroff
+.\"# fill-column:79
+.\"# End: