Skip to contentSkip to conversation

redhat: Fix the condition for pyverbs enablement on Fedora 32 and up

PATCH In review Alaa Hleihel 3 participants 3 messages Jun 28, 2020 – Jun 30, 2020 InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 redhat: Fix the condition for pyverbs enablement on Fedora 32 and up

The cited commit enabled pyverbs build by default for Fedora 32 and up. However, it broke enalbing pyverbs build when passing '--with pyverbs' flag.

Fix the condition so that now the behavior for Fedora 32 and up will be:
* Default: pyverbs enabled.
* --with pyverbs: pyverbs enabled.
* --without pyverbs: pyverbs disabled.

Fixes 07b304b75186 ("redhat: Build pyverbs for Fedora greater than release 31")
CC Honggang Li <[email protected]>
---
 redhat/rdma-core.spec | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
redhat/rdma-core.spec +1 -1
index 7ff33b3ca8b8..76549e5cb61f 100644
@@ -28,7 +28,7 @@ BuildRequires: valgrind-devel
 BuildRequires: systemd
 BuildRequires: systemd-devel
 %if 0%{?fedora} >= 32
-%define with_pyverbs %{?_with_pyverbs: 0} %{?!_with_pyverbs: 1}
+%define with_pyverbs %{?_with_pyverbs: 1} %{?!_with_pyverbs: %{?!_without_pyverbs: 1} %{?_without_pyverbs: 0}}
 %else
 %define with_pyverbs %{?_with_pyverbs: 1} %{?!_with_pyverbs: 0}
 %endif
Signature · 1 line
2.26.2
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Alaa Hleihel

The cited commit enabled pyverbs build by default for Fedora 32 and up. However, it broke enalbing pyverbs build when passing '--with pyverbs' flag.

Fix the condition so that now the behavior for Fedora 32 and up will be:
* Default: pyverbs enabled.

Confirmed this patch works for me. Thanks!

Quoted 28 lines

* --with pyverbs: pyverbs enabled.
* --without pyverbs: pyverbs disabled.

Fixes 07b304b75186 ("redhat: Build pyverbs for Fedora greater than release 31")
CC Honggang Li <[email protected]>
---
 redhat/rdma-core.spec | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
redhat/rdma-core.spec +1 -1
index 7ff33b3ca8b8..76549e5cb61f 100644
@@ -28,7 +28,7 @@ BuildRequires: valgrind-devel
 BuildRequires: systemd
 BuildRequires: systemd-devel
 %if 0%{?fedora} >= 32
-%define with_pyverbs %{?_with_pyverbs: 0} %{?!_with_pyverbs: 1}
+%define with_pyverbs %{?_with_pyverbs: 1} %{?!_with_pyverbs: %{?!_without_pyverbs: 1} %{?_without_pyverbs: 0}}
 %else
 %define with_pyverbs %{?_with_pyverbs: 1} %{?!_with_pyverbs: 0}
 %endif
Signature · 1 line
2.26.2
#2 lore raw
In reply to Alaa Hleihel
Quoted 8 lines · Alaa Hleihel

The cited commit enabled pyverbs build by default for Fedora 32 and up. However, it broke enalbing pyverbs build when passing '--with pyverbs' flag.

Fix the condition so that now the behavior for Fedora 32 and up will be:
* Default: pyverbs enabled.
* --with pyverbs: pyverbs enabled.
* --without pyverbs: pyverbs disabled.

Quoted 8 lines
Fixes 07b304b75186 ("redhat: Build pyverbs for Fedora greater than release 31")
CC Honggang Li <[email protected]>
---
 redhat/rdma-core.spec | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

I'll wait for the results of this PR and merge it.
https://github.com/linux-rdma/rdma-core/pull/784

Thanks