Page MenuHome GnuPG

GpgME also need to find gpgconf under "/opt/homebrew/bin" by default
Open, NormalPublic

Description

I'm using GpgME 1.19.0.

Users say that in the new version of macOS, "/usr/local" is no longer writable.
So, Homebrew install GnuPG under "/opt/homebrew". You can see it under following.

% gpgconf
gpg:OpenPGP:/opt/homebrew/Cellar/gnupg/2.3.8/bin/gpg
gpgsm:S/MIME:/opt/homebrew/Cellar/gnupg/2.3.8/bin/gpgsm
keyboxd:Public Keys:/opt/homebrew/Cellar/gnupg/2.3.8/libexec/keyboxd
gpg-agent:Private Keys:/opt/homebrew/Cellar/gnupg/2.3.8/bin/gpg-agent
scdaemon:Smartcards:/opt/homebrew/Cellar/gnupg/2.3.8/libexec/scdaemon
dirmngr:Network:/opt/homebrew/Cellar/gnupg/2.3.8/bin/dirmngr
pinentry:Passphrase Entry:/opt/homebrew/opt/pinentry/bin/pinentry

% which gpgconf
/opt/homebrew/bin/gpgconf

As I know from the source code, GpgME will not search for "gpgconf" under "/opt/homebrew/bin".
This behavior may lead to troubling and misunderstanding of "GnuPG not found" as it has already installed in macOS.
Since GpgME has already introduced many search paths, like "../../" or "../" for Gpg4win or other Software, adding a search path for Homebrew may be considerable.
Users will appreciate.

You can see the conversation about this issue HERE.

Thank you,

Details

Version
1.19.0

Revisions and Commits

Related Objects

Event Timeline

werner triaged this task as Normal priority.Apr 6 2023, 9:12 AM
werner edited projects, added gpgme, Feature Request, MacOS; removed Bug Report.
werner added a subscriber: werner.

You could configure gpgme with

--fixed-search-path=/foo:/bar:/opt/homebrew/bin

I can also imagine to append /opt/homebrew/bin to

#ifdef __APPLE__
/* On apple, especially when started through gpgme-json via
   the browser interface we should look into some additional
   fallback paths. */
const char *additional_path = "/usr/local/bin:/usr/local/MacGPG2/bin";
if (!ret)
  {
    ret = walk_path_str (additional_path, pgm);

See gpgme/src/posix-util.c:find_executable()