Bug 340676 - KGpg should support GnuPG 2.1
Summary: KGpg should support GnuPG 2.1
Status: RESOLVED FIXED
Alias: None
Product: kgpg
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Unspecified
: NOR wishlist
Target Milestone: ---
Assignee: Rolf Eike Beer
URL:
Keywords:
Depends on: 341535 342249 352910
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-06 09:44 UTC by Samir Nassar
Modified: 2017-10-18 17:09 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
ignore if GPG_AGENT_INFO is not set if GnuPG 2.1 is used (2.92 KB, patch)
2014-11-25 23:06 UTC, Rolf Eike Beer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Samir Nassar 2014-11-06 09:44:38 UTC
Seemingly major architectural changes are coming with the newly released GnuPG 2.1 - https://gnupg.org/faq/whats-new-in-2.1.html

Reproducible: Didn't try




No packages are available yet to test KGPG against GnuPG 2.1
Comment 1 Samir Nassar 2014-11-06 10:17:10 UTC
Linking to tracking issue in GnuPG BTS: https://bugs.g10code.com/gnupg/issue1750
Comment 2 Tim Ruffing 2014-11-25 11:30:47 UTC
kgpg warns the user if gpg is configured to use the gpg-agent but the environment variable GPG_AGENT_INFO is not set. However, GPG_AGENT_INFO is not used anymore in GnuPG 2.1, see
https://gnupg.org/faq/whats-new-in-2.1.html#autostart .

The warning is triggered here:
https://projects.kde.org/projects/kde/kdeutils/kgpg/repository/revisions/master/entry/kgpg.cpp#L89
Comment 3 Rolf Eike Beer 2014-11-25 23:06:43 UTC
Created attachment 89725 [details]
ignore if GPG_AGENT_INFO is not set if GnuPG 2.1 is used

Please check if that patch works for you.
Comment 4 Tim Ruffing 2014-12-03 12:16:24 UTC
(In reply to Rolf Eike Beer from comment #3)
> Created attachment 89725 [details]
> ignore if GPG_AGENT_INFO is not set if GnuPG 2.1 is used
> 
> Please check if that patch works for you.

The patch works fine for me.
Comment 5 Rolf Eike Beer 2014-12-03 20:22:23 UTC
Git commit 4c66dbd2687d502a15477c80dc2daa4b2f159ccc by Rolf Eike Beer.
Committed on 25/11/2014 at 17:31.
Pushed by dakon into branch 'Applications/14.12'.

do not warn if GPG_AGENT_INFO is not set and GnuPG >= 2.1 is used

GnuPG 2.1 starts the agent internally, so this warning doesn't make sense then.

M  +14   -10   kgpg.cpp

http://commits.kde.org/kgpg/4c66dbd2687d502a15477c80dc2daa4b2f159ccc
Comment 6 Rolf Eike Beer 2014-12-03 20:30:37 UTC
That warning should be gone in Applications 14.12.

One thing that may be broken with GnuPG 2.1 is the CAFF function (sign & mail uid). It would be nice if you could check if that works or not.
Comment 7 Samir Nassar 2014-12-03 21:00:27 UTC
I tested CAFF with GnuPG 2.1 using KGPG Version 2.13.1and KDE Development Platform 4.14.3.

Clicking sign and email immediately killed KGPG.
Comment 8 Rolf Eike Beer 2014-12-03 21:03:38 UTC
Please file a new bug for this and add a backtrace to it. You can then add this bug to the "Blocks:" field of the new bug.
Comment 9 Samir Nassar 2014-12-03 21:13:59 UTC
I wish I could. I restarted KGPG and now the application does nothing when I attempt to sign ID and email.
Comment 10 Christian Stadelmann 2016-01-12 10:57:46 UTC
(In reply to Rolf Eike Beer from comment #6)
> That warning should be gone in Applications 14.12.

This warning is not gone in kgpg 15.08.3.
Comment 11 Christian Stadelmann 2016-01-12 11:07:37 UTC
(In reply to Christian Stadelmann from comment #10)
> (In reply to Rolf Eike Beer from comment #6)
> > That warning should be gone in Applications 14.12.
> 
> This warning is not gone in kgpg 15.08.3.

Sorry, I meant Kgpg 2.16.1 on KDE 4.14.14, which is what it is reporting in its about dialog. It is packaged from KDE Applications 15.08.3 though.
Comment 12 Rolf Eike Beer 2016-01-19 11:47:30 UTC
> Sorry, I meant Kgpg 2.16.1 on KDE 4.14.14, which is what it is 
> reporting in its
> about dialog. It is packaged from KDE Applications 15.08.3 though.

Please start kdebugdialog and make sure that section 2100 is enabled. 
Then quit all running KGpg instances and start a new instance from 
commandline. There should be output like this:

kgpg(19166) GnupgBinary::setBinary: version is "2.1.10" 131338

What is the exact output of your version?
Comment 13 Christian Stadelmann 2016-01-19 12:41:10 UTC
Hm, my kgpg says:

kgpg(4437) GnupgBinary::setBinary: checking version of GnuPG executable "gpg"
kgpg(4437) GnupgBinary::setBinary: version is "1.4.20" 66580

and I have both gpg 1.4.20  and gpg2 2.1.9 installed. After setting the gpg binary path to "gpg2" instead of "gpg" what it was before, this message is gone and KGpg works fine.

Shouldn't KGpg use gnupg2 by default? Is this a packaging issue?
Comment 14 Christian Stadelmann 2016-01-19 12:42:05 UTC
Sorry, I didn't mean "this message is gone" but meant "it now prints this:

kgpg(5082) GnupgBinary::setBinary: checking version of GnuPG executable "gpg2"
kgpg(5082) GnupgBinary::setBinary: version is "2.1.9" 131337
Comment 15 Rolf Eike Beer 2016-01-20 10:11:27 UTC
KGpg will pick gpg2 first if you run the first start wizard. Afterwards 
it will stick with whatever was found there or what you explicitely set 
in the settings dialog. If you did never run the first start wizard 
because your distro shipped a default config file, then it may be a 
config issue, if gpg2 is actually the default gpg on your distro.

> kgpg(5082) GnupgBinary::setBinary: checking version of GnuPG executable 
> "gpg2"
> kgpg(5082) GnupgBinary::setBinary: version is "2.1.9" 131337

Is the warning about the non-running agent now gone?

For the 1.4 version it will be actually be right as your agent was 
probably not started.
Comment 16 Christian Stadelmann 2016-01-20 10:26:10 UTC
Yes, the warning is gone with gpg2 (2.1.9).

Fedora 23's version of KGpg seems to prefer gpg 1.x over gpg2 on installation. So this is a packaging issue. Thanks for your help and sorry for the noise! As far as this issue affects gpg2 2.1.x, I think it can be closed.
Comment 17 Rolf Eike Beer 2017-10-18 17:09:32 UTC
Should all be fine now.