]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rpm: use Recommends on fedora also
authorKefu Chai <kchai@redhat.com>
Thu, 7 Mar 2019 12:28:24 +0000 (20:28 +0800)
committerErnesto Puerta <epuertat@redhat.com>
Wed, 8 Apr 2020 17:29:03 +0000 (19:29 +0200)
"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>
(cherry picked from commit 147531515b51d7b571b3a4a97e7cbdce239a049a)
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
ceph.spec.in

index 052ee224d6d639945fd8484246fec8a1e9494847..a727693a4146ee5cd64a8ea364ae569ce1214387 100644 (file)
@@ -78,7 +78,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}
@@ -375,7 +377,7 @@ Requires:      which
 Requires:      gperftools-libs >= 2.6.1
 %endif
 %endif
-%if 0%{?suse_version}
+%if 0%{?weak_deps}
 Recommends:    chrony
 %endif
 %description base
@@ -452,13 +454,15 @@ 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-k8sevents = %{_epoch_prefix}%{version}-%{release}
 Recommends:    ceph-mgr-ssh = %{_epoch_prefix}%{version}-%{release}
+Recommends:    python%{_python_buildid}-influxdb
 %endif
 %if 0%{?rhel} == 7
 Requires:       pyOpenSSL