Article View: linux.debian.bugs.dist
Article #6827Bug#1154510: mmdebstrap fails to build images for Ubuntu xenial and trusty
From: Johannes Schauer Marin Rodrigues
Date: Mon, 30 Nov 2026 00:10
Date: Mon, 30 Nov 2026 00:10
290 lines
14381 bytes
14381 bytes
--===============5340670249975872460==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Hi,
Quoting Benjamin Drung (2026-11-28 00:07:35)
> > > Also add updates and security mirrors when a URI is specified
> > >=20
> > > `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.
> >=20
> > 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 l=
ike "if
> > we don't break it, then we cannot have feature XY" or "we don't break i=
t, we
> > actually fix a bug". I don't see either of that in this case. Can you
> > elaborate?
> >=20
> > For me it's logical that a mirror to "security.debian.org" is *not* spe=
cified
> > when the user explicitly says which mirror they want the packages to co=
me 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 otherwis=
e?
>=20
> I was surprised when I noticed that specifying a mirror disabled the
> additional repositories and the security mirror.=C2=A0So yes, this behavi=
or
> felt illogical to me.
>=20
> IIRC when I do an installation of Debian/Ubuntu I might be able to pick
> a mirror, but the security mirror will be added anyway. I would expect
> mmdebstrap to behave similar to it.
Well, yes because debian-installer does it in a two-step process: it first =
uses
debootstrap to create a chroot *without* security mirrors and then later ad=
ds
the mirror and runs apt-update and apt-upgrade again.
> The logical behavior for me is: If I provide a $foo.list or $foo.sources
> file, I will get exactly this for my apt sources.
We agree on this.
> Otherwise I get the whole repository defaults with the default mirror or =
the
> mirror that I specify.
Okay, I now see where you are coming from. I agree that this could be a
reasonable default behaviour. Alas, it is not what mmdebstrap used since the
very beginning and I do not find your your alternate reasoning strong enoug=
h to
break behaviour for existing users of mmdebstrap. I think to break the
documented interface, a really strong reason must exist.
> Currently there is no way to just replace the default mirror with a custom
> one. Since we do not have something like http://deb.debian.org/debian for
> Ubuntu, using $CC.archive.ubuntu.com as mirror is common on Ubuntu.
Ah okay, I see then that the inability of mmdebstrap to just replace the
default mirror but still do the default action of adding updates and securi=
ty
mirrors is bad for Ubuntu as a derivative.
What is the use-case for using $CC.archive.ubuntu.com instead of
archive.ubuntu.com? Is it just for speed? In which situation would it be us=
ed?
By users of mmdebstrap on the command line or by programs which are wrappers
around mmdebstrap like sbuild?
> > > Die folgenden Signaturen konnten nicht =C3=BCberpr=C3=BCft werden, =
weil ihr =C3=B6ffentlicher Schl=C3=BCssel nicht verf=C3=BCgbar ist: NO_PUBK=
EY 6ED0E7B82643E131 NO_PUBKEY 78DBA3BC47EF2265 NO_PUBKEY F8D2585B8783D481
> > > Paketlisten werden gelesen=E2=80=A6 Fertig
> > > W: http://deb.debian.org/debian/dists/oldstable/InRelease: Loading /e=
tc/apt/trusted.gpg from deprecated option Dir::Etc::Trusted
> > > W: OpenPGP-Signatur=C3=BCberpr=C3=BCfung fehlgeschlagen: http://deb.d=
ebian.org/debian oldstable InRelease: Die folgenden Signaturen konnten nich=
t =C3=BCberpr=C3=BCft werden, weil ihr =C3=B6ffentlicher Schl=C3=BCssel nic=
ht verf=C3=BCgbar ist: NO_PUBKEY 6ED0E7B82643E131 NO_PUBKEY 78DBA3BC47EF226=
5 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 sich=
ere Art durchgef=C3=BChrt werden, daher ist es standardm=C3=A4=C3=9Fig deak=
tiviert.
> > > N: Weitere Details zur Erzeugung von Paketdepots sowie zu deren Benut=
zerkonfiguration finden Sie in der Handbuchseite apt-secure(8).
> > > N: Einige Quellen k=C3=B6nnen modernisiert werden. F=C3=BChren Sie da=
f=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/parti=
al': Directory not empty
> > > ```
> >=20
> > I never ran make_mirror.sh on a Debian derivative. The above sounds lik=
e you
> > don't have debian-archive-keyring or similar installed?
> > >=20
>=20
> I have debian-archive-keyring 2025.1ubuntu1 installed.
Ah, I have another theory. Can you first verify that the desired key is in =
the
expected file on your system:
gpg --with-colons --show-keys /usr/share/keyrings/debian-archive-keyring.gp=
g | grep 6ED0E7B82643E131
mmdebstrap automatically adds a signed-by to a sources.list entry if needed.
This does not happen in make_mirror.sh. To test this theory, could you edit=
the
entries that start with "deb [arch=3D$nativearch] ..." to include a signed-=
by
value of the keyring you found to contain the desired fingerprint?
> > I don't want to remove UNSHARE_MMDEBSTRAP_DISTRO_MANGLE nor
> > UNSHARE_MMDEBSTRAP_EXTRA_ARGS from sbuild because I think they still al=
low 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 re=
sort to
> > these settings if their use-case is somewhat special.
> >=20
>=20
> I don't propose to remove those setting, but the mmdebstrap change would
> trim down the defaults to:
>=20
> UNSHARE_MMDEBSTRAP_DISTRO_MANGLE =3D> [qr/^(unreleased|UNRELEASED.*)$/ =
=3D> 'unstable']
> UNSHARE_MMDEBSTRAP_EXTRA_ARGS =3D> []
Yes, that's what I'd like to achieve.
> > Your plan involves coordination with distro-info maintainers. I actuall=
y 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 th=
at.
> >=20
>=20
> FYI: I am the author/maintainer of distro-info.
Hah! I didn't know. Excellent! Now I will keep you even more in the loop. :)
> > Why the change in 'refactor: call get_suite_by_vendor earlier'?
> Because function like get_vendor_by_suite will need suite_by_vendor
> earlier.
Should that change then not be part of the commit which introduce this need?
Or, alternatively, explain in the commit message something like: "this is in
preparation for..."
> > Many people value how fast mmdebstrap is. I'm hesitant to make such kin=
d of
> > "older than a decade" release detection logic by default because of tha=
t. I'm
> > tending towards recommending that those who use mmdebstrap in a way whe=
re they
> > often have to do that, then they can add the --hook-dir they need. Anot=
her
> > reason against making the check the default is that I would estimate th=
at the
> > vast majority of mmdebstrap (or debootstrap) users do use it together w=
ith
> > distros younger than five years and things should work out-of-the-box f=
or
> > those.
>=20
> I agree for Debian jessie, but Ubuntu 14.04 still gets support. So there
> are users (like me) who want to build for those old releases.
Okay, we are talking about an EOL of in April 2031. That's in 4.3 years.
> Making mmdebstrap support old releases shouldn't be expensive. The code
> would look something like (plus documenting it in the man page):
>=20
> # Quirks for old release before 2017
> sub get_default_hooks_by_suite {
> my $suite =3D shift;
> my $variant =3D shift;
> my $mode =3D shift;
>=20
> if (any { $_ eq $suite } keys ('jessie', 'wheezy', ...)) {
> return ('jessie-or-older');
> } elsif ($suite eq 'xenial') {
> if ($variant eq 'standard' && $mode ne 'root') {
> return ('xenial', 'skip-makedev');
> }
> return ('xenial');
> } elsif (any { $_ eq $suite } keys ('trusty', 'precise', ...)) {
> if ($variant eq 'standard' && $mode ne 'root') {
> return ('jessie-or-older', 'skip-makedev');
> }
> return ('jessie-or-older');
> }
> return ();
> }
>=20
> Would you be open to such kind of change?
This becomes tricky quickly. The idea that you know which suite you are
building for flies out of the window once you either build for a
rolling-release (there is a certain point in unstable on snapshot.debian.org
before which jessie-or-older is required and we never know when "jessie"
starts) or you build from a sources.list without passing the suite name to
mmdebstrap explicitly (you can pass the empty string). There is also the
question of: if there is an automatism, there needs to be a way to disable =
it.
How would a good way to do that look like?
So yes, your proposal would be quick but even if we limit ourselves to Debi=
an,
it would make the assumption that we pass a non-empty suite name and that we
are not using unstable or testing.
Note also, that the skip-makedev hook is not necessarily dependent on the r=
oot
mode hook. If you are inside an unprivileged container, then you are root b=
ut
you still cannot do mknod.
I only now realize that you only need these hooks for the 'standard' varian=
t?
What is your use case to create such chroots? I must admit that I only crea=
ted
--variant=3Dstandard because there was a priority of that name not because =
it was
useful for anything. What is your use-case?
> > > Then sbuild should default to add this hook to support building on old
> > > releases by default.
> >=20
> > Okay, you implement it and you know ubuntu better than I, so I will lea=
ve the
> > naming of this up to you.
>=20
> The drawback of having such a maybe-old-distro hook would that it
> clutters the output even for recent releases.
I only see four additional lines of output when I add the hook to a creatio=
n of
an unstable chroot. Is that too much?
Thanks!
cheers, josch
--===============5340670249975872460==
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+EFAmsMvIkACgkQ8sulx4+9
g+GyvxAAgCBQmO5tJHKPGiQJtpi0oRqWcfa6LXw7EU/IDylp24F+apTO4lX0Jr51
i7CDEUJQc0soFr2SZNM6dn+nM8TkFIl5HsUYxYy7fXqia+AvIwm5UABgl6rgBN3Y
xO8eXlMm0jXxOyOtkYVbyWCKWSf3aJHSE792iyMsWXu9DzqATe2YOTIVqIY+ll4C
c5wUHJ80UTGWHW035KGO4foUKPZPSrqCi7cvNo+iqT3Ty/Au852ltdmDwgL+WvIf
dglcCRxIfxqcpnZf2MMAdJrT5nOnU6+Y63O4ivoIXGPDrx7hNRYSGEheruajnZIi
Onhu6szyyV3uOcmuXxP41kWCnWIDUpnTgOjVktL+qg12PeSMcgamTOAcQ84boeI8
iAB9iCkUsSZGq2PfeMJJAKnKN8R0V3GIfSIoeW7iza42lk4f3AnP1N3tjp4NXy4v
IGcrWuMy9vVMIOhwCAX2rFovA0C1a1WcCwdn05jFqjUUlAarC4KTJB07RYiBTXuG
RFE0bp9Wbp0910eKrmZV8K3wLvuRLjkKZdUKCmpaHofM2y+GnUohpvaBEDZGORjq
nhpEnPFkQC+S5VMXBj14so/RjjLYrgW6X0ioMD7D7WAd20kYwadUgUH3NwKSsw2N
0oAGdekMEPGAEY5dpHtHIRYTkqRqsrqbwdnuLpQsXk7JimW3l1I=
=8WUA
-----END PGP SIGNATURE-----
--===============5340670249975872460==--
Technical Details
Message-ID:
<O4X7X-f0Yo-3@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!news-ams.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!bofh.it!news.nic.it!robomodReferences:
<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> <O4ciJ-eyj0-27@gated-at.bofh.it> <O1iaZ-cXIu-1@gated-at.bofh.it> <O4deN-eyOS-7@gated-at.bofh.it> <O1iaZ-cXIu-1@gated-at.bofh.it> <O4deN-eyOS-7@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-ams.pugleaf.net!srl.newsdeef.eu!news.corradoroberto.it!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: Mon, 30 Nov 2026 01:10:01 +0100 Message-ID: <O4X7X-f0Yo-3@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> <O4ciJ-eyj0-27@gated-at.bofh.it> <O1iaZ-cXIu-1@gated-at.bofh.it> <O4deN-eyOS-7@gated-at.bofh.it> <O1iaZ-cXIu-1@gated-at.bofh.it> <O4deN-eyOS-7@gated-at.bofh.it> X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Mon Nov 30 00:03: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="===============5340670249975872460==" 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/2006014 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 290 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Mon, 30 Nov 2026 01:00:18 +0100 X-Original-Message-ID: <179599681892.482066.10412543670034047318@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> <179581706153.482066.2176758311516772864@localhost> <179512456377.1844508.10007620892073787783.reportbug@deep-thought> <5513a1681f96adfb4c10eb5311fcbccf4d7f5b72.camel@debian.org> <179512456377.1844508.10007620892073787783.reportbug@deep-thought> <5513a1681f96adfb4c10eb5311fcbccf4d7f5b72.camel@debian.org>