From 84b1a8fbfdabd7f4a02bbda56a363366b989e9e8 Mon Sep 17 00:00:00 2001 From: Leon Anavi Date: Fri, 28 May 2021 14:08:46 +0300 Subject: [PATCH 01/10] python3-flask: Extend RDEPENDS Extend RDEPENDS and add python3-profile to them. Signed-off-by: Leon Anavi Signed-off-by: Khem Raj Signed-off-by: Trevor Gamblin --- .../recipes-devtools/python/python3-flask_2.0.1.bb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/meta-python/recipes-devtools/python/python3-flask_2.0.1.bb b/meta-python/recipes-devtools/python/python3-flask_2.0.1.bb index 2c94f82daaa..6c63a388aa4 100644 --- a/meta-python/recipes-devtools/python/python3-flask_2.0.1.bb +++ b/meta-python/recipes-devtools/python/python3-flask_2.0.1.bb @@ -14,4 +14,10 @@ inherit pypi setuptools3 CLEANBROKEN = "1" -RDEPENDS_${PN} = "${PYTHON_PN}-werkzeug ${PYTHON_PN}-jinja2 ${PYTHON_PN}-itsdangerous ${PYTHON_PN}-click" +RDEPENDS_${PN} = " \ + ${PYTHON_PN}-werkzeug \ + ${PYTHON_PN}-jinja2 \ + ${PYTHON_PN}-itsdangerous \ + ${PYTHON_PN}-click \ + ${PYTHON_PN}-profile \ +" From dabb5c2a310ec8afc700da855ba6af086554e04a Mon Sep 17 00:00:00 2001 From: Leon Anavi Date: Fri, 28 May 2021 14:08:47 +0300 Subject: [PATCH 02/10] python3-ecdsa: Upgrade 0.16.1 -> 0.17.0 Upgrade to release 0.17.0: - Keys that use explicit curve parameters can now be read and written. Reading of explicit curves can be disabled by using the valid_curve_encodings keyword argument in VerifyingKey.from_pem(), VerifyingKey.from_der(), SigningKey.from_pem(), and SigningKey.from_der(). - Keys can now be written with use of explicit curve parameters, use curve_parameters_encoding keyword argument of VerifyingKey.to_pem(), VerifyingKey.to_der(), SigningKey.to_pem(), or SigningKey.to_der() to specify the format. By default named_curve will be used, unless the curve doesn't have an associated OID (as will be the case for an unsupported curve), then explicit encoding will be used. - Allow specifying acceptable point formats when loading public keys (this also fixes a minor bug where python-ecdsa would accept raw encoding for points in PKCS#8 files). Set of accepted encodings is controlled by valid_encodings keyword argument in ECDH.load_received_public_key_bytes(), VerifyingKey.from_string(), VerifyingKey.from_pem(), VerifyingKey.from_der(). - PointJacobi and Point now inherit from AbstractPoint that implements the methods for parsing points. That added from_bytes() and to_bytes() methods to both of them. - Curve parameters can now be read and written to PEM and DER files. The Curve class supports new to_der(), from_der(), to_pem(), and from_pem() methods. Signed-off-by: Leon Anavi Signed-off-by: Khem Raj Signed-off-by: Trevor Gamblin --- .../python/{python3-ecdsa_0.16.1.bb => python3-ecdsa_0.17.0.bb} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename meta-python/recipes-devtools/python/{python3-ecdsa_0.16.1.bb => python3-ecdsa_0.17.0.bb} (78%) diff --git a/meta-python/recipes-devtools/python/python3-ecdsa_0.16.1.bb b/meta-python/recipes-devtools/python/python3-ecdsa_0.17.0.bb similarity index 78% rename from meta-python/recipes-devtools/python/python3-ecdsa_0.16.1.bb rename to meta-python/recipes-devtools/python/python3-ecdsa_0.17.0.bb index 819d41e86e8..1401f8e58d0 100644 --- a/meta-python/recipes-devtools/python/python3-ecdsa_0.16.1.bb +++ b/meta-python/recipes-devtools/python/python3-ecdsa_0.17.0.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=66ffc5e30f76cbb5358fe54b645e5a1d" DEPENDS += "python3-pip python3-pbr" PYPI_PACKAGE = "ecdsa" -SRC_URI[sha256sum] = "cfc046a2ddd425adbd1a78b3c46f0d1325c657811c0f45ecc3a0a6236c1e50ff" +SRC_URI[sha256sum] = "b9f500bb439e4153d0330610f5d26baaf18d17b8ced1bc54410d189385ea68aa" inherit pypi setuptools3 From 641d90533401595dc59d4d215d906eb2dc1fa60b Mon Sep 17 00:00:00 2001 From: Leon Anavi Date: Fri, 28 May 2021 14:08:48 +0300 Subject: [PATCH 03/10] python3-alembic: Upgrade 1.6.4 -> 1.6.5 Upgrade to release 1.6.5: - Fixed issue where dialect-specific keyword arguments within the DropIndex operation directive would not render in the autogenerated Python code. As support was improved for adding dialect specific arguments to directives as part of #803, in particular arguments such as "postgresql_concurrently" which apply to the actual create/drop of the index, support was needed for these to render even in a drop index operation. Signed-off-by: Leon Anavi Signed-off-by: Khem Raj Signed-off-by: Trevor Gamblin --- .../{python3-alembic_1.6.4.bb => python3-alembic_1.6.5.bb} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename meta-python/recipes-devtools/python/{python3-alembic_1.6.4.bb => python3-alembic_1.6.5.bb} (80%) diff --git a/meta-python/recipes-devtools/python/python3-alembic_1.6.4.bb b/meta-python/recipes-devtools/python/python3-alembic_1.6.5.bb similarity index 80% rename from meta-python/recipes-devtools/python/python3-alembic_1.6.4.bb rename to meta-python/recipes-devtools/python/python3-alembic_1.6.5.bb index 8bb815bfa36..6b58c7704c9 100644 --- a/meta-python/recipes-devtools/python/python3-alembic_1.6.4.bb +++ b/meta-python/recipes-devtools/python/python3-alembic_1.6.5.bb @@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=c4ece55266dcdd02ce165b1ee0e490bb" inherit pypi setuptools3 -SRC_URI[sha256sum] = "becb572c6701c90ca249f97fc1ae231468cc9516df367a350901eeb9310a8d43" +SRC_URI[sha256sum] = "a21fedebb3fb8f6bbbba51a11114f08c78709377051384c9c5ead5705ee93a51" PYPI_PACKAGE = "alembic" From 8d09a204b41ccd70f78129bf0c7b8b873bd61d31 Mon Sep 17 00:00:00 2001 From: Leon Anavi Date: Fri, 28 May 2021 14:08:49 +0300 Subject: [PATCH 04/10] python3-websockets: Upgrade 9.0.2 -> 9.1 Upgrade to release 9.1: - Fix a security issue introduced in version 8.0: Version 8.0 was vulnerable to timing attacks on HTTP Basic Auth passwords. Signed-off-by: Leon Anavi Signed-off-by: Khem Raj Signed-off-by: Trevor Gamblin --- .../{python3-websockets_9.0.2.bb => python3-websockets_9.1.bb} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename meta-python/recipes-devtools/python/{python3-websockets_9.0.2.bb => python3-websockets_9.1.bb} (79%) diff --git a/meta-python/recipes-devtools/python/python3-websockets_9.0.2.bb b/meta-python/recipes-devtools/python/python3-websockets_9.1.bb similarity index 79% rename from meta-python/recipes-devtools/python/python3-websockets_9.0.2.bb rename to meta-python/recipes-devtools/python/python3-websockets_9.1.bb index cc9887a9414..8802ee37027 100644 --- a/meta-python/recipes-devtools/python/python3-websockets_9.0.2.bb +++ b/meta-python/recipes-devtools/python/python3-websockets_9.1.bb @@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=78c2cc91e172ca96d6f8e4a76c739ec6" inherit pypi setuptools3 -SRC_URI[sha256sum] = "6550ecf06e39b7b009605d332dc58b04f3f6f8fe087d452bb2ea4712fbbdcbe6" +SRC_URI[sha256sum] = "276d2339ebf0df4f45df453923ebd2270b87900eda5dfd4a6b0cfa15f82111c3" BBCLASSEXTEND = "native nativesdk" From 95b81929a80782bb70766eae53f06b46a47e958f Mon Sep 17 00:00:00 2001 From: Leon Anavi Date: Fri, 28 May 2021 14:08:50 +0300 Subject: [PATCH 05/10] python3-pyzmq: Upgrade 22.0.3 -> 22.1.0 Upgrade to release 22.1.0: - asyncio: experimental support for Proactor eventloop if tornado 6.1 is available by running a selector in a background thread. - Windows: fix type of `socket.FD` option in win-amd64 - asyncio: Cancel timers when using HWM with async Sockets - Windows: update bundled libzmq dll URLs for Windows. - adopt pre-commit for formatting, linting Signed-off-by: Leon Anavi Signed-off-by: Khem Raj Signed-off-by: Trevor Gamblin --- .../python/{python3-pyzmq_22.0.3.bb => python3-pyzmq_22.1.0.bb} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename meta-python/recipes-devtools/python/{python3-pyzmq_22.0.3.bb => python3-pyzmq_22.1.0.bb} (91%) diff --git a/meta-python/recipes-devtools/python/python3-pyzmq_22.0.3.bb b/meta-python/recipes-devtools/python/python3-pyzmq_22.1.0.bb similarity index 91% rename from meta-python/recipes-devtools/python/python3-pyzmq_22.0.3.bb rename to meta-python/recipes-devtools/python/python3-pyzmq_22.1.0.bb index dbf8e6446c1..f213131da22 100644 --- a/meta-python/recipes-devtools/python/python3-pyzmq_22.0.3.bb +++ b/meta-python/recipes-devtools/python/python3-pyzmq_22.1.0.bb @@ -8,7 +8,7 @@ DEPENDS = "zeromq" FILESEXTRAPATHS_prepend := "${THISDIR}/python-pyzmq:" SRC_URI += "file://club-rpath-out.patch" -SRC_URI[sha256sum] = "f7f63ce127980d40f3e6a5fdb87abf17ce1a7c2bd8bf2c7560e1bbce8ab1f92d" +SRC_URI[sha256sum] = "7040d6dd85ea65703904d023d7f57fab793d7ffee9ba9e14f3b897f34ff2415d" inherit pypi pkgconfig setuptools3 From 8e1974688b9c3b46c362e28cc2b5d88d3dc0dabc Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 29 May 2021 00:34:56 -0700 Subject: [PATCH 06/10] python3-grpcio: Update to 1.38.0 Drop riscv patch as its applied upstream Refresh patches Signed-off-by: Khem Raj Signed-off-by: Trevor Gamblin --- .../python3-grpcio/mips_bigendian.patch | 2 +- .../python3-grpcio/riscv64_support.patch | 21 ------------------- ...cio_1.37.0.bb => python3-grpcio_1.38.0.bb} | 4 +--- 3 files changed, 2 insertions(+), 25 deletions(-) delete mode 100644 meta-python/recipes-devtools/python/python3-grpcio/riscv64_support.patch rename meta-python/recipes-devtools/python/{python3-grpcio_1.37.0.bb => python3-grpcio_1.38.0.bb} (89%) diff --git a/meta-python/recipes-devtools/python/python3-grpcio/mips_bigendian.patch b/meta-python/recipes-devtools/python/python3-grpcio/mips_bigendian.patch index 343f25a46e0..775afa415c6 100644 --- a/meta-python/recipes-devtools/python/python3-grpcio/mips_bigendian.patch +++ b/meta-python/recipes-devtools/python/python3-grpcio/mips_bigendian.patch @@ -12,4 +12,4 @@ +#elif defined(__mips__) && defined(__LP64__) #define OPENSSL_64_BIT #define OPENSSL_MIPS64 - #elif defined(__riscv) + #elif defined(__riscv) && __SIZEOF_POINTER__ == 8 diff --git a/meta-python/recipes-devtools/python/python3-grpcio/riscv64_support.patch b/meta-python/recipes-devtools/python/python3-grpcio/riscv64_support.patch deleted file mode 100644 index 350c67deaf7..00000000000 --- a/meta-python/recipes-devtools/python/python3-grpcio/riscv64_support.patch +++ /dev/null @@ -1,21 +0,0 @@ -Add RISC-V 64bit support - -Upstream-Status: Pending -Signed-off-by: Khem Raj ---- a/third_party/boringssl-with-bazel/src/include/openssl/base.h -+++ b/third_party/boringssl-with-bazel/src/include/openssl/base.h -@@ -108,6 +108,14 @@ extern "C" { - #elif defined(__MIPSEL__) && defined(__LP64__) - #define OPENSSL_64_BIT - #define OPENSSL_MIPS64 -+#elif defined(__riscv) -+# if (__riscv_xlen == 64) -+# define OPENSSL_64_BIT -+# define OPENSSL_RISCV64 -+# elif(__riscv_xlen == 32) -+# define OPENSSL_32_BIT -+# define OPENSSL_RISCV32 -+# endif - #elif defined(__pnacl__) - #define OPENSSL_32_BIT - #define OPENSSL_PNACL diff --git a/meta-python/recipes-devtools/python/python3-grpcio_1.37.0.bb b/meta-python/recipes-devtools/python/python3-grpcio_1.38.0.bb similarity index 89% rename from meta-python/recipes-devtools/python/python3-grpcio_1.37.0.bb rename to meta-python/recipes-devtools/python/python3-grpcio_1.38.0.bb index 47fb71120dc..d9e00422bc9 100644 --- a/meta-python/recipes-devtools/python/python3-grpcio_1.37.0.bb +++ b/meta-python/recipes-devtools/python/python3-grpcio_1.38.0.bb @@ -8,12 +8,11 @@ DEPENDS += "${PYTHON_PN}-protobuf" SRC_URI += "file://0001-setup.py-Do-not-mix-C-and-C-compiler-options.patch" SRC_URI_append_class-target = " file://ppc-boringssl-support.patch \ - file://riscv64_support.patch \ file://boring_ssl.patch \ file://mips_bigendian.patch \ file://0001-absl-always-use-asm-sgidefs.h.patch \ " -SRC_URI[sha256sum] = "b3ce16aa91569760fdabd77ca901b2288152eb16941d28edd9a3a75a0c4a8a85" +SRC_URI[sha256sum] = "abbf9c8c3df4d5233d5888c6cfa85c1bb68a6923749bd4dd1abc6e1e93986f17" RDEPENDS_${PN} = "${PYTHON_PN}-protobuf \ ${PYTHON_PN}-setuptools \ @@ -46,4 +45,3 @@ CCACHE_DISABLE = "1" # needs vdso support COMPATIBLE_HOST_libc-musl_powerpc64le = "null" - From be6e649b08b204e8aa0add7ee8e737d94b6d3e9a Mon Sep 17 00:00:00 2001 From: Armin Kuster Date: Sun, 30 May 2021 16:46:53 +0000 Subject: [PATCH 07/10] python3-scapy: move from meta-security This tracks the official scapy project. includes ptest Signed-off-by: Armin Kuster Signed-off-by: Khem Raj Signed-off-by: Trevor Gamblin --- .../python/python3-scapy/run-ptest | 4 ++ .../python/python3-scapy_2.4.5.bb | 41 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 meta-networking/recipes-devtools/python/python3-scapy/run-ptest create mode 100644 meta-networking/recipes-devtools/python/python3-scapy_2.4.5.bb diff --git a/meta-networking/recipes-devtools/python/python3-scapy/run-ptest b/meta-networking/recipes-devtools/python/python3-scapy/run-ptest new file mode 100644 index 00000000000..797d8ecf782 --- /dev/null +++ b/meta-networking/recipes-devtools/python/python3-scapy/run-ptest @@ -0,0 +1,4 @@ +#!/bin/sh +UTscapy3 -t regression.uts -f text -l -C \ + -o @PTEST_PATH@/scapy_ptest_$(date +%Y%m%d-%H%M%S).log \ + 2>&1 | sed -e 's/^passed None/PASS:/' -e 's/^failed None/FAIL:/' diff --git a/meta-networking/recipes-devtools/python/python3-scapy_2.4.5.bb b/meta-networking/recipes-devtools/python/python3-scapy_2.4.5.bb new file mode 100644 index 00000000000..01ca63746b8 --- /dev/null +++ b/meta-networking/recipes-devtools/python/python3-scapy_2.4.5.bb @@ -0,0 +1,41 @@ +SUMMARY = "Network scanning and manipulation tool" +DESCRIPTION = "Scapy is a powerful interactive packet manipulation program. \ +It is able to forge or decode packets of a wide number of protocols, send \ +them on the wire, capture them, match requests and replies, and much more. \ +It can easily handle most classical tasks like scanning, tracerouting, probing, \ +unit tests, attacks or network discovery (it can replace hping, 85% of nmap, \ +arpspoof, arp-sk, arping, tcpdump, tethereal, p0f, etc.). It also performs very \ +well at a lot of other specific tasks that most other tools can't handle, like \ +sending invalid frames, injecting your own 802.11 frames, combining technics \ +(VLAN hopping+ARP cache poisoning, VOIP decoding on WEP encrypted channel, ...), etc." +SECTION = "security" +LICENSE = "GPLv2" + +LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +# If you want ptest support, use the git repo +# UTscapy does not exist in the pypi pkg +# +SRCREV = "32cd7eb0f620d9adf171c48d55514e8326a538d7" +SRC_URI = "git://github.com/secdev/scapy.git \ + file://run-ptest" + +S = "${WORKDIR}/git" + +UPSTREAM_CHECK_COMMITS = "1" + +inherit setuptools3 ptest + +do_install_append() { + mv ${D}${bindir}/scapy ${D}${bindir}/scapy3 + mv ${D}${bindir}/UTscapy ${D}${bindir}/UTscapy3 +} + +do_install_ptest() { + install -m 0644 ${S}/test/regression.uts ${D}${PTEST_PATH} + sed -i 's,@PTEST_PATH@,${PTEST_PATH},' ${D}${PTEST_PATH}/run-ptest +} + +RDEPENDS_${PN} = "tcpdump ${PYTHON_PN}-compression ${PYTHON_PN}-cryptography ${PYTHON_PN}-netclient \ + ${PYTHON_PN}-netserver ${PYTHON_PN}-pydoc ${PYTHON_PN}-pkgutil ${PYTHON_PN}-shell \ + ${PYTHON_PN}-threading ${PYTHON_PN}-numbers ${PYTHON_PN}-pycrypto" From 1a0c98b904132f4be3e1a363603affcb311fe89a Mon Sep 17 00:00:00 2001 From: Armin Kuster Date: Sun, 30 May 2021 16:58:49 +0000 Subject: [PATCH 08/10] python3-scapy: add pkg to pkg grp Signed-off-by: Armin Kuster Signed-off-by: Khem Raj Signed-off-by: Trevor Gamblin --- .../recipes-core/packagegroups/packagegroup-meta-networking.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb b/meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb index 67a93e17b79..24b9a1b490f 100644 --- a/meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb +++ b/meta-networking/recipes-core/packagegroups/packagegroup-meta-networking.bb @@ -100,6 +100,7 @@ RDEPENDS_packagegroup-meta-networking-daemons_remove_libc-musl = "opensaf" RDEPENDS_packagegroup-meta-networking-devtools = "\ python3-ldap \ + python3-scapy \ " RDEPENDS_packagegroup-meta-networking-extended = "\ From 9b89ee721411ea012e0ddab69b806a935e74b40a Mon Sep 17 00:00:00 2001 From: Armin Kuster Date: Sun, 30 May 2021 16:58:50 +0000 Subject: [PATCH 09/10] python3-scapy: drop from pkg grp Signed-off-by: Armin Kuster Signed-off-by: Khem Raj Signed-off-by: Trevor Gamblin --- .../recipes-core/packagegroups/packagegroup-meta-python.bb | 1 - 1 file changed, 1 deletion(-) diff --git a/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb b/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb index b283d13bfd4..9f3d48253de 100644 --- a/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb +++ b/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb @@ -367,7 +367,6 @@ RDEPENDS_packagegroup-meta-python3 = "\ python3-robotframework-seriallibrary \ python3-rsa \ python3-ruamel-yaml \ - python3-scapy \ python3-scrypt \ python3-sdnotify \ python3-semver \ From a934be45d309c9ccd89cad3e39eccd300606a666 Mon Sep 17 00:00:00 2001 From: Armin Kuster Date: Sun, 30 May 2021 16:50:40 +0000 Subject: [PATCH 10/10] python3-scapy: drop this recipe This recipe points to an unmaintained uri Switch to the official project. Moved package to meta-networking Signed-off-by: Armin Kuster Signed-off-by: Khem Raj Signed-off-by: Trevor Gamblin --- .../recipes-devtools/python/python3-scapy_0.26.bb | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 meta-python/recipes-devtools/python/python3-scapy_0.26.bb diff --git a/meta-python/recipes-devtools/python/python3-scapy_0.26.bb b/meta-python/recipes-devtools/python/python3-scapy_0.26.bb deleted file mode 100644 index 31c88942d7a..00000000000 --- a/meta-python/recipes-devtools/python/python3-scapy_0.26.bb +++ /dev/null @@ -1,13 +0,0 @@ -DESCRIPTION = "Packet crafting/sending/sniffing, PCAP processing tool,\ -based on scapy with python3 compatibility" -SECTION = "devel/python" -HOMEPAGE = "https://github.com/phaethon/scapy" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://PKG-INFO;md5=a88f5c4e1c935f295ebeaf51fc8644ef" - -inherit pypi setuptools3 - -PYPI_PACKAGE = "scapy-python3" - -SRC_URI[md5sum] = "513469447735a4a416d495f63e28aa4b" -SRC_URI[sha256sum] = "81e4f5522d38c136fd3f1be4e35ffe4fd1f4c2091db3c021d95f8b9d5978b9eb"