• Bug#1106224: sbuild does not provision a working chroot when there is a

    From =?utf-8?q?Picca_Fr=C3=A9d=C3=A9ric-@21:1/5 to All on Wed May 21 16:00:01 2025
    Package: sbuild
    Version: 0.89.2
    Severity: normal
    X-Debbugs-Cc: picca@debian.org

    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

    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.

    cheers

    Fred



    -- System Information:
    Debian Release: 13.0
    APT prefers unstable
    APT policy: (500, 'unstable'), (1, 'experimental')
    Architecture: amd64 (x86_64)

    Kernel: Linux 6.12.29-amd64 (SMP w/4 CPU threads; PREEMPT)
    Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
    Shell: /bin/sh linked to /usr/bin/dash
    Init: systemd (via /run/systemd/system)
    LSM: AppArmor: enabled

    Versions of packages sbuild depends on:
    ii adduser 3.152
    ii libsbuild-perl 0.89.2
    ii perl 5.40.1-3

    Versions of packages sbuild recommends:
    ii autopkgtest 5.49
    ii debootstrap 1.0.141
    ii iproute2 6.14.0-3
    ii mmdebstrap 1.5.7-1
    ii schroot 1.6.13-7
    ii uidmap 1:4.17.4-2

    Versions of packages sbuild suggests:
    ii e2fsprogs 1.47.2-1+b1
    ii kmod 34.2-2
    ii wget 1.25.0-2

    -- no debconf information

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jochen Sprickerhof@21:1/5 to All on Wed May 21 16:40:01 2025
    Hi Fred,

    * Picca Frédéric-Emmanuel <picca@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

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEc7KZy9TurdzAF+h6W//cwljmlDMFAmgt4wYACgkQW//cwljm lDMl1xAAlcZXRzbgnpd9e4TCFrwPGPr0TraT0SUe8rw2J7dP1oEEcJvR9D0L+sYt 1L+EOxnBh0SPJsyMEKMSPKKRQi71yYloEpXIGEVeWP3Nzf2M6XK/do5s/FWMd4dq 3BT0qdVGA56yutxOcFKzngGYbiM7j+FODQkgCEG397PAYw4PNMV0qJWo3G6PWllK H0RXJkEEV0ti6NdL67B+K1g+OicoPd51cuqShCzuyV7wxLsY0PYdwR5WB2RXr9iK 3Wg5F/vhzXt8/wUUL4JqRAQOmkgSU7MgVenRbU6rPjHrmkbDrhQkXrQ2vhRQLWgj Aj0BmkT0qC2lyCP/Y1C0NFHAQ065g7TDBCnQJAnQcW/UQD0pAWFoVWwVk7ts2oMb YDUHpVtTQRiqwUZekEGZuWKfO+1uwsi4uIyZEWlIwMU8Red/ynIpW14bwgp2mbOh mWypZNP8AB/8xv98e52z09TJIDfleS60yQpJbYkniPz/gHAymBNepRNIH0GC8W0o OBk/4UXs+0Z3OVnDiKHW/w4rbSy03od6SCT7WGCfCXswfmfKhfGSN1nmVyEMceos pxPWxIsgKy0gGg5hxwGUpsBgjRXqSFY2FcH8NR9CxJJHSXrQJ2ftXWx5/tfZ2OLK 1zmzLr4IStpcNdSLIP914RfqgmaT8fPGHX5fIbRCMH/WBPzjEuo=
    =GdBO
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From picca@21:1/5 to All on Wed May 21 16:50:01 2025
    Le 2025-05-21 16:28, Jochen Sprickerhof a écrit :
    Hi Fred,

    Hello

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

    It seems to me that mmdebstrap generate the chroot by using the system
    apt which is well configure.

    then when it enter into the chroot these is no more configuration of apt
    inside the chroot.

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

    Indeed if I add this it works :).

    It would be great if out of the box sbuild could deal with proxies.

    One less step to do before buildding packages.

    nevertheless thanks for all your work on sbuild

    It is better and better with time.

    Fred

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)