All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] curl: make CURL_FEATURES configurable again
@ 2010-10-28 17:22 Michael Smith
  2010-10-28 18:30 ` Khem Raj
  2010-10-29 15:02 ` [PATCH v2] curl: remove anon python block Michael Smith
  0 siblings, 2 replies; 10+ messages in thread
From: Michael Smith @ 2010-10-28 17:22 UTC (permalink / raw)
  To: openembedded-devel

Lock down CURL_FEATURES for virtclass-native, but make CURL_FEATURES
for target a weak assignment.

Signed-off-by: Michael Smith <msmith@cbnco.com>
---
 recipes/curl/curl-common.inc |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/recipes/curl/curl-common.inc b/recipes/curl/curl-common.inc
index ddaebb8..8ffefeb 100644
--- a/recipes/curl/curl-common.inc
+++ b/recipes/curl/curl-common.inc
@@ -6,9 +6,10 @@ SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2;name=tarball \
            file://pkgconfig_fix.patch"
 S = "${WORKDIR}/curl-${PV}"
 
-INC_PR = "r4"
+INC_PR = "r5"
 
-CURL_FEATURES = ${@['zlib,cookies,crypto-auth,dict,file,ftp,http,telnet,tftp','zlib,gnutls,cookies,crypto-auth,dict,file,ftp,http,telnet,tftp']["${BPN}" == "${PN}"]}
+CURL_FEATURES ?= "zlib,gnutls,cookies,crypto-auth,dict,file,ftp,http,telnet,tftp"
+CURL_FEATURES_virtclass-native = "zlib,cookies,crypto-auth,dict,file,ftp,http,telnet,tftp"
 # other allowed features: ipv6, ares, openssl
 
 inherit autotools pkgconfig binconfig
-- 
1.7.0.4




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

* Re: [PATCH] curl: make CURL_FEATURES configurable again
  2010-10-28 17:22 [PATCH] curl: make CURL_FEATURES configurable again Michael Smith
@ 2010-10-28 18:30 ` Khem Raj
  2010-10-28 18:49   ` Michael Smith
  2010-10-29 15:02 ` [PATCH v2] curl: remove anon python block Michael Smith
  1 sibling, 1 reply; 10+ messages in thread
From: Khem Raj @ 2010-10-28 18:30 UTC (permalink / raw)
  To: openembedded-devel

On Thu, Oct 28, 2010 at 10:22 AM, Michael Smith <msmith@cbnco.com> wrote:
> Lock down CURL_FEATURES for virtclass-native, but make CURL_FEATURES
> for target a weak assignment.
>
> Signed-off-by: Michael Smith <msmith@cbnco.com>
> ---
>  recipes/curl/curl-common.inc |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/recipes/curl/curl-common.inc b/recipes/curl/curl-common.inc
> index ddaebb8..8ffefeb 100644
> --- a/recipes/curl/curl-common.inc
> +++ b/recipes/curl/curl-common.inc
> @@ -6,9 +6,10 @@ SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2;name=tarball \
>            file://pkgconfig_fix.patch"
>  S = "${WORKDIR}/curl-${PV}"
>
> -INC_PR = "r4"
> +INC_PR = "r5"
>
> -CURL_FEATURES = ${@['zlib,cookies,crypto-auth,dict,file,ftp,http,telnet,tftp','zlib,gnutls,cookies,crypto-auth,dict,file,ftp,http,telnet,tftp']["${BPN}" == "${PN}"]}
> +CURL_FEATURES ?= "zlib,gnutls,cookies,crypto-auth,dict,file,ftp,http,telnet,tftp"
> +CURL_FEATURES_virtclass-native = "zlib,cookies,crypto-auth,dict,file,ftp,http,telnet,tftp"

this change was done for a reason. this will not set correct override
for native recipes and
we dont want gnutls on native recipe but if you look closely the
output then it will enable gnutls
because CURL_FEATURES_virtclass-native is ineffective in this case as
you already have a
weak assignment.

This was the reason why I proposed my fix for having recipe type
OVERRIDE but unfortunately
that patch has different issue which prevents it from being applied.

>  # other allowed features: ipv6, ares, openssl
>
>  inherit autotools pkgconfig binconfig
> --
> 1.7.0.4
>
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>



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

* Re: [PATCH] curl: make CURL_FEATURES configurable again
  2010-10-28 18:30 ` Khem Raj
@ 2010-10-28 18:49   ` Michael Smith
  2010-10-28 20:53     ` Khem Raj
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Smith @ 2010-10-28 18:49 UTC (permalink / raw)
  To: openembedded-devel

On Thu, 28 Oct 2010, Khem Raj wrote:

> -CURL_FEATURES = ${@['zlib,cookies,crypto-auth,dict,file,ftp,http,telnet,tftp','zlib,gnutls,cookies,crypto-auth,dict,file,ftp,http,telnet,tftp']["${BPN}" == "${PN}"]}
> +CURL_FEATURES ?= "zlib,gnutls,cookies,crypto-auth,dict,file,ftp,http,telnet,tftp"
> +CURL_FEATURES_virtclass-native = "zlib,cookies,crypto-auth,dict,file,ftp,http,telnet,tftp"

> this change was done for a reason. this will not set correct override 
> for native recipes and we dont want gnutls on native recipe but if you 
> look closely the output then it will enable gnutls because 
> CURL_FEATURES_virtclass-native is ineffective in this case as you 
> already have a weak assignment.

It seems to do the right thing here - CURL_FEATURES_virtclass-native is 
not weak, so in my curl-native config.log, I see --disable-gnutls.

(btw: why do we not want gnutls in curl-native?)

Mike



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

* Re: [PATCH] curl: make CURL_FEATURES configurable again
  2010-10-28 18:49   ` Michael Smith
@ 2010-10-28 20:53     ` Khem Raj
  2010-10-28 21:09       ` Michael Smith
  0 siblings, 1 reply; 10+ messages in thread
From: Khem Raj @ 2010-10-28 20:53 UTC (permalink / raw)
  To: openembedded-devel

On Thu, Oct 28, 2010 at 11:49 AM, Michael Smith <msmith@cbnco.com> wrote:
> On Thu, 28 Oct 2010, Khem Raj wrote:
>
>> -CURL_FEATURES = ${@['zlib,cookies,crypto-auth,dict,file,ftp,http,telnet,tftp','zlib,gnutls,cookies,crypto-auth,dict,file,ftp,http,telnet,tftp']["${BPN}" == "${PN}"]}
>> +CURL_FEATURES ?= "zlib,gnutls,cookies,crypto-auth,dict,file,ftp,http,telnet,tftp"
>> +CURL_FEATURES_virtclass-native = "zlib,cookies,crypto-auth,dict,file,ftp,http,telnet,tftp"
>
>> this change was done for a reason. this will not set correct override
>> for native recipes and we dont want gnutls on native recipe but if you
>> look closely the output then it will enable gnutls because
>> CURL_FEATURES_virtclass-native is ineffective in this case as you
>> already have a weak assignment.
>
> It seems to do the right thing here - CURL_FEATURES_virtclass-native is
> not weak, so in my curl-native config.log, I see --disable-gnutls.

certainly nor for me. here is what I get


oe_runconf() {
        if [ -x
/scratch/oe/work/x86_64-linux/curl-native-7.21.1-r4.1/curl-7.21.1/configure
] ; then

/scratch/oe/work/x86_64-linux/curl-native-7.21.1-r4.1/curl-7.21.1/configure
\
                 --build=x86_64-linux             --host=x86_64-linux
           --target=x86_64-linux
--prefix=/scratch/oe/sysroots/x86_64-linux/usr
--exec_prefix=/scratch/oe/sysroots/x86_64-linux/usr
--bindir=/scratch/oe/sysroots/x86_64-linux/usr/bin
--sbindir=/scratch/oe/sysroots/x86_64-linux/usr/sbin
--libexecdir=/scratch/oe/sysroots/x86_64-linux/usr/libexec
 --datadir=/scratch/oe/sysroots/x86_64-linux/usr/share
  --sysconfdir=/scratch/oe/sysroots/x86_64-linux/etc
--sharedstatedir=/scratch/oe/sysroots/x86_64-linux/com
 --localstatedir=/scratch/oe/sysroots/x86_64-linux/var
  --libdir=/scratch/oe/sysroots/x86_64-linux/usr/lib
--includedir=/scratch/oe/sysroots/x86_64-linux/usr/include
 --oldincludedir=/scratch/oe/sysroots/x86_64-linux/usr/include
          --infodir=/scratch/oe/sysroots/x86_64-linux/usr/share/info
           --mandir=/scratch/oe/sysroots/x86_64-linux/usr/share/man
            --with-libtool-sysroot
--without-libssh2             --with-random=/dev/urandom
--without-libidn                 --enable-cookies --enable-crypto-auth
--enable-dict --enable-file --enable-ftp --enable-http --enable-telnet
--enable-tftp --disable-ipv6
--with-zlib=/scratch/oe/sysroots/x86_64-linux/usr/lib/../
--with-gnutls=/scratch/oe/sysroots/x86_64-linux/usr/bin --without-ssl
--disable-ares "$@"
        else
                oefatal "no configure script found"
        fi

}
>
> (btw: why do we not want gnutls in curl-native?)
>

thats a different question does not solve the problem at hand.

> Mike
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>



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

* Re: [PATCH] curl: make CURL_FEATURES configurable again
  2010-10-28 20:53     ` Khem Raj
@ 2010-10-28 21:09       ` Michael Smith
  2010-10-28 22:34         ` Khem Raj
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Smith @ 2010-10-28 21:09 UTC (permalink / raw)
  To: openembedded-devel

Khem Raj wrote:
> On Thu, Oct 28, 2010 at 11:49 AM, Michael Smith <msmith@cbnco.com> wrote:
>> It seems to do the right thing here - CURL_FEATURES_virtclass-native is
>> not weak, so in my curl-native config.log, I see --disable-gnutls.
> 
> certainly nor for me. here is what I get

Maybe because I have a setting for CURL_FEATURES in my conf? If so, that 
sounds like odd bitbake behaviour. :(

Do you have any thoughts on how to solve it? There is not much point to 
having CURL_FEATURES as a variable if it's not configurable. I can just 
hack over it in an amend.inc, but the recipe as it stands is broken.

>> (btw: why do we not want gnutls in curl-native?)
> 
> thats a different question does not solve the problem at hand.

Yes, it's a different question. I didn't realize I was limited to one 
per e-mail. :)

Mike



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

* Re: [PATCH] curl: make CURL_FEATURES configurable again
  2010-10-28 21:09       ` Michael Smith
@ 2010-10-28 22:34         ` Khem Raj
  2010-10-29 15:01           ` Michael Smith
  0 siblings, 1 reply; 10+ messages in thread
From: Khem Raj @ 2010-10-28 22:34 UTC (permalink / raw)
  To: openembedded-devel

On Thu, Oct 28, 2010 at 2:09 PM, Michael Smith <msmith@cbnco.com> wrote:
> Khem Raj wrote:
>>
>> On Thu, Oct 28, 2010 at 11:49 AM, Michael Smith <msmith@cbnco.com> wrote:
>>>
>>> It seems to do the right thing here - CURL_FEATURES_virtclass-native is
>>> not weak, so in my curl-native config.log, I see --disable-gnutls.
>>
>> certainly nor for me. here is what I get
>
> Maybe because I have a setting for CURL_FEATURES in my conf? If so, that
> sounds like odd bitbake behaviour. :(
>
> Do you have any thoughts on how to solve it? There is not much point to
> having CURL_FEATURES as a variable if it's not configurable. I can just hack
> over it in an amend.inc, but the recipe as it stands is broken.

yes if we had the recipe type overrides for native sdk and target
separate then this could
be done probably by appending to concerning override

>
>>> (btw: why do we not want gnutls in curl-native?)
>>
>> thats a different question does not solve the problem at hand.
>
> Yes, it's a different question. I didn't realize I was limited to one per
> e-mail. :)

you can ask as many I just wanted to keep focus on the topic at hand in a thread
it helps people who read it later.

>
> Mike
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
>



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

* Re: [PATCH] curl: make CURL_FEATURES configurable again
  2010-10-28 22:34         ` Khem Raj
@ 2010-10-29 15:01           ` Michael Smith
  2010-10-30 10:15             ` Denys Dmytriyenko
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Smith @ 2010-10-29 15:01 UTC (permalink / raw)
  To: openembedded-devel

Khem Raj wrote:
> On Thu, Oct 28, 2010 at 2:09 PM, Michael Smith <msmith@cbnco.com> wrote:
>> Do you have any thoughts on how to solve it? There is not much point to
>> having CURL_FEATURES as a variable if it's not configurable. I can just hack
>> over it in an amend.inc, but the recipe as it stands is broken.
> 
> yes if we had the recipe type overrides for native sdk and target
> separate then this could
> be done probably by appending to concerning override

OK, what if we get rid of CURL_FEATURES entirely, and the anon python 
that handles it. No one in-tree is using CURL_FEATURES, and it's been 
broken for a couple weeks now.

It'll be easy enough to override the depends and configure opts in a 
recipe amend for anyone who needs that control (i.e. me).

Mike



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

* [PATCH v2] curl: remove anon python block
  2010-10-28 17:22 [PATCH] curl: make CURL_FEATURES configurable again Michael Smith
  2010-10-28 18:30 ` Khem Raj
@ 2010-10-29 15:02 ` Michael Smith
  1 sibling, 0 replies; 10+ messages in thread
From: Michael Smith @ 2010-10-29 15:02 UTC (permalink / raw)
  To: openembedded-devel

Remove the anonymous Python block that was parsing CURL_FEATURES.
Configurability of CURL_FEATURES was removed in bf2f44fc.
Distros or overlays that want control (e.g. to use openssl instead of
gnutls) can override variables in a recipe amend.

Signed-off-by: Michael Smith <msmith@cbnco.com>
---
 recipes/curl/curl-common.inc |   98 +++++++++++++++++++++--------------------
 1 files changed, 50 insertions(+), 48 deletions(-)

diff --git a/recipes/curl/curl-common.inc b/recipes/curl/curl-common.inc
index ddaebb8..fd5638f 100644
--- a/recipes/curl/curl-common.inc
+++ b/recipes/curl/curl-common.inc
@@ -6,58 +6,60 @@ SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2;name=tarball \
            file://pkgconfig_fix.patch"
 S = "${WORKDIR}/curl-${PV}"
 
-INC_PR = "r4"
-
-CURL_FEATURES = ${@['zlib,cookies,crypto-auth,dict,file,ftp,http,telnet,tftp','zlib,gnutls,cookies,crypto-auth,dict,file,ftp,http,telnet,tftp']["${BPN}" == "${PN}"]}
-# other allowed features: ipv6, ares, openssl
+INC_PR = "r5"
 
 inherit autotools pkgconfig binconfig
 
-EXTRA_OECONF = " \
-                --without-libssh2 \
-		--with-random=/dev/urandom \
-		--without-libidn \
-		"
-
-python __anonymous() {
-	f = bb.data.getVar("CURL_FEATURES", d, True).split(",")
-        oeconf = bb.data.getVar("EXTRA_OECONF", d, False)
-        deps = bb.data.getVar("DEPENDS", d, False).split()
-        pn = bb.data.getVar("PN", d, True)
-        if "native" in pn:
-                native = "-native"
-        else:
-                native = ""
-        for x in [ 'cookies', 'crypto-auth', 'dict', 'file', 'ftp', 'http', 'telnet', 'tftp', 'ipv6' ]:
-                if x in f:
-                        oeconf += " --enable-%s" % x
-                else:
-                        oeconf += " --disable-%s" % x
-        if 'zlib' in f:
-                oeconf += " --with-zlib=${STAGING_LIBDIR}/../"
-                deps.append("zlib" + native)
-        else:
-                oeconf += " --without-zlib"
-        if 'gnutls' in f:
-                oeconf += " --with-gnutls=${STAGING_BINDIR_CROSS}"
-                deps.append("gnutls" + native)
-        else:
-                oeconf += " --without-gnutls"
-        if 'openssl' in f:
-                oeconf += " --with-ssl=${STAGING_LIBDIR}/../"
-                deps.append("openssl" + native)
-        else:
-                oeconf += " --without-ssl"
-        if 'ares' in f:
-                oeconf += " --enable-ares"
-                deps.append("c-ares" + native)
-        else:
-                oeconf += " --disable-ares"
-        bb.data.setVar('EXTRA_OECONF', oeconf, d)
-        bb.data.setVar('DEPENDS', " ".join(deps), d)
-}
+# Historically the curl recipe had configurable CURL_FEATURES. Distros
+# that want to control features may override the CURL_DEPENDS_* and
+# CURL_CONF_* variables in an amend.inc.
+
+CURL_DEPENDS_TLS_GNUTLS = "gnutls"
+CURL_DEPENDS_TLS_OPENSSL = "openssl"
+CURL_DEPENDS_TLS = "${CURL_DEPENDS_TLS_GNUTLS}"
+
+CURL_DEPENDS_ARES_YES = "c-ares"
+CURL_DEPENDS_ARES = ""
+
+CURL_DEPENDS_BASE = "zlib ${CURL_DEPENDS_ARES}"
+
+# Don't use gnutls in native build
+DEPENDS = "${CURL_DEPENDS_BASE} ${CURL_DEPENDS_TLS}"
+DEPENDS_virtclass-native = "${CURL_DEPENDS_BASE}"
+
+
+CURL_CONF_FEATURES_BASE = "--enable-cookies --enable-crypto-auth --enable-ftp"
+CURL_CONF_FEATURES_BLOAT = "--enable-dict --enable-telnet --enable-tftp"
+
+CURL_CONF_ZLIB = "--with-zlib=${STAGING_LIBDIR}/../"
+
+CURL_CONF_TLS_GNUTLS = "--without-ssl --with-gnutls=${STAGING_BINDIR_CROSS}"
+CURL_CONF_TLS_OPENSSL = "--without-gnutls --with-ssl=${STAGING_LIBDIR}/../"
+CURL_CONF_TLS = "${CURL_CONF_TLS_GNUTLS}"
+
+CURL_CONF_IPV6 = "${@base_contains('DISTRO_FEATURES', 'ipv6', \
+			'--enable-ipv6', '--disable-ipv6', d)}"
+
+CURL_CONF_ARES = "--disable-ares"
+
+CURL_CONF_BASE = " \
+	--without-libssh2 \
+	--with-random=/dev/urandom \
+	--without-libidn \
+	--enable-file \
+	--enable-http \
+	${CURL_CONF_FEATURES_BASE} \
+	${CURL_CONF_FEATURES_BLOAT} \
+	${CURL_CONF_ZLIB} \
+	${CURL_CONF_IPV6} \
+	${CURL_CONF_ARES} \
+"
+
+EXTRA_OECONF = "${CURL_CONF_BASE} ${CURL_CONF_TLS}"
+EXTRA_OECONF_virtclass-native = " \
+	${CURL_CONF_BASE} --without-gnutls --without-ssl \
+"
 
 do_configure_prepend() {
 	sed -i s:OPT_GNUTLS/bin:OPT_GNUTLS:g configure.ac
 }
-
-- 
1.7.0.4




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

* Re: [PATCH] curl: make CURL_FEATURES configurable again
  2010-10-29 15:01           ` Michael Smith
@ 2010-10-30 10:15             ` Denys Dmytriyenko
  2010-11-02 13:49               ` Michael Smith
  0 siblings, 1 reply; 10+ messages in thread
From: Denys Dmytriyenko @ 2010-10-30 10:15 UTC (permalink / raw)
  To: openembedded-devel

On Fri, Oct 29, 2010 at 11:01:47AM -0400, Michael Smith wrote:
> Khem Raj wrote:
>> On Thu, Oct 28, 2010 at 2:09 PM, Michael Smith <msmith@cbnco.com> wrote:
>>> Do you have any thoughts on how to solve it? There is not much point to
>>> having CURL_FEATURES as a variable if it's not configurable. I can just 
>>> hack
>>> over it in an amend.inc, but the recipe as it stands is broken.
>> yes if we had the recipe type overrides for native sdk and target
>> separate then this could
>> be done probably by appending to concerning override
>
> OK, what if we get rid of CURL_FEATURES entirely, and the anon python that 
> handles it. No one in-tree is using CURL_FEATURES, and it's been broken for 
> a couple weeks now.
>
> It'll be easy enough to override the depends and configure opts in a recipe 
> amend for anyone who needs that control (i.e. me).

It has been discussed before (check irc logs 7-10 days ago) and Khem made a 
change to introduce new override called "target", which can be used in this 
case. Anyway, I ended up fixing it by amend in my overlay:

http://arago-project.org/git/?p=arago.git;a=commitdiff;h=37979c41a04f7712dbf9c325871fea7c01cc737a

-- 
Denys



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

* Re: [PATCH] curl: make CURL_FEATURES configurable again
  2010-10-30 10:15             ` Denys Dmytriyenko
@ 2010-11-02 13:49               ` Michael Smith
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Smith @ 2010-11-02 13:49 UTC (permalink / raw)
  To: openembedded-devel

Denys Dmytriyenko wrote:
> It has been discussed before (check irc logs 7-10 days ago) and Khem made a 
> change to introduce new override called "target", which can be used in this 
> case. Anyway, I ended up fixing it by amend in my overlay:
> 
> http://arago-project.org/git/?p=arago.git;a=commitdiff;h=37979c41a04f7712dbf9c325871fea7c01cc737a

Yes - the target override patch didn't go in, but I agree it would make 
this easier.

Anon python seems to be going out of style so the v2 curl patch uses 
variable settings with a native override to ensure gnutls isn't in the 
feature list.

Mike



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

end of thread, other threads:[~2010-11-02 13:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-28 17:22 [PATCH] curl: make CURL_FEATURES configurable again Michael Smith
2010-10-28 18:30 ` Khem Raj
2010-10-28 18:49   ` Michael Smith
2010-10-28 20:53     ` Khem Raj
2010-10-28 21:09       ` Michael Smith
2010-10-28 22:34         ` Khem Raj
2010-10-29 15:01           ` Michael Smith
2010-10-30 10:15             ` Denys Dmytriyenko
2010-11-02 13:49               ` Michael Smith
2010-10-29 15:02 ` [PATCH v2] curl: remove anon python block Michael Smith

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.