From bc209240afeb5e2ccfaa9f6a231efca724ee82db Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Fri, 2 Sep 2022 15:01:28 +0200 Subject: [PATCH] Update to version 0.4.7; Fixes RHBZ#2121757 --- .gitignore | 1 + rust-socket2.spec | 27 +++++++++++++-------------- socket2-fix-metadata-auto.diff | 13 +++++++++++++ socket2-fix-metadata.diff | 9 --------- sources | 2 +- 5 files changed, 28 insertions(+), 24 deletions(-) create mode 100644 socket2-fix-metadata-auto.diff delete mode 100644 socket2-fix-metadata.diff diff --git a/.gitignore b/.gitignore index 884fa03..5f0002e 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ /socket2-0.4.2.crate /socket2-0.4.3.crate /socket2-0.4.4.crate +/socket2-0.4.7.crate diff --git a/rust-socket2.spec b/rust-socket2.spec index c0a747a..ef0e711 100644 --- a/rust-socket2.spec +++ b/rust-socket2.spec @@ -1,25 +1,23 @@ -# Generated by rust2rpm 20 +# Generated by rust2rpm 22 %bcond_without check %global debug_package %{nil} %global crate socket2 -Name: rust-%{crate} -Version: 0.4.4 +Name: rust-socket2 +Version: 0.4.7 Release: %autorelease Summary: Utilities for handling networking sockets -# 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/socket2 Source: %{crates_source} -# Initial patched metadata -# * drop windows-specific dependencies -Patch0: socket2-fix-metadata.diff +# Automatically generated patch to strip foreign dependencies +Patch: socket2-fix-metadata-auto.diff ExclusiveArch: %{rust_arches} -BuildRequires: rust-packaging +BuildRequires: rust-packaging >= 21 %global _description %{expand: Utilities for handling networking sockets with a maximal amount of @@ -37,9 +35,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} @@ -51,7 +50,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}+all-devel Summary: %{summary} @@ -63,7 +62,7 @@ This package contains library source intended for building other packages which use the "all" feature of the "%{crate}" crate. %files -n %{name}+all-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/socket2-fix-metadata-auto.diff b/socket2-fix-metadata-auto.diff new file mode 100644 index 0000000..82f9220 --- /dev/null +++ b/socket2-fix-metadata-auto.diff @@ -0,0 +1,13 @@ +--- socket2-0.4.7/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ socket2-0.4.7/Cargo.toml 1970-01-01T00:00:01+00:00 +@@ -59,10 +59,3 @@ + [target."cfg(unix)".dependencies.libc] + version = "0.2.124" + +-[target."cfg(windows)".dependencies.winapi] +-version = "0.3.9" +-features = [ +- "handleapi", +- "ws2ipdef", +- "ws2tcpip", +-] diff --git a/socket2-fix-metadata.diff b/socket2-fix-metadata.diff deleted file mode 100644 index 1390b06..0000000 --- a/socket2-fix-metadata.diff +++ /dev/null @@ -1,9 +0,0 @@ ---- socket2-0.4.4/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ socket2-0.4.4/Cargo.toml 2022-02-09T22:21:14.300251+00:00 -@@ -34,6 +34,3 @@ - all = [] - [target."cfg(unix)".dependencies.libc] - version = "0.2.114" --[target."cfg(windows)".dependencies.winapi] --version = "0.3.9" --features = ["handleapi", "ws2ipdef", "ws2tcpip"] diff --git a/sources b/sources index e7bd610..42f6588 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (socket2-0.4.4.crate) = 6624fb9b933763c22e6114a8f72c6af0969912717017dd5b13f1b5df19faa1b160376c12e8c8023c435281f6a7864e802f3c4c535de8a345fe206652104f2cd5 +SHA512 (socket2-0.4.7.crate) = 44487f2de30cd327cad1af31ad36aaaa0bf10c33b5c23b024ada8d7e41d064fb2adbc9edb14aa8aa1eba679d8530c373c7187fc68d9709ae736a5c1a2cf37088