build: add path definition for ip6tables

This commit is contained in:
Jan Vaclav
2025-03-11 11:18:59 +01:00
parent 10c2892d57
commit 0f469b30ad
7 changed files with 10 additions and 0 deletions

View File

@@ -67,6 +67,9 @@
/* Define to path of iptables binary */
#mesondefine IPTABLES_PATH
/* Define to path of ip6tables binary */
#mesondefine IP6TABLES_PATH
/* Define to path of nft binary */
#mesondefine NFT_PATH

View File

@@ -597,6 +597,7 @@ Preferably use nmcli instead.
%endif
-Dnft=%{_sbindir}/nft \
-Diptables=%{_sbindir}/iptables \
-Dip6tables=%{_sbindir}/ip6tables \
%if %{with dhclient}
-Ddhclient=%{_sbindir}/dhclient \
%else

View File

@@ -222,6 +222,7 @@ if [[ $NO_DIST != 1 ]]; then
-Dconfig_dhcp_default=internal \
-Dconfig_dns_rc_manager_default=auto \
-Diptables=/usr/sbin/iptables \
-Dip6tables=/usr/sbin/ip6tables \
-Dnft=/usr/bin/nft \
|| die "Error meson setup"

View File

@@ -368,6 +368,7 @@ meson setup\
$(args_enable "$P_TEST" --werror) \
-Dnft="${D_SBINDIR}/nft" \
-Diptables="${D_SBINDIR}/iptables" \
-Dip6tables="${D_SBINDIR}/ip6tables" \
-Ddhclient="${D_SBINDIR}/dhclient" \
-Ddhcpcd=no \
-Dconfig_dhcp_default="$P_DHCP_DEFAULT" \

View File

@@ -723,6 +723,7 @@ default_paths = ['/sbin', '/usr/sbin']
# 0: cmdline option, 1: paths, 2: fallback
progs = [['iptables', default_paths, '/usr/sbin/iptables'],
['ip6tables', default_paths, '/usr/sbin/ip6tables'],
['nft', default_paths, '/usr/sbin/nft'],
['dnsmasq', default_paths, ''],
['modprobe', default_paths, '/sbin/modprobe']
@@ -1125,6 +1126,7 @@ endif
output += '\n'
output += ' jansson: ' + jansson_msg + '\n'
output += ' iptables: ' + config_h.get('IPTABLES_PATH') + '\n'
output += ' ip6tables: ' + config_h.get('IP6TABLES_PATH') + '\n'
output += ' nft: ' + config_h.get('NFT_PATH') + '\n'
output += ' modprobe: ' + config_h.get('MODPROBE_PATH') + '\n'
output += ' modemmanager-1: ' + enable_modem_manager.to_string() + '\n'

View File

@@ -6,6 +6,7 @@ option('dbus_conf_dir', type: 'string', value: '', description: 'where D-Bus sys
option('kernel_firmware_dir', type: 'string', value: '/lib/firmware', description: 'where kernel firmware directory is (default is /lib/firmware)')
option('runtime_dir', type: 'string', value: '', description: 'Directory for transient runtime state [default: LOCALSTATEDIR/run or /run]')
option('iptables', type: 'string', value: '', description: 'path to iptables')
option('ip6tables', type: 'string', value: '', description: 'path to ip6tables')
option('nft', type: 'string', value: '', description: 'path to nft')
option('dnsmasq', type: 'string', value: '', description: 'path to dnsmasq')
option('modprobe', type: 'string', value: '', description: 'path to modprobe')

View File

@@ -36,6 +36,7 @@ test_config_h(void)
G_STMT_END
ABSOLUTE_PATH(IPTABLES_PATH);
ABSOLUTE_PATH(IP6TABLES_PATH);
ABSOLUTE_PATH(NFT_PATH);
}