Update to version 0.16.1+1.7.1; Fixes RHBZ#2235484

epel10
Fabio Valentini 1 year ago
parent 4edc68c05c
commit 985d718af2
No known key found for this signature in database
GPG Key ID: 5AC5F572E5D410AF

1
.gitignore vendored

@ -36,3 +36,4 @@
/libgit2-sys-0.13.5+1.4.5.crate /libgit2-sys-0.13.5+1.4.5.crate
/libgit2-sys-0.14.2+1.5.1.crate /libgit2-sys-0.14.2+1.5.1.crate
/libgit2-sys-0.15.2+1.6.4.crate /libgit2-sys-0.15.2+1.6.4.crate
/libgit2-sys-0.16.1+1.7.1.crate

@ -1,35 +1,73 @@
From 9da92f6c0981aae2f4e6267e4a1cb4eaf0b92357 Mon Sep 17 00:00:00 2001 From 16924a64fa662d649590a0a26d7f280616651435 Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com> From: Fabio Valentini <decathorpe@gmail.com>
Date: Thu, 13 Jul 2023 13:53:24 +0200 Date: Tue, 19 Sep 2023 22:02:24 +0200
Subject: [PATCH] build with vendored libgit2 unconditionally Subject: [PATCH] build with vendored libgit2 unconditionally
--- ---
build.rs | 12 ------------ build.rs | 47 -----------------------------------------------
1 file changed, 12 deletions(-) 1 file changed, 47 deletions(-)
diff --git a/build.rs b/build.rs diff --git a/build.rs b/build.rs
index 24df572..7b551a7 100644 index b497005..4bf1136 100644
--- a/build.rs --- a/build.rs
+++ b/build.rs +++ b/build.rs
@@ -10,18 +10,6 @@ fn main() { @@ -4,56 +4,9 @@ use std::io;
let vendored = env::var("CARGO_FEATURE_VENDORED").is_ok(); use std::path::{Path, PathBuf};
let zlib_ng_compat = env::var("CARGO_FEATURE_ZLIB_NG_COMPAT").is_ok(); use std::process::Command;
- // To use zlib-ng in zlib-compat mode, we have to build libgit2 ourselves. -/// Tries to use system libgit2 and emits necessary build script instructions.
- let try_to_use_system_libgit2 = !vendored && !zlib_ng_compat; -fn try_system_libgit2() -> Result<pkg_config::Library, pkg_config::Error> {
- if try_to_use_system_libgit2 { - let mut cfg = pkg_config::Config::new();
- let mut cfg = pkg_config::Config::new(); - match cfg.range_version("1.7.1".."1.8.0").probe("libgit2") {
- if let Ok(lib) = cfg.range_version("1.6.4".."1.7.0").probe("libgit2") { - Ok(lib) => {
- for include in &lib.include_paths { - for include in &lib.include_paths {
- println!("cargo:root={}", include.display()); - println!("cargo:root={}", include.display());
- } - }
- return; - Ok(lib)
- }
- Err(e) => {
- println!("cargo:warning=failed to probe system libgit2: {e}");
- Err(e)
- } - }
- } - }
-}
-
fn main() {
let https = env::var("CARGO_FEATURE_HTTPS").is_ok();
let ssh = env::var("CARGO_FEATURE_SSH").is_ok();
- let vendored = env::var("CARGO_FEATURE_VENDORED").is_ok();
- let zlib_ng_compat = env::var("CARGO_FEATURE_ZLIB_NG_COMPAT").is_ok();
-
- // Specify `LIBGIT2_NO_VENDOR` to force to use system libgit2.
- // Due to the additive nature of Cargo features, if some crate in the
- // dependency graph activates `vendored` feature, there is no way to revert
- // it back. This env var serves as a workaround for this purpose.
- println!("cargo:rerun-if-env-changed=LIBGIT2_NO_VENDOR");
- let forced_no_vendor = env::var_os("LIBGIT2_NO_VENDOR").map_or(false, |s| s != "0");
-
- if forced_no_vendor {
- if try_system_libgit2().is_err() {
- panic!(
- "\
-The environment variable `LIBGIT2_NO_VENDOR` has been set but no compatible system libgit2 could be found.
-The build is now aborting. To disable, unset the variable or use `LIBGIT2_NO_VENDOR=0`.
-",
- );
- }
- -
- // We've reached here, implying we're using system libgit2.
- return;
- }
-
- // To use zlib-ng in zlib-compat mode, we have to build libgit2 ourselves.
- let try_to_use_system_libgit2 = !vendored && !zlib_ng_compat;
- if try_to_use_system_libgit2 && try_system_libgit2().is_ok() {
- // using system libgit2 has worked
- return;
- }
println!("cargo:rustc-cfg=libgit2_vendored"); println!("cargo:rustc-cfg=libgit2_vendored");
if !Path::new("libgit2/src").exists() {
-- --
2.41.0 2.41.0

@ -1,11 +1,11 @@
--- libgit2-sys-0.15.2+1.6.4/Cargo.toml 1970-01-01T00:00:01+00:00 --- libgit2-sys-0.16.1+1.7.1/Cargo.toml 1970-01-01T00:00:01+00:00
+++ libgit2-sys-0.15.2+1.6.4/Cargo.toml 2023-07-13T11:49:40.922952+00:00 +++ libgit2-sys-0.16.1+1.7.1/Cargo.toml 2023-09-19T19:56:54.584806+00:00
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
[package] [package]
edition = "2018" edition = "2018"
name = "libgit2-sys" name = "libgit2-sys"
-version = "0.15.2+1.6.4" -version = "0.16.1+1.7.1"
+version = "0.15.2" +version = "0.16.1"
authors = [ authors = [
"Josh Triplett <josh@joshtriplett.org>", "Josh Triplett <josh@joshtriplett.org>",
"Alex Crichton <alex@alexcrichton.com>", "Alex Crichton <alex@alexcrichton.com>",
@ -29,4 +29,4 @@
-] -]
[target."cfg(unix)".dependencies.openssl-sys] [target."cfg(unix)".dependencies.openssl-sys]
version = "0.9" version = "0.9.45"

@ -3,10 +3,10 @@
%global debug_package %{nil} %global debug_package %{nil}
%global crate libgit2-sys %global crate libgit2-sys
%global upstream_version 0.15.2+1.6.4 %global crate_version 0.16.1+1.7.1
Name: rust-libgit2-sys Name: rust-libgit2-sys
Version: 0.15.2 Version: 0.16.1
Release: %autorelease Release: %autorelease
Summary: Native bindings to the libgit2 library Summary: Native bindings to the libgit2 library
@ -16,7 +16,7 @@ Summary: Native bindings to the libgit2 library
# * bundled pcre: BSD-3-Clause # * bundled pcre: BSD-3-Clause
License: (MIT OR Apache-2.0) AND BSD-3-Clause AND GPL-2.0-only WITH GCC-exception-2.0 AND MIT License: (MIT OR Apache-2.0) AND BSD-3-Clause AND GPL-2.0-only WITH GCC-exception-2.0 AND MIT
URL: https://crates.io/crates/libgit2-sys URL: https://crates.io/crates/libgit2-sys
Source: %{crates_source %{crate} %{upstream_version}} Source: %{crates_source %{crate} %{crate_version}}
# Manually created patch for downstream crate metadata changes # Manually created patch for downstream crate metadata changes
# * remove libgit2 version from version field # * remove libgit2 version from version field
# * update package.license field to reflect bundled dependencies # * update package.license field to reflect bundled dependencies
@ -36,7 +36,7 @@ Native bindings to the libgit2 library.}
Summary: %{summary} Summary: %{summary}
BuildArch: noarch BuildArch: noarch
Provides: bundled(libgit2) = 1.6.4 Provides: bundled(libgit2) = 1.7.1
Provides: bundled(http-parser) = 2.0 Provides: bundled(http-parser) = 2.0
Provides: bundled(pcre) = 8.44 Provides: bundled(pcre) = 8.44
@ -139,7 +139,7 @@ use the "vendored" feature of the "%{crate}" crate.
%ghost %{crate_instdir}/Cargo.toml %ghost %{crate_instdir}/Cargo.toml
%prep %prep
%autosetup -n %{crate}-%{upstream_version} -p1 %autosetup -n %{crate}-%{crate_version} -p1
# remove upstream development scripts from libgit2 # remove upstream development scripts from libgit2
rm -r libgit2/script/ rm -r libgit2/script/
# remove unused bundled dependencies # remove unused bundled dependencies

@ -1 +1 @@
SHA512 (libgit2-sys-0.15.2+1.6.4.crate) = 28b66ffe6da956bd1127aef295b222b55681b25c1820e016284802531f5360e6d21c11c695be569d26a318321868a0ce0b2c848bfcc887f09f47fbaadb13b478 SHA512 (libgit2-sys-0.16.1+1.7.1.crate) = 746e80309af40af7f6d11a7d45721054a6b7f456e10af5b25ea5ddc3ae1f8d934196e9e3b9948f7d7b41b6d9dc45a660874029a39c1c3d67307daebae3f2cb69

Loading…
Cancel
Save