From a2b4ccf51d8b1a4e9efb01bead74bd3855cea28b Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Thu, 2 Mar 2023 14:45:22 +0100 Subject: [PATCH] Drop unused features for statically linking cURL and OpenSSL --- README.md | 3 --- curl-fix-metadata-auto.diff | 19 +++++++++++++++++ curl-fix-metadata.diff | 27 ++++------------------- rust-curl.spec | 38 ++++++--------------------------- .rust2rpm.conf => rust2rpm.conf | 2 ++ 5 files changed, 31 insertions(+), 58 deletions(-) delete mode 100644 README.md create mode 100644 curl-fix-metadata-auto.diff rename .rust2rpm.conf => rust2rpm.conf (77%) diff --git a/README.md b/README.md deleted file mode 100644 index 1e85245..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-curl - -The rust-curl package \ No newline at end of file diff --git a/curl-fix-metadata-auto.diff b/curl-fix-metadata-auto.diff new file mode 100644 index 0000000..ff2bdba --- /dev/null +++ b/curl-fix-metadata-auto.diff @@ -0,0 +1,19 @@ +--- curl-0.4.44/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ curl-0.4.44/Cargo.toml 2023-03-02T13:43:53.758003+00:00 +@@ -107,16 +107,6 @@ + version = "0.9.43" + optional = true + +-[target."cfg(target_env = \"msvc\")".dependencies.schannel] +-version = "0.1.13" +- +-[target."cfg(target_env = \"msvc\")".dependencies.winapi] +-version = "0.3" +-features = [ +- "libloaderapi", +- "wincrypt", +-] +- + [badges.appveyor] + repository = "alexcrichton/curl-rust" + diff --git a/curl-fix-metadata.diff b/curl-fix-metadata.diff index e1fea4a..56bc830 100644 --- a/curl-fix-metadata.diff +++ b/curl-fix-metadata.diff @@ -1,16 +1,14 @@ --- curl-0.4.44/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ curl-0.4.44/Cargo.toml 2022-07-22T10:26:15.295988+00:00 -@@ -25,6 +25,9 @@ ++++ curl-0.4.44/Cargo.toml 2023-03-02T13:44:31.215139+00:00 +@@ -25,6 +25,7 @@ ] license = "MIT" repository = "https://github.com/alexcrichton/curl-rust" -+exclude = [ -+ "/ci/", -+] ++exclude = ["/ci/"] [[example]] name = "https" -@@ -52,10 +55,6 @@ +@@ -52,10 +53,6 @@ name = "multi-dl" path = "examples/multi-dl.rs" required-features = ["ssl"] @@ -21,20 +19,3 @@ [dependencies.curl-sys] version = "0.4.56" -@@ -107,16 +106,6 @@ - version = "0.9.43" - optional = true - --[target."cfg(target_env = \"msvc\")".dependencies.schannel] --version = "0.1.13" -- --[target."cfg(target_env = \"msvc\")".dependencies.winapi] --version = "0.3" --features = [ -- "libloaderapi", -- "wincrypt", --] -- - [badges.appveyor] - repository = "alexcrichton/curl-rust" - diff --git a/rust-curl.spec b/rust-curl.spec index 2e16c4f..12f4722 100644 --- a/rust-curl.spec +++ b/rust-curl.spec @@ -1,25 +1,23 @@ -# Generated by rust2rpm 21 +# Generated by rust2rpm 24 %bcond_without check %global debug_package %{nil} %global crate curl -Name: rust-%{crate} +Name: rust-curl Version: 0.4.44 Release: %autorelease Summary: Rust bindings to libcurl for making HTTP requests -# Upstream license specification: MIT License: MIT URL: https://crates.io/crates/curl Source: %{crates_source} -# Initial patched metadata -# * drop windows- and mac OS-specific dependencies +# Automatically generated patch to strip foreign dependencies +Patch: curl-fix-metadata-auto.diff +# Manually created patch for downstream crate metadata changes # * drop test binary that requires internet connectivity # * exclude upstream CI files -Patch0: curl-fix-metadata.diff - -ExclusiveArch: %{rust_arches} +Patch: curl-fix-metadata.diff BuildRequires: rust-packaging >= 21 @@ -150,30 +148,6 @@ use the "ssl" feature of the "%{crate}" crate. %files -n %{name}+ssl-devel %ghost %{crate_instdir}/Cargo.toml -%package -n %{name}+static-curl-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+static-curl-devel %{_description} - -This package contains library source intended for building other packages which -use the "static-curl" feature of the "%{crate}" crate. - -%files -n %{name}+static-curl-devel -%ghost %{crate_instdir}/Cargo.toml - -%package -n %{name}+static-ssl-devel -Summary: %{summary} -BuildArch: noarch - -%description -n %{name}+static-ssl-devel %{_description} - -This package contains library source intended for building other packages which -use the "static-ssl" feature of the "%{crate}" crate. - -%files -n %{name}+static-ssl-devel -%ghost %{crate_instdir}/Cargo.toml - %package -n %{name}+upkeep_7_62_0-devel Summary: %{summary} BuildArch: noarch diff --git a/.rust2rpm.conf b/rust2rpm.conf similarity index 77% rename from .rust2rpm.conf rename to rust2rpm.conf index 9ffb0a3..7633176 100644 --- a/.rust2rpm.conf +++ b/rust2rpm.conf @@ -3,4 +3,6 @@ unwanted-features = force-system-lib-on-osx mesalink rustls + static-curl + static-ssl zlib-ng-compat