Hi Fred,

* Picca Frédéric-Emmanuel <pi...@debian.org> [2025-05-21 15:46]:
Hello, I am trying to build the nbclassic package on a computer which s behind 
a proxy.
I need to setup apt and http_proxy in order to have something working.

Here the result of sbuild the first time I try to build the package

I: No tarballs found in /home/experiences/instrumentation/picca/.cache/sbuild
I: Creating new chroot tarball:
mmdebstrap --variant=buildd --arch=amd64 --skip=output/mknod --format=tar 
unstable 
/home/experiences/instrumentation/picca/.cache/sbuild/unstable-amd64.tar
I: automatically chosen mode: unshare
I: chroot architecture amd64 is equal to the host's architecture
I: finding correct signed-by value...
I: using /tmp/mmdebstrap.IJmh3VL_GS as tempdir
I: skipping output/mknod as requested for ./dev/console
I: skipping output/mknod as requested for ./dev/full
I: skipping output/mknod as requested for ./dev/null
I: skipping output/mknod as requested for ./dev/ptmx
I: skipping output/mknod as requested for ./dev/random
I: skipping output/mknod as requested for ./dev/tty
I: skipping output/mknod as requested for ./dev/urandom
I: skipping output/mknod as requested for ./dev/zero
I: running apt-get update...
I: downloading packages with apt...
I: extracting archives...
I: installing essential packages...
I: installing remaining packages inside the chroot...
I: cleaning package lists and apt cache...
I: creating tarball...
I: done
I: removing tempdir /tmp/mmdebstrap.IJmh3VL_GS...
I: success in 20.6569 seconds
I: Placed new chroot tarball at 
/home/experiences/instrumentation/picca/.cache/sbuild/unstable-amd64.tar
I: Unpacking 
/home/experiences/instrumentation/picca/.cache/sbuild/unstable-amd64.tar to 
/tmp/tmp.sbuild.k4qe2VnZZU...
I: Setting up the chroot...
I: Creating chroot session...
I: Setting up log color...
I: Setting up apt archive...

+------------------------------------------------------------------------------+
| Update chroot                                Wed, 21 May 2025 13:19:03 +0000 |
+------------------------------------------------------------------------------+

Ign:1 http://deb.debian.org/debian unstable InRelease
Ign:1 http://deb.debian.org/debian unstable InRelease
Ign:1 http://deb.debian.org/debian unstable InRelease
Err:1 http://deb.debian.org/debian unstable InRelease
 Could not connect to deb.debian.org:80 (146.75.74.132), connection timed out
 Unable to connect to deb.debian.org:80:
Reading package lists...
W: Failed to fetch http://deb.debian.org/debian/dists/unstable/InRelease  
Unable to connect to deb.debian.org:80:
W: Some index files failed to download. They have been ignored, or old ones 
used instead.
Reading package lists...
Building dependency tree...
Reading state information...
Calculating upgrade...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


so it seems that at first mmdebstrap use the apt proxy in order to setup the 
initial chroot

This is interesting, I don't see mmdebstrap using http_proxy, maybe it is apt directly.

It seems that this initial chroot doesn not get the proxy propagated into.

So when sbuild try to upgrade the unshare chroot it does not use the proxy, -> 
failure of the build

It would be great if sbuild could detect the proxy and add it to the unshare 
chroot.


it ould be great also if the http_proxy could be added in the chroot in order 
to have an autopkgtest network working environment.

As a workaround for now you could set the proxy explicitly by adding this to your sbuild config:

push @{$unshare_mmdebstrap_extra_args}, ("*", ['--aptopt=Acquire::http { Proxy 
"http://127.0.0.1:3142";; }']);

Cheers Jochen

Attachment: signature.asc
Description: PGP signature

Reply via email to