Skip to contentSkip to conversation

python3-cbor2: Upgrade 6.2.0.post1 -> 6.2.0.post2

PATCH New Khem Raj 1 participant 3 messages Nov 4 Arm i.MX and Layerscape

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/3 python3-cbor2: Upgrade 6.2.0.post1 -> 6.2.0.post2

Regenerate python3-cbor2-crates.inc to match the bundled Cargo.lock. The previous crates list was stale (bigdecimal 0.4.10 vs 0.4.11 locked), which made cargo metadata fail in do_compile with:

failed to select a version for the requirement bigdecimal = "^0.4.10" (locked to 0.4.11)

---
 .../python/python3-cbor2-crates.inc           | 80 +++++++++----------
 ....post1.bb => python3-cbor2_6.2.0.post2.bb} |  2 +-
 2 files changed, 41 insertions(+), 41 deletions(-)
 rename meta-python/recipes-devtools/python/{python3-cbor2_6.2.0.post1.bb => python3-cbor2_6.2.0.post2.bb} (87%)
meta-python/recipes-devtools/python/python3-cbor2-crates.inc +40 -40
index 759cf1a928..f78df6d9d4 100644
@@ -2,57 +2,57 @@
 
 # from rust/Cargo.lock
 SRC_URI += " \
-    crate://crates.io/autocfg/1.5.0 \
-    crate://crates.io/bigdecimal/0.4.10 \
-    crate://crates.io/cfg-if/1.0.4 \
+    crate://crates.io/autocfg/1.5.1 \
+    crate://crates.io/bigdecimal/0.4.11 \
+    crate://crates.io/cfg-if/1.0.5 \
     crate://crates.io/crunchy/0.2.4 \
     crate://crates.io/half/2.7.1 \
     crate://crates.io/heck/0.5.0 \
-    crate://crates.io/libc/0.2.182 \
+    crate://crates.io/libc/0.2.191 \
     crate://crates.io/libm/0.2.16 \
-    crate://crates.io/num-bigint/0.4.6 \
-    crate://crates.io/num-integer/0.1.46 \
+    crate://crates.io/num-bigint/0.4.8 \
+    crate://crates.io/num-integer/0.1.47 \
     crate://crates.io/num-traits/0.2.19 \
-    crate://crates.io/once_cell/1.21.3 \
-    crate://crates.io/portable-atomic/1.13.1 \
-    crate://crates.io/proc-macro2/1.0.106 \
-    crate://crates.io/pyo3/0.29.0 \
-    crate://crates.io/pyo3-build-config/0.28.2 \
-    crate://crates.io/pyo3-build-config/0.29.0 \
-    crate://crates.io/pyo3-ffi/0.29.0 \
-    crate://crates.io/pyo3-macros/0.29.0 \
-    crate://crates.io/pyo3-macros-backend/0.29.0 \
-    crate://crates.io/quote/1.0.44 \
-    crate://crates.io/syn/2.0.117 \
+    crate://crates.io/once_cell/1.21.4 \
+    crate://crates.io/portable-atomic/1.15.0 \
+    crate://crates.io/proc-macro2/1.0.107 \
+    crate://crates.io/pyo3/0.30.1 \
+    crate://crates.io/pyo3-build-config/0.30.1 \
+    crate://crates.io/pyo3-ffi/0.30.1 \
+    crate://crates.io/pyo3-macros/0.30.1 \
+    crate://crates.io/pyo3-macros-backend/0.30.1 \
+    crate://crates.io/quote/1.0.47 \
+    crate://crates.io/syn/2.0.119 \
+    crate://crates.io/syn/3.0.9 \
     crate://crates.io/target-lexicon/0.13.5 \
-    crate://crates.io/unicode-ident/1.0.24 \
-    crate://crates.io/zerocopy/0.8.40 \
-    crate://crates.io/zerocopy-derive/0.8.40 \
+    crate://crates.io/unicode-ident/1.0.27 \
+    crate://crates.io/zerocopy/0.8.63 \
+    crate://crates.io/zerocopy-derive/0.8.63 \
 "
 
-SRC_URI[autocfg-1.5.0.sha256sum] = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
-SRC_URI[bigdecimal-0.4.10.sha256sum] = "4d6867f1565b3aad85681f1015055b087fcfd840d6aeee6eee7f2da317603695"
-SRC_URI[cfg-if-1.0.4.sha256sum] = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
+SRC_URI[autocfg-1.5.1.sha256sum] = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
+SRC_URI[bigdecimal-0.4.11.sha256sum] = "8fa3f3d8cbf4dffcfe4991de61d012bef509a409ecbe9dd41049bfe32b4d4653"
+SRC_URI[cfg-if-1.0.5.sha256sum] = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
 SRC_URI[crunchy-0.2.4.sha256sum] = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5"
 SRC_URI[half-2.7.1.sha256sum] = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b"
 SRC_URI[heck-0.5.0.sha256sum] = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
-SRC_URI[libc-0.2.182.sha256sum] = "6800badb6cb2082ffd7b6a67e6125bb39f18782f793520caee8cb8846be06112"
+SRC_URI[libc-0.2.191.sha256sum] = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
 SRC_URI[libm-0.2.16.sha256sum] = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"
-SRC_URI[num-bigint-0.4.6.sha256sum] = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9"
-SRC_URI[num-integer-0.1.46.sha256sum] = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
+SRC_URI[num-bigint-0.4.8.sha256sum] = "c89e69e7e0f03bea5ef08013795c25018e101932225a656383bd384495ecc367"
+SRC_URI[num-integer-0.1.47.sha256sum] = "7ce2d95d4b3734dc35aa2f45e1aa22cd416814592a4f9d9205e11affd5b8e10b"
 SRC_URI[num-traits-0.2.19.sha256sum] = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
-SRC_URI[once_cell-1.21.3.sha256sum] = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
-SRC_URI[portable-atomic-1.13.1.sha256sum] = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
-SRC_URI[proc-macro2-1.0.106.sha256sum] = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
-SRC_URI[pyo3-0.29.0.sha256sum] = "cd274650b21d4bfc26a0a47587962c1edb425f69287324355cd040c3ea66071c"
-SRC_URI[pyo3-build-config-0.28.2.sha256sum] = "8bf94ee265674bf76c09fa430b0e99c26e319c945d96ca0d5a8215f31bf81cf7"
-SRC_URI[pyo3-build-config-0.29.0.sha256sum] = "c5e2a7d2f0d013342f295c048ad19237add5154a55b1c5a254c0ec93d4109078"
-SRC_URI[pyo3-ffi-0.29.0.sha256sum] = "ca85c467da1bbc8d866eea5deff9cf29ea5f7785054a17da36e65bda9c05845b"
-SRC_URI[pyo3-macros-0.29.0.sha256sum] = "9ac53762fd065daa3194dd09337a38bd793a188100fd1a9304c4ab312d901771"
-SRC_URI[pyo3-macros-backend-0.29.0.sha256sum] = "4ca3a1557399783172dc5bf39cfca835157732532cba56b71d2292161e53b362"
-SRC_URI[quote-1.0.44.sha256sum] = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4"
-SRC_URI[syn-2.0.117.sha256sum] = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
+SRC_URI[once_cell-1.21.4.sha256sum] = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
+SRC_URI[portable-atomic-1.15.0.sha256sum] = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
+SRC_URI[proc-macro2-1.0.107.sha256sum] = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
+SRC_URI[pyo3-0.30.1.sha256sum] = "229ca13b8a15bb0d1487b81ab975bfcd97513416499a8312011b6036e42e0de4"
+SRC_URI[pyo3-build-config-0.30.1.sha256sum] = "70130e2b6dd1ee589a8788026a429561ca5c40fa7a2fa7914c2282eddae24700"
+SRC_URI[pyo3-ffi-0.30.1.sha256sum] = "5e7ff73c555c286d212d4ce7e5fbda845a973c4f61bd5f160f5f2c3c2a04d1c4"
+SRC_URI[pyo3-macros-0.30.1.sha256sum] = "c46d2e5862c7bb8207e3b639f713dda3c499933444784154c11d013c5a691b60"
+SRC_URI[pyo3-macros-backend-0.30.1.sha256sum] = "38b89f066f2ae72a2aef52d1537ca2fcd104440ebfadee06e97aa90738a25b9b"
+SRC_URI[quote-1.0.47.sha256sum] = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
+SRC_URI[syn-2.0.119.sha256sum] = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
+SRC_URI[syn-3.0.9.sha256sum] = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b"
 SRC_URI[target-lexicon-0.13.5.sha256sum] = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
-SRC_URI[unicode-ident-1.0.24.sha256sum] = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
-SRC_URI[zerocopy-0.8.40.sha256sum] = "a789c6e490b576db9f7e6b6d661bcc9799f7c0ac8352f56ea20193b2681532e5"
-SRC_URI[zerocopy-derive-0.8.40.sha256sum] = "f65c489a7071a749c849713807783f70672b28094011623e200cb86dcb835953"
+SRC_URI[unicode-ident-1.0.27.sha256sum] = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
+SRC_URI[zerocopy-0.8.63.sha256sum] = "e5fe1f8f1b06191a00962174c61aa5005e0bb391a6d80d07e24d115c01a92ed8"
+SRC_URI[zerocopy-derive-0.8.63.sha256sum] = "863ad3ac83293fb4d740aedbfdc9240dd8d1a50c1099acd76ce80ce7c7230c7f"
meta-python/recipes-devtools/python/python3-cbor2_6.2.0.post2.bb renamed from meta-python/recipes-devtools/python/python3-cbor2_6.2.0.post1.bb +1 -1
similarity index 87%
rename from meta-python/recipes-devtools/python/python3-cbor2_6.2.0.post1.bb
rename to meta-python/recipes-devtools/python/python3-cbor2_6.2.0.post2.bb
index aa5839a932..10f8869943 100644
@@ -3,7 +3,7 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a79e64179819c7ce293372c059f1dbd8"
 DEPENDS += "python3-setuptools-scm-native"
 
-SRC_URI[sha256sum] = "2465ecef686b61e9feee840f506ef1cc15fa568825344c7b0af504b8230b698c"
+SRC_URI[sha256sum] = "3b08ba9f3a556186515000949d478e47e6d55322f9d86bdaef5b4e3d27d48298"
 
 inherit pypi python_setuptools3_rust cargo-update-recipe-crates ptest-python-pytest
 
author
#1 lore raw

PATCH 2/3 python3-cbor2: Install docs/usage.rst for ptests

tests/test_sequence_docs.py executes the code examples embedded in docs/usage.rst, resolved relative to the tests directory. The file was not installed, so all 26 tests in it failed with:

FileNotFoundError: [Errno 2] No such file or directory:
'/usr/lib/python3-cbor2/ptest/docs/usage.rst'

---
 .../recipes-devtools/python/python3-cbor2_6.2.0.post2.bb      | 4 ++++
 1 file changed, 4 insertions(+)
meta-python/recipes-devtools/python/python3-cbor2_6.2.0.post2.bb +4 -0
index 10f8869943..cda44d3864 100644
@@ -11,6 +11,10 @@ CARGO_SRC_DIR = "rust"
 
 require ${BPN}-crates.inc
 
+do_install_ptest:append() {
+    install -Dm 0644 ${S}/docs/usage.rst ${D}${PTEST_PATH}/docs/usage.rst
+}
+
 RDEPENDS:${PN}-ptest += " \
     python3-hypothesis \
     python3-tzdata \
author
#2 lore raw

PATCH 3/3 imx-cst: Fix build with OpenSSL 4.1

In reply to Khem Raj

OpenSSL 4.1 deprecates ASN1_STRING_length(), which the OpenSSL 4 ASN1 opaque fix uses, and the build uses -Werror:

openssl_helper.c:1255:21: error: 'ASN1_STRING_length' is deprecated:
Since OpenSSL 4.1; use ASN1_STRING_get_length() [-Werror,-Wdeprecated-declarations]

Use ASN1_STRING_get_length() when building against OpenSSL 4.1 or newer.

AI-Generated: Uses Claude Code

---
 ...se-ASN1_STRING_get_length-with-OpenS.patch | 38 +++++++++++++++++++
 .../recipes-support/imx-cst/imx-cst_4.0.1.bb  |  1 +
 2 files changed, 39 insertions(+)
 create mode 100644 meta-oe/recipes-support/imx-cst/imx-cst/0018-openssl_helper-Use-ASN1_STRING_get_length-with-OpenS.patch
meta-oe/recipes-support/imx-cst/imx-cst/0018-openssl_helper-Use-ASN1_STRING_get_length-with-OpenS.patch new file +38 -0
new file mode 100644
index 0000000000..a293d0eef7
@@ -0,0 +1,38 @@
+From d4362c9c99f2d80a6c4f25528934e040e333fd85 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Tue, 3 Nov 2026 07:13:41 -0800
+Subject: [PATCH] openssl_helper: Use ASN1_STRING_get_length() with OpenSSL 4.1
+
+OpenSSL 4.1 deprecates ASN1_STRING_length() in favour of
+ASN1_STRING_get_length(), which returns size_t. With -Werror the build
+fails with:
+
+  openssl_helper.c:1255:21: error: 'ASN1_STRING_length' is deprecated:
+  Since OpenSSL 4.1; use ASN1_STRING_get_length() [-Werror,-Wdeprecated-declarations]
+
+Use the new accessor when building against OpenSSL 4.1 or newer and keep
+ASN1_STRING_length() for older versions. A serial number is at most 20
+octets, so the cast to int is safe.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/lib/common/openssl_helper.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/lib/common/openssl_helper.c b/src/lib/common/openssl_helper.c
+index 7a6980e..e8961de 100644
+--- a/src/lib/common/openssl_helper.c
++++ b/src/lib/common/openssl_helper.c
+@@ -1252,7 +1252,11 @@ int get_certificate_serial_number_length(X509 *cert)
+
+     /* Get the raw data of the serial number */
+     serial_bytes = ASN1_STRING_get0_data(serial_number);
++#if OPENSSL_VERSION_NUMBER >= 0x40100000L
++    serial_length = (int)ASN1_STRING_get_length(serial_number);
++#else
+     serial_length = ASN1_STRING_length(serial_number);
++#endif
+
+     /* Check if the serial number is negative (MSB of first byte is set) */
+     if (serial_bytes[0] & 0x80)
meta-oe/recipes-support/imx-cst/imx-cst_4.0.1.bb +1 -0
index 3a0f717440..7683ebad52 100644
@@ -30,6 +30,7 @@ SRC_URI = "\
     file://0015-fix-openssl-4-engine-api-removal.patch \
     file://0016-fix-openssl-4-const-subject-name.patch \
     file://0017-cst-port-pkcs11-signing-from-engine-to-provider.patch \
+    file://0018-openssl_helper-Use-ASN1_STRING_get_length-with-OpenS.patch \
 "
 SRC_URI[sha256sum] = "fd92a1a9faa10fb81bbf752c7ee1e257f17e1ec4c2964f8a47adf8a3eaa7df41"