From: Kefu Chai Date: Thu, 7 Mar 2019 12:28:24 +0000 (+0800) Subject: rpm: use Recommends on fedora also X-Git-Tag: v15.0.0~133^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=147531515b51d7b571b3a4a97e7cbdce239a049a;p=ceph.git rpm: use Recommends on fedora also "Recommends" and other weak dependencies were introduced in rpm 4.12. it is included by quite a few distros, including fedora 21 and up, and recent SUSE distros. but RHEL7 still ships rpm 4.11. see https://fedoraproject.org/wiki/Changes/RPM-4.12 and https://software.opensuse.org/package/rpm . so we enable Recommends on fedora and SUSE distros. Signed-off-by: Kefu Chai --- diff --git a/ceph.spec.in b/ceph.spec.in index 7f0dc9967643..1a61e2d79dcf 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -75,7 +75,9 @@ %if 0%{without python2} %global _defined_if_python2_absent 1 %endif - +%if 0%{?fedora} || 0%{?suse_version} +%global weak_deps 1 +%endif %if %{with selinux} # get selinux policy version %{!?_selinux_policy_version: %global _selinux_policy_version 0.0.0} @@ -361,7 +363,7 @@ Requires: which Requires: gperftools-libs >= 2.6.1 %endif %endif -%if 0%{?suse_version} +%if 0%{?weak_deps} Recommends: chrony %endif %description base @@ -438,12 +440,14 @@ Requires: python%{_python_buildid}-werkzeug %if 0%{?suse_version} Requires: python%{_python_buildid}-CherryPy Requires: python%{_python_buildid}-Werkzeug -Recommends: python%{_python_buildid}-influxdb +%endif +%if 0%{?weak_deps} Recommends: ceph-mgr-dashboard = %{_epoch_prefix}%{version}-%{release} Recommends: ceph-mgr-diskprediction-local = %{_epoch_prefix}%{version}-%{release} Recommends: ceph-mgr-diskprediction-cloud = %{_epoch_prefix}%{version}-%{release} Recommends: ceph-mgr-rook = %{_epoch_prefix}%{version}-%{release} Recommends: ceph-mgr-ssh = %{_epoch_prefix}%{version}-%{release} +Recommends: python%{_python_buildid}-influxdb %endif %if 0%{?rhel} == 7 Requires: pyOpenSSL