Skip to content

debian: fix debian-security/debug url when using a mirror - #4466

Merged
behrmann merged 1 commit into
systemd:mainfrom
yadutaf:fix-debian-debug-mirror
Sep 25, 2026
Merged

behrmann merged 1 commit into
systemd:mainfrom
yadutaf:fix-debian-debug-mirror

Conversation

@yadutaf

@yadutaf yadutaf commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

debian-security and debian-debug are typically not mirrored, even though they sometimes are. Up to the introduction of the Snapshot= setting in #3802, the URL for such repositories was hard-coded. It was then moved to the selected mirror which no longer matches and the comment and may fail depending on the selected mirror.

This commit reverts to the hard-coded variant to fix the build of Debian images when using an explicit mirror but no snapshots.

`debian-security` and `debian-debug` are typically not mirrored, even
though they sometimes are. Up to the introduction of the `Snapshot=`
setting in systemd#3802, the URL for such repositories was hard-coded. It was
then moved to the selected mirror which no longer matches and the
comment and may fail depending on the selected mirror.

This commit reverts to the hard-coded variant to fix the build of Debian
images when using an explicit mirror but no snapshots.

Signed-off-by: Jean-Tiare Le Bigot <jean-tiare.lebigot@exoscale.ch>
@behrmann

Copy link
Copy Markdown
Contributor

Sorry, if this is coming on standoffish, but this is weird behaviour. First time contributor and then approval by three people who I don't remember ever seeing doing anything in this repository with?

As for the change: You will probably be served best by providing your own apt config in a sandbox tree, the apt config mkosi generates is the mkosi.sources file, which it doesn't overwrite, if it already exists.

Probably a better change is to properly document this escape hatch, specifically that the file is called mkosi.sources in the man page so nobody has to look into the code.

@yadutaf

yadutaf commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

Sorry, if this is coming on standoffish, but this is weird behaviour. First time contributor and then approval by three people who I don't remember ever seeing doing anything in this repository with?

@behrmann I totally understand. We are working together, if this may give some context. 馃槄

As for the change: You will probably be served best by providing your own apt config in a sandbox tree, the apt config mkosi generates is the mkosi.sources file, which it doesn't overwrite, if it already exists.

I also tested it and it works perfectly fine. I will need this in the future for my final use-case anyway. I only stumbled upon this bug by "chance" while checking a minimal image with only official Debian packages, but from a local mirror. This is how I realized that using a custom mirror with the "Mirror" setting is broken for Debian while it is working for Arch, openSUSE and centOS (I only tested these).

Since this looks like an accidental regression of #3802, I submitted a quick fix, in case this is helpful.

If you take the official French mirror for instance, http://ftp.fr.debian.org/debian/ works, http://ftp.fr.debian.org/debian-security/ works as well (but not on all mirrors, like Croatia "hr") and http://ftp.fr.debian.org/debian-debug/ does not.

@bluca

bluca commented Sep 23, 2026

Copy link
Copy Markdown
Member

Since this looks like an accidental regression of #3802, I submitted a quick fix, in case this is helpful.

yeah this is a regression everything else non-withstanding, the security repo must not be mirrored

@behrmann
behrmann merged commit dde1bf0 into systemd:main Sep 25, 2026
54 of 61 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

7 participants