[libvirt PATCH 1/9] spec: Simplify setting features off by default

Andrea Bolognani posted 9 patches 5 years, 4 months ago
There is a newer version of this series
[libvirt PATCH 1/9] spec: Simplify setting features off by default
Posted by Andrea Bolognani 5 years, 4 months ago
The right-hand side of these expressions will always evaluate to
zero. Stop obfuscating this fact.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
 libvirt.spec.in | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index d13aae5cf5..815ab246e9 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -85,15 +85,15 @@
 %endif
 
 # A few optional bits off by default, we enable later
-%define with_fuse          0%{!?_without_fuse:0}
-%define with_sanlock       0%{!?_without_sanlock:0}
-%define with_numad         0%{!?_without_numad:0}
-%define with_firewalld     0%{!?_without_firewalld:0}
-%define with_firewalld_zone 0%{!?_without_firewalld_zone:0}
-%define with_libssh2       0%{!?_without_libssh2:0}
-%define with_wireshark     0%{!?_without_wireshark:0}
-%define with_libssh        0%{!?_without_libssh:0}
-%define with_bash_completion  0%{!?_without_bash_completion:0}
+%define with_fuse             0
+%define with_sanlock          0
+%define with_numad            0
+%define with_firewalld        0
+%define with_firewalld_zone   0
+%define with_libssh2          0
+%define with_wireshark        0
+%define with_libssh           0
+%define with_bash_completion  0
 
 # Finally set the OS / architecture specific special cases
 
-- 
2.26.2

Re: [libvirt PATCH 1/9] spec: Simplify setting features off by default
Posted by Neal Gompa 5 years, 4 months ago
On Mon, Oct 5, 2020 at 2:40 PM Andrea Bolognani <abologna@redhat.com> wrote:
>
> The right-hand side of these expressions will always evaluate to
> zero. Stop obfuscating this fact.
>
> Signed-off-by: Andrea Bolognani <abologna@redhat.com>
> ---
>  libvirt.spec.in | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/libvirt.spec.in b/libvirt.spec.in
> index d13aae5cf5..815ab246e9 100644
> --- a/libvirt.spec.in
> +++ b/libvirt.spec.in
> @@ -85,15 +85,15 @@
>  %endif
>
>  # A few optional bits off by default, we enable later
> -%define with_fuse          0%{!?_without_fuse:0}
> -%define with_sanlock       0%{!?_without_sanlock:0}
> -%define with_numad         0%{!?_without_numad:0}
> -%define with_firewalld     0%{!?_without_firewalld:0}
> -%define with_firewalld_zone 0%{!?_without_firewalld_zone:0}
> -%define with_libssh2       0%{!?_without_libssh2:0}
> -%define with_wireshark     0%{!?_without_wireshark:0}
> -%define with_libssh        0%{!?_without_libssh:0}
> -%define with_bash_completion  0%{!?_without_bash_completion:0}
> +%define with_fuse             0
> +%define with_sanlock          0
> +%define with_numad            0
> +%define with_firewalld        0
> +%define with_firewalld_zone   0
> +%define with_libssh2          0
> +%define with_wireshark        0
> +%define with_libssh           0
> +%define with_bash_completion  0
>
>  # Finally set the OS / architecture specific special cases
>

This crazy setup is an attempt to implement rpm %bcond behavior
without actually using %bcond statements. Instead of removing the
right-hand-side conditionals, perhaps it'd be better to just finally
make the switch to %bcond statements.


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


Re: [libvirt PATCH 1/9] spec: Simplify setting features off by default
Posted by Andrea Bolognani 5 years, 4 months ago
On Mon, 2020-10-05 at 20:42 -0400, Neal Gompa wrote:
> On Mon, Oct 5, 2020 at 2:40 PM Andrea Bolognani <abologna@redhat.com> wrote:
> > -%define with_fuse          0%{!?_without_fuse:0}
> > -%define with_sanlock       0%{!?_without_sanlock:0}
> > -%define with_numad         0%{!?_without_numad:0}
> > -%define with_firewalld     0%{!?_without_firewalld:0}
> > -%define with_firewalld_zone 0%{!?_without_firewalld_zone:0}
> > -%define with_libssh2       0%{!?_without_libssh2:0}
> > -%define with_wireshark     0%{!?_without_wireshark:0}
> > -%define with_libssh        0%{!?_without_libssh:0}
> > -%define with_bash_completion  0%{!?_without_bash_completion:0}
> > +%define with_fuse             0
> > +%define with_sanlock          0
> > +%define with_numad            0
> > +%define with_firewalld        0
> > +%define with_firewalld_zone   0
> > +%define with_libssh2          0
> > +%define with_wireshark        0
> > +%define with_libssh           0
> > +%define with_bash_completion  0
> 
> This crazy setup is an attempt to implement rpm %bcond behavior
> without actually using %bcond statements. Instead of removing the
> right-hand-side conditionals, perhaps it'd be better to just finally
> make the switch to %bcond statements.

Do you have any idea what the availability of %bcond is?
Specifically, can we use it on RHEL 7? If so, I can take a stab at
converting our spec file, but I don't think that invalidates the
current series and I would prefer it to be merged first. It will be a
better starting point for the conversion anyway.

-- 
Andrea Bolognani / Red Hat / Virtualization

Re: [libvirt PATCH 1/9] spec: Simplify setting features off by default
Posted by Neal Gompa 5 years, 4 months ago
On Tue, Oct 6, 2020 at 6:09 AM Andrea Bolognani <abologna@redhat.com> wrote:
>
> On Mon, 2020-10-05 at 20:42 -0400, Neal Gompa wrote:
> > On Mon, Oct 5, 2020 at 2:40 PM Andrea Bolognani <abologna@redhat.com> wrote:
> > > -%define with_fuse          0%{!?_without_fuse:0}
> > > -%define with_sanlock       0%{!?_without_sanlock:0}
> > > -%define with_numad         0%{!?_without_numad:0}
> > > -%define with_firewalld     0%{!?_without_firewalld:0}
> > > -%define with_firewalld_zone 0%{!?_without_firewalld_zone:0}
> > > -%define with_libssh2       0%{!?_without_libssh2:0}
> > > -%define with_wireshark     0%{!?_without_wireshark:0}
> > > -%define with_libssh        0%{!?_without_libssh:0}
> > > -%define with_bash_completion  0%{!?_without_bash_completion:0}
> > > +%define with_fuse             0
> > > +%define with_sanlock          0
> > > +%define with_numad            0
> > > +%define with_firewalld        0
> > > +%define with_firewalld_zone   0
> > > +%define with_libssh2          0
> > > +%define with_wireshark        0
> > > +%define with_libssh           0
> > > +%define with_bash_completion  0
> >
> > This crazy setup is an attempt to implement rpm %bcond behavior
> > without actually using %bcond statements. Instead of removing the
> > right-hand-side conditionals, perhaps it'd be better to just finally
> > make the switch to %bcond statements.
>
> Do you have any idea what the availability of %bcond is?
> Specifically, can we use it on RHEL 7? If so, I can take a stab at
> converting our spec file, but I don't think that invalidates the
> current series and I would prefer it to be merged first. It will be a
> better starting point for the conversion anyway.
>

%bcond support has been around since 2000. :)

If this is merged first, I can then convert them to %bconds...


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


Re: [libvirt PATCH 1/9] spec: Simplify setting features off by default
Posted by Andrea Bolognani 5 years, 4 months ago
On Tue, 2020-10-06 at 07:41 -0400, Neal Gompa wrote:
> On Tue, Oct 6, 2020 at 6:09 AM Andrea Bolognani <abologna@redhat.com> wrote:
> > On Mon, 2020-10-05 at 20:42 -0400, Neal Gompa wrote:
> > > This crazy setup is an attempt to implement rpm %bcond behavior
> > > without actually using %bcond statements. Instead of removing the
> > > right-hand-side conditionals, perhaps it'd be better to just finally
> > > make the switch to %bcond statements.
> > 
> > Do you have any idea what the availability of %bcond is?
> > Specifically, can we use it on RHEL 7? If so, I can take a stab at
> > converting our spec file, but I don't think that invalidates the
> > current series and I would prefer it to be merged first. It will be a
> > better starting point for the conversion anyway.
> 
> %bcond support has been around since 2000. :)
> 
> If this is merged first, I can then convert them to %bconds...

I'll gladly take you up on that offer :)

-- 
Andrea Bolognani / Red Hat / Virtualization