From patchwork Tue Jan 14 12:34:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: christian.braunersorensen@prevas.dk X-Patchwork-Id: 310672 X-Patchwork-Delegate: esben@haabendal.dk Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hugin.dotsrc.org (hugin.dotsrc.org [IPv6:2001:878:346::102]) by ozlabs.org (Postfix) with ESMTP id 527C52C00B1 for ; Tue, 14 Jan 2014 23:36:04 +1100 (EST) Received: from hugin.dotsrc.org (localhost [127.0.0.1]) by hugin.dotsrc.org (Postfix) with ESMTP id AF66E4531C for ; Tue, 14 Jan 2014 13:36:03 +0100 (CET) X-Original-To: dev@oe-lite.org Delivered-To: dev@oe-lite.org Received: from mail01.prevas.se (mail01.prevas.se [62.95.78.3]) by hugin.dotsrc.org (Postfix) with ESMTPS id 1A534400BF for ; Tue, 14 Jan 2014 13:35:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=prevas.dk; i=@prevas.dk; l=8523; q=dns/txt; s=ironport1; t=1389702906; x=1421238906; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=BQSks1GD8osHjwn9UUhWVONLYKE2IVgq1yqZFU46hgI=; b=a4yeiTx2v4PiF3gDEC7GAu+exIctfV2u6MPSYrFNo/bDlgFsm/IOz5tL Sf/FfXKayDA1B99p5LypSF3WmJpW/oTp/s1BqEJ1lh5Wld1CxbCMrPlz/ Yy/OBCEC6Ka4pxniqZpyKvTwSE7q+weGb9v5t04AWk5icNxBkvB0b9Z4+ 4=; X-IronPort-AV: E=Sophos;i="4.95,658,1384297200"; d="scan'208";a="4300249" Received: from vmprevas3.prevas.se (HELO smtp.prevas.se) ([172.16.8.103]) by ironport1.prevas.se with ESMTP/TLS/AES128-SHA; 14 Jan 2014 13:35:03 +0100 Received: from localhost (172.16.10.102) by smtp.prevas.se (172.16.8.105) with Microsoft SMTP Server id 14.2.347.0; Tue, 14 Jan 2014 13:35:03 +0100 Received: by localhost (Postfix, from userid 30007) id A052D681580; Tue, 14 Jan 2014 12:35:03 +0000 (UTC) From: To: Subject: [PATCH 099/131] gnutls: Add version 3.1.5 Date: Tue, 14 Jan 2014 12:34:26 +0000 Message-ID: <655ca84eaca051b9a329d90ac75e25042a19a32e.1389702652.git.christian.braunersorensen@prevas.dk> X-Mailer: git-send-email 1.8.4 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: dev@oe-lite.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: OE-lite development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dev-bounces@oe-lite.org Errors-To: dev-bounces@oe-lite.org From: Christian Sørensen Signed-off-by: Christian Sørensen --- .../correct_rpl_gettimeofday_signature.patch | 57 ++++++++++ recipes/gnutls/gnutls-3.1.5/gnutls-openssl.patch | 126 +++++++++++++++++++++ recipes/gnutls/gnutls_3.1.5.oe | 21 ++++ recipes/gnutls/gnutls_3.1.5.oe.sig | 2 + 4 files changed, 206 insertions(+) create mode 100644 recipes/gnutls/gnutls-3.1.5/correct_rpl_gettimeofday_signature.patch create mode 100644 recipes/gnutls/gnutls-3.1.5/gnutls-openssl.patch create mode 100644 recipes/gnutls/gnutls_3.1.5.oe create mode 100644 recipes/gnutls/gnutls_3.1.5.oe.sig diff --git a/recipes/gnutls/gnutls-3.1.5/correct_rpl_gettimeofday_signature.patch b/recipes/gnutls/gnutls-3.1.5/correct_rpl_gettimeofday_signature.patch new file mode 100644 index 0000000..b8f0d72 --- /dev/null +++ b/recipes/gnutls/gnutls-3.1.5/correct_rpl_gettimeofday_signature.patch @@ -0,0 +1,57 @@ +Currently we fail on uclibc like below + +| In file included from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/procfs.h:32:0, +| from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/ucontext.h:26, +| from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/signal.h:392, +| from ../../gl/signal.h:52, +| from ../../gl/sys/select.h:58, +| from /home/kraj/work/angstrom/sources/openembedded-core/build/tmp-uclibc/sysroots/qemuarm/usr/include/sys/types.h:220, +| from ../../gl/sys/types.h:28, +| from ../../lib/includes/gnutls/gnutls.h:46, +| from ex-cxx.cpp:3: +| ../../gl/sys/time.h:396:66: error: conflicting declaration 'void* restrict' +| ../../gl/sys/time.h:396:50: error: 'restrict' has a previous declaration as 'timeval* restrict' +| make[4]: *** [ex-cxx.o] Error 1 +| make[4]: *** Waiting for unfinished jobs.... + + +GCC detects that we call 'restrict' as param name in function +signatures and complains since both params are called 'restrict' +therefore we use __restrict to denote the C99 keywork + +This only happens of uclibc since this code is not excercised with +eglibc otherwise we will have same issue there too + +Signed-off-by: Khem Raj + +Upstream-Status: Pending + +Index: gnutls-2.12.14/gl/sys_time.in.h +=================================================================== +--- gnutls-2.12.14.orig/gl/sys_time.in.h 2012-01-15 10:54:39.517285351 -0800 ++++ gnutls-2.12.14/gl/sys_time.in.h 2012-01-15 10:59:23.773299108 -0800 +@@ -82,20 +82,20 @@ + # define gettimeofday rpl_gettimeofday + # endif + _GL_FUNCDECL_RPL (gettimeofday, int, +- (struct timeval *restrict, void *restrict) ++ (struct timeval *__restrict, void *__restrict) + _GL_ARG_NONNULL ((1))); + _GL_CXXALIAS_RPL (gettimeofday, int, +- (struct timeval *restrict, void *restrict)); ++ (struct timeval *__restrict, void *__restrict)); + # else + # if !@HAVE_GETTIMEOFDAY@ + _GL_FUNCDECL_SYS (gettimeofday, int, +- (struct timeval *restrict, void *restrict) ++ (struct timeval *__restrict, void *__restrict) + _GL_ARG_NONNULL ((1))); + # endif + /* Need to cast, because on glibc systems, by default, the second argument is + struct timezone *. */ + _GL_CXXALIAS_SYS_CAST (gettimeofday, int, +- (struct timeval *restrict, void *restrict)); ++ (struct timeval *__restrict, void *__restrict)); + # endif + _GL_CXXALIASWARN (gettimeofday); + # elif defined GNULIB_POSIXCHECK diff --git a/recipes/gnutls/gnutls-3.1.5/gnutls-openssl.patch b/recipes/gnutls/gnutls-3.1.5/gnutls-openssl.patch new file mode 100644 index 0000000..ea6f793 --- /dev/null +++ b/recipes/gnutls/gnutls-3.1.5/gnutls-openssl.patch @@ -0,0 +1,126 @@ +Upstream-Status: Backport + +Index: gnutls-1.6.0/extra/gnutls_openssl.c +=================================================================== +--- gnutls-1.6.0.orig/extra/gnutls_openssl.c 2006-08-13 22:34:09.000000000 +0200 ++++ gnutls-1.6.0/extra/gnutls_openssl.c 2006-12-12 15:07:59.002227000 +0100 +@@ -256,12 +256,17 @@ + ssl->rfd = (gnutls_transport_ptr_t) - 1; + ssl->wfd = (gnutls_transport_ptr_t) - 1; + ++ ssl->ssl_peek_buffer = NULL; ++ ssl->ssl_peek_buffer_size = ssl->ssl_peek_avail = 0; ++ + return ssl; + } + + void + SSL_free (SSL * ssl) + { ++ if (ssl->ssl_peek_buffer) ++ free(ssl->ssl_peek_buffer); + gnutls_certificate_free_credentials (ssl->gnutls_cred); + gnutls_deinit (ssl->gnutls_state); + free (ssl); +@@ -285,6 +290,7 @@ + SSL_set_fd (SSL * ssl, int fd) + { + gnutls_transport_set_ptr (ssl->gnutls_state, GNUTLS_INT_TO_POINTER (fd)); ++ ssl->rfd = ssl->wfd = fd; + return 1; + } + +@@ -310,6 +316,17 @@ + return 1; + } + ++int SSL_get_rfd(SSL *ssl) ++{ ++ return ssl->rfd; ++} ++ ++int SSL_get_wfd(SSL *ssl) ++{ ++ return ssl->wfd; ++} ++ ++ + void + SSL_set_bio (SSL * ssl, BIO * rbio, BIO * wbio) + { +@@ -325,6 +342,8 @@ + int + SSL_pending (SSL * ssl) + { ++ if (ssl->ssl_peek_avail) ++ return ssl->ssl_peek_avail; + return gnutls_record_check_pending (ssl->gnutls_state); + } + +@@ -480,11 +499,50 @@ + return 1; + } + ++int SSL_peek(SSL *ssl, void *buf, int len) ++{ ++ if (len > ssl->ssl_peek_buffer_size) { ++ ssl->ssl_peek_buffer = realloc (ssl->ssl_peek_buffer, len); ++ ssl->ssl_peek_buffer_size = len; ++ } ++ ++ if (ssl->ssl_peek_avail == 0) { ++ ++ int ret; ++ ++ ret = gnutls_record_recv(ssl->gnutls_state, ssl->ssl_peek_buffer, len); ++ ssl->last_error = ret; ++ ++ if (ret > 0) ++ ssl->ssl_peek_avail += ret; ++ } ++ ++ if (len > ssl->ssl_peek_avail) ++ len = ssl->ssl_peek_avail; ++ ++ memcpy (buf, ssl->ssl_peek_buffer, len); ++ ++ return len; ++} ++ + int + SSL_read (SSL * ssl, void *buf, int len) + { + int ret; + ++ if (ssl->ssl_peek_avail) { ++ int n = (ssl->ssl_peek_avail > len) ? len : ssl->ssl_peek_avail; ++ ++ memcpy (buf, ssl->ssl_peek_buffer, n); ++ ++ if (ssl->ssl_peek_avail > n) ++ memmove (ssl->ssl_peek_buffer, ssl->ssl_peek_buffer + n, ssl->ssl_peek_avail - n); ++ ++ ssl->ssl_peek_avail -= n; ++ ++ return n; ++ } ++ + ret = gnutls_record_recv (ssl->gnutls_state, buf, len); + ssl->last_error = ret; + +Index: gnutls-1.6.0/includes/gnutls/openssl.h +=================================================================== +--- gnutls-1.6.0.orig/extra/includes/gnutls/openssl.h 2006-03-08 11:44:58.000000000 +0100 ++++ gnutls-1.6.0/extra/includes/gnutls/openssl.h 2006-12-12 15:07:26.032227000 +0100 +@@ -164,6 +164,11 @@ + + gnutls_transport_ptr_t rfd; + gnutls_transport_ptr_t wfd; ++ ++ char *ssl_peek_buffer; ++ size_t ssl_peek_buffer_size; ++ size_t ssl_peek_avail; ++ + }; + + #define rbio gnutls_state diff --git a/recipes/gnutls/gnutls_3.1.5.oe b/recipes/gnutls/gnutls_3.1.5.oe new file mode 100644 index 0000000..7d7bd9e --- /dev/null +++ b/recipes/gnutls/gnutls_3.1.5.oe @@ -0,0 +1,21 @@ +require gnutls.inc + +DEPENDS += "libnettle-dev libnettle nettle-dev libhogweed libhogweed-dev" + +LICENSE = "GPLv3+ & LGPLv2.1+" +LICENSE_${PN} = "LGPLv2.1+" +LICENSE_${PN}-xx = "LGPLv2.1+" +LICENSE_${PN}-bin = "GPLv3+" +LICENSE_${PN}-extra = "GPLv3+" +LICENSE_${PN}-openssl = "GPLv3+" + +require conf/fetch/gnu.conf +SRC_URI += "${GNU_MIRROR}/gnutls/gnutls-${PV}.tar.xz" + +SRC_URI += "file://gnutls-openssl.patch" +SRC_URI += "file://correct_rpl_gettimeofday_signature.patch" + +PARALLEL_MAKE = "" + +LIBRARY_VERSION = "28" +LIBRARY_VERSION_${PN}-libgnutls-openssl = "27" diff --git a/recipes/gnutls/gnutls_3.1.5.oe.sig b/recipes/gnutls/gnutls_3.1.5.oe.sig new file mode 100644 index 0000000..f015d62 --- /dev/null +++ b/recipes/gnutls/gnutls_3.1.5.oe.sig @@ -0,0 +1,2 @@ +da39a3ee5e6b4b0d3255bfef95601890afd80709 gnutls-3.1.5.tar.bz2 +93efeab75cad6f656eae1123c10e3692db727bd5 gnutls-3.1.5.tar.xz