]> xenbits.xensource.com Git - libvirt.git/commitdiff
meson: stop looking for iptables/ip6tables/ebtables at build time
authorLaine Stump <laine@redhat.com>
Sat, 20 Apr 2024 02:19:43 +0000 (22:19 -0400)
committerLaine Stump <laine@redhat.com>
Thu, 23 May 2024 03:20:07 +0000 (23:20 -0400)
This was the only reason we required the iptables and ebtables
packages at build time, and many other external commands already have
their binaries found at runtime by looking through $PATH (virCommand
automatically does this), so we may as well do it for these commands
as well.

Since we no longer need iptables or iptables at build time, we can
also drop the BuildRequires for them from the rpm specfile.

Inspired-by: 6aa2fa38b04b802f137e51ebbeb4ca9b67487575
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
libvirt.spec.in
meson.build
src/network/bridge_driver_conf.c
src/util/virfirewall.h

index 0e8dc000f37af2f48d91667bf9494fb243647426..fce312c8ab84dc40d00bef5fe59b599652754b7e 100644 (file)
@@ -356,8 +356,6 @@ BuildRequires: sanlock-devel >= 2.4
 BuildRequires: libpcap-devel >= 1.5.0
 BuildRequires: libnl3-devel
 BuildRequires: libselinux-devel
-BuildRequires: iptables
-BuildRequires: ebtables
 # For modprobe
 BuildRequires: kmod
 BuildRequires: cyrus-sasl-devel
index af3719a73444d8319ad7dc7fad3dafd8105f45ba..91211d796454decb851790b384f83851c76ed7b4 100644 (file)
@@ -838,10 +838,7 @@ optional_test_programs = [
 
 optional_programs = [
   'dmidecode',
-  'ebtables',
   'ip',
-  'ip6tables',
-  'iptables',
   'iscsiadm',
   'mdevctl',
   'mm-ctl',
index f63a9780960f32312add90a7f75fb6773131e806..c619a0a09c32a0ae172d7977ec273af4f723c326 100644 (file)
 #include "virerror.h"
 #include "virfile.h"
 #include "virutil.h"
+#include "virfirewall.h" /* for binary names */
 #include "bridge_driver_conf.h"
 
+
 #define VIR_FROM_THIS VIR_FROM_NETWORK
 
 VIR_LOG_INIT("network.bridge_driver");
index 917745c31531398119d56ce9c7b7c88507ab9a43..4ac16f02b3ae2060937efa7ca14666c13e1f86f7 100644 (file)
 #include "virbuffer.h"
 #include "virxml.h"
 
+/* various external programs executed when applying firewalls */
+#define EBTABLES "ebtables"
+#define IPTABLES "iptables"
+#define IP6TABLES "ip6tables"
+
 typedef struct _virFirewall virFirewall;
 
 typedef struct _virFirewallCmd virFirewallCmd;