SBUILD-CREATECHROOT(8) - Linux man page online | Administration and privileged commands
Create sbuild chroot.
SBUILD-CREATECHROOT(8) Debian sbuild SBUILD-CREATECHROOT(8)
Version 0.75.0 21 Mar 2018 SBUILD-CREATECHROOT(8)
NAMEsbuild-createchroot - create sbuild chroot
SYNOPSISsbuild-createchroot [-h|--help | -V|--version] [--verbose] [--arch=arch] [--chroot-suf‐ fix=suffix] [--foreign] [--resolve-deps | --no-resolve-deps] [--keep-debootstrap-dir] [--debootstrap=debootstrap] [--include=package1[,package2,[packagen]]] [--exclude=pack‐ age1[,package2,[packagen]]] [--components=component1[,component2,[componentn]]] [--keyring=keyring-file] [--setup-only] [--make-sbuild-tarball=file] [--keep-sbuild-chroot-dir] [--no-deb-src] [--alias=alias] [--extra-repository=spec] [--command-prefix=prefix] SUITE TARGET-DIRECTORY DEBIAN-MIRROR-URI [SCRIPT] buildd-create-chroot USER SUITE TARGET-DIRECTORY DEBIAN-MIRROR-URI
DESCRIPTIONsbuild-createchroot runs debootstrap(1) to create a chroot suitable for building packages with sbuild. Note that while debootstrap may be used directly, sbuild-createchroot per‐ forms additional setup tasks such as adding additional packages and configuring various files in the chroot. Invoking sbuild-createchroot is functionally equivalent to running debootstrap --variant=buildd --include=fakeroot,build-essential, then editing /etc/apt/sources.list and /etc/hosts by hand. The newly-created chroot is set up to work with schroot(1) by creating a chroot definition file under /etc/schroot/chroot.d. This should be edited to finish the chroot configura‐ tion after sbuild-createchroot has completed. buildd-create-chroot, like sbuild-createchroot, runs debootstrap(1) to create a chroot for package building. However, this creates a chroot specifically for buildd(1) with an addi‐ tional mandatory option to specify a user who will be granted sudo access inside the chroot. This script mainly differs in its additional customisation of /etc/apt/sources.list 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 offi‐ cial Debian build daemon, sbuild-createchroot should be used instead. The extra function‐ ality will be merged into sbuild-createchroot in the future.
OPTIONSActions -h, --help Display this manual. -V, --version Print version information. General options -v, --verbose Print all messages. Debootstrap options Note that debootstrap(1) is the canonical reference for the meaning of the options; they are passed directly to debootstrap. --arch=arch Set the target architecture. This may be used if dpkg is not already installed. See also --foreign, below. --chroot-suffix=suffix Add a custom suffix to the chroot name. Defaults to '-sbuild'. --chroot-prefix=prefix Add a custom prefix to the chroot name. Defaults to SUITE. This is useful to cre‐ ate variants of a base suite like jessie-backports to which the backports archive can be manually added after the base chroot was created using sbuild-shell. This way, a normal jessie chroot and a jessie-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. --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 /debootstrap/debootstrap installed in TARGET-DIRECTORY to complete the installation. --resolve-deps Automatically resolve missing dependencies. This is the default. --no-resolve-deps Do not automatically resolve missing dependencies. --keep-debootstrap-dir Don't delete the /debootstrap directory in TARGET-DIRECTORY after completing the installation. --debootstrap=debootstrap Define a custom debootstrap variant. Defaults to 'debootstrap'. --include=package1[,package2,[packagen]] Comma separated list of packages which will be added to the list of packages to download and extract. --exclude=package1[,package2,[packagen]] 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. --components=component1[,component2,[componentn]] Comma separated list of archive components to use (e.g. ‘main’, ‘contrib’, ‘non- free’). Defaults to ‘main’. --keyring=keyring-file Download signatures for retrieved Release files and check them against keyring- file. By default /etc/apt/trusted.gpg is used. Set to an empty string to disable signature checking. SUITE The distribution to bootstrap (e.g. ‘sarge’, ‘etch’, ‘lenny’, ‘sid’). A complete list may be found in /usr/share/debootstrap/scripts. TARGET-DIRECTORY The directory to create the chroot in. The directory will be created if it does not already exist. DEBIAN-MIRROR-URI An http://, file:///, or ssh:/// URI pointing to a suitable archive mirror. SCRIPT debootstrap script to run. Not typically required. sbuild-createchroot behaviour --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. --make-sbuild-tarball=file Create a bootstrapped file type chroot ready for use with sbuild and save it as file. The compression format used for the tarball is dependent on the file exten‐ sion used in file. See the TARBALL FILE section for more details. --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. --no-deb-src Don't add a deb-src line to the /etc/apt/sources.list file in the TARGET-DIRECTORY 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 contin‐ ually updated. --alias=alias 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 UNRELEASED for packages that the maintainer is currently working on. For Debian it thus makes sense to add UNRELEASED as an alias for a Debian unstable chroot. See the EXAMPLES section for how to use this option in practice. --extra-repository=spec Add a repository to the list of apt sources. The repository specification is a line suitable for an apt sources.list(5) file. For instance, you might use --extra-repository="deb http://httpredir.debian.org/debian experimental main" 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 EXAM‐ PLES section for how to combine this option with --chroot-prefix and --alias. --command-prefix=prefix Set the chroot command-prefix option as specified. A common use-case is to specify eatmydata, thereby preventing all commands executed in the chroot from syncing data to disk. See schroot.conf(5) for more details.
TARBALL FILEWhen creating an sbuild tarball file, the compression format used to generate the tarball depends on the entension used in file. Here is a listing of the extensions that will be detected and what format the tarball will be generated as. *.tar Generates an uncompressed tarball. *.tar.gz|*.tgz Generates a compressed tarball using gzip. *.tar.bz2|*.tbz Generates a compressed tarball using bzip2. *.tar.lz|*.tlz Generates a compressed tarball using lzip. *.tar.xz|*.txz Generates a compressed tarball using xz. If no extension is specified, sbuild-createchroot will rename file to file.tar.gz and gen‐ erate file.tar.gz as a compressed tarball using gzip.
EXAMPLESTo create a bootstrapped file type sid (unstable) chroot ready for use with sbuild and saved in /var/cache/sbuild/sbuild.tar.gz using the httpredir.debian.org Debian http mirror redirector service and using a temporary directory as the target: % sudo sbuild-createchroot \ --make-sbuild-tarball=/srv/chroot/unstable-amd64.tar.gz \ sid `mktemp -d` \ http://httpredir.debian.org/debian↵ To create a plain type sid (unstable) chroot in /srv/chroot/unstable using the httpredir.debian.org Debian http mirror redirector service and with aliases for unstable and UNRELEASED: % sudo sbuild-createchroot sid /srv/chroot/unstable-amd64 \ --alias=unstable --alias=UNRELEASED \ http://httpredir.debian.org/debian↵ To create a chroot to build for Jessie backports: % sudo sbuild-createchroot \ --extra-repository="deb http://httpredir.debian.org/debian jessie-backports main" \ --chroot-prefix=jessie-backports \ jessie /srv/chroot/jessie-backports-amd64 \ http://httpredir.debian.org/debian↵ To create a chroot to build for experimental using a custom chroot prefix: % sudo sbuild-createchroot \ --extra-repository="deb http://httpredir.debian.org/debian experimental main" \ --chroot-prefix=experimental \ unstable /srv/chroot/unstable-experimental-amd64 \ http://httpredir.debian.org/debian↵
HISTORYsbuild-createchroot was previously known as buildd.chroot. buildd.chroot performed exact‐ ly the same tasks, but additionally created a number of directories in the chroot for use by sbuild. This is now done by schroot(1).
AUTHORSRoger Leigh. Francesco P. Lovergine. Andres Mejia.
COPYRIGHTCopyright © 2004 Francesco P. Lovergine <@debian.org>. Copyright © 2007-2008 Roger Leigh <@debian.org>. Copyright © 2010 Andres Mejia <@gmail.com>.
SEE ALSOdebootstrap(8), schroot(1), sbuild(1), sbuild-setup(7).
|This manual||Reference||Other manuals|
|sbuild-createchroot(8)||referred by||sbuild(1) | sbuild-setup(7)|
|refer to||buildd(1) | debootstrap(8) | sbuild(1) | sbuild-setup(7) | schroot(1) | schroot.conf(5) | sources.list(5)|