Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 297096 - net-misc/curl: USE "ssl" is ignored and not respected.
Summary: net-misc/curl: USE "ssl" is ignored and not respected.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High major (vote)
Assignee: Daniel Black (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-15 19:59 UTC by Leif Walsh
Modified: 2010-03-16 21:42 UTC (History)
2 users (show)

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


Attachments
add ssl to use flags, defaults to gnutls (curl-use-ss.patch,1.21 KB, patch)
2010-03-01 18:27 UTC, Florian Scandella
Details | Diff
curl-ssl.patch (curl-ssl.patch,3.17 KB, patch)
2010-03-15 22:55 UTC, SpanKY
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Leif Walsh 2009-12-15 19:59:39 UTC
The ebuild for net-p2p/transmission-1.76 depends on >=net-misc/curl-7.16.3[ssl].  curl has moved to the 'openssl' use flag, as of -7.19.7 and therefore transmission keeps trying to pull curl down to 7.19.6.

A new ebuild should be made that depends on the old curl spec OR on the new version without [ssl].

Reproducible: Always

Steps to Reproduce:
1. install =net-misc/curl-7.19.7
2. install =net-p2p/transmission-1.76
3. watch the badness

Actual Results:  
Suggests downgrade of curl to 7.19.6.

Expected Results:  
Used the up-to-date curl with the new use flags.

This may or may not happen with portage.  I have only verified it with paludis (and it keeps oscillating between the two versions which is REALLY annoying).
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2009-12-15 20:08:25 UTC
Looks like curl's ebuild is totally broken, it doesn't respect [ssl] anymore and is using local use flag openssl instead of ssl. Also this change was made without checking reverse dependencies. Please revert it soon as possible.
Comment 2 Daniel Black (RETIRED) gentoo-dev 2009-12-15 20:51:54 UTC
(In reply to comment #1)
> Looks like curl's ebuild is totally broken,
exaggeration?
> it doesn't respect [ssl] anymore
so? ssl was just confusion and not really indicitave.

> and is using local use flag openssl instead of ssl. Also this change was made
> without checking reverse dependencies. Please revert it soon as possible.
I'm not willing to revert based on this.

net-im/centerim/centerim-4.22.8.ebuild was the only fix I saw at the time so sorry for missing this one. The same approach of it should work.

                || (
                        <net-misc/curl-7.19.7[ssl]
                        >=net-misc/curl-7.19.7[openssl]
                        >=net-misc/curl-7.19.7[gnutls]
                        >=net-misc/curl-7.19.7[nss]
                )

dev-util/cmake/cmake-2.8.0.ebuild may need the same fix.
Comment 3 Petteri Räty (RETIRED) gentoo-dev 2009-12-15 21:09:12 UTC
I think in the tree so far ssl use flag has marked using the default implementation and then other flags exist for other implementations. I think we should keep the behavior in the tree consistent. See:

qgrep -eH "IUSE.*gnutls" | grep ssl
Comment 4 SpanKY gentoo-dev 2009-12-15 22:41:41 UTC
as mentioned on the mailing list, if a package (like curl) has multiple implementations for ssl support, then it may add more USE flags to control behavior.  but blatantly ignoring the *generic* ssl USE flag is wrong.

i dont know what the upstream preference is with curl, but there are many possible ways of doing this right:
IUSE="ssl gnutls nss"
 - USE=ssl means "i want ssl support", and divining gnutls/nss/openssl preference is trivial based on the state of gnutls/nss

IUSE="ssl openssl gnutls nss"
 - more pedantic, but USE=ssl means "enable ssl support" while the other flags explicitly select a provider ... if none are selected, then the default upstream preference is used
Comment 5 Daniel Black (RETIRED) gentoo-dev 2009-12-17 02:21:29 UTC
(In reply to comment #4)
> behavior.  but blatantly ignoring the *generic* ssl USE flag is wrong.

ok, reasonable critizism. I'm leaving on a not-very internet connected holiday in <24hrs. I don't have time to fully fix this between now and then. Feel free to commit a fix.
Comment 6 SpanKY gentoo-dev 2009-12-17 10:29:45 UTC
did you have a preference as to which USE flag variant you'd like ?
Comment 7 Tomáš Chvátal (RETIRED) gentoo-dev 2009-12-17 12:01:45 UTC
Based on ebuild syntax i think gnutls is the preffered one.
Comment 8 Daniel Black (RETIRED) gentoo-dev 2009-12-17 12:08:26 UTC
(In reply to comment #7)
> Based on ebuild syntax i think gnutls is the preferred one.

thats the way i've historically done it and i'm happy for this to continue
Comment 9 SpanKY gentoo-dev 2009-12-17 12:27:48 UTC
that's not what i meant ... do you want to keep USE=openssl ?
Comment 10 Florian Scandella 2010-03-01 18:27:21 UTC
Created attachment 221637 [details, diff]
add ssl to use flags, defaults to gnutls

what's the status on this? here's a hacked up patch ... works for me ..
Comment 11 SpanKY gentoo-dev 2010-03-15 22:55:14 UTC
Created attachment 223813 [details, diff]
curl-ssl.patch

i'm going to commit this patch if no one complains.  it changes curl behavior to match upstream: openssl, then gnutls, then nss.  you can see this preference in the configure.ac file itself:
 - it checks for openssl
 - if openssl not found, it checks for gnutls
 - if openssl + gnutls not found, it checks for nss

so the variant i chose is IUSE="ssl gnutls nss".  USE="ssl" controls whether SSL support is enabled at all (so other packages only need net-misc/curl[ssl]), while gnutls/nss states a preference over openssl.
Comment 12 Tomáš Chvátal (RETIRED) gentoo-dev 2010-03-15 23:03:24 UTC
Good patch.
Maybe you should also smash users nose if he has -ssl and enables nss or gnutls with some ewarn?
Comment 13 SpanKY gentoo-dev 2010-03-16 21:42:58 UTC
added net-misc/curl-7.20.0-r1 with the proposed changes

Tomáš: ive added an ewarn for USE=-ssl and USE=gnutls/USE=nss; thanks

KDE: you'll probably want to update cmake requirements on gnutls to accept [ssl] and down the line, only depend on that USE flag