Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] curl: build with c-ares library support.
@ 2013-11-08 23:42 Yevhen Kyriukha
  2013-11-12 22:41 ` Saul Wold
  0 siblings, 1 reply; 6+ messages in thread
From: Yevhen Kyriukha @ 2013-11-08 23:42 UTC (permalink / raw)
  To: openembedded-core; +Cc: Yevhen Kyriukha

Also added c-ares library recipe.

In libcurl there is an issue with DNS lookups that cause crash on some platforms:
http://curl.haxx.se/mail/lib-2008-09/0197.html
To avoid this issue libcurl has to be built with c-ares name resolver.

Signed-off-by: Yevhen Kyriukha <kirgene@gmail.com>
---
 meta/recipes-support/c-ares/c-ares_1.10.0.bb | 22 ++++++++++++++++++++++
 meta/recipes-support/curl/curl_7.33.0.bb     |  3 ++-
 2 files changed, 24 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-support/c-ares/c-ares_1.10.0.bb

diff --git a/meta/recipes-support/c-ares/c-ares_1.10.0.bb b/meta/recipes-support/c-ares/c-ares_1.10.0.bb
new file mode 100644
index 0000000..27bedf4
--- /dev/null
+++ b/meta/recipes-support/c-ares/c-ares_1.10.0.bb
@@ -0,0 +1,22 @@
+DESCRIPTION = "c-ares is a C library that resolves names asynchronously."
+HOMEPAGE = "http://daniel.haxx.se/projects/c-ares/"
+SECTION = "libs"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://README;beginline=17;endline=18;md5=b320556568bc067d215a1e34c5b34a14"
+
+inherit autotools
+inherit pkgconfig
+
+SRC_URI = "http://c-ares.haxx.se/download/${BP}.tar.gz"
+SRC_URI[md5sum] = "1196067641411a75d3cbebe074fd36d8"
+SRC_URI[sha256sum] = "3d701674615d1158e56a59aaede7891f2dde3da0f46a6d3c684e0ae70f52d3db"
+
+EXTRA_OECONF = "--enable-shared"
+
+# install private headers to ares subdirectory
+do_install_append() {
+    install -d ${D}/${includedir}/ares
+    install -m 0644 ares*.h ${D}/${includedir}/ares/
+}
+
+FILES_${PN}-dev += "${includedir}/ares/*.h"
diff --git a/meta/recipes-support/curl/curl_7.33.0.bb b/meta/recipes-support/curl/curl_7.33.0.bb
index 8539fec..1af320e 100644
--- a/meta/recipes-support/curl/curl_7.33.0.bb
+++ b/meta/recipes-support/curl/curl_7.33.0.bb
@@ -5,7 +5,7 @@ SECTION = "console/network"
 LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;beginline=7;md5=3a34942f4ae3fbf1a303160714e664ac"
 
-DEPENDS = "zlib gnutls"
+DEPENDS = "zlib gnutls c-ares"
 DEPENDS_class-native = "zlib-native openssl-native"
 DEPENDS_class-nativesdk = "nativesdk-zlib"
 
@@ -30,6 +30,7 @@ EXTRA_OECONF = "--with-zlib=${STAGING_LIBDIR}/../ \
                 --enable-crypto-auth \
                 --disable-ldap \
                 --disable-ldaps \
+                --enable-ares \
                 ${CURLGNUTLS} \
                 "
 
-- 
1.8.1.2



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] curl: build with c-ares library support.
  2013-11-08 23:42 [PATCH] curl: build with c-ares library support Yevhen Kyriukha
@ 2013-11-12 22:41 ` Saul Wold
  2013-11-12 23:53   ` Phil Blundell
  0 siblings, 1 reply; 6+ messages in thread
From: Saul Wold @ 2013-11-12 22:41 UTC (permalink / raw)
  To: Yevhen Kyriukha, openembedded-core

On 11/08/2013 03:42 PM, Yevhen Kyriukha wrote:
> Also added c-ares library recipe.
>
> In libcurl there is an issue with DNS lookups that cause crash on some platforms:
> http://curl.haxx.se/mail/lib-2008-09/0197.html
> To avoid this issue libcurl has to be built with c-ares name resolver.
>
I am still considering this patch, but need to understand what platforms 
curl is failing on.

> Signed-off-by: Yevhen Kyriukha <kirgene@gmail.com>
> ---
>   meta/recipes-support/c-ares/c-ares_1.10.0.bb | 22 ++++++++++++++++++++++

Additionally, if adding this to oe-core, it needs to be in it's own 
patch crediting the orignal author / layer, I found a 1.10 version in 
the meta-webos-ports, is this where it came from?

Sau!

>   meta/recipes-support/curl/curl_7.33.0.bb     |  3 ++-
>   2 files changed, 24 insertions(+), 1 deletion(-)
>   create mode 100644 meta/recipes-support/c-ares/c-ares_1.10.0.bb
>
> diff --git a/meta/recipes-support/c-ares/c-ares_1.10.0.bb b/meta/recipes-support/c-ares/c-ares_1.10.0.bb
> new file mode 100644
> index 0000000..27bedf4
> --- /dev/null
> +++ b/meta/recipes-support/c-ares/c-ares_1.10.0.bb
> @@ -0,0 +1,22 @@
> +DESCRIPTION = "c-ares is a C library that resolves names asynchronously."
> +HOMEPAGE = "http://daniel.haxx.se/projects/c-ares/"
> +SECTION = "libs"
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://README;beginline=17;endline=18;md5=b320556568bc067d215a1e34c5b34a14"
> +
> +inherit autotools
> +inherit pkgconfig
> +
> +SRC_URI = "http://c-ares.haxx.se/download/${BP}.tar.gz"
> +SRC_URI[md5sum] = "1196067641411a75d3cbebe074fd36d8"
> +SRC_URI[sha256sum] = "3d701674615d1158e56a59aaede7891f2dde3da0f46a6d3c684e0ae70f52d3db"
> +
> +EXTRA_OECONF = "--enable-shared"
> +
> +# install private headers to ares subdirectory
> +do_install_append() {
> +    install -d ${D}/${includedir}/ares
> +    install -m 0644 ares*.h ${D}/${includedir}/ares/
> +}
> +
> +FILES_${PN}-dev += "${includedir}/ares/*.h"
> diff --git a/meta/recipes-support/curl/curl_7.33.0.bb b/meta/recipes-support/curl/curl_7.33.0.bb
> index 8539fec..1af320e 100644
> --- a/meta/recipes-support/curl/curl_7.33.0.bb
> +++ b/meta/recipes-support/curl/curl_7.33.0.bb
> @@ -5,7 +5,7 @@ SECTION = "console/network"
>   LICENSE = "MIT"
>   LIC_FILES_CHKSUM = "file://COPYING;beginline=7;md5=3a34942f4ae3fbf1a303160714e664ac"
>
> -DEPENDS = "zlib gnutls"
> +DEPENDS = "zlib gnutls c-ares"
>   DEPENDS_class-native = "zlib-native openssl-native"
>   DEPENDS_class-nativesdk = "nativesdk-zlib"
>
> @@ -30,6 +30,7 @@ EXTRA_OECONF = "--with-zlib=${STAGING_LIBDIR}/../ \
>                   --enable-crypto-auth \
>                   --disable-ldap \
>                   --disable-ldaps \
> +                --enable-ares \
>                   ${CURLGNUTLS} \
>                   "
>
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] curl: build with c-ares library support.
  2013-11-12 23:53   ` Phil Blundell
@ 2013-11-12 23:36     ` Saul Wold
  2013-11-13 11:35       ` Phil Blundell
  0 siblings, 1 reply; 6+ messages in thread
From: Saul Wold @ 2013-11-12 23:36 UTC (permalink / raw)
  To: Phil Blundell; +Cc: Yevhen Kyriukha, openembedded-core

On 11/12/2013 03:53 PM, Phil Blundell wrote:
> On Tue, 2013-11-12 at 14:41 -0800, Saul Wold wrote:
>> Additionally, if adding this to oe-core, it needs to be in it's own
>> patch crediting the orignal author / layer, I found a 1.10 version in
>> the meta-webos-ports, is this where it came from?
>
> There is a c-ares recipe in oe-classic which looks quite similar to this
> one and I suspect that's probably where it came from (though perhaps
> indirectly).
>
> But, configuring curl to use c-ares support is not as trivial a change
> as it might appear and there is a significant chance that it will cause
> unforeseen (and probably unwanted) effects for at least some people.
> Adding a PACKAGECONFIG option for it which defaults to off would
> obviously be fine, and changing the default to be the libcurl internal
> threaded resolver (which would probably fix the original complaint as
> well, and doesn't require any extra recipes) might also be fine, but
> enabling c-ares by default is not something that should be done
> capriciously.
>
This is why I wanted to understand the orignal failure, so using 
PACKAGECONFIG sounds reasonable, I think we have had a case in the past 
where we even allowed for a non-default PACKAGECONFIG point outside of 
oe-core (I can't remember which one it was now).

Sau!

> p.
>
>
>
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] curl: build with c-ares library support.
  2013-11-12 22:41 ` Saul Wold
@ 2013-11-12 23:53   ` Phil Blundell
  2013-11-12 23:36     ` Saul Wold
  0 siblings, 1 reply; 6+ messages in thread
From: Phil Blundell @ 2013-11-12 23:53 UTC (permalink / raw)
  To: Saul Wold; +Cc: Yevhen Kyriukha, openembedded-core

On Tue, 2013-11-12 at 14:41 -0800, Saul Wold wrote:
> Additionally, if adding this to oe-core, it needs to be in it's own 
> patch crediting the orignal author / layer, I found a 1.10 version in 
> the meta-webos-ports, is this where it came from?

There is a c-ares recipe in oe-classic which looks quite similar to this
one and I suspect that's probably where it came from (though perhaps
indirectly).

But, configuring curl to use c-ares support is not as trivial a change
as it might appear and there is a significant chance that it will cause
unforeseen (and probably unwanted) effects for at least some people.
Adding a PACKAGECONFIG option for it which defaults to off would
obviously be fine, and changing the default to be the libcurl internal
threaded resolver (which would probably fix the original complaint as
well, and doesn't require any extra recipes) might also be fine, but
enabling c-ares by default is not something that should be done
capriciously.

p.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] curl: build with c-ares library support
@ 2013-11-13  0:56 Yevhen Kyriukha
  0 siblings, 0 replies; 6+ messages in thread
From: Yevhen Kyriukha @ 2013-11-13  0:56 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 344 bytes --]

> I am still considering this patch, but need to understand what platforms
> curl is failing on.

As far as I've tested curl crashes on i386, cedartrail and x86-64 platforms.

The c-ares recipe was borrowed from meta-webos-ports.

I'll prepare new version of this patch that will include PACKAGECONFIG
switch.

Best regards,
Yevhen

[-- Attachment #2: Type: text/html, Size: 806 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] curl: build with c-ares library support.
  2013-11-12 23:36     ` Saul Wold
@ 2013-11-13 11:35       ` Phil Blundell
  0 siblings, 0 replies; 6+ messages in thread
From: Phil Blundell @ 2013-11-13 11:35 UTC (permalink / raw)
  To: Saul Wold; +Cc: Yevhen Kyriukha, openembedded-core

On Tue, 2013-11-12 at 15:36 -0800, Saul Wold wrote:
> This is why I wanted to understand the orignal failure, so using 
> PACKAGECONFIG sounds reasonable, I think we have had a case in the past 
> where we even allowed for a non-default PACKAGECONFIG point outside of 
> oe-core (I can't remember which one it was now).

I think having c-ares in oe-core would be a splendid plan, actually.
But I don't think that making curl use it by default is a good idea.

p.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-11-13 11:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-08 23:42 [PATCH] curl: build with c-ares library support Yevhen Kyriukha
2013-11-12 22:41 ` Saul Wold
2013-11-12 23:53   ` Phil Blundell
2013-11-12 23:36     ` Saul Wold
2013-11-13 11:35       ` Phil Blundell
  -- strict thread matches above, loose matches on Subject: below --
2013-11-13  0:56 Yevhen Kyriukha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox