Skip to content
Verified Commit f21d63cc authored by Johannes Schauer Marin Rodrigues's avatar Johannes Schauer Marin Rodrigues 🌈
Browse files

Add a new chroot mode: unshare

Builds packages using an arbitrary chroot tarball without needing
superuser privileges. The schroot backend also doesn't require sudo when
building (schroot is suid root) but it needs superuser privileges for
setting up or changing chroots. The unshare backend makes use of Linux
user namespaces which allow using chroot() and mount() without being
root. The only suid root binaries the unshare backend uses are newuidmap
and newgidmap.

Debian carries a custom kernel patch that disallows user namespaces by
default. For the unshare backend to work, they have to be enabled:

    $ sudo sysctl -w kernel.unprivileged_userns_clone=1

The unshare backend allows building packages in arbitrary chroots on
systems that have user namespaces enabled but where the user does not
have sudo rights otherwise.

The default tarball location is ~/.local/share/sbuild/%r-%a.tar.gz
parent 764facdd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment