From 5acfab598eb0099e993e47e251a582b26daef8bc Mon Sep 17 00:00:00 2001 From: Michel Lind Date: Thu, 30 May 2024 23:05:23 -0500 Subject: [PATCH 1/7] Update to 0.1.38 (rhbz#2276528) Signed-off-by: Michel Lind --- .gitignore | 1 + libmimalloc-sys-fix-usable-size-gating.diff | 36 +++++++++++++++++++++ rust-libmimalloc-sys.spec | 34 +++++++++++++++++-- series | 1 + sources | 2 +- 5 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 libmimalloc-sys-fix-usable-size-gating.diff create mode 100644 series diff --git a/.gitignore b/.gitignore index 96484b4..882a0ff 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /libmimalloc-sys-0.1.30.crate /libmimalloc-sys-0.1.33.crate /libmimalloc-sys-0.1.35.crate +/libmimalloc-sys-0.1.38.crate diff --git a/libmimalloc-sys-fix-usable-size-gating.diff b/libmimalloc-sys-fix-usable-size-gating.diff new file mode 100644 index 0000000..5cb7eb4 --- /dev/null +++ b/libmimalloc-sys-fix-usable-size-gating.diff @@ -0,0 +1,36 @@ +--- a/src/extended.rs ++++ b/src/extended.rs +@@ -1014,6 +1014,16 @@ mod tests { + use super::*; + + #[test] ++ fn it_calculates_usable_size() { ++ let ptr = unsafe { mi_malloc(32) } as *mut u8; ++ let usable_size = unsafe { mi_usable_size(ptr as *mut c_void) }; ++ assert!( ++ usable_size >= 32, ++ "usable_size should at least equal to the allocated size" ++ ); ++ } ++ ++ #[test] + fn runtime_stable_option() { + unsafe { + assert_eq!(mi_option_get(mi_option_show_errors), 0); +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -89,14 +89,4 @@ mod tests { + let ptr = unsafe { mi_realloc_aligned(ptr as *mut c_void, 8, 8) } as *mut u8; + unsafe { mi_free(ptr as *mut c_void) }; + } +- +- #[test] +- fn it_calculates_usable_size() { +- let ptr = unsafe { mi_malloc(32) } as *mut u8; +- let usable_size = unsafe { mi_usable_size(ptr as *mut c_void) }; +- assert!( +- usable_size >= 32, +- "usable_size should at least equal to the allocated size" +- ); +- } + } diff --git a/rust-libmimalloc-sys.spec b/rust-libmimalloc-sys.spec index d3ba7ba..d441580 100644 --- a/rust-libmimalloc-sys.spec +++ b/rust-libmimalloc-sys.spec @@ -1,23 +1,27 @@ -# Generated by rust2rpm 25 +# Generated by rust2rpm 26 %bcond_without check %global debug_package %{nil} %global crate libmimalloc-sys Name: rust-libmimalloc-sys -Version: 0.1.35 +Version: 0.1.38 Release: %autorelease Summary: Sys crate wrapping the mimalloc allocator License: MIT URL: https://crates.io/crates/libmimalloc-sys Source: %{crates_source} +# https://github.com/purpleprotocol/mimalloc_rust/pull/122 +Patch: %{crate}-fix-usable-size-gating.diff BuildRequires: cargo-rpm-macros >= 24 # TODO: get this to build against system mimalloc # or ask mimalloc dev to switch to mimalloc-sys -Provides: bundled(mimalloc) = 2.1.2 +# https://github.com/purpleprotocol/mimalloc_rust/issues/73 +# see MI_MALLOC_VERSION in mimalloc/include/mimalloc.h +Provides: bundled(mimalloc) = 2.1.6 %global _description %{expand: Sys crate wrapping the mimalloc allocator.} @@ -50,6 +54,18 @@ use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-devel %ghost %{crate_instdir}/Cargo.toml +%package -n %{name}+arena-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+arena-devel %{_description} + +This package contains library source intended for building other packages which +use the "arena" feature of the "%{crate}" crate. + +%files -n %{name}+arena-devel +%ghost %{crate_instdir}/Cargo.toml + %package -n %{name}+cty-devel Summary: %{summary} BuildArch: noarch @@ -110,6 +126,18 @@ use the "local_dynamic_tls" feature of the "%{crate}" crate. %files -n %{name}+local_dynamic_tls-devel %ghost %{crate_instdir}/Cargo.toml +%package -n %{name}+no_thp-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+no_thp-devel %{_description} + +This package contains library source intended for building other packages which +use the "no_thp" feature of the "%{crate}" crate. + +%files -n %{name}+no_thp-devel +%ghost %{crate_instdir}/Cargo.toml + %package -n %{name}+override-devel Summary: %{summary} BuildArch: noarch diff --git a/series b/series new file mode 100644 index 0000000..24ea452 --- /dev/null +++ b/series @@ -0,0 +1 @@ +libmimalloc-sys-fix-usable-size-gating.diff diff --git a/sources b/sources index 83463e3..22f9bfd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libmimalloc-sys-0.1.35.crate) = 7f9ef551d23d7e22073cf9d8593103a4ca17cf82b65b2bc1404dbfc2cec46c4f305ad9dfda9ca1c61e7ff3a617196c6798f505d62c90552dd25b4ba0c05e5847 +SHA512 (libmimalloc-sys-0.1.38.crate) = 3b0416b06a4692be364b75e324a312e0160f64f8a49930d3e0eb6fb201982b59482f636fca774a254aead6112168acd3d307c2a79c5ce3be3213850c172a7bf9 From 247318614ebc7d88ccd466edbee649abbb52fb1c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jul 2024 23:58:52 +0000 Subject: [PATCH 2/7] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 1a6f8943b0636d39997c135f67a74fa444b32cbf Mon Sep 17 00:00:00 2001 From: Michel Lind Date: Fri, 16 Aug 2024 12:15:47 -0400 Subject: [PATCH 3/7] Update to version 0.1.39; Fixes: RHBZ#2293834 Signed-off-by: Michel Lind --- .gitignore | 1 + libmimalloc-sys-fix-usable-size-gating.diff | 36 --------------------- rust-libmimalloc-sys.spec | 6 ++-- sources | 2 +- 4 files changed, 4 insertions(+), 41 deletions(-) delete mode 100644 libmimalloc-sys-fix-usable-size-gating.diff diff --git a/.gitignore b/.gitignore index 882a0ff..5d09fd8 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /libmimalloc-sys-0.1.33.crate /libmimalloc-sys-0.1.35.crate /libmimalloc-sys-0.1.38.crate +/libmimalloc-sys-0.1.39.crate diff --git a/libmimalloc-sys-fix-usable-size-gating.diff b/libmimalloc-sys-fix-usable-size-gating.diff deleted file mode 100644 index 5cb7eb4..0000000 --- a/libmimalloc-sys-fix-usable-size-gating.diff +++ /dev/null @@ -1,36 +0,0 @@ ---- a/src/extended.rs -+++ b/src/extended.rs -@@ -1014,6 +1014,16 @@ mod tests { - use super::*; - - #[test] -+ fn it_calculates_usable_size() { -+ let ptr = unsafe { mi_malloc(32) } as *mut u8; -+ let usable_size = unsafe { mi_usable_size(ptr as *mut c_void) }; -+ assert!( -+ usable_size >= 32, -+ "usable_size should at least equal to the allocated size" -+ ); -+ } -+ -+ #[test] - fn runtime_stable_option() { - unsafe { - assert_eq!(mi_option_get(mi_option_show_errors), 0); ---- a/src/lib.rs -+++ b/src/lib.rs -@@ -89,14 +89,4 @@ mod tests { - let ptr = unsafe { mi_realloc_aligned(ptr as *mut c_void, 8, 8) } as *mut u8; - unsafe { mi_free(ptr as *mut c_void) }; - } -- -- #[test] -- fn it_calculates_usable_size() { -- let ptr = unsafe { mi_malloc(32) } as *mut u8; -- let usable_size = unsafe { mi_usable_size(ptr as *mut c_void) }; -- assert!( -- usable_size >= 32, -- "usable_size should at least equal to the allocated size" -- ); -- } - } diff --git a/rust-libmimalloc-sys.spec b/rust-libmimalloc-sys.spec index d441580..9d1d494 100644 --- a/rust-libmimalloc-sys.spec +++ b/rust-libmimalloc-sys.spec @@ -5,15 +5,13 @@ %global crate libmimalloc-sys Name: rust-libmimalloc-sys -Version: 0.1.38 +Version: 0.1.39 Release: %autorelease Summary: Sys crate wrapping the mimalloc allocator License: MIT URL: https://crates.io/crates/libmimalloc-sys Source: %{crates_source} -# https://github.com/purpleprotocol/mimalloc_rust/pull/122 -Patch: %{crate}-fix-usable-size-gating.diff BuildRequires: cargo-rpm-macros >= 24 @@ -21,7 +19,7 @@ BuildRequires: cargo-rpm-macros >= 24 # or ask mimalloc dev to switch to mimalloc-sys # https://github.com/purpleprotocol/mimalloc_rust/issues/73 # see MI_MALLOC_VERSION in mimalloc/include/mimalloc.h -Provides: bundled(mimalloc) = 2.1.6 +Provides: bundled(mimalloc) = 2.1.7 %global _description %{expand: Sys crate wrapping the mimalloc allocator.} diff --git a/sources b/sources index 22f9bfd..f240a9c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libmimalloc-sys-0.1.38.crate) = 3b0416b06a4692be364b75e324a312e0160f64f8a49930d3e0eb6fb201982b59482f636fca774a254aead6112168acd3d307c2a79c5ce3be3213850c172a7bf9 +SHA512 (libmimalloc-sys-0.1.39.crate) = db578da8722b82eafac3b587b2db24cbf95fbd85a25b7ce30286deb9eda6820b5d452ece7c3126a2d8c96400941dc3946b4cb2f46172241861405aa09a3a2451 From 5ad9cc62a02ea1d7318354ff5e67d2887a248cb9 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 19 Jan 2025 04:44:13 +0000 Subject: [PATCH 4/7] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From c8b93b1d48af7a9c68ca40bc398e0a2b0ecd1de2 Mon Sep 17 00:00:00 2001 From: Michel Lind Date: Thu, 24 Apr 2025 13:53:40 -0500 Subject: [PATCH 5/7] Update to 0.1.42; Fixes: RHBZ#2353251 Signed-off-by: Michel Lind --- .gitignore | 1 + get-bundled-mimalloc-ver.sh | 2 ++ rust-libmimalloc-sys.spec | 10 +++++----- sources | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) create mode 100755 get-bundled-mimalloc-ver.sh diff --git a/.gitignore b/.gitignore index 5d09fd8..175642a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /libmimalloc-sys-0.1.35.crate /libmimalloc-sys-0.1.38.crate /libmimalloc-sys-0.1.39.crate +/libmimalloc-sys-0.1.42.crate diff --git a/get-bundled-mimalloc-ver.sh b/get-bundled-mimalloc-ver.sh new file mode 100755 index 0000000..d9ba3f5 --- /dev/null +++ b/get-bundled-mimalloc-ver.sh @@ -0,0 +1,2 @@ +#!/bin/sh +grep "define MI_MALLOC_VERSION" libmimalloc-sys-*/c_src/mimalloc/include/mimalloc.h | cut -d' ' -f3 | fold -w1 | paste -sd. diff --git a/rust-libmimalloc-sys.spec b/rust-libmimalloc-sys.spec index 9d1d494..165063e 100644 --- a/rust-libmimalloc-sys.spec +++ b/rust-libmimalloc-sys.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 libmimalloc-sys Name: rust-libmimalloc-sys -Version: 0.1.39 +Version: 0.1.42 Release: %autorelease Summary: Sys crate wrapping the mimalloc allocator @@ -18,8 +18,8 @@ BuildRequires: cargo-rpm-macros >= 24 # TODO: get this to build against system mimalloc # or ask mimalloc dev to switch to mimalloc-sys # https://github.com/purpleprotocol/mimalloc_rust/issues/73 -# see MI_MALLOC_VERSION in mimalloc/include/mimalloc.h -Provides: bundled(mimalloc) = 2.1.7 +# use get-bundled-mimalloc-ver.sh after unpacking the crate +Provides: bundled(mimalloc) = 2.2.3 %global _description %{expand: Sys crate wrapping the mimalloc allocator.} diff --git a/sources b/sources index f240a9c..57535ff 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libmimalloc-sys-0.1.39.crate) = db578da8722b82eafac3b587b2db24cbf95fbd85a25b7ce30286deb9eda6820b5d452ece7c3126a2d8c96400941dc3946b4cb2f46172241861405aa09a3a2451 +SHA512 (libmimalloc-sys-0.1.42.crate) = 0daf3ef819820d7d0ba7d189038ad33ce7fbec370edb5f2d07b47569d359f0364e8b43639743e0a800ca41bf432f043ca71bc9dbf900705732b856e147ec6d85 From 6387123590605e688059a16b9c9ea97332055fa4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 15:09:50 +0000 Subject: [PATCH 6/7] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From c53d62c326ec543e90a57beaedbe1e333d0baed6 Mon Sep 17 00:00:00 2001 From: Michel Lind Date: Mon, 10 Nov 2025 22:45:34 +0000 Subject: [PATCH 7/7] Update to version 0.1.44; Resolves: RHBZ#2391006 Signed-off-by: Michel Lind --- .gitignore | 1 + get-bundled-mimalloc-ver.sh | 4 +++- rust-libmimalloc-sys.spec | 20 +++++++++++++++++--- series | 1 - sources | 2 +- 5 files changed, 22 insertions(+), 6 deletions(-) delete mode 100644 series diff --git a/.gitignore b/.gitignore index 175642a..1a3a04c 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /libmimalloc-sys-0.1.38.crate /libmimalloc-sys-0.1.39.crate /libmimalloc-sys-0.1.42.crate +/libmimalloc-sys-0.1.44.crate diff --git a/get-bundled-mimalloc-ver.sh b/get-bundled-mimalloc-ver.sh index d9ba3f5..ba2b568 100755 --- a/get-bundled-mimalloc-ver.sh +++ b/get-bundled-mimalloc-ver.sh @@ -1,2 +1,4 @@ #!/bin/sh -grep "define MI_MALLOC_VERSION" libmimalloc-sys-*/c_src/mimalloc/include/mimalloc.h | cut -d' ' -f3 | fold -w1 | paste -sd. +for v in 2 3; do + grep "define MI_MALLOC_VERSION" libmimalloc-sys-*/c_src/mimalloc/v$v/include/mimalloc.h | cut -d' ' -f3 | fold -w1 | paste -sd. +done diff --git a/rust-libmimalloc-sys.spec b/rust-libmimalloc-sys.spec index 165063e..82cc4f9 100644 --- a/rust-libmimalloc-sys.spec +++ b/rust-libmimalloc-sys.spec @@ -5,7 +5,7 @@ %global crate libmimalloc-sys Name: rust-libmimalloc-sys -Version: 0.1.42 +Version: 0.1.44 Release: %autorelease Summary: Sys crate wrapping the mimalloc allocator @@ -19,7 +19,8 @@ BuildRequires: cargo-rpm-macros >= 24 # or ask mimalloc dev to switch to mimalloc-sys # https://github.com/purpleprotocol/mimalloc_rust/issues/73 # use get-bundled-mimalloc-ver.sh after unpacking the crate -Provides: bundled(mimalloc) = 2.2.3 +Provides: bundled(mimalloc) = 2.2.4 +Provides: bundled(mimalloc) = 3.1.5 %global _description %{expand: Sys crate wrapping the mimalloc allocator.} @@ -37,7 +38,8 @@ use the "%{crate}" crate. %files devel %license %{crate_instdir}/LICENSE.txt -%license %{crate_instdir}/c_src/mimalloc/LICENSE +%license %{crate_instdir}/c_src/mimalloc/v2/LICENSE +%license %{crate_instdir}/c_src/mimalloc/v3/LICENSE %{crate_instdir}/ %package -n %{name}+default-devel @@ -160,6 +162,18 @@ use the "secure" feature of the "%{crate}" crate. %files -n %{name}+secure-devel %ghost %{crate_instdir}/Cargo.toml +%package -n %{name}+v3-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+v3-devel %{_description} + +This package contains library source intended for building other packages which +use the "v3" feature of the "%{crate}" crate. + +%files -n %{name}+v3-devel +%ghost %{crate_instdir}/Cargo.toml + %prep %autosetup -n %{crate}-%{version} -p1 %cargo_prep diff --git a/series b/series deleted file mode 100644 index 24ea452..0000000 --- a/series +++ /dev/null @@ -1 +0,0 @@ -libmimalloc-sys-fix-usable-size-gating.diff diff --git a/sources b/sources index 57535ff..c39a392 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libmimalloc-sys-0.1.42.crate) = 0daf3ef819820d7d0ba7d189038ad33ce7fbec370edb5f2d07b47569d359f0364e8b43639743e0a800ca41bf432f043ca71bc9dbf900705732b856e147ec6d85 +SHA512 (libmimalloc-sys-0.1.44.crate) = 18de89a1084ed2da37f9ea6357289e40fe95d86e8de2ee4567bba5453c2f622a116473e2baffeb086cdf814a4b7b12f6e05563992b0b88cf939abcc5a2584fc2