From 0a365d8016450b1c3f06fe5937476033b6e9bf43 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Fri, 19 Aug 2022 01:12:46 +0200 Subject: [PATCH] Update to version 0.4.22; Fixes RHBZ#2116963 --- .gitignore | 1 + chrono-fix-metadata-auto.diff | 23 ++++++++++++++--------- chrono-fix-metadata.diff | 19 +++++++++++++++++++ rust-chrono.spec | 17 ++++++++++++++++- rust2rpm.conf | 1 - sources | 2 +- 6 files changed, 51 insertions(+), 12 deletions(-) create mode 100644 chrono-fix-metadata.diff diff --git a/.gitignore b/.gitignore index 381d503..e1affb1 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /chrono-0.4.15.crate /chrono-0.4.19.crate /chrono-0.4.20.crate +/chrono-0.4.22.crate diff --git a/chrono-fix-metadata-auto.diff b/chrono-fix-metadata-auto.diff index eb97a2c..fa62ec6 100644 --- a/chrono-fix-metadata-auto.diff +++ b/chrono-fix-metadata-auto.diff @@ -1,22 +1,28 @@ ---- 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 @@ +--- chrono-0.4.22/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ chrono-0.4.22/Cargo.toml 1970-01-01T00:00:01+00:00 +@@ -115,7 +115,6 @@ alloc = [] clock = [ "std", - "winapi", + "iana-time-zone", ] default = [ - "clock", -@@ -126,25 +125,6 @@ +@@ -132,30 +131,7 @@ + "alloc", ] - wasmbind = [] - + wasmbind = [ +- "wasm-bindgen", +- "js-sys", + ] +- -[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" @@ -30,7 +36,6 @@ - "timezoneapi", -] -optional = true -- + [badges.appveyor] repository = "chronotope/chrono" - diff --git a/chrono-fix-metadata.diff b/chrono-fix-metadata.diff new file mode 100644 index 0000000..a52b3f8 --- /dev/null +++ b/chrono-fix-metadata.diff @@ -0,0 +1,19 @@ +--- chrono-0.4.22/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ chrono-0.4.22/Cargo.toml 2022-08-18T23:08:52.520479+00:00 +@@ -121,7 +121,6 @@ + "clock", + "std", + "oldtime", +- "wasmbind", + ] + libc = [] + oldtime = ["time"] +@@ -130,8 +129,6 @@ + "pure-rust-locales", + "alloc", + ] +-wasmbind = [ +-] + + [badges.appveyor] + repository = "chronotope/chrono" diff --git a/rust-chrono.spec b/rust-chrono.spec index d60f267..1934843 100644 --- a/rust-chrono.spec +++ b/rust-chrono.spec @@ -5,7 +5,7 @@ %global crate chrono Name: rust-chrono -Version: 0.4.20 +Version: 0.4.22 Release: %autorelease Summary: Date and time library for Rust @@ -15,6 +15,9 @@ URL: https://crates.io/crates/chrono Source: %{crates_source} # Automatically generated patch to strip foreign dependencies Patch: chrono-fix-metadata-auto.diff +# Manually created patch for downstream crate metadata changes +# * remove wasm-specific features +Patch: chrono-fix-metadata.diff ExclusiveArch: %{rust_arches} @@ -77,6 +80,18 @@ use the "clock" feature of the "%{crate}" crate. %files -n %{name}+clock-devel %ghost %{crate_instdir}/Cargo.toml +%package -n %{name}+iana-time-zone-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+iana-time-zone-devel %{_description} + +This package contains library source intended for building other packages which +use the "iana-time-zone" feature of the "%{crate}" crate. + +%files -n %{name}+iana-time-zone-devel +%ghost %{crate_instdir}/Cargo.toml + %package -n %{name}+libc-devel Summary: %{summary} BuildArch: noarch diff --git a/rust2rpm.conf b/rust2rpm.conf index 99c1e93..5bd3730 100644 --- a/rust2rpm.conf +++ b/rust2rpm.conf @@ -4,4 +4,3 @@ unwanted-features = criterion __doctest __internal_bench - wasmbind diff --git a/sources b/sources index 2d715f2..d66e4e3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (chrono-0.4.20.crate) = ac98ab1091b4acbbfd8acc4464e280e45eaff204453f9294f62e05167d403bd9062a79bd5c41c44da284b1f8606177c9b4ce0d8679709b404ddb4ba12ac3e0dc +SHA512 (chrono-0.4.22.crate) = de856679ec16afe035176b22125a00ced532d49c8babac0a88fa5f6e4a3d9e526a34ee8bf51639653fc313a5703a202b1be013aa16fdd72a505151d7aafa7c44