Hi, Quoting Benjamin Drung (2026-11-27 17:23:56) > > I think the bug is that you install makedev. ;) > > > > Why would you need makedev? > > Because ubuntu-minimal depends on it in Ubuntu <= 16.04. Not installing > it would be the better solution, but this is an old Ubuntu release where > it's unlikely to land such a change. makedev was demoted to universe in > 18.04 and is not installed by default any more. So this is an "old" > distro problem.
oh I see. > > Thank you, I locally applied that patch to the branch with your other > > Ubuntu related commits. I still want to clean that up but see the other > > mail thread about that topic. I think you didn't reply to my review yet? > > I did answer to that thread and attached it to the "Please support > specifying wanted suites" bug: > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1140618#34 Whoops, good I asked. I missed that mail in my inbox. Let me answer to it here to not have two diverging conversations. > > Please run perltidy to keep the formatting style. > > I applied perltidy. Thank you! > > 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. Nice, thanks! > > 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 see this in this commit: > Also add updates and security mirrors when a URI is specified > > `get_sourceslist_by_suite` will add updates and security mirrors when no > URI is specified on the command line, but it will not be added when a > URI is specified. This is inconsistent and probably not what a user > wants by default. This is a breaking change. What motivation do you have for breaking the interface? Ideally, I'd only break the interface if there is a reason like "if we don't break it, then we cannot have feature XY" or "we don't break it, we actually fix a bug". I don't see either of that in this case. Can you elaborate? For me it's logical that a mirror to "security.debian.org" is *not* specified when the user explicitly says which mirror they want the packages to come from. Did you only change it because the existing behaviour felt illogical to you or because the Ubuntu support you wanted to implement cannot work otherwise? > 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 > ``` I never ran make_mirror.sh on a Debian derivative. The above sounds like you don't have debian-archive-keyring or similar installed? > > 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. I don't want to remove UNSHARE_MMDEBSTRAP_DISTRO_MANGLE nor UNSHARE_MMDEBSTRAP_EXTRA_ARGS from sbuild because I think they still allow a flexible way to cook up something very custom. But yes, the plan is to move a lot of automatism to mmdebstrap so that users of sbuild only have to resort to these settings if their use-case is somewhat special. > 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. Your plan involves coordination with distro-info maintainers. I actually wanted to first prototype something which fulfills the needs of mmdebstrap (I'm not quite sure yet how that would look like myself) and once that works, I can propose how to best store this information in a machine-readable format to distro-info. Once distro-info carries it, I can switch mmdebstrap to that. > 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. That looks mostly good, thank you! I'd like to clear up the behaviour change from above and then I'll look at your branch in more detail and give you feedback in case I find anything problematic. But I think it's good to merge these changes before I start working on the declarative distro-info format. Indeed your work gives me a better idea about what a derivative distro might need, thank you! > On Fri, 2026-11-27 at 10:38 +0100, Johannes Schauer Marin Rodrigues wrote: > > thank you for these patches! I see you updated > > 0001-hooks-jessie-or-older-also-install-maw. I locally rewrote history to > > instead contain the patch from this mail. Thank you for being verbose in > > your > > commit message. > > I rebased my ubuntu-support branch and pushed it. Why the change in 'refactor: call get_suite_by_vendor earlier'? > > In your hooks, could you put your name and copyright in form of a SPDX > > header > > at the top? > > Yes. Done and pushed in the ubuntu-support branch. Perfect, thank you! > > That being said, old distros still require a lot of workarounds and most of > > them can no longer be fixed. This is what the jessie-or-older hook is for. > > It > > contains all the hacks which used to be necessary and which debootstrap > > worked > > around by manually selecting installation order and some such. Since > > debootstrap existed we were complacent and there was no pressure to fix > > these > > things in the respective packages because the bootstrapping tool took care > > of > > papering over them. This bugged me, so I filed patches and for modern > > derivatives, the jessie-or-older hook is no longer required. > > > > Since I want to keep it that way, I would be very much against adding any > > command line options which enable or disable distro-specific hacks. Those > > options do then have to be carried forever. I want to go the opposite > > direction: fix packages so that hacks never have to be used again by a > > bootstrapping tool. > > > > For old distros: that's what the hooks are for. They allow you to implement > > any > > hack you desire (as you now can confirm). > > We know what quirks are needed for old distros and we know that those > old distros won't be updated for that any more. My idea was that > mmdebstrap could enable those hooks by default when it detects an old > distro that needs it. That assumption would probably work for Ubuntu, yes. But there are rolling release distros for which this approach would not work. Even Debian has testing and stable which are technically "rolling releases". If you look at the mechanisms used in maybe-jessie-or-older you will see that it does *not* check the suite name at all but looks at the package versions and features. Many people value how fast mmdebstrap is. I'm hesitant to make such kind of "older than a decade" release detection logic by default because of that. I'm tending towards recommending that those who use mmdebstrap in a way where they often have to do that, then they can add the --hook-dir they need. Another reason against making the check the default is that I would estimate that the vast majority of mmdebstrap (or debootstrap) users do use it together with distros younger than five years and things should work out-of-the-box for those. > > About auto-adding those, did you have a look at the maybe-jessie-or-older > > hook? > > That one implements the auto-add behaviour that you are asking for. If you > > don't know what distro you are bootstrapping and if you want the hacks for > > old > > distros to automatically be applied if your distro is too old, then the > > maybe-jessie-or-older hook will do the auto-detection and run the > > jessie-or-older hooks only if necessary. > > This would work, but clutter the output for newer distros that do not > need this hook. Yes. That would be another reason against enabling these hooks by default. > > Also, would you prefer to keep the existing skip-makedev and xenial hooks > > which > > you proposed or would you rather write a hook called ubuntu which then does > > the > > auto-detection of which ubuntu-release is currently being bootstrapped and > > then > > does the right thing depending on the ubuntu version? > > > > Then you could use --hook-dir=./hooks/ubuntu for both trusty and xenial > > without > > having to remember which one of them needed the skip-makedev hook for > > example. > > Keeping the existing skip-makedev and xenial hooks make sense, since > those are the equivalent to the jessie-or-older hook. We could add a > maybe-xenial-or-older hook that does the equivalent to maybe-jessie-or- > older. Then users can use: > > mmdebstrap $debian-codename --hook-dir=./hooks/maybe-jessie-or-older > mmdebstrap $ubuntu-codename --hook-dir=./hooks/maybe-xenial-or-older > > Or have one common maybe-old-distro hook. So that you could use the same > parameters. > > Then sbuild should default to add this hook to support building on old > releases by default. Okay, you implement it and you know ubuntu better than I, so I will leave the naming of this up to you. Thanks! cheers, josch
signature.asc
Description: signature

