Opened 7 months ago

Closed 7 months ago

#73403 closed defect (fixed)

No pinentry for GPG

Reported by: vkuznet (Valentin Kuznetsov) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.11.6
Keywords: gpg, pinetry, gnupg2 Cc: jann@…, ionic@…
Port: gnupg2

Description

After automated upgrade of ports on macOS I found the following:

gpg: public key decryption failed: No pinentry
gpg: decryption failed: No pinentry

I checked my ~/.gnupg/gpg-agent.conf and see that it relies on

pinentry-program /opt/local/bin/pinentry

I looked up pinentry and I see the following:

ls -al /opt/local/bin/pinentry
lrwxr-xr-x  1 root  admin  15 Feb 25  2025 /opt/local/bin/pinentry -> pinentry-curses

ls -al /opt/local/bin/pinentry-curses
-rwxr-xr-x  1 root  admin  96016 Feb 25  2025 /opt/local/bin/pinentry-curses

port provides /opt/local/bin/pinentry-curses
/opt/local/bin/pinentry-curses is provided by: pinentry

# try to re-install pinentry
sudo port install pinentry
Password:
--->  Computing dependencies for pinentry
--->  Cleaning pinentry
--->  Scanning binaries for linking errors
--->  Found 3 broken files, matching files to ports
--->  Found 1 broken port, determining rebuild order
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt: pinentry @1.2.1
...
Error: Failed to configure pinentry: consult /opt/local/var/macports/build/pinentry-7fceddc8/work/pinentry-1.2.1/config.log
Error: Failed to configure pinentry: configure failure: command execution failed

When inspecting the config.log I found:

less /opt/local/var/macports/build/pinentry-7fceddc8/work/pinentry-1.2.1/config.log
....
configure:9605: checking for elementary >= 1.18,ecore-x
configure:9613: $PKG_CONFIG --exists --print-errors "elementary >= 1.18,ecore-x"
Package elementary was not found in the pkg-config search path.
Perhaps you should add the directory containing `elementary.pc'
to the PKG_CONFIG_PATH environment variable
No package 'elementary' found
Package ecore-x was not found in the pkg-config search path.
Perhaps you should add the directory containing `ecore-x.pc'
to the PKG_CONFIG_PATH environment variable
No package 'ecore-x' found
configure:9616: $? = 1
configure:9631: $PKG_CONFIG --exists --print-errors "elementary >= 1.18,ecore-x"
Package elementary was not found in the pkg-config search path.
Perhaps you should add the directory containing `elementary.pc'
to the PKG_CONFIG_PATH environment variable
No package 'elementary' found
Package ecore-x was not found in the pkg-config search path.
Perhaps you should add the directory containing `ecore-x.pc'
...
configure:10148: $PKG_CONFIG --exists --print-errors "KF5WaylandClient >= 5.60"
Package KF5WaylandClient was not found in the pkg-config search path.
Perhaps you should add the directory containing `KF5WaylandClient.pc'
to the PKG_CONFIG_PATH environment variable
No package 'KF5WaylandClient' found
configure:10151: $? = 1
No package 'KF5WaylandClient' found
configure:10179: result: no
configure:10182: WARNING: pkg-config could not find the module KF5WaylandClient
configure:11122: WARNING: pinentry-qt will be built without Caps Lock warning on Wayland
configure:11143: checking for QtCore >= 4.6.0 QtGui >= 4.6.0
configure:11151: $PKG_CONFIG --exists --print-errors "QtCore >= 4.6.0 QtGui >= 4.6.0"
Package QtCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `QtCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'QtCore' found
Package QtGui was not found in the pkg-config search path.
Perhaps you should add the directory containing `QtGui.pc'
to the PKG_CONFIG_PATH environment variable
No package 'QtGui' found
configure:11154: $? = 1
configure:11169: $PKG_CONFIG --exists --print-errors "QtCore >= 4.6.0 QtGui >= 4.6.0"
Package QtCore was not found in the pkg-config search path.
Perhaps you should add the directory containing `QtCore.pc'
to the PKG_CONFIG_PATH environment variable
No package 'QtCore' found
Package QtGui was not found in the pkg-config search path.
Perhaps you should add the directory containing `QtGui.pc'
to the PKG_CONFIG_PATH environment variable
No package 'QtGui' found
configure:11172: $? = 1
No package 'QtCore' found
No package 'QtGui' found
configure:11200: result: no

I checked ports and can't find elementary, ecore-x, etc. packages. Does something changed or I'm missing how pinentry should be installed?

Change History (4)

comment:1 Changed 7 months ago by crimsonpython24 (Yu-Jen Warren Wang)

I believe I ran into a similar issue.

admin@device ~ % sudo port install gnupg2
Password:
--->  Computing dependencies for gnupg2
# ...
--->  Cleaning gnupg2
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  Found 3 broken files, matching files to ports
--->  Found 1 broken port, determining rebuild order
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt: pinentry @1.2.1
Continue? [Y/n]: n

When installing pinentry explicitly:

```fish
admin@device ~ % sudo port install pinentry       
Password:
--->  Computing dependencies for pinentry
--->  Cleaning pinentry
--->  Scanning binaries for linking errors
--->  Found 3 broken files, matching files to ports
--->  Found 1 broken port, determining rebuild order
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt: pinentry @1.2.1
Continue? [Y/n]: y
--->  Computing dependencies for pinentry
--->  Cleaning pinentry
--->  Scanning binaries for linking errors
--->  Found 3 broken files, matching files to ports
--->  Found 1 broken port, determining rebuild order
--->  Rebuilding in order
     pinentry @1.2.1_0
--->  Computing dependencies for pinentry
--->  Fetching distfiles for pinentry
--->  Attempting to fetch pinentry-1.2.1.tar.bz2 from https://distfiles.macports.org/pinentry
--->  Verifying checksums for pinentry                                               
--->  Extracting pinentry
--->  Configuring pinentry
Error: Failed to configure pinentry: consult /opt/local/var/macports/build/pinentry-7fceddc8/work/pinentry-1.2.1/config.log
Error: Failed to configure pinentry: configure failure: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_security_pinentry/pinentry/main.log for details.
Error: rev-upgrade failed: Error rebuilding pinentry
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.

Looking at the log:

cat /opt/local/var/macports/build/pinentry-7fceddc8/work/pinentry-1.2.1/config.log

configure:7375: checking for LIBASSUAN - version >= 2.1.0
configure:7416: result: yes (3.0.2)
configure:7431: checking LIBASSUAN API version
configure:7438: result: does not match.  want=2 got=3.
```

Here, `pinentry 1.2.1` seems to require `libassuan API` version 2, but the system installed `libassuan 3.0.2`, which provides API v3. I.e., `pinentry` doesn't seem updated to support the newer `libassuan`, which breaks the installation. As a result:

```fish
Real name: 
Email address: 
Comment: 
You selected this USER-ID:
    "text"

Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
gpg: agent_genkey failed: No pinentry
Key generation failed: No pinentry

Attached is the full error log: https://github.com/user-attachments/files/24692472/error.txt. I also commented on GitHub on this breaking change: https://github.com/macports/macports-ports/commit/98ae05cecc79ffe84aee5ec4fe912b4a5be5b1e9#commitcomment-174969842.

comment:2 Changed 7 months ago by roederja

pinentry has been updated. But there might still be issues. See here: https://github.com/macports/macports-ports/pull/30790

comment:3 Changed 7 months ago by vkuznet (Valentin Kuznetsov)

I confirm that provided update works for me. Thank you very much for quick fix. This ticket can be closed.

comment:4 Changed 7 months ago by roederja

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.