From: "Alon Bar-Lev" <alonbl@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-libs/gnutls/files/, net-libs/gnutls/
Date: Thu, 8 Dec 2016 15:59:46 +0000 (UTC) [thread overview]
Message-ID: <1481212778.9134720a308d6f4368291e7735d8ee02a304c0e6.alonbl@gentoo> (raw)
commit: 9134720a308d6f4368291e7735d8ee02a304c0e6
Author: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 8 15:59:10 2016 +0000
Commit: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
CommitDate: Thu Dec 8 15:59:38 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9134720a
net-libs/gnutls: manage libidn properly
cherry-pick upstream patches to build/test without libidn
make idn USE enabled by default per upstream recommendation
Package-Manager: portage-2.3.0
net-libs/gnutls/files/gnutls-3.5.7-idn.patch | 87 ++++++++++++++++++++++++++++
net-libs/gnutls/gnutls-3.5.7.ebuild | 6 +-
2 files changed, 92 insertions(+), 1 deletion(-)
diff --git a/net-libs/gnutls/files/gnutls-3.5.7-idn.patch b/net-libs/gnutls/files/gnutls-3.5.7-idn.patch
new file mode 100644
index 00000000..aa30116
--- /dev/null
+++ b/net-libs/gnutls/files/gnutls-3.5.7-idn.patch
@@ -0,0 +1,87 @@
+From ddca30ed625d9f5f7efb628e4467ff7ab5a65701 Mon Sep 17 00:00:00 2001
+From: Nikos Mavrogiannopoulos <nmav@redhat.com>
+Date: Thu, 8 Dec 2016 15:54:07 +0100
+Subject: [PATCH] tests: make conditional (to HAVE_LIBIDN) any IDN related checks
+
+This allows the test suite to successfully complete even when compiled
+without libidn.
+---
+ tests/crq_apis.c | 2 ++
+ tests/crt_apis.c | 4 ++++
+ 2 files changed, 6 insertions(+), 0 deletions(-)
+
+diff --git a/tests/crq_apis.c b/tests/crq_apis.c
+index 99c02cb..7ad717f 100644
+--- a/tests/crq_apis.c
++++ b/tests/crq_apis.c
+@@ -448,8 +448,10 @@ void doit(void)
+
+ assert(gnutls_x509_crq_export2(crq, GNUTLS_X509_FMT_PEM, &out) >= 0);
+
++#ifdef HAVE_LIBIDN
+ assert(out.size == saved_crq.size);
+ assert(memcmp(out.data, saved_crq.data, out.size)==0);
++#endif
+
+ gnutls_free(out.data);
+ gnutls_x509_crq_deinit(crq);
+diff --git a/tests/crt_apis.c b/tests/crt_apis.c
+index 8b8ebbe..ed31640 100644
+--- a/tests/crt_apis.c
++++ b/tests/crt_apis.c
+@@ -183,10 +183,12 @@ void doit(void)
+ if (ret != 0)
+ fail("gnutls_x509_crt_set_subject_alt_name\n");
+
++#ifdef HAVE_LIBIDN
+ ret = gnutls_x509_crt_set_subject_alt_name(crt, GNUTLS_SAN_RFC822NAME,
+ "test@νίκο.org", strlen("test@νίκο.org"), 1);
+ if (ret != 0)
+ fail("gnutls_x509_crt_set_subject_alt_name\n");
++#endif
+
+ s = 0;
+ ret = gnutls_x509_crt_get_key_purpose_oid(crt, 0, NULL, &s, NULL);
+@@ -275,8 +277,10 @@ void doit(void)
+ }
+ assert(gnutls_x509_crt_export2(crt, GNUTLS_X509_FMT_PEM, &out) >= 0);
+
++#ifdef HAVE_LIBIDN
+ assert(out.size == saved_crt.size);
+ assert(memcmp(out.data, saved_crt.data, out.size)==0);
++#endif
+
+ gnutls_free(out.data);
+
+--
+libgit2 0.24.0
+
+From e40393e5685743e185ea284337b6a0ed5d756a0f Mon Sep 17 00:00:00 2001
+From: Nikos Mavrogiannopoulos <nmav@redhat.com>
+Date: Thu, 8 Dec 2016 15:44:28 +0100
+Subject: [PATCH] str: do not call gnutls_assert in inline function
+
+This allows the build to succeed when compiled without libidn.
+---
+ lib/str.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/lib/str.h b/lib/str.h
+index fe8b38e..d341baa 100644
+--- a/lib/str.h
++++ b/lib/str.h
+@@ -52,9 +52,10 @@ int _gnutls_idna_email_map(const char *input, unsigned ilen, gnutls_datum_t *out
+ inline static
+ int __gnutls_idna_map(const char *input, unsigned ilen, gnutls_datum_t *out, unsigned flags)
+ {
++ /* no call to gnutls_assert() due to header dependency issues */
+ out->data = gnutls_malloc(ilen+1);
+ if (out->data == NULL)
+- return gnutls_assert_val(GNUTLS_E_MEMORY_ERROR);
++ return GNUTLS_E_MEMORY_ERROR;
+ out->size = ilen;
+ memcpy(out->data, input, ilen);
+ out->data[ilen] = 0;
+--
+libgit2 0.24.0
+
diff --git a/net-libs/gnutls/gnutls-3.5.7.ebuild b/net-libs/gnutls/gnutls-3.5.7.ebuild
index ad5aa1c..5792a83 100644
--- a/net-libs/gnutls/gnutls-3.5.7.ebuild
+++ b/net-libs/gnutls/gnutls-3.5.7.ebuild
@@ -14,7 +14,7 @@ LICENSE="GPL-3 LGPL-2.1"
SLOT="0/30" # libgnutls.so number
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris"
IUSE_LINGUAS=" en cs de fi fr it ms nl pl sv uk vi zh_CN"
-IUSE="+cxx dane doc examples guile idn nls +openssl pkcs11 sslv2 +sslv3 static-libs test +tls-heartbeat +tools zlib ${IUSE_LINGUAS// / linguas_}"
+IUSE="+cxx dane doc examples guile +idn nls +openssl pkcs11 sslv2 +sslv3 static-libs test +tls-heartbeat +tools zlib ${IUSE_LINGUAS// / linguas_}"
# NOTICE: sys-devel/autogen is required at runtime as we
# use system libopts
@@ -43,6 +43,10 @@ DEPEND="${RDEPEND}
nls? ( sys-devel/gettext )
test? ( app-misc/datefudge )"
+PATCHES=(
+ "${FILESDIR}/${P}-idn.patch"
+)
+
pkg_setup() {
# bug#520818
export TZ=UTC
next reply other threads:[~2016-12-08 15:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-08 15:59 Alon Bar-Lev [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-03-14 7:02 [gentoo-commits] repo/gentoo:master commit in: net-libs/gnutls/files/, net-libs/gnutls/ Sam James
2024-08-21 5:30 Sam James
2023-08-08 4:38 Sam James
2020-06-01 19:17 Thomas Deutschmann
2019-04-17 11:48 Alon Bar-Lev
2019-01-15 18:46 Alon Bar-Lev
2019-01-14 19:17 Alon Bar-Lev
2017-04-07 11:33 Alon Bar-Lev
2017-01-30 6:48 Alon Bar-Lev
2016-09-23 6:53 Alon Bar-Lev
2016-06-14 15:46 Alon Bar-Lev
2016-05-09 18:29 Alon Bar-Lev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1481212778.9134720a308d6f4368291e7735d8ee02a304c0e6.alonbl@gentoo \
--to=alonbl@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox