Skip to contentSkip to conversation

iksemel: drop stray patch left behind when iksemel 1.4 recipe was purged

PATCH New Andre McCurdy 1 participant 2 messages Nov 1, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 iksemel: drop stray patch left behind when iksemel 1.4 recipe was purged

---
 .../recipes-support/iksemel/iksemel-1.4/r25.diff   | 32 ----------------------
 1 file changed, 32 deletions(-)
 delete mode 100644 meta-oe/recipes-support/iksemel/iksemel-1.4/r25.diff
meta-oe/recipes-support/iksemel/iksemel-1.4/r25.diff deleted +0 -32
deleted file mode 100644
index e666ce0..0000000
@@ -1,32 +0,0 @@
-Taken from upstream subversion repository:
-
-http://code.google.com/p/iksemel/source/detail?r=25
-
-===================================================================
----
- configure.ac |   10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
---- iksemel-1.4.orig/configure.ac
-+++ iksemel-1.4/configure.ac
-@@ -43,11 +43,19 @@ AM_CONDITIONAL(DO_POSIX, test "x$defio"
- dnl Checks for library functions
- AC_SEARCH_LIBS(recv,socket)
- AC_CHECK_FUNCS(getopt_long)
- AC_CHECK_FUNCS(getaddrinfo)
- 
--AM_PATH_LIBGNUTLS(,AC_DEFINE(HAVE_GNUTLS,,"Use libgnutls"))
-+dnl Check GNU TLS
-+PKG_CHECK_MODULES(GNUTLS, gnutls >= 2.0.0, have_gnutls=yes, have_gnutls=no)
-+if test "x$have_gnutls" = "xyes"; then
-+  LIBGNUTLS_CFLAGS="$GNUTLS_CFLAGS"
-+  LIBGNUTLS_LIBS="$GNUTLS_LIBS"
-+  AC_SUBST(LIBGNUTLS_CFLAGS)
-+  AC_SUBST(LIBGNUTLS_LIBS)
-+  AC_DEFINE(HAVE_GNUTLS, 1, [whether to use GnuTSL support.])
-+fi
- 
- dnl Check -Wall flag of GCC
- if test "x$GCC" = "xyes"; then
-   if test -z "`echo "$CFLAGS" | grep "\-Wall" 2> /dev/null`" ; then
-     CFLAGS="$CFLAGS -Wall"
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/2 iksemel: reinstate recipe with build fixes and update 1.4 -> 1.5

The recipe for iksemel 1.4 was blacklisted and eventually removed as it depended on an older version of gnutls which was no longer available in oe-core.

Reinstate iksemel with a new recipe for iksemel 1.5, which can use either openssl or gnutls for TLS support. Fix build issues.

---
 .../iksemel/avoid-obsolete-gnutls-apis.patch       | 55 +++++++++++++++++++
 .../iksemel/fix-configure-option-parsing.patch     | 62 ++++++++++++++++++++++
 meta-oe/recipes-support/iksemel/iksemel_1.5.bb     | 24 +++++++++
 3 files changed, 141 insertions(+)
 create mode 100644 meta-oe/recipes-support/iksemel/iksemel/avoid-obsolete-gnutls-apis.patch
 create mode 100644 meta-oe/recipes-support/iksemel/iksemel/fix-configure-option-parsing.patch
 create mode 100644 meta-oe/recipes-support/iksemel/iksemel_1.5.bb
meta-oe/recipes-support/iksemel/iksemel/avoid-obsolete-gnutls-apis.patch new file +55 -0
new file mode 100644
index 0000000..41fccc3
@@ -0,0 +1,55 @@
+From 7136a908a056d0e36c89b6e1c39adff8ce2bb1d4 Mon Sep 17 00:00:00 2001
+From: Andre McCurdy <[email protected]>
+Date: Wed, 1 Nov 2017 13:17:34 -0700
+Subject: [PATCH] avoid obsolete gnutls apis
+
+The gnutls_*_set_priority() family of functions was marked deprecated
+in gnutls 2.12.x and removed completely in 3.5.x. These functions
+have been superceded by gnutls_priority_set_direct(), which was added
+in gnutls 2.2.0 (released 2007-12-14).
+
+Rather than simply update the custom gnutls_*_set_priority() calls to
+use gnutls_priority_set_direct(), drop the custom priority selection
+completely and use the recommended approach of letting gnutls pick a
+reasonable set of defaults.
+
+Upstream-Status: Pending
+
+Signed-off-by: Andre McCurdy <[email protected]>
+---
+ src/tls-gnutls.c | 12 ++----------
+ 1 file changed, 2 insertions(+), 10 deletions(-)
+
+diff --git a/src/tls-gnutls.c b/src/tls-gnutls.c
+index d7b7c91..749e9ef 100644
+--- a/src/tls-gnutls.c
++++ b/src/tls-gnutls.c
+@@ -48,11 +48,6 @@ tls_pull (struct ikstls_data *data, char *buffer, size_t len)
+ static int
+ tls_handshake (struct ikstls_data **datap, ikstransport *trans, void *sock)
+ {
+-	const int protocol_priority[] = { GNUTLS_TLS1, GNUTLS_SSL3, 0 };
+-	const int kx_priority[] = { GNUTLS_KX_RSA, 0 };
+-	const int cipher_priority[] = { GNUTLS_CIPHER_3DES_CBC, GNUTLS_CIPHER_ARCFOUR, 0};
+-	const int comp_priority[] = { GNUTLS_COMP_ZLIB, GNUTLS_COMP_NULL, 0 };
+-	const int mac_priority[] = { GNUTLS_MAC_SHA, GNUTLS_MAC_MD5, 0 };
+ 	struct ikstls_data *data;
+ 	int ret;
+ 
+@@ -81,11 +76,8 @@ tls_handshake (struct ikstls_data **datap, ikstransport *trans, void *sock)
+ 		return IKS_NOMEM;
+ 	}
+ 
+-	gnutls_protocol_set_priority (data->sess, protocol_priority);
+-	gnutls_cipher_set_priority(data->sess, cipher_priority);
+-	gnutls_compression_set_priority(data->sess, comp_priority);
+-	gnutls_kx_set_priority(data->sess, kx_priority);
+-	gnutls_mac_set_priority(data->sess, mac_priority);
++	gnutls_set_default_priority (data->sess);
++
+ 	gnutls_credentials_set (data->sess, GNUTLS_CRD_CERTIFICATE, data->cred);
+ 
+ 	gnutls_transport_set_push_function (data->sess, (gnutls_push_func) tls_push);
+-- 
+1.9.1
+
meta-oe/recipes-support/iksemel/iksemel/fix-configure-option-parsing.patch new file +62 -0

62 lines not on this page · raw message

meta-oe/recipes-support/iksemel/iksemel_1.5.bb new file +24 -0
new file mode 100644
index 0000000..0903e90
@@ -0,0 +1,24 @@
+SUMMARY = "Fast and portable XML parser and Jabber protocol library"
+HOMEPAGE = "https://github.com/meduketto/iksemel"
+SECTION = "libs"
+LICENSE = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d8045f3b8f929c1cb29a1e3fd737b499"
+
+SRCREV = "978b733462e41efd5db72bc9974cb3b0d1d5f6fa"
+PV = "1.5+git${SRCPV}"
+
+SRC_URI = "git://github.com/meduketto/iksemel.git;protocol=https \
+           file://fix-configure-option-parsing.patch \
+           file://avoid-obsolete-gnutls-apis.patch"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig lib_package
+
+# TLS support requires either openssl or gnutls (if both are enabled openssl will be used).
+PACKAGECONFIG ?= "gnutls"
+
+PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls"
+PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl"
+
+EXTRA_OECONF = "--disable-python"
Signature · 1 line
1.9.1