Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 511002 - net-misc/curl - add multilib support
Summary: net-misc/curl - add multilib support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: gx86-multilib
  Show dependency tree
 
Reported: 2014-05-22 08:13 UTC by Greg Turner
Modified: 2014-07-03 21:53 UTC (History)
3 users (show)

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


Attachments
multilibutize net-misc/curl-7.37.0 (teh.patch,5.49 KB, patch)
2014-05-22 08:13 UTC, Greg Turner
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Turner 2014-05-22 08:13:44 UTC
Created attachment 377406 [details, diff]
multilibutize net-misc/curl-7.37.0

-
Comment 1 Greg Turner 2014-05-22 21:37:21 UTC
Just a note, I noticed that my enclosed patch contains an emul-linux-x86 blocker that makes no sense anymore (even when it did make sense, that was only so in my overlay).

So that should be updated to whatever is the state of the art if/when it goes in.

I'm not sure how that's being organized these days, anyhow -- hopefully whoever is looking at this will know more than me about it; if not, one of us should bug some sme on irc.
Comment 2 Anthony Basile gentoo-dev 2014-05-31 13:54:29 UTC
Do you want to review this ebuild before I add it to the tree?
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-05-31 21:06:26 UTC
Comment on attachment 377406 [details, diff]
multilibutize net-misc/curl-7.37.0

>-		curl_ssl_axtls?  ( net-libs/axtls  app-misc/ca-certificates )
>-		curl_ssl_cyassl? ( net-libs/cyassl app-misc/ca-certificates )
>+		curl_ssl_axtls?  ( net-libs/axtls[${MULTILIB_USEDEP}]  app-misc/ca-certificates )
>+		curl_ssl_cyassl? ( net-libs/cyassl[${MULTILIB_USEDEP}] app-misc/ca-certificates )

Those are not multilib yet. I'm not a fan of all this 'let's support 7 different SSL libraries, what can possibly go wrong?' but I think we need to convert them all first. 

> 		curl_ssl_gnutls? (
> 			|| (
>-				( >=net-libs/gnutls-3[static-libs?] dev-libs/nettle )
>-				( =net-libs/gnutls-2.12*[nettle,static-libs?] dev-libs/nettle )
>-				( =net-libs/gnutls-2.12*[-nettle,static-libs?] dev-libs/libgcrypt[static-libs?] )
>+				( >=net-libs/gnutls-3[static-libs?,${MULTILIB_USEDEP}] dev-libs/nettle[${MULTILIB_USEDEP}] )
>+				( =net-libs/gnutls-2.12*[nettle,static-libs?,${MULTILIB_USEDEP}] dev-libs/nettle[${MULTILIB_USEDEP}] )
>+				( =net-libs/gnutls-2.12*[-nettle,static-libs?,${MULTILIB_USEDEP}] dev-libs/libgcrypt[static-libs?,${MULTILIB_USEDEP}] )

No gnutls-2.12* supports multilib either but this is probably fine. Multilib people will simply have to have >=3.

> 			)
> 			app-misc/ca-certificates
> 		)
>-		curl_ssl_openssl? ( dev-libs/openssl[static-libs?] )
>-		curl_ssl_nss? ( dev-libs/nss app-misc/ca-certificates )
>-		curl_ssl_polarssl? ( net-libs/polarssl:= app-misc/ca-certificates )
>+		curl_ssl_openssl? ( dev-libs/openssl[static-libs?,${MULTILIB_USEDEP}] )
>+		curl_ssl_nss? ( dev-libs/nss[${MULTILIB_USEDEP}] app-misc/ca-certificates )

nss is not multilib as well.

>+		curl_ssl_polarssl? ( net-libs/polarssl:=[${MULTILIB_USEDEP}] app-misc/ca-certificates )
> 	)
>-	idn? ( net-dns/libidn[static-libs?] )
>-	adns? ( net-dns/c-ares )
>-	kerberos? ( virtual/krb5 )
>-	metalink? ( >=media-libs/libmetalink-0.1.0 )
>-	rtmp? ( media-video/rtmpdump )
>-	ssh? ( net-libs/libssh2[static-libs?] )
>-	sys-libs/zlib"
>+	idn? ( net-dns/libidn[static-libs?,${MULTILIB_USEDEP}] )
>+	adns? ( net-dns/c-ares[${MULTILIB_USEDEP}] )

Ditto.

>+	kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
>+	metalink? ( >=media-libs/libmetalink-0.1.0[${MULTILIB_USEDEP}] )
>+	rtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] )
>+	ssh? ( net-libs/libssh2[static-libs?,${MULTILIB_USEDEP}] )

3x ditto.

>+	sys-libs/zlib[${MULTILIB_USEDEP}]
>+	abi_x86_32? (
>+		!<=app-emulation/emul-linux-x86-baselibs-20131008-r8
>+		!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
>+	)"

Just for the record, this would need to be updated before committing.

> 	einfo "\033[1;32m**************************************************\033[00m"
> 
>+	if ! multilib_is_native_abi ; then
>+		# See docs/FAQ, 2.1.1 native linker doesn't find openssl
>+		local LDFLAGS="-L${EPREFIX}/usr/$(get_libdir) ${LDFLAGS}"
>+		export LDFLAGS
>+	fi

Looks like work-around for some other bug. Possibly broken *-config script or something.


>-src_install() {
>-	default
>+multilib_src_install_all() {
>+	dodoc "${DOCS[@]}"

einstalldocs from eutils.eclass.

>+
> 	find "${ED}" -name '*.la' -delete

prune_libtool_files --all :)
Comment 4 Anthony Basile gentoo-dev 2014-06-01 10:32:02 UTC
(In reply to Michał Górny from comment #3)
> Comment on attachment 377406 [details, diff] [details, diff]
> multilibutize net-misc/curl-7.37.0
> 
> >-		curl_ssl_axtls?  ( net-libs/axtls  app-misc/ca-certificates )
> >-		curl_ssl_cyassl? ( net-libs/cyassl app-misc/ca-certificates )
> >+		curl_ssl_axtls?  ( net-libs/axtls[${MULTILIB_USEDEP}]  app-misc/ca-certificates )
> >+		curl_ssl_cyassl? ( net-libs/cyassl[${MULTILIB_USEDEP}] app-misc/ca-certificates )
> 
> Those are not multilib yet. I'm not a fan of all this 'let's support 7
> different SSL libraries, what can possibly go wrong?' but I think we need to
> convert them all first. 
> 

These are useful for embedded systems which is why curl upstream provides for them.  The quotes 'let's ... wrong?' do not reflect the reason they are included.
Comment 5 Greg Turner 2014-06-01 17:01:52 UTC
(In reply to Michał Górny from comment #3)
> Comment on attachment 377406 [details, diff] [details, diff]
> multilibutize net-misc/curl-7.37.0
> 
> >-		curl_ssl_axtls?  ( net-libs/axtls  app-misc/ca-certificates )
> >-		curl_ssl_cyassl? ( net-libs/cyassl app-misc/ca-certificates )
> >+		curl_ssl_axtls?  ( net-libs/axtls[${MULTILIB_USEDEP}]  app-misc/ca-certificates )
> >+		curl_ssl_cyassl? ( net-libs/cyassl[${MULTILIB_USEDEP}] app-misc/ca-certificates )
> 
> Those are not multilib yet. I'm not a fan of all this 'let's support 7
> different SSL libraries, what can possibly go wrong?' but I think we need to
> convert them all first. 

I'll look into it.

> > 		curl_ssl_gnutls? (
> > 			|| (

[snip]

> >+				( =net-libs/gnutls-2.12*[nettle,static-libs?,${MULTILIB_USEDEP}] dev-libs/nettle[${MULTILIB_USEDEP}] )
> >+				( =net-libs/gnutls-2.12*[-nettle,static-libs?,${MULTILIB_USEDEP}] dev-libs/libgcrypt[static-libs?,${MULTILIB_USEDEP}] )
> 
> No gnutls-2.12* supports multilib either but this is probably fine. Multilib
> people will simply have to have >=3.
> 
> > 			)
> > 			app-misc/ca-certificates
> > 		)

Since the MULTILIB_USEDEP blockers are of the form "abi_x86_32(-)?" they serve as blockers in such circumstances, correct?

> >-		curl_ssl_openssl? ( dev-libs/openssl[static-libs?] )
> >-		curl_ssl_nss? ( dev-libs/nss app-misc/ca-certificates )
> >-		curl_ssl_polarssl? ( net-libs/polarssl:= app-misc/ca-certificates )
> >+		curl_ssl_openssl? ( dev-libs/openssl[static-libs?,${MULTILIB_USEDEP}] )
> >+		curl_ssl_nss? ( dev-libs/nss[${MULTILIB_USEDEP}] app-misc/ca-certificates )
> 
> nss is not multilib as well.

I'll look into that as well -- it depends on nspr but I already have something for that in my overlay (it probably needs some porting).

> >+		curl_ssl_polarssl? ( net-libs/polarssl:=[${MULTILIB_USEDEP}] app-misc/ca-certificates )
> > 	)

[snip]

> >+	adns? ( net-dns/c-ares[${MULTILIB_USEDEP}] )
> 
> Ditto.
> 
> >+	kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
> >+	metalink? ( >=media-libs/libmetalink-0.1.0[${MULTILIB_USEDEP}] )
> >+	rtmp? ( media-video/rtmpdump[${MULTILIB_USEDEP}] )
> >+	ssh? ( net-libs/libssh2[static-libs?,${MULTILIB_USEDEP}] )
> 
> 3x ditto.

I may have some of these done already.  I'll look into it.

> >+	sys-libs/zlib[${MULTILIB_USEDEP}]
> >+	abi_x86_32? (
> >+		!<=app-emulation/emul-linux-x86-baselibs-20131008-r8
> >+		!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
> >+	)"
> 
> Just for the record, this would need to be updated before committing.
> 
> > 	einfo "\033[1;32m**************************************************\033[00m"
> > 
> >+	if ! multilib_is_native_abi ; then
> >+		# See docs/FAQ, 2.1.1 native linker doesn't find openssl
> >+		local LDFLAGS="-L${EPREFIX}/usr/$(get_libdir) ${LDFLAGS}"
> >+		export LDFLAGS
> >+	fi
> 
> Looks like work-around for some other bug. Possibly broken *-config script
> or something.

I thought so too but tried and failed to get to the bottom of it.  Once I found this mentioned in the FAQ I figured that was as good an excuse as any to stop digging for answers and implement upstream's proposed solution.

> >-src_install() {
> >-	default
> >+multilib_src_install_all() {
> >+	dodoc "${DOCS[@]}"
> 
> einstalldocs from eutils.eclass.

ACK, laziness/stupidity on my part.

> 
> >+
> > 	find "${ED}" -name '*.la' -delete
> 
> prune_libtool_files --all :)

ACK, also laziness obv.

I'll look into the no-multilib dependencies mentioned and rev this once all necessary bug dependencies can be expressed (or fixed).
Comment 6 Greg Turner 2014-06-01 17:06:28 UTC
(In reply to Anthony Basile from comment #4)
> (In reply to Michał Górny from comment #3)
> > Comment on attachment 377406 [details, diff] [details, diff] [details, diff]
> > multilibutize net-misc/curl-7.37.0
> > 
> > >-		curl_ssl_axtls?  ( net-libs/axtls  app-misc/ca-certificates )
> > >-		curl_ssl_cyassl? ( net-libs/cyassl app-misc/ca-certificates )
> > >+		curl_ssl_axtls?  ( net-libs/axtls[${MULTILIB_USEDEP}]  app-misc/ca-certificates )
> > >+		curl_ssl_cyassl? ( net-libs/cyassl[${MULTILIB_USEDEP}] app-misc/ca-certificates )
> > 
> > Those are not multilib yet. I'm not a fan of all this 'let's support 7
> > different SSL libraries, what can possibly go wrong?' but I think we need to
> > convert them all first. 
> > 
> 
> These are useful for embedded systems which is why curl upstream provides
> for them.  The quotes 'let's ... wrong?' do not reflect the reason they are
> included.

Anyhow, I believe Larry the Cow is an incurable optimist :)
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-06-13 08:39:29 UTC
c-ares, libmetalink & libssh2 done. Just a few crazy crypto libs remain, though I'd honestly mask them for being unmaintainable :P.
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-06-14 21:47:40 UTC
axtls & nss committed. The latter is still masked but don't worry about that now.
cyassl is going to be tree-cleaned, so you can remove that one. Now, please attach the updated ebuild :).
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-06-15 10:20:17 UTC
Ok, I'm not patient enough :). I'll finish this one myself.
Comment 10 Greg Turner 2014-07-03 18:52:58 UTC
(In reply to Michał Górny from comment #9)
> Ok, I'm not patient enough :). I'll finish this one myself.

The upstream ebuild W4M.
Comment 11 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-07-03 21:53:00 UTC
And unmasked following recent dev-libs/nss version bump.