2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-22 18:08:16 +00:00

[#3731] More fixes

This commit is contained in:
Andrei Pavel 2025-03-19 09:37:25 +02:00
parent 478785f932
commit dededfec38
No known key found for this signature in database
GPG Key ID: D4E804481939CB21
11 changed files with 20 additions and 18 deletions

View File

@ -2,6 +2,9 @@
set -euv set -euv
root_path=$(cd "$(dirname "${0}")/.." && pwd)
cd "${root_path}"
mkdir -p @builddir@/html mkdir -p @builddir@/html
(cat Doxyfile; echo PROJECT_NUMBER=@PACKAGE_VERSION@) | doxygen - > @builddir@/html/doxygen.log 2> @builddir@/html/doxygen-error.log (cat Doxyfile; echo PROJECT_NUMBER=@PACKAGE_VERSION@) | doxygen - > @builddir@/html/doxygen.log 2> @builddir@/html/doxygen-error.log

View File

@ -12,4 +12,4 @@ make_devel = configure_file(
output: 'make-devel.sh', output: 'make-devel.sh',
configuration: make_devel_conf_data, configuration: make_devel_conf_data,
) )
run_target('devel', command: [CD_AND_RUN, current_source_dir, make_devel]) run_target('devel', command: make_devel)

View File

@ -48,13 +48,14 @@ SBINDIR = get_option('sbindir')
SYSCONFDIR = get_option('sysconfdir') SYSCONFDIR = get_option('sysconfdir')
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' DEFAULT_HOOKS_PATH = PREFIX / LIBDIR / 'kea/hooks'
KEA_ADMIN_BUILT = TOP_BUILD_DIR / 'src/bin/lfc/kea-admin' KEA_ADMIN_BUILT = TOP_BUILD_DIR / 'src/bin/lfc/kea-admin'
KEA_ADMIN_INSTALLED = PREFIX / SBINDIR / 'kea-admin' KEA_ADMIN_INSTALLED = PREFIX / SBINDIR / 'kea-admin'
KEA_LFC_BUILT = TOP_BUILD_DIR / 'src/bin/lfc/kea-lfc' KEA_LFC_BUILT = TOP_BUILD_DIR / 'src/bin/lfc/kea-lfc'
KEA_LFC_INSTALLED = PREFIX / SBINDIR / 'kea-lfc' KEA_LFC_INSTALLED = PREFIX / SBINDIR / 'kea-lfc'
LEGAL_LOG_DIR = PREFIX / LOCALSTATEDIR / 'lib/kea' LEGAL_LOG_DIR = PREFIX / LOCALSTATEDIR / 'lib/kea'
RUNSTATEDIR = LOCALSTATEDIR / 'run/kea'
RUNSTATEDIR_INSTALLED = PREFIX / RUNSTATEDIR
TEST_CA_DIR = TOP_SOURCE_DIR / 'src/lib/asiolink/testutils/ca' TEST_CA_DIR = TOP_SOURCE_DIR / 'src/lib/asiolink/testutils/ca'
#### Build Options #### Build Options
@ -465,7 +466,7 @@ conf_data.set('EXTENDED_VERSION', f'"@PROJECT_VERSION@ (@extended_version@)"')
if PROJECT_VERSION.split('.')[1].to_int() % 2 == 0 if PROJECT_VERSION.split('.')[1].to_int() % 2 == 0
package_version_type = 'stable' package_version_type = 'stable'
else else
package_version_type = 'stable' package_version_type = 'development'
endif endif
conf_data.set('PACKAGE_VERSION_TYPE', f'"@package_version_type@"') conf_data.set('PACKAGE_VERSION_TYPE', f'"@package_version_type@"')
@ -898,8 +899,7 @@ top_docs = [
'platforms.rst', 'platforms.rst',
] ]
install_data(top_docs, install_dir: DATADIR / 'doc/kea') install_data(top_docs, install_dir: DATADIR / 'doc/kea')
# No builtin option for 'var/run'. install_emptydir(RUNSTATEDIR)
install_emptydir(LOCALSTATEDIR / 'run/kea')
# Print the setup report. # Print the setup report.
message(run_command(['cat', CONFIG_REPORT], check: true).stdout()) message(run_command(['cat', CONFIG_REPORT], check: true).stdout())

View File

@ -1,7 +1,7 @@
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', f'${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)

View File

@ -26,39 +26,38 @@ configure_file(
configuration: keactrl_conf_data, configuration: keactrl_conf_data,
install_dir: SBINDIR, install_dir: SBINDIR,
) )
path_replacer = TOP_BUILD_DIR / 'tools/path_replacer.sh'
configure_file( configure_file(
input: 'kea-dhcp4.conf.pre', input: 'kea-dhcp4.conf.pre',
output: 'kea-dhcp4.conf', output: 'kea-dhcp4.conf',
command: [path_replacer, '@INPUT@', '@OUTPUT@'], command: [PATH_REPLACER, '@INPUT@', '@OUTPUT@'],
install: true, install: true,
install_dir: kea_configfiles_destdir, install_dir: kea_configfiles_destdir,
) )
configure_file( configure_file(
input: 'kea-dhcp6.conf.pre', input: 'kea-dhcp6.conf.pre',
output: 'kea-dhcp6.conf', output: 'kea-dhcp6.conf',
command: [path_replacer, '@INPUT@', '@OUTPUT@'], command: [PATH_REPLACER, '@INPUT@', '@OUTPUT@'],
install: true, install: true,
install_dir: kea_configfiles_destdir, install_dir: kea_configfiles_destdir,
) )
configure_file( configure_file(
input: 'kea-dhcp-ddns.conf.pre', input: 'kea-dhcp-ddns.conf.pre',
output: 'kea-dhcp-ddns.conf', output: 'kea-dhcp-ddns.conf',
command: [path_replacer, '@INPUT@', '@OUTPUT@'], command: [PATH_REPLACER, '@INPUT@', '@OUTPUT@'],
install: true, install: true,
install_dir: kea_configfiles_destdir, install_dir: kea_configfiles_destdir,
) )
configure_file( configure_file(
input: 'kea-ctrl-agent.conf.pre', input: 'kea-ctrl-agent.conf.pre',
output: 'kea-ctrl-agent.conf', output: 'kea-ctrl-agent.conf',
command: [path_replacer, '@INPUT@', '@OUTPUT@'], command: [PATH_REPLACER, '@INPUT@', '@OUTPUT@'],
install: true, install: true,
install_dir: kea_configfiles_destdir, install_dir: kea_configfiles_destdir,
) )
configure_file( configure_file(
input: 'kea-netconf.conf.pre', input: 'kea-netconf.conf.pre',
output: 'kea-netconf.conf', output: 'kea-netconf.conf',
command: [path_replacer, '@INPUT@', '@OUTPUT@'], command: [PATH_REPLACER, '@INPUT@', '@OUTPUT@'],
install: NETCONF_DEP.found(), install: NETCONF_DEP.found(),
install_dir: kea_configfiles_destdir, install_dir: kea_configfiles_destdir,
) )

View File

@ -92,7 +92,7 @@ kea_dhcpsrv_lib = shared_library(
'kea-dhcpsrv', 'kea-dhcpsrv',
sources, sources,
cpp_args: [ cpp_args: [
f'-DDHCP_DATA_DIR="@PREFIX@/@DHCP_DATA_DIR@"', f'-DDHCP_DATA_DIR="@RUNSTATEDIR_INSTALLED@"',
f'-DKEA_LFC_EXECUTABLE="@KEA_LFC_INSTALLED@"', f'-DKEA_LFC_EXECUTABLE="@KEA_LFC_INSTALLED@"',
], ],
dependencies: [CRYPTO_DEP], dependencies: [CRYPTO_DEP],

View File

@ -2,7 +2,7 @@ kea_log_interprocess_lib = shared_library(
'kea-log-interprocess', 'kea-log-interprocess',
'interprocess_sync_file.cc', 'interprocess_sync_file.cc',
'interprocess_sync_null.cc', 'interprocess_sync_null.cc',
cpp_args: [f'-DLOCKFILE_DIR="@PREFIX@/@LOCALSTATEDIR@/run/kea"'], cpp_args: [f'-DLOCKFILE_DIR="@RUNSTATEDIR_INSTALLED@"'],
include_directories: [include_directories('.')] + INCLUDES, include_directories: [include_directories('.')] + INCLUDES,
install: true, install: true,
install_dir: LIBDIR, install_dir: LIBDIR,

View File

@ -12,7 +12,7 @@ kea_process_lib = shared_library(
'log_parser.cc', 'log_parser.cc',
'process_messages.cc', 'process_messages.cc',
'redact_config.cc', 'redact_config.cc',
cpp_args: [f'-DPIDFILE_DIR="@PREFIX@/@LOCALSTATEDIR@/run/kea"'], cpp_args: [f'-DPIDFILE_DIR="@RUNSTATEDIR_INSTALLED@"'],
dependencies: [GTEST_DEP], dependencies: [GTEST_DEP],
include_directories: [include_directories('.')] + INCLUDES, include_directories: [include_directories('.')] + INCLUDES,
install: true, install: true,

View File

@ -25,7 +25,7 @@ kea_process_tests = executable(
cpp_args: [ cpp_args: [
f'-DTEST_DATA_BUILDDIR="@current_build_dir@"', f'-DTEST_DATA_BUILDDIR="@current_build_dir@"',
f'-DTEST_SCRIPT_SH="@current_build_dir@/process_test.sh"', f'-DTEST_SCRIPT_SH="@current_build_dir@/process_test.sh"',
f'-DPIDFILE_DIR="@PREFIX@/@LOCALSTATEDIR@/run/kea"', f'-DPIDFILE_DIR="@RUNSTATEDIR_INSTALLED@"',
], ],
include_directories: [include_directories('.')] + INCLUDES, include_directories: [include_directories('.')] + INCLUDES,
link_with: [kea_util_unittests_lib, libs_testutils] + LIBS_BUILT_SO_FAR, link_with: [kea_util_unittests_lib, libs_testutils] + LIBS_BUILT_SO_FAR,

View File

@ -15,7 +15,7 @@ if AWK.found()
else else
tools_conf_data.set('AWK', 'awk') tools_conf_data.set('AWK', 'awk')
endif endif
configure_file( PATH_REPLACER = configure_file(
input: 'path_replacer.sh.in', input: 'path_replacer.sh.in',
output: 'path_replacer.sh', output: 'path_replacer.sh',
configuration: tools_conf_data, configuration: tools_conf_data,

2
tools/path_replacer.sh.in Normal file → Executable file
View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
# Copyright (C) 2014-2020 Internet Systems Consortium, Inc. ("ISC") # Copyright (C) 2014-2025 Internet Systems Consortium, Inc. ("ISC")
# #
# This Source Code Form is subject to the terms of the Mozilla Public # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this # License, v. 2.0. If a copy of the MPL was not distributed with this