From ea9c74997176d31f3963b69934946ad66a272fbc Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Feb 13 2024 15:34:59 +0000 Subject: Update to version 0.16.2+1.7.2; Fixes RHBZ#2263125 --- diff --git a/.gitignore b/.gitignore index 601a2de..9689c07 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ /libgit2-sys-0.14.2+1.5.1.crate /libgit2-sys-0.15.2+1.6.4.crate /libgit2-sys-0.16.1+1.7.1.crate +/libgit2-sys-0.16.2+1.7.2.crate diff --git a/0001-build-with-vendored-libgit2-unconditionally.patch b/0001-build-with-vendored-libgit2-unconditionally.patch index a52d14c..366e22c 100644 --- a/0001-build-with-vendored-libgit2-unconditionally.patch +++ b/0001-build-with-vendored-libgit2-unconditionally.patch @@ -18,7 +18,7 @@ index b497005..4bf1136 100644 -/// Tries to use system libgit2 and emits necessary build script instructions. -fn try_system_libgit2() -> Result { - let mut cfg = pkg_config::Config::new(); -- match cfg.range_version("1.7.1".."1.8.0").probe("libgit2") { +- match cfg.range_version("1.7.2".."1.8.0").probe("libgit2") { - Ok(lib) => { - for include in &lib.include_paths { - println!("cargo:root={}", include.display()); diff --git a/libgit2-sys-fix-metadata-auto.diff b/libgit2-sys-fix-metadata-auto.diff new file mode 100644 index 0000000..350a2c7 --- /dev/null +++ b/libgit2-sys-fix-metadata-auto.diff @@ -0,0 +1,16 @@ +--- libgit2-sys-0.16.2+1.7.2/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ libgit2-sys-0.16.2+1.7.2/Cargo.toml 2024-02-13T15:26:27.947475+00:00 +@@ -12,7 +12,7 @@ + [package] + edition = "2018" + name = "libgit2-sys" +-version = "0.16.2+1.7.2" ++version = "0.16.2" + authors = [ + "Josh Triplett ", + "Alex Crichton ", +@@ -67,3 +67,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 ffb9357..6e53a8a 100644 --- a/libgit2-sys-fix-metadata.diff +++ b/libgit2-sys-fix-metadata.diff @@ -1,14 +1,5 @@ ---- libgit2-sys-0.16.1+1.7.1/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ libgit2-sys-0.16.1+1.7.1/Cargo.toml 2023-09-19T19:56:54.584806+00:00 -@@ -12,7 +12,7 @@ - [package] - edition = "2018" - name = "libgit2-sys" --version = "0.16.1+1.7.1" -+version = "0.16.1" - authors = [ - "Josh Triplett ", - "Alex Crichton ", +--- libgit2-sys-0.16.2+1.7.2/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ libgit2-sys-0.16.2+1.7.2/Cargo.toml 2024-02-13T15:26:53.261791+00:00 @@ -27,7 +27,7 @@ "libgit2/tests/*", ] diff --git a/rust-libgit2-sys.spec b/rust-libgit2-sys.spec index 2959af4..b90db4d 100644 --- a/rust-libgit2-sys.spec +++ b/rust-libgit2-sys.spec @@ -1,12 +1,12 @@ -# Generated by rust2rpm 24 +# Generated by rust2rpm 25 %bcond_without check %global debug_package %{nil} %global crate libgit2-sys -%global crate_version 0.16.1+1.7.1 +%global upstream_version 0.16.2+1.7.2 Name: rust-libgit2-sys -Version: 0.16.1 +Version: 0.16.2 Release: %autorelease Summary: Native bindings to the libgit2 library @@ -16,16 +16,18 @@ Summary: Native bindings to the libgit2 library # * 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 URL: https://crates.io/crates/libgit2-sys -Source: %{crates_source %{crate} %{crate_version}} +Source: %{crates_source %{crate} %{upstream_version}} +# Automatically generated patch to strip dependencies and normalize metadata +Patch: libgit2-sys-fix-metadata-auto.diff # Manually created patch for downstream crate metadata changes -# * remove libgit2 version from version field # * update package.license field to reflect bundled dependencies +# * drop features for statically linking against vendored OpenSSL Patch: libgit2-sys-fix-metadata.diff # * build against the bundled copy of libgit2 unconditionally: # the version in the Fedora repositories is always either too old or too new Patch: 0001-build-with-vendored-libgit2-unconditionally.patch -BuildRequires: rust-packaging >= 21 +BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: Native bindings to the libgit2 library.} @@ -36,7 +38,7 @@ Native bindings to the libgit2 library.} Summary: %{summary} BuildArch: noarch -Provides: bundled(libgit2) = 1.7.1 +Provides: bundled(libgit2) = 1.7.2 Provides: bundled(http-parser) = 2.0 Provides: bundled(pcre) = 8.44 @@ -139,7 +141,7 @@ use the "vendored" feature of the "%{crate}" crate. %ghost %{crate_instdir}/Cargo.toml %prep -%autosetup -n %{crate}-%{crate_version} -p1 +%autosetup -n %{crate}-%{upstream_version} -p1 # remove upstream development scripts from libgit2 rm -r libgit2/script/ # remove unused bundled dependencies diff --git a/sources b/sources index 1695259..5dbebad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (libgit2-sys-0.16.1+1.7.1.crate) = 746e80309af40af7f6d11a7d45721054a6b7f456e10af5b25ea5ddc3ae1f8d934196e9e3b9948f7d7b41b6d9dc45a660874029a39c1c3d67307daebae3f2cb69 +SHA512 (libgit2-sys-0.16.2+1.7.2.crate) = 45e23f66e1823c551b1f91d1466d971b05927e591684b35b75047ac5f7d23de889910b662ec403388b88a35dfd19b8ad9787481d36e10949e610aa02fcc35c40