Make GnuPG automatically find a pinentry installed by Guix. Try using $HOME or, if that variable is not set, use the system password database, or fall back to looking in "/". More information: https://bugs.gnu.org/24076 diff --git a/common/homedir.c b/common/homedir.c index 4b6e46e88..f7ae68ba5 100644 --- a/common/homedir.c +++ b/common/homedir.c @@ -33,6 +33,7 @@ #include #include #include +#include #ifdef HAVE_W32_SYSTEM #include /* Due to the stupid mingw64 requirement to @@ -67,6 +68,10 @@ * gnupg_homedir and gnupg_set_homedir. Malloced. */ static char *the_gnupg_homedir; +/* The user's home directory. Used in Guix to help GnuPG find the + * pinentry. */ +static char *the_user_homedir; + /* Flag indicating that home directory is not the default one. */ static byte non_default_homedir; @@ -509,6 +514,25 @@ gnupg_homedir (void) return the_gnupg_homedir; } +/* Return the user's home directory */ +const char * +user_homedir (void) +{ + const char *dir; + dir = getenv("HOME"); + if (dir == NULL) + { + struct passwd *pw = NULL; + pw = getpwuid (getuid ()); + if (pw != NULL) + dir = pw->pw_dir; + else + dir = "/"; + } + if (!the_user_homedir) + the_user_homedir = make_absfilename (dir, NULL); + return the_user_homedir; +} /* Return whether the home dir is the default one. */ int @@ -971,6 +995,7 @@ get_default_pinentry_name (int reset) } names[] = { /* The first entry is what we return in case we found no other pinentry. */ + { user_homedir, "/.guix-profile/bin/pinentry" }, { gnupg_bindir, DIRSEP_S "pinentry" EXEEXT_S }, #ifdef HAVE_W32_SYSTEM /* Try Gpg4win directory (with bin and without.) */
AgeCommit message (Expand)Author
2021-08-27gnu: ocl-icd: Replace with opencl-icd-loader....ocl-icd’s project page is dead and the source code is unavailable. * gnu/packages/opencl.scm (ocl-icd): Alias to opencl-icd-loader. (clinfo)[inputs]: Use opencl-icd-loader. (beignet)[inputs]: Dito. (pocl)[inputs]: Dito. (python-pyopencl)[inputs]: Dito. * gnu/packages/games.scm (leela-zero)[inputs]: Dito. * gnu/packages/photo.scm (darktable)[inputs]: Dito. * gnu/packages/rocm.scm (rocm-opencl-runtime)[inputs]: Dito. Lars-Dominik Braun
2021-08-08gnu: darktable: Add compatibility for ROCm....darktable has a few tools, which can use OpenCL, not just the main binary. Instead of wrapping it, patch the search path. ROCm also fails to build OpenCL kernels with just the inline keyword. Apply upstream fix. * gnu/packages/photo.scm (darktable) [#:phases]: Add new phases, remove LD_LIBRARY_PATH from wrap-binary. Lars-Dominik Braun
2021-07-27gnu: RawTherapee: Use HTTPS URLs....* gnu/packages/photo.scm (rawtherapee)[source, home-page]: Use HTTPS URLs. Leo Famulari
2021-07-08gnu: darktable: Update to 3.6.0....* gnu/packages/photo.scm (darktable): Update to 3.6.0. Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr> John Kehayias
2021-06-29gnu: photoflare: Update to 1.6.9....* gnu/packages/photo.scm (photoflare): Update to 1.6.9. Tobias Geerinckx-Rice
2021-06-14gnu: Rename qtbase to qtbase-5....This change was automated via the following command: $ git ls-files | xargs sed -i 's/,qtbase)/,qtbase-5)/g' $ git ls-files | xargs sed -i 's/inherit qtbase)/inherit qtbase-5)/g' $ git ls-files | xargs sed -i 's/package-version qtbase)/package-version qtbase-5)/g' $ git checkout etc # to clear some spurious changes This is done so the qtbase package can be upgraded to version 6 in the following commit. Maxim Cournoyer
2021-05-09gnu: ExifTool: Fix CVE-2021-22204...* gnu/packages/patches/perl-image-exiftool-CVE-2021-22204.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/photo.scm (perl-image-exiftool)[source]: Use it. Leo Famulari
2021-05-07gnu: photoflare: Update to 1.6.8....* gnu/packages/photo.scm (photoflare): Update to 1.6.8. Tobias Geerinckx-Rice
2021-05-03gnu: perl-image-exiftool: Update to 12.16....* gnu/packages/photo.scm (perl-image-exiftool): Update to 12.16. Efraim Flashner
2021-04-06gnu: libpano13: Update to 2.9.20_rc3 [security fixes]....Fixes at least CVE-2021-20307. * gnu/packages/photo.scm (libpano13): Update to 2.9.20_rc3. Léo Le Bouter