public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/mstflint] rawhide: hardlink duplicate files in RHEL buildroots
@ 2026-11-09 14:49 Michal Schmidt
0 siblings, 0 replies; only message in thread
From: Michal Schmidt @ 2026-11-09 14:49 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/mstflint
Branch : rawhide
Commit : 0403f78981ac14a55fad99c25aca51a4187147cc
Author : Michal Schmidt <mschmidt@redhat.com>
Date : 2026-11-09T15:10:48+01:00
Stats : +11/-0 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/mstflint/c/0403f78981ac14a55fad99c25aca51a4187147cc?branch=rawhide
Log:
hardlink duplicate files in RHEL buildroots
rpmlint reports
mstflint.x86_64: E: files-duplicated-waste 816835
for every architecture: roughly 800 KiB of byte-identical files that
are not hardlinks. The mst* binaries in /usr/bin are identical to each
other, so are some of the per-switch CSV files in /usr/share/mstflint.
Fedora buildroots deduplicate the whole buildroot in %%__os_install_post
(linkdupes from add-determinism), RHEL and ELN buildroots do not, so run
the hardlink tool there. It merges 16 files and saves 797.68 KiB of
duplicated data.
Assisted-by: OpenCode:enmaas/rits/deepseek-ai/DeepSeek-V4.1-Flash-1017
---
diff --git a/mstflint.spec b/mstflint.spec
index acb2ebe..253b811 100644
--- a/mstflint.spec
+++ b/mstflint.spec
@@ -65,6 +65,9 @@ Provides: bundled(muParser)
%if %{__remake_config}
BuildRequires: libtool, autoconf, automake
%endif
+%if 0%{?rhel}
+BuildRequires: hardlink
+%endif
Obsoletes: openib-mstflint <= 1.4 openib-tvflash <= 0.9.2 tvflash <= 0.9.0
ExcludeArch: s390 %{arm} %{ix86}
Requires: python3
@@ -118,6 +121,14 @@ find %{buildroot} -type f,l \( -name '*.a' -o -name '*.la' \) -delete
# https://docs.fedoraproject.org/en-US/packaging-guidelines/Debuginfo/
chmod +x %{buildroot}/%{_libdir}/mstflint/{python_tools,sdk}/*.so
+%if 0%{?rhel}
+# rpmlint reports files-duplicated-waste for identical files that are not
+# hardlinked. Fedora deduplicates the whole buildroot as part of
+# %%__os_install_post (linkdupes from add-determinism), RHEL buildroots
+# do not, so hardlink the duplicates here.
+hardlink -c %{buildroot}
+%endif
+
%files
%doc README
%_bindir/*
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-09 14:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-09 14:49 [rpms/mstflint] rawhide: hardlink duplicate files in RHEL buildroots Michal Schmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox