diff options
Diffstat (limited to 'external/meta-openembedded/meta-oe/recipes-connectivity/wvdial')
18 files changed, 1204 insertions, 0 deletions
diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvdial/typo_pon.wvdial.1.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvdial/typo_pon.wvdial.1.patch new file mode 100644 index 00000000..eec5a5d6 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvdial/typo_pon.wvdial.1.patch @@ -0,0 +1,20 @@ +Remove warnings found by lintian +Last-Update: 2011-01-09 +Index: wvdial-1.61/pon.wvdial.1 +=================================================================== +--- wvdial-1.61.orig/pon.wvdial.1 2011-01-09 21:33:03.000000000 +0300 ++++ wvdial-1.61/pon.wvdial.1 2011-01-09 21:33:15.000000000 +0300 +@@ -8,13 +8,11 @@ + .SH DESCRIPTION + .B pon.wvdial + .br +-.TR + .B poff.wvdial + .br + .RS + Replacement scripts for pon and poff. + .RE +-\." + .SH SEE ALSO + .BR wvdial (1), + .BR pon (1), diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvdial_1.61.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvdial_1.61.bb new file mode 100644 index 00000000..51542081 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvdial_1.61.bb @@ -0,0 +1,34 @@ +HOMEPAGE = "http://www.alumnit.ca/wiki/?WvDial" +DESCRIPTION = "WvDial is a program that makes it easy to connect your Linux workstation to the Internet." + +LICENSE = "LGPLv2" +LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=55ca817ccb7d5b5b66355690e9abc605" + +inherit pkgconfig + +DEPENDS = "wvstreams" +RDEPENDS_${PN} = "ppp" + +SRC_URI = "http://${BPN}.googlecode.com/files/${BP}.tar.bz2 \ + file://typo_pon.wvdial.1.patch \ + " + +SRC_URI[md5sum] = "37e9a2d664effe4efd44c0e1a20136de" +SRC_URI[sha256sum] = "99906d9560cbdbc97e1855e7b0a7169f1e11983be3ac539140423f09debced82" + +EXTRA_OEMAKE = "" +export WVLINK="${LD}" + +PARALLEL_MAKE = "" + +BUILD_CPPFLAGS += "-I${STAGING_INCDIR}/wvstreams" + +do_configure() { + sed -i 's/LDFLAGS+=-luniconf/LIBS+=-luniconf/' ${S}/Makefile +} + +do_install() { + oe_runmake prefix=${D}/usr PPPDIR=${D}/etc/ppp/peers install +} +# http://errors.yoctoproject.org/Errors/Details/186959/ +EXCLUDE_FROM_WORLD_libc-musl = "1" diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0001-Check-for-limits.h-during-configure.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0001-Check-for-limits.h-during-configure.patch new file mode 100644 index 00000000..b092ba2f --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0001-Check-for-limits.h-during-configure.patch @@ -0,0 +1,26 @@ +From 7deaf836d1f1b9e4426818584b4267f8c4a095aa Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 20 Jul 2017 21:04:07 -0700 +Subject: [PATCH 1/5] Check for limits.h during configure + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure.ac | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/configure.ac b/configure.ac +index fe0fa2b..188adfe 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -139,6 +139,8 @@ int main() + [Compiler warning on deprecated functions])]) + CPPFLAGS="$CPPFLAGS_save" + ++AC_CHECK_HEADERS(limits.h) ++ + # argp + USE_WVSTREAMS_ARGP=0 + AC_CHECK_HEADERS(argp.h) +-- +2.13.3 + diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0001-Forward-port-to-OpenSSL-1.1.x.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0001-Forward-port-to-OpenSSL-1.1.x.patch new file mode 100644 index 00000000..19a2e26f --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0001-Forward-port-to-OpenSSL-1.1.x.patch @@ -0,0 +1,557 @@ +From 0c35749891bf834c1f3c1c4c330266bd2f4733cc Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 9 Sep 2018 10:40:09 -0700 +Subject: [PATCH] Forward port to OpenSSL 1.1.x + +* import patch from debian +https://sources.debian.org/src/wvstreams/4.6.1-14/debian/patches/wvstreams_openssl1.1.patch +Author: Reiner Herrmann <reiner@reiner-h.de> + +Upstream-Status: Submitted [https://github.com/apenwarr/wvstreams/pull/2] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + 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 fa00c76..880ad85 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 7c0bf32..15cd104 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 150edee..73ebb5d 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 ddb2de4..7d5da07 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 e4925ce..984156c 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()); +@@ -1162,10 +1162,11 @@ WvString WvX509::get_extension(int nid) const + #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 +@@ -1176,21 +1177,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"); + } + +@@ -1325,13 +1326,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"); +@@ -1450,19 +1451,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 f249eec..156d3a4 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 af75ffa..a2d001f 100644 +--- a/include/wvdiffiehellman.h ++++ b/include/wvdiffiehellman.h +@@ -27,7 +27,7 @@ public: + 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 fdc39bd..f2eed40 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 @@ public: + 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 @@ public: + 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 185fe8a..a442e7a 100644 +--- a/include/wvtripledes.h ++++ b/include/wvtripledes.h +@@ -70,11 +70,11 @@ protected: + + 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/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0001-build-fix-parallel-make.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0001-build-fix-parallel-make.patch new file mode 100644 index 00000000..6bc34331 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0001-build-fix-parallel-make.patch @@ -0,0 +1,76 @@ +From 90de630f21ac744a37b3adac1bd84654471744ff Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 24 Aug 2017 22:30:01 -0700 +Subject: [PATCH 1/2] build: fix parallel make + +Imported from Gentoo + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + Makefile | 15 +++++++++++++-- + wvrules-posix.mk | 7 +++++-- + 2 files changed, 18 insertions(+), 4 deletions(-) + +diff --git a/Makefile b/Makefile +index 72c8bef..5a4cfb2 100644 +--- a/Makefile ++++ b/Makefile +@@ -131,12 +131,19 @@ utils/tests/%: PRELIBS+=$(LIBWVSTREAMS) + # libwvstreams: stream/event handling library + # + TARGETS += libwvstreams.so +-TARGETS += crypto/tests/ssltest ipstreams/tests/unixtest ++TARGETS += crypto/tests/ssltest ++crypto/tests/ssltest: $(LIBWVSTREAMS) ++ ++TARGETS += ipstreams/tests/unixtest ++ipstreams/tests/unixtest: $(LIBWVSTREAMS) ++ + TARGETS += crypto/tests/printcert ++crypto/tests/printcert: $(LIBWVSTREAMS) + + ifndef _MACOS + ifneq ("$(with_readline)", "no") + TARGETS += ipstreams/tests/wsd ++ ipstreams/tests/wsd: $(LIBWVSTREAMS) + ipstreams/tests/wsd-LIBS += -lreadline + else + TEST_SKIP_OBJS += ipstreams/tests/wsd +@@ -179,7 +186,11 @@ uniconf/tests/%: PRELIBS+=$(LIBUNICONF) + # + ifneq ("$(with_dbus)", "no") + TARGETS += libwvdbus.so +- TARGETS += dbus/tests/wvdbus dbus/tests/wvdbusd ++ TARGETS += dbus/tests/wvdbus ++ dbus/tests/wvdbus: $(LIBWVDBUS) ++ ++ TARGETS += dbus/tests/wvdbusd ++ dbus/tests/wvdbusd: $(LIBWVDBUS) + TESTS += $(call tests_cc,dbus/tests) + libwvdbus_OBJS += $(call objects,dbus) + libwvdbus.so: $(libwvdbus_OBJS) $(LIBWVSTREAMS) +diff --git a/wvrules-posix.mk b/wvrules-posix.mk +index f94d2cd..2e99f36 100644 +--- a/wvrules-posix.mk ++++ b/wvrules-posix.mk +@@ -80,12 +80,15 @@ define wvlink_ar + $(AR) s $1 + endef + +-CC: FORCE ++CC: + @CC="$(CC)" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" \ + $(WVSTREAMS)/gen-cc CC c + +-CXX: FORCE ++CXX: + @CC="$(CXX)" CFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" \ + $(WVSTREAMS)/gen-cc CXX cc + ++#All files must depend on the above two rules. This is a godawful hack. ++$(shell find -type f '(' -name '*.c' -o -name '*.cc' ')' ): CC CXX ++ + wvlink=$(LINK_MSG)$(WVLINK_CC) $(LDFLAGS) $($1-LDFLAGS) -o $1 $(filter %.o %.a %.so, $2) $($1-LIBS) $(XX_LIBS) $(LDLIBS) $(PRELIBS) $(LIBS) +-- +2.14.1 + diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0002-wvrules.mk-Use-_DEFAULT_SOURCE.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0002-wvrules.mk-Use-_DEFAULT_SOURCE.patch new file mode 100644 index 00000000..59f70e38 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0002-wvrules.mk-Use-_DEFAULT_SOURCE.patch @@ -0,0 +1,29 @@ +From 4afff42714a15cb796d3589d87c6fac4558b2c95 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 24 Aug 2017 22:33:32 -0700 +Subject: [PATCH 2/2] wvrules.mk: Use _DEFAULT_SOURCE + +Fixes warnings with newer glibc +warning: "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + wvrules.mk | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/wvrules.mk b/wvrules.mk +index 877f700..124bffd 100644 +--- a/wvrules.mk ++++ b/wvrules.mk +@@ -83,7 +83,7 @@ runtests: + + INCFLAGS=$(addprefix -I,$(WVSTREAMS_INC) $(XPATH)) + CPPFLAGS+=$(INCFLAGS) \ +- -D_BSD_SOURCE -D_GNU_SOURCE $(OSDEFINE) \ ++ -D_DEFAULT_SOURCE $(OSDEFINE) \ + -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \ + -DUNSTABLE + +-- +2.14.1 + diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0002-wvtask-Dont-use-ucontext-on-non-glibc-systems.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0002-wvtask-Dont-use-ucontext-on-non-glibc-systems.patch new file mode 100644 index 00000000..232db9e6 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0002-wvtask-Dont-use-ucontext-on-non-glibc-systems.patch @@ -0,0 +1,135 @@ +From 0e054339c1422168a7f4a9dcf090268053a33b1f Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 20 Jul 2017 21:05:37 -0700 +Subject: [PATCH 2/5] wvtask: Dont use ucontext on non-glibc systems + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + utils/wvtask.cc | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +diff --git a/utils/wvtask.cc b/utils/wvtask.cc +index cdcd544..c0bff7d 100644 +--- a/utils/wvtask.cc ++++ b/utils/wvtask.cc +@@ -199,7 +199,9 @@ WvTaskMan::WvTaskMan() + stacktop = (char *)alloca(0); + + context_return = 0; ++#ifdef __GLIBC__ + assert(getcontext(&get_stack_return) == 0); ++#endif + if (context_return == 0) + { + // initial setup - start the stackmaster() task (never returns!) +@@ -265,13 +267,17 @@ int WvTaskMan::run(WvTask &task, int val) + state = &old_task->mystate; + + context_return = 0; ++#ifdef __GLIBC__ + assert(getcontext(state) == 0); ++#endif + int newval = context_return; + if (newval == 0) + { + // saved the state, now run the task. + context_return = val; ++#ifdef __GLIBC__ + setcontext(&task.mystate); ++#endif + return -1; + } + else +@@ -319,13 +325,17 @@ int WvTaskMan::yield(int val) + #endif + + context_return = 0; ++#ifdef __GLIBC__ + assert(getcontext(¤t_task->mystate) == 0); ++#endif + int newval = context_return; + if (newval == 0) + { + // saved the task state; now yield to the toplevel. + context_return = val; ++#ifdef __GLIBC__ + setcontext(&toplevel); ++#endif + return -1; + } + else +@@ -341,7 +351,9 @@ int WvTaskMan::yield(int val) + void WvTaskMan::get_stack(WvTask &task, size_t size) + { + context_return = 0; ++#ifdef __GLIBC__ + assert(getcontext(&get_stack_return) == 0); ++#endif + if (context_return == 0) + { + assert(magic_number == -WVTASK_MAGIC); +@@ -371,7 +383,9 @@ void WvTaskMan::get_stack(WvTask &task, size_t size) + // initial setup + stack_target = &task; + context_return = size/1024 + (size%1024 > 0); ++#ifdef __GLIBC__ + setcontext(&stackmaster_task); ++#endif + } + else + { +@@ -409,7 +423,9 @@ void WvTaskMan::_stackmaster() + assert(magic_number == -WVTASK_MAGIC); + + context_return = 0; ++#ifdef __GLIBC__ + assert(getcontext(&stackmaster_task) == 0); ++#endif + val = context_return; + if (val == 0) + { +@@ -419,7 +435,9 @@ void WvTaskMan::_stackmaster() + // all current stack allocations) and go back to get_stack + // (or the constructor, if that's what called us) + context_return = 1; ++#ifdef __GLIBC__ + setcontext(&get_stack_return); ++#endif + } + else + { +@@ -474,7 +492,9 @@ void WvTaskMan::do_task() + + // back here from longjmp; someone wants stack space. + context_return = 0; ++#ifdef __GLIBC__ + assert(getcontext(&task->mystate) == 0); ++#endif + if (context_return == 0) + { + // done the setjmp; that means the target task now has +@@ -510,7 +530,9 @@ void WvTaskMan::do_task() + } + else + { ++#ifdef __GLIBC__ + assert(getcontext(&task->func_call) == 0); ++#endif + task->func_call.uc_stack.ss_size = task->stacksize; + task->func_call.uc_stack.ss_sp = task->stack; + task->func_call.uc_stack.ss_flags = 0; +@@ -521,9 +543,11 @@ void WvTaskMan::do_task() + (void (*)(void))call_func, 1, task); + + context_return = 0; ++#ifdef __GLIBC__ + assert(getcontext(&task->func_return) == 0); + if (context_return == 0) + setcontext(&task->func_call); ++#endif + } + + // the task's function terminated. +-- +2.13.3 + diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0003-wvtask-Check-for-HAVE_LIBC_STACK_END-only-on-glibc-s.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0003-wvtask-Check-for-HAVE_LIBC_STACK_END-only-on-glibc-s.patch new file mode 100644 index 00000000..f9304197 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0003-wvtask-Check-for-HAVE_LIBC_STACK_END-only-on-glibc-s.patch @@ -0,0 +1,27 @@ +From f1fc9f4d523dd8b773a4535176547b0619ec05c6 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 20 Jul 2017 21:08:57 -0700 +Subject: [PATCH 3/5] wvtask: Check for HAVE_LIBC_STACK_END only on glibc + systems + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + utils/wvtask.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/utils/wvtask.cc b/utils/wvtask.cc +index c0bff7d..716344b 100644 +--- a/utils/wvtask.cc ++++ b/utils/wvtask.cc +@@ -563,7 +563,7 @@ void WvTaskMan::do_task() + + const void *WvTaskMan::current_top_of_stack() + { +-#ifdef HAVE_LIBC_STACK_END ++#if defined(HAVE_LIBC_STACK_END) && defined(__GLIBC__) + extern const void *__libc_stack_end; + if (use_shared_stack() || current_task == NULL) + return __libc_stack_end; +-- +2.13.3 + diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0004-wvcrash-Replace-use-of-basename-API.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0004-wvcrash-Replace-use-of-basename-API.patch new file mode 100644 index 00000000..6f3fbffb --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0004-wvcrash-Replace-use-of-basename-API.patch @@ -0,0 +1,28 @@ +From bfe68126693f9159f7ac66a69217e0b5f43e5781 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 20 Jul 2017 21:11:21 -0700 +Subject: [PATCH 4/5] wvcrash: Replace use of basename API + +musl does not have this API + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + utils/wvcrash.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/utils/wvcrash.cc b/utils/wvcrash.cc +index 0417759..3d160b7 100644 +--- a/utils/wvcrash.cc ++++ b/utils/wvcrash.cc +@@ -404,7 +404,7 @@ extern void __wvcrash_init_buffers(const char *program_name); + void wvcrash_setup(const char *_argv0, const char *_desc) + { + if (_argv0) +- argv0 = basename(_argv0); ++ argv0 = strrchr(_argv0, '/') ? strrchr(_argv0, '/')+1 : _argv0; + __wvcrash_init_buffers(argv0); + if (_desc) + { +-- +2.13.3 + diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0005-check-for-libexecinfo-during-configure.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0005-check-for-libexecinfo-during-configure.patch new file mode 100644 index 00000000..25e9ee23 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/0005-check-for-libexecinfo-during-configure.patch @@ -0,0 +1,30 @@ +From fd9515f08dcdafea6ae03413fbe5a43a6438fe3e Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 20 Jul 2017 21:25:48 -0700 +Subject: [PATCH 5/5] check for libexecinfo during configure + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure.ac | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 188adfe..1ab4d3c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -159,6 +159,12 @@ AC_SEARCH_LIBS([argp_parse], [argp c], [], [ + USE_WVSTREAMS_ARGP=1 + fi + ]) ++ ++USE_LIBEXECINFO=0 ++AC_SEARCH_LIBS([backtrace], [execinfo], [], [ ++USE_LIBEXECINFO=1 ++]) ++ + # Function checks + AC_HEADER_DIRENT + +-- +2.13.3 + diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/04_signed_request.diff b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/04_signed_request.diff new file mode 100644 index 00000000..5ab633bc --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/04_signed_request.diff @@ -0,0 +1,13 @@ +Index: wvstreams-4.6/crypto/wvx509.cc +=================================================================== +--- wvstreams-4.6.orig/crypto/wvx509.cc 2009-07-29 11:58:16.000000000 -0400 ++++ wvstreams-4.6/crypto/wvx509.cc 2009-07-29 11:58:43.000000000 -0400 +@@ -325,7 +325,7 @@ + } + + int verify_result = X509_REQ_verify(certreq, pk); +- if (verify_result == 0) ++ if (verify_result == 0 || verify_result == -1) + { + debug(WvLog::Warning, "Self signed request failed"); + X509_REQ_free(certreq); diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/05_gcc.diff b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/05_gcc.diff new file mode 100644 index 00000000..616843d4 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/05_gcc.diff @@ -0,0 +1,28 @@ +Index: wvstreams-4.6.1/ipstreams/wvunixdgsocket.cc +=================================================================== +--- wvstreams-4.6.1.orig/ipstreams/wvunixdgsocket.cc 2011-05-20 00:02:38.391136584 +0200 ++++ wvstreams-4.6.1/ipstreams/wvunixdgsocket.cc 2011-05-20 00:02:35.283136585 +0200 +@@ -1,8 +1,6 @@ + #include "wvunixdgsocket.h" +-#ifdef MACOS + #include <sys/types.h> + #include <sys/stat.h> +-#endif + + WvUnixDGSocket::WvUnixDGSocket(WvStringParm filename, bool _server, int perms) + : socketfile(filename) +Index: wvstreams-4.6.1/streams/wvatomicfile.cc +=================================================================== +--- wvstreams-4.6.1.orig/streams/wvatomicfile.cc 2011-05-20 00:02:38.223136584 +0200 ++++ wvstreams-4.6.1/streams/wvatomicfile.cc 2011-05-20 00:02:31.619136587 +0200 +@@ -10,10 +10,7 @@ + #include "wvatomicfile.h" + #include "wvfileutils.h" + #include "wvstrutils.h" +- +-#ifdef MACOS + #include <sys/stat.h> +-#endif + + WvAtomicFile::WvAtomicFile(WvStringParm filename, int flags, mode_t create_mode) + : tmp_file(WvString::null) diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/06_gcc-4.7.diff b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/06_gcc-4.7.diff new file mode 100644 index 00000000..a75067a1 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/06_gcc-4.7.diff @@ -0,0 +1,18 @@ +Description: Fix FTBFS with gcc-4.7 + Small header include change. This is borderlinde cosmetic, but still needed + to prevent the FTBFS. +Author: Paul Tagliamonte <paultag@ubuntu.com> +Origin: vendor +Bug-Debian: http://bugs.debian.org/667418 +Last-Update: 2012-04-13 + +--- wvstreams-4.6.1.orig/utils/wvuid.cc ++++ wvstreams-4.6.1/utils/wvuid.cc +@@ -33,6 +33,7 @@ wvuid_t wvgetuid() + + #else // not WIN32 + ++#include <unistd.h> + + WvString wv_username_from_uid(wvuid_t uid) + { diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/07_buildflags.diff b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/07_buildflags.diff new file mode 100644 index 00000000..ec99dcd3 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/07_buildflags.diff @@ -0,0 +1,32 @@ +Index: b/gen-cc +=================================================================== +--- a/gen-cc ++++ b/gen-cc +@@ -15,6 +15,11 @@ + shift + shift + ++ echo $CC \$MODE -o \$BASE.o \$BASE.$EXT \\ ++ -MMD -MF \$DEPFILE -MP -MQ \$BASE.o \\ ++ $CPPFLAGS \\ ++ $CFLAGS \\ ++ "\$@" + $CC \$MODE -o \$BASE.o \$BASE.$EXT \\ + -MMD -MF \$DEPFILE -MP -MQ \$BASE.o \\ + $CPPFLAGS \\ +Index: b/wvrules-posix.mk +=================================================================== +--- a/wvrules-posix.mk ++++ b/wvrules-posix.mk +@@ -35,11 +35,6 @@ + # Default compiler we use for linking + WVLINK_CC = $(CXX) + +-ifneq ("$(enable_optimization)", "no") +- CXXFLAGS+=-O2 +- CFLAGS+=-O2 +-endif +- + ifneq ("$(enable_warnings)", "no") + CXXFLAGS+=-Wall -Woverloaded-virtual + CFLAGS+=-Wall diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/argp.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/argp.patch new file mode 100644 index 00000000..e8572136 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/argp.patch @@ -0,0 +1,37 @@ +Check for argp_parse in libargp and then in libc before using internal version + +Index: wvstreams-4.6.1/configure.ac +=================================================================== +--- wvstreams-4.6.1.orig/configure.ac ++++ wvstreams-4.6.1/configure.ac +@@ -142,20 +142,21 @@ CPPFLAGS="$CPPFLAGS_save" + # argp + USE_WVSTREAMS_ARGP=0 + AC_CHECK_HEADERS(argp.h) +-AC_CHECK_FUNC(argp_parse) +-if test "$ac_cv_func_argp_parse" != yes \ +- -o "$ac_cv_header_argp_h" != yes ; then +- ( +- echo ++AC_SEARCH_LIBS([argp_parse], [argp c], [], [ ++ ++ if test "$ac_cv_func_argp_parse" != yes \ ++ -o "$ac_cv_header_argp_h" != yes ; then ++ ( ++ echo + echo 'configuring argp...' + cd argp + ./configure --host=$host_cpu-$host_os || exit $? + echo 'argp configured.' + echo +- ) || exit $? +- USE_WVSTREAMS_ARGP=1 +-fi +- ++ ) || exit $? ++ USE_WVSTREAMS_ARGP=1 ++ fi ++]) + # Function checks + AC_HEADER_DIRENT + diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/gcc-6.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/gcc-6.patch new file mode 100644 index 00000000..b084887b --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/gcc-6.patch @@ -0,0 +1,42 @@ +Description: Fix compilation with gcc-6 +Author: Gert Wollny <gw.fossdev@gmail.com> +Last-Updated: 2016-07-26 +Forwarded: No +Bug-Debian: https://bugs.debian.org/811659 +Bug-Debian: https://bugs.debian.org/831146 + +--- a/streams/wvstream.cc ++++ b/streams/wvstream.cc +@@ -907,9 +907,9 @@ + + if (forceable) + { +- si.wants.readable = readcb; +- si.wants.writable = writecb; +- si.wants.isexception = exceptcb; ++ si.wants.readable = static_cast<bool>(readcb); ++ si.wants.writable = static_cast<bool>(writecb); ++ si.wants.isexception = static_cast<bool>(exceptcb); + } + else + { +@@ -1019,7 +1019,8 @@ + + IWvStream::SelectRequest WvStream::get_select_request() + { +- return IWvStream::SelectRequest(readcb, writecb, exceptcb); ++ return IWvStream::SelectRequest(static_cast<bool>(readcb), static_cast<bool>(writecb), ++ static_cast<bool>(exceptcb)); + } + + +@@ -1107,7 +1108,8 @@ + // inefficient, because if the alarm was expired then pre_select() + // returned true anyway and short-circuited the previous select(). + TRACE("hello-%p\n", this); +- return !alarm_was_ticking || select(0, readcb, writecb, exceptcb); ++ return !alarm_was_ticking || select(0, static_cast<bool>(readcb), ++ static_cast<bool>(writecb), static_cast<bool>(exceptcb)); + } + + diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/openssl-buildfix.patch b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/openssl-buildfix.patch new file mode 100644 index 00000000..1c7005c2 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams/openssl-buildfix.patch @@ -0,0 +1,16 @@ +Index: wvstreams-4.6.1/crypto/wvx509.cc +=================================================================== +--- wvstreams-4.6.1.orig/crypto/wvx509.cc ++++ wvstreams-4.6.1/crypto/wvx509.cc +@@ -1157,7 +1157,11 @@ WvString WvX509::get_extension(int nid) + + 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 + if (!method) + { + WvDynBuf buf; diff --git a/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams_4.6.1.bb b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams_4.6.1.bb new file mode 100644 index 00000000..b9f62da7 --- /dev/null +++ b/external/meta-openembedded/meta-oe/recipes-connectivity/wvdial/wvstreams_4.6.1.bb @@ -0,0 +1,56 @@ +HOMEPAGE = "http://alumnit.ca/wiki/index.php?page=WvStreams" +SUMMARY = "WvStreams is a network programming library in C++" + +LICENSE = "LGPLv2" +LIC_FILES_CHKSUM = "file://LICENSE;md5=55ca817ccb7d5b5b66355690e9abc605" + +DEPENDS = "zlib openssl (>= 0.9.8) dbus readline" +DEPENDS_append_libc-musl = " argp-standalone libexecinfo" + +SRC_URI = "http://${BPN}.googlecode.com/files/${BP}.tar.gz \ + file://04_signed_request.diff \ + file://05_gcc.diff \ + file://06_gcc-4.7.diff \ + file://07_buildflags.diff \ + file://gcc-6.patch \ + file://argp.patch \ + file://0001-Check-for-limits.h-during-configure.patch \ + file://0002-wvtask-Dont-use-ucontext-on-non-glibc-systems.patch \ + file://0003-wvtask-Check-for-HAVE_LIBC_STACK_END-only-on-glibc-s.patch \ + file://0004-wvcrash-Replace-use-of-basename-API.patch \ + file://0005-check-for-libexecinfo-during-configure.patch \ + file://0001-build-fix-parallel-make.patch \ + file://0002-wvrules.mk-Use-_DEFAULT_SOURCE.patch \ + file://openssl-buildfix.patch \ + file://0001-Forward-port-to-OpenSSL-1.1.x.patch \ + " + +SRC_URI[md5sum] = "2760dac31a43d452a19a3147bfde571c" +SRC_URI[sha256sum] = "8403f5fbf83aa9ac0c6ce15d97fd85607488152aa84e007b7d0621b8ebc07633" + +inherit autotools-brokensep pkgconfig + +TARGET_CFLAGS_append = " -fno-tree-dce -fno-optimize-sibling-calls" + +LDFLAGS_append = " -Wl,-rpath-link,${CROSS_DIR}/${TARGET_SYS}/lib" + +EXTRA_OECONF = " --without-tcl --without-qt --without-pam --without-valgrind" + +PACKAGES_prepend = "libuniconf " +PACKAGES_prepend = "uniconfd " +PACKAGES_prepend = "libwvstreams-base " +PACKAGES_prepend = "libwvstreams-extras " +PACKAGES_prepend = "${PN}-valgrind " + +RPROVIDES_${PN}-dbg += "libuniconf-dbg uniconfd-dbg libwvstreams-base-dbg libwvstreams-extras-dbg" + +FILES_libuniconf = "${libdir}/libuniconf.so.*" + +FILES_uniconfd = "${sbindir}/uniconfd ${sysconfdir}/uniconf.conf ${localstatedir}/uniconf" + +FILES_libwvstreams-base = "${libdir}/libwvutils.so.*" + +FILES_libwvstreams-extras = "${libdir}/libwvbase.so.* ${libdir}/libwvstreams.so.*" + +FILES_${PN}-valgrind = "${libdir}/valgrind/wvstreams.supp" +RDEPENDS_${PN} += "perl" |