From d15ec0acb7b58c888490d99cd3a689e862563dbc Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Wed, 5 Oct 2022 14:50:30 +0200 Subject: [PATCH] Update to version 0.1.10; Fixes RHBZ#2126578 --- .gitignore | 1 + rust-unicode-width.spec | 50 ++++++++++++++++----------------- rust2rpm.conf | 6 ++++ sources | 2 +- unicode-width-fix-metadata.diff | 44 +++++++---------------------- 5 files changed, 42 insertions(+), 61 deletions(-) create mode 100644 rust2rpm.conf diff --git a/.gitignore b/.gitignore index da4b6cc..ed4db53 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /unicode-width-0.1.7.crate /unicode-width-0.1.8.crate /unicode-width-0.1.9.crate +/unicode-width-0.1.10.crate diff --git a/rust-unicode-width.spec b/rust-unicode-width.spec index ab4aac8..966d44b 100644 --- a/rust-unicode-width.spec +++ b/rust-unicode-width.spec @@ -1,29 +1,25 @@ -# Generated by rust2rpm 18 +# Generated by rust2rpm 22 %bcond_without check %global debug_package %{nil} %global crate unicode-width -Name: rust-%{crate} -Version: 0.1.9 +Name: rust-unicode-width +Version: 0.1.10 Release: %autorelease Summary: Determine displayed width of `char` and `str` types # Upstream license specification: MIT/Apache-2.0 -License: MIT or ASL 2.0 +License: MIT OR Apache-2.0 URL: https://crates.io/crates/unicode-width Source: %{crates_source} -# Initial patched metadata -# * Exclude more unneeded files -# * Drop dependencies on compiler internals -Patch0: unicode-width-fix-metadata.diff +# Manually created patch for downstream crate metadata changes +# * exclude scripts that are only useful for upstream development +Patch: unicode-width-fix-metadata.diff ExclusiveArch: %{rust_arches} -%if %{__cargo_skip_build} -BuildArch: noarch -%endif -BuildRequires: rust-packaging +BuildRequires: rust-packaging >= 21 %global _description %{expand: Determine displayed width of `char` and `str` types according to Unicode @@ -37,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 COPYRIGHT -%doc README.md -%{cargo_registry}/%{crate}-%{version_no_tilde}/ +%license %{crate_instdir}/COPYRIGHT +%license %{crate_instdir}/LICENSE-APACHE +%license %{crate_instdir}/LICENSE-MIT +%doc %{crate_instdir}/README.md +%{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} @@ -51,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}+bench-devel Summary: %{summary} @@ -63,11 +61,11 @@ BuildArch: noarch %description -n %{name}+bench-devel %{_description} -This package contains library source intended for building other packages -which use "bench" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "bench" feature of the "%{crate}" crate. %files -n %{name}+bench-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+no_std-devel Summary: %{summary} @@ -75,11 +73,11 @@ BuildArch: noarch %description -n %{name}+no_std-devel %{_description} -This package contains library source intended for building other packages -which use "no_std" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "no_std" feature of the "%{crate}" crate. %files -n %{name}+no_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/rust2rpm.conf b/rust2rpm.conf new file mode 100644 index 0000000..622111c --- /dev/null +++ b/rust2rpm.conf @@ -0,0 +1,6 @@ +[DEFAULT] +unwanted-features = + compiler_builtins + core + std + rustc-dep-of-std diff --git a/sources b/sources index 3ed651a..7829c6d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (unicode-width-0.1.9.crate) = 0f5ec46c57e3b5e50cb8430c89db8d9c129e80ca11a9c398b5312bfe95001e19ca3efbfeb01c3ac09c4ce7e26c6ee1f352f7e114ecef78cefd68c54d2d50f5f4 +SHA512 (unicode-width-0.1.10.crate) = 9836a8d489d18ea1ecfe1957ed6d5da7dce825e138cd1848aef093fa8d2eb83fcf01eabb1a2446df4f5ede4e67316e9e81b5d58b59d4e8c5d67870e8fa5dca3b diff --git a/unicode-width-fix-metadata.diff b/unicode-width-fix-metadata.diff index 97cdc64..8539b07 100644 --- a/unicode-width-fix-metadata.diff +++ b/unicode-width-fix-metadata.diff @@ -1,34 +1,10 @@ ---- unicode-width-0.1.9/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ unicode-width-0.1.9/Cargo.toml 2021-09-27T18:09:03.420843+00:00 -@@ -13,7 +13,7 @@ - name = "unicode-width" - version = "0.1.9" - authors = ["kwantam ", "Manish Goregaokar "] --exclude = ["target/*", "Cargo.lock"] -+exclude = ["target/*", "Cargo.lock", "/scripts/*"] - description = "Determine displayed width of `char` and `str` types\naccording to Unicode Standard Annex #11 rules.\n" - homepage = "https://github.com/unicode-rs/unicode-width" - documentation = "https://unicode-rs.github.io/unicode-width" -@@ -21,22 +21,8 @@ - keywords = ["text", "width", "unicode"] - license = "MIT/Apache-2.0" - repository = "https://github.com/unicode-rs/unicode-width" --[dependencies.compiler_builtins] --version = "0.1" --optional = true -- --[dependencies.core] --version = "1.0" --optional = true --package = "rustc-std-workspace-core" -- --[dependencies.std] --version = "1.0" --optional = true --package = "rustc-std-workspace-std" - - [features] - bench = [] - default = [] - no_std = [] --rustc-dep-of-std = ["std", "core", "compiler_builtins"] +--- unicode-width-0.1.10/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ unicode-width-0.1.10/Cargo.toml 2022-10-05T12:49:14.698922+00:00 +@@ -19,6 +19,7 @@ + exclude = [ + "target/*", + "Cargo.lock", ++ "/scripts/*", + ] + description = """ + Determine displayed width of `char` and `str` types