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

Reply via email to