package infra: remove CPPFLAGS from CFLAGS
PATCH 1/6 package infra: remove CPPFLAGS from CFLAGS
CPPFLAGS don't belong in CFLAGS, and newer autoconf versions just error out when it's used that way.
This is required for the libcurl bump to 7.30.0
--- package/Makefile.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
package/Makefile.in +1 -2
@@ -100,7 +100,7 @@ ifeq ($(BR2_LARGEFILE),y) TARGET_CPPFLAGS += -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 endif -TARGET_CFLAGS = $(TARGET_CPPFLAGS) $(TARGET_ABI) $(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) +TARGET_CFLAGS = $(TARGET_ABI) $(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) TARGET_CXXFLAGS = $(TARGET_CFLAGS) TARGET_LDFLAGS = $(call qstrip,$(BR2_TARGET_LDFLAGS))
@@ -179,7 +179,6 @@ SED:=$(shell which sed || type -p sed) -i -e HOST_CPPFLAGS = -I$(HOST_DIR)/usr/include HOST_CFLAGS ?= -O2 -HOST_CFLAGS += $(HOST_CPPFLAGS) HOST_CXXFLAGS += $(HOST_CFLAGS) HOST_LDFLAGS += -L$(HOST_DIR)/lib -L$(HOST_DIR)/usr/lib -Wl,-rpath,$(HOST_DIR)/usr/lib HOST_PATH=$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(PATH)
Signature · 1 line
1.8.1.5
PATCH 2/6 libnspr: bump to version 4.9.6
--- package/libnspr/libnspr.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
package/libnspr/libnspr.mk +4 -2
@@ -3,12 +3,14 @@ # libnspr # ############################################################# -LIBNSPR_VERSION = 4.9.2 + +LIBNSPR_VERSION = 4.9.6 LIBNSPR_SOURCE = nspr-$(LIBNSPR_VERSION).tar.gz -LIBNSPR_SITE = https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v$(LIBNSPR_VERSION)/src/ +LIBNSPR_SITE = https://ftp.mozilla.org/pub/mozilla.org/nspr/releases/v$(LIBNSPR_VERSION)/src LIBNSPR_SUBDIR = mozilla/nsprpub LIBNSPR_INSTALL_STAGING = YES LIBNSPR_CONFIG_SCRIPTS = nspr-config +LIBNSPR_LICENSE = MPLv2.0 # Set the host CFLAGS and LDFLAGS so NSPR does not guess wrongly LIBNSPR_CONF_ENV = HOST_CFLAGS="-g -O2" \
Signature · 1 line
1.8.1.5
PATCH 3/6 libnss: bump to version 3.14.3
In reply to Gustavo Zacarias--- package/libnss/libnss.mk | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
package/libnss/libnss.mk +5 -2
@@ -3,14 +3,17 @@ # libnss # ############################################################# -LIBNSS_VERSION = 3.12.9 + +LIBNSS_VERSION = 3.14.3 LIBNSS_SOURCE = nss-$(LIBNSS_VERSION).tar.gz LIBNSS_SITE_VERSION = $(subst .,_,$(LIBNSS_VERSION)) -LIBNSS_SITE = https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_$(LIBNSS_SITE_VERSION)_RTM/src/ +LIBNSS_SITE = https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_$(LIBNSS_SITE_VERSION)_RTM/src LIBNSS_SUBDIR = mozilla/security LIBNSS_DISTDIR = mozilla/dist LIBNSS_INSTALL_STAGING = YES LIBNSS_DEPENDENCIES = libnspr sqlite zlib +LIBNSS_LICENSE = MPLv2.0 +LIBNSS_LICENSE_FILES = mozilla/security/nss/COPYING LIBNSS_BUILD_VARS = MOZILLA_CLIENT=1 \ NSPR_INCLUDE_DIR=$(STAGING_DIR)/usr/include/nspr \
Signature · 1 line
1.8.1.5
PATCH 3/6 libnss: bump to version 3.14.3
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Gustavo" == Gustavo Zacarias <[email protected]> writes:
Gustavo> Signed-off-by: Gustavo Zacarias <[email protected]>
Committed to next, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 4/6 libcurl: bump to version 7.30.0
In reply to Gustavo ZacariasAnd add support for other SSL backends such as gnutls, nss and polarssl. Also add support for libidn and zlib.
--- package/libcurl/libcurl-01-CVE-2013-0249.patch | 65 -------------------------- package/libcurl/libcurl-02-CVE-2013-1944.patch | 57 ---------------------- package/libcurl/libcurl.mk | 26 ++++++++--- 3 files changed, 20 insertions(+), 128 deletions(-) delete mode 100644 package/libcurl/libcurl-01-CVE-2013-0249.patch delete mode 100644 package/libcurl/libcurl-02-CVE-2013-1944.patch
package/libcurl/libcurl-01-CVE-2013-0249.patch deleted +0 -65
@@ -1,65 +0,0 @@ -From ee45a34907ffeb5fd95b0513040d8491d565b663 Mon Sep 17 00:00:00 2001 -From: Eldar Zaitov <[email protected]> -Date: Wed, 30 Jan 2013 23:22:27 +0100 -Subject: [PATCH] Curl_sasl_create_digest_md5_message: fix buffer overflow - -When negotiating SASL DIGEST-MD5 authentication, the function -Curl_sasl_create_digest_md5_message() uses the data provided from the -server without doing the proper length checks and that data is then -appended to a local fixed-size buffer on the stack. - -This vulnerability can be exploited by someone who is in control of a -server that a libcurl based program is accessing with POP3, SMTP or -IMAP. For applications that accept user provided URLs, it is also -thinkable that a malicious user would feed an application with a URL to -a server hosting code targetting this flaw. - -Bug: http://curl.haxx.se/docs/adv_20130206.html ---- - lib/curl_sasl.c | 23 ++++++----------------- - 1 file changed, 6 insertions(+), 17 deletions(-) - -diff --git a/lib/curl_sasl.c b/lib/curl_sasl.c -index 57116b6..d07387d 100644 ---- a/lib/curl_sasl.c -+++ b/lib/curl_sasl.c -@@ -346,9 +346,7 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data, - snprintf(&HA1_hex[2 * i], 3, "%02x", digest[i]); - - /* Prepare the URL string */ -- strcpy(uri, service); -- strcat(uri, "/"); -- strcat(uri, realm); -+ snprintf(uri, sizeof(uri), "%s/%s", service, realm); - - /* Calculate H(A2) */ - ctxt = Curl_MD5_init(Curl_DIGEST_MD5); -@@ -392,20 +390,11 @@ CURLcode Curl_sasl_create_digest_md5_message(struct SessionHandle *data, - for(i = 0; i < MD5_DIGEST_LEN; i++) - snprintf(&resp_hash_hex[2 * i], 3, "%02x", digest[i]); - -- strcpy(response, "username=\""); -- strcat(response, userp); -- strcat(response, "\",realm=\""); -- strcat(response, realm); -- strcat(response, "\",nonce=\""); -- strcat(response, nonce); -- strcat(response, "\",cnonce=\""); -- strcat(response, cnonce); -- strcat(response, "\",nc="); -- strcat(response, nonceCount); -- strcat(response, ",digest-uri=\""); -- strcat(response, uri); -- strcat(response, "\",response="); -- strcat(response, resp_hash_hex); -+ snprintf(response, sizeof(response), -+ "username=\"%s\",realm=\"%s\",nonce=\"%s\"," -+ "cnonce=\"%s\",nc=\"%s\",digest-uri=\"%s\",response=%s", -+ userp, realm, nonce, -+ cnonce, nonceCount, uri, resp_hash_hex); - - /* Base64 encode the reply */ - return Curl_base64_encode(data, response, 0, outptr, outlen); --- -1.7.10.4 -
package/libcurl/libcurl-02-CVE-2013-1944.patch deleted +0 -57
57 lines not on this page · raw message
package/libcurl/libcurl.mk +20 -6
@@ -4,9 +4,12 @@ # ############################################################# -LIBCURL_VERSION = 7.28.1 +LIBCURL_VERSION = 7.30.0 LIBCURL_SOURCE = curl-$(LIBCURL_VERSION).tar.bz2 LIBCURL_SITE = http://curl.haxx.se/download +LIBCURL_DEPENDENCIES = host-pkgconf \ + $(if $(BR2_PACKAGE_ZLIB),zlib) \ + $(if $(BR2_PACKAGE_LIBIDN),libidn) LIBCURL_LICENSE = ICS LIBCURL_LICENSE_FILES = COPYING LIBCURL_INSTALL_STAGING = YES
@@ -15,23 +18,34 @@ LIBCURL_INSTALL_STAGING = YES # on non-MMU platforms. Moreover, this authentication method is # probably almost never used. See # http://curl.haxx.se/docs/manpage.html#--ntlm. -LIBCURL_CONF_OPT = --disable-verbose --disable-manual \ - --enable-hidden-symbols --disable-ntlm-wb +LIBCURL_CONF_OPT = --disable-verbose --disable-manual --disable-ntlm-wb \ + --enable-hidden-symbols --with-random=/dev/urandom LIBCURL_CONFIG_SCRIPTS = curl-config ifeq ($(BR2_PACKAGE_OPENSSL),y) -LIBCURL_DEPENDENCIES += openssl LIBCURL_CONF_ENV += ac_cv_lib_crypto_CRYPTO_lock=yes # configure adds the cross openssl dir to LD_LIBRARY_PATH which screws up # native stuff during the rest of configure when target == host. # Fix it by setting LD_LIBRARY_PATH to something sensible so those libs # are found first. +LIBCURL_DEPENDENCIES += openssl LIBCURL_CONF_ENV += LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:/lib:/usr/lib LIBCURL_CONF_OPT += --with-ssl=$(STAGING_DIR)/usr \ - --with-random=/dev/urandom \ --with-ca-path=/etc/ssl/certs +LIBCURL_DEPENDENCIES += openssl +else ifeq ($(BR2_PACKAGE_GNUTLS),y) +LIBCURL_CONF_OPT += --with-gnutls=$(STAGING_DIR)/usr +LIBCURL_DEPENDENCIES += gnutls +else ifeq ($(BR2_PACKAGE_POLARSSL),y) +LIBCURL_CONF_OPT += --with-polarssl=$(STAGING_DIR)/usr +LIBCURL_DEPENDENCIES += polarssl +else ifeq ($(BR2_PACKAGE_LIBNSS),y) +LIBCURL_CONF_OPT += --with-nss=$(STAGING_DIR)/usr +LIBCURL_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) `$(PKG_CONFIG_HOST_BINARY) nspr nss --cflags`" +LIBCURL_DEPENDENCIES += libnss else -LIBCURL_CONF_OPT += --without-ssl +LIBCURL_CONF_OPT += --without-ssl --without-gnutls \ + --without-polarssl --without-nss endif define LIBCURL_FIX_DOT_PC
Signature · 1 line
1.8.1.5
PATCH 4/6 libcurl: bump to version 7.30.0
Quoted 4 lines · Gustavo Zacarias
And add support for other SSL backends such as gnutls, nss and polarssl. Also add support for libidn and zlib.
Signed-off-by Gustavo Zacarias <[email protected]>
[snip]
Quoted 19 lines
package/libcurl/libcurl.mk +4
-1@@ -4,9 +4,12 @@ # ############################################################# -LIBCURL_VERSION = 7.28.1 +LIBCURL_VERSION = 7.30.0 LIBCURL_SOURCE = curl-$(LIBCURL_VERSION).tar.bz2 LIBCURL_SITE = http://curl.haxx.se/download +LIBCURL_DEPENDENCIES = host-pkgconf \ + $(if $(BR2_PACKAGE_ZLIB),zlib) \ + $(if $(BR2_PACKAGE_LIBIDN),libidn) LIBCURL_LICENSE = ICS LIBCURL_LICENSE_FILES = COPYING LIBCURL_INSTALL_STAGING = YES
package/libcurl/libcurl.mk LIBCURL_INSTALL_STAGING = YES · line 22
Quoted 7 lines
package/libcurl/libcurl.mk +2
-2@@ -15,23 +18,34 @@ LIBCURL_INSTALL_STAGING = YES # on non-MMU platforms. Moreover, this authentication method is # probably almost never used. See # http://curl.haxx.se/docs/manpage.html#--ntlm. -LIBCURL_CONF_OPT = --disable-verbose --disable-manual \ - --enable-hidden-symbols --disable-ntlm-wb +LIBCURL_CONF_OPT = --disable-verbose --disable-manual --disable-ntlm-wb \ + --enable-hidden-symbols --with-random=/dev/urandom
Is the --with-random now needed without ssl as well?
package/libcurl/libcurl.mk LIBCURL_INSTALL_STAGING = YES · line 31
Quoted 10 lines
package/libcurl/libcurl.mk +1
-1LIBCURL_CONFIG_SCRIPTS = curl-config ifeq ($(BR2_PACKAGE_OPENSSL),y) -LIBCURL_DEPENDENCIES += openssl LIBCURL_CONF_ENV += ac_cv_lib_crypto_CRYPTO_lock=yes # configure adds the cross openssl dir to LD_LIBRARY_PATH which screws up # native stuff during the rest of configure when target == host. # Fix it by setting LD_LIBRARY_PATH to something sensible so those libs # are found first. +LIBCURL_DEPENDENCIES += openssl
Moving this a couple of lines down is not necessary...
package/libcurl/libcurl.mk LIBCURL_INSTALL_STAGING = YES · line 35
Quoted 5 lines
package/libcurl/libcurl.mk +1
-1LIBCURL_CONF_ENV += LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:/lib:/usr/lib LIBCURL_CONF_OPT += --with-ssl=$(STAGING_DIR)/usr \ - --with-random=/dev/urandom \ --with-ca-path=/etc/ssl/certs +LIBCURL_DEPENDENCIES += openssl
... and duplicating it certainly isn't!
package/libcurl/libcurl.mk LIBCURL_INSTALL_STAGING = YES · line 37
Quoted 2 lines
package/libcurl/libcurl.mk +2
-0+else ifeq ($(BR2_PACKAGE_GNUTLS),y) +LIBCURL_CONF_OPT += --with-gnutls=$(STAGING_DIR)/usr
No need for ca-path? (Same for the others.)
Regards,
Arnout
Quoted 16 lines
package/libcurl/libcurl.mk +10
-1+LIBCURL_DEPENDENCIES += gnutls +else ifeq ($(BR2_PACKAGE_POLARSSL),y) +LIBCURL_CONF_OPT += --with-polarssl=$(STAGING_DIR)/usr +LIBCURL_DEPENDENCIES += polarssl +else ifeq ($(BR2_PACKAGE_LIBNSS),y) +LIBCURL_CONF_OPT += --with-nss=$(STAGING_DIR)/usr +LIBCURL_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) `$(PKG_CONFIG_HOST_BINARY) nspr nss --cflags`" +LIBCURL_DEPENDENCIES += libnss else -LIBCURL_CONF_OPT += --without-ssl +LIBCURL_CONF_OPT += --without-ssl --without-gnutls \ + --without-polarssl --without-nss endif define LIBCURL_FIX_DOT_PC
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 4/6 libcurl: bump to version 7.30.0
Quoted 1 line · Arnout Vandecappelle
Is the --with-random now needed without ssl as well?
It's needed for all the SSL implementations and it doesn't hurt if there's none.
So it's there to avoid duplication.
Quoted 3 lines
Quoted 1 line
+LIBCURL_DEPENDENCIES += openssl
... and duplicating it certainly isn't!
Ouch! I'll fix it.
Quoted 1 line
No need for ca-path? (Same for the others.)
Just for openssl, and it errors for any other option, isn't that nice? :) Thanks.
Regards.
PATCH 5/6 p11-kit: new package
In reply to Gustavo Zacarias--- package/Config.in | 1 + package/p11-kit/Config.in | 15 +++++++++++++++ package/p11-kit/p11-kit.mk | 15 +++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 package/p11-kit/Config.in create mode 100644 package/p11-kit/p11-kit.mk
package/Config.in +1 -0
@@ -604,6 +604,7 @@ source "package/mpc/Config.in" source "package/mpfr/Config.in" source "package/mtdev2tuio/Config.in" source "package/orc/Config.in" +source "package/p11-kit/Config.in" source "package/poco/Config.in" source "package/protobuf/Config.in" source "package/protobuf-c/Config.in"
package/p11-kit/Config.in new file +15 -0
@@ -0,0 +1,15 @@ +config BR2_PACKAGE_P11_KIT + bool "p11-kit" + depends on !BR2_PREFER_STATIC_LIB + depends on BR2_USE_MMU + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBTASN1 + help + Provides a way to load and enumerate PKCS#11 modules. + Provides a standard configuration setup for installing PKCS#11 + modules in such a way that they're discoverable. + + http://p11-glue.freedesktop.org/p11-kit.html + +comment "p11-kit requires a toolchain with thread support" + depends on !BR2_TOOLCHAIN_HAS_THREADS
package/p11-kit/p11-kit.mk new file +15 -0
@@ -0,0 +1,15 @@ +############################################################# +# +# p11-kit +# +############################################################# + +P11_KIT_VERSION = 0.18.1 +P11_KIT_SITE = http://p11-glue.freedesktop.org/releases +P11_KIT_DEPENDENCIES = host-pkgconf libtasn1 +P11_KIT_INSTALL_STAGING = YES +P11_KIT_CONF_OPT = --disable-static +P11_KIT_LICENSE = BSD-3c +P11_KIT_LICENSE_FILES = COPYING + +$(eval $(autotools-package))
Signature · 1 line
1.8.1.5
PATCH 6/6 gnutls: bump to version 3.2.0
In reply to Gustavo Zacarias--- package/gnutls/Config.in | 15 ++++++ ...gnutls-correct_rpl_gettimeofday_signature.patch | 58 ---------------------- package/gnutls/gnutls.mk | 29 ++++++++--- 3 files changed, 38 insertions(+), 64 deletions(-) delete mode 100644 package/gnutls/gnutls-correct_rpl_gettimeofday_signature.patch
package/gnutls/Config.in +15 -0
@@ -1,6 +1,7 @@ config BR2_PACKAGE_GNUTLS bool "gnutls" select BR2_PACKAGE_NETTLE + select BR2_PACKAGE_PCRE depends on BR2_USE_WCHAR help GnuTLS is a secure communications library implementing the SSL
@@ -8,6 +9,20 @@ config BR2_PACKAGE_GNUTLS http://www.gnutls.org +config BR2_PACKAGE_GNUTLS_PKCS11 + bool "PKCS#11 support" + depends on !BR2_PREFER_STATIC_LIB + depends on BR2_USE_MMU + depends on BR2_PACKAGE_GNUTLS + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBTASN1 + select BR2_PACKAGE_P11_KIT + help + Enable PKCS#11 support in gnutls. + +comment "gnutls pkcs#11 support requires a toolchain with thread support" + depends on BR2_PACKAGE_GNUTLS && !BR2_TOOLCHAIN_HAS_THREADS + config BR2_PACKAGE_GNUTLS_TOOLS bool "install tools" depends on BR2_PACKAGE_GNUTLS
package/gnutls/gnutls-correct_rpl_gettimeofday_signature.patch deleted +0 -58
58 lines not on this page · raw message
package/gnutls/gnutls.mk +23 -6
@@ -4,22 +4,39 @@ # ############################################################# -GNUTLS_VERSION = 3.1.9 +GNUTLS_VERSION = 3.2.0 GNUTLS_SOURCE = gnutls-$(GNUTLS_VERSION).tar.xz -GNUTLS_SITE = ftp://ftp.gnutls.org/gcrypt/gnutls/v3.1 -GNUTLS_LICENSE = GPLv3+ LGPLv3 +GNUTLS_SITE = ftp://ftp.gnutls.org/gcrypt/gnutls/v3.2 +GNUTLS_LICENSE = GPLv3+ LGPLv2.1+ GNUTLS_LICENSE_FILES = COPYING COPYING.LESSER -GNUTLS_DEPENDENCIES = host-pkgconf nettle $(if $(BR2_PACKAGE_ZLIB),zlib) -GNUTLS_CONF_OPT = --with-libnettle-prefix=$(STAGING_DIR)/usr --disable-rpath +GNUTLS_DEPENDENCIES = host-pkgconf nettle pcre \ + $(if $(BR2_PACKAGE_GNUTLS_PKCS11),p11-kit) \ + $(if $(BR2_PACKAGE_LIBIDN),libidn) \ + $(if $(BR2_PACKAGE_LIBTASN1),libtasn1) \ + $(if $(BR2_PACKAGE_ZLIB),zlib) +GNUTLS_CONF_OPT = --with-libnettle-prefix=$(STAGING_DIR)/usr --disable-rpath \ + --disable-doc --disable-guile GNUTLS_CONF_ENV = gl_cv_socket_ipv6=$(if $(BR2_INET_IPV6),yes,no) \ ac_cv_header_wchar_h=$(if $(BR2_USE_WCHAR),yes,no) \ gt_cv_c_wchar_t=$(if $(BR2_USE_WCHAR),yes,no) \ - gt_cv_c_wint_t=$(if $(BR2_USE_WCHAR),yes,no) + gt_cv_c_wint_t=$(if $(BR2_USE_WCHAR),yes,no) \ + gl_cv_func_gettimeofday_clobber=no GNUTLS_INSTALL_STAGING = YES # libpthread autodetection poisons the linkpath GNUTLS_CONF_OPT += $(if $(BR2_TOOLCHAIN_HAS_THREADS),--with-libpthread-prefix=$(STAGING_DIR)/usr) +# gnutls needs libregex, but pcre can be used too +# The check isn't cross-compile friendly +define GNUTLS_LIBREGEX_CHECK_FIX + $(SED) 's/libopts_cv_with_libregex=no/libopts_cv_with_libregex=yes/g;'\ + $(@D)/configure +endef +GNUTLS_PRE_CONFIGURE_HOOKS += GNUTLS_LIBREGEX_CHECK_FIX +GNUTLS_CONF_OPT += --with-regex-header=pcreposix.h \ + --with-libregex-cflags="`$(PKG_CONFIG_HOST_BINARY) libpcreposix --cflags`" \ + --with-libregex-libs="`$(PKG_CONFIG_HOST_BINARY) libpcreposix --libs`" + # libidn support for nommu must exclude the crywrap wrapper (uses fork) GNUTLS_CONF_OPT += $(if $(BR2_USE_MMU),,--disable-crywrap) GNUTLS_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBIDN),libidn)
Signature · 1 line
1.8.1.5
PATCH 6/6 gnutls: bump to version 3.2.0
Quoted 28 lines · Gustavo Zacarias
Signed-off-by Gustavo Zacarias<[email protected]>--- package/gnutls/Config.in | 15 ++++++ ...gnutls-correct_rpl_gettimeofday_signature.patch | 58 ---------------------- package/gnutls/gnutls.mk | 29 ++++++++--- 3 files changed, 38 insertions(+), 64 deletions(-)delete mode 100644
package/gnutls/gnutls-correct_rpl_gettimeofday_signature.patchpackage/gnutls/Config.in +5
-0@@ -1,6 +1,7 @@ config BR2_PACKAGE_GNUTLS bool "gnutls" select BR2_PACKAGE_NETTLE + select BR2_PACKAGE_PCRE depends on BR2_USE_WCHAR help GnuTLS is a secure communications library implementing the SSL@@ -8,6 +9,20 @@ config BR2_PACKAGE_GNUTLS http://www.gnutls.org +config BR2_PACKAGE_GNUTLS_PKCS11 + bool "PKCS#11 support" + depends on !BR2_PREFER_STATIC_LIB + depends on BR2_USE_MMU
package/gnutls/Config.in config BR2_PACKAGE_GNUTLS · line 25
Quoted 10 lines
package/gnutls/Config.in +10
-0+ depends on BR2_PACKAGE_GNUTLS + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_LIBTASN1 + select BR2_PACKAGE_P11_KIT + help + Enable PKCS#11 support in gnutls. + +comment "gnutls pkcs#11 support requires a toolchain with thread support" + depends on BR2_PACKAGE_GNUTLS && !BR2_TOOLCHAIN_HAS_THREADS +
Any reason why you want to add this config symbol, instead of just
checking for BR2_PACKAGE_P11_KIT in the .mk file?
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 6/6 gnutls: bump to version 3.2.0
Quoted 2 lines · Arnout Vandecappelle
Any reason why you want to add this config symbol, instead of just
checking forBR2_PACKAGE_P11_KITin the .mk file?
Other than it's usually an obscure option (probably not easy to infer for people), not really.
Regards.
[Buildroot] Config options for optional dependencies [was: [PATCH 6/6] gnutls: bump to version 3.2.0]
Quoted 6 lines · Gustavo Zacarias
Quoted 2 lines · Arnout Vandecappelle
Any reason why you want to add this config symbol, instead of just
checking forBR2_PACKAGE_P11_KITin the .mk file?Other than it's usually an obscure option (probably not easy to infer for people), not really.
I think it is time that we formalize a bit the rules for optional
dependencies.
To be honest, I would prefer explicit config options for optional
dependencies, because it's not easy for users to realize they can select the additional library. However, that buts an unrealistic (maintenance) overhead on the Config.in files.
So as a second-best option, I would say that the optional dependencies
should be mentioned in the package help text. It's still not easy on the user, because s/he needs to know how to read the help text and how to search for the relevant package. It's also still a bit of a maintenance burden because the help text has to be updated when optional dependencies are added/removed. But I guess it's a reasonable compromise.
With that, I think our informal guideline of adding config options only
for obscure libraries becomes less of a necessity, and we can make it a rule to never add config options for optional dependencies.
What do you think?
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
[Buildroot] Config options for optional dependencies [was: [PATCH 6/6] gnutls: bump to version 3.2.0]
Dear Arnout Vandecappelle,
Quoted 8 lines · Arnout Vandecappelle
I think it is time that we formalize a bit the rules for optional
dependencies.To be honest, I would prefer explicit config options for optional
dependencies, because it's not easy for users to realize they can select the additional library. However, that buts an unrealistic (maintenance) overhead on the Config.in files.
Quoted 6 lines
So as a second-best option, I would say that the optional dependencies
should be mentioned in the package help text. It's still not easy on the user, because s/he needs to know how to read the help text and how to search for the relevant package. It's also still a bit of a maintenance burden because the help text has to be updated when optional dependencies are added/removed. But I guess it's a reasonable compromise.
Is this really useful? Isn't the <package>.mk file already explicit enough about this? I'm pretty sure help texts will get out of sync, and I'm not sure there's really a point in duplicating the information that the <package>.mk already provides.
Quoted 5 lines
With that, I think our informal guideline of adding config options only
for obscure libraries becomes less of a necessity, and we can make it a rule to never add config options for optional dependencies.What do you think?
Hum, I'm not sure to understand the current informal guideline as "adding config options only for obscure libraries".
For features of the package that are not related to a dependency (enabling debugging, or some other completely internal feature), there is no other choice than adding a config option.
When there is a dependency, I guess the current rule is a matter of appreciating whether or not it sounds logical to automatically enable SSL support when OpenSSL is available, or whether having library foo in the system immediately indicates that you want support for foo everywhere. I'm not sure there is a way of having a solution that suits all cases, without examining each specific case, and having an appreciation of which choice makes the most sense.
For example, even enabling SSL automatically when OpenSSL is available is something that could be discussed. It's not because I need SSL for OpenSSH that I necessarily want my lighttpd web server to gain SSL support (well, ok, granted, in this specific case, lighttpd has a sub-option to enable or disable SSL support...). But it makes sense to have this automatic, and leave it as a user customization if really it's very important to disable SSL support on a per-package basis.
The drawback of the current solution, is that it is causing some confusion on what should be done, and how to appreciate the border-line cases. I unfortunately don't have much ideas here to improve this situation.
Best regards,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/6 package infra: remove CPPFLAGS from CFLAGS
In reply to Gustavo ZacariasDear Gustavo Zacarias,
package/Makefile.in SED:=$(shell which sed || type -p sed) -i -e · line 184
Quoted 13 lines · Gustavo Zacarias
package/Makefile.in +1
-2-TARGET_CFLAGS = $(TARGET_CPPFLAGS) $(TARGET_ABI) $(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) +TARGET_CFLAGS = $(TARGET_ABI) $(TARGET_OPTIMIZATION) $(TARGET_DEBUGGING) TARGET_CXXFLAGS = $(TARGET_CFLAGS) TARGET_LDFLAGS = $(call qstrip,$(BR2_TARGET_LDFLAGS))@@ -179,7 +179,6 @@ SED:=$(shell which sed || type -p sed) -i -e HOST_CPPFLAGS = -I$(HOST_DIR)/usr/include HOST_CFLAGS ?= -O2 -HOST_CFLAGS += $(HOST_CPPFLAGS) HOST_CXXFLAGS += $(HOST_CFLAGS) HOST_LDFLAGS += -L$(HOST_DIR)/lib -L$(HOST_DIR)/usr/lib -Wl,-rpath,$(HOST_DIR)/usr/lib HOST_PATH=$(HOST_DIR)/bin:$(HOST_DIR)/usr/bin:$(PATH)
Do we have packages that pass TARGET_CFLAGS and/or HOST_CFLAGS, and are not passing TARGET_CPPFLAGS / HOST_CPPFLAGS ?
One example: the bsdiff package:
define BSDIFF_BUILD_CMDS
$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \
$(@D)/bsdiff.c -lbz2 -o $(@D)/bsdiff
$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \
$(@D)/bspatch.c -lbz2 -o $(@D)/bspatchendef
After your patch, the -D_LARGEFILE_BLABLA stuff is no longer passed when building this package.
Another example, the feh package. Another one, input-tools. And I'm sure there are more.
So, I agree with the change, but I think it needs a much thorough investigation of which packages are using $(TARGET_CFLAGS) without passing $(TARGET_CPPFLAGS).
Best regards,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/6 package infra: remove CPPFLAGS from CFLAGS
Quoted 15 lines · Thomas Petazzoni
Do we have packages that pass
TARGET_CFLAGSand/orHOST_CFLAGS, and are not passingTARGET_CPPFLAGS/HOST_CPPFLAGS?One example: the bsdiff package:
define
BSDIFF_BUILD_CMDS$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \ $(@D)/bsdiff.c -lbz2 -o $(@D)/bsdiff $(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS) \ $(@D)/bspatch.c -lbz2 -o $(@D)/bspatchendef
After your patch, the -D_LARGEFILE_BLABLA stuff is no longer passed when building this package.
Quoted 6 lines
Another example, the feh package. Another one, input-tools. And I'm sure there are more.
So, I agree with the change, but I think it needs a much thorough investigation of which packages are using $(TARGET_CFLAGS) without passing $(TARGET_CPPFLAGS).
On the build-side of things there aren't any unexpected build failures (allyespackageconfig that lead to my latest fixes because of other issues). This is meant as a first try and i'm sure there will be packages that'll need to be modified, but we'd rather do this sooner rather than later, specially if we want to push new autotools where -D* isn't acceptable in CFLAGS (be it via auto* bump + autoreconf or just plain shipped configure in packages based on newer autotools).
We could also filter out for "strict" (new auto* packages) too, but that's a sloppy way downhill.
I just want to keep this patchset apart from the package-fixing one, since it's likely this won't change much and i'm not a fan of 1/N with N being a huge number just to add a few patchfixes here/there (with the fix patches maybe even getting commited before this patchset - it shouldn't hurt).
Regards.
PATCH 1/6 package infra: remove CPPFLAGS from CFLAGS
Dear Gustavo Zacarias,
Quoted 6 lines · Gustavo Zacarias
Quoted 6 lines
After your patch, the -D_LARGEFILE_BLABLA stuff is no longer passed when building this package.
Another example, the feh package. Another one, input-tools. And I'm sure there are more.
Quoted 6 lines
Quoted 3 lines
So, I agree with the change, but I think it needs a much thorough investigation of which packages are using $(TARGET_CFLAGS) without passing $(TARGET_CPPFLAGS).
On the build-side of things there aren't any unexpected build failures (allyespackageconfig that lead to my latest fixes because of other issues).
Build failures no, but packages not having large file support because -D_LARGEFILE_BLA is not passed, cerainly.
Quoted 5 lines
This is meant as a first try and i'm sure there will be packages that'll need to be modified, but we'd rather do this sooner rather than later, specially if we want to push new autotools where -D* isn't acceptable in CFLAGS (be it via auto* bump + autoreconf or just plain shipped configure in packages based on newer autotools).
Agreed.
Quoted 2 lines
We could also filter out for "strict" (new auto* packages) too, but that's a sloppy way downhill.
Yes, we probably don't want to do that.
Quoted 5 lines
I just want to keep this patchset apart from the package-fixing one, since it's likely this won't change much and i'm not a fan of 1/N with N being a huge number just to add a few patchfixes here/there (with the fix patches maybe even getting commited before this patchset - it shouldn't hurt).
I believe there should be first an audit of where TARGET_CFLAGS is used. Then, wherever needed, fixes to ensure both TARGET_CFLAGS and TARGET_CPPFLAGS are used (or, if possible, usage of TARGET_CONFIGURE_OPTS). Once those fixes are made, your patch that separates TARGET_CPPFLAGS from TARGET_CFLAGS can go in.
A quick "grep TARGET_CFLAGS" in package/ gives 110 packages using it. In most cases, it's probably $(TARGET_CONFIGURE_OPTS) being passed + CFLAGS="$(TARGET_CFLAGS) -bleh", which is already correct seems CPPFLAGS is passed. But of course there might be packages that use a custom Makefile that obeys to CFLAGS but not CPPFLAGS. Not sure what we can do about these except slowly figuring out that they need fixing.
Best regards,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/6 package infra: remove CPPFLAGS from CFLAGS
Quoted 6 lines · Thomas Petazzoni
I believe there should be first an audit of where
TARGET_CFLAGSis used. Then, wherever needed, fixes to ensure bothTARGET_CFLAGSandTARGET_CPPFLAGSare used (or, if possible, usage ofTARGET_CONFIGURE_OPTS). Once those fixes are made, your patch that separatesTARGET_CPPFLAGSfromTARGET_CFLAGScan go in.
Quoted 6 lines
A quick "grep
TARGET_CFLAGS" in package/ gives 110 packages using it. In most cases, it's probably $(TARGET_CONFIGURE_OPTS) being passed + CFLAGS="$(TARGET_CFLAGS) -bleh", which is already correct seems CPPFLAGS is passed. But of course there might be packages that use a customMakefilethat obeys to CFLAGS but not CPPFLAGS. Not sure what we can do about these except slowly figuring out that they need fixing.
Looking into generic packages which are the most likely to have differences because of custom Makefiles the general majority don't seem to understand CPPFLAGS, so other than doing SOMETHING="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" there doesn't seem to be much to do about it.
We could define a TARGET_GENERIC_CFLAGS == TARGET_CPPFLAGS + TARGET_CFLAGS (like now) or something like that and make those package use that, after all it's the auto* packages that have issues with that. On the other hand it's a nice opportunity for some miscellaneous cleanups like using $(INSTALL) instead of install, removing redundant *_SOURCE definitions and stuff like that.
Regards.
PATCH 1/6 package infra: remove CPPFLAGS from CFLAGS
Quoted 14 lines · Gustavo Zacarias
Quoted 6 lines · Thomas Petazzoni
I believe there should be first an audit of where
TARGET_CFLAGSis used. Then, wherever needed, fixes to ensure bothTARGET_CFLAGSandTARGET_CPPFLAGSare used (or, if possible, usage ofTARGET_CONFIGURE_OPTS). Once those fixes are made, your patch that separatesTARGET_CPPFLAGSfromTARGET_CFLAGScan go in.Quoted 6 lines
A quick "grep
TARGET_CFLAGS" in package/ gives 110 packages using it. In most cases, it's probably $(TARGET_CONFIGURE_OPTS) being passed + CFLAGS="$(TARGET_CFLAGS) -bleh", which is already correct seems CPPFLAGS is passed. But of course there might be packages that use a customMakefilethat obeys to CFLAGS but not CPPFLAGS. Not sure what we can do about these except slowly figuring out that they need fixing.
Quoted 12 lines
Looking into generic packages which are the most likely to have differences because of custom Makefiles the general majority don't seem to understand CPPFLAGS, so other than doing SOMETHING="$(TARGET_CPPFLAGS) $(TARGET_CFLAGS)" there doesn't seem to be much to do about it.
We could define aTARGET_GENERIC_CFLAGS==TARGET_CPPFLAGS+TARGET_CFLAGS(like now) or something like that and make those package use that, after all it's the auto* packages that have issues with that. On the other hand it's a nice opportunity for some miscellaneous cleanups like using $(INSTALL) instead of install, removing redundant*_SOURCEdefinitions and stuff like that.
Regards.
TARGET_CPPFLAGS is _only_ used to set the largefile defines. So I think
it's much easier to leave it out entirely, and pass those defines in CFLAGS. There may be one or two packages that break because they rely on correct CPPFLAGS, but for these we can send the largefile defines explicitly.
So:
TARGET_LARGEFILE_CFLAGS = -D_LARGEFILE_SOURCE ...
TARGET_CFLAGS = $(TARGET_LARGEFILE_CFLAGS) ...
Remove the CPPFLAGS="$(TARGET_CPPFLAGS)" from TARGET_CONFIGURE_OPTS
Fixup the packages that use TARGET_CPPFLAGS
HOST_CPPFLAGS is another story. It contains -I$(HOST_DIR)/usr/include.
But that one _will_ trigger build failures if it is not passed correctly, so there Gustavo's patch is safe.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 1/6 package infra: remove CPPFLAGS from CFLAGS
Dear Arnout Vandecappelle,
Quoted 5 lines · Arnout Vandecappelle
TARGET_CPPFLAGSis _only_ used to set the largefile defines. So I think
it's much easier to leave it out entirely, and pass those defines in CFLAGS. There may be one or two packages that break because they rely on correct CPPFLAGS, but for these we can send the largefile defines explicitly.
Quoted 7 lines
So:
TARGET_LARGEFILE_CFLAGS= -D_LARGEFILE_SOURCE ...
TARGET_CFLAGS= $(TARGET_LARGEFILE_CFLAGS) ...Remove the CPPFLAGS="$(TARGET_CPPFLAGS)" from
TARGET_CONFIGURE_OPTS
No, that's precisely the problem Gustavo had: newer autotools version do *NOT* want to have -D_BLABLA in CFLAGS, they only accept it in CPPFLAGS.
See the original patch from Gustavo:
"""
CPPFLAGS don't belong in CFLAGS, and newer autoconf versions just error out when it's used that way.
"""
So the whole purpose of the discussion is precisely that we can't any longer pass the -D_LARGEFILE_SOURCE in TARGET_CFLAGS :)
Best regards,
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/6 package infra: remove CPPFLAGS from CFLAGS
Quoted 23 lines · Thomas Petazzoni
Dear Arnout Vandecappelle,
Quoted 5 lines · Arnout Vandecappelle
TARGET_CPPFLAGSis _only_ used to set the largefile defines. So I think
it's much easier to leave it out entirely, and pass those defines in CFLAGS. There may be one or two packages that break because they rely on correct CPPFLAGS, but for these we can send the largefile defines explicitly.Quoted 7 lines
So:
TARGET_LARGEFILE_CFLAGS= -D_LARGEFILE_SOURCE ...
TARGET_CFLAGS= $(TARGET_LARGEFILE_CFLAGS) ...Remove the CPPFLAGS="$(TARGET_CPPFLAGS)" from
TARGET_CONFIGURE_OPTSNo, that's precisely the problem Gustavo had: newer autotools version do *NOT* want to have -D_BLABLA in CFLAGS, they only accept it in CPPFLAGS.
See the original patch from Gustavo:
Quoted 7 lines
"""
CPPFLAGS don't belong in CFLAGS, and newer autoconf versions just error out when it's used that way.
"""So the whole purpose of the discussion is precisely that we can't any longer pass the -D_LARGEFILE_SOURCE in
TARGET_CFLAGS:)
Okay my bad. I thought the issue was that CPPFLAGS were duplicated in
CFLAGS.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F