Bug 259775 - security/gnupg: gpgconf: fatal error (exit status 1) (referring to pinentry)
Summary: security/gnupg: gpgconf: fatal error (exit status 1) (referring to pinentry)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Adriaan de Groot
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-11 11:46 UTC by O. Hartmann
Modified: 2021-11-26 22:13 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (adamw)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description O. Hartmann 2021-11-11 11:46:56 UTC
Running security/gnupg (2.3.3) on several incarnations of FreeBSD (12.2-RELENG - 14-CURRENT). Trying to apply defaults on users via "gpgconf --apply-defaults" results in an error:

[...]
$ gpgconf --apply-defaults
gpgconf: WARNING: invalid line in option table of '/usr/local/bin/pinentry'

gpgconf: name of config file for /usr/local/bin/pinentry is not known

gpgconf: fatal error (exit status 1)

Checking with 'gpgconf --list-config' reveals nothing extraordinary. Trying to apply manually the by default installed profile

 
gpgconf --apply-profile /usr/local/share/doc/gnupg/examples/VS-NfD.prf

or any kind of self-made-profile put into the standard data dir, i.e. test.prf located within /usr/local/share/gnupg/test.prf via 

gpgconf --apply-profile test

results in the very same strange error message, see above.

Installation is for pinentry software:

$ pkg info -xo pinentry
pinentry-1.1.1                 security/pinentry
pinentry-gnome3-1.1.1          security/pinentry-gnome3
pinentry-qt5-1.1.1             security/pinentry-qt5
pinentry-tty-1.1.1             security/pinentry-tty
Comment 1 Adam Weinberger freebsd_committer freebsd_triage 2021-11-18 02:30:08 UTC
Thanks for reporting this!

I've handed maintainership of gnupg to Adriaan. I'm assigning this PR to him as well.
Comment 2 Adriaan de Groot freebsd_committer freebsd_triage 2021-11-18 16:02:30 UTC
I can confirm that in an otherwise-working-normally installation of gnupg, I can reproduce the problem.
Comment 3 commit-hook freebsd_committer freebsd_triage 2021-11-22 09:18:48 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7f3f8384a66c5e1d9c020e125808f153845807ad

commit 7f3f8384a66c5e1d9c020e125808f153845807ad
Author:     Adriaan de Groot <adridg@FreeBSD.org>
AuthorDate: 2021-11-22 00:08:37 +0000
Commit:     Adriaan de Groot <adridg@FreeBSD.org>
CommitDate: 2021-11-22 09:18:08 +0000

    security/gnupg: fix table / enum mismatch

    PR259775 reports that (auto)configuration behaves weirdly.
    This is caused by a mismatch between an enum in the code
    and a table that expects to match the enum values. When
    BUILD_WITH_TPM2D is off (the default; I have not looked if
    it can even be turned on in ports) one table entry is

    Patch also submitted upstream.

    PR:             259775
    Reported by:    O. Hartmann
    MFH:            2021Q3

 security/gnupg/Makefile                               |  2 +-
 security/gnupg/files/patch-common_homedir.c           |  6 +++---
 security/gnupg/files/patch-tools_gpgconf-comp.c (new) | 11 +++++++++++
 3 files changed, 15 insertions(+), 4 deletions(-)
Comment 4 Adriaan de Groot freebsd_committer freebsd_triage 2021-11-26 22:13:57 UTC
I've decided not to MFH because - it's a somewhat obscure issue - there are several commits that would have to MFH to make this one fit.