From 925aade9875c6eb247572fa14fa01cb6ab177123 Mon Sep 17 00:00:00 2001 From: MSVSphere Packaging Team Date: Fri, 27 Dec 2024 22:49:58 +0300 Subject: [PATCH] import rust-jiff-0.1.16-1.el10 --- .gitignore | 2 +- .rust-jiff.metadata | 2 +- ...ly-omit-tests-that-require-serde_yml.patch | 109 ++++++++++++++++++ SOURCES/173.patch | 22 ++++ SOURCES/jiff-fix-metadata-auto.diff | 9 +- SOURCES/jiff-fix-metadata.diff | 21 ++-- SOURCES/rust2rpm.toml | 21 +++- SPECS/rust-jiff.spec | 21 +++- 8 files changed, 185 insertions(+), 22 deletions(-) create mode 100644 SOURCES/0001-Downstream-only-omit-tests-that-require-serde_yml.patch create mode 100644 SOURCES/173.patch diff --git a/.gitignore b/.gitignore index 624e27c..8824860 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/jiff-0.1.15.crate +SOURCES/jiff-0.1.16.crate diff --git a/.rust-jiff.metadata b/.rust-jiff.metadata index 13f731f..fa32213 100644 --- a/.rust-jiff.metadata +++ b/.rust-jiff.metadata @@ -1 +1 @@ -f7e85cd1976e73b24f81f68c844731e524e9255d SOURCES/jiff-0.1.15.crate +218aa3d7610d0dfdc35628bf1d39b78bad361a48 SOURCES/jiff-0.1.16.crate diff --git a/SOURCES/0001-Downstream-only-omit-tests-that-require-serde_yml.patch b/SOURCES/0001-Downstream-only-omit-tests-that-require-serde_yml.patch new file mode 100644 index 0000000..00a7725 --- /dev/null +++ b/SOURCES/0001-Downstream-only-omit-tests-that-require-serde_yml.patch @@ -0,0 +1,109 @@ +From 684ec78f8f001e65d3778b5e8f0661d41d3c4a8a Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Thu, 26 Dec 2024 18:51:44 -0500 +Subject: [PATCH] Downstream-only: omit tests that require serde_yml + +--- + src/civil/date.rs | 2 ++ + src/civil/datetime.rs | 2 ++ + src/civil/time.rs | 2 ++ + src/signed_duration.rs | 2 ++ + src/span.rs | 2 ++ + src/timestamp.rs | 2 ++ + src/zoned.rs | 2 ++ + 7 files changed, 14 insertions(+) + +diff --git a/src/civil/date.rs b/src/civil/date.rs +index 1b413fe..039bc97 100644 +--- a/src/civil/date.rs ++++ b/src/civil/date.rs +@@ -4009,6 +4009,8 @@ mod tests { + } + } + ++ // Downstream-only: omit tests that require serde_yml ++ #[cfg(any())] + /// # `serde` deserializer compatibility test + /// + /// Serde YAML used to be unable to deserialize `jiff` types, +diff --git a/src/civil/datetime.rs b/src/civil/datetime.rs +index e1249b3..ea14006 100644 +--- a/src/civil/datetime.rs ++++ b/src/civil/datetime.rs +@@ -4280,6 +4280,8 @@ mod tests { + } + } + ++ // Downstream-only: omit tests that require serde_yml ++ #[cfg(any())] + /// # `serde` deserializer compatibility test + /// + /// Serde YAML used to be unable to deserialize `jiff` types, +diff --git a/src/civil/time.rs b/src/civil/time.rs +index c7d252b..dc8ca9f 100644 +--- a/src/civil/time.rs ++++ b/src/civil/time.rs +@@ -3363,6 +3363,8 @@ mod tests { + assert_eq!(got, expected); + } + ++ // Downstream-only: omit tests that require serde_yml ++ #[cfg(any())] + /// # `serde` deserializer compatibility test + /// + /// Serde YAML used to be unable to deserialize `jiff` types, +diff --git a/src/signed_duration.rs b/src/signed_duration.rs +index f002d7c..8e8a42b 100644 +--- a/src/signed_duration.rs ++++ b/src/signed_duration.rs +@@ -2255,6 +2255,8 @@ mod tests { + assert_eq!(None, add((i64::MIN, -1), (0, -999_999_999))); + } + ++ // Downstream-only: omit tests that require serde_yml ++ #[cfg(any())] + /// # `serde` deserializer compatibility test + /// + /// Serde YAML used to be unable to deserialize `jiff` types, +diff --git a/src/span.rs b/src/span.rs +index ebe96e5..93f8f0d 100644 +--- a/src/span.rs ++++ b/src/span.rs +@@ -6464,6 +6464,8 @@ mod tests { + } + } + ++ // Downstream-only: omit tests that require serde_yml ++ #[cfg(any())] + /// # `serde` deserializer compatibility test + /// + /// Serde YAML used to be unable to deserialize `jiff` types, +diff --git a/src/timestamp.rs b/src/timestamp.rs +index 79230b4..83c366c 100644 +--- a/src/timestamp.rs ++++ b/src/timestamp.rs +@@ -3701,6 +3701,8 @@ mod tests { + } + } + ++ // Downstream-only: omit tests that require serde_yml ++ #[cfg(any())] + /// # `serde` deserializer compatibility test + /// + /// Serde YAML used to be unable to deserialize `jiff` types, +diff --git a/src/zoned.rs b/src/zoned.rs +index 1627167..5bea022 100644 +--- a/src/zoned.rs ++++ b/src/zoned.rs +@@ -5251,6 +5251,8 @@ mod tests { + } + } + ++ // Downstream-only: omit tests that require serde_yml ++ #[cfg(any())] + /// # `serde` deserializer compatibility test + /// + /// Serde YAML used to be unable to deserialize `jiff` types, +-- +2.47.1 + diff --git a/SOURCES/173.patch b/SOURCES/173.patch new file mode 100644 index 0000000..8b4d8ac --- /dev/null +++ b/SOURCES/173.patch @@ -0,0 +1,22 @@ +From 692c9f7ebe20450269666cddeca75023c8a34a79 Mon Sep 17 00:00:00 2001 +From: "Benjamin A. Beasley" +Date: Thu, 26 Dec 2024 16:04:32 -0500 +Subject: [PATCH] Fix a small typo in CHANGELOG.md + +--- + CHANGELOG.md | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CHANGELOG.md b/CHANGELOG.md +index 6281f33..e0f1c5a 100644 +--- a/CHANGELOG.md ++++ b/CHANGELOG.md +@@ -72,7 +72,7 @@ adding duration to now: 2026-02-26T19:00:57-05:00[America/New_York] + With Jiff, you should no longer need to pull in crates like + [`humantime`](https://docs.rs/humantime) and + [`humantime-serde`](https://docs.rs/humantime-serde) +-to accomplished a similar task. ++to accomplish a similar task. + + While this new format doesn't support any kind of internationalization, the + prevalence of the `humantime` crate suggests there's a desire for something diff --git a/SOURCES/jiff-fix-metadata-auto.diff b/SOURCES/jiff-fix-metadata-auto.diff index ef95507..636457b 100644 --- a/SOURCES/jiff-fix-metadata-auto.diff +++ b/SOURCES/jiff-fix-metadata-auto.diff @@ -1,6 +1,6 @@ ---- jiff-0.1.15/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ jiff-0.1.15/Cargo.toml 2024-12-08T19:53:18.958265+00:00 -@@ -131,46 +131,22 @@ +--- jiff-0.1.16/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ jiff-0.1.16/Cargo.toml 2024-12-27T00:19:01.399220+00:00 +@@ -142,8 +142,6 @@ "tzdb-zoneinfo", ] js = [ @@ -9,7 +9,8 @@ ] logging = ["dep:log"] serde = ["dep:serde"] - std = ["alloc"] +@@ -153,38 +151,16 @@ + ] tz-system = [ "std", - "dep:windows-sys", diff --git a/SOURCES/jiff-fix-metadata.diff b/SOURCES/jiff-fix-metadata.diff index e2bc734..e02c256 100644 --- a/SOURCES/jiff-fix-metadata.diff +++ b/SOURCES/jiff-fix-metadata.diff @@ -1,15 +1,16 @@ ---- jiff-0.1.15/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ jiff-0.1.15/Cargo.toml 2024-12-08T19:53:29.866324+00:00 -@@ -85,7 +85,7 @@ - features = ["serde"] +--- jiff-0.1.16/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ jiff-0.1.16/Cargo.toml 2024-12-27T00:19:01.401220+00:00 +@@ -113,9 +113,6 @@ + [dev-dependencies.serde_json] + version = "1.0.117" - [dev-dependencies.chrono-tz] --version = "0.9.0" -+version = ">=0.9,<0.11" +-[dev-dependencies.serde_yml] +-version = "0.0.12" +- + [dev-dependencies.tabwriter] + version = "1.4.0" - [dev-dependencies.icu] - version = "1.5.0" -@@ -147,6 +147,3 @@ +@@ -161,6 +158,3 @@ ] tzdb-zoneinfo = ["std"] diff --git a/SOURCES/rust2rpm.toml b/SOURCES/rust2rpm.toml index 80541e3..1304779 100644 --- a/SOURCES/rust2rpm.toml +++ b/SOURCES/rust2rpm.toml @@ -19,7 +19,10 @@ cargo-toml-patch-comments = [ # an unconditional dependency, but given it is # target.'cfg(not(target_family = "wasm"))', manual patching is easier. "Drop dev-dependency hifitime: not packaged, and only for doctests", - "Relax chrono-tz dependency to allow building with 0.9 and 0.10", + """\ + Drop dev-dependency serde_yml: not packaged; we have patched out the tests \ + that require it\ + """, ] [[package.extra-patches]] @@ -41,6 +44,22 @@ comments = [ """, ] +[[package.extra-patches]] +number = 12 +file = "0001-Downstream-only-omit-tests-that-require-serde_yml.patch" +comments = [ + """\ + Downstream-only: Omit tests that require serde_yml.\ + """, +] + +[[package.extra-patches]] +number = 13 +file = "https://github.com/BurntSushi/jiff/pull/173.patch" +comments = [ + "Fix a small typo in CHANGELOG.md", +] + [[package.extra-patches]] number = 1009 file = "0001-EPEL9-Ignore-doctests-that-require-very-recent-Rust-.patch" diff --git a/SPECS/rust-jiff.spec b/SPECS/rust-jiff.spec index c6f5eba..622e9ec 100644 --- a/SPECS/rust-jiff.spec +++ b/SPECS/rust-jiff.spec @@ -2,7 +2,7 @@ ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: - release_number = 2; + release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} @@ -15,7 +15,7 @@ %global crate jiff Name: rust-jiff -Version: 0.1.15 +Version: 0.1.16 Release: %autorelease Summary: Date-time library that encourages you to jump into the pit of success @@ -26,13 +26,18 @@ Source: %{crates_source} Patch: jiff-fix-metadata-auto.diff # Manually created patch for downstream crate metadata changes # * Drop dev-dependency hifitime: not packaged, and only for doctests -# * Relax chrono-tz dependency to allow building with 0.9 and 0.10 +# * Drop dev-dependency serde_yml: not packaged; we have patched out the tests +# that require it Patch: jiff-fix-metadata.diff # * Downstream-only: Omit doctests that require hifitime. It is not worth # packaging it solely for a couple of tiny examples. Patch10: 0001-Downstream-only-Omit-doctests-that-require-hifitime.patch # * Downstream-only: Omit doctests that require icu. Patch11: 0001-Downstream-only-Omit-doctests-that-require-icu.patch +# * Downstream-only: Omit tests that require serde_yml. +Patch12: 0001-Downstream-only-omit-tests-that-require-serde_yml.patch +# * Fix a small typo in CHANGELOG.md +Patch13: https://github.com/BurntSushi/jiff/pull/173.patch # * EPEL9: Ignore doctests that require very recent Rust compilers # * In this crate, doctests and examples (but not the lib and integration tests) # are allowed to use Rust features from versions newer than the MSRV. It’s @@ -196,10 +201,16 @@ tomcli set Cargo.toml append package.exclude test test-wasm 'scripts/*' %endif %changelog -* Fri Dec 20 2024 MSVSphere Packaging Team - 0.1.15-2 +## START: Generated by rpmautospec +* Fri Dec 27 2024 Benjamin A. Beasley - 0.1.16-1 +- Update to 0.1.16 (close RHBZ#2334259) + +* Fri Dec 20 2024 MSVSphere Packaging Team - 0.1.15-3 - Rebuilt for MSVSphere 10 -## START: Generated by rpmautospec +* Mon Dec 09 2024 Benjamin A. Beasley - 0.1.15-3 +- Add upstream link for chrono-tz patch + * Sun Dec 08 2024 Fabio Valentini - 0.1.15-2 - Relax chrono-tz dependency to allow building with 0.9 and 0.10