From 47b3e91c584efe6fb6ed93c67dc43afbe209f3bb Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Tue, 21 Feb 2023 12:37:48 +0100 Subject: [PATCH] Update to version 2.0.8; Fixes RHBZ#2136580 --- .gitignore | 1 + README.md | 3 -- assert_cmd-fix-metadata.diff | 40 +++++++++++-------------- rust-assert_cmd.spec | 57 ++++++++++++++++++++++++------------ sources | 2 +- 5 files changed, 57 insertions(+), 46 deletions(-) delete mode 100644 README.md diff --git a/.gitignore b/.gitignore index 07b93b6..daf7e0b 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /assert_cmd-1.0.8.crate /assert_cmd-2.0.2.crate /assert_cmd-2.0.4.crate +/assert_cmd-2.0.8.crate diff --git a/README.md b/README.md deleted file mode 100644 index bb8b90d..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-assert_cmd - -The rust-assert_cmd package \ No newline at end of file diff --git a/assert_cmd-fix-metadata.diff b/assert_cmd-fix-metadata.diff index 4d1216d..487ef6d 100644 --- a/assert_cmd-fix-metadata.diff +++ b/assert_cmd-fix-metadata.diff @@ -1,26 +1,20 @@ ---- assert_cmd-2.0.4/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ assert_cmd-2.0.4/Cargo.toml 2022-01-26T23:42:19.881236+00:00 -@@ -58,10 +58,6 @@ - [dependencies.bstr] - version = "0.2.14" +--- assert_cmd-2.0.8/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ assert_cmd-2.0.8/Cargo.toml 2023-02-20T15:53:29.223933+00:00 +@@ -41,6 +41,7 @@ + categories = ["development-tools::testing"] + license = "MIT OR Apache-2.0" + repository = "https://github.com/assert-rs/assert_cmd.git" ++autobins = false --[dependencies.concolor] --version = "0.0.8" --optional = true + [[package.metadata.release.pre-release-replacements]] + file = "CHANGELOG.md" +@@ -76,9 +77,6 @@ + + [Unreleased]: https://github.com/assert-rs/assert_cmd/compare/{{tag_name}}...HEAD""" + exactly = 1 - - [dependencies.doc-comment] - version = "0.3" - -@@ -79,12 +75,5 @@ - [dependencies.wait-timeout] - version = "0.2.0" +-[[bin]] +-name = "bin_fixture" --[dependencies.yansi] --version = "0.5.0" --optional = true - [dev-dependencies.escargot] - version = "0.5" -- --[features] --color = ["yansi", "concolor/std", "predicates/color"] --color-auto = ["color", "concolor/auto"] + [dependencies.bstr] + version = "1.0.1" diff --git a/rust-assert_cmd.spec b/rust-assert_cmd.spec index 2303579..b1c4cbd 100644 --- a/rust-assert_cmd.spec +++ b/rust-assert_cmd.spec @@ -1,28 +1,22 @@ -# Generated by rust2rpm 20 +# Generated by rust2rpm 24 %bcond_without check %global debug_package %{nil} -# don't ship an internal executable that is used only by integration tests -%global __cargo_is_bin() false - %global crate assert_cmd -Name: rust-%{crate} -Version: 2.0.4 +Name: rust-assert_cmd +Version: 2.0.8 Release: %autorelease Summary: Test CLI Applications -# 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/assert_cmd Source: %{crates_source} -# Initial patched metadata -# * drop color features with missing dependencies (yansi, concolor) -Patch0: assert_cmd-fix-metadata.diff - -ExclusiveArch: %{rust_arches} +# Manually created patch for downstream crate metadata changes +# * prevent binary that is only used by integration tests from being shipped +Patch: assert_cmd-fix-metadata.diff -BuildRequires: rust-packaging +BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: Test CLI Applications.} @@ -39,9 +33,10 @@ This package contains library source intended for building other packages which use the "%{crate}" crate. %files devel -%license LICENSE-APACHE LICENSE-MIT -%doc README.md -%{cargo_registry}/%{crate}-%{version_no_tilde}/ +%license %{crate_instdir}/LICENSE-APACHE +%license %{crate_instdir}/LICENSE-MIT +%doc %{crate_instdir}/README.md +%{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} @@ -53,7 +48,31 @@ 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}+color-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+color-devel %{_description} + +This package contains library source intended for building other packages which +use the "color" feature of the "%{crate}" crate. + +%files -n %{name}+color-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+color-auto-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+color-auto-devel %{_description} + +This package contains library source intended for building other packages which +use the "color-auto" feature of the "%{crate}" crate. + +%files -n %{name}+color-auto-devel +%ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 @@ -70,7 +89,7 @@ use the "default" feature of the "%{crate}" crate. %if %{with check} %check -%cargo_test -- -- --skip mod_example +%cargo_test %endif %changelog diff --git a/sources b/sources index 12d718e..333fd22 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (assert_cmd-2.0.4.crate) = c389e0210153e9a6ccbba4dbc6a6c7a23533e5fe76e717dbc36415be2adbabfbc0de33a2e6d05e3d70779b7a278580edba400c688c9a6b446403b59a78d93720 +SHA512 (assert_cmd-2.0.8.crate) = 886d789af9fe7f8155d393e2742c7982d5c0bb8d44a09f66e5552faed2effcedd000d567f9f00e08ad6d7c17fac9374d7a234ba001f38c9cf444ee41dbe07428