On Tue, Feb 27, 2024 at 10:12 PM Khem Raj <raj.k...@gmail.com> wrote:

> On Tue, Feb 27, 2024 at 10:59 AM Tim Orling <ticot...@gmail.com> wrote:
> >
> >
> >
> > On Tue, Feb 27, 2024 at 9:51 AM Khem Raj <raj.k...@gmail.com> wrote:
> >>
> >> This gets it building on architectures without 64bit atomics.
> >>
> >
> > We could also upgrade to python3-cryptography 42.0.5
> > https://cryptography.io/en/latest/changelog/#v42-0-5
> > Do we want to do that at this stage?
>
> upgrade to 42.0.5 will still need this patch regardless
> since it will only be in next release, so update or not is orthogonal
> to this issue.
>
> The pyo3 upgrade was backported to 42.0.5
https://github.com/pyca/cryptography/compare/42.0.2...42.0.5
https://github.com/pyca/cryptography/commit/8e9de309f850a17409da5de39cfcd9296c25ea36


> >
> >>
> >> Signed-off-by: Khem Raj <raj.k...@gmail.com>
> >> ---
> >>  .../python/python3-cryptography-crates.inc    |  22 ++--
> >>  ...m-0.20.2-to-0.20.3-in-src-rust-10462.patch | 105 ++++++++++++++++++
> >>  .../python/python3-cryptography_42.0.2.bb     |   1 +
> >>  3 files changed, 118 insertions(+), 10 deletions(-)
> >>  create mode 100644
> meta/recipes-devtools/python/python3-cryptography/0001-Bump-pyo3-from-0.20.2-to-0.20.3-in-src-rust-10462.patch
> >>
> >> diff --git
> a/meta/recipes-devtools/python/python3-cryptography-crates.inc
> b/meta/recipes-devtools/python/python3-cryptography-crates.inc
> >> index 4714c76bd2b..b26e22b70c3 100644
> >> --- a/meta/recipes-devtools/python/python3-cryptography-crates.inc
> >> +++ b/meta/recipes-devtools/python/python3-cryptography-crates.inc
> >> @@ -25,12 +25,13 @@ SRC_URI += " \
> >>      crate://crates.io/parking_lot_core/0.9.9 \
> >>      crate://crates.io/pem/3.0.3 \
> >>      crate://crates.io/pkg-config/0.3.29 \
> >> +    crate://crates.io/portable-atomic/1.6.0 \
> >>      crate://crates.io/proc-macro2/1.0.78 \
> >> -    crate://crates.io/pyo3/0.20.2 \
> >> -    crate://crates.io/pyo3-build-config/0.20.2 \
> >> -    crate://crates.io/pyo3-ffi/0.20.2 \
> >> -    crate://crates.io/pyo3-macros/0.20.2 \
> >> -    crate://crates.io/pyo3-macros-backend/0.20.2 \
> >> +    crate://crates.io/pyo3/0.20.3 \
> >> +    crate://crates.io/pyo3-build-config/0.20.3 \
> >> +    crate://crates.io/pyo3-ffi/0.20.3 \
> >> +    crate://crates.io/pyo3-macros/0.20.3 \
> >> +    crate://crates.io/pyo3-macros-backend/0.20.3 \
> >>      crate://crates.io/quote/1.0.35 \
> >>      crate://crates.io/redox_syscall/0.4.1 \
> >>      crate://crates.io/scopeguard/1.2.0 \
> >> @@ -74,12 +75,13 @@ SRC_URI[parking_lot-0.12.1.sha256sum] =
> "3742b2c103b9f06bc9fff0a37ff4912935851be
> >>  SRC_URI[parking_lot_core-0.9.9.sha256sum] =
> "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e"
> >>  SRC_URI[pem-3.0.3.sha256sum] =
> "1b8fcc794035347fb64beda2d3b462595dd2753e3f268d89c5aae77e8cf2c310"
> >>  SRC_URI[pkg-config-0.3.29.sha256sum] =
> "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb"
> >> +SRC_URI[portable-atomic-1.6.0.sha256sum] =
> "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0"
> >>  SRC_URI[proc-macro2-1.0.78.sha256sum] =
> "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae"
> >> -SRC_URI[pyo3-0.20.2.sha256sum] =
> "9a89dc7a5850d0e983be1ec2a463a171d20990487c3cfcd68b5363f1ee3d6fe0"
> >> -SRC_URI[pyo3-build-config-0.20.2.sha256sum] =
> "07426f0d8fe5a601f26293f300afd1a7b1ed5e78b2a705870c5f30893c5163be"
> >> -SRC_URI[pyo3-ffi-0.20.2.sha256sum] =
> "dbb7dec17e17766b46bca4f1a4215a85006b4c2ecde122076c562dd058da6cf1"
> >> -SRC_URI[pyo3-macros-0.20.2.sha256sum] =
> "05f738b4e40d50b5711957f142878cfa0f28e054aa0ebdfc3fd137a843f74ed3"
> >> -SRC_URI[pyo3-macros-backend-0.20.2.sha256sum] =
> "0fc910d4851847827daf9d6cdd4a823fbdaab5b8818325c5e97a86da79e8881f"
> >> +SRC_URI[pyo3-0.20.3.sha256sum] =
> "53bdbb96d49157e65d45cc287af5f32ffadd5f4761438b527b055fb0d4bb8233"
> >> +SRC_URI[pyo3-build-config-0.20.3.sha256sum] =
> "deaa5745de3f5231ce10517a1f5dd97d53e5a2fd77aa6b5842292085831d48d7"
> >> +SRC_URI[pyo3-ffi-0.20.3.sha256sum] =
> "62b42531d03e08d4ef1f6e85a2ed422eb678b8cd62b762e53891c05faf0d4afa"
> >> +SRC_URI[pyo3-macros-0.20.3.sha256sum] =
> "7305c720fa01b8055ec95e484a6eca7a83c841267f0dd5280f0c8b8551d2c158"
> >> +SRC_URI[pyo3-macros-backend-0.20.3.sha256sum] =
> "7c7e9b68bb9c3149c5b0cade5d07f953d6d125eb4337723c4ccdb665f1f96185"
> >>  SRC_URI[quote-1.0.35.sha256sum] =
> "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
> >>  SRC_URI[redox_syscall-0.4.1.sha256sum] =
> "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa"
> >>  SRC_URI[scopeguard-1.2.0.sha256sum] =
> "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
> >> diff --git
> a/meta/recipes-devtools/python/python3-cryptography/0001-Bump-pyo3-from-0.20.2-to-0.20.3-in-src-rust-10462.patch
> b/meta/recipes-devtools/python/python3-cryptography/0001-Bump-pyo3-from-0.20.2-to-0.20.3-in-src-rust-10462.patch
> >> new file mode 100644
> >> index 00000000000..33dd7ae5d5a
> >> --- /dev/null
> >> +++
> b/meta/recipes-devtools/python/python3-cryptography/0001-Bump-pyo3-from-0.20.2-to-0.20.3-in-src-rust-10462.patch
> >> @@ -0,0 +1,105 @@
> >> +From f6ec5ab18b5beacb08b0157c5193ea626b44b4e1 Mon Sep 17 00:00:00 2001
> >> +From: Khem Raj <raj.k...@gmail.com>
> >> +Date: Tue, 27 Feb 2024 09:30:15 -0800
> >> +Subject: [PATCH] Bump pyo3 from 0.20.2 to 0.20.3 in /src/rust (#10462)
> >> +
> >> +It fixes build on hosts without 64bit atomics
> >> +
> >> +Upstream-Status: Backport [
> https://github.com/pyca/cryptography/commit/3598d2ee4b5060dbbe6938b893410ed35074567c
> ]
> >> +
> >> +Signed-off-by: Khem Raj <raj.k...@gmail.com>
> >> +---
> >> + src/rust/Cargo.lock | 28 ++++++++++++++++++----------
> >> + 1 file changed, 18 insertions(+), 10 deletions(-)
> >> +
> >> +diff --git a/src/rust/Cargo.lock b/src/rust/Cargo.lock
> >> +index b2e0ac4..030e38d 100644
> >> +--- a/src/rust/Cargo.lock
> >> ++++ b/src/rust/Cargo.lock
> >> +@@ -263,6 +263,12 @@ version = "0.3.29"
> >> + source = "registry+https://github.com/rust-lang/crates.io-index";
> >> + checksum =
> "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb"
> >> +
> >> ++[[package]]
> >> ++name = "portable-atomic"
> >> ++version = "1.6.0"
> >> ++source = "registry+https://github.com/rust-lang/crates.io-index";
> >> ++checksum =
> "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0"
> >> ++
> >> + [[package]]
> >> + name = "proc-macro2"
> >> + version = "1.0.78"
> >> +@@ -274,15 +280,16 @@ dependencies = [
> >> +
> >> + [[package]]
> >> + name = "pyo3"
> >> +-version = "0.20.2"
> >> ++version = "0.20.3"
> >> + source = "registry+https://github.com/rust-lang/crates.io-index";
> >> +-checksum =
> "9a89dc7a5850d0e983be1ec2a463a171d20990487c3cfcd68b5363f1ee3d6fe0"
> >> ++checksum =
> "53bdbb96d49157e65d45cc287af5f32ffadd5f4761438b527b055fb0d4bb8233"
> >> + dependencies = [
> >> +  "cfg-if",
> >> +  "indoc",
> >> +  "libc",
> >> +  "memoffset",
> >> +  "parking_lot",
> >> ++ "portable-atomic",
> >> +  "pyo3-build-config",
> >> +  "pyo3-ffi",
> >> +  "pyo3-macros",
> >> +@@ -291,9 +298,9 @@ dependencies = [
> >> +
> >> + [[package]]
> >> + name = "pyo3-build-config"
> >> +-version = "0.20.2"
> >> ++version = "0.20.3"
> >> + source = "registry+https://github.com/rust-lang/crates.io-index";
> >> +-checksum =
> "07426f0d8fe5a601f26293f300afd1a7b1ed5e78b2a705870c5f30893c5163be"
> >> ++checksum =
> "deaa5745de3f5231ce10517a1f5dd97d53e5a2fd77aa6b5842292085831d48d7"
> >> + dependencies = [
> >> +  "once_cell",
> >> +  "target-lexicon",
> >> +@@ -301,9 +308,9 @@ dependencies = [
> >> +
> >> + [[package]]
> >> + name = "pyo3-ffi"
> >> +-version = "0.20.2"
> >> ++version = "0.20.3"
> >> + source = "registry+https://github.com/rust-lang/crates.io-index";
> >> +-checksum =
> "dbb7dec17e17766b46bca4f1a4215a85006b4c2ecde122076c562dd058da6cf1"
> >> ++checksum =
> "62b42531d03e08d4ef1f6e85a2ed422eb678b8cd62b762e53891c05faf0d4afa"
> >> + dependencies = [
> >> +  "libc",
> >> +  "pyo3-build-config",
> >> +@@ -311,9 +318,9 @@ dependencies = [
> >> +
> >> + [[package]]
> >> + name = "pyo3-macros"
> >> +-version = "0.20.2"
> >> ++version = "0.20.3"
> >> + source = "registry+https://github.com/rust-lang/crates.io-index";
> >> +-checksum =
> "05f738b4e40d50b5711957f142878cfa0f28e054aa0ebdfc3fd137a843f74ed3"
> >> ++checksum =
> "7305c720fa01b8055ec95e484a6eca7a83c841267f0dd5280f0c8b8551d2c158"
> >> + dependencies = [
> >> +  "proc-macro2",
> >> +  "pyo3-macros-backend",
> >> +@@ -323,12 +330,13 @@ dependencies = [
> >> +
> >> + [[package]]
> >> + name = "pyo3-macros-backend"
> >> +-version = "0.20.2"
> >> ++version = "0.20.3"
> >> + source = "registry+https://github.com/rust-lang/crates.io-index";
> >> +-checksum =
> "0fc910d4851847827daf9d6cdd4a823fbdaab5b8818325c5e97a86da79e8881f"
> >> ++checksum =
> "7c7e9b68bb9c3149c5b0cade5d07f953d6d125eb4337723c4ccdb665f1f96185"
> >> + dependencies = [
> >> +  "heck",
> >> +  "proc-macro2",
> >> ++ "pyo3-build-config",
> >> +  "quote",
> >> +  "syn",
> >> + ]
> >> +--
> >> +2.44.0
> >> +
> >> diff --git a/meta/recipes-devtools/python/
> python3-cryptography_42.0.2.bb b/meta/recipes-devtools/python/
> python3-cryptography_42.0.2.bb
> >> index c21c4d1a03b..da10e2e60c1 100644
> >> --- a/meta/recipes-devtools/python/python3-cryptography_42.0.2.bb
> >> +++ b/meta/recipes-devtools/python/python3-cryptography_42.0.2.bb
> >> @@ -11,6 +11,7 @@ LDSHARED += "-pthread"
> >>  SRC_URI[sha256sum] =
> "e0ec52ba3c7f1b7d813cd52649a5b3ef1fc0d433219dc8c93827c57eab6cf888"
> >>
> >>  SRC_URI +=
> "file://0001-pyproject.toml-remove-benchmark-disable-option.patch \
> >> +
> file://0001-Bump-pyo3-from-0.20.2-to-0.20.3-in-src-rust-10462.patch \
> >>              file://check-memfree.py \
> >>              file://run-ptest \
> >>             "
> >> --
> >> 2.44.0
> >>
> >>
> >> 
> >>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#196391): 
https://lists.openembedded.org/g/openembedded-core/message/196391
Mute This Topic: https://lists.openembedded.org/mt/104607684/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to