public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-rpmautospec] rawhide: Cope with versioned libgit2 from F45 on
@ 2026-06-23 8:36 Nils Philippsen
0 siblings, 0 replies; only message in thread
From: Nils Philippsen @ 2026-06-23 8:36 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-rpmautospec
Branch : rawhide
Commit : 896634be28b3a023b24ee218f418c028192460a5
Author : Nils Philippsen <nils@redhat.com>
Date : 2026-06-09T13:01:38+02:00
Stats : +28/-8 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/python-rpmautospec/c/896634be28b3a023b24ee218f418c028192460a5?branch=rawhide
Log:
Cope with versioned libgit2 from F45 on
[skip changelog]
Signed-off-by: Nils Philippsen <nils@redhat.com>
---
diff --git a/python-rpmautospec.spec b/python-rpmautospec.spec
index 880907e..71e9f7d 100644
--- a/python-rpmautospec.spec
+++ b/python-rpmautospec.spec
@@ -40,13 +40,29 @@
%bcond old_hatchling 1
%endif
-# Although this supports a range of libgit2 and librpm versions upstream,
-# we want to ensure newer versions don’t accidentally break all packages using this.
-# Hence we artificially restrict the Required version to what was tested during the build.
-# When libgit2/librpm soname is bumped, this package needs to be rebuilt (and tested).
-%define libgit2_lower_bound 1.7
-%define libgit2_upper_bound 1.10
-%define libgit2_requires %(rpm -q --provides libgit2 | grep '^libgit2\.so\.' | sed 's/()(64bit)$//' | head -n 1)
+# From Fedora 45 on libgit2 packages are versioned, i.e. named "libgit2_X.Y". In this case, pin the
+# package name. On older releases (and EPEL for the time being), depend on plain "libgit2" for
+# building. In all cases, pin the SONAME for runtime.
+
+%if ! 0%{?fedora}%{?rhel} || 0%{?fedora} >= 45
+%bcond versioned_libgit2 1
+%else
+%bcond versioned_libgit2 0
+%endif
+
+%if %{with versioned_libgit2}
+%global libgit2_pkg libgit2_1.9
+%else
+%global libgit2_lower_bound 1.7
+%global libgit2_upper_bound 1.10
+%global libgit2_pkg libgit2
+%endif
+
+# Although this supports a range of libgit2 versions upstream, we want to ensure newer versions
+# don’t accidentally break all packages using this. Hence we artificially restrict the Required
+# version to what was tested during the build. When the libgit2 soname is bumped, this package needs
+# to be rebuilt (and tested).
+%define libgit2_requires %(rpm -q --provides %{libgit2_pkg} | grep '^libgit2\.so\.' | sed 's/()(64bit)$//' | head -n 1)
%global srcname rpmautospec
@@ -92,7 +108,11 @@ BuildRequires: python3dist(pytest-xdist)
BuildRequires: sed
-BuildRequires: (libgit2 >= %libgit2_lower_bound with libgit2 < %libgit2_upper_bound)
+%if %{with versioned_libgit2}
+BuildRequires: %{libgit2_pkg}
+%else
+BuildRequires: (%{libgit2_pkg} >= %libgit2_lower_bound with %{libgit2_pkg} < %libgit2_upper_bound)
+%endif
BuildRequires: rpm-libs
BuildRequires: rpm-build-libs
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-23 8:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-23 8:36 [rpms/python-rpmautospec] rawhide: Cope with versioned libgit2 from F45 on Nils Philippsen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox