Bug#1128406: dpkg: Undefined subroutine &Dpkg::OpenPGP::Backend::GnuPG::g_ when verifying upstream signatures

Guillem Jover <[email protected]> Thu, 19 Feb 2026 13:29:09 +0100
Newsgroups gmane.linux.debian.devel.dpkg.bugs
Message-ID <aZcCFZehjOt58ZyT__24938.2287425519$1771504292$gmane$org@thunder.hadrons.org>
Hi!

On Thu, 2026-02-19 at 12:50:21 +0100, Nadzeya Hutsko wrote:
> Package: dpkg
> Version: 1.23.5
> Severity: normal

> scripts/Dpkg/OpenPGP/Backend/GnuPG.pm is missing 'use Dpkg::Gettext;',
> which provides the g_() function used in _file_is_keybox(). When
> dpkg-source verifies upstream signatures using the GnuPG backend, it
> crashes with:
> 
> ```
> Undefined subroutine &Dpkg::OpenPGP::Backend::GnuPG::g_ called at
> /usr/share/perl5/Dpkg/OpenPGP/Backend/GnuPG.pm line 133.
> ```
> 
> The same bug was previously fixed for the Sequoia backend in dpkg 1.22.18
> (#1099866). The fix is to add 'use Dpkg::Gettext;' to
> scripts/Dpkg/OpenPGP/Backend/GnuPG.pm, matching what was done for
> scripts/Dpkg/OpenPGP/Backend/Sequoia.pm.
> 
> This bug was originally found in Ubuntu while I was working on lintian
> (https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/2142108).

Ah, thanks for the report. I had also found this some weeks ago and
fixed locally as part of another change to detect and reject LibrePGP
artifacts. I guess I'll split that part into its own commit to make
the closure of this report make more sense. Will be included in my
next push.

Thanks,
Guillem