From: Nathan Cutler Date: Fri, 26 Jul 2019 10:42:09 +0000 (+0200) Subject: rpm: fdupes in SUSE builds to conform with packaging guidelines X-Git-Tag: v15.1.0~2029^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F29346%2Fhead;p=ceph.git 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 --- 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