Subject: [PATCH 1/2] gnu: Make GnuPG 2.2.32 available for users.

From: Leo Famulari <[email-masked]>
Date: Wed, 22 Dec 2021 19:00:33 -0500

Fixes <https://issues.guix.gnu.org/52483>.

* gnu/packages/gnupg.scm (gnupg-2.2.32)[properties]: Unhide this package.
[source]: Add 'gnupg-default-pinentry.patch'.
* gnu/packages/emacs-xyz.scm (emacs-pinentry)[propagated-inputs]: Replace gnupg
with gnupg-2.2.32.
---
 gnu/packages/emacs-xyz.scm |  2 +-
 gnu/packages/gnupg.scm     | 10 +++-------
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index c85680eece..5228338458 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -21166,7 +21166,7 @@ (define-public emacs-pinentry
            "1lf30q6r8nz5cjzclbb9bbymsk2y75nskvb55hnjdv93gr3j0sik"))))
       (build-system emacs-build-system)
       (propagated-inputs
-       (list gnupg))
+       (list gnupg-2.2.32))
       (home-page "https://elpa.gnu.org/packages/pinentry.html")
       (synopsis "GnuPG Pinentry server implementation")
       (description
diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm
index 7706688b93..a3f0f85a0d 100644
--- a/gnu/packages/gnupg.scm
+++ b/gnu/packages/gnupg.scm
@@ -349,21 +349,17 @@ (define-public gnupg
     (properties '((ftp-server . "ftp.gnupg.org")
                   (ftp-directory . "/gcrypt/gnupg")))))
 
+;; This package fixes <https://issues.guix.gnu.org/52483>, "GnuPG 2.2.30 cannot
+;; do symmetric encryption"
 (define-public gnupg-2.2.32
   (package
     (inherit gnupg)
     (version "2.2.32")
-
-    ;; Hide this version because packages like 'emacs-pinentry' propagate the
-    ;; default GnuPG and "guix install gnupg emacs-pinentry" would fail with a
-    ;; collision error.
-    (properties `((hidden? . #t)
-                  ,@(package-properties gnupg)))
-
     (source (origin
               (inherit (package-source gnupg))
               (uri (string-append "mirror://gnupg/gnupg/gnupg-" version
                                   ".tar.bz2"))
+              (patches (search-patches "gnupg-default-pinentry.patch"))
               (sha256
                (base32
                 "0506gv54z10c96z5821z9p0ksibk1pfilsmag39ffqrcz0sinmxj"))))))
-- 
2.34.0