[packages/kde4-kgpg] - rel 2; don't incorrectly warn about gpg agent not running when using gnupg >= 2.1

arekm arekm at pld-linux.org
Sun May 6 12:12:49 CEST 2018


commit c30a00d2d4a3eaf905b696abdfc4b8e63866ae55
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sun May 6 12:12:42 2018 +0200

    - rel 2; don't incorrectly warn about gpg agent not running when using gnupg >= 2.1

 gpg2.patch     | 17 +++++++++++++++++
 kde4-kgpg.spec |  5 ++++-
 2 files changed, 21 insertions(+), 1 deletion(-)
---
diff --git a/kde4-kgpg.spec b/kde4-kgpg.spec
index ee3d8b2..0abe9a6 100644
--- a/kde4-kgpg.spec
+++ b/kde4-kgpg.spec
@@ -7,13 +7,15 @@
 Summary:	K Desktop Environment - interface for GnuPG
 Name:		kde4-kgpg
 Version:	4.14.3
-Release:	1
+Release:	2
 License:	GPL
 Group:		X11/Applications
 Source0:	http://download.kde.org/%{_state}/%{version}/src/%{orgname}-%{version}.tar.xz
 # Source0-md5:	fa4ace4289fb73221b1eed744b06574a
+Patch0:		gpg2.patch
 URL:		http://www.kde.org/
 BuildRequires:	kde4-kdebase-devel >= %{version}
+BuildRequires:	kde4-kdepimlibs-devel >= %{version}
 Requires:	kde4-kdebase-workspace >= %{kdeworkspacever}
 Obsoletes:	kde4-kdeutils-kgpg
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -50,6 +52,7 @@ gpg przeznaczoną dla KDE. Ma następujące możliwości:
 
 %prep
 %setup -q -n %{orgname}-%{version}
+%patch0 -p1
 
 %build
 install -d build
diff --git a/gpg2.patch b/gpg2.patch
new file mode 100644
index 0000000..17ccbf5
--- /dev/null
+++ b/gpg2.patch
@@ -0,0 +1,17 @@
+--- kgpg-4.14.3/kgpg.cpp.org	2014-10-19 22:56:06.000000000 +0200
++++ kgpg-4.14.3/kgpg.cpp	2018-05-06 12:05:07.733097102 +0200
+@@ -86,7 +86,13 @@ int KGpgApp::newInstance()
+ 		connect(w, SIGNAL(createNewKey()), s_keyManager, SLOT(slotGenerateKey()));
+ 
+ 		if (!gpgPath.isEmpty()) {
+-			if ((KgpgInterface::getGpgBoolSetting(QLatin1String( "use-agent" ), gpgPath)) && (qgetenv("GPG_AGENT_INFO").isEmpty()))
++			const int gpgver = GPGProc::gpgVersion(GPGProc::gpgVersionString(KGpgSettings::gpgBinaryPath()));
++
++			// Warn if sign of a properly running gpg-agent cannot be determined
++			// The environment variable has been removed in GnuPG 2.1, the agent is started internally by
++			// any program part of GnuPG that needs it, so simply assume everything is fine.
++			if ((gpgver < 0x20100) && KgpgInterface::getGpgBoolSetting(QLatin1String("use-agent"), gpgPath) &&
++					qgetenv("GPG_AGENT_INFO").isEmpty())
+ 				KMessageBox::sorry(0, i18n("<qt>The use of <b>GnuPG Agent</b> is enabled in GnuPG's configuration file (%1).<br />"
+ 					"However, the agent does not seem to be running. This could result in problems with signing/decryption.<br />"
+ 					"Please disable GnuPG Agent from KGpg settings, or fix the agent.</qt>", gpgPath));
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/kde4-kgpg.git/commitdiff/c30a00d2d4a3eaf905b696abdfc4b8e63866ae55



More information about the pld-cvs-commit mailing list