mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-22 18:08:16 +00:00
[#3731] Address review
This commit is contained in:
parent
993561930c
commit
b40369e33f
@ -6,8 +6,8 @@ subdir('tests')
|
|||||||
|
|
||||||
fuzz_sources = ['fuzz.cc', 'fuzz.h']
|
fuzz_sources = ['fuzz.cc', 'fuzz.h']
|
||||||
cpp_flags = [
|
cpp_flags = [
|
||||||
f'-DKEA_LFC_INSTALLATION="@PREFIX@/sbin/kea-lfc"',
|
f'-DKEA_LFC_INSTALLATION="@KEA_LFC_INSTALLED@"',
|
||||||
f'-DKEA_LFC_SOURCES="@TOP_BUILD_DIR@/src/bin/lfc/kea-lfc"',
|
f'-DKEA_LFC_SOURCES="@KEA_LFC_BUILT@"',
|
||||||
]
|
]
|
||||||
if FUZZING_WITH_CLUSTERFUZZLITE
|
if FUZZING_WITH_CLUSTERFUZZLITE
|
||||||
cpp_flags = ['-fsanitize=fuzzer', '-gdwarf-4']
|
cpp_flags = ['-fsanitize=fuzzer', '-gdwarf-4']
|
||||||
|
10
meson.build
10
meson.build
@ -45,11 +45,15 @@ PREFIX = get_option('prefix')
|
|||||||
SBINDIR = get_option('sbindir')
|
SBINDIR = get_option('sbindir')
|
||||||
SYSCONFDIR = get_option('sysconfdir')
|
SYSCONFDIR = get_option('sysconfdir')
|
||||||
|
|
||||||
DHCP_DATA_DIR = LOCALSTATEDIR / 'run/kea'
|
|
||||||
DEFAULT_HOOKS_PATH = PREFIX / 'lib/kea/hooks'
|
|
||||||
TEST_CA_DIR = TOP_SOURCE_DIR / 'src/lib/asiolink/testutils/ca'
|
|
||||||
DATABASE_SCRIPTS_DIR = TOP_BUILD_DIR / 'src/share/database/scripts'
|
DATABASE_SCRIPTS_DIR = TOP_BUILD_DIR / 'src/share/database/scripts'
|
||||||
|
DHCP_DATA_DIR = LOCALSTATEDIR / 'run/kea'
|
||||||
|
DEFAULT_HOOKS_PATH = PREFIX / LIBDIR / 'kea/hooks'
|
||||||
|
KEA_ADMIN_BUILT = TOP_BUILD_DIR / 'src/bin/lfc/kea-admin'
|
||||||
|
KEA_ADMIN_INSTALLED = PREFIX / SBINDIR / 'kea-admin'
|
||||||
|
KEA_LFC_BUILT = TOP_BUILD_DIR / 'src/bin/lfc/kea-lfc'
|
||||||
|
KEA_LFC_INSTALLED = PREFIX / SBINDIR / 'kea-lfc'
|
||||||
LEGAL_LOG_DIR = PREFIX / LOCALSTATEDIR / 'lib/kea'
|
LEGAL_LOG_DIR = PREFIX / LOCALSTATEDIR / 'lib/kea'
|
||||||
|
TEST_CA_DIR = TOP_SOURCE_DIR / 'src/lib/asiolink/testutils/ca'
|
||||||
|
|
||||||
#### Build Options
|
#### Build Options
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
kea_admin_conf_data = configuration_data()
|
kea_admin_conf_data = configuration_data()
|
||||||
kea_admin_conf_data.set('prefix', PREFIX)
|
kea_admin_conf_data.set('prefix', PREFIX)
|
||||||
kea_admin_conf_data.set('exec_prefix', PREFIX)
|
kea_admin_conf_data.set('exec_prefix', '${prefix}')
|
||||||
kea_admin_conf_data.set('datarootdir', PREFIX / DATADIR)
|
kea_admin_conf_data.set('datarootdir', '${prefix}/@DATADIR@')
|
||||||
kea_admin_conf_data.set('PACKAGE', 'kea')
|
kea_admin_conf_data.set('PACKAGE', 'kea')
|
||||||
kea_admin_conf_data.set('PACKAGE_NAME', 'kea')
|
kea_admin_conf_data.set('PACKAGE_NAME', 'kea')
|
||||||
kea_admin_conf_data.set('PACKAGE_VERSION', PROJECT_VERSION)
|
kea_admin_conf_data.set('PACKAGE_VERSION', PROJECT_VERSION)
|
||||||
kea_admin_conf_data.set('EXTENDED_VERSION', PROJECT_VERSION + ' (tarball)')
|
kea_admin_conf_data.set('EXTENDED_VERSION', PROJECT_VERSION + ' (tarball)')
|
||||||
kea_admin_conf_data.set('abs_top_builddir', TOP_BUILD_DIR)
|
kea_admin_conf_data.set('abs_top_builddir', TOP_BUILD_DIR)
|
||||||
kea_admin_conf_data.set('abs_top_srcdir', TOP_SOURCE_DIR)
|
kea_admin_conf_data.set('abs_top_srcdir', TOP_SOURCE_DIR)
|
||||||
kea_admin_conf_data.set('sbindir', PREFIX / SBINDIR)
|
kea_admin_conf_data.set('sbindir', f'${prefix}/@SBINDIR@')
|
||||||
kea_admin_conf_data.set('variables', 'variables')
|
kea_admin_conf_data.set('variables', 'variables')
|
||||||
configure_file(
|
configure_file(
|
||||||
input: 'kea-admin.in',
|
input: 'kea-admin.in',
|
||||||
|
@ -20,7 +20,7 @@ executable(
|
|||||||
dependencies: [CRYPTO_DEP],
|
dependencies: [CRYPTO_DEP],
|
||||||
include_directories: [include_directories('.')] + INCLUDES,
|
include_directories: [include_directories('.')] + INCLUDES,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: 'sbin',
|
install_dir: SBINDIR,
|
||||||
link_with: [agent_lib] + LIBS_BUILT_SO_FAR,
|
link_with: [agent_lib] + LIBS_BUILT_SO_FAR,
|
||||||
)
|
)
|
||||||
subdir('tests')
|
subdir('tests')
|
||||||
|
@ -24,7 +24,7 @@ executable(
|
|||||||
dependencies: [CRYPTO_DEP],
|
dependencies: [CRYPTO_DEP],
|
||||||
include_directories: [include_directories('.')] + INCLUDES,
|
include_directories: [include_directories('.')] + INCLUDES,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: 'sbin',
|
install_dir: SBINDIR,
|
||||||
link_with: [d2_lib] + LIBS_BUILT_SO_FAR,
|
link_with: [d2_lib] + LIBS_BUILT_SO_FAR,
|
||||||
)
|
)
|
||||||
subdir('tests')
|
subdir('tests')
|
||||||
|
@ -19,7 +19,7 @@ kea_dhcp4 = executable(
|
|||||||
dependencies: [CRYPTO_DEP],
|
dependencies: [CRYPTO_DEP],
|
||||||
include_directories: [include_directories('.')] + INCLUDES,
|
include_directories: [include_directories('.')] + INCLUDES,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: 'sbin',
|
install_dir: SBINDIR,
|
||||||
link_with: [dhcp4_lib] + LIBS_BUILT_SO_FAR,
|
link_with: [dhcp4_lib] + LIBS_BUILT_SO_FAR,
|
||||||
)
|
)
|
||||||
subdir('tests')
|
subdir('tests')
|
||||||
|
@ -138,7 +138,7 @@ kea_dhcp4_tests = executable(
|
|||||||
f'-DCFG_EXAMPLES="@TOP_SOURCE_DIR@/doc/examples/kea4"',
|
f'-DCFG_EXAMPLES="@TOP_SOURCE_DIR@/doc/examples/kea4"',
|
||||||
f'-DDHCP_DATA_DIR="@current_build_dir@"',
|
f'-DDHCP_DATA_DIR="@current_build_dir@"',
|
||||||
f'-DSYNTAX_FILE="@current_source_dir@/../dhcp4_parser.yy"',
|
f'-DSYNTAX_FILE="@current_source_dir@/../dhcp4_parser.yy"',
|
||||||
f'-DKEA_LFC_EXECUTABLE="@TOP_BUILD_DIR@/src/bin/lfc/kea-lfc"',
|
f'-DKEA_LFC_EXECUTABLE="@KEA_LFC_BUILT@"',
|
||||||
f'-DTEST_CA_DIR="@TEST_CA_DIR@"',
|
f'-DTEST_CA_DIR="@TEST_CA_DIR@"',
|
||||||
],
|
],
|
||||||
dependencies: dhcp4_tests_deps,
|
dependencies: dhcp4_tests_deps,
|
||||||
|
@ -20,7 +20,7 @@ kea_dhcp6 = executable(
|
|||||||
dependencies: [CRYPTO_DEP],
|
dependencies: [CRYPTO_DEP],
|
||||||
include_directories: [include_directories('.')] + INCLUDES,
|
include_directories: [include_directories('.')] + INCLUDES,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: 'sbin',
|
install_dir: SBINDIR,
|
||||||
link_with: [dhcp6_lib] + LIBS_BUILT_SO_FAR,
|
link_with: [dhcp6_lib] + LIBS_BUILT_SO_FAR,
|
||||||
)
|
)
|
||||||
subdir('tests')
|
subdir('tests')
|
||||||
|
@ -140,7 +140,7 @@ kea_dhcp6_tests = executable(
|
|||||||
f'-DCFG_EXAMPLES="@TOP_SOURCE_DIR@/doc/examples/kea6"',
|
f'-DCFG_EXAMPLES="@TOP_SOURCE_DIR@/doc/examples/kea6"',
|
||||||
f'-DDHCP_DATA_DIR="@current_build_dir@"',
|
f'-DDHCP_DATA_DIR="@current_build_dir@"',
|
||||||
f'-DSYNTAX_FILE="@current_source_dir@/../dhcp6_parser.yy"',
|
f'-DSYNTAX_FILE="@current_source_dir@/../dhcp6_parser.yy"',
|
||||||
f'-DKEA_LFC_EXECUTABLE="@TOP_BUILD_DIR@/src/bin/lfc/kea-lfc"',
|
f'-DKEA_LFC_EXECUTABLE="@KEA_LFC_BUILT@"',
|
||||||
f'-DTEST_CA_DIR="@TEST_CA_DIR@"',
|
f'-DTEST_CA_DIR="@TEST_CA_DIR@"',
|
||||||
],
|
],
|
||||||
dependencies: dhcp6_tests_deps,
|
dependencies: dhcp6_tests_deps,
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
keactrl_conf_data = configuration_data()
|
keactrl_conf_data = configuration_data()
|
||||||
keactrl_conf_data.set('prefix', PREFIX)
|
keactrl_conf_data.set('prefix', PREFIX)
|
||||||
keactrl_conf_data.set('sysconfdir', PREFIX / SYSCONFDIR)
|
keactrl_conf_data.set('sysconfdir', '${prefix}/@SYSCONFDIR@')
|
||||||
keactrl_conf_data.set('PACKAGE', 'kea')
|
keactrl_conf_data.set('PACKAGE', 'kea')
|
||||||
keactrl_conf_data.set('exec_prefix', PREFIX)
|
keactrl_conf_data.set('exec_prefix', '${prefix}')
|
||||||
keactrl_conf_data.set('sbindir', PREFIX / SBINDIR)
|
keactrl_conf_data.set('sbindir', '${prefix}/' + SBINDIR)
|
||||||
if NETCONF_DEP.found()
|
if NETCONF_DEP.found()
|
||||||
keactrl_conf_data.set('HAVE_NETCONF', 'yes')
|
keactrl_conf_data.set('HAVE_NETCONF', 'yes')
|
||||||
else
|
else
|
||||||
|
@ -10,7 +10,7 @@ kea_lfc = executable(
|
|||||||
'main.cc',
|
'main.cc',
|
||||||
include_directories: [include_directories('.')] + INCLUDES,
|
include_directories: [include_directories('.')] + INCLUDES,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: 'sbin',
|
install_dir: SBINDIR,
|
||||||
link_with: [lfc_lib] + LIBS_BUILT_SO_FAR,
|
link_with: [lfc_lib] + LIBS_BUILT_SO_FAR,
|
||||||
)
|
)
|
||||||
subdir('tests')
|
subdir('tests')
|
||||||
|
@ -31,7 +31,7 @@ executable(
|
|||||||
dependencies: [NETCONF_DEP, CRYPTO_DEP],
|
dependencies: [NETCONF_DEP, CRYPTO_DEP],
|
||||||
include_directories: [include_directories('.')] + INCLUDES,
|
include_directories: [include_directories('.')] + INCLUDES,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: 'sbin',
|
install_dir: SBINDIR,
|
||||||
link_with: [netconf_lib] + LIBS_BUILT_SO_FAR,
|
link_with: [netconf_lib] + LIBS_BUILT_SO_FAR,
|
||||||
override_options: ['cpp_std=c++20'],
|
override_options: ['cpp_std=c++20'],
|
||||||
)
|
)
|
||||||
|
@ -18,7 +18,7 @@ executable(
|
|||||||
'main.cc',
|
'main.cc',
|
||||||
include_directories: [include_directories('.')] + INCLUDES,
|
include_directories: [include_directories('.')] + INCLUDES,
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: 'sbin',
|
install_dir: SBINDIR,
|
||||||
link_with: [perfdhcp_lib] + LIBS_BUILT_SO_FAR,
|
link_with: [perfdhcp_lib] + LIBS_BUILT_SO_FAR,
|
||||||
)
|
)
|
||||||
subdir('tests')
|
subdir('tests')
|
||||||
|
@ -93,7 +93,7 @@ kea_dhcpsrv_lib = shared_library(
|
|||||||
sources,
|
sources,
|
||||||
cpp_args: [
|
cpp_args: [
|
||||||
f'-DDHCP_DATA_DIR="@PREFIX@/@DHCP_DATA_DIR@"',
|
f'-DDHCP_DATA_DIR="@PREFIX@/@DHCP_DATA_DIR@"',
|
||||||
f'-DKEA_LFC_EXECUTABLE="@PREFIX@/@SBINDIR@/kea-lfc"',
|
f'-DKEA_LFC_EXECUTABLE="@KEA_LFC_INSTALLED@"',
|
||||||
],
|
],
|
||||||
dependencies: [CRYPTO_DEP],
|
dependencies: [CRYPTO_DEP],
|
||||||
include_directories: [include_directories('.')] + INCLUDES,
|
include_directories: [include_directories('.')] + INCLUDES,
|
||||||
|
@ -131,7 +131,7 @@ kea_dhcpsrv_tests = executable(
|
|||||||
cpp_args: [
|
cpp_args: [
|
||||||
f'-DTEST_DATA_BUILDDIR="@current_build_dir@"',
|
f'-DTEST_DATA_BUILDDIR="@current_build_dir@"',
|
||||||
f'-DDHCP_DATA_DIR="@current_build_dir@"',
|
f'-DDHCP_DATA_DIR="@current_build_dir@"',
|
||||||
f'-DKEA_LFC_BUILD_DIR="@TOP_BUILD_DIR@/src/bin/lfc"',
|
f'-DKEA_LFC_BUILD_DIR="@KEA_LFC_BUILT@"',
|
||||||
f'-DDEFAULT_HOOKS_PATH="@DEFAULT_HOOKS_PATH@"',
|
f'-DDEFAULT_HOOKS_PATH="@DEFAULT_HOOKS_PATH@"',
|
||||||
],
|
],
|
||||||
dependencies: [CRYPTO_DEP, GTEST_DEP],
|
dependencies: [CRYPTO_DEP, GTEST_DEP],
|
||||||
|
@ -6,7 +6,7 @@ kea_mysql_lib = shared_library(
|
|||||||
'kea-mysql',
|
'kea-mysql',
|
||||||
'mysql_binding.cc',
|
'mysql_binding.cc',
|
||||||
'mysql_connection.cc',
|
'mysql_connection.cc',
|
||||||
cpp_args: [f'-DKEA_ADMIN="@PREFIX@/@SBINDIR@/kea-admin"'],
|
cpp_args: [f'-DKEA_ADMIN="@KEA_ADMIN_INSTALLED@"'],
|
||||||
dependencies: [MYSQL_DEP],
|
dependencies: [MYSQL_DEP],
|
||||||
include_directories: [include_directories('.')] + INCLUDES,
|
include_directories: [include_directories('.')] + INCLUDES,
|
||||||
install: true,
|
install: true,
|
||||||
|
@ -14,7 +14,7 @@ kea_mysql_tests = executable(
|
|||||||
'run_unittests.cc',
|
'run_unittests.cc',
|
||||||
cpp_args: [
|
cpp_args: [
|
||||||
f'-DTEST_CA_DIR="@TEST_CA_DIR@"',
|
f'-DTEST_CA_DIR="@TEST_CA_DIR@"',
|
||||||
f'-DKEA_ADMIN="@TOP_BUILD_DIR@/src/bin/admin/kea-admin"',
|
f'-DKEA_ADMIN="@KEA_ADMIN_BUILT@"',
|
||||||
],
|
],
|
||||||
dependencies: [GTEST_DEP, MYSQL_DEP],
|
dependencies: [GTEST_DEP, MYSQL_DEP],
|
||||||
include_directories: [include_directories('.')] + INCLUDES,
|
include_directories: [include_directories('.')] + INCLUDES,
|
||||||
|
@ -6,7 +6,7 @@ kea_pgsql_lib = shared_library(
|
|||||||
'kea-pgsql',
|
'kea-pgsql',
|
||||||
'pgsql_connection.cc',
|
'pgsql_connection.cc',
|
||||||
'pgsql_exchange.cc',
|
'pgsql_exchange.cc',
|
||||||
cpp_args: [f'-DKEA_ADMIN="@PREFIX@/@SBINDIR@/kea-admin"'],
|
cpp_args: [f'-DKEA_ADMIN="@KEA_ADMIN_INSTALLED@"'],
|
||||||
dependencies: [POSTGRESQL_DEP],
|
dependencies: [POSTGRESQL_DEP],
|
||||||
include_directories: [include_directories('.')] + INCLUDES,
|
include_directories: [include_directories('.')] + INCLUDES,
|
||||||
install: true,
|
install: true,
|
||||||
|
@ -15,7 +15,7 @@ kea_pgsql_tests = executable(
|
|||||||
'run_unittests.cc',
|
'run_unittests.cc',
|
||||||
cpp_args: [
|
cpp_args: [
|
||||||
f'-DTEST_CA_DIR="@TEST_CA_DIR@"',
|
f'-DTEST_CA_DIR="@TEST_CA_DIR@"',
|
||||||
f'-DKEA_ADMIN="@TOP_BUILD_DIR@/src/bin/admin/kea-admin"',
|
f'-DKEA_ADMIN="@KEA_ADMIN_BUILT@"',
|
||||||
],
|
],
|
||||||
dependencies: [GTEST_DEP, POSTGRESQL_DEP],
|
dependencies: [GTEST_DEP, POSTGRESQL_DEP],
|
||||||
include_directories: [include_directories('.')] + INCLUDES,
|
include_directories: [include_directories('.')] + INCLUDES,
|
||||||
|
@ -4,11 +4,27 @@ krb5 = disabler()
|
|||||||
krb5_config = find_program('krb5-config', required: false)
|
krb5_config = find_program('krb5-config', required: false)
|
||||||
|
|
||||||
if krb5_config.found()
|
if krb5_config.found()
|
||||||
|
# Detect vendor.
|
||||||
|
vendor_cmd = run_command([krb5_config, '--vendor'], check: false)
|
||||||
|
vendor = 'unknown'
|
||||||
|
if vendor_cmd.returncode() == 0
|
||||||
|
vendor = vendor_cmd.stdout().strip()
|
||||||
|
else
|
||||||
|
all = run_command([krb5_config, '--all'], check: false)
|
||||||
|
if all.returncode() == 0
|
||||||
|
foreach i : all.stdout().split('\n')
|
||||||
|
if i.startswith('Vendor')
|
||||||
|
vendor = i.split(':')[1].strip()
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
endforeach
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
cflags = run_command([krb5_config, '--cflags', 'gssapi'], check: false)
|
cflags = run_command([krb5_config, '--cflags', 'gssapi'], check: false)
|
||||||
libs = run_command([krb5_config, '--libs', 'gssapi'], check: false)
|
libs = run_command([krb5_config, '--libs', 'gssapi'], check: false)
|
||||||
version = run_command([krb5_config, '--version'], check: false)
|
version = run_command([krb5_config, '--version'], check: false)
|
||||||
vendor = run_command([krb5_config, '--vendor'], check: false)
|
if cflags.returncode() == 0 and libs.returncode() == 0 and version.returncode() == 0
|
||||||
if cflags.returncode() == 0 and libs.returncode() == 0 and version.returncode() == 0 and vendor.returncode() == 0
|
|
||||||
krb5_version = version.stdout().strip()
|
krb5_version = version.stdout().strip()
|
||||||
krb5 = declare_dependency(
|
krb5 = declare_dependency(
|
||||||
compile_args: cflags.stdout().split(),
|
compile_args: cflags.stdout().split(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user