Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/curl/
Date: Sat, 03 Sep 2022 00:34:21
Message-Id: 1662165244.bd4d42f83c774c36bf879a5b7ec89d373546743e.sam@gentoo
1 commit: bd4d42f83c774c36bf879a5b7ec89d373546743e
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Thu Sep 1 21:42:26 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Sep 3 00:34:04 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd4d42f8
7
8 net-misc/curl: drop USE=threads
9
10 USE=threads is a terrible USE flag (not the fault of net-misc/curl
11 or its maintainer) and we're looking to get rid of it entirely.
12
13 This is motivated further by the fact users have USE=threads
14 in make.conf seeking performance improvements and such (which is understandable)
15 but as per below, it can lead to conflicting and inconsistent effects.
16
17 (In particular, anyone with USE="threads" in make.conf (don't do this
18 for the reasons below!) will end up with a REQUIRED_USE issue between
19 the now-default USE=adns and USE=threads).
20
21 There are a few possibilities with threads support:
22 1. Upstreams always have threads support (hence USE=threads is only affecting
23 a "handful" of packages anyway, not every single package, as many will just
24 always be using pthreads and there's no way of disabling it);
25
26 2. The "threads" toggle means enabling some experimental or legacy implementation
27 (think e.g. dev-lang/perl, which uses USE=ithreads for this, as it breaks ABI)
28 (also applies to net-misc/curl given USE=threads doesn't help with the adns
29 functionality many applications desire, see linked bug);
30
31 3. Not having "threads" on enables some experimental or legacy implementation again
32 (this *again* applies to net-misc/curl given USE="-adns -threads" leaves
33 us with a dodgy implementation as well).
34
35 Commit 60b7aaa7a70149751446237d7207ff1ca20c256e enabled adns by default
36 (IUSE=+adns).
37
38 This commit drops USE=threads entirely and makes the default pthreads with
39 adns opt-in with IUSE=+adns still.
40
41 Now, the ebuild previously had REQUIRED_USE="threads? ( !adns )". I can't
42 see a reason for this other than making the previous situation "meaningful",
43 i.e. allowing people to decisively choose which is used at runtime, as
44 while curl can build with both threads and adns, I think adns ends up
45 preferred at runtime.
46
47 With this change and given all of the above, we actually want adns to
48 take priority if it's set, as threads will just be the default, so
49 drop the REQUIRED_USE.
50
51 Bug: https://bugs.gentoo.org/699632
52 See: 60b7aaa7a70149751446237d7207ff1ca20c256e
53 Signed-off-by: Sam James <sam <AT> gentoo.org>
54 Closes: https://github.com/gentoo/gentoo/pull/27111
55 Signed-off-by: Sam James <sam <AT> gentoo.org>
56
57 net-misc/curl/{curl-7.85.0.ebuild => curl-7.85.0-r1.ebuild} | 10 ++++------
58 1 file changed, 4 insertions(+), 6 deletions(-)
59
60 diff --git a/net-misc/curl/curl-7.85.0.ebuild b/net-misc/curl/curl-7.85.0-r1.ebuild
61 similarity index 96%
62 rename from net-misc/curl/curl-7.85.0.ebuild
63 rename to net-misc/curl/curl-7.85.0-r1.ebuild
64 index 15c6bef88efc..dfa9c49ff480 100644
65 --- a/net-misc/curl/curl-7.85.0.ebuild
66 +++ b/net-misc/curl/curl-7.85.0-r1.ebuild
67 @@ -13,15 +13,13 @@ SRC_URI="https://curl.haxx.se/download/${P}.tar.xz
68 LICENSE="curl"
69 SLOT="0"
70 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
71 -IUSE="+adns alt-svc brotli +ftp gnutls gopher hsts +http2 idn +imap ipv6 kerberos ldap mbedtls nss +openssl +pop3 +progress-meter rtmp samba +smtp ssh ssl sslv3 static-libs test telnet +tftp threads zstd"
72 +IUSE="+adns alt-svc brotli +ftp gnutls gopher hsts +http2 idn +imap ipv6 kerberos ldap mbedtls nss +openssl +pop3 +progress-meter rtmp samba +smtp ssh ssl sslv3 static-libs test telnet +tftp zstd"
73 IUSE+=" curl_ssl_gnutls curl_ssl_mbedtls curl_ssl_nss +curl_ssl_openssl"
74 IUSE+=" nghttp3 quiche"
75 VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/danielstenberg.asc
76
77 -# c-ares must be disabled for threads
78 -# only one default ssl provider can be enabled
79 +# Only one default ssl provider can be enabled
80 REQUIRED_USE="
81 - threads? ( !adns )
82 ssl? (
83 ^^ (
84 curl_ssl_gnutls
85 @@ -202,8 +200,8 @@ multilib_src_configure() {
86 --enable-proxy
87 --disable-sspi
88 $(use_enable static-libs static)
89 - $(use_enable threads threaded-resolver)
90 - $(use_enable threads pthreads)
91 + --enable-pthreads
92 + --enable-threaded-resolver
93 --disable-versioned-symbols
94 --without-amissl
95 --without-bearssl