On Sun, 2026-11-01 at 03:17 +0100, Johannes Schauer Marin Rodrigues wrote: > Hi, > > Quoting Benjamin Drung (2026-10-13 19:03:50) > > > Quoting Benjamin Drung (2026-06-25 11:10:37) > > > > I thought about it. We should handle security.ubuntu.com separately. It > > > > might > > > > be useful to use resolute-security from the mirror that you specified > > > > and > > > > have security.ubuntu.com as fallback. So > > > > > > > > ``` > > > > mmdebstrap --suites="%s %s-updates %s-security" resolute resolute.tar > > > > http://my.mirror.example/ubuntu > > > > ``` > > > > > > > > would create: > > > > > > > > ``` > > > > deb [signed-by="/usr/share/keyrings/ubuntu-archive-keyring.gpg"] > > > > http://my.mirror.example/ubuntu resolute main > > > > deb [signed-by="/usr/share/keyrings/ubuntu-archive-keyring.gpg"] > > > > http://my.mirror.example/ubuntu resolute-updates main > > > > deb [signed-by="/usr/share/keyrings/ubuntu-archive-keyring.gpg"] > > > > http://my.mirror.example/ubuntu resolute-security main > > > > deb [signed-by="/usr/share/keyrings/ubuntu-archive-keyring.gpg"] > > > > http://security.ubuntu.com/ubuntu resolute-security main > > > > ``` > > > > > > > > What do you think? > > > > > > is the main purpose of the --suites option with %s placeholders you > > > propose to > > > add security mirrors? > > > > No. This request is unrelated to the security mirror. The purpose is to > > ease selecting what to use. I have these use cases: > > > > * Build an Ubuntu chroot that is equivalent to the Ubuntu builders for > > normal uploads, i.e. have --suites="%s %s-updates %s-proposed" plus the > > security pocket. > > I was looking online what a Ubuntu pocket is but the results talk about the > GPD > Pocket. Is what you call pocket just an apt source? >
Found the documentation for it: https://ubuntu.com/project/docs/how-ubuntu-is-made/concepts/package-archive/#pockets "Pockets are package sub-repositories within the Ubuntu package archive. A suite is a combination of a series and a pocket." Instead of --suites="%s %s-updates %s-proposed" we could have --pockets="release updates proposed". > > * Build an Ubuntu chroot for security builds, i.e. have --suites="%s" > > plus the security pocket. > > > > Sometimes it's useful to test with the updates pocket enabled, but the > > proposed pocket disabled. And some might want to add the backports > > pocket. > > > > To reduce the load on http://security.ubuntu.com/ubuntu/ I want to have > > the security pocket served by http://security.ubuntu.com/ubuntu/ but > > also from my local mirror. > > Thank you for listing your use-cases. I would like to understand them to > better > think about the best interface to support them. Are you running mmdebstrap > from > the command line or do you run it from a script? This whole bug report and use case came from using mmdebstrap via sbuild. So mmdebstrap is called by sbuild and configured via sbuild.conf. Currently I have this config: $ grep -vE ^'(#|$)' /etc/sbuild/sbuild.conf | grep mmdebstrap $unshare_mmdebstrap_keep_tarball = 1; push @{$unshare_mmdebstrap_extra_args}, "*", ['--aptopt=Acquire::http { Proxy "http://127.0.0.1:3142"; }', '--skip=cleanup/apt/lists']; push @{$unshare_mmdebstrap_extra_args}, qr/^(trusty|xenial|bionic|focal|jammy|noble|resolute|stonking|tenacious)/, ['http://de.archive.ubuntu.com/ubuntu']; push @{$unshare_mmdebstrap_extra_args}, qr/^(trusty|xenial|bionic|focal|jammy|noble|resolute|stonking|tenacious)/, ['--components=main,universe']; push @{$unshare_mmdebstrap_extra_args}, "trusty*", ['--aptopt=APT::Default-Release "trusty";']; push @{$unshare_mmdebstrap_extra_args}, "xenial*", ['--aptopt=APT::Default-Release "xenial";']; push @{$unshare_mmdebstrap_extra_args}, "bionic*", ['--aptopt=APT::Default-Release "bionic";']; push @{$unshare_mmdebstrap_extra_args}, "focal*", ['--aptopt=APT::Default-Release "focal";']; push @{$unshare_mmdebstrap_extra_args}, "jammy*", ['--aptopt=APT::Default-Release "jammy";']; push @{$unshare_mmdebstrap_extra_args}, "noble*", ['--aptopt=APT::Default-Release "noble";']; push @{$unshare_mmdebstrap_extra_args}, "resolute*", ['--aptopt=APT::Default-Release "resolute";']; push @{$unshare_mmdebstrap_extra_args}, "stonking*", ['--aptopt=APT::Default-Release "stonking";']; push @{$unshare_mmdebstrap_extra_args}, "tenacious*", ['--aptopt=APT::Default-Release "tenacious";']; push @{$unshare_mmdebstrap_extra_args}, "trusty*", ['--setup-hook=echo "deb http://de.archive.ubuntu.com/ubuntu trusty-updates main universe" >> "$1"/etc/apt/sources.list']; push @{$unshare_mmdebstrap_extra_args}, "xenial*", ['--setup-hook=echo "deb http://de.archive.ubuntu.com/ubuntu xenial-updates main universe" >> "$1"/etc/apt/sources.list']; push @{$unshare_mmdebstrap_extra_args}, "bionic*", ['--setup-hook=echo "deb http://de.archive.ubuntu.com/ubuntu bionic-updates main universe" >> "$1"/etc/apt/sources.list']; push @{$unshare_mmdebstrap_extra_args}, "focal*", ['--setup-hook=echo "deb http://de.archive.ubuntu.com/ubuntu focal-updates main universe" >> "$1"/etc/apt/sources.list']; push @{$unshare_mmdebstrap_extra_args}, "jammy*", ['--setup-hook=echo "deb http://de.archive.ubuntu.com/ubuntu jammy-updates main universe" >> "$1"/etc/apt/sources.list']; push @{$unshare_mmdebstrap_extra_args}, "noble*", ['--setup-hook=echo "deb http://de.archive.ubuntu.com/ubuntu noble-updates main universe" >> "$1"/etc/apt/sources.list']; push @{$unshare_mmdebstrap_extra_args}, "resolute*", ['--setup-hook=echo "deb http://de.archive.ubuntu.com/ubuntu resolute-updates main universe" >> "$1"/etc/apt/sources.list']; push @{$unshare_mmdebstrap_extra_args}, "stonking*", ['--setup-hook=echo "deb http://de.archive.ubuntu.com/ubuntu stonking-updates main universe" >> "$1"/etc/apt/sources.list']; push @{$unshare_mmdebstrap_extra_args}, "tenacious*", ['--setup-hook=echo "deb http://de.archive.ubuntu.com/ubuntu tenacious-updates main universe" >> "$1"/etc/apt/sources.list']; push @{$unshare_mmdebstrap_extra_args}, "tenacious*", ['--setup-hook=echo "deb http://de.archive.ubuntu.com/ubuntu tenacious-proposed main universe" > "$1"/etc/apt/sources.list.d/proposed.list']; $unshare_mmdebstrap_max_age = 86400; I like to have a cleaner config and better out of the box setting. > > > If mmdebstrap would automatically add security and updates suites for a > > > Ubuntu > > > stable release, which use-case for the --suites option would remain and > > > would > > > the remaining use-case warrant a new option? > > > > Always adding the updates pocket is not always what users might want. > > Yes, for any "sensible default" there must be a way to opt-out of it and do > some custom thing. Right now, for mmdebstrap the mechanism is to use the SUITE > parameter to select a distro name and then mmdebstrap will try to do the > "sensible thing" for that distro, like adding the security mirrors for Debian > stable releases. If you don't like that, you can add your own apt sources and > do whatever you like. > > > My proposal would be to make the pockets configurable and always add the > > security mirror. So for the modern deb822 format it would be this: > > > > ``` > > Types: deb > > URIs: $mirror > > Suites: $suites > > Components: $components > > Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg > > > > Types: deb > > URIs: http://security.ubuntu.com/ubuntu/ > > Suites: ${series}-security > > Components: $components > > Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg > > ``` > > I would like to brainstorm more about a good interface for this. I think your > motivation for adding the --suites parameter with a %s placeholder comes from > the assumption that distros generally name their suites in a certain pattern > and otherwise share the same mirror url signed with the same keyring. In such > a situation your idea with --suites would indeed work well. > > But since I am approached by other derivative maintainers, I have been > thinking > about other ways to maybe implement what you want and I am rather leaning into > the direction used by sbuild. So instead of adding another option, how about > pimping the SUITES option? > > I like the idea to always add the appropriate security mirror. I think that is > a sensible default and if you want to do your own thing, you can just pass > your > own apt sources. That being said, how about making it such that you can for > example pass resolute-updates as the SUITE parameter and then you get a ubuntu > chroot with resolute-updates and resolute-security. If you pass > resolute-proposed, you get a chroot with resolute-updates and > resolute-security. > > It would be up to people familiar with the derivative to choose fitting > mappings from SUITE name to set of apt sources and care has to be taken to > not introduce conflicts between distros but given how debootstrap seems to > manage just fine despite the huge number of codenames it already supports, I > think this could be managed. > > What do you think? Yes, that would be a working solution as well. Otherwise I would have implemented a similar solution in sbuild. I can come up with two alternative proposals for Ubuntu ($suite is the the codename like resolute or stonking): $suite -> $suite $suite-updates $suite-proposed -> $suite $suite-updates $suite-proposed $suite-backports -> $suite $suite-updates $suite-backports $suite-security -> $suite $suite-security or: $suite-release -> $suite $suite-updates $suite -> $suite $suite-updates $suite-proposed $suite-backports -> $suite $suite-updates $suite-backports $suite-security -> $suite $suite-security Note: The $suite-security provided by security.ubuntu.com should always be added. I will raise this topic to come up with an agreement for the default. -- Benjamin Drung Debian & Ubuntu Developer

