Bug 587337

Summary: simplify deps, install a -gui by default
Product: [Fedora] Fedora Reporter: Rex Dieter <rdieter>
Component: pinentryAssignee: Rex Dieter <rdieter>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: axel.thimm, christoph.wickert, rdieter, sochotni
Target Milestone: ---Keywords: FutureFeature, Tracking
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-02 14:17:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 587326, 587328    
Bug Blocks:    

Description Rex Dieter 2010-04-29 16:03:03 UTC
While digging through packages today that were hard-coding one pinentry gui or another.

As it is, stuff can
Requires: pinentry
which includes only the curses-based one.  Gui apps need to go one further and do something like:
Requires: pinentry-gui

We can do better, by not defaulting to the simple curses case, but instead pulling in a gui.  My first plan a is as follows:

make a pinentry-curses subpkg, in addition to -gtk, -qt.
each of these,
Provides: pinentry-frontend

The new main package would include the basic wrapper, and
Requires: pinentry-frontend

Given:
1.  yum's tricks of picking the shortest name that satisfies a dep, or even the new criteria of installing what requires the least new deps. 
2.  adding pinentry-gtk, pinentry-qt prudently to various -desktop groups in comps

Advantages: 
We can be reasonably assured that anything that already 
Requires: gnupg2
(or Requires: pinentry )
directly will now get a -gui installed by default.

Disadvantages:
pinentry-curses won't necessarily get installed anymore.  Folks wanting or needing this will need to explictly install it or add deps.


A more conservative plan b would to just implement part 2. above, and continue to require gui apps to explicitly
Requires: pinentry-gui


Thoughts?

Comment 1 Axel Thimm 2010-04-29 17:45:08 UTC
Hi,

(In reply to comment #0)
> 1.  yum's tricks of picking the shortest name that satisfies a dep, or even the
> new criteria of installing what requires the least new deps. 

I wouldn't reply on this part because this is actually just happenstance that has been documented. If we continue to use this idiom people will feel compelled to name their packages according to such non-intuitive selection procedures. I also don't think the yum author endorse using this idiom and perhaps a yum reworking would lift this hack in the future breaking anything that depends on it.

Actually I feel yum should start yielding a warning about this and a couple of releases later error out if there are several packages satisfying a requirement instead of going with the smallest name (why not the largest? why not alphabetical, it all is similarly arbitrary). But that's getting OT.

> Advantages: 
> We can be reasonably assured that anything that already 
> Requires: gnupg2
> (or Requires: pinentry )
> directly will now get a -gui installed by default.
> 
> Disadvantages:
> pinentry-curses won't necessarily get installed anymore.  Folks wanting or
> needing this will need to explictly install it or add deps.

Another disadvantage is that a non-gui server setup that needs gpg signing or encrypting will start pulling in packages related to gtk/qt/xorg libs etc that it doesn't need to.

> A more conservative plan b would to just implement part 2. above, and continue
> to require gui apps to explicitly
> Requires: pinentry-gui

I'd like the plan b. :)

Comment 2 Rex Dieter 2010-04-29 17:58:41 UTC
> Another disadvantage is that a non-gui server setup...

true, partly why I mentioned the DA, but that is hardly the common case we should be optimizing defaults for, is it?

Comment 3 Axel Thimm 2010-04-29 18:30:57 UTC
(In reply to comment #2)
> > Another disadvantage is that a non-gui server setup...
> 
> true, partly why I mentioned the DA, but that is hardly the common case we
> should be optimizing defaults for, is it?    

What's a DA (I only associate district attorney to DA :)?

But I agree, the default should be to have the gui packages installed, just not on the lowest level that even affects chroot setups (just to deliver some numbers, installing gnupg2 on F13 requires additional 6MB in a minimal chroot. Adding pinentry-gtk raises this to another 41MB.)

The high level approach to add the gui packages to the respective desktop groups is probably the golden mean IMHO.

Comment 4 Stanislav Ochotnicky 2010-04-30 07:20:00 UTC
(In reply to comment #1)
> Another disadvantage is that a non-gui server setup that needs gpg signing or
> encrypting will start pulling in packages related to gtk/qt/xorg libs etc that
> it doesn't need to.

I have no idea how many people are using Fedora on a server-like setup (that is a bit crazy IMO), but I too think that pulling in Xorg and other dependencies  just because of gnupg is a little bit too much.


> > A more conservative plan b would to just implement part 2. above, and continue
> > to require gui apps to explicitly
> > Requires: pinentry-gui
> 
> I'd like the plan b. :)    

I would also say just to add gui pinentry packages to desktop groups and let them require pinentry-gui.

Maybe we should think more about ways to stop people from using pinentry-qt/pinentry-gtk directly in their spec files. I believe this should be doable without too much trouble?

Comment 5 Rex Dieter 2010-04-30 12:03:08 UTC
ok, let's play it safe for now. :)

I've already files a few bugs about that recently, will add them as deps here.

Comment 6 Rex Dieter 2011-09-02 14:17:27 UTC
plan b implemented