Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 382415 - app-crypt/gnupg depends on virtual/mta
Summary: app-crypt/gnupg depends on virtual/mta
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Crypto team [DISABLED]
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-09 17:34 UTC by Ed Wildgoose
Modified: 2013-01-19 20:13 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Wildgoose 2011-09-09 17:34:56 UTC
gnupg-1.4 has a dependency on virtual/mta, this sucks in a whole mail system

I'm trying to build an embedded install and I just need the main gnupg files to sign a few files, not a whole mail server. 

Problem is that you can't set package.provided for virtual/mta, so it's quite hard to work around this (I don't want to package.provided a fake mailserver package because this then causes problems down the line when we adjust the build to include a mailserver...)

There is minimal use of emailing within gnupg - can the dependency please be struck from the ebuild?

Thanks

Reproducible: Always
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-09-10 09:33:19 UTC
The virtual/mta is there as it's one of the ways to connect to a keyserver.
See gnupg-2.0.18/keyserver/gpg2keys_mailto.in

Alternatively, come up with a suitable USE flag, and we can consider disabling it in the configure script as well.

As for your system, you really should have a mail setup of some sort, I strongly suggest using nullmailer for embedded systems (NOT ssmtp), and setting it to discard mails if queuing until there is connectivity is not useful.
Comment 2 Ed Wildgoose 2011-09-10 12:51:46 UTC
Please note that I'm referring to gnupg 1.4?

From what I can see, the requirement for sendmail is limited to a single perl script:
    /usr/libexec/gnupg/gpgkeys_mailto

Googling on that turns up a *very* short list of pages, all just listing files in some package. So, it's hard to argue that this is such a well used feature?

With regards to creating a USE flag - is it really appropriate to create a new use flag to mask a single perl utility from being installed? If there is some appropriate use flag then happy to send a patch, but this feels like overkill?

So, I repeat that emailing is practically non existent within gnupg-1.4

Additionally, surely RDEPENDS are for pieces of functionality which are largely *required* for correct operation?  Should *extremely* optional dependencies not be excluded from RDEPEND and at most listed in some WARN at install time?  This is true for a whole bunch of other ebuilds - why not this one?  (gpgkeys_mailto seems like a convenience script at best, not core functionality?)

Please look again at the actual package.  Please don't just shoot from the hip on this.  (Note I have no opinion on gnupg-2, this is specifically about 1.4)
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-09-10 19:33:10 UTC
the mailto functionality has not changed in GPG2, it's still the same as in GPG1.

It's used in the very specific case that you specify a keyserver w/ a mailto: URL, in which case when you tell it submit a key, it fires an email.

I said a USE flag, because without it, we get the automagic dependency on the existence of the sendmail binary. The USE flag in this case needs to control --enable-mailto to avoid that automagic. The alternative is that we pass an explicit --with-mailprog=/usr/lib/sendmail and then that mailto binary is broken unless the binary is actually installed.

I think that the USE flag option provides the best representation of the dependencies.
Comment 4 Dave Kemper 2012-08-14 19:01:59 UTC
I would also like to see this issue addressed.  As you point out, the dependency is there for a specific use case; for users who know they won't use that functionality, there's no need to install an MTA.

(In reply to comment #1)
> Alternatively, come up with a suitable USE flag, and we can consider
> disabling it in the configure script as well.

I am not sure what you're asking for.  Do you just want the name of a flag?  A patch that implements the entire fix?  Something in between?  Honestly, I think you're in a much better position to make all of those decisions/modifications.  But I'm not sure I understand the request.
Comment 5 Dave Kemper 2012-09-01 20:43:03 UTC
Is Robin still monitoring this bug?  If not, can someone else please tell me how I can help move it forward?
Comment 6 Alon Bar-Lev (RETIRED) gentoo-dev 2012-12-15 23:13:15 UTC
robbat2: as far as I see in gpg-2, without --enable-mailto, no mta is used... so this dependency can be safely removed keeping current behaviour.

We can add USE flag to enable this...
Comment 7 Ed Wildgoose 2012-12-15 23:14:58 UTC
Yes please.  Same also for gnupg-1 please.
Comment 8 Alon Bar-Lev (RETIRED) gentoo-dev 2012-12-15 23:19:41 UTC
(In reply to comment #7)
> Yes please.  Same also for gnupg-1 please.

In gnupg-1.4 we explicitly enable this using --enable-mailto.
Comment 9 Alon Bar-Lev (RETIRED) gentoo-dev 2013-01-12 19:22:34 UTC
robbat2: need your response here...

This what I think we should do:

Add mta USE flag for gnupg to enable --enable-mailto and depend on virtual/mta, default is on for gnupg-1.4, default off for gnupg-2.
Comment 10 Alon Bar-Lev (RETIRED) gentoo-dev 2013-01-19 20:13:29 UTC
gnupg-1.4.13-r1
gnupg-2.0.19-r1

Added mta USE no forced default.