The package rpms/rust-libgit2-sys0.12.git has added or updated architecture specific
content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/rust-libgit2-sys0.12.git/commit/?....
Change:
-ExclusiveArch: %{rust_arches}
Thanks.
Full change:
============
commit dc7b36b88f4729a66fc5d19aa0c8ccfd5f8d092d
Author: Fabio Valentini <decathorpe(a)gmail.com>
Date: Wed Dec 14 14:07:48 2022 +0100
Build with vendored libgit2 unconditionally
diff --git a/.rust2rpm.conf b/.rust2rpm.conf
deleted file mode 100644
index 1b8dd8b..0000000
--- a/.rust2rpm.conf
+++ /dev/null
@@ -1,9 +0,0 @@
-[DEFAULT]
-buildrequires =
- (pkgconfig(libgit2) >= 1.3.0 with pkgconfig(libgit2) < 2.0.0)
-lib.requires =
- (pkgconfig(libgit2) >= 1.3.0 with pkgconfig(libgit2) < 2.0.0)
-unwanted-features =
- vendored
- vendored-openssl
- zlib-ng-compat
diff --git a/0001-build-with-vendored-libgit2-unconditionally.patch
b/0001-build-with-vendored-libgit2-unconditionally.patch
new file mode 100644
index 0000000..6f714ff
--- /dev/null
+++ b/0001-build-with-vendored-libgit2-unconditionally.patch
@@ -0,0 +1,35 @@
+From 8d735f41d301b278356ab252c2ca8b03405f9eb4 Mon Sep 17 00:00:00 2001
+From: Fabio Valentini <decathorpe(a)gmail.com>
+Date: Wed, 14 Dec 2022 13:20:58 +0100
+Subject: [PATCH] build with vendored libgit2 unconditionally
+
+---
+ build.rs | 12 ------------
+ 1 file changed, 12 deletions(-)
+
+diff --git a/build.rs b/build.rs
+index 0046afa..9cb6ddd 100644
+--- a/build.rs
++++ b/build.rs
+@@ -10,18 +10,6 @@ fn main() {
+ let vendored = env::var("CARGO_FEATURE_VENDORED").is_ok();
+ let zlib_ng_compat = env::var("CARGO_FEATURE_ZLIB_NG_COMPAT").is_ok();
+
+- // 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 {
+- let mut cfg = pkg_config::Config::new();
+- if let Ok(lib) =
cfg.atleast_version("1.3.0").probe("libgit2") {
+- for include in &lib.include_paths {
+- println!("cargo:root={}", include.display());
+- }
+- return;
+- }
+- }
+-
+ println!("cargo:rustc-cfg=libgit2_vendored");
+
+ if !Path::new("libgit2/.git").exists() {
+--
+2.38.1
+
diff --git a/libgit2-sys-fix-metadata.diff b/libgit2-sys-fix-metadata.diff
index cb67e94..d735865 100644
--- a/libgit2-sys-fix-metadata.diff
+++ b/libgit2-sys-fix-metadata.diff
@@ -1,6 +1,6 @@
--- libgit2-sys-0.12.26+1.3.0/Cargo.toml 1970-01-01T00:00:01+00:00
-+++ libgit2-sys-0.12.26+1.3.0/Cargo.toml 2022-07-08T12:44:01.823104+00:00
-@@ -12,7 +12,7 @@
++++ libgit2-sys-0.12.26+1.3.0/Cargo.toml 2022-12-14T12:17:05.219300+00:00
+@@ -12,13 +12,13 @@
[package]
edition = "2018"
name = "libgit2-sys"
@@ -9,3 +9,19 @@
authors = ["Josh Triplett <josh(a)joshtriplett.org>", "Alex Crichton
<alex(a)alexcrichton.com>"]
build = "build.rs"
links = "git2"
+ exclude = ["libgit2/ci/*", "libgit2/docs/*",
"libgit2/examples/*", "libgit2/fuzzers/*",
"libgit2/tests/*"]
+ description = "Native bindings to the libgit2 library"
+-license = "MIT/Apache-2.0"
++license = "MIT AND GPL-2.0-only WITH GCC-exception-2.0 AND BSD-3-Clause"
+ repository = "https://github.com/rust-lang/git2-rs"
+
+ [lib]
+@@ -47,8 +47,6 @@
+ ssh = ["libssh2-sys"]
+ ssh_key_from_memory = []
+ vendored = []
+-vendored-openssl = ["openssl-sys/vendored"]
+-zlib-ng-compat = ["libz-sys/zlib-ng", "libssh2-sys/zlib-ng-compat"]
+ [target."cfg(unix)".dependencies.openssl-sys]
+ version = "0.9"
+ optional = true
diff --git a/rust-libgit2-sys0.12.spec b/rust-libgit2-sys0.12.spec
index 1f8aebf..9bb4db6 100644
--- a/rust-libgit2-sys0.12.spec
+++ b/rust-libgit2-sys0.12.spec
@@ -1,24 +1,29 @@
-# Generated by rust2rpm 21
+# Generated by rust2rpm 23
%bcond_without check
%global debug_package %{nil}
%global crate libgit2-sys
%global upstream_version 0.12.26+1.3.0
-Name: rust-%{crate}0.12
+Name: rust-libgit2-sys0.12
Version: 0.12.26
Release: %autorelease
Summary: Native bindings to the libgit2 library
-# Upstream license specification: MIT/Apache-2.0
-License: MIT or ASL 2.0
+# * libgit2-sys crate: MIT OR Apache-2.0
+# * bundled libgit2: GPL-2.0-only WITH GCC-exception-2.0
+# * bundled http-parser: MIT
+# * bundled pcre: BSD-3-Clause
+License: MIT AND GPL-2.0-only WITH GCC-exception-2.0 AND BSD-3-Clause
URL:
https://crates.io/crates/libgit2-sys
Source: %{crates_source %{crate} %{upstream_version}}
-# Initial patched metadata
-# * Remove libgit2 version from version field
-Patch0: libgit2-sys-fix-metadata.diff
-
-ExclusiveArch: %{rust_arches}
+# Manually created patch for downstream crate metadata changes
+# * remove libgit2 version from version field
+# * update package.license field to reflect bundled dependencies
+Patch: libgit2-sys-fix-metadata.diff
+# * build against the bundled copy of libgit2 unconditionally:
+# the version in the Fedora repositories is too old
+Patch: 0001-build-with-vendored-libgit2-unconditionally.patch
BuildRequires: rust-packaging >= 21
@@ -30,7 +35,10 @@ Native bindings to the libgit2 library.}
%package devel
Summary: %{summary}
BuildArch: noarch
-Requires: (pkgconfig(libgit2) >= 1.3.0 with pkgconfig(libgit2) < 2.0.0)
+
+Provides: bundled(libgit2) = 1.3.0
+Provides: bundled(http-parser) = 2.0
+Provides: bundled(pcre) = 8.44
%description devel %{_description}
@@ -40,6 +48,9 @@ use the "%{crate}" crate.
%files devel
%license %{crate_instdir}/LICENSE-APACHE
%license %{crate_instdir}/LICENSE-MIT
+%license %{crate_instdir}/libgit2/COPYING
+%license %{crate_instdir}/libgit2/deps/http-parser/COPYING
+%license %{crate_instdir}/libgit2/deps/pcre/LICENCE
%{crate_instdir}/
%package -n %{name}+default-devel
@@ -114,15 +125,31 @@ use the "ssh_key_from_memory" feature of the
"%{crate}" crate.
%files -n %{name}+ssh_key_from_memory-devel
%ghost %{crate_instdir}/Cargo.toml
+%package -n %{name}+vendored-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+vendored-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "vendored" feature of the "%{crate}" crate.
+
+%files -n %{name}+vendored-devel
+%ghost %{crate_instdir}/Cargo.toml
+
%prep
%autosetup -n %{crate}-%{upstream_version} -p1
-# remove bundled dependencies
-rm -vr libgit2/
+# remove upstream development scripts from libgit2
+rm -r libgit2/script/
+# remove unused bundled dependencies
+rm -r libgit2/deps/chromium-zlib
+rm -r libgit2/deps/ntlmclient
+rm -r libgit2/deps/winhttp
+rm -r libgit2/deps/zlib
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
-echo '(pkgconfig(libgit2) >= 1.3.0 with pkgconfig(libgit2) < 2.0.0)'
%build
%cargo_build
commit b5ed77b46d1cb744b148fdd7f0501c84ffa6bdb3
Author: Fedora Release Engineering <releng(a)fedoraproject.org>
Date: Sat Jul 23 04:54:13 2022 +0000
Rebuilt for
https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng(a)fedoraproject.org>