tonistiigi / xx

Dockerfile cross-compilation helpers
MIT License
338 stars 29 forks source link

debian/ubuntu: fix apt sources list location #132

Closed crazy-max closed 5 months ago

crazy-max commented 6 months ago

related to https://github.com/moby/moby/pull/44735#issuecomment-1866355689

needs #133

Since Ubuntu Noble 24.04 and Debian Bookworm, /etc/apt/sources.list has moved to /etc/apt/sources.list.d/ubuntu.sources and /etc/apt/sources.list.d/debian.sources respectively.

They also use the new deb822 format: https://repolib.readthedocs.io/en/latest/deb822-format.html

docker run --rm -it debian:12 cat /etc/apt/sources.list.d/debian.sources
Types: deb
# http://snapshot.debian.org/archive/debian/20231218T000000Z
URIs: http://deb.debian.org/debian
Suites: bookworm bookworm-updates
Components: main
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg

Types: deb
# http://snapshot.debian.org/archive/debian-security/20231218T000000Z
URIs: http://deb.debian.org/debian-security
Suites: bookworm-security
Components: main
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
crazy-max commented 5 months ago

What's the intention behind removing the mirrors?

I'm not sure at which point it was necessary? Maybe there was some issues with main ones before? We removed it also in moby recently as it doesn't seem meaningful: https://github.com/moby/moby/pull/46884

Also would need to handle apt source file correctly like https://github.com/tonistiigi/xx/commit/7634789b869e980f3fe85ea8de507553a4c5d638#diff-f7c91877446336ef59ebfaacb472e50e4e40bbe54938f232b0fd54617eb6e7dcR35-R43 with proper domain handling to match debian or ubuntu.

Let me know if you want it back.