public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-libs/wvstreams/, net-libs/wvstreams/files/
@ 2018-11-03 14:04 Jeroen Roovers
  0 siblings, 0 replies; 4+ messages in thread
From: Jeroen Roovers @ 2018-11-03 14:04 UTC (permalink / raw
  To: gentoo-commits

commit:     944606cce697022863886a3048135fcc02174088
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Sat Nov  3 13:48:17 2018 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Sat Nov  3 14:04:26 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=944606cc

net-libs/wvstreams: Add live ebuild

Package-Manager: Portage-2.3.51, Repoman-2.3.11
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 .../files/wvstreams-99999-openssl-ldflags.patch    | 10 +++
 .../wvstreams/files/wvstreams-99999-soname.patch   | 11 +++
 net-libs/wvstreams/wvstreams-99999.ebuild          | 92 ++++++++++++++++++++++
 3 files changed, 113 insertions(+)

diff --git a/net-libs/wvstreams/files/wvstreams-99999-openssl-ldflags.patch b/net-libs/wvstreams/files/wvstreams-99999-openssl-ldflags.patch
new file mode 100644
index 00000000000..0bf2bc4a7b0
--- /dev/null
+++ b/net-libs/wvstreams/files/wvstreams-99999-openssl-ldflags.patch
@@ -0,0 +1,10 @@
+--- a/config.ac
++++ b/config.ac
+@@ -444,7 +444,6 @@
+ if test "$with_openssl" != "no"; then
+     if test "$with_openssl" != ""; then
+         WV_APPEND(CPPFLAGS, [-I$with_openssl/include])
+-        WV_APPEND(LDFLAGS, [-L$with_openssl])
+     fi
+     AC_CHECK_HEADERS(openssl/ssl.h,, [with_openssl=no],
+                      [#define OPENSSL_NO_KRB5])

diff --git a/net-libs/wvstreams/files/wvstreams-99999-soname.patch b/net-libs/wvstreams/files/wvstreams-99999-soname.patch
new file mode 100644
index 00000000000..9dd0d8ab826
--- /dev/null
+++ b/net-libs/wvstreams/files/wvstreams-99999-soname.patch
@@ -0,0 +1,11 @@
+--- a/default.so.do
++++ b/default.so.do
+@@ -47,7 +47,7 @@
+     redo-ifchange "$OUT/$2.a"
+     ln -s $2.a "$sofile"
+ else
+-    $CXX -o "$sofile" -shared \
++    $CXX -o "$sofile" -shared -Wl,-soname,$sofile \
+         $zdefs \
+         $LDFLAGS \
+         $obj $libdep $libs

diff --git a/net-libs/wvstreams/wvstreams-99999.ebuild b/net-libs/wvstreams/wvstreams-99999.ebuild
new file mode 100644
index 00000000000..8665f2087f9
--- /dev/null
+++ b/net-libs/wvstreams/wvstreams-99999.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+AT_NOELIBTOOLIZE=yes
+inherit autotools flag-o-matic git-r3 multiprocessing toolchain-funcs out-of-source
+
+DESCRIPTION="A network programming library in C++"
+HOMEPAGE="https://github.com/apenwarr/wvstreams"
+EGIT_REPO_URI="${HOMEPAGE}"
+
+LICENSE="GPL-2"
+SLOT="0/5.0"
+KEYWORDS=""
+IUSE="+dbus debug doc pam static-libs +zlib"
+
+RDEPEND="
+	<dev-libs/openssl-1.1:0=
+	sys-libs/readline:0=
+	sys-libs/zlib
+	dbus? ( >=sys-apps/dbus-1.4.20 )
+	pam? ( virtual/pam )
+"
+DEPEND="
+	${RDEPEND}
+	dev-util/redo
+	virtual/pkgconfig
+	doc? ( app-doc/doxygen )
+"
+PATCHES=(
+	"${FILESDIR}"/${PN}-99999-openssl-ldflags.patch
+	"${FILESDIR}"/${PN}-99999-soname.patch
+)
+
+src_prepare() {
+	sed -i -e 's|-pre||g' config.ac || die
+
+	default
+
+	ln -s config.ac configure.ac || die
+	eautoreconf
+}
+
+my_src_configure() {
+	append-flags -fno-strict-aliasing
+	append-flags -fno-tree-dce -fno-optimize-sibling-calls #421375
+
+	tc-export AR CC CXX
+
+	econf \
+		$(use_enable debug) \
+		$(use_with dbus) \
+		$(use_with pam) \
+		$(use_with zlib) \
+		--cache-file="${BUILD_DIR}"/config.cache \
+		--disable-optimization \
+		--localstatedir=/var \
+		--without-qt \
+		--without-valgrind
+}
+
+my_src_compile() {
+	redo -j$(makeopts_jobs) || die
+
+	if use doc; then
+		doxygen "${S}"/Doxyfile || die
+	fi
+}
+
+my_src_test() {
+	redo -j$(makeopts_jobs) test || die
+}
+
+my_src_install() {
+	DESTDIR="${D}" redo -j$(makeopts_jobs) install || die
+
+	local lib
+	for lib in $(find "${BUILD_DIR}" -name '*.so' -type l | grep -v libwvstatic); do
+		insinto /usr/$(get_libdir)/pkgconfig
+		doins "${BUILD_DIR}"/pkgconfig/$(basename ${lib/.so}).pc
+	done
+
+	if use doc; then
+		#the list of files is too big for dohtml -r Docs/doxy-html/*
+		docinto html
+		dodoc -r Docs/doxy-html/*
+	fi
+
+	if ! use static-libs; then
+		find "${D}/usr/$(get_libdir)" -name '*.a' -delete || die
+	fi
+}


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-libs/wvstreams/, net-libs/wvstreams/files/
@ 2018-12-18  3:09 Craig Andrews
  0 siblings, 0 replies; 4+ messages in thread
From: Craig Andrews @ 2018-12-18  3:09 UTC (permalink / raw
  To: gentoo-commits

commit:     875f94f85a365c3fd22f07fe22634afb49e9febd
Author:     Craig Andrews <candrews <AT> gentoo <DOT> org>
AuthorDate: Mon Dec  3 20:12:50 2018 +0000
Commit:     Craig Andrews <candrews <AT> gentoo <DOT> org>
CommitDate: Tue Dec 18 03:08:52 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=875f94f8

net-libs/wvstreams: OpenSSL 1.1 compatibility

Also removed unused versionator inherit

Closes: https://bugs.gentoo.org/614810
Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Craig Andrews <candrews <AT> gentoo.org>

 .../files/wvstreams-4.6.1-openssl-1.1.patch        | 555 +++++++++++++++++++++
 net-libs/wvstreams/wvstreams-4.6.1-r6.ebuild       |  96 ++++
 net-libs/wvstreams/wvstreams-99999.ebuild          |   2 +-
 3 files changed, 652 insertions(+), 1 deletion(-)

diff --git a/net-libs/wvstreams/files/wvstreams-4.6.1-openssl-1.1.patch b/net-libs/wvstreams/files/wvstreams-4.6.1-openssl-1.1.patch
new file mode 100644
index 00000000000..88d854e2755
--- /dev/null
+++ b/net-libs/wvstreams/files/wvstreams-4.6.1-openssl-1.1.patch
@@ -0,0 +1,555 @@
+From 5506a74e1b033776ad441b4554716cdcfa88fe03 Mon Sep 17 00:00:00 2001
+From: Reiner Herrmann <reiner@reiner-h.de>
+Date: Sat, 28 Jul 2018 23:26:17 +0200
+Subject: [PATCH] Port to OpenSSL 1.1
+
+---
+ crypto/wvcrl.cc           | 38 +++++++++++++-------------------------
+ crypto/wvdiffiehellman.cc | 30 +++++++++++++++++++-----------
+ crypto/wvdigest.cc        | 16 ++++++++--------
+ crypto/wvocsp.cc          | 35 +++++++++--------------------------
+ crypto/wvx509.cc          | 31 ++++++++++++++++---------------
+ crypto/wvx509mgr.cc       | 27 ++++++++++++++++-----------
+ include/wvdiffiehellman.h |  2 +-
+ include/wvdigest.h        | 14 ++++++--------
+ include/wvtripledes.h     | 10 +++++-----
+ 9 files changed, 93 insertions(+), 110 deletions(-)
+
+diff --git a/crypto/wvcrl.cc b/crypto/wvcrl.cc
+index fa00c760..880ad85d 100644
+--- a/crypto/wvcrl.cc
++++ b/crypto/wvcrl.cc
+@@ -357,31 +357,19 @@ bool WvCRL::isrevoked(WvStringParm serial_number) const
+ 	ASN1_INTEGER *serial = serial_to_int(serial_number);
+ 	if (serial)
+ 	{
+-	    X509_REVOKED mayberevoked;
+-	    mayberevoked.serialNumber = serial;
+-	    if (crl->crl->revoked)
+-	    {
+-		int idx = sk_X509_REVOKED_find(crl->crl->revoked, 
+-					       &mayberevoked);
+-		ASN1_INTEGER_free(serial);
+-		if (idx >= 0)
+-                {
+-                    debug("Certificate is revoked.\n");
+-		    return true;
+-                }
+-                else
+-                {
+-                    debug("Certificate is not revoked.\n");
+-		    return false;
+-                }
+-	    }
+-	    else
+-	    {
+-		ASN1_INTEGER_free(serial);
+-		debug("CRL does not have revoked list.\n");
+-                return false;
+-	    }
+-	    
++	    X509_REVOKED *revoked_entry = NULL;
++	    int idx = X509_CRL_get0_by_serial(crl, &revoked_entry, serial);
++	    ASN1_INTEGER_free(serial);
++	    if (idx >= 1 || revoked_entry)
++            {
++                debug("Certificate is revoked.\n");
++	        return true;
++            }
++            else
++            {
++                debug("Certificate is not revoked.\n");
++	        return false;
++            }
+ 	}
+ 	else
+ 	    debug(WvLog::Warning, "Can't convert serial number to ASN1 format. "
+diff --git a/crypto/wvdiffiehellman.cc b/crypto/wvdiffiehellman.cc
+index 7c0bf329..15cd1040 100644
+--- a/crypto/wvdiffiehellman.cc
++++ b/crypto/wvdiffiehellman.cc
+@@ -39,24 +39,25 @@ WvDiffieHellman::WvDiffieHellman(const unsigned char *_key, int _keylen,
+ {
+     int problems;
+     int check;
+-    {
++
+ 	info = DH_new();
+-	info->p = BN_bin2bn(_key, _keylen, NULL);
++	BIGNUM *p = BN_bin2bn(_key, _keylen, NULL);
+ // 	info->p->top = 0;
+ // 	info->p->dmax = _keylen * 8 / BN_BITS2;
+ // 	info->p->neg = 0;
+ // 	info->p->flags = 0;
+ 
+-	info->g = BN_new();
+-	BN_set_word(info->g, generator);
++	BIGNUM *g = BN_new();
++	BN_set_word(g, generator);
+ // 	info->g->d = &generator;
+ //  	info->g->top = 0;
+ //  	info->g->dmax = 1;
+ //  	info->g->neg = 0;
+ //  	info->g->flags = 0;
+-    }
+ 
+-    check = BN_mod_word(info->p, 24);
++	DH_set0_pqg(info, p, NULL, g);
++
++    check = BN_mod_word(p, 24);
+     DH_check(info, &problems);
+     if (problems & DH_CHECK_P_NOT_PRIME)
+  	log(WvLog::Error, "Using a composite number for authentication.\n");
+@@ -64,7 +65,7 @@ WvDiffieHellman::WvDiffieHellman(const unsigned char *_key, int _keylen,
+ 	log(WvLog::Error,"Using an unsafe prime number for authentication.\n");
+     if (problems & DH_NOT_SUITABLE_GENERATOR)
+ 	log(WvLog::Error, "Can you just use 2 instead of %s (%s)!!\n",
+-	    BN_bn2hex(info->g), check);
++	    BN_bn2hex(g), check);
+     if (problems & DH_UNABLE_TO_CHECK_GENERATOR)
+ 	log(WvLog::Notice, "Using a strange argument for diffie-hellman.\n");
+     DH_generate_key(info);
+@@ -72,18 +73,23 @@ WvDiffieHellman::WvDiffieHellman(const unsigned char *_key, int _keylen,
+ 
+ int WvDiffieHellman::pub_key_len()
+ {
+-    return BN_num_bytes(info->pub_key);
++    const BIGNUM *pub_key = NULL;
++	DH_get0_key(info, &pub_key, NULL);
++    return BN_num_bytes(pub_key);
+ }
+ 
+ int WvDiffieHellman::get_public_value(WvBuf &outbuf, int len)
+ {
+-    int key_len = BN_num_bytes(info->pub_key);
++	const BIGNUM *pub_key = NULL;
++	DH_get0_key(info, &pub_key, NULL);
++
++    int key_len = BN_num_bytes(pub_key);
+     if (key_len < len)
+ 	len = key_len;
+ 
+     // alloca is stack allocated, don't free it.
+     unsigned char *foo = (unsigned char*)alloca(key_len);
+-    BN_bn2bin(info->pub_key, foo);
++    BN_bn2bin(pub_key, foo);
+     outbuf.put(foo, len);
+ 
+     return len;
+@@ -91,8 +97,10 @@ int WvDiffieHellman::get_public_value(WvBuf &outbuf, int len)
+ 
+ bool WvDiffieHellman::create_secret(WvBuf &inbuf, size_t in_len, WvBuf& outbuf)
+ {
++   const BIGNUM *pub_key = NULL;
++   DH_get0_key(info, &pub_key, NULL);
+     unsigned char *foo = (unsigned char *)alloca(DH_size(info));
+-   log("My public value\n%s\nYour public value\n%s\n",BN_bn2hex(info->pub_key),
++   log("My public value\n%s\nYour public value\n%s\n",BN_bn2hex(pub_key),
+        hexdump_buffer(inbuf.peek(0, in_len), in_len, false));
+     int len = DH_compute_key (foo, BN_bin2bn(inbuf.get(in_len), in_len, NULL), 
+ 			      info);
+diff --git a/crypto/wvdigest.cc b/crypto/wvdigest.cc
+index 150edeea..73ebb5d4 100644
+--- a/crypto/wvdigest.cc
++++ b/crypto/wvdigest.cc
+@@ -13,10 +13,10 @@
+ 
+ /***** WvEVPMDDigest *****/
+ 
+-WvEVPMDDigest::WvEVPMDDigest(const env_md_st *_evpmd) :
++WvEVPMDDigest::WvEVPMDDigest(const EVP_MD*_evpmd) :
+     evpmd(_evpmd), active(false)
+ {
+-    evpctx = new EVP_MD_CTX;
++    evpctx = EVP_MD_CTX_new();
+     _reset();
+ }
+ 
+@@ -24,7 +24,7 @@ WvEVPMDDigest::WvEVPMDDigest(const env_md_st *_evpmd) :
+ WvEVPMDDigest::~WvEVPMDDigest()
+ {
+     cleanup();
+-    delete evpctx;
++    EVP_MD_CTX_free(evpctx);
+ }
+ 
+ 
+@@ -60,7 +60,7 @@ bool WvEVPMDDigest::_reset()
+     // the typecast is necessary for API compatibility with different
+     // versions of openssl.  None of them *actually* change the contents of
+     // the pointer.
+-    EVP_DigestInit(evpctx, (env_md_st *)evpmd);
++    EVP_DigestInit(evpctx, evpmd);
+     active = true;
+     return true;
+ }
+@@ -79,7 +79,7 @@ void WvEVPMDDigest::cleanup()
+ 
+ size_t WvEVPMDDigest::digestsize() const
+ {
+-    return EVP_MD_size((env_md_st *)evpmd);
++    return EVP_MD_size(evpmd);
+ }
+ 
+ 
+@@ -104,14 +104,14 @@ WvHMACDigest::WvHMACDigest(WvEVPMDDigest *_digest,
+ {
+     key = new unsigned char[keysize];
+     memcpy(key, _key, keysize);
+-    hmacctx = new HMAC_CTX;
++    hmacctx = HMAC_CTX_new();
+     _reset();
+ }
+ 
+ WvHMACDigest::~WvHMACDigest()
+ {
+     cleanup();
+-    delete hmacctx;
++    HMAC_CTX_free(hmacctx);
+     deletev key;
+     delete digest;
+ }
+@@ -145,7 +145,7 @@ bool WvHMACDigest::_finish(WvBuf &outbuf)
+ bool WvHMACDigest::_reset()
+ {
+     cleanup();
+-    HMAC_Init(hmacctx, key, keysize, (env_md_st *)digest->getevpmd());
++    HMAC_Init(hmacctx, key, keysize, digest->getevpmd());
+     active = true;
+     return true;
+ }
+diff --git a/crypto/wvocsp.cc b/crypto/wvocsp.cc
+index ddb2de49..7d5da072 100644
+--- a/crypto/wvocsp.cc
++++ b/crypto/wvocsp.cc
+@@ -118,9 +118,10 @@ bool WvOCSPResp::check_nonce(const WvOCSPReq &req) const
+ 
+ bool WvOCSPResp::signedbycert(const WvX509 &cert) const
+ {
+-    EVP_PKEY *skey = X509_get_pubkey(cert.cert);
+-    int i = OCSP_BASICRESP_verify(bs, skey, 0);
+-    EVP_PKEY_free(skey);
++    STACK_OF(X509) *sk = sk_X509_new_null();
++    sk_X509_push(sk, cert.cert);
++    int i = OCSP_basic_verify(bs, sk, NULL, OCSP_NOVERIFY);
++    sk_X509_free(sk);
+ 
+     if(i > 0)
+         return true;
+@@ -131,33 +132,15 @@ bool WvOCSPResp::signedbycert(const WvX509 &cert) const
+ 
+ WvX509 WvOCSPResp::get_signing_cert() const
+ {
+-    if (!bs || !sk_X509_num(bs->certs))
++    const STACK_OF(X509) *certs = OCSP_resp_get0_certs(bs);
++    if (!bs || !sk_X509_num(certs))
+         return WvX509();
+ 
+-    // note: the following bit of code is taken almost verbatim from
+-    // ocsp_vfy.c in OpenSSL 0.9.8. Copyright and attribution should 
+-    // properly belong to them
+-
+-    OCSP_RESPID *id = bs->tbsResponseData->responderId;
+-
+-    if (id->type == V_OCSP_RESPID_NAME)
+-    {
+-        X509 *x = X509_find_by_subject(bs->certs, id->value.byName);
+-        if (x)
+-            return WvX509(X509_dup(x));
++    X509 *signer = NULL;
++    if (OCSP_resp_get0_signer(bs, &signer, NULL) == 1) {
++        return WvX509(X509_dup(signer));
+     }
+ 
+-    if (id->value.byKey->length != SHA_DIGEST_LENGTH) return NULL;
+-    unsigned char tmphash[SHA_DIGEST_LENGTH];
+-    unsigned char *keyhash = id->value.byKey->data;
+-    for (int i = 0; i < sk_X509_num(bs->certs); i++)
+-    {
+-        X509 *x = sk_X509_value(bs->certs, i);
+-        X509_pubkey_digest(x, EVP_sha1(), tmphash, NULL);
+-        if(!memcmp(keyhash, tmphash, SHA_DIGEST_LENGTH))
+-            return WvX509(X509_dup(x));
+-    }
+-    
+     return WvX509();
+ }
+ 
+diff --git a/crypto/wvx509.cc b/crypto/wvx509.cc
+index 93dae06f..eed6c18e 100644
+--- a/crypto/wvx509.cc
++++ b/crypto/wvx509.cc
+@@ -974,7 +974,7 @@ static void add_aia(WvStringParm type, WvString identifier,
+     sk_ACCESS_DESCRIPTION_push(ainfo, acc);
+     acc->method = OBJ_txt2obj(type.cstr(), 0);
+     acc->location->type = GEN_URI;
+-    acc->location->d.ia5 = M_ASN1_IA5STRING_new();
++    acc->location->d.ia5 = ASN1_IA5STRING_new();
+     unsigned char *cident 
+ 	= reinterpret_cast<unsigned char *>(identifier.edit());
+     ASN1_STRING_set(acc->location->d.ia5, cident, identifier.len());
+@@ -1059,7 +1059,7 @@ void WvX509::set_crl_urls(WvStringList &urls)
+         GENERAL_NAMES *uris = GENERAL_NAMES_new();
+         GENERAL_NAME *uri = GENERAL_NAME_new();
+         uri->type = GEN_URI;
+-        uri->d.ia5 = M_ASN1_IA5STRING_new();
++        uri->d.ia5 = ASN1_IA5STRING_new();
+         unsigned char *cident
+ 	    = reinterpret_cast<unsigned char *>(i().edit());    
+         ASN1_STRING_set(uri->d.ia5, cident, i().len());
+@@ -1158,10 +1158,15 @@ WvString WvX509::get_extension(int nid) const
+         if (ext)
+         {
++#if OPENSSL_VERSION_NUMBER >= 0x10000000L
++            const X509V3_EXT_METHOD *method = X509V3_EXT_get(ext);
++#else
+             X509V3_EXT_METHOD *method = X509V3_EXT_get(ext);
++#endif
++            ASN1_OCTET_STRING *ext_data_str = X509_EXTENSION_get_data(ext);
+             if (!method)
+             {
+                 WvDynBuf buf;
+-                buf.put(ext->value->data, ext->value->length);
++                buf.put(ext_data_str->data, ext_data_str->length);
+                 retval = buf.getstr();
+             }
+             else
+@@ -1172,21 +1173,21 @@ WvString WvX509::get_extension(int nid) const
+                 // even though it's const (at least as of version 0.9.8e). 
+                 // gah.
+ #if OPENSSL_VERSION_NUMBER >= 0x0090800fL
+-                const unsigned char * ext_value_data = ext->value->data;
++                const unsigned char * ext_value_data = ext_data_str->data;
+ #else
+                 unsigned char *ext_value_data = ext->value->data;
+ #endif
+                 if (method->it)
+                 {
+                     ext_data = ASN1_item_d2i(NULL, &ext_value_data,
+-                                             ext->value->length, 
++                                             ext_data_str->length, 
+                                              ASN1_ITEM_ptr(method->it));
+                     TRACE("Applied generic conversion!\n");
+                 }
+                 else
+                 {
+                     ext_data = method->d2i(NULL, &ext_value_data,
+-                                           ext->value->length);
++                                           ext_data_str->length);
+                     TRACE("Applied method specific conversion!\n");
+                 }
+                 
+@@ -1321,13 +1322,13 @@ bool WvX509::verify(WvBuf &original, WvStringParm signature) const
+         return false;
+     
+     /* Verify the signature */
+-    EVP_MD_CTX sig_ctx;
+-    EVP_VerifyInit(&sig_ctx, EVP_sha1());
+-    EVP_VerifyUpdate(&sig_ctx, original.peek(0, original.used()),
++    EVP_MD_CTX *sig_ctx = EVP_MD_CTX_new();
++    EVP_VerifyInit(sig_ctx, EVP_sha1());
++    EVP_VerifyUpdate(sig_ctx, original.peek(0, original.used()),
+ 		     original.used());
+-    int sig_err = EVP_VerifyFinal(&sig_ctx, sig_buf, sig_size, pk);
++    int sig_err = EVP_VerifyFinal(sig_ctx, sig_buf, sig_size, pk);
+     EVP_PKEY_free(pk);
+-    EVP_MD_CTX_cleanup(&sig_ctx); // Again, not my fault... 
++    EVP_MD_CTX_free(sig_ctx); // Again, not my fault... 
+     if (sig_err != 1) 
+     {
+         debug("Verify failed!\n");
+@@ -1446,19 +1447,19 @@ void WvX509::set_ski()
+ {
+     CHECK_CERT_EXISTS_SET("ski");
+ 
+-    ASN1_OCTET_STRING *oct = M_ASN1_OCTET_STRING_new();
+-    ASN1_BIT_STRING *pk = cert->cert_info->key->public_key;
++    ASN1_OCTET_STRING *oct = ASN1_OCTET_STRING_new();
++    ASN1_BIT_STRING *pk = X509_get0_pubkey_bitstr(cert);
+     unsigned char pkey_dig[EVP_MAX_MD_SIZE];
+     unsigned int diglen;
+ 
+     EVP_Digest(pk->data, pk->length, pkey_dig, &diglen, EVP_sha1(), NULL);
+ 
+-    M_ASN1_OCTET_STRING_set(oct, pkey_dig, diglen);
++    ASN1_OCTET_STRING_set(oct, pkey_dig, diglen);
+     X509_EXTENSION *ext = X509V3_EXT_i2d(NID_subject_key_identifier, 0, 
+ 					oct);
+     X509_add_ext(cert, ext, -1);
+     X509_EXTENSION_free(ext);
+-    M_ASN1_OCTET_STRING_free(oct);
++    ASN1_OCTET_STRING_free(oct);
+ }
+ 
+ 
+diff --git a/crypto/wvx509mgr.cc b/crypto/wvx509mgr.cc
+index f249eeca..156d3a49 100644
+--- a/crypto/wvx509mgr.cc
++++ b/crypto/wvx509mgr.cc
+@@ -350,6 +350,8 @@ bool WvX509Mgr::signcert(WvX509 &unsignedcert) const
+         return false;
+     }
+ 
++    uint32_t ex_flags = X509_get_extension_flags(cert);
++    uint32_t ex_kusage = X509_get_key_usage(cert);
+     if (cert == unsignedcert.cert)
+     {
+ 	debug("Self Signing!\n");
+@@ -362,8 +364,8 @@ bool WvX509Mgr::signcert(WvX509 &unsignedcert) const
+         return false;
+     }
+ #endif
+-    else if (!((cert->ex_flags & EXFLAG_KUSAGE) && 
+-               (cert->ex_kusage & KU_KEY_CERT_SIGN)))
++    else if (!((ex_flags & EXFLAG_KUSAGE) && 
++               (ex_kusage & KU_KEY_CERT_SIGN)))
+     {
+ 	debug("This Certificate is not allowed to sign certificates!\n");
+ 	return false;
+@@ -390,6 +392,8 @@ bool WvX509Mgr::signcert(WvX509 &unsignedcert) const
+ 
+ bool WvX509Mgr::signcrl(WvCRL &crl) const
+ {
++    uint32_t ex_flags = X509_get_extension_flags(cert);
++    uint32_t ex_kusage = X509_get_key_usage(cert);
+     if (!isok() || !crl.isok())
+     {
+         debug(WvLog::Warning, "Asked to sign CRL, but certificate or CRL (or "
+@@ -403,12 +407,12 @@ bool WvX509Mgr::signcrl(WvCRL &crl) const
+               "CRLs!\n");
+         return false;
+     }
+-    else if (!((cert->ex_flags & EXFLAG_KUSAGE) && 
+-	  (cert->ex_kusage & KU_CRL_SIGN)))
++    else if (!((ex_flags & EXFLAG_KUSAGE) && 
++	  (ex_kusage & KU_CRL_SIGN)))
+     {
+ 	debug("Certificate not allowed to sign CRLs! (%s %s)\n", 
+-              (cert->ex_flags & EXFLAG_KUSAGE),
+-	      (cert->ex_kusage & KU_CRL_SIGN));
++              (ex_flags & EXFLAG_KUSAGE),
++	      (ex_kusage & KU_CRL_SIGN));
+ 	return false;
+     }
+ #endif
+@@ -454,7 +458,6 @@ WvString WvX509Mgr::sign(WvBuf &data) const
+ {
+     assert(rsa);
+ 
+-    EVP_MD_CTX sig_ctx;
+     unsigned char sig_buf[4096];
+     
+     EVP_PKEY *pk = EVP_PKEY_new();
+@@ -467,20 +470,22 @@ WvString WvX509Mgr::sign(WvBuf &data) const
+ 	return WvString::null;
+     }
+     
+-    EVP_SignInit(&sig_ctx, EVP_sha1());
+-    EVP_SignUpdate(&sig_ctx, data.peek(0, data.used()), data.used());
++    EVP_MD_CTX *sig_ctx = EVP_MD_CTX_new();
++    EVP_SignInit(sig_ctx, EVP_sha1());
++    EVP_SignUpdate(sig_ctx, data.peek(0, data.used()), data.used());
+     unsigned int sig_len = sizeof(sig_buf);
+-    int sig_err = EVP_SignFinal(&sig_ctx, sig_buf, 
++    int sig_err = EVP_SignFinal(sig_ctx, sig_buf, 
+ 				&sig_len, pk);
+     if (sig_err != 1)
+     {
+ 	debug("Error while signing.\n");
+ 	EVP_PKEY_free(pk);
++	EVP_MD_CTX_free(sig_ctx);
+ 	return WvString::null;
+     }
+ 
+     EVP_PKEY_free(pk);
+-    EVP_MD_CTX_cleanup(&sig_ctx); // this isn't my fault ://
++    EVP_MD_CTX_free(sig_ctx); // this isn't my fault ://
+     WvDynBuf buf;
+     buf.put(sig_buf, sig_len);
+     debug("Signature size: %s\n", buf.used());
+diff --git a/include/wvdiffiehellman.h b/include/wvdiffiehellman.h
+index af75ffa9..a2d001f8 100644
+--- a/include/wvdiffiehellman.h
++++ b/include/wvdiffiehellman.h
+@@ -27,7 +27,7 @@ class WvDiffieHellman
+     bool create_secret(WvBuf &inbuf, size_t in_len, WvBuf& outbuf);
+ 
+ protected:
+-    struct dh_st *info;
++    DH *info;
+     BN_ULONG generator;
+ 
+ private:
+diff --git a/include/wvdigest.h b/include/wvdigest.h
+index fdc39bd6..f2eed401 100644
+--- a/include/wvdigest.h
++++ b/include/wvdigest.h
+@@ -9,10 +9,8 @@
+ 
+ #include "wvencoder.h"
+ #include <stdint.h>
++#include <openssl/evp.h>
+ 
+-struct env_md_st;
+-struct env_md_ctx_st;
+-struct hmac_ctx_st;
+ 
+ /**
+  * Superclass for all message digests.
+@@ -45,8 +43,8 @@ class WvDigest : public WvEncoder
+ class WvEVPMDDigest : public WvDigest
+ {
+     friend class WvHMACDigest;
+-    const env_md_st *evpmd;
+-    env_md_ctx_st *evpctx;
++    const EVP_MD *evpmd;
++    EVP_MD_CTX *evpctx;
+     bool active;
+ 
+ public:
+@@ -54,13 +52,13 @@ class WvEVPMDDigest : public WvDigest
+     virtual size_t digestsize() const;
+ 
+ protected:
+-    WvEVPMDDigest(const env_md_st *_evpmd);
++    WvEVPMDDigest(const EVP_MD *_evpmd);
+     virtual bool _encode(WvBuf &inbuf, WvBuf &outbuf,
+         bool flush); // consumes input
+     virtual bool _finish(WvBuf &outbuf); // outputs digest
+     virtual bool _reset(); // supported: resets digest value
+     
+-    const env_md_st *getevpmd()
++    const EVP_MD *getevpmd()
+         { return evpmd; }
+ 
+ private:
+@@ -104,7 +102,7 @@ class WvHMACDigest : public WvDigest
+     WvEVPMDDigest *digest;
+     unsigned char *key;
+     size_t keysize;
+-    hmac_ctx_st *hmacctx;
++    HMAC_CTX *hmacctx;
+     bool active;
+ 
+ public:
+diff --git a/include/wvtripledes.h b/include/wvtripledes.h
+index 185fe8a9..a442e7a0 100644
+--- a/include/wvtripledes.h
++++ b/include/wvtripledes.h
+@@ -70,11 +70,11 @@ class WvTripleDESEncoder : public WvCryptoEncoder
+ 
+ private:
+     Mode mode;
+-    des_cblock key;
+-    des_key_schedule deskey1;
+-    des_key_schedule deskey2;
+-    des_key_schedule deskey3;
+-    des_cblock ivec; // initialization vector
++    DES_cblock key;
++    DES_key_schedule deskey1;
++    DES_key_schedule deskey2;
++    DES_key_schedule deskey3;
++    DES_cblock ivec; // initialization vector
+     int ivecoff; // current offset into initvec
+ };
+ 

diff --git a/net-libs/wvstreams/wvstreams-4.6.1-r6.ebuild b/net-libs/wvstreams/wvstreams-4.6.1-r6.ebuild
new file mode 100644
index 00000000000..91012087a9a
--- /dev/null
+++ b/net-libs/wvstreams/wvstreams-4.6.1-r6.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit autotools eutils flag-o-matic toolchain-funcs
+
+DESCRIPTION="A network programming library in C++"
+HOMEPAGE="http://alumnit.ca/wiki/?WvStreams"
+SRC_URI="https://wvstreams.googlecode.com/files/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~sparc ~x86"
+IUSE="pam doc +ssl +dbus debug boost"
+
+#Tests fail if openssl is not compiled with -DPURIFY. Gentoo's isn't. FAIL!
+RESTRICT="test"
+
+#QA Fail: xplc is compiled as a part of wvstreams.
+#It'll take a larger patching effort to get it extracted, since upstream integrated it
+#more tightly this time. Probably for the better since upstream xplc seems dead.
+
+RDEPEND="
+	dev-libs/openssl:0=
+	sys-libs/readline:0=
+	sys-libs/zlib
+	dbus? ( >=sys-apps/dbus-1.4.20 )
+	pam? ( virtual/pam )
+"
+DEPEND="
+	${RDEPEND}
+	virtual/pkgconfig
+	doc? ( app-doc/doxygen )
+	boost? ( >=dev-libs/boost-1.34.1:= )
+"
+DOCS="ChangeLog README*"
+PATCHES=(
+	"${FILESDIR}"/${P}-autoconf.patch
+	"${FILESDIR}"/${P}-fix-c++14.patch
+	"${FILESDIR}"/${P}-gcc47.patch
+	"${FILESDIR}"/${P}-glibc212.patch
+	"${FILESDIR}"/${P}-parallel-make.patch
+	"${FILESDIR}"/${P}-_DEFAULT_SOURCE.patch
+	"${FILESDIR}"/${P}-2048-bytes-should-be-enough-right-question-mark.patch
+	"${FILESDIR}"/${P}-openssl-1.1.patch
+)
+
+src_prepare() {
+	default
+
+	eautoreconf
+}
+
+src_configure() {
+	append-flags -fno-strict-aliasing
+	append-flags -fno-tree-dce -fno-optimize-sibling-calls #421375
+
+	tc-export AR CXX
+
+	use boost && export ac_cv_header_tr1_functional=no
+
+	econf \
+		$(use_enable debug) \
+		$(use_with dbus) \
+		$(use_with pam) \
+		--cache-file="${T}"/config.cache \
+		--disable-optimization \
+		--localstatedir=/var \
+		--with-openssl \
+		--with-zlib \
+		--without-qt \
+		--without-tcl \
+		--without-valgrind
+}
+
+src_compile() {
+	default
+
+	if use doc; then
+		doxygen || die
+	fi
+}
+
+src_test() {
+	emake test
+}
+
+src_install() {
+	default
+
+	if use doc; then
+		#the list of files is too big for dohtml -r Docs/doxy-html/*
+		docinto html
+		dodoc -r Docs/doxy-html/*
+	fi
+}

diff --git a/net-libs/wvstreams/wvstreams-99999.ebuild b/net-libs/wvstreams/wvstreams-99999.ebuild
index 8665f2087f9..4181ca4eaeb 100644
--- a/net-libs/wvstreams/wvstreams-99999.ebuild
+++ b/net-libs/wvstreams/wvstreams-99999.ebuild
@@ -15,7 +15,7 @@ KEYWORDS=""
 IUSE="+dbus debug doc pam static-libs +zlib"
 
 RDEPEND="
-	<dev-libs/openssl-1.1:0=
+	dev-libs/openssl:0=
 	sys-libs/readline:0=
 	sys-libs/zlib
 	dbus? ( >=sys-apps/dbus-1.4.20 )


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-libs/wvstreams/, net-libs/wvstreams/files/
@ 2020-07-08  6:49 Jeroen Roovers
  0 siblings, 0 replies; 4+ messages in thread
From: Jeroen Roovers @ 2020-07-08  6:49 UTC (permalink / raw
  To: gentoo-commits

commit:     3c19df3b0bb6925e5dedb19b1de028dea8a98d26
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Tue Jul  7 21:20:43 2020 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Wed Jul  8 06:49:44 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c19df3b

net-libs/wvstreams: Add llvm patch

Adapted from upstream commit 14f88faeccd9eaef8a9d4bd0e95b87745b8a54bb

Package-Manager: Portage-2.3.103, Repoman-2.3.23
Bug: https://bugs.gentoo.org/731200
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 .../wvstreams/files/wvstreams-4.6.1_p14-llvm.patch | 412 +++++++++++++++++++++
 net-libs/wvstreams/wvstreams-4.6.1_p14-r1.ebuild   |   1 +
 2 files changed, 413 insertions(+)

diff --git a/net-libs/wvstreams/files/wvstreams-4.6.1_p14-llvm.patch b/net-libs/wvstreams/files/wvstreams-4.6.1_p14-llvm.patch
new file mode 100644
index 00000000000..156d198a440
--- /dev/null
+++ b/net-libs/wvstreams/files/wvstreams-4.6.1_p14-llvm.patch
@@ -0,0 +1,412 @@
+--- a/include/uniconf.h
++++ b/include/uniconf.h
+@@ -434,7 +434,7 @@
+  */
+ class UniConf::Iter : public UniConf::IterBase
+ {
+-    UniConfGen::Iter *it;
++    IUniConfGen::Iter *it;
+     
+ public:
+     /** Creates an iterator over the direct children of a branch. */
+@@ -465,7 +465,7 @@
+  */
+ class UniConf::RecursiveIter : public UniConf::IterBase
+ {
+-    UniConfGen::Iter *it;
++    IUniConfGen::Iter *it;
+ 
+ public:
+     /** Creates a recursive iterator over a branch. */
+--- a/include/uniconfgen.h
++++ b/include/uniconfgen.h
+@@ -153,8 +153,50 @@
+      */
+     virtual bool haschildren(const UniConfKey &key) = 0;
+ 
+-    /** The abstract iterator type (see below) */
+-    class Iter;
++    /**
++     * An abstract iterator over keys and values in a generator.
++     *
++     * Unlike other WvStreams iterators, this one declares virtual methods so
++     * that UniConfGen implementations can supply the right behaviour
++     * through a common interface that does not depend on static typing.
++     *
++     * The precise traversal sequence is defined by the iterator implementation.
++     *
++     * The iterator need not support concurrent modifications of the underlying
++     * data structures.
++     * 
++     * TODO: Consider changing this rule depending on observed usage patterns.
++     */
++    class Iter
++    {
++    public:
++        /** Destroys the iterator. */
++        virtual ~Iter() { }
++
++        /**
++         * Rewinds the iterator.
++         * Must be called prior to the first invocation of next().
++         */
++        virtual void rewind() = 0;
++
++        /**
++         * Seeks to the next element in the sequence.
++         * Returns true if that element exists.
++         * Must be called prior to the first invocation of key().
++         */
++        virtual bool next() = 0;
++
++        /** Returns the current key. */
++        virtual UniConfKey key() const = 0;
++        
++        /** 
++         * Returns the value of the current key.  You could just do a get(),
++         * but maybe your generator has a more efficient way.
++         */
++        virtual WvString value() const = 0;
++    };
++
++
+ 
+     /** A concrete null iterator type (see below) */
+     class NullIter;
+@@ -214,7 +256,7 @@
+ public:
+     /** Destroys the UniConfGen and may discard uncommitted data. */
+     virtual ~UniConfGen();
+-
++    
+     /***** Notification API *****/
+     
+     /**
+@@ -300,70 +342,28 @@
+ protected:
+     // A naive implementation of setv() that uses only set().
+     void setv_naive(const UniConfPairList &pairs);
+-};
+-
+-DeclareWvList(IUniConfGen);
+-DeclareWvList2(UniConfGenList, IUniConfGen);
+-
+ 
+-/**
+- * An abstract iterator over keys and values in a generator.
+- *
+- * Unlike other WvStreams iterators, this one declares virtual methods so
+- * that UniConfGen implementations can supply the right behaviour
+- * through a common interface that does not depend on static typing.
+- *
+- * The precise traversal sequence is defined by the iterator implementation.
+- *
+- * The iterator need not support concurrent modifications of the underlying
+- * data structures.
+- * 
+- * TODO: Consider changing this rule depending on observed usage patterns.
+- */
+-class UniConfGen::Iter
+-{
+ public:
+-    /** Destroys the iterator. */
+-    virtual ~Iter() { }
+-
+-    /**
+-     * Rewinds the iterator.
+-     * Must be called prior to the first invocation of next().
+-     */
+-    virtual void rewind() = 0;
+-
+     /**
+-     * Seeks to the next element in the sequence.
+-     * Returns true if that element exists.
+-     * Must be called prior to the first invocation of key().
+-     */
+-    virtual bool next() = 0;
+-
+-    /** Returns the current key. */
+-    virtual UniConfKey key() const = 0;
+-    
+-    /** 
+-     * Returns the value of the current key.  You could just do a get(),
+-     * but maybe your generator has a more efficient way.
++     * An iterator that's always empty.
++     * This is handy if you don't have anything good to iterate over.
+      */
+-    virtual WvString value() const = 0;
++    class NullIter : public UniConfGen::Iter
++    {
++    public:
++        /***** Overridden members *****/
++        
++        virtual void rewind() { }
++        virtual bool next() { return false; }
++        virtual UniConfKey key() const { return UniConfKey::EMPTY; }
++        virtual WvString value() const { return WvString(); }
++    };
+ };
+ 
++DeclareWvList(IUniConfGen);
++DeclareWvList2(UniConfGenList, IUniConfGen);
++
+ 
+-/**
+- * An iterator that's always empty.
+- * This is handy if you don't have anything good to iterate over.
+- */
+-class UniConfGen::NullIter : public UniConfGen::Iter
+-{
+-public:
+-    /***** Overridden members *****/
+-    
+-    virtual void rewind() { }
+-    virtual bool next() { return false; }
+-    virtual UniConfKey key() const { return UniConfKey::EMPTY; }
+-    virtual WvString value() const { return WvString(); }
+-};
+ 
+ 
+ #endif // __UNICONFGEN_H
+--- a/include/unifastregetgen.h
++++ b/include/unifastregetgen.h
+@@ -42,7 +42,6 @@
+     virtual bool haschildren(const UniConfKey &key);
+ 
+ private:
+-    IUniConfGen *inner;
+     UniConfValueTree *tree;
+     
+ protected:
+--- a/include/unifiltergen.h
++++ b/include/unifiltergen.h
+@@ -68,8 +68,8 @@
+     virtual bool exists(const UniConfKey &key);
+     virtual bool haschildren(const UniConfKey &key);
+     virtual bool isok();
+-    virtual Iter *iterator(const UniConfKey &key);
+-    virtual Iter *recursiveiterator(const UniConfKey &key);
++    virtual IUniConfGen::Iter *iterator(const UniConfKey &key);
++    virtual IUniConfGen::Iter *recursiveiterator(const UniConfKey &key);
+ 
+ protected:
+     /**
+--- a/include/unihashtree.h
++++ b/include/unihashtree.h
+@@ -62,10 +62,11 @@
+     UniHashTreeBase *xparent; /*!< the parent of this subtree */
+     Container *xchildren; /*!< the hash table of children */
+ 
+-private:
+     void _setparent(UniHashTreeBase *parent);
+     UniHashTreeBase *_root() const;
+ 
++private:
++
+     /** Called by a child to link itself to this node. */
+     void link(UniHashTreeBase *node);
+ 
+--- a/include/unimountgen.h
++++ b/include/unimountgen.h
+@@ -103,8 +103,8 @@
+     virtual void commit();
+     virtual bool refresh();
+     virtual void flush_buffers() { }
+-    virtual Iter *iterator(const UniConfKey &key);
+-    virtual Iter *recursiveiterator(const UniConfKey &key);
++    virtual IUniConfGen::Iter *iterator(const UniConfKey &key);
++    virtual IUniConfGen::Iter *recursiveiterator(const UniConfKey &key);
+ 
+ private:
+     /** Find the active generator for a given key. */
+--- a/include/wvmoniker.h
++++ b/include/wvmoniker.h
+@@ -72,7 +72,7 @@
+ 	// from IObject, which is very important. The 'for' avoids a
+ 	// warning.
+ 	for(IObject *silly = (T *)NULL; silly; )
+-            ;
++            silly = (T *)NULL;
+     };
+ };
+ 
+--- a/include/wvpushdir.h
++++ b/include/wvpushdir.h
+@@ -27,12 +27,11 @@
+ 
+     WvPushDir(WvStringParm new_dir)
+     {
+-#ifdef MACOS
+-       old_dir = static_cast<char *>(calloc(PATH_MAX, sizeof(char *)));
+-       getcwd(old_dir, PATH_MAX);;
+-#else
+-       old_dir = get_current_dir_name();
+-#endif
++        old_dir = new char[2048];
++        if (!getcwd(old_dir, 2048)) {
++            errnum = errno;
++            return;
++        }
+        dir_handle = opendir(old_dir);
+        if (chdir(new_dir) == -1)
+           errnum = errno;
+--- a/include/wvscatterhash.h
++++ b/include/wvscatterhash.h
+@@ -183,7 +183,7 @@
+         Iter(WvScatterHash &_table) : IterBase(_table) { }
+         Iter(const Iter &other) : IterBase(other) { }
+ 
+-        unsigned char *getstatus() { return &xstatus[index-1]; }
++        unsigned char *getstatus() { return &this->xstatus[index-1]; }
+ 
+         T *ptr() const
+             { return (T *)(get()); }
+--- a/include/wvserialize.h
++++ b/include/wvserialize.h
+@@ -60,6 +60,7 @@
+     return htons(i);
+ }
+ 
++#ifndef ntohll
+ /**
+  * Helper functions to convert 64 bit ints to and from host byteorder
+  */
+@@ -80,6 +81,7 @@
+     return (((uint64_t)htonl(n)) << 32) | htonl(n >> 32);
+ #endif
+ }
++#endif
+ 
+ /**
+  * A helper function that serializes different types of integers.  Since
+--- a/include/wvtask.h
++++ b/include/wvtask.h
+@@ -24,6 +24,7 @@
+ #include "wvstreamsdebugger.h"
+ #include "wvstringlist.h"
+ #include "setjmp.h"
++#define _XOPEN_SOURCE
+ #include <ucontext.h>
+ 
+ #define WVTASK_MAGIC 0x123678
+--- a/uniconf/unicachegen.cc
++++ b/uniconf/unicachegen.cc
+@@ -69,7 +69,7 @@
+ 
+ void UniCacheGen::loadtree(const UniConfKey &key)
+ {
+-    UniConfGen::Iter *i = inner->recursiveiterator(key);
++    IUniConfGen::Iter *i = inner->recursiveiterator(key);
+     if (!i) return;
+ 
+     //assert(false);
+--- a/uniconf/uniconfgen.cc
++++ b/uniconf/uniconfgen.cc
+@@ -104,7 +104,7 @@
+     
+     hold_delta();
+     
+-    Iter *it = iterator(key);
++    IUniConfGen::Iter *it = iterator(key);
+     if (it)
+     {
+ 	it->rewind();
+@@ -257,7 +257,7 @@
+ };
+ 
+ 
+-UniConfGen::Iter *UniConfGen::recursiveiterator(const UniConfKey &key)
++IUniConfGen::Iter *UniConfGen::recursiveiterator(const UniConfKey &key)
+ {
+     return new _UniConfGenRecursiveIter(this, key);
+ }
+--- a/uniconf/unifiltergen.cc
++++ b/uniconf/unifiltergen.cc
+@@ -134,7 +134,7 @@
+ }
+ 
+ 
+-UniConfGen::Iter *UniFilterGen::iterator(const UniConfKey &key)
++IUniConfGen::Iter *UniFilterGen::iterator(const UniConfKey &key)
+ {
+     UniConfKey mapped_key;
+     if (xinner && keymap(key, mapped_key))
+@@ -144,7 +144,7 @@
+ }
+ 
+ 
+-UniConfGen::Iter *UniFilterGen::recursiveiterator(const UniConfKey &key)
++IUniConfGen::Iter *UniFilterGen::recursiveiterator(const UniConfKey &key)
+ {
+     UniConfKey mapped_key;
+     if (xinner && keymap(key, mapped_key))
+--- a/uniconf/unifstreegen.cc
++++ b/uniconf/unifstreegen.cc
+@@ -62,7 +62,7 @@
+ 	log("Key '%s' not found.\n", key);
+     }
+     
+-    virtual Iter *recursiveiterator(const UniConfKey &key)
++    virtual IUniConfGen::Iter *recursiveiterator(const UniConfKey &key)
+     {
+ 	// don't try to optimize this like UniMountGen does, because we're
+ 	// going to mount things *as* we iterate through them, not sooner.
+--- a/uniconf/unimountgen.cc
++++ b/uniconf/unimountgen.cc
+@@ -305,7 +305,7 @@
+     return strcmp(*l, *r);
+ }
+ 
+-UniMountGen::Iter *UniMountGen::iterator(const UniConfKey &key)
++IUniConfGen::Iter *UniMountGen::iterator(const UniConfKey &key)
+ {
+     UniGenMount *found = findmount(key);
+     if (found)
+@@ -345,7 +345,7 @@
+ // FIXME: this function will be rather slow if you try to iterate over multiple
+ // generators and the latency level is high (as is the case with e.g.: the tcp generator). 
+ // the fast path will only kick in if you iterate over a single generator.
+-UniMountGen::Iter *UniMountGen::recursiveiterator(const UniConfKey &key)
++IUniConfGen::Iter *UniMountGen::recursiveiterator(const UniConfKey &key)
+ {
+     UniGenMount *found = findmountunder(key);
+     if (found)
+--- a/utils/t/wvpushdir.t.cc
++++ b/utils/t/wvpushdir.t.cc
+@@ -15,14 +15,9 @@
+ 
+     WVPASS(newpushdir.isok());
+ 
+-#ifdef MACOS
+-    char *pwd = static_cast<char *>(calloc(PATH_MAX,sizeof(char *)));
+-    getcwd(pwd,PATH_MAX);
+-#else
+-    char *pwd =  get_current_dir_name();
+-#endif
++    char pwd[1024] = "";
++    getcwd(pwd, sizeof(pwd));
+     WVPASSEQ(pwd, dir);
+-    free(pwd);
+ 
+     unlink(dir);
+ }
+--- a/utils/wvpam.cc
++++ b/utils/wvpam.cc
+@@ -5,6 +5,7 @@
+  * A WvStream that authenticates with PAM before allowing any reading or
+  * writing.  See wvpam.h.
+  */
++#include <pwd.h>
+ #include "wvlog.h"
+ #include "wvpam.h"
+ #include "wvautoconf.h"
+--- a/xplc/modulemgr.cc
++++ b/xplc/modulemgr.cc
+@@ -23,6 +23,7 @@
+ #include <assert.h>
+ #include "modulemgr.h"
+ #include <xplc/IModuleLoader.h>
++#include <unistd.h>
+ 
+ #include "config.h"
+ 

diff --git a/net-libs/wvstreams/wvstreams-4.6.1_p14-r1.ebuild b/net-libs/wvstreams/wvstreams-4.6.1_p14-r1.ebuild
index 1042923f522..06f36322819 100644
--- a/net-libs/wvstreams/wvstreams-4.6.1_p14-r1.ebuild
+++ b/net-libs/wvstreams/wvstreams-4.6.1_p14-r1.ebuild
@@ -44,6 +44,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-4.6.1-parallel-make.patch
 	"${FILESDIR}"/${PN}-4.6.1-_DEFAULT_SOURCE.patch
 	"${FILESDIR}"/${PN}-4.6.1_p14-xplc-module.patch
+	"${FILESDIR}"/${PN}-4.6.1_p14-llvm.patch
 )
 S=${WORKDIR}/${P/_p*}
 


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-libs/wvstreams/, net-libs/wvstreams/files/
@ 2020-07-08  6:49 Jeroen Roovers
  0 siblings, 0 replies; 4+ messages in thread
From: Jeroen Roovers @ 2020-07-08  6:49 UTC (permalink / raw
  To: gentoo-commits

commit:     228b062df44bcc02818187a0e2730b9053ebf659
Author:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
AuthorDate: Tue Jul  7 12:20:42 2020 +0000
Commit:     Jeroen Roovers <jer <AT> gentoo <DOT> org>
CommitDate: Wed Jul  8 06:49:44 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=228b062d

net-libs/wvstreams: Fix xplc/moduleloader major_version signedness

Package-Manager: Portage-2.3.103, Repoman-2.3.23
Closes: https://bugs.gentoo.org/721892
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org>

 .../files/wvstreams-4.6.1_p14-xplc-module.patch    | 25 ++++++++++++++++++++++
 net-libs/wvstreams/wvstreams-4.6.1_p14-r1.ebuild   |  1 +
 2 files changed, 26 insertions(+)

diff --git a/net-libs/wvstreams/files/wvstreams-4.6.1_p14-xplc-module.patch b/net-libs/wvstreams/files/wvstreams-4.6.1_p14-xplc-module.patch
new file mode 100644
index 00000000000..a7d931c3d81
--- /dev/null
+++ b/net-libs/wvstreams/files/wvstreams-4.6.1_p14-xplc-module.patch
@@ -0,0 +1,25 @@
+--- a/include/xplc/module.h
++++ b/include/xplc/module.h
+@@ -100,19 +100,19 @@
+    * XPLC module magic number. This is to ensure that it is in fact a
+    * valid XPLC module that has been loaded.
+    */
+-  unsigned long magic;
++  signed long magic;
+   /**
+    * The XPLC module ABI version that this module conforms to. This
+    * should always be the first member of the XPLC_ModuleInfo
+    * structure, as the meaning of the following members depend on it.
+    */
+-  unsigned int version_major;
++  signed int version_major;
+   /**
+    * The XPLC module ABI sub-version that this module conforms
+    * to. This is used for optional and backward-compatible changes in
+    * the module ABI.
+    */
+-  unsigned int version_minor;
++  signed int version_minor;
+ 
+   /**
+    * Description string for the module.

diff --git a/net-libs/wvstreams/wvstreams-4.6.1_p14-r1.ebuild b/net-libs/wvstreams/wvstreams-4.6.1_p14-r1.ebuild
index 69bea4fae03..1042923f522 100644
--- a/net-libs/wvstreams/wvstreams-4.6.1_p14-r1.ebuild
+++ b/net-libs/wvstreams/wvstreams-4.6.1_p14-r1.ebuild
@@ -43,6 +43,7 @@ PATCHES=(
 	"${FILESDIR}"/${PN}-4.6.1-gcc47.patch
 	"${FILESDIR}"/${PN}-4.6.1-parallel-make.patch
 	"${FILESDIR}"/${PN}-4.6.1-_DEFAULT_SOURCE.patch
+	"${FILESDIR}"/${PN}-4.6.1_p14-xplc-module.patch
 )
 S=${WORKDIR}/${P/_p*}
 


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-08  6:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-08  6:49 [gentoo-commits] repo/gentoo:master commit in: net-libs/wvstreams/, net-libs/wvstreams/files/ Jeroen Roovers
  -- strict thread matches above, loose matches on Subject: below --
2020-07-08  6:49 Jeroen Roovers
2018-12-18  3:09 Craig Andrews
2018-11-03 14:04 Jeroen Roovers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox