Bug 626965 - Upgrading gnupg2 removes /usr/bin/gpg
Summary: Upgrading gnupg2 removes /usr/bin/gpg
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: gnupg2
Version: 13
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Rex Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-24 18:45 UTC by Mark Wielaard
Modified: 2014-01-21 06:19 UTC (History)
7 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2011-06-28 14:03:10 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mark Wielaard 2010-08-24 18:45:38 UTC
Description of problem:

After upgrading gnupg2 the /usr/bin/gpg program disappears breaking various programs (like evolution signature checking).

Version-Release number of selected component (if applicable):

gnupg2-2.0.14-6.fc13.i686

How reproducible:

Always.

Steps to Reproduce:
1. yum upgrade
2. See upgrade from gnupg2-2.0.14-4.fc13.i686 to gnupg2-2.0.14-6.fc13.i686
3. No working /usr/bin/gpg
  
Actual results:

/usr/bin/gpg disappears.

Expected results:

/usr/bin/gpg being there, either provided directly or through dependency.

Additional info:

Apparently you now need to install both gnupg and gnupg2 to get a full gpg install. But gnupg2 doesn't depend on gnupg so after upgrading various programs disappear that were there with the original gnupg2 install (gpg, gpgv, gpgsplit and gpg-zip) breaking anything that depended on these programs.

Comment 1 Mark Wielaard 2010-08-24 18:50:46 UTC
Note that it isn't easy to figure out you now also need to install the gnupg package since yum won't give you any hint:

$ sudo yum install /usr/bin/gpg
Loaded plugins: auto-update-debuginfo, fastestmirror, presto, refresh-
              : packagekit, remove-with-leaves, rpm-warm-cache
Found 135 installed debuginfo package(s)
[...]
Setting up Install Process
Package matching gnupg2-2.0.14-2.fc13.i686 already installed. Checking for update.
Nothing to do

Comment 2 Brian Lane 2010-08-24 18:55:38 UTC
Rex, maybe gnupg2 should require gnupg?

Comment 3 Tomas Mraz 2010-08-24 18:57:37 UTC
The output of yum install /usr/bin/gpg does not make any sense to me. Is that on system which already has installed gnupg2-2.0.14-6.fc13? Does it still happen after you do 'yum clean all'?

Generally if the dependencies were right the switch back to gnupg should work fine. That means if evolution requires /usr/bin/gpg for signature checking, etc. the evolution (or its dependencies) should require it.

Comment 4 Tomas Mraz 2010-08-24 19:00:06 UTC
Brian, perhaps on F13 we should have added it, although it does not make much sense to me as the 'damage' is already done. On F14 I am definitely against such requires as this would be only a workaround for missing proper requirements in other packages.

Comment 5 Rex Dieter 2010-08-24 19:01:35 UTC
I agree (if it's to be done, do for < f14 only).

I'll try to find out why
yum install /usr/bin/gpg
doesn't do the right thing here

Comment 6 Mark Wielaard 2010-08-24 19:08:17 UTC
(In reply to comment #3)
> The output of yum install /usr/bin/gpg does not make any sense to me. Is that
> on system which already has installed gnupg2-2.0.14-6.fc13? Does it still
> happen after you do 'yum clean all'?

Yes, that is with gnupg2-2.0.14-6.fc13 installed (and without gnupg installed). Doing a yum clean all doesn't change the message. The message is strange since it mentions an older version of the package gnupg2-2.0.14-2.fc13.i686.
 
> Generally if the dependencies were right the switch back to gnupg should work
> fine. That means if evolution requires /usr/bin/gpg for signature checking,
> etc. the evolution (or its dependencies) should require it.

evolution does indeed not appear to require gnupg[2]. It just prints "Error verifying signature Failed to execute gpg." on any email that has a gpg signature. Then I couldn't figure out why the gpg binary was missing (The above yum message is really confusing. It wasn't till I was filing this bug report that I noticed the gnupg package and I tried installing that to see if it happened to provide the gpg binary).

But I also have local scripts that use the gpg binary. It is really confusing it got removed.

Comment 7 Rex Dieter 2010-08-24 19:32:11 UTC
Re: evolution's gpg support 
it must be considered optional enough that a dependency wasn't added for either gnupg or gnupg2  (if it were, then gnupg would've been pulled in when you updated).

Comment 8 Rex Dieter 2010-08-24 19:34:18 UTC
Anyway, spoke with seth (yum dude) on irc about the 
yum install /usr/bin/gpg
oddity, and sounds like he's ok with fixing yum to do the right thing here (to pull in gnupg)

Comment 9 seth vidal 2010-08-24 20:54:58 UTC
okay so there's more going on here.

I thought the issue was that newer gnupg2 was installed - and it PARTIALLY is.

but the real problem is that the older gnupg2 obsoletes gnupg :(

So when the pkgs are compared the older gnupg2 is at least a good ballpark. 

yum should fix this problem it is just less.... obvious :)

Comment 10 seth vidal 2010-08-24 21:09:38 UTC
not sure this is an EXCELLENT fix but it does seem to dtrt:

--- a/yum/depsolve.py
+++ b/yum/depsolve.py
@@ -1195,6 +1195,10 @@ class Depsolve(object):
                     #  We get here from bestPackagesFromList(), give a giant
                     # bump to stuff that is already installed.
                     pkgresults[pkg] += 1000
+                elif newest.verGT(pkg):
+                    # if the version we're looking at is older than what we have installed
+                    # score it down like we would an obsoleted pkg
+                    pkgresults[pkg] -= 1024
             else:
                 # just b/c they're not installed pkgs doesn't mean they should
                 # be ignored entirely. Just not preferred

Comment 11 rambler8 2010-08-25 01:09:31 UTC
On a system that hasn't been updated yet and has gnupg2 (gnupg2-2.0.14-4.fc13.x86_64) installed and does not have gnupg installed:

$ ls -al /usr/bin/gpg
lrwxrwxrwx. 1 root root 4 Aug 18 13:25 /usr/bin/gpg -> gpg2

$ rpm -q --whatprovides /usr/bin/gpg
gnupg2-2.0.14-4.fc13.x86_64


Are there backwards compatibility problems with gpg2? I haven't encountered any as long as the symlink from gpg -> gpg2 is in place for other packages that look for /usr/bin/gpg. If there aren't any other issues, I'm in favor of keeping the /usr/bin/gpg -> gpg2 symlink in the gnupg2 package and having gnupg2 obsolete gnupg rather than having to install both packages

Comment 12 Tomas Mraz 2010-08-25 06:52:25 UTC
(In reply to comment #11)
> Are there backwards compatibility problems with gpg2? I haven't encountered any
> as long as the symlink from gpg -> gpg2 is in place for other packages that
> look for /usr/bin/gpg. If there aren't any other issues, I'm in favor of
> keeping the /usr/bin/gpg -> gpg2 symlink in the gnupg2 package and having
> gnupg2 obsolete gnupg rather than having to install both packages

Unfortunately there really are backwards compatibility problems which the gnupg2 upstream is not willing to fix. Most of the use cases work fine, but there are some edge cases where the gnupg2 behaves substantially differently. Most of these edge cases are related to addition of the gpg-agent to the game. The gnupg2 upstream moreover stated that gnupg2 does not obsolete gnupg and both of these packages have their own use cases and will be developed in the future. Although I am not happy with this decision of upstream as I think that with some effort gnupg2 could support almost everything in backwards compatible way with gnupg.

Comment 13 Eric Mesa 2010-09-07 20:56:00 UTC
Just updated to the latest Fedora 13 and this happened to me.  Has the fix not yet been pushed to yum?

Comment 14 Tomas Mraz 2010-09-07 21:08:56 UTC
There are multiple fixes needed - one fix in yum and one in evolution or gnupg2 (to require gnupg). The gnupg2 package with the added Requires was not yet even built.

Comment 15 Bug Zapper 2011-06-01 10:33:44 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '13'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 13's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 13 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 16 Bug Zapper 2011-06-28 14:03:10 UTC
Fedora 13 changed to end-of-life (EOL) status on 2011-06-25. Fedora 13 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.