From 3e866ac91ab8203fd7c2f86101fdf5920d0c94d5 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Mon, 16 Dec 2024 15:31:58 +0100 Subject: [PATCH] Update to version 0.8.9; Fixes RHBZ#2328715 --- .gitignore | 1 + ...-generic-SIMD-for-big-endian-targets.patch | 32 ------------------- rkyv-fix-metadata.diff | 24 ++++++++------ rust-rkyv.spec | 17 ++-------- rust2rpm.toml | 12 ------- sources | 2 +- 6 files changed, 20 insertions(+), 68 deletions(-) delete mode 100644 0001-Fix-generic-SIMD-for-big-endian-targets.patch diff --git a/.gitignore b/.gitignore index 372a90f..d71f9c1 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ /rkyv-0.7.44.crate /rkyv-0.7.45.crate /rkyv-0.8.8.crate +/rkyv-0.8.9.crate diff --git a/0001-Fix-generic-SIMD-for-big-endian-targets.patch b/0001-Fix-generic-SIMD-for-big-endian-targets.patch deleted file mode 100644 index 9ac44e1..0000000 --- a/0001-Fix-generic-SIMD-for-big-endian-targets.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 6d6a5461e42cac18707dfee42b9f41ee7d078866 Mon Sep 17 00:00:00 2001 -From: David Koloski -Date: Tue, 1 Oct 2024 11:54:40 -0400 -Subject: [PATCH] Fix generic SIMD for big-endian targets - ---- - src/simd/generic.rs | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/src/simd/generic.rs b/src/simd/generic.rs -index 6f6cc56..d3b1b94 100644 ---- a/src/simd/generic.rs -+++ b/src/simd/generic.rs -@@ -73,7 +73,14 @@ impl Group { - pub unsafe fn read(ptr: *const u8) -> Self { - // SAFETY: The caller has guaranteed that `ptr` is valid for reads and - // points to enough bytes for a `Word`. -- unsafe { Self(core::ptr::read_unaligned(ptr.cast())) } -+ #[cfg(target_endian = "little")] -+ unsafe { -+ Self(core::ptr::read_unaligned(ptr.cast())) -+ } -+ #[cfg(target_endian = "big")] -+ unsafe { -+ Self(core::ptr::read_unaligned(ptr.cast::()).swap_bytes()) -+ } - } - - #[inline] --- -2.46.1 - diff --git a/rkyv-fix-metadata.diff b/rkyv-fix-metadata.diff index 589089c..71801c6 100644 --- a/rkyv-fix-metadata.diff +++ b/rkyv-fix-metadata.diff @@ -1,5 +1,5 @@ ---- rkyv-0.8.8/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ rkyv-0.8.8/Cargo.toml 2024-10-08T15:00:00.726373+00:00 +--- rkyv-0.8.9/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ rkyv-0.8.9/Cargo.toml 2024-12-16T14:22:32.740455+00:00 @@ -77,10 +77,6 @@ name = "derive" path = "tests/derive.rs" @@ -11,7 +11,7 @@ [[bench]] name = "log" path = "benches/log.rs" -@@ -96,34 +92,16 @@ +@@ -96,40 +92,16 @@ path = "benches/minecraft_savedata.rs" harness = false @@ -34,10 +34,16 @@ -package = "bytes" - [dependencies.hashbrown] - version = "0.14" + version = "0.15" optional = true default-features = false - +-[dependencies.hashbrown-0_14] +-version = "0.14" +-optional = true +-default-features = false +-package = "hashbrown" +- -[dependencies.indexmap-2] -version = "2" -optional = true @@ -46,8 +52,8 @@ [dependencies.munge] version = "0.4" -@@ -145,48 +123,6 @@ - version = "=0.8.8" +@@ -151,48 +123,6 @@ + version = "=0.8.9" default-features = false -[dependencies.smallvec-1] @@ -95,7 +101,7 @@ [dev-dependencies.ahash] version = "0.8" -@@ -202,7 +138,6 @@ +@@ -212,7 +142,6 @@ aligned = [] alloc = [ "dep:hashbrown", @@ -103,11 +109,11 @@ "rancor/alloc", ] big_endian = [] -@@ -215,28 +150,12 @@ +@@ -225,28 +154,12 @@ "std", "bytecheck", ] --hashbrown-0_14 = ["dep:hashbrown"] +-hashbrown-0_15 = ["dep:hashbrown"] -indexmap-2 = [ - "dep:indexmap-2", - "alloc", diff --git a/rust-rkyv.spec b/rust-rkyv.spec index a970fab..0a5f7b6 100644 --- a/rust-rkyv.spec +++ b/rust-rkyv.spec @@ -1,11 +1,11 @@ -# Generated by rust2rpm 26 -%bcond_without check +# Generated by rust2rpm 27 +%bcond check 1 %global debug_package %{nil} %global crate rkyv Name: rust-rkyv -Version: 0.8.8 +Version: 0.8.9 Release: %autorelease Summary: Zero-copy deserialization framework for Rust @@ -21,13 +21,6 @@ Source: %{crates_source} # * Patch out the ui test, which seems to require *all* integrations, even the # patched-out ones Patch: rkyv-fix-metadata.diff -# * Fix generic SIMD for big-endian targets: -# https://github.com/rkyv/rkyv/commit/6d6a5461e42cac18707dfee42b9f41ee7d078866 -# * Fixes: “Some tests related to hash_map fail on big-endian platforms” -# https://github.com/rkyv/rkyv/issues/557 -# * Exported with "git format-patch --relative" so that the patch applies to the -# released crate. -Patch10: 0001-Fix-generic-SIMD-for-big-endian-targets.patch BuildRequires: cargo-rpm-macros >= 24 BuildRequires: dos2unix @@ -188,10 +181,6 @@ use the "unaligned" feature of the "%{crate}" crate. %autosetup -n %{crate}-%{version} -p1 # Do not depend on divan; it is needed only for benchmarks. tomcli set Cargo.toml del dev-dependencies.divan -# The crate has a mixture of newline styles. -# Fixed upstream in: -# https://github.com/rkyv/rkyv/commit/6b7ab529d32166ec0fc81b7b8828ba71e2c65c38 -find . -type f | xargs -r -t dos2unix --keepdate %cargo_prep %generate_buildrequires diff --git a/rust2rpm.toml b/rust2rpm.toml index 2fd8216..fcaa3c1 100644 --- a/rust2rpm.toml +++ b/rust2rpm.toml @@ -23,17 +23,5 @@ build = [ pre = [ "# Do not depend on divan; it is needed only for benchmarks.", "tomcli set Cargo.toml del dev-dependencies.divan", - "# The crate has a mixture of newline styles.", - "# Fixed upstream in:", - "# https://github.com/rkyv/rkyv/commit/6b7ab529d32166ec0fc81b7b8828ba71e2c65c38", - "find . -type f | xargs -r -t dos2unix --keepdate", ] -[[package.extra-patches]] -number = 10 -file = "0001-Fix-generic-SIMD-for-big-endian-targets.patch" -comments = [ - "Fix generic SIMD for big-endian targets: https://github.com/rkyv/rkyv/commit/6d6a5461e42cac18707dfee42b9f41ee7d078866", - "Fixes: “Some tests related to hash_map fail on big-endian platforms” https://github.com/rkyv/rkyv/issues/557", - "Exported with \"git format-patch --relative\" so that the patch applies to the released crate." -] diff --git a/sources b/sources index c3d4a70..9144708 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rkyv-0.8.8.crate) = 3be2627c021a134182bd24085bb5914f84cc4805e4bc41540104c2cfca27403f1e7bdcf69f9a0ccdb967445123883bb264b2d918316932ffa686910cf3df0c96 +SHA512 (rkyv-0.8.9.crate) = cd639e58ab104b89e13800070c656e40d90b2162fa3ce0d349cec7fc61eed882a8b2a30adbf0e34bc89686d11ec5e8031d6430a4b476605012c4d001b793ae74