Thread View: linux.debian.bugs.dist
4 messages
4 total messages
Started by Johannes Schauer Marin Rodrigues
Wed, 07 Oct 2026 14:00
Bug#1147931: mmdebstrap: deprecate use of gpgvnoexpkeysig
Author: Johannes Schauer Marin Rodrigues
Date: Wed, 07 Oct 2026 14:00
Date: Wed, 07 Oct 2026 14:00
188 lines
10020 bytes
10020 bytes
--===============3551782789185174579==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Hi,
Quoting Jochen Sprickerhof (2026-09-15 15:38:17)
> Adding --aptopt Apt::Key::gpgvcommand has two consequences:
>=20
> 1. It is added to the outer apt config on the host system.
this sounds like it is added to the /etc of the system running mmdebstrap
but this is not the case.
> 2. It is added to /etc/apt/apt.conf.d/99mmdebstrap inside the chroot.
> This is only needed when you want to use apt inside the chroot.
>=20
> Let's inspect 1. first:
>=20
> mmdebstrap --variant=3Dapt --aptopt=3D'Acquire::Check-Valid-Until "false"=
' \
> --keyring=3D/usr/share/keyrings/debian-archive-removed-keys.gpg \
> --hook-dir=3D/usr/share/mmdebstrap/hooks/maybe-jessie-or-older jessie \
> /dev/null http://archive.debian.org/debian
>=20
> as well as:
>=20
> mmdebstrap --variant=3Dapt --aptopt=3D'Acquire::Check-Valid-Until "false"=
' \
> --keyring=3D/usr/share/keyrings/debian-archive-removed-keys.gpg \
> --hook-dir=3D/usr/share/mmdebstrap/hooks/maybe-jessie-or-older unstable \
> /dev/null https://snapshot.debian.org/archive/debian/20131012T160100Z/
>=20
> works just fine here. I was not able to test older then 20131012T160100Z
> even with gpgvnoexpkeysig.
Indeed it seems more is needed with modern versions of apt. In addition to
what the mmdebstrap man page says, these days you also must convince apt th=
at
SHA1 is fine:
--aptopt=3D'APT::Hashes::SHA1::Weak "yes"'
I have the man page adjusted accordingly in git. If you do this, you can go
back as far as 2009-05-23T21:38:52Z. If you try to go further back you get:
W: https://snapshot.debian.org/archive/debian/20090523T161634Z/dists/unstab=
le/Release.gpg: Signature by key A99951DAF9BB569BDB50AD90A70DAF536070D3A1 u=
ses weak algorithm (SHA1)
W: Signature verification failed: https://snapshot.debian.org/archive/debia=
n/20090523T161634Z unstable Release: The following signatures were invalid:=
A99951DAF9BB569BDB50AD90A70DAF536070D3A1 (untrusted public key algorithm: =
dsa1024)
I did not manage to find out how to convince apt that dsa1024 is okay. Maybe
it's impossible with modern apt.
> So with a recent apt 1. gpgvnoexpkeysig is not needed. It is also
> problematic because it tries to call gpgv but there is not direct
> dependency to it so on a system without gpgv installs it fails with:
>=20
> W: http://snapshot.debian.org/archive/debian/20260824T022231Z/dists/unsta=
ble/InRelease: Loading /etc/apt/trusted.gpg from deprecated option Dir::Etc=
::Trusted
> W: Signature verification failed: http://snapshot.debian.org/archive/debi=
an/20260824T022231Z unstable InRelease: GPG: gpgv executable not found
> E: The repository 'http://snapshot.debian.org/archive/debian/20260824T022=
231Z unstable InRelease' is not signed.
>=20
> Which is not obvious.
Yes, but I wouldn't make gpgv a dependency. At maximum I'd make it a Sugges=
ts.
The error message says "gpgv executable not found" which I find a error mes=
sage
which is good enough to understand that gpgv must be installed for this to
work.
> For 2. the problem is that gpgvnoexpkeysig would need to exist inside
> the chroot, which is not normally the case and the mmdebstrap versions
> in older releases does not even provide it. So I think the real command
> should be something like:
>=20
> --customize-hook=3D'copy-in /usr/libexec/mmdebstrap/gpgvnoexpkeysig /tmp'
>=20
> But a quick search did not find any prior reference so I don't think
> anyone is doing that.
Yes, this is because mmdebstrap is used like this with ancient timestamps o=
nly
in debbisect which throws away the chroot after it created it, so there is
never an "apt update" happening. If you want to keep the ancient chroot to =
work
with it later then yes, you'd need gpgvnoexpkeysig. I haven't heard yet of
anybody who has a use-case for doing that.
> I also tried to find out if it was needed in older releases but even
> this fails with KEYEXPIRED:
>=20
> mmdebstrap --variant=3Dapt --aptopt=3D'Acquire::Check-Valid-Until "false"=
' \
> --keyring=3D/usr/share/keyrings/debian-archive-removed-keys.gpg \
> --hook-dir=3D/usr/share/mmdebstrap/hooks/maybe-jessie-or-older jessie \
> --customize-hook=3D'copy-in /usr/libexec/mmdebstrap/gpgvnoexpkeysig /tmp'
> --aptopt=3D'Apt::Key::gpgvcommand "/tmp/gpgvnoexpkeysig"'
> --chrooted-customize-hook=3D'apt update'
> /dev/null http://archive.debian.org/debian
>=20
> Do you have any example where gpgvnoexpkeysig is needed?
Yes, consider this:
$ mmdebstrap --arch=3Di386 --variant=3Dapt unstable /dev/null --aptopt \
'Apt::Key::gpgvcommand "/usr/libexec/mmdebstrap/gpgvnoexpkeysig"' \
--aptopt=3D'APT::Hashes::SHA1::Weak "yes"' \
--aptopt=3D'Acquire::Check-Valid-Until "false"' \
--aptopt=3D'APT::Snapshot "20090523T213852Z"' \
--keyring=3D/usr/share/keyrings/debian-archive-removed-keys.gpg \
--hook-dir=3D/usr/share/mmdebstrap/hooks/maybe-jessie-or-older
Remove the Apt::Key::gpgvcommand option and the above will fail with:
W: Signature verification failed: https://snapshot.debian.org/archive/debia=
n/20090523T213852Z unstable Release: Sub-process /usr/bin/sqv returned an e=
rror code (1), error message is: Signing key on 150C8614919D8446E01E83AF9AA=
38DCD55BE302B is not bound: No binding signature at time 2009-05=
-23T20:54:07Z because: Policy rejected non-revocation signature (Positive=
Certification) requiring second pre-image resistance because: SHA1 is not=
considered secure since 2026-02-01T00:00:00Z
E: The repository 'https://snapshot.debian.org/archive/debian/20090523T2138=
52Z unstable Release' is not signed.
The first Debian unstable snapshot timestamp which does not require
gpgvnoexpkeysig is 2013-10-12T16:01:00Z.
> If not, my proposal would be to make it a noop and drop it form
> mmdebstrap(1).
>=20
> Related, I think we should also drop it from being used in debootsnap by
> default. Given that gpgv would be required outside (1.) nor
> gpgvnoexpkeysig being installed inside the chroot I don't see a case for
> having it. In case you have a use case I would opt for an extra argument
> to add it.
>=20
> Cheers Jochen
>=20
> P.S.: Given all this I am also confident that it is not needed by
> debrebuild, so dropping from debootsnap should not break reproduce.d.n :).
I don't think it's needed for debrebuild because you never want to rebuild
anything in snapshot timestamps from 2013 or earlier.
Since there seems to be a use-case for gpgvnoexpkeysig for timestamps of De=
bian
unstable (the timestamps differ for other suites) between 2009-05-23T21:38:=
52Z
and 2013-10-12T13:01:34Z what is the argument to remove the utility. Where =
does
its existence in the mmdebstrap codebase cause problems?
Thanks!
cheers, josch
--===============3551782789185174579==
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+EFAmrGTwAACgkQ8sulx4+9
g+H5YhAAn0ro2BveT0Fk15cbIMATiVqDBspPLRO/8aJ43NqrqWa5MB9W674KiAZy
hKNBNc98RgPzMGiI5LU7ynDG6FeSYUqbu7TWSmWRNXYOxTfe+2594HU/v08Zzdf0
f6V8KN2Ede7wLVzQkF+AzfXnHJHrAltba7w5/uSGswANZQpgdgfPL86WrN+J9/OJ
SrBhKSTBXBkGsNVEBpkVB8RkGa6d3Cp9FJ21MFal5hrAwQkWzFUguZNfjZIaUEFJ
irQFN/Ur8lWZI0vQFhdQp36C2sU/VMR/h2itcbn6JhgcH6tXx4dtOOG5KSJNAuma
72D6wnsO72gYD5Xx38dPKm1mnU9witXgJ9hdmuDa5BTRGfV6SabIpUjjB2WVnhOa
MOtx4LYhlIPidkF8Vz1Kx+tUjWvNnaV2kgdUXm7mlFIpvEHTiRcjgsa4tXh63dJ/
mZsqXpdbeapj+Y73ZFRr2uIMitsrZ9qnJYGl1yKxVeX0gjPZ9ub7JLcr6Z5/wMeH
a1f26WhqQ/Pz19xISZejmCeZ6bvKIJCyjwdpWs4AjQA3xUglx+wGPfwU88XoNlWU
onfNt/qzVZe0M6yD4K4ceXtb/FVr96/+QwUbPijIwPO6Qcu53Xutj9XOnElppVPp
L9dUSm7NNCDWewpviMq2aifW0tvznksoyucwAKZUxivA4K7ozvQ=
=MC8A
-----END PGP SIGNATURE-----
--===============3551782789185174579==--
Bug#1147931: mmdebstrap: deprecate use of gpgvnoexpkeysig
Author: Jochen Sprickerhof
Date: Thu, 08 Oct 2026 03:50
Date: Thu, 08 Oct 2026 03:50
92 lines
5531 bytes
5531 bytes
--9HqOG5YWgCR+Ad5W Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Johannes Schauer Marin Rodrigues <josch@debian.org> [2026-10-07 15:54]: >Quoting Jochen Sprickerhof (2026-09-15 15:38:17) >> Adding --aptopt Apt::Key::gpgvcommand has two consequences: >> >> 1. It is added to the outer apt config on the host system. > >this sounds like it is added to the /etc of the system running mmdebstrap >but this is not the case. Right, I meant that it is added to the mmdebstrap apt config that is=20 used when mmdebstrap uses the host system apt to do the initial=20 bootstrap. >Indeed it seems more is needed with modern versions of apt. In addition to >what the mmdebstrap man page says, these days you also must convince apt t= hat >SHA1 is fine: > > --aptopt=3D'APT::Hashes::SHA1::Weak "yes"' > >I have the man page adjusted accordingly in git. If you do this, you can go >back as far as 2009-05-23T21:38:52Z. If you try to go further back you get: Thanks for pointing that out! Feel free to close this bug with that=20 change. >Yes, but I wouldn't make gpgv a dependency. At maximum I'd make it a Sugge= sts. >The error message says "gpgv executable not found" which I find a error me= ssage >which is good enough to understand that gpgv must be installed for this to >work. I think documenting the dependency next to how and when to use=20 gpgvnoexpkeysig is enough. >Yes, this is because mmdebstrap is used like this with ancient timestamps = only >in debbisect which throws away the chroot after it created it, so there is >never an "apt update" happening. If you want to keep the ancient chroot to= work >with it later then yes, you'd need gpgvnoexpkeysig. I haven't heard yet of >anybody who has a use-case for doing that. Not really a use case but rust-rust-apt 0.11.3-2 added a gpgv dependency=20 so it works in debrebuild with gpgvnoexpkeysig. >I don't think it's needed for debrebuild because you never want to rebuild >anything in snapshot timestamps from 2013 or earlier. I will open an MR for that later. >Since there seems to be a use-case for gpgvnoexpkeysig for timestamps of D= ebian >unstable (the timestamps differ for other suites) between 2009-05-23T21:38= :52Z >and 2013-10-12T13:01:34Z what is the argument to remove the utility. Where= does >its existence in the mmdebstrap codebase cause problems? It is fine and we should keep it. Thanks! Jochen --9HqOG5YWgCR+Ad5W Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEc7KZy9TurdzAF+h6W//cwljmlDMFAmrHEIMACgkQW//cwljm lDNAaA//QR5E0CGp5b4P1GChnm8OSqMIZZRI/uYWm2nOLiaLEanXJoVQS01as3JD 6s0v6X9wY3dIBymyi6yLWQo0QuBc0PzVhDwFZCTjDpPNVZD9LlNN2njW826SHkxz qNSnwNa7DuGN6BsQn5U+xE44NEImTpJMzknPLsQCh52r9A16z5N9mZfEY7rY5dVP 3BztZ4CnRQV3HcFasfCzJnSdcJyk/w+A8zYjwDeBQpLrh6MjOzqcjPF7TgMCdKcU QQwJnfKLyx7LieFRPsHA0HstLiGx5t4lJPBHsHzgCJ6DH5/hsGhCQFHIw8O85TB0 RRjBkz485R3DfOUZZMLuMxrW6XUkUCvhoxPGa1lotRMvX4K3ZrVQqhFcPfIlNkJU 80B0OBDY9VbTFOAOGqTqJ8xK+4zU5iJ/OTFQKu9tAv1h2MI8hqBS3w0f94aaDwZK q5XOMiFuaYJbPPDg1aBDYZRlRHn3OQlWVTh6BJZlGkqFXePqrj4+I08V8HMxiWIZ FWf+P4Lyu7Hf4fdMOSqmKUfNSSniTi21zzJpa3nkg+16CF8Z87M4imYkmtjBiiou pB+GNwW2Wl6pBtEkBgmtDTlv/He19KJkrNfIHCEELE5FX3oXMZcmABGfKZruLyQI DI/TDMaiZtzM8fa4DoQyH9vjtcMOs2Hk6pgtFi7sEEo3p9ayaV4= =IWLw -----END PGP SIGNATURE----- --9HqOG5YWgCR+Ad5W--
Bug#1147931: mmdebstrap: deprecate use of gpgvnoexpkeysig
Author: Jochen Sprickerhof
Date: Thu, 08 Oct 2026 04:30
Date: Thu, 08 Oct 2026 04:30
54 lines
4235 bytes
4235 bytes
--hFgpLmDwOZNuwsLf Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Johannes Schauer Marin Rodrigues <josch@debian.org> [2026-10-08 06:17]: >That's this MR, no? >https://salsa.debian.org/rust-team/debcargo-conf/-/merge_requests/1405 > >It seems that got added to satisfy an upstream test requirement and not be= cause >of mmdebstrap or gpgvnoexpkeysig? The error message in the MR text is > >Internal error: Cannot find gpgv > >The error message you get from mmdebstrap with gpgvnoexpkeysig is differen= t and >you mention it in your bug report: > >GPG: gpgv executable not found Right, not sure what is going on there. I only noted that 0.11.3-1=20 (without the gpgv dependency) build fine on the buildd: https://buildd.debian.org/status/fetch.php?pkg=3Drust-rust-apt&arch=3Damd64= &ver=3D0.11.3-1&stamp=3D1789425843&raw=3D0 but failed on reproduce.d.n: https://reproduce.debian.net/amd64/api/v1/builds/289593/log And there is no trace of gpgv in the buildd log. --hFgpLmDwOZNuwsLf Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEc7KZy9TurdzAF+h6W//cwljmlDMFAmrHG0AACgkQW//cwljm lDO6Kw/8CZPligT4C7BXpGkKHp6P3MS3ucaPa5qUq2lPWTSgdQVUqRwI/ZuTcuUe qtsFzZW1cRT0vKtELryMFAxR11cabM722R8VyG8avyqQGMIk6nMbObQYtDMJkgOI OwGAs+QIm2WSLhxInuBo6gLjjk8gOqJvrVs0mquGHs3y5DvvwPopXBzCLP3Wr3+n DVPMGY6FUJwehK8NWJasKXJYTCMasdibXqwtorJ+Hti5WeiagMJD4JMyTqRk6Dhb Le1O0yoR6K5gfPao8PCTyFdYSbI4hD4SRn+cftEmDl9BR0oe1+u4Y/KopFt0E6N3 rFS8ZNQWRsn8EKEFjHvKAEafKKE0ifvs/qR2FXbTJSssCfPF9YF1ZzGYMy52iUcz V9Fs1QAodzO8fN16PshOXj06EMq8/KoGaAKkmFaLMho4dhfj9W8q3Rcyw2+QxZDx GeSMgkFZex1AcdzXkws3489U2YJAEdicIrMX/HZPdpcxsmMYdU24Ds6Gw7et3nOy TWQDFCITLcV0iMOMLiUyuP/bmAQiocPSl0Je59QuDj1FeCWZmzSiS0zapueWSPVw 0lBcUHw+RupBds0D7810QiHS1oQaP0kO7F23Xtc0EPqH2g1N7VbxyUBr0lR3Jw04 hz9Q5T7Dbam0o4mW75VrfW5vkBPZKDBifortjOpgY1UdzKnoDQM= =U8s6 -----END PGP SIGNATURE----- --hFgpLmDwOZNuwsLf--
Bug#1147931: mmdebstrap: deprecate use of gpgvnoexpkeysig
Author: Johannes Schauer Marin Rodrigues
Date: Thu, 08 Oct 2026 11:30
Date: Thu, 08 Oct 2026 11:30
105 lines
6462 bytes
6462 bytes
--===============2816502860964890835== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi, obligatory: https://knowyourmeme.com/sensitive/memes/we-need-to-go-deeper Quoting Johannes Schauer Marin Rodrigues (2026-10-07 15:54:12) > Indeed it seems more is needed with modern versions of apt. In addition to > what the mmdebstrap man page says, these days you also must convince apt = that > SHA1 is fine: >=20 > --aptopt=3D'APT::Hashes::SHA1::Weak "yes"' >=20 > I have the man page adjusted accordingly in git. If you do this, you can = go > back as far as 2009-05-23T21:38:52Z. If you try to go further back you ge= t: >=20 > W: https://snapshot.debian.org/archive/debian/20090523T161634Z/dists/unst= able/Release.gpg: Signature by key A99951DAF9BB569BDB50AD90A70DAF536070D3A1= uses weak algorithm (SHA1) > W: Signature verification failed: https://snapshot.debian.org/archive/deb= ian/20090523T161634Z unstable Release: The following signatures were invali= d: A99951DAF9BB569BDB50AD90A70DAF536070D3A1 (untrusted public key algorithm= : dsa1024) >=20 > I did not manage to find out how to convince apt that dsa1024 is okay. Ma= ybe > it's impossible with modern apt. with the help of DonKult I managed to go another three years back to 2006-08-04. I updated the mmdebstrap man page with what is necessary to do = so. Here is the current version: > Example: Create a chroot for Debian unstable from back in "2006-08-04" us= ing > snapshot.debian.org. Snapshots before that are broken as the file sizes a= nd > hashes recorded in the Release and Packages file do not match the files t= hey > reference. > > $ mmdebstrap --arch=3Di386 --variant=3Dminbase unstable /dev/null --a= ptopt \ > 'Apt::Key::gpgvcommand "/usr/libexec/mmdebstrap/gpgvnoexpkeysig"'= \ > --aptopt=3D'APT::Key::Assert-Pubkey-Algo "dsa1024,rsa4096"' \ > --aptopt=3D'Acquire::AllowWeakRepositories "true"' \ > --aptopt=3D'APT::Get::AllowUnauthenticated "true"' \ > --aptopt=3D'APT::Hashes::SHA1::Weak "yes"' \ > --aptopt=3D'DPkg::NoTriggers "false"' \ > --aptopt=3D'Acquire::Check-Valid-Until "false"' \ > --aptopt=3D'APT::Snapshot "20060804T000000Z"' \ > --keyring=3D/usr/share/keyrings/debian-archive-removed-keys.gpg \ > --hook-dir=3D/usr/share/mmdebstrap/hooks/maybe-jessie-or-older > > The "gpgvnoexpkeysig" script requires the gpgv utility and is no longer r= e=E2=80=90 > quired for snapshots of Debian unstable of "2013-10-12T16:01:00Z" and new= er. > Passing the "APT::Key::Assert-Pubkey-Algo" option is required for timesta= mps > before "2009-05-23T21:38:52Z" and can also be just the empty string. The > "DPkg::NoTriggers" option is necessary for Debian unstable timestamps bef= ore > "2008-04-10" with variants other than essential or otherwise apt errors o= ut > with "dpkg: unknown option --no-triggers". The "Acquire::AllowWeakReposit= ories" > and "APT::Get::AllowUnauthenticated" options are required to go back furt= her > than "2006-08-10". Thanks! cheers, josch --===============2816502860964890835== 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+EFAmrHfQEACgkQ8sulx4+9 g+GJ3w//b2/DM8cL0WLEjhGJQFE/Zi8oCvl4IOlTWUFOSk3N66k+VN9aO+lP1IIX fHmex02nkyihTxbxcfG/EzdaXKu2EdbZwsz0enButrIbzZd1MiPvnNQ0y7EkmAXq N5GWBLmsp4sjshjxOWEIVRmCfnbTIMSQ/deH3DdDekH9I4rapX9L6HnFDz0CKPZ9 P3O4K2FXLwo9GqDHLotIgO0tlGu5+1l+TSIiGfvJKOoH14kO7R1PCMnyCH4rzKqf ScdzG2tFF0jYXQqWftQPChSPJyZnkvOfe33n0QcugFWpaHZn0LIQTLaB6Bzuw02M oVhnRSUkhxZY2tBj/Lcbi2JsUallBVtlSwSotc9XSVr5mCB/Hq4HOv4xwnTFoFie UDBcBwoNQl2Q/hjdiOlTcrMXy1BFwd/W/uYD9RDtBNbRt/fC/z35JSJwmTFes/ku Tq4l6XiHX2FmkL+SsHfp71MP0CK77bG7J2e88fu5rPVt3UMjvZ0ziDxsFVvvTE6D DRwwnU23+pWpR4N2r69cBT0YwUB7IaTbsGov1cAp7C1qFrHdynb+kXdDIisIb9hx TkD1kEmRszZVXoFt0wK/WpJD4cg6w3i5hdUZD06b0sDEzenf1H3qhR1z5YR1jMlg NIzp/5u21r35StB0UKekFDhn7uVUlqf/DEeK9FkKlNMr5DEXWAw= =2/Eq -----END PGP SIGNATURE----- --===============2816502860964890835==--
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads