#1117393 FTBFS when apt is configured with *.sources instead of *.list

#1117393#5
Date:
2025-10-05 17:34:22 UTC
From:
To:
Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

https://people.debian.org/~sanvila/build-logs/202510/

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:debian-installer-netboot-images, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
 debian/rules clean
dh clean
   debian/rules override_dh_clean
make[1]: Entering directory '/<<PKGBUILDDIR>>'
dh_clean
rm -f debian/debian-installer-*.lintian-overrides
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
 debian/rules binary
dh binary
   dh_update_autotools_config
   dh_autoreconf
   create-stamp debian/debhelper-build-stamp
   dh_prep
   debian/rules override_dh_auto_install
make[1]: Entering directory '/<<PKGBUILDDIR>>'
if ! ./get-images.sh amd64; then \
	if [ -n "trixie" ]; then \
		echo; echo; echo; \
		echo "Version not found in trixie-proposed-updates, falling back to trixie"; \
		echo; echo; echo; \
		sleep 5; \
		DISTRIBUTION=trixie ./get-images.sh amd64; \
	else \
		echo "Version not found in trixie-proposed-updates, no fallback defined"; \
		exit 1; \
	fi \
fi
Prepended http:// to '/dists/trixie-proposed-updates/Release.gpg'
http:///dists/trixie-proposed-updates/Release.gpg: Invalid host name.



Version not found in trixie-proposed-updates, falling back to trixie



Prepended http:// to '/dists/trixie/Release.gpg'
http:///dists/trixie/Release.gpg: Invalid host name.
make[1]: *** [debian/rules:19: get-images-amd64] Error 1
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
make: *** [debian/rules:14: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2
--------------------------------------------------------------------------------

#1117393#10
Date:
2025-10-05 19:05:32 UTC
From:
To:
Hi,

Santiago Vila <sanvila@debian.org> (2025-10-05):

I can't reproduce this locally in an up-to-date sid devel schroot, so I
suppose this isn't due to some recent changes in apt.

The log suggests the apt conf is the usual deb.debian.org, but maybe
that configuration goes away after build-depends are installed?

I suppose we could have some sanity check in get-mirror.sh to have a
more straightforward exit (instead of even trying http:///)… but this is
likely just another instance of “debian-installer{,-netboot-images}
require network access during the build”?


Cheers,

#1117393#15
Date:
2025-10-05 20:02:15 UTC
From:
To:
full build log which I provided initially was wrong, as it was made
using the unshare backend, and it's already known that this package
needs network access.

(You can tell that I'm using the unshare backend if you see
"Distribution: sid-unshare" in the build log).


But now I've tried again using the file backend (which allows network
access) and I get the same error. I've put the right build log in the
same directory as above, replacing the wrong one:

https://people.debian.org/~sanvila/build-logs/202510/

(and this time you will see "Distribution: sid-file", which means
I was using the traditional file-based backend).

So, yes, I believe there is a real problem here and it's not yet
another case of "needs network access to build".

Thanks.

#1117393#20
Date:
2025-10-05 21:04:34 UTC
From:
To:
Santiago Vila <sanvila@debian.org> (2025-10-05):

Thanks for arranging access, which lets me reproduce this there.

get-mirror.sh looks into `apt-config dump` to get some variables, then
digs into the “main” sources.list and the possible extra sources.d
snippets, based on the APT_DIR_ETC, APT_SOURCELIST, and APT_SOURCEPARTS
variables set according to the apt configuration.

On this specific system, we have a debian.sources snippet that contains:

    Types: deb deb-src
    URIs: http://deb.debian.org/debian
    Suites: sid
    Components: main contrib non-free non-free-firmware
    Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

and also a sbuild-build-depends-archive.list snippet that contains:

    deb [trusted=yes] copy:///build/reproducible-path/resolver-sOG2tA/apt_archive ./
    deb-src [trusted=yes] copy:///build/reproducible-path/resolver-sOG2tA/apt_archive ./

so we need to teach get-mirror.sh about .sources files.

At the very least, we should change this to avoid feeding .sources files
to something that expects .list ones:

    -MIRRORS="$(get_mirrors /$APT_DIR_ETC/$APT_SOURCELIST /$APT_DIR_ETC/$APT_SOURCEPARTS/*)"
    +MIRRORS="$(get_mirrors /$APT_DIR_ETC/$APT_SOURCELIST /$APT_DIR_ETC/$APT_SOURCEPARTS/*.list)"


Looking briefly at `apt-config dump` and sources.list(5), there doesn't
seem to be anything specific to .sources files in the configuration, so
using the three existing variables as they are should be fine enough,
except:

 - one pass for the traditional format, main and snippets (*.list, see
   above)
 - one pass for the new format, snippets only (*.sources this time).


Thanks for the report (and again for the access), Santiago!

Feel free to scratch (my access to) the VM, commenting out an existing
sources.list and deploying a sources.list.d/santiago.sources (copied
from the first quoted section above) is enough to reproduce the problem.


Cheers,

#1117393#27
Date:
2025-11-17 18:14:45 UTC
From:
To:
tags 1117393 trixie
thanks

Hi.

I did a rebuild of trixie (13.2) recently and I found this bug again.

I'm adding the above tag because it helps me to find the bug and not
report it again (when using UDD).

[ I wonder if there will be any chance to fix this in trixie for some
future point release of trixie, as I see that apt supports
the new 822 format since a long time ]

Thanks.

#1117393#34
Date:
2025-11-17 18:48:26 UTC
From:
To:
Santiago Vila <sanvila@debian.org> (2025-11-17):

Once a fix is available, sure, it can be considered for inclusion via spu.


Cheers,