From 9c59edd140b2820cece684e9a0b3cb9ab51ae712 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Thu, 29 Jul 2021 14:20:21 +0200 Subject: [PATCH] Update to version 0.4.45+curl-7.78.0; Fixes RHBZ#1936752 --- .gitignore | 1 + ...atic-curl-static-ssl-features-a-noop.patch | 41 +++++-------------- curl-sys-fix-metadata.diff | 25 +++++------ rust-curl-sys.spec | 32 +++++++++++++-- sources | 2 +- 5 files changed, 54 insertions(+), 47 deletions(-) diff --git a/.gitignore b/.gitignore index 0bb7274..6c4d4b6 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ /curl-sys-0.4.33+curl-7.71.1.crate /curl-sys-0.4.36+curl-7.71.1.crate /curl-sys-0.4.39+curl-7.74.0.crate +/curl-sys-0.4.45+curl-7.78.0.crate diff --git a/0001-Make-static-curl-static-ssl-features-a-noop.patch b/0001-Make-static-curl-static-ssl-features-a-noop.patch index 85e3cd7..3b446c2 100644 --- a/0001-Make-static-curl-static-ssl-features-a-noop.patch +++ b/0001-Make-static-curl-static-ssl-features-a-noop.patch @@ -1,48 +1,29 @@ -From 274cc7067e131d0c7e1bcdc3959bc8fbd895c942 Mon Sep 17 00:00:00 2001 -From: Igor Raits -Date: Sun, 17 May 2020 16:00:46 +0200 -Subject: [PATCH] Make static-curl/static-ssl features a noop - -Signed-off-by: Igor Raits ---- - build.rs | 33 ++++++++++++++++----------------- - 1 file changed, 16 insertions(+), 17 deletions(-) - diff --git a/build.rs b/build.rs -index 74b6a55..842ddb5 100644 +index 7b66756..16eeb1f 100644 --- a/build.rs +++ b/build.rs -@@ -19,24 +19,21 @@ fn main() { +@@ -22,22 +22,9 @@ fn main() { return println!("cargo:rustc-flags=-l curl"); } - // If the static-curl feature is disabled, probe for a system-wide libcurl. - if !cfg!(feature = "static-curl") { -- // OSX and Haiku ships libcurl by default, so we just use that version +- // OSX ships libcurl by default, so we just use that version - // so long as it has the right features enabled. -- if (target.contains("apple") || target.contains("haiku")) -- && (!cfg!(feature = "http2") || curl_config_reports_http2()) -- { -+ // OSX and Haiku ships libcurl by default, so we just use that version -+ // so long as it has the right features enabled. -+ if target.contains("apple") || target.contains("haiku") { -+ if !cfg!(feature = "http2") || curl_config_reports_http2() { - return println!("cargo:rustc-flags=-l curl"); - } -+ } - +- if target.contains("apple") && (!cfg!(feature = "http2") || curl_config_reports_http2()) { +- return println!("cargo:rustc-flags=-l curl"); +- } +- - // Next, fall back and try to use pkg-config if its available. - if windows { - if try_vcpkg() { - return; - } - } else if try_pkg_config() { -+ // Next, fall back and try to use pkg-config if its available. -+ if windows { -+ if try_vcpkg() { - return; - } -+ } else if try_pkg_config() { +- return; +- } ++ // Try to use pkg-config if its available. ++ if try_pkg_config() { + return; } diff --git a/curl-sys-fix-metadata.diff b/curl-sys-fix-metadata.diff index e99093e..3b77d46 100644 --- a/curl-sys-fix-metadata.diff +++ b/curl-sys-fix-metadata.diff @@ -1,15 +1,15 @@ ---- curl-sys-0.4.39+curl-7.74.0/Cargo.toml 2020-12-09T16:18:44+00:00 -+++ curl-sys-0.4.39+curl-7.74.0/Cargo.toml 2020-12-13T00:00:01.208983+00:00 -@@ -12,7 +12,7 @@ - +--- curl-sys-0.4.45+curl-7.78.0/Cargo.toml 1970-01-01T00:00:00+00:00 ++++ curl-sys-0.4.45+curl-7.78.0/Cargo.toml 2021-07-29T12:01:11.492825+00:00 +@@ -13,7 +13,7 @@ [package] + edition = "2018" name = "curl-sys" --version = "0.4.39+curl-7.74.0" -+version = "0.4.39" +-version = "0.4.45+curl-7.78.0" ++version = "0.4.45" authors = ["Alex Crichton "] build = "build.rs" links = "curl" -@@ -28,20 +28,6 @@ +@@ -29,20 +29,6 @@ [dependencies.libc] version = "0.2.2" @@ -30,7 +30,7 @@ [build-dependencies.cc] version = "1.0" -@@ -51,21 +37,12 @@ +@@ -52,22 +38,16 @@ [features] default = ["ssl"] force-system-lib-on-osx = [] @@ -42,16 +42,17 @@ +ssl = [] static-curl = [] -static-ssl = ["openssl-sys/vendored"] ++static-ssl = [] + upkeep_7_62_0 = [] -zlib-ng-compat = ["libz-sys/zlib-ng", "static-curl"] --[target."cfg(all(unix, not(target_os = \"macos\")))".dependencies.openssl-sys] --version = "0.9" --optional = true + [target."cfg(all(unix, not(target_os = \"macos\")))".dependencies.openssl-sys] + version = "0.9" + optional = true -[target."cfg(target_env = \"msvc\")".build-dependencies.vcpkg] -version = "0.2" -[target."cfg(windows)".dependencies.winapi] -version = "0.3" -features = ["winsock2", "ws2def"] -+static-ssl = [] [badges.appveyor] repository = "alexcrichton/curl-rust" diff --git a/rust-curl-sys.spec b/rust-curl-sys.spec index fca37e0..e5e0348 100644 --- a/rust-curl-sys.spec +++ b/rust-curl-sys.spec @@ -1,12 +1,12 @@ -# Generated by rust2rpm 16 +# Generated by rust2rpm 18 %bcond_without check %global debug_package %{nil} %global crate curl-sys -%global upstream_version 0.4.39+curl-7.74.0 +%global upstream_version 0.4.45+curl-7.78.0 Name: rust-%{crate} -Version: 0.4.39 +Version: 0.4.45 Release: %autorelease Summary: Native bindings to the libcurl library @@ -29,7 +29,6 @@ BuildArch: noarch %endif BuildRequires: rust-packaging -BuildRequires: pkgconfig(libcurl) %global _description %{expand: Native bindings to the libcurl library.} @@ -86,6 +85,18 @@ which use "http2" feature of "%{crate}" crate. %files -n %{name}+http2-devel %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%package -n %{name}+openssl-sys-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+openssl-sys-devel %{_description} + +This package contains library source intended for building other packages +which use "openssl-sys" feature of "%{crate}" crate. + +%files -n %{name}+openssl-sys-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + %package -n %{name}+protocol-ftp-devel Summary: %{summary} BuildArch: noarch @@ -146,6 +157,18 @@ which use "static-ssl" feature of "%{crate}" crate. %files -n %{name}+static-ssl-devel %ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml +%package -n %{name}+upkeep_7_62_0-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+upkeep_7_62_0-devel %{_description} + +This package contains library source intended for building other packages +which use "upkeep_7_62_0" feature of "%{crate}" crate. + +%files -n %{name}+upkeep_7_62_0-devel +%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml + %prep %autosetup -n %{crate}-%{upstream_version} -p1 # No bundled deps @@ -154,6 +177,7 @@ rm -vrf curl %generate_buildrequires %cargo_generate_buildrequires +echo 'pkgconfig(libcurl)' %build %cargo_build diff --git a/sources b/sources index e0a04e8..07e2ddd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (curl-sys-0.4.39+curl-7.74.0.crate) = ce13ffe129f62f9967f15d18cefbe9c9c38fb4ad2fea9dd8b736981199c89b7ef8ccef2d7411b0f007c44a81bc1a357014a363bd0e715aa9311a517b04e7382c +SHA512 (curl-sys-0.4.45+curl-7.78.0.crate) = 01f5ac6efcb95f5f6453736dc52fb8ba079ce4c09e62f9203913e36cc1e4d60a2b2154bd456e548bacd092934d74fa2eec70e67218bb5b9fe64bd42b239e0391