Article View: linux.debian.bugs.dist
Article #6018Bug#1140618: mmdebstrap: Ubuntu support
From: Benjamin Drung
Date: Tue, 24 Nov 2026 21:30
Date: Tue, 24 Nov 2026 21:30
150 lines
8298 bytes
8298 bytes
Okay, let's continue the discussion publicly in #1140618 then.
On Sun, 2026-11-22 at 13:30 +0100, Johannes Schauer Marin Rodrigues
wrote:
> Please run perltidy to keep the formatting style.
I applied perltidy.
> About commit "Also add updates pocket when a mirror is specified"
>
> Could you avoid the term pocket in your commit messages? I read your reply in
> #1140618 and the term seems to be very ubuntu-specific. mmdebstrap is a Debian
> project and it's be nice to not use language from one of its many derivatives.
> mmdebstrap is a wrapper around apt and apt does not use the word pocket
> anywhere in its source code and only twice in a commit message. And that is
> even though apt is 99% a canonical project these days. In Debian (or apt)
> language what you call pocket I think is just a repository.
Okay, changed the wording. The man page of mmdebstrap uses "mirror" when
talking about updates and security.
> When I run the testsuite I saw that your commit "Also add updates pocket when a
> mirror is specified" introduced a regression in the tests dist-using-codename
> and check-against-debootstrap-dist. You can reproduce the problem like this:
>
> mmdebstrap trixie /dev/null http://deb.debian.org/debian
>
> Even though you specified a stable release name, you *also* specified a mirror
> which means that you turned off the mechanism which automatically picks the
> repositories for a stable release.With your change, the resulting chroot will
> contain the trixie-updates and trixie-security repositories in sources.list.
Yes. This is an intentional change. I changed this commit to reflect
that in the documentation.
I tried to run the test suite, but make_mirror.sh failed on Ubuntu:
```
$ ./make_mirror.sh
I: Starting caching proxy with:
I: * old cache: ./shared/cache.B
I: * new cache: ./shared/cache.A
starting caching proxy for shared/cache.A
proxy download: http://deb.debian.org/debian/dists/unstable/InRelease
proxy cached: http://deb.debian.org/debian/dists/unstable/InRelease
creating mirror for oldstable
contents of /etc/apt/sources.list:
deb [arch=amd64] http://deb.debian.org/debian oldstable main
proxy download: http://deb.debian.org/debian/dists/oldstable/InRelease
Holen:1 http://deb.debian.org/debian oldstable InRelease [151 kB]
Fehl:1 http://deb.debian.org/debian oldstable InRelease
Die folgenden Signaturen konnten nicht überprüft werden, weil ihr öffentlicher Schlüssel nicht verfügbar ist: NO_PUBKEY 6ED0E7B82643E131 NO_PUBKEY 78DBA3BC47EF2265 NO_PUBKEY F8D2585B8783D481
Paketlisten werden gelesen… Fertig
W: http://deb.debian.org/debian/dists/oldstable/InRelease: Loading /etc/apt/trusted.gpg from deprecated option Dir::Etc::Trusted
W: OpenPGP-Signaturüberprüfung fehlgeschlagen: http://deb.debian.org/debian oldstable InRelease: Die folgenden Signaturen konnten nicht überprüft werden, weil ihr öffentlicher Schlüssel nicht verfügbar ist: NO_PUBKEY 6ED0E7B82643E131 NO_PUBKEY 78DBA3BC47EF2265 NO_PUBKEY F8D2585B8783D481
E: Das Depot »http://deb.debian.org/debian oldstable InRelease« ist nicht signiert.
N: Eine Aktualisierung von solch einem Depot kann nicht auf eine sichere Art durchgeführt werden, daher ist es standardmäßig deaktiviert.
N: Weitere Details zur Erzeugung von Paketdepots sowie zu deren Benutzerkonfiguration finden Sie in der Handbuchseite apt-secure(8).
N: Einige Quellen können modernisiert werden. Führen Sie dafür »apt modernize-sources« aus.
running cleanupapt
does not exist: ./shared/cache.A/apt/var/cache/apt/archives/*.deb
does not exist: ./shared/cache.A/apt/var/cache/apt/archives/partial/*.deb
rmdir: failed to remove './shared/cache.A/apt/var/lib/apt/lists/partial': Directory not empty
```
> my $base_suite = $options->{suite} =~ s/-.*//sr;
>
> This makes the minus special in the suite name. This needs to be documented.
>
> The idea of making the minus special to create a mapping got already mentioned
> in #1140618 and it's an idea which we already implemented in sbuild using the
> default distro-mange option:
>
> 'UNSHARE_MMDEBSTRAP_DISTRO_MANGLE' => {
> TYPE => 'ARRAY:STRING',
> VARNAME => 'unshare_mmdebstrap_distro_mangle',
> GROUP => 'Chroot options (unshare)',
> DEFAULT => [
> qr/^(experimental|rc-buggy|unreleased|UNRELEASED.*)$/ =>
> 'unstable',
> -(security|backports|backports-sloppy|proposed|proposed-updates|updates)$/
> => '$1',
> ],
>
> In #1140618 you also point out that you are thinking about this change in
> mmdebstrap in connection with its use in sbuild. That was exactly my line of
> thought as well. The distro-mange option of sbuild was an experiment to see if
> it's something pleasant to use. As I pointed out elsewhere, I would like the
> final solution to involve machine readable data. But since you already
> submitted code which makes that work for ubuntu I think this can be a stepping
> stone towards the final solution.
>
> I see that you added the default components to the documentation. This should
> happen but it should also include other derivatives. Maybe via a table?
The special handling of minus in mmdebstrap makes the
UNSHARE_MMDEBSTRAP_DISTRO_MANGLE and UNSHARE_MMDEBSTRAP_EXTRA_ARGS
setting obsolete. The UNSHARE_MMDEBSTRAP_EXTRA_ARGS was too broad and
added the Debian mirror for Ubuntu when using resolute-updates for
example.
After my experiment, I think following approach is the best way forward:
Get this change into mmdebstrap and carve out functions that could be
moved to distro-info. Then mmdebstrap could use those functions from
libdistro-info-perl. Currently mmdebstrap reads the data from distro-
info-data directly. I don't know how much code logic could be avoided
when just continue doing so for mirrors and suites.
I pushed the updated code to
https://salsa.debian.org/debian/mmdebstrap/-/commits/ubuntu-support?ref_type=heads
The commits are ready for being merged except for the top two ones that
have TODO entries in their commit messages.
--
Benjamin Drung
Debian & Ubuntu Developer
Technical Details
Message-ID:
<O36fn-dWOe-5@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!news-fra.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomodReferences:
<O36fn-dWOe-7@gated-at.bofh.it> <O36fn-dWOe-9@gated-at.bofh.it> <N9ckh-i9h-13@gated-at.bofh.it> <O36fn-dWOe-9@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-fra.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomod From: Benjamin Drung <bdrung@debian.org> Newsgroups: linux.debian.bugs.dist Subject: Bug#1140618: mmdebstrap: Ubuntu support Date: Tue, 24 Nov 2026 22:30:01 +0100 Message-ID: <O36fn-dWOe-5@gated-at.bofh.it> References: <O36fn-dWOe-7@gated-at.bofh.it> <O36fn-dWOe-9@gated-at.bofh.it> <N9ckh-i9h-13@gated-at.bofh.it> <O36fn-dWOe-9@gated-at.bofh.it> X-Original-To: Johannes Schauer Marin Rodrigues <josch@debian.org>, 1140618@bugs.debian.org X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Tue Nov 24 21:21:08 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.7 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/2004796 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 150 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Tue, 24 Nov 2026 22:18:57 +0100 X-Original-Message-ID: <5b0c5c6ae5f9773ab35614d3577c2970b03f1bc1.camel@debian.org> X-Original-References: <0247aec664b6c1d2ecbe1326c2e42d8696536464.camel@posteo.de> <179535061365.2951.6687183070764077242@localhost> <178223225661.801310.1719356904160073656.reportbug@deep-thought> <179535061365.2951.6687183070764077242@localhost>