Article View: linux.debian.bugs.dist
Article #43Bug#1147931: mmdebstrap: deprecate use of gpgvnoexpkeysig
From: 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==--
Technical Details
Message-ID:
<NLAlz-45tK-3@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.szaf.org!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomodReferences:
<NDBHP-hlfw-9@gated-at.bofh.it> <NDBHP-hlfw-9@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.szaf.org!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod From: Johannes Schauer Marin Rodrigues <josch@debian.org> Newsgroups: linux.debian.bugs.dist Subject: Bug#1147931: mmdebstrap: deprecate use of gpgvnoexpkeysig Date: Wed, 07 Oct 2026 16:00:01 +0200 Message-ID: <NLAlz-45tK-3@gated-at.bofh.it> References: <NDBHP-hlfw-9@gated-at.bofh.it> <NDBHP-hlfw-9@gated-at.bofh.it> X-Original-To: 1147931@bugs.debian.org, Jochen Sprickerhof <jspricke@debian.org> X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Wed Oct 7 13:55:09 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>, 1147931@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: josch@debian.org X-Debian-Pr-Message: followup 1147931 X-Debian-Pr-Package: mmdebstrap X-Debian-Pr-Source: mmdebstrap Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="===============3551782789185174579==" 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/1995553 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 188 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Wed, 07 Oct 2026 15:54:12 +0200 X-Original-Message-ID: <179138125211.21057.13575189366550835296@localhost> X-Original-References: <178947949772.1165778.4532671828842500452.reportbug@fenchel> <178947949772.1165778.4532671828842500452.reportbug@fenchel>