diff --git a/.gitignore b/.gitignore index 016e362..fd94aa1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /libssh2-sys-0.2.6.crate /libssh2-sys-0.2.7.crate +/libssh2-sys-0.2.8.crate diff --git a/0001-build.rs-always-use-pkg-config.patch b/0001-build.rs-always-use-pkg-config.patch new file mode 100644 index 0000000..c6429f7 --- /dev/null +++ b/0001-build.rs-always-use-pkg-config.patch @@ -0,0 +1,38 @@ +From d8240c00ac455f22952a84b9febb80380d526a93 Mon Sep 17 00:00:00 2001 +From: Igor Gnatenko +Date: Sat, 14 Jul 2018 09:32:07 +0200 +Subject: [PATCH] build.rs: always use pkg-config + +Signed-off-by: Igor Gnatenko +--- + libssh2-sys/build.rs | 13 ++++--------- + 1 file changed, 4 insertions(+), 9 deletions(-) + +diff --git a/libssh2-sys/build.rs b/libssh2-sys/build.rs +index 1f5ed1a..b8509e8 100644 +--- a/libssh2-sys/build.rs ++++ b/libssh2-sys/build.rs +@@ -18,16 +18,11 @@ fn main() { + register_dep("Z"); + register_dep("OPENSSL"); + +- // The system copy of libssh2 is not used by default because it +- // can lead to having two copies of libssl loaded at once. +- // See https://github.com/alexcrichton/ssh2-rs/pull/88 +- if env::var("LIBSSH2_SYS_USE_PKG_CONFIG").is_ok() { +- if let Ok(lib) = pkg_config::find_library("libssh2") { +- for path in &lib.include_paths { +- println!("cargo:include={}", path.display()); +- } +- return ++ if let Ok(lib) = pkg_config::find_library("libssh2") { ++ for path in &lib.include_paths { ++ println!("cargo:include={}", path.display()); + } ++ return + } + + if !Path::new("libssh2/.git").exists() { +-- +2.18.0 + diff --git a/libssh2-sys-0.2.7-fix-metadata.diff b/libssh2-sys-0.2.8-fix-metadata.diff similarity index 58% rename from libssh2-sys-0.2.7-fix-metadata.diff rename to libssh2-sys-0.2.8-fix-metadata.diff index d688769..4580d8c 100644 --- a/libssh2-sys-0.2.7-fix-metadata.diff +++ b/libssh2-sys-0.2.8-fix-metadata.diff @@ -1,9 +1,9 @@ ---- libssh2-sys-0.2.7/Cargo.toml 1969-12-31T16:00:00-08:00 -+++ libssh2-sys-0.2.7/Cargo.toml 2018-05-03T17:58:04.584951-07:00 +--- libssh2-sys-0.2.8/Cargo.toml 1970-01-01T01:00:00+01:00 ++++ libssh2-sys-0.2.8/Cargo.toml 2018-07-14T09:25:47.440043+02:00 @@ -33,7 +33,5 @@ [build-dependencies.pkg-config] - version = "0.3" + version = "0.3.11" -[target."cfg(target_env = \"msvc\")".build-dependencies.vcpkg] -version = "0.2" [target."cfg(unix)".dependencies.openssl-sys] diff --git a/rust-libssh2-sys.spec b/rust-libssh2-sys.spec index 33854b6..688e288 100644 --- a/rust-libssh2-sys.spec +++ b/rust-libssh2-sys.spec @@ -5,8 +5,8 @@ %global crate libssh2-sys Name: rust-%{crate} -Version: 0.2.7 -Release: 2%{?dist} +Version: 0.2.8 +Release: 1%{?dist} Summary: Native bindings to the libssh2 library # https://github.com/alexcrichton/ssh2-rs/issues/75 @@ -15,18 +15,20 @@ URL: https://crates.io/crates/libssh2-sys Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate # Initial patched metadata # * No Windows -Patch0: libssh2-sys-0.2.7-fix-metadata.diff +Patch0: libssh2-sys-0.2.8-fix-metadata.diff +# # Doesn't seem to be upstreamable +Patch1: 0001-build.rs-always-use-pkg-config.patch ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging # [dependencies] BuildRequires: (crate(libc) >= 0.2.0 with crate(libc) < 0.3.0) -BuildRequires: crate(libz-sys) >= 0.0.0 +BuildRequires: (crate(libz-sys) >= 1.0.18 with crate(libz-sys) < 2.0.0) BuildRequires: (crate(openssl-sys) >= 0.9.0 with crate(openssl-sys) < 0.10.0) # [build-dependencies] BuildRequires: (crate(cmake) >= 0.1.2 with crate(cmake) < 0.2.0) -BuildRequires: (crate(pkg-config) >= 0.3.0 with crate(pkg-config) < 0.4.0) +BuildRequires: (crate(pkg-config) >= 0.3.11 with crate(pkg-config) < 0.4.0) BuildRequires: pkgconfig(libssh2) %description @@ -44,9 +46,11 @@ This package contains library source intended for building other packages which use %{crate} from crates.io. %prep -%autosetup -n %{crate}-%{version} -p1 +%autosetup -n %{crate}-%{version} -N # No bundled deps rm -vrf libssh2/ +%patch0 -p1 +%patch1 -p2 %cargo_prep %build @@ -64,6 +68,9 @@ rm -vrf libssh2/ %{cargo_registry}/%{crate}-%{version}/ %changelog +* Sat Jul 14 2018 Igor Gnatenko - 0.2.8-1 +- Update to 0.2.8 + * Sat Jul 14 2018 Fedora Release Engineering - 0.2.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild diff --git a/sources b/sources index 2125d50..5b6698f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libssh2-sys-0.2.7.crate) = 817d6897aeaa92fea77ed5b23df68f5f10760f2f342947b178aa460fe3a75aee6913ec1ad7e34d52a1523637b7f3672a8e28f59c05ed03db1caee256ba76a45d +SHA512 (libssh2-sys-0.2.8.crate) = 78390949c1adfde166b164da83e1b4b3c1e6c8fcca339dc12fcb57b96c49159a7aaf375bccbb279fe3fb604541386d242e4c8c5652306c18927f122dd9dc0051