]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rpm: fdupes in SUSE builds to conform with packaging guidelines 29784/head
authorNathan Cutler <ncutler@suse.com>
Fri, 26 Jul 2019 10:42:09 +0000 (12:42 +0200)
committerPrashant D <pdhange@redhat.com>
Tue, 20 Aug 2019 23:04:36 +0000 (19:04 -0400)
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 <ncutler@suse.com>
(cherry picked from commit 876d6bf6dc20ac86f88a877c8ef8b0f8529faef8)

ceph.spec.in

index 734542815756d37bcb995ba55bdfd8716cbeb4f2..f6556c5b5dbeefb0721f7a89bee5432d8a380d70 100644 (file)
@@ -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