From 01175bb51f1f5fbd88e701d41b2751ffb4f381eb Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Tue, 21 Feb 2023 15:05:20 +0100 Subject: [PATCH] Update to version 1.3.0; Fixes RHBZ#2125013 --- .gitignore | 1 + bstr-fix-metadata.diff | 11 +++++ rust-bstr.spec | 109 ++++++++++++++--------------------------- sources | 2 +- 4 files changed, 50 insertions(+), 73 deletions(-) create mode 100644 bstr-fix-metadata.diff diff --git a/.gitignore b/.gitignore index 3e110a6..c0a2593 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /bstr-0.2.14.crate /bstr-0.2.16.crate /bstr-0.2.17.crate +/bstr-1.3.0.crate diff --git a/bstr-fix-metadata.diff b/bstr-fix-metadata.diff new file mode 100644 index 0000000..e6cf731 --- /dev/null +++ b/bstr-fix-metadata.diff @@ -0,0 +1,11 @@ +--- bstr-1.3.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ bstr-1.3.0/Cargo.toml 2023-02-20T15:59:35.969194+00:00 +@@ -31,7 +31,7 @@ + "text-processing", + "encoding", + ] +-license = "MIT OR Apache-2.0" ++license = "(MIT OR Apache-2.0) AND Unicode-DFS-2016" + repository = "https://github.com/BurntSushi/bstr" + resolver = "2" + diff --git a/rust-bstr.spec b/rust-bstr.spec index 6ecebed..9f59f44 100644 --- a/rust-bstr.spec +++ b/rust-bstr.spec @@ -1,28 +1,26 @@ -# Generated by rust2rpm 18 -%bcond_with check +# Generated by rust2rpm 24 +%bcond_without check %global debug_package %{nil} %global crate bstr -Name: rust-%{crate} -Version: 0.2.17 +Name: rust-bstr +Version: 1.3.0 Release: %autorelease Summary: String type that is not required to be valid UTF-8 -# Upstream license specification: MIT OR Apache-2.0 -License: MIT or ASL 2.0 +License: (MIT OR Apache-2.0) AND Unicode-DFS-2016 URL: https://crates.io/crates/bstr Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# * add missing Unicode license terms to crate metadata: +# https://github.com/BurntSushi/bstr/issues/129 +Patch: bstr-fix-metadata.diff -ExclusiveArch: %{rust_arches} -%if %{__cargo_skip_build} -BuildArch: noarch -%endif - -BuildRequires: rust-packaging +BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: -String type that is not required to be valid UTF-8.} +A string type that is not required to be valid UTF-8.} %description %{_description} @@ -32,13 +30,16 @@ BuildArch: noarch %description devel %{_description} -This package contains library source intended for building other packages -which use "%{crate}" crate. +This package contains library source intended for building other packages which +use the "%{crate}" crate. %files devel -%license LICENSE-MIT LICENSE-APACHE COPYING src/unicode/data/LICENSE-UNICODE -%doc README.md -%{cargo_registry}/%{crate}-%{version_no_tilde}/ +%license %{crate_instdir}/COPYING +%license %{crate_instdir}/LICENSE-APACHE +%license %{crate_instdir}/LICENSE-MIT +%license %{crate_instdir}/src/unicode/data/LICENSE-UNICODE +%doc %{crate_instdir}/README.md +%{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} @@ -46,35 +47,23 @@ BuildArch: noarch %description -n %{name}+default-devel %{_description} -This package contains library source intended for building other packages -which use "default" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml -%package -n %{name}+lazy_static-devel +%package -n %{name}+alloc-devel Summary: %{summary} BuildArch: noarch -%description -n %{name}+lazy_static-devel %{_description} +%description -n %{name}+alloc-devel %{_description} -This package contains library source intended for building other packages -which use "lazy_static" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "alloc" feature of the "%{crate}" crate. -%files -n %{name}+lazy_static-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml - -%package -n %{name}+regex-automata-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+regex-automata-devel %{_description} - -This package contains library source intended for building other packages -which use "regex-automata" feature of "%{crate}" crate. - -%files -n %{name}+regex-automata-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%files -n %{name}+alloc-devel +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+serde-devel Summary: %{summary} @@ -82,35 +71,11 @@ BuildArch: noarch %description -n %{name}+serde-devel %{_description} -This package contains library source intended for building other packages -which use "serde" feature of "%{crate}" crate. +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 %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml - -%package -n %{name}+serde1-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+serde1-devel %{_description} - -This package contains library source intended for building other packages -which use "serde1" feature of "%{crate}" crate. - -%files -n %{name}+serde1-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml - -%package -n %{name}+serde1-nostd-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+serde1-nostd-devel %{_description} - -This package contains library source intended for building other packages -which use "serde1-nostd" feature of "%{crate}" crate. - -%files -n %{name}+serde1-nostd-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+std-devel Summary: %{summary} @@ -118,11 +83,11 @@ BuildArch: noarch %description -n %{name}+std-devel %{_description} -This package contains library source intended for building other packages -which use "std" feature of "%{crate}" crate. +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 %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+unicode-devel Summary: %{summary} @@ -130,11 +95,11 @@ BuildArch: noarch %description -n %{name}+unicode-devel %{_description} -This package contains library source intended for building other packages -which use "unicode" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "unicode" feature of the "%{crate}" crate. %files -n %{name}+unicode-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 diff --git a/sources b/sources index 79130e1..80cff45 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (bstr-0.2.17.crate) = 883eac8210d14f89517b4dd5e25d02c97cf31602ec74498b5e186112ba0f154d47de8d1c41a8f4e5503f3b53c064e2c976b60bbfd63fc28b186bc006e00f20c2 +SHA512 (bstr-1.3.0.crate) = bacb9d8ef907853810bfa67efb670a98f76116af74161664ef11fc875f0b9f5f80423ee8af7db6a483f2c7cf70c13be3a36cbc1354698ea55405c684e9604253