[PATCH rdma-core] specs: Disable package python3-pyverbs if no python_provide macro exists

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Tzafrir Cohen <tzafrir@xxxxxxxxxx>

The RH systems before 7.6 didn't have %python_provide macro and it
caused to rpmbuild failures on such platforms. Don't ever check
python_provide if pyverbs is not build.

Signed-off-by: Tzafrir Cohen <tzafrir@xxxxxxxxxx>
Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
---
PR: https://github.com/linux-rdma/rdma-core/pull/455
---
 redhat/rdma-core.spec | 2 ++
 suse/rdma-core.spec   | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/redhat/rdma-core.spec b/redhat/rdma-core.spec
index 7e8d43a3..8ddd54a1 100644
--- a/redhat/rdma-core.spec
+++ b/redhat/rdma-core.spec
@@ -217,6 +217,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
 In conjunction with the kernel ib_srp driver, srp_daemon allows you to
 discover and use SCSI devices via the SCSI RDMA Protocol over InfiniBand.

+%if %{with_pyverbs}
 %package -n python3-pyverbs
 Summary: Python3 API over IB verbs
 %{?python_provide:%python_provide python3-pyverbs}
@@ -224,6 +225,7 @@ Summary: Python3 API over IB verbs
 %description -n python3-pyverbs
 Pyverbs is a Cython-based Python API over libibverbs, providing an
 easy, object-oriented access to IB verbs.
+%endif

 %prep
 %setup
diff --git a/suse/rdma-core.spec b/suse/rdma-core.spec
index dd52080f..13f3feef 100644
--- a/suse/rdma-core.spec
+++ b/suse/rdma-core.spec
@@ -330,6 +330,7 @@ rdma-ndd is a system daemon which watches for rdma device changes and/or
 hostname changes and updates the Node Description of the rdma devices based
 on those changes.

+%if %{with_pyverbs}
 %package -n python3-pyverbs
 Summary:        Python3 API over IB verbs
 Group:          Development/Languages/Python
@@ -337,6 +338,7 @@ Group:          Development/Languages/Python
 %description -n python3-pyverbs
 Pyverbs is a Cython-based Python API over libibverbs, providing an
 easy, object-oriented access to IB verbs.
+%endif

 %prep
 %setup -q -n  %{name}-%{version}%{git_ver}
--
2.20.1




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux