diff --git a/.gitignore b/.gitignore index 71dacda..dd2ccb8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /skeptic-0.13.4.crate /skeptic-0.13.5.crate /skeptic-0.13.6.crate +/skeptic-0.13.7.crate diff --git a/0001-port-to-cargo_metadata-0.15.patch b/0001-port-to-cargo_metadata-0.15.patch new file mode 100644 index 0000000..1429304 --- /dev/null +++ b/0001-port-to-cargo_metadata-0.15.patch @@ -0,0 +1,40 @@ +From df60bb467d13d6d1d04d302bc5c0c4b3ce955789 Mon Sep 17 00:00:00 2001 +From: Fabio Valentini +Date: Sat, 20 May 2023 17:24:33 +0200 +Subject: [PATCH] port to cargo_metadata 0.15 + +--- + src/rt.rs | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/rt.rs b/src/rt.rs +index 4c59754..7d4b9c5 100644 +--- a/src/rt.rs ++++ b/src/rt.rs +@@ -5,9 +5,9 @@ use std::ffi::OsStr; + use std::fs; + use std::path::{Path, PathBuf}; + use std::process::Command; +-use std::str::FromStr; + use std::time::SystemTime; + ++use cargo_metadata::Edition; + use error_chain::error_chain; + use walkdir::WalkDir; + +@@ -76,10 +76,10 @@ fn handle_test( + .packages + .iter() + .map(|package| &package.edition) +- .max_by_key(|edition| u64::from_str(edition).unwrap()) ++ .max_by_key(|edition| *edition) + .unwrap() + .clone(); +- if edition != "2015" { ++ if edition != Edition::E2015 { + cmd.arg(format!("--edition={}", edition)); + } + +-- +2.40.1 + diff --git a/README.md b/README.md deleted file mode 100644 index 3409085..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-skeptic - -The rust-skeptic package \ No newline at end of file diff --git a/rust-skeptic.spec b/rust-skeptic.spec index d6c2b16..aca4bc2 100644 --- a/rust-skeptic.spec +++ b/rust-skeptic.spec @@ -1,26 +1,25 @@ -# Generated by rust2rpm 16 -# * Needs test files not provided in the crate +# Generated by rust2rpm 24 +# * files required by tests are not included in published crates %bcond_with check %global debug_package %{nil} %global crate skeptic -Name: rust-%{crate} -Version: 0.13.6 +Name: rust-skeptic +Version: 0.13.7 Release: %autorelease Summary: Test your Rust markdown documentation via Cargo # Upstream license specification: MIT/Apache-2.0 -License: MIT or ASL 2.0 +License: MIT OR Apache-2.0 URL: https://crates.io/crates/skeptic Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# * bump cargo_metadata dependency from ^0.14 to ^0.15 +Patch: skeptic-fix-metadata.diff +Patch: 0001-port-to-cargo_metadata-0.15.patch -ExclusiveArch: %{rust_arches} -%if %{__cargo_skip_build} -BuildArch: noarch -%endif - -BuildRequires: rust-packaging +BuildRequires: rust-packaging >= 21 %global _description %{expand: Test your Rust markdown documentation via Cargo.} @@ -33,12 +32,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-MIT LICENSE-APACHE -%{cargo_registry}/%{crate}-%{version_no_tilde}/ +%license %{crate_instdir}/LICENSE-APACHE +%license %{crate_instdir}/LICENSE-MIT +%{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} @@ -46,11 +46,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 diff --git a/skeptic-fix-metadata.diff b/skeptic-fix-metadata.diff new file mode 100644 index 0000000..d5405cc --- /dev/null +++ b/skeptic-fix-metadata.diff @@ -0,0 +1,11 @@ +--- skeptic-0.13.7/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ skeptic-0.13.7/Cargo.toml 2023-05-20T15:20:26.554151+00:00 +@@ -25,7 +25,7 @@ + version = "0.6" + + [dependencies.cargo_metadata] +-version = "0.14" ++version = "0.15" + + [dependencies.error-chain] + version = "0.12" diff --git a/sources b/sources index 5e211e9..00bdfa5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (skeptic-0.13.6.crate) = 9c3f5d30fa3b189fe6ab571e8161a5db6b3b4d833888aa625692d00bd3e8e8a8ad1972c989e447367bdb883552c96480ed4b27c60f6d76094f3c6ecbaf4d3e2d +SHA512 (skeptic-0.13.7.crate) = 51e1fcaa068f380f53ee43dbfbdd17967a647739468d932e1ccc97c89021fca67a7dc6f9026c4d2554c786c6c0de3a326d4e964b6695625187340da6fed9ac16