In case anybody else is interested in doing this, I made the following
hackish patch and it seems to work.  It requires schroot 1.7.0 or
later; I used 1.7.2-3 from experimental, recompiled to run on jessie.

--- sbuild-0.65.2.orig/lib/Sbuild/ChrootSchroot.pm
+++ sbuild-0.65.2/lib/Sbuild/ChrootSchroot.pm
@@ -125,6 +125,9 @@ sub get_command_internal {
                '-c', $self->get('Session ID'),
                '--run-session',
                @{$self->get_conf('SCHROOT_OPTIONS')},
+               '-o', ($user eq 'root'
+                      ? 'unshare.net=false'
+                      : 'unshare.net=true'),
                '-u', "$user", '-p', '--',
                @$command);


For this to work, you will also need to add a line to the schroot
config file (e.g. /etc/schroot/chroot.d/jessie-amd64-sbuild-xyzzy):

user-modifiable-keys=unshare.net

Reply via email to