Skip to content

Conversation

@nmeyerhans
Copy link

This is a proposed solution to the ability to specify a repository suite in the Debian configuration, in addition to the components currently specified. The optional suite is specified as a prefix to the component name in the Repositories= config setting, e.g.

Repositories=
    non-free-firmware
    trixie-backports:main
    trixie-backports:non-free-firmware

The trixie-backports: lines above would generate the following content in the resulting trixie.sources file:

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

Fixes #1755

@nmeyerhans nmeyerhans marked this pull request as draft December 3, 2025 22:10
@nmeyerhans nmeyerhans force-pushed the main branch 3 times, most recently from 127b80b to 8e9ec3a Compare December 4, 2025 00:32
@nmeyerhans nmeyerhans marked this pull request as ready for review December 4, 2025 01:07
@behrmann
Copy link
Contributor

behrmann commented Dec 5, 2025

This is not very large, but it's very specialised to Debian. The canonical way to do this is to just put these files into a package tree, since we can't really add options for everything a package manager does into mkosi itself.

@nmeyerhans
Copy link
Author

This is not very large, but it's very specialised to Debian.

Well yes, it fixes a Debian-specific issue in a Debian-specific source file. Though theoretically the same issue impacts Ubuntu. It may be reasonable to refactor the apt repository handling code further to extract common code in such a way that it can be shared between ubuntu.py and debian.py, but that's out of scope for the original issue and for my use case, so I didn't do that here.

The canonical way to do this is to just put these files into a package tree, since we can't really add options for everything a package manager does into mkosi itself.

The existence of #1755 suggests that this is desirable functionality to have in mkosi. Configuring the package manager to retrieve directly from a repository avoids a number of potential issues with package trees (stale packages, missing dependencies, etc).

@bketelsen
Copy link

brilliant! I need this.

@behrmann
Copy link
Contributor

Configuring the package manager to retrieve directly from a repository avoids a number of potential issues with package trees (stale packages, missing dependencies, etc).

Maybe I've been a bit unclear earlier, because I used an older term no longer used in our docs, but is there a reason you can't use a SandboxTree=? You can put arbitrary apt config files in there.

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.

Rework --repositories for Debian/Ubuntu to allow enabling backports, proposed, debuginfo, ...

3 participants