Re: [libvirt PATCH v2 2/2] rpm: disable netcf for the interface driver in rpm build on new targets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jan 24, 2021 at 01:44:26AM -0500, Laine Stump wrote:
> libvirt.spec currently adds a hardcoded -Dnetcf=enabled to the meson
> commandline, so just setting the default in the meson.build file won't
> have any effect for rpm builds - it will be overridden.
> 
> This patch changes the meson commandline in the spec file from
> hardcoded -Dnetcf=enabled to %{arg_netcf}, which is itself set
> according to the value of %{with_netcf}; and *that* is normally set
> according to the distro release of the build target (1 for Fedora >=
> 34 and RHEL >= 9, 0 otherwise), but can be manually overridden by
> adding "-without netcf" to the rpmbuild commandline.
> 
> Along with being used to determine what arg to pass to meson,
> %{with_netcf} is also checked when deciding on whether or not to add
> netcf build time / install time dependencies ("Requires: netcf-libs"
> and "BuildRequires: netcf-devel")
> 
> Signed-off-by: Laine Stump <laine@xxxxxxxxxx>
> ---
>  libvirt.spec.in | 22 +++++++++++++++++-----
>  1 file changed, 17 insertions(+), 5 deletions(-)
> 
> diff --git a/libvirt.spec.in b/libvirt.spec.in
> index b5892987cf..f7c350db41 100644
> --- a/libvirt.spec.in
> +++ b/libvirt.spec.in
> @@ -101,6 +101,7 @@
>  %define with_sanlock          0
>  %define with_numad            0
>  %define with_firewalld_zone   0
> +%define with_netcf            0
>  %define with_libssh2          0
>  %define with_wireshark        0
>  %define with_libssh           0
> @@ -145,6 +146,10 @@
>      %define with_firewalld_zone 0%{!?_without_firewalld_zone:1}
>  %endif
>  
> +%if 0%{?fedora} < 34 || 0%{?rhel} < 9
> +    %define with_netcf 0%{!?_without_netcf:1}
> +%endif
> +
>  
>  # fuse is used to provide virtualized /proc for LXC
>  %if %{with_lxc}
> @@ -358,8 +363,9 @@ BuildRequires: fuse-devel >= 2.8.6
>  %if %{with_libssh2}
>  BuildRequires: libssh2-devel >= 1.3.0
>  %endif
> -
> +%if %{with_netcf}
>  BuildRequires: netcf-devel >= 0.2.2
> +%endif
>  %if %{with_esx}
>  BuildRequires: libcurl-devel
>  %endif
> @@ -528,13 +534,13 @@ capabilities.
>  Summary: Interface driver plugin for the libvirtd daemon
>  Requires: libvirt-daemon = %{version}-%{release}
>  Requires: libvirt-libs = %{version}-%{release}
> +%if %{with_netcf}
>  Requires: netcf-libs >= 0.2.2
> +%endif
>  
>  %description daemon-driver-interface
>  The interface driver plugin for the libvirtd daemon, providing
> -an implementation of the network interface APIs using the
> -netcf library
> -
> +an implementation of the network interface APIs using udev.

s/using udev//

because it may still be netcf on some distro versions


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux