On 2025-12-10 01:01, Johannes Schauer Marin Rodrigues wrote:
> Quoting Christian Kastner (2025-12-10 00:37:50)
>> A cursory examination of the URIs all have  "ubuntu" somewhere in their
>> name, so the check would return true
> 
> Not true. There is https://mirror.famaserver.com/archive/ or
> https://mirror.maeen.sa/apt-mirror/ There are also "mis-spelling" of ubuntu
> like rsync://mirror.flokinet.net/ubntu/ and there are spellings with the first
> letter upper-case http://mirrors.arpnetworks.com/Ubuntu/

Hence "cursory" :)

>> Though not impossible, I think it very unlikely that there will be many false
>> positives, ie: a non-Ubuntu URI would containing "ubuntu".
> 
> The test has both false positives and false negatives. It's a bad test.

Sure, it's not perfect, but it's better than not working at all. The
heuristic seemed good enough at first glance, and autopkgtest-build-qemu
seems to have dealt well with it over time, hence why I proposed simply
carrying over the code.

> There is also another option: convince Debian kernel maintainers to add
> linux-image-virtual to their list of meta-packages and let it depend on the
> right meta-package depending on the architecture. Then both
> autopkgtest-virt-qemu as well as mmdebstrap-autopkgtest-build-qemu could
> simplify their code and just depend on linux-image-virtual.

I guess this could be raised with the Kernel Team, though I suspect it
might take a bit of convincing.

If an exact solution is the goal, one approach might be to rely on
RELEASE and see if debootstrap's /usr/share/debootstrap/scripts can be
used to map to Ubuntu.

Best,
Christian

Reply via email to