$ git diff --patch-with-stat --summary e10a481d73fee1b54af94550cc30595da50d35c5..41d684fc96f55938fc47e136a3f88ad01e71a497
.abf.yml | 2 +-
...2.4.0-display-password-prompt-immediately.patch | 11 ++++
...-of-previously-known-keys-even-without-UI.patch | 21 ++++----
...Fix-tests-gpgme-for-in-source-tree-builds.patch | 62 ++++++++++++++++++++++
gnupg.spec | 13 +++--
5 files changed, 95 insertions(+), 14 deletions(-)
create mode 100644 gnupg-2.4.0-display-password-prompt-immediately.patch
rename gnupg-2.2.18-gpg-allow-import-of-previously-known-keys-even-without-UI.patch => gnupg-2.4.0-gpg-allow-import-of-previously-known-keys-even-without-UI.patch (81%)
create mode 100644 gnupg-2.4.0-tests-Fix-tests-gpgme-for-in-source-tree-builds.patch
diff --git a/.abf.yml b/.abf.yml
index 7c2ee3e..d8a4555 100644
--- a/.abf.yml
+++ b/.abf.yml
@@ -1,2 +1,2 @@
sources:
- gnupg-2.3.8.tar.bz2: 1f31b7b4c9c9adad97f94ea3acf1aa64c0424bcc
+ gnupg-2.4.0.tar.bz2: 63dde155a8df0d5e1987efa5fc17438beca83ac1
diff --git a/gnupg-2.4.0-display-password-prompt-immediately.patch b/gnupg-2.4.0-display-password-prompt-immediately.patch
new file mode 100644
index 0000000..009f5fd
--- /dev/null
+++ b/gnupg-2.4.0-display-password-prompt-immediately.patch
@@ -0,0 +1,11 @@
+diff -Naur gnupg-2.4.0/doc/examples/systemd-user/gpg-agent.service gnupg-2.4.0.tpg/doc/examples/systemd-user/gpg-agent.service
+--- gnupg-2.4.0/doc/examples/systemd-user/gpg-agent.service 2023-02-25 16:18:59.524455099 +0000
++++ gnupg-2.4.0.tpg/doc/examples/systemd-user/gpg-agent.service 2023-02-25 16:21:43.217202436 +0000
+@@ -4,5 +4,6 @@
+ Requires=gpg-agent.socket
+
+ [Service]
+-ExecStart=/usr/bin/gpg-agent --supervised
++EnvironmentFile=-/etc/sysconfig/gnupg
++ExecStart=/usr/bin/gpg-agent --supervised --no-allow-external-cache $GPGAGENT_PARAMS
+ ExecReload=/usr/bin/gpgconf --reload gpg-agent
diff --git a/gnupg-2.2.18-gpg-allow-import-of-previously-known-keys-even-without-UI.patch b/gnupg-2.4.0-gpg-allow-import-of-previously-known-keys-even-without-UI.patch
similarity index 81%
rename from gnupg-2.2.18-gpg-allow-import-of-previously-known-keys-even-without-UI.patch
rename to gnupg-2.4.0-gpg-allow-import-of-previously-known-keys-even-without-UI.patch
index 98dda54..3af14ba 100644
--- a/gnupg-2.2.18-gpg-allow-import-of-previously-known-keys-even-without-UI.patch
+++ b/gnupg-2.4.0-gpg-allow-import-of-previously-known-keys-even-without-UI.patch
@@ -1,3 +1,4 @@
+From c9485d59f735dbf7509a0136a896fe76f9cc915a Mon Sep 17 00:00:00 2001
From: Vincent Breitmoser <look@my.amazin.horse>
Date: Thu, 13 Jun 2019 21:27:42 +0200
Subject: gpg: allow import of previously known keys, even without UIDs
@@ -13,14 +14,14 @@ This fixes two of the three broken tests in import-incomplete.scm.
GnuPG-Bug-id: 4393
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
---
- g10/import.c | 44 +++++++++++---------------------------------
- 1 file changed, 11 insertions(+), 33 deletions(-)
+ g10/import.c | 45 +++++++++++----------------------------------
+ 1 file changed, 11 insertions(+), 34 deletions(-)
diff --git a/g10/import.c b/g10/import.c
-index 5d3162c..f9acf95 100644
+index 9fab46ca6..c70a6221c 100644
--- a/g10/import.c
+++ b/g10/import.c
-@@ -1788,7 +1788,6 @@ import_one_real (ctrl_t ctrl,
+@@ -1954,7 +1954,6 @@ import_one_real (ctrl_t ctrl,
size_t an;
char pkstrbuf[PUBKEY_STRING_SIZE];
int merge_keys_done = 0;
@@ -28,7 +29,7 @@ index 5d3162c..f9acf95 100644
KEYDB_HANDLE hd = NULL;
if (r_valid)
-@@ -1825,14 +1824,6 @@ import_one_real (ctrl_t ctrl,
+@@ -1991,14 +1990,6 @@ import_one_real (ctrl_t ctrl,
log_printf ("\n");
}
@@ -43,12 +44,12 @@ index 5d3162c..f9acf95 100644
if (screener && screener (keyblock, screener_arg))
{
log_error (_("key %s: %s\n"), keystr_from_pk (pk),
-@@ -1907,18 +1898,10 @@ import_one_real (ctrl_t ctrl,
+@@ -2078,18 +2069,10 @@ import_one_real (ctrl_t ctrl,
}
}
- /* Delete invalid parts and bail out if there are no user ids left. */
-- if (!delete_inv_parts (ctrl, keyblock, keyid, options))
+- if (!delete_inv_parts (ctrl, keyblock, keyid, options, otherrevsigs))
- {
- if (!silent)
- {
@@ -62,11 +63,11 @@ index 5d3162c..f9acf95 100644
+ /* Delete invalid parts, and note if we have any valid ones left.
+ * We will later abort import if this key is new but contains
+ * no valid uids. */
-+ delete_inv_parts (ctrl, keyblock, keyid, options);
++ delete_inv_parts (ctrl, keyblock, keyid, options, otherrevsigs);
/* Get rid of deleted nodes. */
commit_kbnode (&keyblock);
-@@ -1927,24 +1911,11 @@ import_one_real (ctrl_t ctrl,
+@@ -2099,24 +2082,11 @@ import_one_real (ctrl_t ctrl,
{
apply_keep_uid_filter (ctrl, keyblock, import_filter.keep_uid);
commit_kbnode (&keyblock);
@@ -91,7 +92,7 @@ index 5d3162c..f9acf95 100644
}
/* The keyblock is valid and ready for real import. */
-@@ -2002,6 +1973,13 @@ import_one_real (ctrl_t ctrl,
+@@ -2174,6 +2144,13 @@ import_one_real (ctrl_t ctrl,
err = 0;
stats->skipped_new_keys++;
}
diff --git a/gnupg-2.4.0-tests-Fix-tests-gpgme-for-in-source-tree-builds.patch b/gnupg-2.4.0-tests-Fix-tests-gpgme-for-in-source-tree-builds.patch
new file mode 100644
index 0000000..71daadf
--- /dev/null
+++ b/gnupg-2.4.0-tests-Fix-tests-gpgme-for-in-source-tree-builds.patch
@@ -0,0 +1,62 @@
+From 0486caf56f96a279c7fe381b2a49ec674d6e60e2 Mon Sep 17 00:00:00 2001
+From: NIIBE Yutaka <gniibe@fsij.org>
+Date: Wed, 21 Dec 2022 10:52:24 +0900
+Subject: tests: Fix tests/gpgme for in-source-tree builds.
+
+* tests/gpgme/Makefile.am: Don't use setup.scm/ dir.
+* tests/gpgme/all-tests.scm: Fix the name of the environment.
+
+--
+
+GnuPG-bug-id: 6313
+Fixes-commit: c19ea75f10d6278569619f90977ce7c820e9319d
+Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
+---
+ tests/gpgme/Makefile.in | 5 ++---
+ tests/gpgme/all-tests.scm | 4 ++--
+ 2 files changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/tests/gpgme/Makefile.in b/tests/gpgme/Makefile.in
+--- a/tests/gpgme/Makefile.in 2022-12-16 11:49:34.000000000 -0500
++++ b/tests/gpgme/Makefile.in 2022-12-20 23:35:26.757302512 -0500
+@@ -614,8 +614,7 @@ check: xcheck
+
+ .PHONY: xcheck
+ xcheck:
+- @$(MKDIR_P) setup.scm/tests \
+- tests/gpg lang/qt/tests lang/python/tests
++ @$(MKDIR_P) tests/gpg lang/qt/tests lang/python/tests
+ $(TESTS_ENVIRONMENT) $(abs_top_builddir)/tests/gpgscm/gpgscm$(EXEEXT) \
+ $(abs_srcdir)/run-tests.scm $(TESTFLAGS) $(TESTS)
+
+@@ -624,7 +623,7 @@ xcheck:
+ all-local: $(required_pgms)
+
+ clean-local:
+- -rm -rf setup.scm/tests tests/gpg lang/qt/tests lang/python/tests
++ -rm -rf tests lang
+
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
+diff --git a/tests/gpgme/all-tests.scm b/tests/gpgme/all-tests.scm
+index 1746c4ee1..aef7d6a21 100644
+--- a/tests/gpgme/all-tests.scm
++++ b/tests/gpgme/all-tests.scm
+@@ -41,7 +41,7 @@
+ (test::scm
+ #f
+ #f
+- (path-join "tests" "gpgme" "setup.scm" "tests" "gpg")
++ (path-join "tests" "gpgme" "tests" "gpg")
+ (in-srcdir "tests" "gpgme" "setup.scm")
+ "--" "tests" "gpg")))
+ (define setup-py
+@@ -49,7 +49,7 @@
+ (test::scm
+ #f
+ #f
+- (path-join "tests" "gpgme" "setup.scm" "lang" "python" "tests")
++ (path-join "tests" "gpgme" "lang" "python" "tests")
+ (in-srcdir "tests" "gpgme" "setup.scm")
+ "--" "lang" "python" "tests")))
+
diff --git a/gnupg.spec b/gnupg.spec
index 9887b6c..5d4e478 100644
--- a/gnupg.spec
+++ b/gnupg.spec
@@ -10,8 +10,8 @@
Summary: GNU privacy guard - a free PGP replacement
Name: gnupg
-Version: 2.3.8
-Release: 1
+Version: 2.4.0
+Release: 2
License: GPLv3
Group: File tools
URL: http://www.gnupg.org
@@ -19,6 +19,9 @@ Source0: ftp://ftp.gnupg.org/gcrypt/gnupg/%{pkgname}-%{version}.tar.bz2
Source1: sysconfig-gnupg
# (tpg) do not run under sddm user
Patch0: gnupg-2.2.32-conditions-user-sddm.patch
+# (tpg) do not wait couple of minutes, just display pinentry as soon as possible
+# https://bugs.kde.org/show_bug.cgi?id=458085
+Patch1: gnupg-2.4.0-display-password-prompt-immediately.patch
# (tpg) add patches from Fedora
# allow 8192 bit RSA keys in keygen UI with large RSA
@@ -26,10 +29,14 @@ Patch9: https://src.fedoraproject.org/rpms/gnupg2/raw/rawhide/f/gnupg-2.2.23-la
# fix missing uid on refresh from keys.openpgp.org
# https://salsa.debian.org/debian/gnupg2/commit/f292beac1171c6c77faf41d1f88c2e0942ed4437
Patch20: https://src.fedoraproject.org/rpms/gnupg2/raw/rawhide/f/gnupg-2.2.18-tests-add-test-cases-for-import-without-uid.patch
-Patch21: https://src.fedoraproject.org/rpms/gnupg2/raw/rawhide/f/gnupg-2.2.18-gpg-allow-import-of-previously-known-keys-even-without-UI.patch
+Patch21: https://src.fedoraproject.org/rpms/gnupg2/raw/rawhide/f/gnupg-2.4.0-gpg-allow-import-of-previously-known-keys-even-without-UI.patch
Patch22: https://src.fedoraproject.org/rpms/gnupg2/raw/rawhide/f/gnupg-2.2.18-gpg-accept-subkeys-with-a-good-revocation-but-no-self-sig.patch
# Fixes for issues found in Coverity scan - reported upstream
Patch30: https://src.fedoraproject.org/rpms/gnupg2/raw/rawhide/f/gnupg-2.2.21-coverity.patch
+
+# fix gpgme tests fail for in-source-tree builds (https://dev.gnupg.org/T6313)
+# (edited to patch Makefile.in instead of Makefile.am to avoid autoreconf)
+Patch31: https://src.fedoraproject.org/rpms/gnupg2/raw/rawhide/f/gnupg-2.4.0-tests-Fix-tests-gpgme-for-in-source-tree-builds.patch
BuildRequires: openldap-devel
BuildRequires: sendmail-command