From 02034baae39ef15a32e2d4d1d6d84dcfc1dd134b Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Sun, 4 Dec 2022 15:12:55 +0100 Subject: [PATCH] Update to version 0.4.4; Fixes RHBZ#2133310 --- .gitignore | 1 + num-format-fix-metadata-auto.diff | 29 +++++++++ num-format-fix-metadata.diff | 50 ---------------- rust-num-format.spec | 99 +++++++++++++++---------------- sources | 2 +- 5 files changed, 78 insertions(+), 103 deletions(-) create mode 100644 num-format-fix-metadata-auto.diff delete mode 100644 num-format-fix-metadata.diff diff --git a/.gitignore b/.gitignore index b564878..dc36d8c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /num-format-0.4.0.crate +/num-format-0.4.4.crate diff --git a/num-format-fix-metadata-auto.diff b/num-format-fix-metadata-auto.diff new file mode 100644 index 0000000..6758fc1 --- /dev/null +++ b/num-format-fix-metadata-auto.diff @@ -0,0 +1,29 @@ +--- num-format-0.4.4/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ num-format-0.4.4/Cargo.toml 1970-01-01T00:00:01+00:00 +@@ -86,10 +86,7 @@ + "encoding_rs", + "lazy_static", + "libc", +- "num-format-windows", + "std", +- "widestring", +- "winapi/winnls", + ] + + [target."cfg(unix)".dependencies.cfg-if] +@@ -104,15 +101,3 @@ + version = "0.2.134" + optional = true + +-[target."cfg(windows)".dependencies.num-format-windows] +-version = "0.4.4" +-optional = true +- +-[target."cfg(windows)".dependencies.widestring] +-version = "1.0.2" +-optional = true +- +-[target."cfg(windows)".dependencies.winapi] +-version = "0.3.9" +-features = ["winnls"] +-optional = true diff --git a/num-format-fix-metadata.diff b/num-format-fix-metadata.diff deleted file mode 100644 index c367f9b..0000000 --- a/num-format-fix-metadata.diff +++ /dev/null @@ -1,50 +0,0 @@ ---- num-format-0.4.0/Cargo.toml 1970-01-01T00:00:00+00:00 -+++ num-format-0.4.0/Cargo.toml 2021-11-18T18:07:59.466061+00:00 -@@ -25,7 +25,7 @@ - license = "MIT/Apache-2.0" - repository = "https://github.com/bcmyers/num-format" - [dependencies.arrayvec] --version = "0.4" -+version = "0.5" - default-features = false - - [dependencies.itoa] -@@ -38,7 +38,7 @@ - optional = true - - [dependencies.num-bigint] --version = "0.2" -+version = "0.4" - optional = true - - [dependencies.serde] -@@ -61,8 +61,8 @@ - default = ["std"] - std = ["arrayvec/default", "itoa/default", "itoa/i128"] - with-num-bigint = ["num-bigint", "std"] --with-serde = ["arrayvec/serde-1", "serde/derive"] --with-system-locale = ["cfg-if", "encoding_rs", "lazy_static", "libc", "num-format-windows", "std", "widestring", "winapi/winnls"] -+with-serde = ["arrayvec/serde", "serde/derive"] -+with-system-locale = ["cfg-if", "encoding_rs", "lazy_static", "libc", "std"] - [target."cfg(unix)".dependencies.cfg-if] - version = "0.1" - optional = true -@@ -74,18 +74,6 @@ - [target."cfg(unix)".dependencies.libc] - version = "0.2" - optional = true --[target."cfg(windows)".dependencies.num-format-windows] --version = "0.3" --optional = true -- --[target."cfg(windows)".dependencies.widestring] --version = "0.4" --optional = true -- --[target."cfg(windows)".dependencies.winapi] --version = "0.3" --features = ["winnls"] --optional = true - [badges.maintenance] - status = "actively-developed" - diff --git a/rust-num-format.spec b/rust-num-format.spec index cebf691..737fbb8 100644 --- a/rust-num-format.spec +++ b/rust-num-format.spec @@ -1,28 +1,22 @@ -# Generated by rust2rpm 18 +# Generated by rust2rpm 23 %bcond_without check %global debug_package %{nil} %global crate num-format -Name: rust-%{crate} -Version: 0.4.0 +Name: rust-num-format +Version: 0.4.4 Release: %autorelease -Summary: Rust crate for producing string-representations of numbers, formatted according to international standards +Summary: String representations of numbers, formatted according to international standards # Upstream license specification: MIT/Apache-2.0 -License: MIT or ASL 2.0 +License: MIT OR Apache-2.0 URL: https://crates.io/crates/num-format Source: %{crates_source} -# Initial patched metadata -# Bump arrayvec to 0.5, num-bigint to 0.4 and drop Windows dependencies -Patch0: num-format-fix-metadata.diff +# Automatically generated patch to strip foreign dependencies +Patch: num-format-fix-metadata-auto.diff -ExclusiveArch: %{rust_arches} -%if %{__cargo_skip_build} -BuildArch: noarch -%endif - -BuildRequires: rust-packaging +BuildRequires: rust-packaging >= 21 %global _description %{expand: Rust crate for producing string-representations of numbers, formatted according @@ -36,13 +30,14 @@ 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.tpl 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} @@ -50,11 +45,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}+cfg-if-devel Summary: %{summary} @@ -62,11 +57,11 @@ BuildArch: noarch %description -n %{name}+cfg-if-devel %{_description} -This package contains library source intended for building other packages -which use "cfg-if" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "cfg-if" feature of the "%{crate}" crate. %files -n %{name}+cfg-if-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+encoding_rs-devel Summary: %{summary} @@ -74,11 +69,11 @@ BuildArch: noarch %description -n %{name}+encoding_rs-devel %{_description} -This package contains library source intended for building other packages -which use "encoding_rs" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "encoding_rs" feature of the "%{crate}" crate. %files -n %{name}+encoding_rs-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+lazy_static-devel Summary: %{summary} @@ -86,11 +81,11 @@ BuildArch: noarch %description -n %{name}+lazy_static-devel %{_description} -This package contains library source intended for building other packages -which use "lazy_static" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "lazy_static" feature of the "%{crate}" crate. %files -n %{name}+lazy_static-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+libc-devel Summary: %{summary} @@ -98,11 +93,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}+num-bigint-devel Summary: %{summary} @@ -110,11 +105,11 @@ BuildArch: noarch %description -n %{name}+num-bigint-devel %{_description} -This package contains library source intended for building other packages -which use "num-bigint" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "num-bigint" feature of the "%{crate}" crate. %files -n %{name}+num-bigint-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+serde-devel Summary: %{summary} @@ -122,11 +117,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} @@ -134,11 +129,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 %package -n %{name}+with-num-bigint-devel Summary: %{summary} @@ -146,11 +141,11 @@ BuildArch: noarch %description -n %{name}+with-num-bigint-devel %{_description} -This package contains library source intended for building other packages -which use "with-num-bigint" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "with-num-bigint" feature of the "%{crate}" crate. %files -n %{name}+with-num-bigint-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+with-serde-devel Summary: %{summary} @@ -158,11 +153,11 @@ BuildArch: noarch %description -n %{name}+with-serde-devel %{_description} -This package contains library source intended for building other packages -which use "with-serde" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "with-serde" feature of the "%{crate}" crate. %files -n %{name}+with-serde-devel -%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%ghost %{crate_instdir}/Cargo.toml %package -n %{name}+with-system-locale-devel Summary: %{summary} @@ -170,11 +165,11 @@ BuildArch: noarch %description -n %{name}+with-system-locale-devel %{_description} -This package contains library source intended for building other packages -which use "with-system-locale" feature of "%{crate}" crate. +This package contains library source intended for building other packages which +use the "with-system-locale" feature of the "%{crate}" crate. %files -n %{name}+with-system-locale-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/sources b/sources index 4f7b9d3..a3d04c5 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (num-format-0.4.0.crate) = 20f6a02dff0759f5e4cf7aea7e877a6ccb088b81f4c30dcee2b565ee91f8f2d25d9c1c65f5e823f5c7f2d9a36851396865ee1a6ec9264352b8ab3481783dbd4c +SHA512 (num-format-0.4.4.crate) = 4bfffce4b0b24a49cf3b8617bba0213769c9bbbdf111801915c2c6b524a8c54ae728b2e8f0901d367ec1d5a4129e9d76597f5df1c3bfd65459a02b0dcc84eedc