From a8acebe6e0a0c68ef0e0697e3a7cad458d7b4dd7 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Jul 06 2023 00:13:15 +0000 Subject: Update to version 2.3.3; Fixes RHBZ#2177627 --- diff --git a/.gitignore b/.gitignore index e261106..2d5c984 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /bitflags-1.2.1.crate /bitflags-1.3.1.crate /bitflags-1.3.2.crate +/bitflags-2.3.3.crate diff --git a/44c7063.patch b/44c7063.patch deleted file mode 100644 index be60d82..0000000 --- a/44c7063.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 44c7063fe4c40ffed0d7e5d0dbae4a32ed91022b Mon Sep 17 00:00:00 2001 -From: Arturo Castro -Date: Tue, 19 Apr 2022 12:36:35 +0200 -Subject: [PATCH] serde::Serialize -> serde_derive::Serialize - -serde:: doesn't work on tests on CI ---- - src/lib.rs | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/lib.rs b/src/lib.rs -index 46542b05..a5cbf53f 100644 ---- a/src/lib.rs -+++ b/src/lib.rs -@@ -1812,7 +1812,7 @@ mod tests { - } - - bitflags! { -- #[derive(serde::Serialize, serde::Deserialize)] -+ #[derive(serde_derive::Serialize, serde_derive::Deserialize)] - struct SerdeFlags: u32 { - const A = 1; - const B = 2; diff --git a/README.md b/README.md deleted file mode 100644 index e30ef48..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-bitflags - -The rust-bitflags package \ No newline at end of file diff --git a/bitflags-fix-metadata.diff b/bitflags-fix-metadata.diff index 5db4bae..6c85ed5 100644 --- a/bitflags-fix-metadata.diff +++ b/bitflags-fix-metadata.diff @@ -1,22 +1,27 @@ ---- bitflags-1.3.2/Cargo.toml 1970-01-01T00:00:00+00:00 -+++ bitflags-1.3.2/Cargo.toml 2021-09-27T13:46:46.074003+00:00 -@@ -26,14 +26,7 @@ - repository = "https://github.com/bitflags/bitflags" - [package.metadata.docs.rs] - features = ["example_generated"] +--- bitflags-2.3.3/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ bitflags-2.3.3/Cargo.toml 2023-07-05T17:33:17.108979+00:00 +@@ -46,15 +46,6 @@ + version = "1.0" + optional = true + -[dependencies.compiler_builtins] -version = "0.1.2" -optional = true - +- -[dependencies.core] -version = "1.0.0" -optional = true -package = "rustc-std-workspace-core" - [dev-dependencies.rustversion] +- + [dependencies.serde] version = "1.0" + optional = true +@@ -88,8 +79,4 @@ -@@ -55,4 +48,3 @@ [features] - default = [] example_generated = [] --rustc-dep-of-std = ["core", "compiler_builtins"] +-rustc-dep-of-std = [ +- "core", +- "compiler_builtins", +-] + std = [] diff --git a/rust-bitflags.spec b/rust-bitflags.spec index 69ce949..91e3a68 100644 --- a/rust-bitflags.spec +++ b/rust-bitflags.spec @@ -1,30 +1,26 @@ -# Generated by rust2rpm 21 -%bcond_without check +# Generated by rust2rpm 24 +# * missing dev-dependencies: zerocopy ^0.6 +%bcond_with check %global debug_package %{nil} %global crate bitflags -Name: rust-%{crate} -Version: 1.3.2 +Name: rust-bitflags +Version: 2.3.3 Release: %autorelease Summary: Macro to generate structures which behave like bitflags -# Upstream license specification: MIT/Apache-2.0 -License: MIT or ASL 2.0 +License: MIT OR Apache-2.0 URL: https://crates.io/crates/bitflags Source: %{crates_source} -# Initial patched metadata +# Manually created patch for downstream crate metadata changes # * drop dependencies on compiler internals -Patch0: bitflags-fix-metadata.diff -# * upstream patch to fix building tests with trybuild >= 1.0.57 -Patch1: https://github.com/bitflags/bitflags/commit/44c7063.patch - -ExclusiveArch: %{rust_arches} +Patch: bitflags-fix-metadata.diff BuildRequires: rust-packaging >= 21 %global _description %{expand: -Macro to generate structures which behave like bitflags.} +A macro to generate structures which behave like bitflags.} %description %{_description} @@ -42,7 +38,9 @@ use the "%{crate}" crate. %license %{crate_instdir}/LICENSE-MIT %doc %{crate_instdir}/CHANGELOG.md %doc %{crate_instdir}/CODE_OF_CONDUCT.md +%doc %{crate_instdir}/CONTRIBUTING.md %doc %{crate_instdir}/README.md +%doc %{crate_instdir}/SECURITY.md %{crate_instdir}/ %package -n %{name}+default-devel @@ -57,6 +55,30 @@ use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-devel %ghost %{crate_instdir}/Cargo.toml +%package -n %{name}+arbitrary-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+arbitrary-devel %{_description} + +This package contains library source intended for building other packages which +use the "arbitrary" feature of the "%{crate}" crate. + +%files -n %{name}+arbitrary-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+bytemuck-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+bytemuck-devel %{_description} + +This package contains library source intended for building other packages which +use the "bytemuck" feature of the "%{crate}" crate. + +%files -n %{name}+bytemuck-devel +%ghost %{crate_instdir}/Cargo.toml + %package -n %{name}+example_generated-devel Summary: %{summary} BuildArch: noarch @@ -69,6 +91,30 @@ use the "example_generated" feature of the "%{crate}" crate. %files -n %{name}+example_generated-devel %ghost %{crate_instdir}/Cargo.toml +%package -n %{name}+serde-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+serde-devel %{_description} + +This package contains library source intended for building other packages which +use the "serde" feature of the "%{crate}" crate. + +%files -n %{name}+serde-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+std-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+std-devel %{_description} + +This package contains library source intended for building other packages which +use the "std" feature of the "%{crate}" crate. + +%files -n %{name}+std-devel +%ghost %{crate_instdir}/Cargo.toml + %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 %cargo_prep @@ -84,8 +130,7 @@ use the "example_generated" feature of the "%{crate}" crate. %if %{with check} %check -# * skip trybuild tests that are broken due to cosmetic string differences -%cargo_test -- -- --skip fail +%cargo_test %endif %changelog diff --git a/sources b/sources index eb14e89..c7e8f83 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (bitflags-1.3.2.crate) = 3c698f757b5cc62f815f9a1cce365c3d2dd88e4db71f331dff8bba86c2865f755b81cb4c9bfc59bd86b7643b0943f9e09a7c4f8ad75eb2ab0e714803d0129f62 +SHA512 (bitflags-2.3.3.crate) = 8f063ba2bc3f638ca9200722e1c4370102589fb07aef25efcf63993fbf283cc86d554d11d24719f728ecabe540a47a90ce4113d8719f8e773f2344a66d21ff78