Package: debootstrap Version: 1.0.64 Severity: wishlist Dear Maintainer,
attached patch is pretty hurd-specific: - disconnect (orphan) TARGET/proc passive translator and start bind-mounting /proc along with /servers and /dev. - add "nobindmount" variant to create chroots without bind-mounting any filesystem. Main use case is chroot for subhurds [0]. [0] https://www.gnu.org/software/hurd/hurd/subhurd.html Thanks for considering. -- G..e
diff --git a/debootstrap b/debootstrap index fef1ab5..9dced1e 100755 --- a/debootstrap +++ b/debootstrap @@ -100,7 +100,7 @@ usage() archive --variant=X use variant X of the bootstrap scripts (currently supported variants: buildd, fakechroot, - scratchbox, minbase) + scratchbox, minbase, nobindmount) --keyring=K check Release files against keyring K --no-check-gpg avoid checking Release file signatures --no-resolve-deps don't try to resolve dependencies automatically diff --git a/debootstrap.8 b/debootstrap.8 index 2cf44ca..b448089 100644 --- a/debootstrap.8 +++ b/debootstrap.8 @@ -71,13 +71,14 @@ or apt, and that it is far better to specify the entire base system than rely on this option. With this option set, this behaviour is disabled. .IP -.IP "\fB\-\-variant=minbase|buildd|fakechroot|scratchbox\fP" +.IP "\fB\-\-variant=minbase|buildd|fakechroot|scratchbox|nobindmount\fP" Name of the bootstrap script variant to use. Currently, the variants supported are minbase, which only includes essential packages and apt; buildd, which installs the build-essential packages into .IR TARGET ; -and fakechroot, which installs the packages without root privileges. +nobindmount, which doesn't bind-mount any filesystem; and fakechroot, +which installs the packages without root privileges. Finally there is variant scratchbox, which is for creating targets for scratchbox usage. The default, with no \fB\-\-variant=X\fP argument, is to create a base diff --git a/functions b/functions index 0d48390..07147c0 100644 --- a/functions +++ b/functions @@ -1064,10 +1064,13 @@ setup_devices () { setup_devices_hurd () { # Use the setup-translators of the hurd package, and firmlink - # $TARGET/{dev,servers} to the system ones. + # $TARGET/{dev,servers,proc} to the system ones. in_target /usr/lib/hurd/setup-translators -k - settrans -a $TARGET/dev /hurd/firmlink /dev - settrans -a $TARGET/servers /hurd/firmlink /servers + if ! doing_variant nobindmount; then + settrans -a $TARGET/dev /hurd/firmlink /dev + settrans -a $TARGET/servers /hurd/firmlink /servers + settrans -oa $TARGET/proc /hurd/firmlink /proc + fi } setup_devices_fakechroot () { diff --git a/scripts/sid b/scripts/sid index bf3404f..34089f7 100644 --- a/scripts/sid +++ b/scripts/sid @@ -1,7 +1,7 @@ mirror_style release download_style apt finddebs_style from-indices -variants - buildd fakechroot minbase scratchbox +variants - buildd fakechroot minbase scratchbox nobindmount keyring /usr/share/keyrings/debian-archive-keyring.gpg if doing_variant fakechroot; then