From 876d6bf6dc20ac86f88a877c8ef8b0f8529faef8 Mon Sep 17 00:00:00 2001 From: Nathan Cutler Date: Fri, 26 Jul 2019 12:42:09 +0200 Subject: [PATCH] rpm: fdupes in SUSE builds to conform with packaging guidelines Quoting from https://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros "%fdupes is generally safe for use on /bin, /lib*, /usr (= %_prefix) and /sbin. Do note however that files with same content but different ownership, when hardlinked, will get the ownership of any of its content siblings." Fixes: http://tracker.ceph.com/issues/40973 Signed-off-by: Nathan Cutler --- ceph.spec.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ceph.spec.in b/ceph.spec.in index 85e5b0a4047..2af992c6cbc 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -233,6 +233,7 @@ BuildRequires: pkgconfig(systemd) BuildRequires: systemd-rpm-macros %{?systemd_requires} PreReq: %fillup_prereq +BuildRequires: fdupes BuildRequires: net-tools BuildRequires: libbz2-devel BuildRequires: mozilla-nss-devel @@ -1290,7 +1291,10 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/ceph/bootstrap-rbd-mirror %py3_compile %{buildroot}%{python3_sitelib} # prometheus alerts install -m 644 -D monitoring/prometheus/alerts/ceph_default_alerts.yml %{buildroot}/etc/prometheus/SUSE/default_rules/ceph_default_alerts.yml +# hardlink duplicate files under /usr to save space +%fdupes %{buildroot}%{_prefix} %endif + %if 0%{?rhel} == 8 %py_byte_compile %{__python3} %{buildroot}%{python3_sitelib} %endif -- 2.39.5