From d5660bfd920d6fe356da449dc8a610294908a19b Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Mon, 30 Jan 2023 16:14:22 +0100 Subject: [PATCH] Normalize dependencies to not be stricter than semver-compatibility --- rust-simplelog.spec | 32 +++++++++++++++++--------------- simplelog-fix-metadata.diff | 21 +++++++++++++++++++++ 2 files changed, 38 insertions(+), 15 deletions(-) create mode 100644 simplelog-fix-metadata.diff diff --git a/rust-simplelog.spec b/rust-simplelog.spec index a196f67..14028ab 100644 --- a/rust-simplelog.spec +++ b/rust-simplelog.spec @@ -1,22 +1,22 @@ -# Generated by rust2rpm 20 +# Generated by rust2rpm 23 %bcond_without check %global debug_package %{nil} %global crate simplelog -Name: rust-%{crate} +Name: rust-simplelog Version: 0.11.2 Release: %autorelease Summary: Simple and easy-to-use logging facility for Rust's log crate -# Upstream license specification: MIT OR Apache-2.0 -License: MIT or ASL 2.0 +License: MIT OR Apache-2.0 URL: https://crates.io/crates/simplelog Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# * normalize dependencies to not be stricter than semver-compatibility +Patch: simplelog-fix-metadata.diff -ExclusiveArch: %{rust_arches} - -BuildRequires: rust-packaging +BuildRequires: rust-packaging >= 21 %global _description %{expand: Simple and easy-to-use logging facility for Rust's log crate.} @@ -33,9 +33,11 @@ This package contains library source intended for building other packages which use the "%{crate}" crate. %files devel -%license LICENSE.APACHE2 LICENSE.MIT -%doc CHANGELOG.md README.md -%{cargo_registry}/%{crate}-%{version_no_tilde}/ +%license %{crate_instdir}/LICENSE.APACHE2 +%license %{crate_instdir}/LICENSE.MIT +%doc %{crate_instdir}/CHANGELOG.md +%doc %{crate_instdir}/README.md +%{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} @@ -47,7 +49,7 @@ 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}+ansi_term-devel Summary: %{summary} @@ -59,7 +61,7 @@ This package contains library source intended for building other packages which use the "ansi_term" feature of the "%{crate}" crate. %files -n %{name}+ansi_term-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+paris-devel Summary: %{summary} @@ -71,7 +73,7 @@ This package contains library source intended for building other packages which use the "paris" feature of the "%{crate}" crate. %files -n %{name}+paris-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+termcolor-devel Summary: %{summary} @@ -83,7 +85,7 @@ This package contains library source intended for building other packages which use the "termcolor" feature of the "%{crate}" crate. %files -n %{name}+termcolor-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+test-devel Summary: %{summary} @@ -95,7 +97,7 @@ This package contains library source intended for building other packages which use the "test" feature of the "%{crate}" crate. %files -n %{name}+test-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/simplelog-fix-metadata.diff b/simplelog-fix-metadata.diff new file mode 100644 index 0000000..9000ac3 --- /dev/null +++ b/simplelog-fix-metadata.diff @@ -0,0 +1,21 @@ +--- simplelog-0.11.2/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ simplelog-0.11.2/Cargo.toml 2023-01-30T15:13:14.000938+00:00 +@@ -29,15 +29,15 @@ + version = "0.4.1" + + [dependencies.log] +-version = "0.4.*" ++version = "0.4" + features = ["std"] + + [dependencies.paris] +-version = "~1.5" ++version = "1.5" + optional = true + + [dependencies.termcolor] +-version = "1.1.*" ++version = "1.1" + optional = true + + [features]