public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/mstflint] rawhide: conditionalize bundling of iniparser for RHEL <= 10
@ 2026-08-13  9:45 Michal Schmidt
  0 siblings, 0 replies; only message in thread
From: Michal Schmidt @ 2026-08-13  9:45 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/mstflint
            Branch : rawhide
            Commit : 71c7a33cc79f9ba57166df070258fa89c563c7c7
            Author : Michal Schmidt <mschmidt@redhat.com>
            Date   : 2026-08-12T12:09:13+02:00
            Stats  : +18/-3 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/mstflint/c/71c7a33cc79f9ba57166df070258fa89c563c7c7?branch=rawhide

            Log:
            conditionalize bundling of iniparser for RHEL <= 10

iniparser-devel on RHEL <= 10 lacks a .pc file, so pkg-config
detection fails; bundle it there. On Fedora and RHEL > 10, use the
system library.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---
diff --git a/mstflint.spec b/mstflint.spec
index 255a7c2..174cf41 100644
--- a/mstflint.spec
+++ b/mstflint.spec
@@ -14,12 +14,20 @@ Source0: 	https://github.com/Mellanox/%{name}/releases/download/v%{version}-1/%{
 
 # jsoncpp and muParser are not in the RHEL/ELN content set, so we must
 # bundle them there. On Fedora, use the system libraries.
+# iniparser-devel on RHEL <= 10 lacks a .pc file, so pkg-config detection
+# fails; bundle it there too.
 %if !0%{?rhel}
+%bcond_with bundled_iniparser
 %bcond_with bundled_jsoncpp
 %bcond_with bundled_muparser
 %else
 %bcond_without bundled_jsoncpp
 %bcond_without bundled_muparser
+%if 0%{?rhel} <= 10
+%bcond_without bundled_iniparser
+%else
+%bcond_with bundled_iniparser
+%endif
 %endif
 
 BuildRequires:	make
@@ -27,8 +35,12 @@ BuildRequires:	libstdc++-devel, zlib-devel, libibmad-devel, gcc-c++, gcc
 BuildRequires:	libcurl-devel, boost-devel, libxml2-devel
 BuildRequires:	openssl-devel
 BuildRequires:	expat-devel
-BuildRequires:	iniparser-devel
 BuildRequires:	sqlite-devel
+%if %{without bundled_iniparser}
+BuildRequires:	iniparser-devel
+%else
+Provides:	bundled(iniparser)
+%endif
 %if %{without bundled_jsoncpp}
 BuildRequires:	jsoncpp-devel
 %else
@@ -63,8 +75,11 @@ for network adapters based on Mellanox Technologies chips.
 # Make sure system libraries are used where possible. Delete the bundled
 # sources. Exception: Keep */Makefile.am files because Makefiles are listed
 # as AC_CONFIG_FILES in configure.ac unconditionally.
-%global _unbundle_libs iniParser,sqlite%{!?with_bundled_jsoncpp:,json}%{!?with_bundled_muparser:,muparser}
-find ext_libs/{%{_unbundle_libs}} -depth -mindepth 1 -name Makefile.am -prune -o -delete
+%global _unbundle_dirs ext_libs/sqlite
+%{!?with_bundled_iniparser:%global _unbundle_dirs %{_unbundle_dirs} ext_libs/iniParser}
+%{!?with_bundled_jsoncpp:%global _unbundle_dirs %{_unbundle_dirs} ext_libs/json}
+%{!?with_bundled_muparser:%global _unbundle_dirs %{_unbundle_dirs} ext_libs/muparser}
+find %{_unbundle_dirs} -depth -mindepth 1 -name Makefile.am -prune -o -delete
 
 find . -type f -perm /a+x \( -name '*.[ch]' -o -name '*.cpp' \) -exec chmod a-x '{}' '+'
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-13  9:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-13  9:45 [rpms/mstflint] rawhide: conditionalize bundling of iniparser for RHEL <= 10 Michal Schmidt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox