From 1de031bef0806850e160c092a2a1121dd676d0a6 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Sat, 6 Aug 2022 16:05:23 +0200 Subject: [PATCH] Update to version 0.4.20; Fixes RHBZ#2115406 --- .gitignore | 1 + ...data.diff => chrono-fix-metadata-auto.diff | 39 +++--- rust-chrono.spec | 113 ++++++++++-------- rust2rpm.conf | 7 ++ sources | 2 +- 5 files changed, 93 insertions(+), 69 deletions(-) rename chrono-fix-metadata.diff => chrono-fix-metadata-auto.diff (55%) create mode 100644 rust2rpm.conf diff --git a/.gitignore b/.gitignore index 95d01f3..381d503 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /chrono-0.4.13.crate /chrono-0.4.15.crate /chrono-0.4.19.crate +/chrono-0.4.20.crate diff --git a/chrono-fix-metadata.diff b/chrono-fix-metadata-auto.diff similarity index 55% rename from chrono-fix-metadata.diff rename to chrono-fix-metadata-auto.diff index 76a5452..eb97a2c 100644 --- a/chrono-fix-metadata.diff +++ b/chrono-fix-metadata-auto.diff @@ -1,29 +1,36 @@ ---- chrono-0.4.19/Cargo.toml 2020-09-30T15:06:24+00:00 -+++ chrono-0.4.19/Cargo.toml 2020-10-01T09:45:11.874878+00:00 -@@ -93,25 +93,12 @@ - __doctest = [] - __internal_bench = [] +--- chrono-0.4.20/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ chrono-0.4.20/Cargo.toml 1970-01-01T00:00:01+00:00 +@@ -110,7 +110,6 @@ alloc = [] --clock = ["libc", "std", "winapi"] -+clock = ["libc", "std"] - default = ["clock", "std", "oldtime"] - oldtime = ["time"] - std = [] - unstable-locales = ["pure-rust-locales", "alloc"] --wasmbind = ["wasm-bindgen", "js-sys"] + clock = [ + "std", +- "winapi", + ] + default = [ + "clock", +@@ -126,25 +125,6 @@ + ] + wasmbind = [] + -[target."cfg(all(target_arch = \"wasm32\", not(any(target_os = \"emscripten\", target_os = \"wasi\"))))".dependencies.js-sys] -version = "0.3" --optional = true - +- -[target."cfg(all(target_arch = \"wasm32\", not(any(target_os = \"emscripten\", target_os = \"wasi\"))))".dependencies.wasm-bindgen] -version = "0.2" --optional = true +- -[target."cfg(all(target_arch = \"wasm32\", not(any(target_os = \"emscripten\", target_os = \"wasi\"))))".dev-dependencies.wasm-bindgen-test] -version = "0.3" +- -[target."cfg(windows)".dependencies.winapi] -version = "0.3.0" --features = ["std", "minwinbase", "minwindef", "timezoneapi"] +-features = [ +- "std", +- "minwinbase", +- "minwindef", +- "timezoneapi", +-] -optional = true +- [badges.appveyor] repository = "chronotope/chrono" diff --git a/rust-chrono.spec b/rust-chrono.spec index 2d964d9..d60f267 100644 --- a/rust-chrono.spec +++ b/rust-chrono.spec @@ -1,29 +1,24 @@ -# Generated by rust2rpm 13 +# Generated by rust2rpm 22 %bcond_without check %global debug_package %{nil} %global crate chrono -Name: rust-%{crate} -Version: 0.4.19 +Name: rust-chrono +Version: 0.4.20 Release: %autorelease Summary: Date and time library for Rust # Upstream license specification: MIT/Apache-2.0 -License: MIT or ASL 2.0 +License: MIT OR Apache-2.0 URL: https://crates.io/crates/chrono Source: %{crates_source} -# Initial patched metadata -# * No wasm -# * No windows -Patch0: chrono-fix-metadata.diff +# Automatically generated patch to strip foreign dependencies +Patch: chrono-fix-metadata-auto.diff ExclusiveArch: %{rust_arches} -%if %{__cargo_skip_build} -BuildArch: noarch -%endif -BuildRequires: rust-packaging +BuildRequires: rust-packaging >= 21 %global _description %{expand: Date and time library for Rust.} @@ -36,13 +31,15 @@ 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.txt -%doc README.md CHANGELOG.md AUTHORS.txt -%{cargo_registry}/%{crate}-%{version_no_tilde}/ +%license %{crate_instdir}/LICENSE.txt +%doc %{crate_instdir}/AUTHORS.txt +%doc %{crate_instdir}/CHANGELOG.md +%doc %{crate_instdir}/README.md +%{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} @@ -50,11 +47,11 @@ 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}+alloc-devel Summary: %{summary} @@ -62,11 +59,11 @@ BuildArch: noarch %description -n %{name}+alloc-devel %{_description} -This package contains library source intended for building other packages -which use "alloc" 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}+alloc-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+clock-devel Summary: %{summary} @@ -74,11 +71,11 @@ BuildArch: noarch %description -n %{name}+clock-devel %{_description} -This package contains library source intended for building other packages -which use "clock" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "clock" feature of the "%{crate}" crate. %files -n %{name}+clock-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+libc-devel Summary: %{summary} @@ -86,11 +83,11 @@ BuildArch: noarch %description -n %{name}+libc-devel %{_description} -This package contains library source intended for building other packages -which use "libc" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "libc" feature of the "%{crate}" crate. %files -n %{name}+libc-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+oldtime-devel Summary: %{summary} @@ -98,11 +95,11 @@ BuildArch: noarch %description -n %{name}+oldtime-devel %{_description} -This package contains library source intended for building other packages -which use "oldtime" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "oldtime" feature of the "%{crate}" crate. %files -n %{name}+oldtime-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+pure-rust-locales-devel Summary: %{summary} @@ -110,11 +107,23 @@ BuildArch: noarch %description -n %{name}+pure-rust-locales-devel %{_description} -This package contains library source intended for building other packages -which use "pure-rust-locales" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "pure-rust-locales" feature of the "%{crate}" crate. %files -n %{name}+pure-rust-locales-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+rkyv-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+rkyv-devel %{_description} + +This package contains library source intended for building other packages which +use the "rkyv" feature of the "%{crate}" crate. + +%files -n %{name}+rkyv-devel +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+rustc-serialize-devel Summary: %{summary} @@ -122,11 +131,11 @@ BuildArch: noarch %description -n %{name}+rustc-serialize-devel %{_description} -This package contains library source intended for building other packages -which use "rustc-serialize" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "rustc-serialize" feature of the "%{crate}" crate. %files -n %{name}+rustc-serialize-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+serde-devel Summary: %{summary} @@ -134,11 +143,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 +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+std-devel Summary: %{summary} @@ -146,11 +155,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}+time-devel Summary: %{summary} @@ -158,11 +167,11 @@ BuildArch: noarch %description -n %{name}+time-devel %{_description} -This package contains library source intended for building other packages -which use "time" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "time" feature of the "%{crate}" crate. %files -n %{name}+time-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+unstable-locales-devel Summary: %{summary} @@ -170,11 +179,11 @@ BuildArch: noarch %description -n %{name}+unstable-locales-devel %{_description} -This package contains library source intended for building other packages -which use "unstable-locales" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "unstable-locales" feature of the "%{crate}" crate. %files -n %{name}+unstable-locales-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 @@ -184,10 +193,10 @@ which use "unstable-locales" feature of "%{crate}" crate. %cargo_generate_buildrequires -a %build -%cargo_build +%cargo_build -a %install -%cargo_install +%cargo_install -a %if %{with check} %check diff --git a/rust2rpm.conf b/rust2rpm.conf new file mode 100644 index 0000000..99c1e93 --- /dev/null +++ b/rust2rpm.conf @@ -0,0 +1,7 @@ +[DEFAULT] +all-features = true +unwanted-features = + criterion + __doctest + __internal_bench + wasmbind diff --git a/sources b/sources index b998391..2d715f2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (chrono-0.4.19.crate) = a119349bfc2243a249f1d18b1ae548a04b30fecb75913a56f26d1ff8c0eb53097a2674d9141e2094018191cbbc1620843fbddaf52999824e077c1157f0907980 +SHA512 (chrono-0.4.20.crate) = ac98ab1091b4acbbfd8acc4464e280e45eaff204453f9294f62e05167d403bd9062a79bd5c41c44da284b1f8606177c9b4ce0d8679709b404ddb4ba12ac3e0dc