From 3b2c4f8e375aef8867086fbd4171f52d63eb24f1 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 (cherry picked from commit 876d6bf6dc20ac86f88a877c8ef8b0f8529faef8) --- ceph.spec.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ceph.spec.in b/ceph.spec.in index 734542815756d..f6556c5b5dbee 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -228,6 +228,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 @@ -1261,7 +1262,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.47.3