public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rust-libgit2-sys] epel9: Update to version 0.18.5+1.9.4
@ 2026-06-19 13:38 Fabio Valentini
0 siblings, 0 replies; only message in thread
From: Fabio Valentini @ 2026-06-19 13:38 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/rust-libgit2-sys
Branch : epel9
Commit : 088e0b950c9853d5095fecb1b36118f2fb1342e2
Author : Fabio Valentini <decathorpe@gmail.com>
Date : 2026-06-19T14:28:56+02:00
Stats : +99/-31 in 6 file(s)
URL : https://src.fedoraproject.org/rpms/rust-libgit2-sys/c/088e0b950c9853d5095fecb1b36118f2fb1342e2?branch=epel9
Log:
Update to version 0.18.5+1.9.4
---
diff --git a/.gitignore b/.gitignore
index e0c4585..f79b244 100644
--- a/.gitignore
+++ b/.gitignore
@@ -42,3 +42,4 @@
/libgit2-sys-0.18.1+1.9.0.crate
/libgit2-sys-0.18.2+1.9.1.crate
/libgit2-sys-0.18.3+1.9.2.crate
+/libgit2-sys-0.18.5+1.9.4.crate
diff --git a/0001-build-with-vendored-libgit2-unconditionally.patch b/0001-build-with-vendored-libgit2-unconditionally.patch
index 9f7cb65..e519453 100644
--- a/0001-build-with-vendored-libgit2-unconditionally.patch
+++ b/0001-build-with-vendored-libgit2-unconditionally.patch
@@ -1,46 +1,100 @@
-From d89841a3058639438660539ebafedb507ac17ba1 Mon Sep 17 00:00:00 2001
+From 303b74df94960b8b108efd834925fda6f2760438 Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
-Date: Sun, 27 Apr 2025 22:00:19 +0200
+Date: Fri, 19 Jun 2026 14:23:22 +0200
Subject: [PATCH] build with vendored libgit2 unconditionally
---
- build.rs | 47 -----------------------------------------------
- 1 file changed, 47 deletions(-)
+ build.rs | 106 -------------------------------------------------------
+ 1 file changed, 106 deletions(-)
diff --git a/build.rs b/build.rs
-index 7b5a374..ed389dc 100644
+index b45118c..84931fd 100644
--- a/build.rs
+++ b/build.rs
-@@ -4,23 +4,6 @@ use std::io;
+@@ -4,76 +4,6 @@ use std::io;
use std::path::{Path, PathBuf};
use std::process::Command;
-/// Tries to use system libgit2 and emits necessary build script instructions.
--fn try_system_libgit2() -> Result<pkg_config::Library, pkg_config::Error> {
+-fn try_system_libgit2(
+- experimental_sha256: bool,
+-) -> Result<pkg_config::Library, Box<dyn std::error::Error>> {
- let mut cfg = pkg_config::Config::new();
-- match cfg.range_version("1.9.2".."1.10.0").probe("libgit2") {
-- Ok(lib) => {
-- for include in &lib.include_paths {
-- println!("cargo:root={}", include.display());
+- let range_version = "1.9.4".."1.10.0";
+-
+- let lib = if experimental_sha256 {
+- // Determine whether experimental SHA256 object support is enabled.
+- //
+- // Given the SHA256 support is ABI-incompatible,
+- // we take a conservative approach here:
+- //
+- // 1. Only accept if the library name has the `-experimental` suffix
+- // 2. The experimental library must have an `experimental.h` header file
+- // containing an enabled `GIT_EXPERIMENTAL_SHA256` constant.
+- //
+- // See how libgit2 handles experimental features:
+- // https://github.com/libgit2/libgit2/blob/3ac4c0adb1064bad16a7f980d87e7261753fd07e/cmake/ExperimentalFeatures.cmake
+- match cfg
+- .range_version(range_version.clone())
+- .probe("libgit2-experimental")
+- {
+- Ok(lib) => {
+- let sha256_constant_in_header = lib.include_paths.iter().any(|path| {
+- let header = path.join("git2/experimental.h");
+- let contents = match std::fs::read_to_string(header) {
+- Ok(s) => s,
+- Err(_) => return false,
+- };
+- if contents.contains("#cmakedefine") {
+- // still template
+- return false;
+- }
+- contents
+- .lines()
+- .any(|l| l.starts_with("#define GIT_EXPERIMENTAL_SHA256 1"))
+- });
+- if sha256_constant_in_header {
+- println!("cargo:rustc-cfg=libgit2_experimental_sha256");
+- lib
+- } else {
+- println!("cargo:warning=no GIT_EXPERIMENTAL_SHA256 constant in headers");
+- return Err(
+- "GIT_EXPERIMENTAL_SHA256 wasn't enabled for libgit2-experimental library"
+- .into(),
+- );
+- }
+- }
+- Err(e) => {
+- println!("cargo:warning=failed to probe system libgit2-experimental: {e}");
+- return Err(e.into());
- }
-- Ok(lib)
- }
-- Err(e) => {
-- println!("cargo:warning=failed to probe system libgit2: {e}");
-- Err(e)
+- } else {
+- match cfg.range_version(range_version).probe("libgit2") {
+- Ok(lib) => lib,
+- Err(e) => {
+- println!("cargo:warning=failed to probe system libgit2: {e}");
+- return Err(e.into());
+- }
- }
+- };
+-
+- for include in &lib.include_paths {
+- println!("cargo:root={}", include.display());
- }
+- Ok(lib)
-}
-
fn main() {
println!(
"cargo:rustc-check-cfg=cfg(\
-@@ -30,36 +13,6 @@ fn main() {
+@@ -84,37 +14,6 @@ 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();
+- let unstable_sha256 = env::var("CARGO_FEATURE_UNSTABLE_SHA256").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
@@ -50,7 +104,7 @@ index 7b5a374..ed389dc 100644
- 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() {
+- if try_system_libgit2(unstable_sha256).is_err() {
- panic!(
- "\
-The environment variable `LIBGIT2_NO_VENDOR` has been set but no compatible system libgit2 could be found.
@@ -65,13 +119,25 @@ index 7b5a374..ed389dc 100644
-
- // 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() {
+- if try_to_use_system_libgit2 && try_system_libgit2(unstable_sha256).is_ok() {
- // using system libgit2 has worked
- return;
- }
println!("cargo:rustc-cfg=libgit2_vendored");
+@@ -140,11 +39,6 @@ The build is now aborting. To disable, unset the variable or use `LIBGIT2_NO_VEN
+ .out_dir(dst.join("build"))
+ .warnings(false);
+
+- if unstable_sha256 {
+- println!("cargo:rustc-cfg=libgit2_experimental_sha256");
+- cfg.define("GIT_EXPERIMENTAL_SHA256", "1");
+- }
+-
+ // Include all cross-platform C files
+ add_c_files(&mut cfg, "libgit2/src/libgit2");
+ add_c_files(&mut cfg, "libgit2/src/util");
--
-2.49.0
+2.54.0
diff --git a/libgit2-sys-fix-metadata-auto.diff b/libgit2-sys-fix-metadata-auto.diff
index 817d448..591cedf 100644
--- a/libgit2-sys-fix-metadata-auto.diff
+++ b/libgit2-sys-fix-metadata-auto.diff
@@ -1,15 +1,15 @@
---- libgit2-sys-0.18.3+1.9.2/Cargo.toml 1970-01-01T00:00:01+00:00
-+++ libgit2-sys-0.18.3+1.9.2/Cargo.toml 2025-12-14T15:15:44.405055+00:00
+--- libgit2-sys-0.18.5+1.9.4/Cargo.toml 2006-07-24T01:21:28+00:00
++++ libgit2-sys-0.18.5+1.9.4/Cargo.toml 2026-06-19T12:25:13.799867+00:00
@@ -12,7 +12,7 @@
[package]
edition = "2021"
name = "libgit2-sys"
--version = "0.18.3+1.9.2"
-+version = "0.18.3"
+-version = "0.18.5+1.9.4"
++version = "0.18.5"
authors = [
"Josh Triplett <josh@joshtriplett.org>",
"Alex Crichton <alex@alexcrichton.com>",
-@@ -72,3 +72,4 @@
+@@ -73,3 +73,4 @@
[target."cfg(unix)".dependencies.openssl-sys]
version = "0.9.45"
optional = true
diff --git a/libgit2-sys-fix-metadata.diff b/libgit2-sys-fix-metadata.diff
index 0edbf70..76dd31c 100644
--- a/libgit2-sys-fix-metadata.diff
+++ b/libgit2-sys-fix-metadata.diff
@@ -1,6 +1,6 @@
---- libgit2-sys-0.18.3+1.9.2/Cargo.toml 1970-01-01T00:00:01+00:00
-+++ libgit2-sys-0.18.3+1.9.2/Cargo.toml 2025-12-14T15:15:44.406096+00:00
-@@ -33,18 +33,13 @@
+--- libgit2-sys-0.18.5+1.9.4/Cargo.toml 2006-07-24T01:21:28+00:00
++++ libgit2-sys-0.18.5+1.9.4/Cargo.toml 2026-06-19T12:25:13.800758+00:00
+@@ -33,19 +33,13 @@
autobenches = false
description = "Native bindings to the libgit2 library"
readme = false
@@ -11,6 +11,7 @@
[features]
https = ["openssl-sys"]
ssh = ["libssh2-sys"]
+-unstable-sha256 = []
vendored = []
-vendored-openssl = ["openssl-sys/vendored"]
-zlib-ng-compat = [
diff --git a/rust-libgit2-sys.spec b/rust-libgit2-sys.spec
index 9e3e1d3..9afcca4 100644
--- a/rust-libgit2-sys.spec
+++ b/rust-libgit2-sys.spec
@@ -3,10 +3,10 @@
%global debug_package %{nil}
%global crate libgit2-sys
-%global crate_version 0.18.3+1.9.2
+%global crate_version 0.18.5+1.9.4
Name: rust-libgit2-sys
-Version: 0.18.3
+Version: 0.18.5
Release: %autorelease
Summary: Native bindings to the libgit2 library
@@ -38,7 +38,7 @@ Native bindings to the libgit2 library.}
Summary: %{summary}
BuildArch: noarch
-Provides: bundled(libgit2) = 1.9.2
+Provides: bundled(libgit2) = 1.9.4
Provides: bundled(llhttp) = 9.2.1
Provides: bundled(pcre) = 8.45
diff --git a/sources b/sources
index 6d1e088..84e1dca 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (libgit2-sys-0.18.3+1.9.2.crate) = 96065972c70c11cea1290e9c514483f45e18377c4368f5d9048ea46f5501f4c596ae2742e157fbf9a4bcc0fb27babe901c4fe38f9dbe555e014866caa761c6df
+SHA512 (libgit2-sys-0.18.5+1.9.4.crate) = 98922a0665e04aa977914b5b44833cdf843d8ae02aecf1d65382fae675d9fa208161f73b9d5e9779e3aa4cd7566936ee2a669d0bd1c5d18f0343839a1a689300
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-19 13:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-19 13:38 [rpms/rust-libgit2-sys] epel9: Update to version 0.18.5+1.9.4 Fabio Valentini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox