🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #6482

Bug#1154510: mmdebstrap fails to build images for Ubuntu xenial and trusty

#6482
From: Johannes Schauer Marin Rodrigues
Date: Fri, 27 Nov 2026 22:10
376 lines
18313 bytes
--===============0202056097507369319==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable

Hi,

Quoting Benjamin Drung (2026-11-27 17:23:56)
> > I think the bug is that you install makedev. ;)
> >=20
> > Why would you need makedev?
>=20
> Because ubuntu-minimal depends on it in Ubuntu <=3D 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?
>=20
> 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=3D1140618#34

Whoops, good I asked. I missed that mail in my inbox. Let me answer to it h=
ere
to not have two diverging conversations.

> > Please run perltidy to keep the formatting style.
>=20
> I applied perltidy.

Thank you!

> > About commit "Also add updates pocket when a mirror is specified"
> >=20
> > Could you avoid the term pocket in your commit messages? I read your re=
ply 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 deriv=
atives.
> > 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 tha=
t is
> > even though apt is 99% a canonical project these days. In Debian (or ap=
t)
> > language what you call pocket I think is just a repository.
>=20
> 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 pocke=
t when a
> > mirror is specified" introduced a regression in the tests dist-using-co=
dename
> > and check-against-debootstrap-dist. You can reproduce the problem like =
this:
> >=20
> >     mmdebstrap trixie /dev/null http://deb.debian.org/debian
> >=20
> > 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 chroo=
t will
> > contain the trixie-updates and trixie-security repositories in sources.=
list.
>=20
> 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* specifi=
ed
when the user explicitly says which mirror they want the packages to come f=
rom.
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:
>=20
> ```
> $ ./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=3Damd64] 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 =C3=BCberpr=C3=BCft werden, weil=
 ihr =C3=B6ffentlicher Schl=C3=BCssel nicht verf=C3=BCgbar ist: NO_PUBKEY 6=
ED0E7B82643E131 NO_PUBKEY 78DBA3BC47EF2265 NO_PUBKEY F8D2585B8783D481
> Paketlisten werden gelesen=E2=80=A6 Fertig
> W: http://deb.debian.org/debian/dists/oldstable/InRelease: Loading /etc/a=
pt/trusted.gpg from deprecated option Dir::Etc::Trusted
> W: OpenPGP-Signatur=C3=BCberpr=C3=BCfung fehlgeschlagen: http://deb.debia=
n.org/debian oldstable InRelease: Die folgenden Signaturen konnten nicht =
=C3=BCberpr=C3=BCft werden, weil ihr =C3=B6ffentlicher Schl=C3=BCssel nicht=
 verf=C3=BCgbar ist: NO_PUBKEY 6ED0E7B82643E131 NO_PUBKEY 78DBA3BC47EF2265 =
NO_PUBKEY F8D2585B8783D481
> E: Das Depot =C2=BBhttp://deb.debian.org/debian oldstable InRelease=C2=AB=
 ist nicht signiert.
> N: Eine Aktualisierung von solch einem Depot kann nicht auf eine sichere =
Art durchgef=C3=BChrt werden, daher ist es standardm=C3=A4=C3=9Fig deaktivi=
ert.
> N: Weitere Details zur Erzeugung von Paketdepots sowie zu deren Benutzerk=
onfiguration finden Sie in der Handbuchseite apt-secure(8).
> N: Einige Quellen k=C3=B6nnen modernisiert werden. F=C3=BChren Sie daf=C3=
=BCr =C2=BBapt modernize-sources=C2=AB 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 =3D $options->{suite} =3D~ s/-.*//sr;
> >=20
> > This makes the minus special in the suite name. This needs to be docume=
nted.
> >=20
> > The idea of making the minus special to create a mapping got already me=
ntioned
> > in #1140618 and it's an idea which we already implemented in sbuild usi=
ng the
> > default distro-mange option:
> >=20
> > 	'UNSHARE_MMDEBSTRAP_DISTRO_MANGLE' =3D> {
> > 		TYPE    =3D> 'ARRAY:STRING',
> > 		VARNAME =3D> 'unshare_mmdebstrap_distro_mangle',
> > 		GROUP   =3D> 'Chroot options (unshare)',
> > 		DEFAULT =3D> [
> > 			qr/^(experimental|rc-buggy|unreleased|UNRELEASED.*)$/ =3D>
> > 			  'unstable',
> > -(security|backports|backports-sloppy|proposed|proposed-updates|updates=
)$/
> > 			  =3D> '$1',
> > 		],
> >=20
> > 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 li=
ne 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 lik=
e 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 s=
tepping
> > stone towards the final solution.
> >=20
> > 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?
>=20
> 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 wa=
nted
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_t=
ype=3Dheads
> 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 i=
n your
> > commit message.
>=20
> 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?
>=20
> Yes. Done and pushed in the ubuntu-support branch.

Perfect, thank you!

> > That being said, old distros still require a lot of workarounds and mos=
t of
> > them can no longer be fixed. This is what the jessie-or-older hook is f=
or. 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 c=
are of
> > papering over them. This bugged me, so I filed patches and for modern
> > derivatives, the jessie-or-older hook is no longer required.
> >=20
> > Since I want to keep it that way, I would be very much against adding a=
ny
> > command line options which enable or disable distro-specific hacks. Tho=
se
> > 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.
> >=20
> > For old distros: that's what the hooks are for. They allow you to imple=
ment any
> > hack you desire (as you now can confirm).
>=20
> 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 tes=
ting
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* ch=
eck
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 t=
hey
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 t=
he
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-old=
er 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.
>=20
> 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 hoo=
ks 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=3D./hooks/ubuntu for both trusty and xeni=
al without
> > having to remember which one of them needed the skip-makedev hook for e=
xample.
>=20
> 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:
>=20
> mmdebstrap $debian-codename --hook-dir=3D./hooks/maybe-jessie-or-older
> mmdebstrap $ubuntu-codename --hook-dir=3D./hooks/maybe-xenial-or-older
>=20
> Or have one common maybe-old-distro hook. So that you could use the same
> parameters.
>=20
> 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 t=
he
naming of this up to you.

Thanks!

cheers, josch
--===============0202056097507369319==
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Description: signature
Content-Type: application/pgp-signature; name="signature.asc"; charset="us-ascii"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEElFhU6KL81LF4wVq58sulx4+9g+EFAmsJ/mIACgkQ8sulx4+9
g+GNDw/+N0qw6vJ+W5eh+9981XvR6LrX8sNcK5CvvExtGgOQ7qEjRM4qbsyczS+p
izk5BlVYBd3BsN5g2tbz5Xfq0k4f/l8p+4SPd7AP+xZJxi+yXw0WwZ06nSzyZ0pH
ikSAnLqd0jGJZxc0o56AB1muvphmWMBh1j6zGp8cEdUnEcr0BLzeXyZ2T2vH3sfp
OIwMhn9TVc/yfAd13/BVVydRJ+PUOMM1SbPCAPodXgbJPkFg5OIPvxJmCNcEzXnR
HEoB8px1r6zrjtePsq8th+URM4173gi+EJPiDJ6y1vUXIbiOzLEvJWO4dMtk3nIe
orEXq94630Eio2nMBW23vfIDDte68SOixNOASxFeoIX/c5CfIcFECEKopKBQKIpB
wfB5bk0mDS+hS6kKEGczEyjD1X/nP2SQ0udCVuS9ZhyMOKWOq91RbRkVUfYfKifQ
8PP/WZBZKwPKEopPba+tj4m1SdmkEOSOKN9NVb8H2uU6Ohe/vFu91S7dIavCa9d/
c790j2XCxgMmxamXsNxO8sLqfogcnx3uEPhoUP4U9T2OwwxVvNdoU1I7ooS+NPL8
c+0QlfeZktBdaH/EuJF8foK0V3uQWRy6/cDPXhHQ+3+9KRZdcFijgmtYyUSQ2jPZ
qUg+dh2BfAZD+LyL2XH+9QNzt2fE0ufJjiLRqBnF6pG2LUK9YXA=
=2qQD
-----END PGP SIGNATURE-----

--===============0202056097507369319==--
Technical Details
Message-ID: <O4ciJ-eyj0-27@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-fra.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!fu-berlin.de!bofh.it!news.nic.it!robomod
References: <O1iaZ-cXIu-1@gated-at.bofh.it> <O1p2N-d1rv-3@gated-at.bofh.it> <O30Wl-dTPs-11@gated-at.bofh.it> <O40hz-erfP-1@gated-at.bofh.it> <O1iaZ-cXIu-1@gated-at.bofh.it> <O46ZH-euJJ-5@gated-at.bofh.it> <O1iaZ-cXIu-1@gated-at.bofh.it> <O46ZH-euJJ-5@gated-at.bofh.it>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-fra.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!weretis.net!feeder8.news.weretis.net!fu-berlin.de!bofh.it!news.nic.it!robomod
From: Johannes Schauer Marin Rodrigues <josch@debian.org>
Newsgroups: linux.debian.bugs.dist
Subject: Bug#1154510: mmdebstrap fails to build images for Ubuntu xenial and trusty
Date: Fri, 27 Nov 2026 23:10:01 +0100
Message-ID: <O4ciJ-eyj0-27@gated-at.bofh.it>
References: <O1iaZ-cXIu-1@gated-at.bofh.it> <O1p2N-d1rv-3@gated-at.bofh.it> <O30Wl-dTPs-11@gated-at.bofh.it> <O40hz-erfP-1@gated-at.bofh.it> <O1iaZ-cXIu-1@gated-at.bofh.it> <O46ZH-euJJ-5@gated-at.bofh.it> <O1iaZ-cXIu-1@gated-at.bofh.it> <O46ZH-euJJ-5@gated-at.bofh.it>
X-Original-To: 1154510@bugs.debian.org, Benjamin Drung <bdrung@debian.org>
X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org  Fri Nov 27 22:07:08 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.7
Reply-To: Johannes Schauer Marin Rodrigues <josch@debian.org>, 1154510@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: josch@debian.org
X-Debian-Pr-Message: followup 1154510
X-Debian-Pr-Package: mmdebstrap
X-Debian-Pr-Source: mmdebstrap
Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="===============0202056097507369319=="
MIME-Version: 1.0
Content-Disposition: inline
User-Agent: alot/0.0.0
X-Debian-User: josch
X-Debian-Message: from BTS
X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2005469
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 376
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Fri, 27 Nov 2026 23:04:21 +0100
X-Original-Message-ID: <179581706153.482066.2176758311516772864@localhost>
X-Original-References: <179512456377.1844508.10007620892073787783.reportbug@deep-thought> <179515098240.2951.3635647472516703784@localhost> <91600a9f37efc9aaca21e98d6beb36557bcb6b68.camel@debian.org> <179577099471.465360.6492357497625968799@localhost> <179512456377.1844508.10007620892073787783.reportbug@deep-thought> <e8303d2f6f525e18e9d372ba838af767a5af13fe.camel@debian.org> <179512456377.1844508.10007620892073787783.reportbug@deep-thought> <e8303d2f6f525e18e9d372ba838af767a5af13fe.camel@debian.org>