[libvirt PATCH 1/2] rpm: remove with_bash_completion condition

Daniel P. Berrangé berrange at redhat.com
Wed Oct 28 12:30:36 UTC 2020

The %meson macro sets "--auto-features=enabled", thus any feature in the
RPM which has a "with_XXX" condition, needs to explicitly pass a
"-DXXX=state" arg to %meson to override the auto features setting.

The with_bash_completion condition is always set to 1, so rather than
adding an arg to %meson, just remove the condition.

Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
 libvirt.spec.in | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index 84515cc7de..47fb53c681 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -94,7 +94,6 @@
 # Other optional features
-%define with_bash_completion  0%{!?_without_bash_completion:1}
 %define with_numactl          0%{!?_without_numactl:1}
 # A few optional bits off by default, we enable later
@@ -279,9 +278,7 @@ BuildRequires: glib2-devel >= 2.48
 BuildRequires: libxml2-devel
 BuildRequires: libxslt
 BuildRequires: readline-devel
-%if %{with_bash_completion}
 BuildRequires: bash-completion >= 2.0
 BuildRequires: gettext
 BuildRequires: libtasn1-devel
 BuildRequires: gnutls-devel
@@ -897,9 +894,7 @@ Requires: %{name}-libs = %{version}-%{release}
 Requires: gettext
 # Needed by virt-pki-validate script.
 Requires: gnutls-utils
-%if %{with_bash_completion}
 Requires: %{name}-bash-completion = %{version}-%{release}
 %description client
 The client binaries needed to access the virtualization
@@ -919,20 +914,16 @@ Shared libraries for accessing the libvirt daemon.
 %package admin
 Summary: Set of tools to control libvirt daemon
 Requires: %{name}-libs = %{version}-%{release}
-%if %{with_bash_completion}
 Requires: %{name}-bash-completion = %{version}-%{release}
 %description admin
 The client side utilities to control the libvirt daemon.
-%if %{with_bash_completion}
 %package bash-completion
 Summary: Bash completion script
 %description bash-completion
 Bash completion script stub.
 %if %{with_wireshark}
 %package wireshark
@@ -1855,9 +1846,7 @@ exit 0
-%if %{with_bash_completion}
@@ -1885,14 +1874,10 @@ exit 0
 %files admin
-%if %{with_bash_completion}
-%if %{with_bash_completion}
 %files bash-completion
 %if %{with_wireshark}
 %files wireshark

More information about the libvir-list mailing list