[PATCH] rpm: Fix conditional for defining %_vpath_builddir for RHEL <= 7

Neal Gompa posted 1 patch 3 years, 7 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20200830000918.11431-1-ngompa13@gmail.com
libvirt.spec.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] rpm: Fix conditional for defining %_vpath_builddir for RHEL <= 7
Posted by Neal Gompa 3 years, 7 months ago
The conditional was incorrectly overriding %_vpath_builddir when
%rhel is not defined, which led to surprising behavior when the
global %_vpath_builddir path is set on Fedora already.

Signed-off-by: Neal Gompa <ngompa13@gmail.com>
---
 libvirt.spec.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index bb74443484..4b9e04ae61 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -32,7 +32,7 @@
 %endif
 
 # On RHEL 7 and older macro _vpath_builddir is not defined.
-%if 0%{?rhel} <= 7
+%if 0%{?rhel} && 0%{?rhel} <= 7
     %define _vpath_builddir %{_target_platform}
 %endif
 
-- 
2.26.2

Re: [PATCH] rpm: Fix conditional for defining %_vpath_builddir for RHEL <= 7
Posted by Jiri Denemark 3 years, 7 months ago
On Sat, Aug 29, 2020 at 20:09:18 -0400, Neal Gompa wrote:
> The conditional was incorrectly overriding %_vpath_builddir when
> %rhel is not defined, which led to surprising behavior when the
> global %_vpath_builddir path is set on Fedora already.
> 
> Signed-off-by: Neal Gompa <ngompa13@gmail.com>
> ---
>  libvirt.spec.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libvirt.spec.in b/libvirt.spec.in
> index bb74443484..4b9e04ae61 100644
> --- a/libvirt.spec.in
> +++ b/libvirt.spec.in
> @@ -32,7 +32,7 @@
>  %endif
>  
>  # On RHEL 7 and older macro _vpath_builddir is not defined.
> -%if 0%{?rhel} <= 7
> +%if 0%{?rhel} && 0%{?rhel} <= 7
>      %define _vpath_builddir %{_target_platform}
>  %endif
>  

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>

Re: [PATCH] rpm: Fix conditional for defining %_vpath_builddir for RHEL <= 7
Posted by Neal Gompa 3 years, 7 months ago
On Tue, Sep 1, 2020 at 3:40 AM Jiri Denemark <jdenemar@redhat.com> wrote:
>
> On Sat, Aug 29, 2020 at 20:09:18 -0400, Neal Gompa wrote:
> > The conditional was incorrectly overriding %_vpath_builddir when
> > %rhel is not defined, which led to surprising behavior when the
> > global %_vpath_builddir path is set on Fedora already.
> >
> > Signed-off-by: Neal Gompa <ngompa13@gmail.com>
> > ---
> >  libvirt.spec.in | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/libvirt.spec.in b/libvirt.spec.in
> > index bb74443484..4b9e04ae61 100644
> > --- a/libvirt.spec.in
> > +++ b/libvirt.spec.in
> > @@ -32,7 +32,7 @@
> >  %endif
> >
> >  # On RHEL 7 and older macro _vpath_builddir is not defined.
> > -%if 0%{?rhel} <= 7
> > +%if 0%{?rhel} && 0%{?rhel} <= 7
> >      %define _vpath_builddir %{_target_platform}
> >  %endif
> >
>
> Reviewed-by: Jiri Denemark <jdenemar@redhat.com>

JFYI, something odd happened when you applied the patch:
https://gitlab.com/libvirt/libvirt/-/commit/ab02e1d5e1100723bbbd4bad82dd4515d61daa62

This weird Message-Id field snuck into the commit message, you might
want to check your automation here...


-- 
真実はいつも一つ!/ Always, there's only one truth!