]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rpm: use Recommends on fedora also 26819/head
authorKefu Chai <kchai@redhat.com>
Thu, 7 Mar 2019 12:28:24 +0000 (20:28 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 7 Mar 2019 14:42:36 +0000 (22:42 +0800)
"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 <kchai@redhat.com>
ceph.spec.in

index 7f0dc99676437d897b483094c1fa8b906113972e..1a61e2d79dcf6f8b3421f1522ff4bd35d982a754 100644 (file)
@@ -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