Article View: linux.debian.bugs.dist
Article #4788Bug#1140618: mmdebstrap: Please support specifying wanted suites
From: Benjamin Drung
Date: Tue, 17 Nov 2026 01:10
Date: Tue, 17 Nov 2026 01:10
243 lines
12591 bytes
12591 bytes
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
Technical Details
Message-ID:
<O0fRT-cmke-3@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!newsfeed.xs3.de!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomodReferences:
<N9ckh-i9h-13@gated-at.bofh.it> <N9gnT-kWG-5@gated-at.bofh.it> <N9ckh-i9h-13@gated-at.bofh.it> <N9Opz-IEz-3@gated-at.bofh.it> <NLxe1-43RP-5@gated-at.bofh.it> <NNOX8-5j8K-75@gated-at.bofh.it> <NUtkR-97kC-1@gated-at.bofh.it> <N9ckh-i9h-13@gated-at.bofh.it> <NUtkR-97kC-1@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!newsfeed.xs3.de!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod From: Benjamin Drung <bdrung@debian.org> Newsgroups: linux.debian.bugs.dist Subject: Bug#1140618: mmdebstrap: Please support specifying wanted suites Date: Tue, 17 Nov 2026 02:10:01 +0100 Message-ID: <O0fRT-cmke-3@gated-at.bofh.it> References: <N9ckh-i9h-13@gated-at.bofh.it> <N9gnT-kWG-5@gated-at.bofh.it> <N9ckh-i9h-13@gated-at.bofh.it> <N9Opz-IEz-3@gated-at.bofh.it> <NLxe1-43RP-5@gated-at.bofh.it> <NNOX8-5j8K-75@gated-at.bofh.it> <NUtkR-97kC-1@gated-at.bofh.it> <N9ckh-i9h-13@gated-at.bofh.it> <NUtkR-97kC-1@gated-at.bofh.it> X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Tue Nov 17 01:01:08 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -0.457 Reply-To: Benjamin Drung <bdrung@debian.org>, 1140618@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: josch@debian.org X-Debian-Pr-Message: followup 1140618 X-Debian-Pr-Package: mmdebstrap X-Debian-Pr-Source: mmdebstrap Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.56.2-9 MIME-Version: 1.0 X-Debian-User: bdrung X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2003068 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 243 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Tue, 17 Nov 2026 02:00:01 +0100 X-Original-Message-ID: <3ba27b16eb0ba6e7c323decba2730dde3bfe483e.camel@debian.org> X-Original-References: <178223225661.801310.1719356904160073656.reportbug@deep-thought> <178224822957.3262.6449957103811171026@localhost> <178223225661.801310.1719356904160073656.reportbug@deep-thought> <6a4cf59b3ffc9c50257444b09c36abc8bead929a.camel@debian.org> <179136950599.21057.8481700699768482221@localhost> <6b329ac460f2102a4c49cda717c7bdcd1e311193.camel@debian.org> <179349947041.684046.15708391068991516090@localhost> <178223225661.801310.1719356904160073656.reportbug@deep-thought> <179349947041.684046.15708391068991516090@localhost>