]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3731] More fixes
authorAndrei Pavel <andrei@isc.org>
Wed, 19 Mar 2025 07:37:25 +0000 (09:37 +0200)
committerAndrei Pavel <andrei@isc.org>
Wed, 19 Mar 2025 08:50:49 +0000 (10:50 +0200)
doc/devel/make-devel.sh.in
doc/devel/meson.build
meson.build
src/bin/admin/meson.build
src/bin/keactrl/meson.build
src/lib/dhcpsrv/meson.build
src/lib/log/interprocess/meson.build
src/lib/process/meson.build
src/lib/process/tests/meson.build
tools/meson.build
tools/path_replacer.sh.in [changed mode: 0644->0755]

index 1556cfe4b22f6d52f00533a9621bdface7298545..25324da640ee7d552f72f79c5c22e98e81d9387b 100755 (executable)
@@ -2,6 +2,9 @@
 
 set -euv
 
+root_path=$(cd "$(dirname "${0}")/.." && pwd)
+cd "${root_path}"
+
 mkdir -p @builddir@/html
 
 (cat Doxyfile; echo PROJECT_NUMBER=@PACKAGE_VERSION@) | doxygen - > @builddir@/html/doxygen.log 2> @builddir@/html/doxygen-error.log
index 639c29b5f3b8507ae05ca7d32a05c5d029b8f5b6..d7e6bdfff8a475577df2f8677a9b09ab23519de9 100644 (file)
@@ -12,4 +12,4 @@ make_devel = configure_file(
     output: 'make-devel.sh',
     configuration: make_devel_conf_data,
 )
-run_target('devel', command: [CD_AND_RUN, current_source_dir, make_devel])
+run_target('devel', command: make_devel)
index a3dee9b0306f6cdabf763605a36edcb21fcd5a8c..c8e67714161b061002cb2dbaf377b7096f44f5a4 100644 (file)
@@ -48,13 +48,14 @@ SBINDIR = get_option('sbindir')
 SYSCONFDIR = get_option('sysconfdir')
 
 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'
+RUNSTATEDIR = LOCALSTATEDIR / 'run/kea'
+RUNSTATEDIR_INSTALLED = PREFIX / RUNSTATEDIR
 TEST_CA_DIR = TOP_SOURCE_DIR / 'src/lib/asiolink/testutils/ca'
 
 #### 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
     package_version_type = 'stable'
 else
-    package_version_type = 'stable'
+    package_version_type = 'development'
 endif
 conf_data.set('PACKAGE_VERSION_TYPE', f'"@package_version_type@"')
 
@@ -898,8 +899,7 @@ top_docs = [
     'platforms.rst',
 ]
 install_data(top_docs, install_dir: DATADIR / 'doc/kea')
-# No builtin option for 'var/run'.
-install_emptydir(LOCALSTATEDIR / 'run/kea')
+install_emptydir(RUNSTATEDIR)
 
 # Print the setup report.
 message(run_command(['cat', CONFIG_REPORT], check: true).stdout())
index 6ba28e8db5542ede39f8e209109e3fadab6b37ea..0c6e0bded942aad16ce39b0ee6f732cd83d5e385 100644 (file)
@@ -1,7 +1,7 @@
 kea_admin_conf_data = configuration_data()
 kea_admin_conf_data.set('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_NAME', 'kea')
 kea_admin_conf_data.set('PACKAGE_VERSION', PROJECT_VERSION)
index 4b17a79b89d6b94d792aef07a5af9590eee54848..56bd805ed0bc855fd6f8ef1555b1ad7fde2a2bf9 100644 (file)
@@ -26,39 +26,38 @@ configure_file(
     configuration: keactrl_conf_data,
     install_dir: SBINDIR,
 )
-path_replacer = TOP_BUILD_DIR / 'tools/path_replacer.sh'
 configure_file(
     input: 'kea-dhcp4.conf.pre',
     output: 'kea-dhcp4.conf',
-    command: [path_replacer, '@INPUT@', '@OUTPUT@'],
+    command: [PATH_REPLACER, '@INPUT@', '@OUTPUT@'],
     install: true,
     install_dir: kea_configfiles_destdir,
 )
 configure_file(
     input: 'kea-dhcp6.conf.pre',
     output: 'kea-dhcp6.conf',
-    command: [path_replacer, '@INPUT@', '@OUTPUT@'],
+    command: [PATH_REPLACER, '@INPUT@', '@OUTPUT@'],
     install: true,
     install_dir: kea_configfiles_destdir,
 )
 configure_file(
     input: 'kea-dhcp-ddns.conf.pre',
     output: 'kea-dhcp-ddns.conf',
-    command: [path_replacer, '@INPUT@', '@OUTPUT@'],
+    command: [PATH_REPLACER, '@INPUT@', '@OUTPUT@'],
     install: true,
     install_dir: kea_configfiles_destdir,
 )
 configure_file(
     input: 'kea-ctrl-agent.conf.pre',
     output: 'kea-ctrl-agent.conf',
-    command: [path_replacer, '@INPUT@', '@OUTPUT@'],
+    command: [PATH_REPLACER, '@INPUT@', '@OUTPUT@'],
     install: true,
     install_dir: kea_configfiles_destdir,
 )
 configure_file(
     input: 'kea-netconf.conf.pre',
     output: 'kea-netconf.conf',
-    command: [path_replacer, '@INPUT@', '@OUTPUT@'],
+    command: [PATH_REPLACER, '@INPUT@', '@OUTPUT@'],
     install: NETCONF_DEP.found(),
     install_dir: kea_configfiles_destdir,
 )
index 8d4b1ab470ab34d85c952c0423e4b43c0f625fc4..d26ee0b70fc2f8a19c20fd48c8d0bd412436dc43 100644 (file)
@@ -92,7 +92,7 @@ kea_dhcpsrv_lib = shared_library(
     'kea-dhcpsrv',
     sources,
     cpp_args: [
-        f'-DDHCP_DATA_DIR="@PREFIX@/@DHCP_DATA_DIR@"',
+        f'-DDHCP_DATA_DIR="@RUNSTATEDIR_INSTALLED@"',
         f'-DKEA_LFC_EXECUTABLE="@KEA_LFC_INSTALLED@"',
     ],
     dependencies: [CRYPTO_DEP],
index f4232d68f275bad09977650137bf4938919b8a01..c34fb6fe59d3b5313120d1ccdcf84d9e38356dd0 100644 (file)
@@ -2,7 +2,7 @@ kea_log_interprocess_lib = shared_library(
     'kea-log-interprocess',
     'interprocess_sync_file.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,
     install: true,
     install_dir: LIBDIR,
index e1e029522bbc637b00911911dc0dd2ff7d40b131..6c0916005eac61a147a526cf0a7900fa5d90228d 100644 (file)
@@ -12,7 +12,7 @@ kea_process_lib = shared_library(
     'log_parser.cc',
     'process_messages.cc',
     'redact_config.cc',
-    cpp_args: [f'-DPIDFILE_DIR="@PREFIX@/@LOCALSTATEDIR@/run/kea"'],
+    cpp_args: [f'-DPIDFILE_DIR="@RUNSTATEDIR_INSTALLED@"'],
     dependencies: [GTEST_DEP],
     include_directories: [include_directories('.')] + INCLUDES,
     install: true,
index af4a206d7532040c7b1658995ff011874a4c04db..6b4c95bf1cc1ef92e4d906ea2bb282a92857d8c4 100644 (file)
@@ -25,7 +25,7 @@ kea_process_tests = executable(
     cpp_args: [
         f'-DTEST_DATA_BUILDDIR="@current_build_dir@"',
         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,
     link_with: [kea_util_unittests_lib, libs_testutils] + LIBS_BUILT_SO_FAR,
index ee58776e9837bf0a0bc6e56abb330c9ab008c257..64184d7312638aea03cbfde2b2fa64ecd53c9667 100644 (file)
@@ -15,7 +15,7 @@ if AWK.found()
 else
     tools_conf_data.set('AWK', 'awk')
 endif
-configure_file(
+PATH_REPLACER = configure_file(
     input: 'path_replacer.sh.in',
     output: 'path_replacer.sh',
     configuration: tools_conf_data,
old mode 100644 (file)
new mode 100755 (executable)
index deb1264..468f2b6
@@ -1,6 +1,6 @@
 #!/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
 # License, v. 2.0. If a copy of the MPL was not distributed with this