diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-12-24 14:11:38 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-12-24 14:11:38 +0000 |
commit | de49812990871e1705b64051c35161d5e6400269 (patch) | |
tree | 5e1e8fcb0ff4579dbd22a1bfee28a6b97dc8aaeb /net-voip/telepathy-salut | |
parent | 536c3711867ec947c1738f2c4b96f22e4863322d (diff) |
gentoo resync : 24.12.2018
Diffstat (limited to 'net-voip/telepathy-salut')
-rw-r--r-- | net-voip/telepathy-salut/Manifest | 2 | ||||
-rw-r--r-- | net-voip/telepathy-salut/files/telepathy-salut-0.8.1-openssl-1.1.patch | 188 | ||||
-rw-r--r-- | net-voip/telepathy-salut/telepathy-salut-0.8.1-r2.ebuild | 81 |
3 files changed, 271 insertions, 0 deletions
diff --git a/net-voip/telepathy-salut/Manifest b/net-voip/telepathy-salut/Manifest index c69448aa4103..2e236fd55ff5 100644 --- a/net-voip/telepathy-salut/Manifest +++ b/net-voip/telepathy-salut/Manifest @@ -1,4 +1,6 @@ AUX telepathy-salut-0.5.0-uninitialized.patch 496 BLAKE2B f697051628069c6a8c6339ddee37133eab9b90b4f43553b501c611d02de4c63c14d3e4e15896987acd6d4b275a6416a777fbbfac962f90e1dd55c10872ff3939 SHA512 a6365b18b5c1f876c990ec4bbf522b2c8708ca73c201e9bac9447e3fc8d8979b3882c977e9393e34031ca2659b0519c841645280a03d11b4bac8e907db816ce9 +AUX telepathy-salut-0.8.1-openssl-1.1.patch 7190 BLAKE2B f66a7a22ac36889aceca1ddcf8ae85438a6ae380f99f1cc068f9df34b7b6763bd773d0669b36f2ab8fc9557ce4d6ef71abd5f011f542b040114b70a909b40a15 SHA512 fa105e35ce369a35e844d7886c22d7c17433db482d0e5ac6156139ae6474dd91045cda7490d460a26adbd35f370aa98ea9c4a5ebdc81d627c022616a9de9c138 DIST telepathy-salut-0.8.1.tar.gz 1823482 BLAKE2B 22f93d48cc749ed74ac1ee4103ea0bf5b1f93b2d14c95a4bd2edde977a5c43db5d5fe54dd246c561ee94f13b4030ab42c011f537a0e6688e8be3ac0aa0f1ca67 SHA512 34537ac9ce0b78015e184963ea79beaa7332ac11803f9683ff34577d9f0a14f7ed287aacb2c00059f2ff2f300c325a09a78a320e83d0a0031ad976da2c197a90 EBUILD telepathy-salut-0.8.1-r1.ebuild 1829 BLAKE2B 6434dc12ef7b7b193e5d246746e5d18f32c84d30fd73f4485d756cbee28ee52bddcf5431a52f632dd9097ff4f800a3f13e6daff60b41c82539c96b734b19aeaf SHA512 383b6c78ed67e26037f5d94d330c1b413929557c47746299ebaf5c22fc5dc3b46db82ae973f8a63d2b86da511a79ad556a5412c6546762b8942a5ff78428bc37 +EBUILD telepathy-salut-0.8.1-r2.ebuild 1967 BLAKE2B ee408703309d8788347b31ae4d9aa928b0f5a795f83b43685f6b1db76f30defbdb2d6570f6b0620c3051ee2336806cf6a939c54f15932419e782d2281e060e68 SHA512 6eedd656ca5aea45153b8500ae70dd4bcfa52c516e6108e6440c2fefc0fd90696d771d4acb32585a8ab849ef0cd27096c0451885edab83caa083c2bcf2b6b8e3 MISC metadata.xml 468 BLAKE2B d56336ab823a1c78eec90379dba336d33b3f0876dba77a95b3b2f8020a50903216c2ee90a77165b182b53d6c11d2a4b85a6f9acb8feff78cf6853ffd9178b612 SHA512 937c35bb0de62fd4a47e937123a16622806383ddc34e3ff1296791942a23fd81db4874c1b37cf2bbc69ece84ad37f9d36cebed328b55a633579712424eea2da0 diff --git a/net-voip/telepathy-salut/files/telepathy-salut-0.8.1-openssl-1.1.patch b/net-voip/telepathy-salut/files/telepathy-salut-0.8.1-openssl-1.1.patch new file mode 100644 index 000000000000..2f4c74e24202 --- /dev/null +++ b/net-voip/telepathy-salut/files/telepathy-salut-0.8.1-openssl-1.1.patch @@ -0,0 +1,188 @@ +From 68e7fb2f17dd9348e586ef676d8138c4b849a1ce Mon Sep 17 00:00:00 2001 +From: Roel Aaij <roel.aaij@nikhef.nl> +Date: Fri, 26 Oct 2018 15:01:37 +0200 +Subject: [PATCH] openssl: fix build with openssl >= 1.1.0 + +--- + wocky/wocky-openssl-dh1024.c | 10 ++++++++++ + wocky/wocky-openssl-dh2048.c | 10 ++++++++++ + wocky/wocky-openssl-dh4096.c | 10 ++++++++++ + wocky/wocky-openssl-dh512.c | 10 ++++++++++ + wocky/wocky-openssl.c | 38 ++++++++++++++++++++++++++++++++---- + 5 files changed, 74 insertions(+), 4 deletions(-) + +diff --git a/lib/ext/wocky/wocky/wocky-openssl-dh1024.c b/lib/ext/wocky/wocky/wocky-openssl-dh1024.c +index b77fb4c..bb50523 100644 +--- a/lib/ext/wocky/wocky/wocky-openssl-dh1024.c ++++ b/lib/ext/wocky/wocky/wocky-openssl-dh1024.c +@@ -25,11 +25,21 @@ DH *get_dh1024(void) + 0x02, + }; + DH *dh; ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) ++ int r = 0; ++#endif + + if ((dh=DH_new()) == NULL) return(NULL); ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) ++ r = DH_set0_pqg(dh, BN_bin2bn(dh1024_p,sizeof(dh1024_p),NULL), ++ NULL, BN_bin2bn(dh1024_g,sizeof(dh1024_g),NULL)); ++ if (!r) ++ { DH_free(dh); return(NULL); } ++#else + dh->p=BN_bin2bn(dh1024_p,sizeof(dh1024_p),NULL); + dh->g=BN_bin2bn(dh1024_g,sizeof(dh1024_g),NULL); + if ((dh->p == NULL) || (dh->g == NULL)) + { DH_free(dh); return(NULL); } ++#endif + return(dh); + } +diff --git a/lib/ext/wocky/wocky/wocky-openssl-dh2048.c b/lib/ext/wocky/wocky/wocky-openssl-dh2048.c +index c16deb7..d53ceda 100644 +--- a/lib/ext/wocky/wocky/wocky-openssl-dh2048.c ++++ b/lib/ext/wocky/wocky/wocky-openssl-dh2048.c +@@ -36,11 +36,21 @@ DH *get_dh2048(void) + 0x02, + }; + DH *dh; ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) ++ int r = 0; ++#endif + + if ((dh=DH_new()) == NULL) return(NULL); ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) ++ r = DH_set0_pqg(dh, BN_bin2bn(dh2048_p,sizeof(dh2048_p),NULL), ++ NULL, BN_bin2bn(dh2048_g,sizeof(dh2048_g),NULL)); ++ if (!r) ++ { DH_free(dh); return(NULL); } ++#else + dh->p=BN_bin2bn(dh2048_p,sizeof(dh2048_p),NULL); + dh->g=BN_bin2bn(dh2048_g,sizeof(dh2048_g),NULL); + if ((dh->p == NULL) || (dh->g == NULL)) + { DH_free(dh); return(NULL); } ++#endif + return(dh); + } +diff --git a/lib/ext/wocky/wocky/wocky-openssl-dh4096.c b/lib/ext/wocky/wocky/wocky-openssl-dh4096.c +index 2854385..93fa7e5 100644 +--- a/lib/ext/wocky/wocky/wocky-openssl-dh4096.c ++++ b/lib/ext/wocky/wocky/wocky-openssl-dh4096.c +@@ -57,11 +57,21 @@ DH *get_dh4096(void) + 0x02, + }; + DH *dh; ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) ++ int r = 0; ++#endif + + if ((dh=DH_new()) == NULL) return(NULL); ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) ++ r = DH_set0_pqg(dh, BN_bin2bn(dh4096_p,sizeof(dh4096_p),NULL), ++ NULL, BN_bin2bn(dh4096_g,sizeof(dh4096_g),NULL)); ++ if (!r) ++ { DH_free(dh); return(NULL); } ++#else + dh->p=BN_bin2bn(dh4096_p,sizeof(dh4096_p),NULL); + dh->g=BN_bin2bn(dh4096_g,sizeof(dh4096_g),NULL); + if ((dh->p == NULL) || (dh->g == NULL)) + { DH_free(dh); return(NULL); } ++#endif + return(dh); + } +diff --git a/lib/ext/wocky/wocky/wocky-openssl-dh512.c b/lib/ext/wocky/wocky/wocky-openssl-dh512.c +index 8e7a278..c2891cd 100644 +--- a/lib/ext/wocky/wocky/wocky-openssl-dh512.c ++++ b/lib/ext/wocky/wocky/wocky-openssl-dh512.c +@@ -20,11 +20,21 @@ DH *get_dh512(void) + 0x02, + }; + DH *dh; ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) ++ int r = 0; ++#endif + + if ((dh=DH_new()) == NULL) return(NULL); ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) ++ r = DH_set0_pqg(dh, BN_bin2bn(dh512_p,sizeof(dh512_p),NULL), ++ NULL, BN_bin2bn(dh512_g,sizeof(dh512_g),NULL)); ++ if (!r) ++ { DH_free(dh); return(NULL); } ++#else + dh->p=BN_bin2bn(dh512_p,sizeof(dh512_p),NULL); + dh->g=BN_bin2bn(dh512_g,sizeof(dh512_g),NULL); + if ((dh->p == NULL) || (dh->g == NULL)) + { DH_free(dh); return(NULL); } ++#endif + return(dh); + } +diff --git a/lib/ext/wocky/wocky/wocky-openssl.c b/lib/ext/wocky/wocky/wocky-openssl.c +index 2201213..18f9981 100644 +--- a/lib/ext/wocky/wocky/wocky-openssl.c ++++ b/lib/ext/wocky/wocky/wocky-openssl.c +@@ -885,7 +885,11 @@ check_peer_name (const char *target, X509 *cert) + int i; + gboolean rval = FALSE; + X509_NAME *subject = X509_get_subject_name (cert); +- X509_CINF *ci = cert->cert_info; ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) ++ const STACK_OF(X509_EXTENSION)* extensions = X509_get0_extensions(cert); ++#else ++ const STACK_OF(X509_EXTENSION)* extensions = cert->cert_info->extensions; ++#endif + static const long nid[] = { NID_commonName, NID_subject_alt_name, NID_undef }; + + /* first, see if the x509 name contains the info we want: */ +@@ -906,16 +910,21 @@ check_peer_name (const char *target, X509 *cert) + * and extract the subject_alt_name from the x509 v3 extensions: if that * + * extension is present, and a string, use that. If it is present, and * + * a multi-value stack, trawl it for the "DNS" entry and use that */ +- if (!rval && (ci->extensions != NULL)) +- for (i = 0; i < sk_X509_EXTENSION_num(ci->extensions) && !rval; i++) ++ if (!rval && (extensions != NULL)) ++ for (i = 0; i < sk_X509_EXTENSION_num(extensions) && !rval; i++) + { +- X509_EXTENSION *ext = sk_X509_EXTENSION_value (ci->extensions, i); ++ X509_EXTENSION *ext = sk_X509_EXTENSION_value (extensions, i); + ASN1_OBJECT *obj = X509_EXTENSION_get_object (ext); + X509V3_EXT_METHOD *convert = NULL; + long ni = OBJ_obj2nid (obj); + const guchar *p; + char *value = NULL; ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) ++ const ASN1_OCTET_STRING* ext_value = X509_EXTENSION_get_data(ext); ++ int len = ASN1_STRING_length(ext_value); ++#else + int len = ext->value->length; ++#endif + void *ext_str = NULL; + + if (ni != NID_subject_alt_name) +@@ -927,7 +936,11 @@ check_peer_name (const char *target, X509 *cert) + if ((convert = (X509V3_EXT_METHOD *) X509V3_EXT_get (ext)) == NULL) + continue; + ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) ++ p = ASN1_STRING_get0_data(ext_value); ++#else + p = ext->value->data; ++#endif + ext_str = ((convert->it != NULL) ? + ASN1_item_d2i (NULL, &p, len, ASN1_ITEM_ptr(convert->it)) : + convert->d2i (NULL, &p, len) ); +@@ -1675,12 +1701,16 @@ wocky_tls_session_init (WockyTLSSession *session) + + if G_UNLIKELY (g_once_init_enter (&initialised)) + { ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) ++ DEBUG ("initialising SSL library and error strings"); ++#else + gint malloc_init_succeeded; + + DEBUG ("initialising SSL library and error strings"); + + malloc_init_succeeded = CRYPTO_malloc_init (); + g_warn_if_fail (malloc_init_succeeded); ++#endif + + SSL_library_init (); + SSL_load_error_strings (); diff --git a/net-voip/telepathy-salut/telepathy-salut-0.8.1-r2.ebuild b/net-voip/telepathy-salut/telepathy-salut-0.8.1-r2.ebuild new file mode 100644 index 000000000000..21535ca1b82e --- /dev/null +++ b/net-voip/telepathy-salut/telepathy-salut-0.8.1-r2.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) +inherit python-any-r1 + +DESCRIPTION="A link-local XMPP connection manager for Telepathy" +HOMEPAGE="https://telepathy.freedesktop.org/" +SRC_URI="https://telepathy.freedesktop.org/releases/${PN}/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-linux" +IUSE="gnutls test" + +RDEPEND=" + >=dev-libs/dbus-glib-0.61 + dev-libs/libxml2 + >=dev-libs/glib-2.28:2 + >=sys-apps/dbus-1.1.0 + >=net-libs/telepathy-glib-0.17.1 + >=net-dns/avahi-0.6.22[dbus] + net-libs/libsoup:2.4 + sys-apps/util-linux + dev-db/sqlite:3 + gnutls? ( >=net-libs/gnutls-2.10.2 ) + !gnutls? ( >=dev-libs/openssl-0.9.8g:0[-bindist] ) +" +DEPEND="${RDEPEND} + ${PYTHON_DEPS} + dev-libs/libxslt + virtual/pkgconfig + test? ( + >=dev-libs/check-0.9.4 + net-libs/libgsasl + || ( + $(python_gen_any_dep 'dev-python/twisted[${PYTHON_USEDEP}]') + $(python_gen_any_dep 'dev-python/twisted-words[${PYTHON_USEDEP}]') + ) + ) +" +# FIXME: needs xmppstream python module +# >=net-dns/avahi-0.6.22[python] + +PATCHES=( + "${FILESDIR}"/${PN}-0.5.0-uninitialized.patch # upstream bug #37701 + "${FILESDIR}"/${P}-openssl-1.1.patch # bug #663994 +) + +python_check_deps() { + if use test ; then + has_version "dev-python/twisted[${PYTHON_USEDEP}]" \ + || has_version "dev-python/twisted-words[${PYTHON_USEDEP}]" + fi +} + +pkg_setup() { + python-any-r1_pkg_setup +} + +src_configure() { + econf \ + --disable-coding-style-checks \ + --disable-plugins \ + --disable-Werror \ + --disable-static \ + --disable-avahi-tests \ + --docdir=/usr/share/doc/${PF} \ + --with-tls=$(usex gnutls gnutls openssl) + #$(use_enable test avahi-tests) + + # false positives according to bug #413581: + # unrecognized options: --disable-plugins, --disable-avahi-tests +} + +src_install() { + MAKEOPTS+=" -j1" default # bug 413581 + find "${D}" -name '*.la' -delete || die +} |