diff --git a/meta-python/recipes-devtools/python/python3-cryptography/0001-define-OAEP-properties-for-all-openssl-versions.patch b/meta-python/recipes-devtools/python/python3-cryptography/0001-define-OAEP-properties-for-all-openssl-versions.patch new file mode 100644 index 0000000..b099b9b --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-cryptography/0001-define-OAEP-properties-for-all-openssl-versions.patch @@ -0,0 +1,39 @@ +From d890e2a60616af098d6ec1d4e4a53cc82a335731 Mon Sep 17 00:00:00 2001 +From: Paul Kehrer +Date: Thu, 26 Nov 2020 11:52:47 -0600 +Subject: [PATCH] define OAEP properties for all openssl versions (#5589) + +In 3.0 these aren't macros so we can't test this way. All our supported +OpenSSLs have these bindings now and LibreSSL does not. + + +This patch can be removed on python3-cryptography >= 3.3. Updated for +2.8 compatibility. + +Upstream-Status: Accepted +Signed-off-by: jhnc-oss +--- +diff --git a/src/_cffi_src/openssl/rsa.py b/src/_cffi_src/openssl/rsa.py +--- a/src/_cffi_src/openssl/rsa.py ++++ b/src/_cffi_src/openssl/rsa.py +@@ -60,17 +60,13 @@ int EVP_PKEY_CTX_set_rsa_oaep_md(EVP_PKEY_CTX *, EVP_MD *); + CUSTOMIZATIONS = """ + static const long Cryptography_HAS_PSS_PADDING = 1; + +-#if defined(EVP_PKEY_CTX_set_rsa_oaep_md) ++#if !CRYPTOGRAPHY_IS_LIBRESSL + static const long Cryptography_HAS_RSA_OAEP_MD = 1; +-#else +-static const long Cryptography_HAS_RSA_OAEP_MD = 0; +-int (*EVP_PKEY_CTX_set_rsa_oaep_md)(EVP_PKEY_CTX *, EVP_MD *) = NULL; +-#endif +- +-#if defined(EVP_PKEY_CTX_set0_rsa_oaep_label) + static const long Cryptography_HAS_RSA_OAEP_LABEL = 1; + #else ++static const long Cryptography_HAS_RSA_OAEP_MD = 0; + static const long Cryptography_HAS_RSA_OAEP_LABEL = 0; ++int (*EVP_PKEY_CTX_set_rsa_oaep_md)(EVP_PKEY_CTX *, EVP_MD *) = NULL; + int (*EVP_PKEY_CTX_set0_rsa_oaep_label)(EVP_PKEY_CTX *, unsigned char *, + int) = NULL; + #endif diff --git a/meta-python/recipes-devtools/python/python3-cryptography/0002-remove-some-more-constants-we-dont-need.patch b/meta-python/recipes-devtools/python/python3-cryptography/0002-remove-some-more-constants-we-dont-need.patch new file mode 100644 index 0000000..aecebec --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-cryptography/0002-remove-some-more-constants-we-dont-need.patch @@ -0,0 +1,28 @@ +From a13da93e43d2a7e06b345787807a0c689dc3ad85 Mon Sep 17 00:00:00 2001 +From: Paul Kehrer +Date: Thu, 30 Jul 2020 09:44:31 -0500 +Subject: [PATCH] remove some more constants we don't need (#5361) + +these are gone in 3.0 anyway and were removed in that draft PR + + +This patch can be removed on python3-cryptography >= 3.1. + +Upstream-Status: Accepted +Signed-off-by: jhnc-oss + +--- +diff --git a/src/_cffi_src/openssl/crypto.py b/src/_cffi_src/openssl/crypto.py +--- a/src/_cffi_src/openssl/crypto.py ++++ b/src/_cffi_src/openssl/crypto.py +@@ -23,10 +23,6 @@ static const int OPENSSL_CFLAGS; + static const int OPENSSL_BUILT_ON; + static const int OPENSSL_PLATFORM; + static const int OPENSSL_DIR; +-static const int CRYPTO_MEM_CHECK_ON; +-static const int CRYPTO_MEM_CHECK_OFF; +-static const int CRYPTO_MEM_CHECK_ENABLE; +-static const int CRYPTO_MEM_CHECK_DISABLE; + """ + + FUNCTIONS = """ diff --git a/meta-python/recipes-devtools/python/python3-cryptography/0003-openssl3-compatibility.patch b/meta-python/recipes-devtools/python/python3-cryptography/0003-openssl3-compatibility.patch new file mode 100644 index 0000000..9123add --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-cryptography/0003-openssl3-compatibility.patch @@ -0,0 +1,19 @@ +Remove EVP_R_KEYGEN_FAILURE for OpenSSL v3.x compatibility + +This patch can be removed on python3-cryptography >= 3.1. + +Upstream-Status: Accepted +Signed-off-by: jhnc-oss +--- +diff --git a/src/_cffi_src/openssl/err.py b/src/_cffi_src/openssl/err.py +index d4033f5a4..f573bdf3a 100644 +--- a/src/_cffi_src/openssl/err.py ++++ b/src/_cffi_src/openssl/err.py +@@ -66,7 +66,6 @@ static const int EVP_R_DIFFERENT_KEY_TYPES; + static const int EVP_R_INITIALIZATION_ERROR; + static const int EVP_R_INPUT_NOT_INITIALIZED; + static const int EVP_R_INVALID_KEY_LENGTH; +-static const int EVP_R_KEYGEN_FAILURE; + static const int EVP_R_MISSING_PARAMETERS; + static const int EVP_R_NO_CIPHER_SET; + static const int EVP_R_NO_DIGEST_SET; diff --git a/meta-python/recipes-devtools/python/python3-cryptography_%.bbappend b/meta-python/recipes-devtools/python/python3-cryptography_%.bbappend new file mode 100644 index 0000000..aa0da09 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-cryptography_%.bbappend @@ -0,0 +1,7 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "\ + file://0001-define-OAEP-properties-for-all-openssl-versions.patch \ + file://0002-remove-some-more-constants-we-dont-need.patch \ + file://0003-openssl3-compatibility.patch \ +" diff --git a/meta/recipes-connectivity/openssl/openssl/0001-Configure-do-not-tweak-mips-cflags.patch b/meta/recipes-connectivity/openssl/openssl/0001-Configure-do-not-tweak-mips-cflags.patch index 0b7abc3..af43547 100644 --- a/meta/recipes-connectivity/openssl/openssl/0001-Configure-do-not-tweak-mips-cflags.patch +++ b/meta/recipes-connectivity/openssl/openssl/0001-Configure-do-not-tweak-mips-cflags.patch @@ -22,7 +22,7 @@ Index: openssl-3.0.4/Configure } -if ($target =~ /linux.*-mips/ && !$disabled{asm} -- && !grep { $_ !~ /-m(ips|arch=)/ } (@{$config{CFLAGS}})) { +- && !grep { $_ =~ /-m(ips|arch=)/ } (@{$config{CFLAGS}})) { - # minimally required architecture flags for assembly modules - my $value; - $value = '-mips2' if ($target =~ /mips32/); diff --git a/meta/recipes-connectivity/openssl/openssl_3.0.8.bb b/meta/recipes-connectivity/openssl/openssl_3.0.10.bb similarity index 95% rename from meta/recipes-connectivity/openssl/openssl_3.0.8.bb rename to meta/recipes-connectivity/openssl/openssl_3.0.10.bb index 75f9e44..c770f1c 100644 --- a/meta/recipes-connectivity/openssl/openssl_3.0.8.bb +++ b/meta/recipes-connectivity/openssl/openssl_3.0.10.bb @@ -18,7 +18,7 @@ SRC_URI:append:class-nativesdk = " \ file://environment.d-openssl.sh \ " -SRC_URI[sha256sum] = "6c13d2bf38fdf31eac3ce2a347073673f5d63263398f1f69d0df4a41253e4b3e" +SRC_URI[sha256sum] = "1761d4f5b13a1028b9b6f3d4b8e17feb0cedc9370f6afe61d7193d2cdce83323" inherit lib_package multilib_header multilib_script ptest perlnative MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash" @@ -77,7 +77,7 @@ do_configure () { esac target="$os-${HOST_ARCH}" case $target in - linux-arc) + linux-arc | linux-microblaze*) target=linux-latomic ;; linux-arm*) @@ -105,7 +105,7 @@ do_configure () { linux-*-mips64 | linux-mips64 | linux-*-mips64el | linux-mips64el) target=linux64-mips64 ;; - linux-microblaze* | linux-nios2* | linux-sh3 | linux-sh4 | linux-arc*) + linux-nios2* | linux-sh3 | linux-sh4 | linux-arc*) target=linux-generic32 ;; linux-powerpc) @@ -137,7 +137,9 @@ do_configure () { fi # WARNING: do not set compiler/linker flags (-I/-D etc.) in EXTRA_OECONF, as they will fully replace the # environment variables set by bitbake. Adjust the environment variables instead. - HASHBANGPERL="/usr/bin/env perl" PERL=perl PERL5LIB="${S}/external/perl/Text-Template-1.46/lib/" \ + PERLEXTERNAL="$(realpath ${S}/external/perl/Text-Template-*/lib)" + test -d "$PERLEXTERNAL" || bberror "PERLEXTERNAL '$PERLEXTERNAL' not found!" + HASHBANGPERL="/usr/bin/env perl" PERL=perl PERL5LIB="$PERLEXTERNAL" \ perl ${S}/Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} ${DEPRECATED_CRYPTO_FLAGS} --prefix=$useprefix --openssldir=${libdir}/ssl-3 --libdir=${libdir} $target perl ${B}/configdata.pm --dump } diff --git a/recipes-devtools/python/backport.md b/recipes-devtools/python/backport.md index 8b66f83..009d8d8 100644 --- a/recipes-devtools/python/backport.md +++ b/recipes-devtools/python/backport.md @@ -55,3 +55,9 @@ Available with *openembedded-core kirkstone (Yocto Project 4.0)*. Upstream revision: `0ad97879bb13d542d5b475376805af87cdeb6837` + +## python3-sortedcontainers + +Available with *openembedded-core kirkstone (Yocto Project 4.0)*. + +Upstream revision: `c8c4e324eccc816432381d61b94c6ec13e25d634` diff --git a/recipes-devtools/python/python3-sortedcontainers_2.4.0.bb b/recipes-devtools/python/python3-sortedcontainers_2.4.0.bb new file mode 100644 index 0000000..0755d3e --- /dev/null +++ b/recipes-devtools/python/python3-sortedcontainers_2.4.0.bb @@ -0,0 +1,9 @@ +SUMMARY = "Sorted Containers is an Apache2 licensed sorted collections library, written in pure-Python, and fast as C-extensions." +HOMEPAGE = "http://www.grantjenks.com/docs/sortedcontainers/" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=7c7c6a1a12ec816da16c1839137d53ae" + +inherit pypi setuptools3 +SRC_URI[sha256sum] = "25caa5a06cc30b6b83d11423433f65d1f9d76c4c6a0c90e3379eaa43b9bfdb88" + +BBCLASSEXTEND = "native nativesdk" diff --git a/recipes-devtools/python3-aiosqlite/python3-aiosqlite.inc b/recipes-devtools/python3-aiosqlite/python3-aiosqlite.inc new file mode 100644 index 0000000..1c7e3d6 --- /dev/null +++ b/recipes-devtools/python3-aiosqlite/python3-aiosqlite.inc @@ -0,0 +1,10 @@ +SUMMARY = "asyncio bridge to the standard sqlite3 module " +DESCRIPTION = "aiosqlite provides a friendly, async interface to sqlite databases." +AUTHOR = "omnilib" +HOMEPAGE = "https://github.com/omnilib/aiosqlite" +BUGTRACKER = "https://github.com/omnilib/aiosqlite/issues" +SECTION = "development" +LICENSE = "MIT" + +CVE_PRODUCT = "" + diff --git a/recipes-devtools/python3-aiosqlite/python3-aiosqlite_0.19.0.bb b/recipes-devtools/python3-aiosqlite/python3-aiosqlite_0.19.0.bb new file mode 100644 index 0000000..2951fa8 --- /dev/null +++ b/recipes-devtools/python3-aiosqlite/python3-aiosqlite_0.19.0.bb @@ -0,0 +1,16 @@ +require ${PN}.inc + +LIC_FILES_CHKSUM = "file://LICENSE;md5=f0c422eaa1f23d09f8203dc0af3e2d54" + +SRC_URI[sha256sum] = "95ee77b91c8d2808bd08a59fbebf66270e9090c3d92ffbf260dc0db0b979577d" + +PYPI_PACKAGE = "aiosqlite" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += "\ + python3-typing-extensions \ +" + +BBCLASSEXTEND = "native nativesdk" + diff --git a/recipes-devtools/python3-opcua-asyncio/python3-opcua-asyncio.inc b/recipes-devtools/python3-opcua-asyncio/python3-opcua-asyncio.inc new file mode 100644 index 0000000..ba708ed --- /dev/null +++ b/recipes-devtools/python3-opcua-asyncio/python3-opcua-asyncio.inc @@ -0,0 +1,10 @@ +SUMMARY = "OPC UA library for python" +DESCRIPTION = "OPC UA / IEC 62541 Client and Server for Python" +AUTHOR = "FreeOpcUa" +HOMEPAGE = "https://github.com/FreeOpcUa/opcua-asyncio" +BUGTRACKER = "https://github.com/FreeOpcUa/opcua-asyncio/issues" +SECTION = "development" +LICENSE = "LGPLv3+" + +CVE_PRODUCT = "" + diff --git a/recipes-devtools/python3-opcua-asyncio/python3-opcua-asyncio_1.0.3.bb b/recipes-devtools/python3-opcua-asyncio/python3-opcua-asyncio_1.0.3.bb new file mode 100644 index 0000000..3d0b16d --- /dev/null +++ b/recipes-devtools/python3-opcua-asyncio/python3-opcua-asyncio_1.0.3.bb @@ -0,0 +1,20 @@ +require ${PN}.inc + +LIC_FILES_CHKSUM = "file://COPYING;md5=e6a600fd5e1d9cbde2d983680233ad02" + +SRC_URI[sha256sum] = "581a5f4d32e65959105d907c82cec3c4ab98ef82230a2ca1778ca58f1a3b1d45" + +PYPI_PACKAGE = "asyncua" + +inherit pypi setuptools3 + +RDEPENDS:${PN} += "\ + python3-aiofiles \ + python3-aiosqlite \ + python3-cryptography \ + python3-dateutil \ + python3-pytz \ + python3-sortedcontainers \ +" + +BBCLASSEXTEND = "native nativesdk"