From e83656572f3599b7967fb141d9b3fea7e120af76 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Fri, 30 Sep 2022 15:35:26 +0200 Subject: [PATCH] skip a test that fails with tzdata 2022b and newer --- rust-tzfile.spec | 38 +++++++++++++++++++++----------------- tzfile-fix-metadata.diff | 11 +++++++++++ 2 files changed, 32 insertions(+), 17 deletions(-) create mode 100644 tzfile-fix-metadata.diff diff --git a/rust-tzfile.spec b/rust-tzfile.spec index 99581aa..7478694 100644 --- a/rust-tzfile.spec +++ b/rust-tzfile.spec @@ -1,25 +1,24 @@ -# Generated by rust2rpm 17 +# Generated by rust2rpm 22 %bcond_without check %global debug_package %{nil} %global crate tzfile -Name: rust-%{crate} +Name: rust-tzfile Version: 0.1.3 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Chrono::TimeZone implementation using system tz database -# Upstream license specification: MIT License: MIT URL: https://crates.io/crates/tzfile Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# * drop unused, benchmark-only criterion dev-dependency to speed up builds +Patch: tzfile-fix-metadata.diff ExclusiveArch: %{rust_arches} -%if %{__cargo_skip_build} -BuildArch: noarch -%endif -BuildRequires: rust-packaging +BuildRequires: rust-packaging >= 21 %global _description %{expand: Chrono::TimeZone implementation using system tz database.} @@ -32,13 +31,13 @@ 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 -%{cargo_registry}/%{crate}-%{version_no_tilde}/ +%license %{crate_instdir}/LICENSE.txt +%doc %{crate_instdir}/README.md +%{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} @@ -46,11 +45,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 %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 @@ -67,10 +66,15 @@ which use "default" feature of "%{crate}" crate. %if %{with check} %check -%cargo_test +# * skip test that fails with tzdata 2022b and newer: +# https://github.com/kennytm/tzfile/issues/8 +%cargo_test -- -- --skip chrono_tz_tests::second_offsets %endif %changelog +* Fri Sep 30 2022 Fabio Valentini - 0.1.3-5 +- Skip a test that fails with tzdata 2022b and newer. + * Sat Jul 23 2022 Fedora Release Engineering - 0.1.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/tzfile-fix-metadata.diff b/tzfile-fix-metadata.diff new file mode 100644 index 0000000..19f4060 --- /dev/null +++ b/tzfile-fix-metadata.diff @@ -0,0 +1,11 @@ +--- tzfile-0.1.3/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ tzfile-0.1.3/Cargo.toml 2022-09-30T13:33:27.757938+00:00 +@@ -34,8 +34,5 @@ + [dev-dependencies.chrono-tz] + version = "0.5" + +-[dev-dependencies.criterion] +-version = "0.3" +- + [dev-dependencies.lazy_static] + version = "1.1"