diff mbox series

[ndctl] ndctl.spec.in: enable libtrace{event|fs} support for Fedora

Message ID 20240821214529.96966-1-alison.schofield@intel.com (mailing list archive)
State Accepted
Commit 2df04c98be394d4a78c20d0699837fd3ae93de97
Headers show
Series [ndctl] ndctl.spec.in: enable libtrace{event|fs} support for Fedora | expand

Commit Message

Alison Schofield Aug. 21, 2024, 9:45 p.m. UTC
From: Jerry James <loganjerry@gmail.com>

As noted in https://src.fedoraproject.org/rpms/ndctl/pull-request/2,
the expression "0%{?rhel}" evaluates to zero on Fedora, so the
conditional "%if 0%{?rhel} < 9" evaluates to true, since 0 is less
than 9. The result is that ndctl builds for Fedora lack support for
libtraceevent and libtracefs. Correct the expression.

Reposted here from github pull request:
https://github.com/pmem/ndctl/pull/266/

Signed-off-by: Jerry James <loganjerry@gmail.com>
---
 ndctl.spec.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Verma, Vishal L Aug. 21, 2024, 9:50 p.m. UTC | #1
On Wed, 2024-08-21 at 14:45 -0700, alison.schofield@intel.com wrote:
> From: Jerry James <loganjerry@gmail.com>
> 
> As noted in https://src.fedoraproject.org/rpms/ndctl/pull-request/2,
> the expression "0%{?rhel}" evaluates to zero on Fedora, so the
> conditional "%if 0%{?rhel} < 9" evaluates to true, since 0 is less
> than 9. The result is that ndctl builds for Fedora lack support for
> libtraceevent and libtracefs. Correct the expression.
> 
> Reposted here from github pull request:
> https://github.com/pmem/ndctl/pull/266/
> 
> Signed-off-by: Jerry James <loganjerry@gmail.com>

Looks good,
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>

> ---
>  ndctl.spec.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ndctl.spec.in b/ndctl.spec.in
> index cb9cb6fe0b86..ea9fadc266d8 100644
> --- a/ndctl.spec.in
> +++ b/ndctl.spec.in
> @@ -10,7 +10,7 @@ Requires:	LNAME%{?_isa} = %{version}-
> %{release}
>  Requires:	DAX_LNAME%{?_isa} = %{version}-%{release}
>  Requires:	CXL_LNAME%{?_isa} = %{version}-%{release}
>  BuildRequires:	autoconf
> -%if 0%{?rhel} < 9
> +%if 0%{?rhel} && 0%{?rhel} < 9
>  BuildRequires:	asciidoc
>  %define asciidoctor -Dasciidoctor=disabled
>  %define libtracefs -Dlibtracefs=disabled
Dave Jiang Aug. 21, 2024, 9:58 p.m. UTC | #2
On 8/21/24 2:45 PM, alison.schofield@intel.com wrote:
> From: Jerry James <loganjerry@gmail.com>
> 
> As noted in https://src.fedoraproject.org/rpms/ndctl/pull-request/2,
> the expression "0%{?rhel}" evaluates to zero on Fedora, so the
> conditional "%if 0%{?rhel} < 9" evaluates to true, since 0 is less
> than 9. The result is that ndctl builds for Fedora lack support for
> libtraceevent and libtracefs. Correct the expression.
> 
> Reposted here from github pull request:
> https://github.com/pmem/ndctl/pull/266/
> 
> Signed-off-by: Jerry James <loganjerry@gmail.com>

Reviewed-by: Dave Jiang <dave.jiang@intel.com>
> ---
>  ndctl.spec.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ndctl.spec.in b/ndctl.spec.in
> index cb9cb6fe0b86..ea9fadc266d8 100644
> --- a/ndctl.spec.in
> +++ b/ndctl.spec.in
> @@ -10,7 +10,7 @@ Requires:	LNAME%{?_isa} = %{version}-%{release}
>  Requires:	DAX_LNAME%{?_isa} = %{version}-%{release}
>  Requires:	CXL_LNAME%{?_isa} = %{version}-%{release}
>  BuildRequires:	autoconf
> -%if 0%{?rhel} < 9
> +%if 0%{?rhel} && 0%{?rhel} < 9
>  BuildRequires:	asciidoc
>  %define asciidoctor -Dasciidoctor=disabled
>  %define libtracefs -Dlibtracefs=disabled
diff mbox series

Patch

diff --git a/ndctl.spec.in b/ndctl.spec.in
index cb9cb6fe0b86..ea9fadc266d8 100644
--- a/ndctl.spec.in
+++ b/ndctl.spec.in
@@ -10,7 +10,7 @@  Requires:	LNAME%{?_isa} = %{version}-%{release}
 Requires:	DAX_LNAME%{?_isa} = %{version}-%{release}
 Requires:	CXL_LNAME%{?_isa} = %{version}-%{release}
 BuildRequires:	autoconf
-%if 0%{?rhel} < 9
+%if 0%{?rhel} && 0%{?rhel} < 9
 BuildRequires:	asciidoc
 %define asciidoctor -Dasciidoctor=disabled
 %define libtracefs -Dlibtracefs=disabled