From 90146b447d17f87cb181351ad15489fa5cefef58 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Sat, 6 Aug 2022 18:17:14 +0200 Subject: [PATCH] Update to version 0.15.1; Fixes RHBZ#2111568 --- .gitignore | 1 + console-fix-metadata-auto.diff | 25 +++++++++++++++++++++++++ console-fix-metadata.diff | 17 ----------------- rust-console.spec | 29 ++++++++++++++--------------- rust2rpm.conf | 3 +++ sources | 2 +- 6 files changed, 44 insertions(+), 33 deletions(-) create mode 100644 console-fix-metadata-auto.diff delete mode 100644 console-fix-metadata.diff create mode 100644 rust2rpm.conf diff --git a/.gitignore b/.gitignore index 6427c5d..33291ed 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,4 @@ /console-0.14.0.crate /console-0.14.1.crate /console-0.15.0.crate +/console-0.15.1.crate diff --git a/console-fix-metadata-auto.diff b/console-fix-metadata-auto.diff new file mode 100644 index 0000000..ef9d012 --- /dev/null +++ b/console-fix-metadata-auto.diff @@ -0,0 +1,25 @@ +--- console-0.15.1/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ console-0.15.1/Cargo.toml 1970-01-01T00:00:01+00:00 +@@ -62,22 +62,5 @@ + windows-console-colors = [ + "ansi-parsing", + "regex", +- "winapi-util", + ] + +-[target."cfg(windows)".dependencies.encode_unicode] +-version = "0.3" +- +-[target."cfg(windows)".dependencies.winapi] +-version = "0.3" +-features = [ +- "winbase", +- "winuser", +- "consoleapi", +- "processenv", +- "wincon", +-] +- +-[target."cfg(windows)".dependencies.winapi-util] +-version = "0.1.3" +-optional = true diff --git a/console-fix-metadata.diff b/console-fix-metadata.diff deleted file mode 100644 index 4d83659..0000000 --- a/console-fix-metadata.diff +++ /dev/null @@ -1,17 +0,0 @@ ---- console-0.15.0/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ console-0.15.0/Cargo.toml 2022-01-12T13:38:01.449677+00:00 -@@ -43,14 +43,3 @@ - [features] - ansi-parsing = ["regex"] - default = ["unicode-width", "ansi-parsing"] --windows-console-colors = ["ansi-parsing", "winapi-util"] --[target."cfg(windows)".dependencies.encode_unicode] --version = "0.3" -- --[target."cfg(windows)".dependencies.winapi] --version = "0.3" --features = ["winbase", "winuser", "consoleapi", "processenv", "wincon"] -- --[target."cfg(windows)".dependencies.winapi-util] --version = "0.1.3" --optional = true diff --git a/rust-console.spec b/rust-console.spec index 557f4e1..a8eeadd 100644 --- a/rust-console.spec +++ b/rust-console.spec @@ -1,25 +1,23 @@ -# Generated by rust2rpm 20 +# Generated by rust2rpm 22 %bcond_without check %global debug_package %{nil} %global crate console -Name: rust-%{crate} -Version: 0.15.0 +Name: rust-console +Version: 0.15.1 Release: %autorelease Summary: Terminal and console abstraction for Rust -# Upstream license specification: MIT License: MIT URL: https://crates.io/crates/console Source: %{crates_source} -# Initial patched metadata -# * drop windows-specific dependencies -Patch0: console-fix-metadata.diff +# Automatically generated patch to strip foreign dependencies +Patch: console-fix-metadata-auto.diff ExclusiveArch: %{rust_arches} -BuildRequires: rust-packaging +BuildRequires: rust-packaging >= 21 %global _description %{expand: Terminal and console abstraction for Rust.} @@ -36,9 +34,10 @@ This package contains library source intended for building other packages which use the "%{crate}" crate. %files devel -%license LICENSE -%doc CHANGELOG.md README.md -%{cargo_registry}/%{crate}-%{version_no_tilde}/ +%license %{crate_instdir}/LICENSE +%doc %{crate_instdir}/CHANGELOG.md +%doc %{crate_instdir}/README.md +%{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} @@ -50,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-parsing-devel Summary: %{summary} @@ -62,7 +61,7 @@ This package contains library source intended for building other packages which use the "ansi-parsing" feature of the "%{crate}" crate. %files -n %{name}+ansi-parsing-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+regex-devel Summary: %{summary} @@ -74,7 +73,7 @@ This package contains library source intended for building other packages which use the "regex" feature of the "%{crate}" crate. %files -n %{name}+regex-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+unicode-width-devel Summary: %{summary} @@ -86,7 +85,7 @@ This package contains library source intended for building other packages which use the "unicode-width" feature of the "%{crate}" crate. %files -n %{name}+unicode-width-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/rust2rpm.conf b/rust2rpm.conf new file mode 100644 index 0000000..0de1a09 --- /dev/null +++ b/rust2rpm.conf @@ -0,0 +1,3 @@ +[DEFAULT] +unwanted-features = + windows-console-colors diff --git a/sources b/sources index 17f2729..9e34068 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (console-0.15.0.crate) = 70bd6abfafa533903f273ec3b34da6783856bd1abedaf139fddafac0dbb03fa9154f8e1e1bef01fd8de3c53100bbaa93313518c42f8ce51217c23ef34d3f9d62 +SHA512 (console-0.15.1.crate) = af00a4c8c7ffdd4e6f6c638b52dd4e829b90235b63256215ce04ffc9e3fec8384a032ca664fc4f00a912ce6b5db04990cdf7f60873fe657bf99e811525acc8c2