diff --git a/0001-deny-warnings-considered-harmful.patch b/0001-deny-warnings-considered-harmful.patch new file mode 100644 index 0000000..b7b28c2 --- /dev/null +++ b/0001-deny-warnings-considered-harmful.patch @@ -0,0 +1,24 @@ +From 639f0aca75b0dadaedf84520bc46b87c6c3e210e Mon Sep 17 00:00:00 2001 +From: Fabio Valentini +Date: Thu, 8 Jun 2023 15:25:24 +0200 +Subject: [PATCH] deny(warnings) considered harmful + +--- + src/lib.rs | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/lib.rs b/src/lib.rs +index 22fadd5..ce843a6 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -173,7 +173,6 @@ + )] + #![doc(html_favicon_url = "https://avatars0.githubusercontent.com/u/55999857")] + #![doc(html_logo_url = "https://avatars0.githubusercontent.com/u/55999857")] +-#![doc(test(attr(deny(warnings))))] + + #[cfg(not(feature = "std"))] + extern crate alloc; +-- +2.40.1 + diff --git a/rust-time0.2.spec b/rust-time0.2.spec index 9da92cc..3c6ff78 100644 --- a/rust-time0.2.spec +++ b/rust-time0.2.spec @@ -1,32 +1,29 @@ -# Generated by rust2rpm 18 +# Generated by rust2rpm 24 %bcond_without check %global debug_package %{nil} %global crate time -Name: rust-%{crate}0.2 +Name: rust-time0.2 Version: 0.2.27 Release: %autorelease Summary: Date and time library -# 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/time Source: %{crates_source} -# Initial patched metadata +# Automatically generated patch to strip foreign dependencies +Patch: time-fix-metadata-auto.diff +# Manually created patch for downstream crate metadata changes # * drop windows- and WASM-specific dependencies -Patch0: time-fix-metadata.diff +Patch: time-fix-metadata.diff +Patch: 0001-deny-warnings-considered-harmful.patch -ExclusiveArch: %{rust_arches} -%if %{__cargo_skip_build} -BuildArch: noarch -%endif - -BuildRequires: rust-packaging +BuildRequires: rust-packaging >= 21 %global _description %{expand: -Date and time library. Fully interoperable with the standard library. Mostly -compatible with #![no_std].} +Date and time library. Fully interoperable with the standard library. +Mostly compatible with #![no_std].} %description %{_description} @@ -36,13 +33,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-MIT LICENSE-Apache -%doc README.md CHANGELOG.md -%{cargo_registry}/%{crate}-%{version_no_tilde}/ +%license %{crate_instdir}/LICENSE-Apache +%license %{crate_instdir}/LICENSE-MIT +%doc %{crate_instdir}/CHANGELOG.md +%doc %{crate_instdir}/README.md +%{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} @@ -50,11 +49,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}+deprecated-devel Summary: %{summary} @@ -62,11 +61,11 @@ BuildArch: noarch %description -n %{name}+deprecated-devel %{_description} -This package contains library source intended for building other packages -which use "deprecated" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "deprecated" feature of the "%{crate}" crate. %files -n %{name}+deprecated-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+libc-devel Summary: %{summary} @@ -74,11 +73,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}+panicking-api-devel Summary: %{summary} @@ -86,11 +85,11 @@ BuildArch: noarch %description -n %{name}+panicking-api-devel %{_description} -This package contains library source intended for building other packages -which use "panicking-api" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "panicking-api" feature of the "%{crate}" crate. %files -n %{name}+panicking-api-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+rand-devel Summary: %{summary} @@ -98,11 +97,11 @@ BuildArch: noarch %description -n %{name}+rand-devel %{_description} -This package contains library source intended for building other packages -which use "rand" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "rand" feature of the "%{crate}" crate. %files -n %{name}+rand-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+serde-devel Summary: %{summary} @@ -110,11 +109,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} @@ -122,11 +121,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 %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 diff --git a/time-fix-metadata-auto.diff b/time-fix-metadata-auto.diff new file mode 100644 index 0000000..a29019a --- /dev/null +++ b/time-fix-metadata-auto.diff @@ -0,0 +1,19 @@ +--- time-0.2.27/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ time-0.2.27/Cargo.toml 2023-06-08T13:23:54.482950+00:00 +@@ -64,15 +64,7 @@ + default = ["deprecated", "std"] + deprecated = [] + panicking-api = [] +-std = ["libc", "winapi", "stdweb", "standback/std"] +-[target."cfg(target_arch = \"wasm32\")".dependencies.stdweb] +-version = "0.4.20" +-optional = true +-default-features = false ++std = ["libc", "stdweb", "standback/std"] + [target."cfg(unix)".dependencies.libc] + version = "0.2.89" + optional = true +-[target."cfg(windows)".dependencies.winapi] +-version = "0.3.9" +-features = ["minwinbase", "minwindef", "timezoneapi"] +-optional = true diff --git a/time-fix-metadata.diff b/time-fix-metadata.diff index 74ef653..3f7b656 100644 --- a/time-fix-metadata.diff +++ b/time-fix-metadata.diff @@ -1,19 +1,11 @@ --- time-0.2.27/Cargo.toml 1970-01-01T00:00:00+00:00 -+++ time-0.2.27/Cargo.toml 2021-11-18T12:38:26.252737+00:00 -@@ -64,15 +64,7 @@ ++++ time-0.2.27/Cargo.toml 2023-06-08T13:24:21.796057+00:00 +@@ -64,7 +64,7 @@ default = ["deprecated", "std"] deprecated = [] panicking-api = [] --std = ["libc", "winapi", "stdweb", "standback/std"] --[target."cfg(target_arch = \"wasm32\")".dependencies.stdweb] --version = "0.4.20" --optional = true --default-features = false +-std = ["libc", "stdweb", "standback/std"] +std = ["libc", "standback/std"] [target."cfg(unix)".dependencies.libc] version = "0.2.89" optional = true --[target."cfg(windows)".dependencies.winapi] --version = "0.3.9" --features = ["minwinbase", "minwindef", "timezoneapi"] --optional = true