summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-connectivity/kea/files/0001-build-boost-1.89.0-fixes.patch53
-rw-r--r--meta/recipes-connectivity/kea/files/0001-make-kea-environment-available-to-lfc.patch96
-rw-r--r--meta/recipes-connectivity/kea/files/0001-meson-use-a-runtime-safe-interpreter-string.patch123
-rw-r--r--meta/recipes-connectivity/kea/files/0001-mk_cfgrpt.sh-strip-prefixes.patch54
-rw-r--r--meta/recipes-connectivity/kea/files/0001-src-lib-log-logger_unittest_support.cc-do-not-write-.patch4
-rw-r--r--meta/recipes-connectivity/kea/files/fix-multilib-conflict.patch16
-rw-r--r--meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch11
-rw-r--r--meta/recipes-connectivity/kea/kea_3.0.1.bb (renamed from meta/recipes-connectivity/kea/kea_2.6.4.bb)31
8 files changed, 258 insertions, 130 deletions
diff --git a/meta/recipes-connectivity/kea/files/0001-build-boost-1.89.0-fixes.patch b/meta/recipes-connectivity/kea/files/0001-build-boost-1.89.0-fixes.patch
new file mode 100644
index 0000000000..fba2f5a573
--- /dev/null
+++ b/meta/recipes-connectivity/kea/files/0001-build-boost-1.89.0-fixes.patch
@@ -0,0 +1,53 @@
1From cf6af9219ba688fcd01d73a392dd1306d2b7a9e6 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 27 Aug 2025 22:20:09 -0700
4Subject: [PATCH] build: boost 1.89.0 fixes
5
6Upstream-Status: Submitted [https://gitlab.isc.org/isc-projects/kea/-/merge_requests/2771/]
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8---
9 meson.build | 2 +-
10 src/lib/asiodns/io_fetch.cc | 1 +
11 src/lib/asiolink/interval_timer.cc | 1 +
12 3 files changed, 3 insertions(+), 1 deletion(-)
13
14--- a/meson.build
15+++ b/meson.build
16@@ -189,7 +189,7 @@ message(f'Detected system "@SYSTEM@".')
17
18 #### Dependencies
19
20-boost_dep = dependency('boost', version: '>=1.66', modules: ['system'])
21+boost_dep = dependency('boost', version: '>=1.66')
22 dl_dep = dependency('dl')
23 threads_dep = dependency('threads')
24 add_project_dependencies(boost_dep, dl_dep, threads_dep, language: ['cpp'])
25@@ -1094,7 +1094,7 @@ pkg.generate(
26 if TARGETS_GEN_MESSAGES.length() > 0
27 alias_target('messages', TARGETS_GEN_MESSAGES)
28 else
29- error(
30+ warning(
31 'No messages to generate. This is probably an error in the meson.build files.',
32 )
33 endif
34--- a/src/lib/asiodns/io_fetch.cc
35+++ b/src/lib/asiodns/io_fetch.cc
36@@ -22,6 +22,7 @@
37 #include <dns/rcode.h>
38 #include <util/io.h>
39
40+#include <boost/asio/deadline_timer.hpp>
41 #include <boost/scoped_ptr.hpp>
42 #include <boost/date_time/posix_time/posix_time_types.hpp>
43
44--- a/src/lib/asiolink/interval_timer.cc
45+++ b/src/lib/asiolink/interval_timer.cc
46@@ -9,6 +9,7 @@
47 #include <asiolink/interval_timer.h>
48 #include <asiolink/io_service.h>
49
50+#include <boost/asio/deadline_timer.hpp>
51 #include <boost/enable_shared_from_this.hpp>
52 #include <boost/noncopyable.hpp>
53 #include <boost/shared_ptr.hpp>
diff --git a/meta/recipes-connectivity/kea/files/0001-make-kea-environment-available-to-lfc.patch b/meta/recipes-connectivity/kea/files/0001-make-kea-environment-available-to-lfc.patch
deleted file mode 100644
index 15c09d4c41..0000000000
--- a/meta/recipes-connectivity/kea/files/0001-make-kea-environment-available-to-lfc.patch
+++ /dev/null
@@ -1,96 +0,0 @@
1From 72d7e6c0b6b5af4fea2e4db9ed33757984ccdc5b Mon Sep 17 00:00:00 2001
2From: Razvan Becheriu <razvan@isc.org>
3Date: Fri, 14 Jun 2024 17:09:50 +0300
4Subject: [PATCH] make kea environment available to lfc
5
6Upstream-Status: Backport
7[https://gitlab.isc.org/isc-projects/kea/-/commit/f477e8ebcc8b8e1f1adaad4d55031084c0ff6f40]
8
9Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
10---
11 configure.ac | 2 ++
12 src/lib/dhcpsrv/memfile_lease_mgr.cc | 3 ++-
13 .../tests/memfile_lease_mgr_unittest.cc | 26 +++++++++++++++++++
14 src/lib/dhcpsrv/tests/test_kea_lfc_env.sh.in | 6 +++++
15 4 files changed, 36 insertions(+), 1 deletion(-)
16 create mode 100644 src/lib/dhcpsrv/tests/test_kea_lfc_env.sh.in
17
18diff --git a/configure.ac b/configure.ac
19index c00edb5..7b572b0 100644
20--- a/configure.ac
21+++ b/configure.ac
22@@ -1629,6 +1629,8 @@ AC_CONFIG_FILES([src/lib/dhcp_ddns/tests/Makefile])
23 AC_CONFIG_FILES([src/lib/dhcpsrv/Makefile])
24 AC_CONFIG_FILES([src/lib/dhcpsrv/tests/Makefile])
25 AC_CONFIG_FILES([src/lib/dhcpsrv/tests/test_libraries.h])
26+AC_CONFIG_FILES([src/lib/dhcpsrv/tests/test_kea_lfc_env.sh],
27+ [chmod +x src/lib/dhcpsrv/tests/test_kea_lfc_env.sh])
28 AC_CONFIG_FILES([src/lib/dhcpsrv/testutils/Makefile])
29 AC_CONFIG_FILES([src/lib/dns/Makefile])
30 AC_CONFIG_FILES([src/lib/dns/tests/Makefile])
31diff --git a/src/lib/dhcpsrv/memfile_lease_mgr.cc b/src/lib/dhcpsrv/memfile_lease_mgr.cc
32index db4f5d5..0ecf3e7 100644
33--- a/src/lib/dhcpsrv/memfile_lease_mgr.cc
34+++ b/src/lib/dhcpsrv/memfile_lease_mgr.cc
35@@ -209,7 +209,8 @@ LFCSetup::setup(const uint32_t lfc_interval,
36 args.push_back("ignored-path");
37
38 // Create the process (do not start it yet).
39- process_.reset(new ProcessSpawn(ProcessSpawn::ASYNC, executable, args));
40+ process_.reset(new ProcessSpawn(ProcessSpawn::ASYNC, executable, args,
41+ ProcessEnvVars(), true));
42
43 // If we've been told to run it once now, invoke the callback directly.
44 if (run_once_now) {
45diff --git a/src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc b/src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc
46index 034f1f5..9edf637 100644
47--- a/src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc
48+++ b/src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc
49@@ -534,6 +534,32 @@ TEST_F(MemfileLeaseMgrTest, lfcTimer) {
50 EXPECT_EQ(2, lease_mgr->getLFCCount());
51 }
52
53+/// @brief Check that the kea environment is accesible to the Lease
54+/// File Cleanup process.
55+TEST_F(MemfileLeaseMgrTest, lfcEnv) {
56+ DatabaseConnection::ParameterMap pmap;
57+ pmap["type"] = "memfile";
58+ pmap["universe"] = "4";
59+ pmap["name"] = getLeaseFilePath("leasefile4_0.csv");
60+ pmap["lfc-interval"] = "1";
61+
62+ std::ostringstream s;
63+ s << DHCP_DATA_DIR << "/test_kea_lfc_env.sh";
64+ setenv("KEA_LFC_EXECUTABLE", s.str().c_str(), 1);
65+
66+ boost::scoped_ptr<NakedMemfileLeaseMgr> lease_mgr(new NakedMemfileLeaseMgr(pmap));
67+
68+ // Try to run the lease file cleanup.
69+ ASSERT_NO_THROW(lease_mgr->lfcCallback());
70+
71+ // Wait for the LFC process to complete.
72+ ASSERT_TRUE(waitForProcess(*lease_mgr, 1));
73+
74+ // And make sure it has returned an exit status of 0.
75+ EXPECT_EQ(0, lease_mgr->getLFCExitStatus())
76+ << "environment not available to LFC";
77+}
78+
79 /// @brief This test checks if the LFC timer is disabled (doesn't trigger)
80 /// cleanups when the lfc-interval is set to 0.
81 TEST_F(MemfileLeaseMgrTest, lfcTimerDisabled) {
82diff --git a/src/lib/dhcpsrv/tests/test_kea_lfc_env.sh.in b/src/lib/dhcpsrv/tests/test_kea_lfc_env.sh.in
83new file mode 100644
84index 0000000..3eb71d5
85--- /dev/null
86+++ b/src/lib/dhcpsrv/tests/test_kea_lfc_env.sh.in
87@@ -0,0 +1,6 @@
88+#!/bin/sh
89+
90+if [ $(env | grep -c KEA_LFC_EXECUTABLE) != 0 ]; then
91+ exit 0
92+fi
93+exit 1
94--
952.25.1
96
diff --git a/meta/recipes-connectivity/kea/files/0001-meson-use-a-runtime-safe-interpreter-string.patch b/meta/recipes-connectivity/kea/files/0001-meson-use-a-runtime-safe-interpreter-string.patch
new file mode 100644
index 0000000000..44fe82bce0
--- /dev/null
+++ b/meta/recipes-connectivity/kea/files/0001-meson-use-a-runtime-safe-interpreter-string.patch
@@ -0,0 +1,123 @@
1From 5ec5e08edc059ed0c0d430dc8e02cd64bebc8d1c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 28 Aug 2025 17:02:49 -0700
4Subject: [PATCH] meson: use a runtime-safe interpreter string
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9In cross builds, python.find_installation() (what
10PYTHON usually comes from) must be a native
11interpreter (since Meson runs it during configure),
12but you don’t want that absolute native path baked
13into target files. You want a runtime/target path
14such as /usr/bin/env python3 (portable) or
15/usr/bin/python3
16
17Upstream-Status: Submitted [https://gitlab.isc.org/isc-projects/kea/-/issues/4087]
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19---
20 doc/sphinx/meson.build | 8 +++++++-
21 meson.build | 8 +++++++-
22 src/bin/shell/tests/meson.build | 8 +++++++-
23 src/lib/util/python/meson.build | 8 +++++++-
24 4 files changed, 28 insertions(+), 4 deletions(-)
25
26--- a/doc/sphinx/meson.build
27+++ b/doc/sphinx/meson.build
28@@ -70,7 +70,13 @@ doc_conf.set('builddir', meson.current_b
29 doc_conf.set('srcdir', meson.current_source_dir())
30 doc_conf.set('sphinxbuilddir', sphinxbuilddir)
31 doc_conf.set('abs_sphinxbuilddir', abs_sphinxbuilddir)
32-doc_conf.set('PYTHON', PYTHON.full_path())
33+# During cross builds, avoid embedding the native Python path into target artifacts.
34+# Use a runtime-safe interpreter path for the target.
35+py_for_runtime = '/usr/bin/env python3'
36+if not meson.is_cross_build()
37+ py_for_runtime = PYTHON.full_path()
38+endif
39+doc_conf.set('PYTHON', py_for_runtime)
40 doc_conf.set('TOP_SOURCE_DIR', TOP_SOURCE_DIR)
41 if PDFLATEX.found()
42 doc_conf.set('HAVE_PDFLATEX', 'yes')
43--- a/meson.build
44+++ b/meson.build
45@@ -638,9 +638,13 @@ link_args = []
46 # Also, Meson might use it by default, but might not use it on all systems, so lots of variables...
47 # EXECUTABLE_RPATH = f'$ORIGIN/../@LIBDIR@'
48 # HOOK_RPATH = '$ORIGIN/../..'
49-
50+if not meson.is_cross_build()
51 BUILD_RPATH = TOP_BUILD_DIR / 'src/lib'
52 INSTALL_RPATH = LIBDIR_INSTALLED
53+else
54+BUILD_RPATH = ''
55+INSTALL_RPATH = ''
56+endif
57
58 # Add rpaths for NETCONF dependencies.
59 if NETCONF_DEP.found()
60@@ -759,7 +763,13 @@ report_conf_data.set('CXX_ARGS', ' '.joi
61 report_conf_data.set('LD_ID', cpp.get_linker_id())
62 link_args += get_option('cpp_link_args')
63 report_conf_data.set('LD_ARGS', ' '.join(link_args))
64-report_conf_data.set('PYTHON_PATH', PYTHON.full_path())
65+# During cross builds, avoid embedding the native Python path into target artifacts.
66+# Use a runtime-safe interpreter path for the target.
67+py_for_runtime = '/usr/bin/env python3'
68+if not meson.is_cross_build()
69+ py_for_runtime = PYTHON.full_path()
70+endif
71+report_conf_data.set('PYTHON_PATH', py_for_runtime)
72 report_conf_data.set('PYTHON_VERSION', PYTHON.version())
73 report_conf_data.set('PKGPYTHONDIR', PKGPYTHONDIR)
74 result = cpp.run(
75--- a/src/bin/shell/tests/meson.build
76+++ b/src/bin/shell/tests/meson.build
77@@ -3,7 +3,13 @@ if not TESTS_OPT.enabled()
78 endif
79
80 shell_tests_conf_data = configuration_data()
81-shell_tests_conf_data.set('PYTHON', PYTHON.full_path())
82+# During cross builds, avoid embedding the native Python path into target artifacts.
83+# Use a runtime-safe interpreter path for the target.
84+py_for_runtime = '/usr/bin/env python3'
85+if not meson.is_cross_build()
86+ py_for_runtime = PYTHON.full_path()
87+endif
88+shell_tests_conf_data.set('PYTHON', py_for_runtime)
89 shell_tests_conf_data.set('abs_top_builddir', TOP_BUILD_DIR)
90 shell_tests_conf_data.set('abs_top_srcdir', TOP_SOURCE_DIR)
91 shell_unittest = configure_file(
92--- a/src/lib/util/python/meson.build
93+++ b/src/lib/util/python/meson.build
94@@ -4,7 +4,13 @@ endif
95
96 configure_file(input: 'const2hdr.py', output: 'const2hdr.py', copy: true)
97 util_python_conf_data = configuration_data()
98-util_python_conf_data.set('PYTHON', PYTHON.full_path())
99+# During cross builds, avoid embedding the native Python path into target artifacts.
100+# Use a runtime-safe interpreter path for the target.
101+py_for_runtime = '/usr/bin/env python3'
102+if not meson.is_cross_build()
103+ py_for_runtime = PYTHON.full_path()
104+endif
105+util_python_conf_data.set('PYTHON', py_for_runtime)
106 configure_file(
107 input: 'gen_wiredata.py.in',
108 output: 'gen_wiredata.py',
109--- a/src/bin/shell/meson.build
110+++ b/src/bin/shell/meson.build
111@@ -1,5 +1,11 @@
112 kea_shell_conf_data = configuration_data()
113-kea_shell_conf_data.set('PYTHON', PYTHON.full_path())
114+# During cross builds, avoid embedding the native Python path into target artifacts.
115+# Use a runtime-safe interpreter path for the target.
116+py_for_runtime = '/usr/bin/env python3'
117+if not meson.is_cross_build()
118+ py_for_runtime = PYTHON.full_path()
119+endif
120+kea_shell_conf_data.set('PYTHON', py_for_runtime)
121 kea_shell_conf_data.set('PACKAGE_VERSION', PROJECT_VERSION)
122 kea_shell_conf_data.set(
123 'EXTENDED_VERSION',
diff --git a/meta/recipes-connectivity/kea/files/0001-mk_cfgrpt.sh-strip-prefixes.patch b/meta/recipes-connectivity/kea/files/0001-mk_cfgrpt.sh-strip-prefixes.patch
new file mode 100644
index 0000000000..521fac4629
--- /dev/null
+++ b/meta/recipes-connectivity/kea/files/0001-mk_cfgrpt.sh-strip-prefixes.patch
@@ -0,0 +1,54 @@
1From c8a1f0b9c17c8485bdeac045e5afdcd4467c1c14 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 28 Aug 2025 17:31:39 -0700
4Subject: [PATCH] mk_cfgrpt.sh: strip prefixes
5
6Add support for a STRIP_PREFIXES env var (colon-separated list).
7The script will pipe its output through sed to remove any of those prefixes.
8
9Upstream-Status: Submitted [https://gitlab.isc.org/isc-projects/kea/-/issues/4087]
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 tools/mk_cfgrpt.sh | 22 +++++++++++++++++++++-
13 1 file changed, 21 insertions(+), 1 deletion(-)
14
15diff --git a/tools/mk_cfgrpt.sh b/tools/mk_cfgrpt.sh
16index bc0cc41..8f41ce1 100755
17--- a/tools/mk_cfgrpt.sh
18+++ b/tools/mk_cfgrpt.sh
19@@ -43,6 +43,26 @@ then
20 exit 2
21 fi
22
23+# Optional: strip absolute path prefixes from generated output to make
24+# cross-builds reproducible (e.g. Yocto sysroot/work dirs).
25+# Provide colon-separated prefixes via STRIP_PREFIXES.
26+strip_paths() {
27+ if [ -z "${STRIP_PREFIXES:-}" ]; then
28+ cat
29+ return
30+ fi
31+ # Build a sed script that removes each prefix wherever it appears.
32+ SED_SCRIPT=
33+ IFS=':'; for p in $STRIP_PREFIXES; do
34+ [ -n "$p" ] || continue
35+ # Escape forward slashes
36+ ep=$(printf '%s' "$p" | sed 's,/,\\/,g')
37+ SED_SCRIPT="${SED_SCRIPT}s/${ep}//g;"
38+ done
39+ IFS=' '
40+ sed -e "$SED_SCRIPT"
41+}
42+
43 # Header
44 cat >> "${dest}" << END
45 // config_report.cc. Generated from config.report by tools/mk_cfgrpt.sh
46@@ -55,7 +75,7 @@ END
47
48 # Body: escape '\'s and '"'s, preprend ' ";;;; ' and append '",'
49 sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/^/ ";;;; /' -e 's/$/",/' \
50- < "${report_file}" >> "${dest}"
51+ < "${report_file}" | strip_paths >> "${dest}"
52
53 # Trailer
54 cat >> "${dest}" <<END
diff --git a/meta/recipes-connectivity/kea/files/0001-src-lib-log-logger_unittest_support.cc-do-not-write-.patch b/meta/recipes-connectivity/kea/files/0001-src-lib-log-logger_unittest_support.cc-do-not-write-.patch
index 94fbd12737..1ab09e39a2 100644
--- a/meta/recipes-connectivity/kea/files/0001-src-lib-log-logger_unittest_support.cc-do-not-write-.patch
+++ b/meta/recipes-connectivity/kea/files/0001-src-lib-log-logger_unittest_support.cc-do-not-write-.patch
@@ -13,11 +13,9 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
13 src/lib/log/logger_unittest_support.cc | 2 +- 13 src/lib/log/logger_unittest_support.cc | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-) 14 1 file changed, 1 insertion(+), 1 deletion(-)
15 15
16diff --git a/src/lib/log/logger_unittest_support.cc b/src/lib/log/logger_unittest_support.cc
17index fc01c6e..f46d17e 100644
18--- a/src/lib/log/logger_unittest_support.cc 16--- a/src/lib/log/logger_unittest_support.cc
19+++ b/src/lib/log/logger_unittest_support.cc 17+++ b/src/lib/log/logger_unittest_support.cc
20@@ -84,7 +84,7 @@ void initLogger(isc::log::Severity severity, int dbglevel) { 18@@ -84,7 +84,7 @@ void initLogger(isc::log::Severity sever
21 const char* localfile = getenv("KEA_LOGGER_LOCALMSG"); 19 const char* localfile = getenv("KEA_LOGGER_LOCALMSG");
22 20
23 // Set a directory for creating lockfiles when running tests 21 // Set a directory for creating lockfiles when running tests
diff --git a/meta/recipes-connectivity/kea/files/fix-multilib-conflict.patch b/meta/recipes-connectivity/kea/files/fix-multilib-conflict.patch
index 763639327a..9e1f28b560 100644
--- a/meta/recipes-connectivity/kea/files/fix-multilib-conflict.patch
+++ b/meta/recipes-connectivity/kea/files/fix-multilib-conflict.patch
@@ -24,11 +24,9 @@ Signed-off-by: Lei Maohui <leimaohui@fujitsu.com>
24 src/bin/keactrl/kea-dhcp6.conf.pre | 4 ++-- 24 src/bin/keactrl/kea-dhcp6.conf.pre | 4 ++--
25 3 files changed, 6 insertions(+), 5 deletions(-) 25 3 files changed, 6 insertions(+), 5 deletions(-)
26 26
27diff --git a/src/bin/keactrl/kea-ctrl-agent.conf.pre b/src/bin/keactrl/kea-ctrl-agent.conf.pre
28index e6ae8b8..50a3092 100644
29--- a/src/bin/keactrl/kea-ctrl-agent.conf.pre 27--- a/src/bin/keactrl/kea-ctrl-agent.conf.pre
30+++ b/src/bin/keactrl/kea-ctrl-agent.conf.pre 28+++ b/src/bin/keactrl/kea-ctrl-agent.conf.pre
31@@ -51,7 +51,8 @@ 29@@ -85,7 +85,8 @@
32 // Agent will fail to start. 30 // Agent will fail to start.
33 "hooks-libraries": [ 31 "hooks-libraries": [
34 // { 32 // {
@@ -38,8 +36,6 @@ index e6ae8b8..50a3092 100644
38 // "parameters": { 36 // "parameters": {
39 // "param1": "foo" 37 // "param1": "foo"
40 // } 38 // }
41diff --git a/src/bin/keactrl/kea-dhcp4.conf.pre b/src/bin/keactrl/kea-dhcp4.conf.pre
42index 6edb8a1..b2a7385 100644
43--- a/src/bin/keactrl/kea-dhcp4.conf.pre 39--- a/src/bin/keactrl/kea-dhcp4.conf.pre
44+++ b/src/bin/keactrl/kea-dhcp4.conf.pre 40+++ b/src/bin/keactrl/kea-dhcp4.conf.pre
45@@ -255,7 +255,7 @@ 41@@ -255,7 +255,7 @@
@@ -49,9 +45,9 @@ index 6edb8a1..b2a7385 100644
49- // "library": "@libdir@/kea/hooks/libdhcp_legal_log.so", 45- // "library": "@libdir@/kea/hooks/libdhcp_legal_log.so",
50+ // "library": "$libdir/kea/hooks/libdhcp_legal_log.so", 46+ // "library": "$libdir/kea/hooks/libdhcp_legal_log.so",
51 // "parameters": { 47 // "parameters": {
52 // "path": "/var/lib/kea",
53 // "base-name": "kea-forensic4" 48 // "base-name": "kea-forensic4"
54@@ -272,7 +272,7 @@ 49 // }
50@@ -271,7 +271,7 @@
55 // // of specific options or perhaps even a combination of several 51 // // of specific options or perhaps even a combination of several
56 // // options and fields to uniquely identify a client. Those scenarios 52 // // options and fields to uniquely identify a client. Those scenarios
57 // // are addressed by the Flexible Identifiers hook application. 53 // // are addressed by the Flexible Identifiers hook application.
@@ -60,8 +56,6 @@ index 6edb8a1..b2a7385 100644
60 // "parameters": { 56 // "parameters": {
61 // "identifier-expression": "relay4[2].hex" 57 // "identifier-expression": "relay4[2].hex"
62 // } 58 // }
63diff --git a/src/bin/keactrl/kea-dhcp6.conf.pre b/src/bin/keactrl/kea-dhcp6.conf.pre
64index 271021b..5b85854 100644
65--- a/src/bin/keactrl/kea-dhcp6.conf.pre 59--- a/src/bin/keactrl/kea-dhcp6.conf.pre
66+++ b/src/bin/keactrl/kea-dhcp6.conf.pre 60+++ b/src/bin/keactrl/kea-dhcp6.conf.pre
67@@ -201,7 +201,7 @@ 61@@ -201,7 +201,7 @@
@@ -71,9 +65,9 @@ index 271021b..5b85854 100644
71- // "library": "@libdir@/kea/hooks/libdhcp_legal_log.so", 65- // "library": "@libdir@/kea/hooks/libdhcp_legal_log.so",
72+ // "library": "$libdir/kea/hooks/libdhcp_legal_log.so", 66+ // "library": "$libdir/kea/hooks/libdhcp_legal_log.so",
73 // "parameters": { 67 // "parameters": {
74 // "path": "/var/lib/kea",
75 // "base-name": "kea-forensic6" 68 // "base-name": "kea-forensic6"
76@@ -218,7 +218,7 @@ 69 // }
70@@ -217,7 +217,7 @@
77 // // of specific options or perhaps even a combination of several 71 // // of specific options or perhaps even a combination of several
78 // // options and fields to uniquely identify a client. Those scenarios 72 // // options and fields to uniquely identify a client. Those scenarios
79 // // are addressed by the Flexible Identifiers hook application. 73 // // are addressed by the Flexible Identifiers hook application.
diff --git a/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch b/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch
index 2f5a217d3f..9cc91bdddf 100644
--- a/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch
+++ b/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch
@@ -15,21 +15,16 @@ Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
15 src/bin/keactrl/keactrl.in | 4 ++-- 15 src/bin/keactrl/keactrl.in | 4 ++--
16 1 file changed, 2 insertions(+), 2 deletions(-) 16 1 file changed, 2 insertions(+), 2 deletions(-)
17 17
18diff --git a/src/bin/keactrl/keactrl.in b/src/bin/keactrl/keactrl.in
19index cccfdac303..20ae2e6ec5 100644
20--- a/src/bin/keactrl/keactrl.in 18--- a/src/bin/keactrl/keactrl.in
21+++ b/src/bin/keactrl/keactrl.in 19+++ b/src/bin/keactrl/keactrl.in
22@@ -146,8 +146,8 @@ check_running() { 20@@ -157,8 +157,8 @@ check_running() {
23 # Get the PID from the PID file (if it exists) 21 # Get the PID from the PID file (if it exists)
24 get_pid_from_file "${proc_name}" 22 get_pid_from_file "${proc_name}"
25 if [ ${_pid} -gt 0 ]; then 23 if [ "${_pid}" -gt 0 ]; then
26- # Use ps to check if PID is alive 24- # Use ps to check if PID is alive
27- if ps -p ${_pid} 1>/dev/null; then 25- if ps -p "${_pid}" 1>/dev/null; then
28+ # Use pgrep and grep to check if PID is alive 26+ # Use pgrep and grep to check if PID is alive
29+ if pgrep -v 1 | grep ${_pid} 1>/dev/null; then 27+ if pgrep -v 1 | grep ${_pid} 1>/dev/null; then
30 # No error, so PID IS ALIVE 28 # No error, so PID IS ALIVE
31 _running=1 29 _running=1
32 fi 30 fi
33--
342.39.2
35
diff --git a/meta/recipes-connectivity/kea/kea_2.6.4.bb b/meta/recipes-connectivity/kea/kea_3.0.1.bb
index aa725ee437..8dc6bdfea8 100644
--- a/meta/recipes-connectivity/kea/kea_2.6.4.bb
+++ b/meta/recipes-connectivity/kea/kea_3.0.1.bb
@@ -3,11 +3,11 @@ DESCRIPTION = "Kea is the next generation of DHCP software developed by ISC. It
3HOMEPAGE = "http://kea.isc.org" 3HOMEPAGE = "http://kea.isc.org"
4SECTION = "connectivity" 4SECTION = "connectivity"
5LICENSE = "MPL-2.0" 5LICENSE = "MPL-2.0"
6LIC_FILES_CHKSUM = "file://COPYING;md5=ee16e7280a6cf2a1487717faf33190dc" 6LIC_FILES_CHKSUM = "file://COPYING;md5=fb634ed1d923b8b8fd1ed7ffc9b70ae4"
7 7
8DEPENDS = "boost log4cplus openssl" 8DEPENDS = "boost log4cplus openssl"
9 9
10SRC_URI = "http://ftp.isc.org/isc/kea/${PV}/${BP}.tar.gz \ 10SRC_URI = "http://ftp.isc.org/isc/kea/${PV}/${BP}.tar.xz \
11 file://kea-dhcp4.service \ 11 file://kea-dhcp4.service \
12 file://kea-dhcp6.service \ 12 file://kea-dhcp6.service \
13 file://kea-dhcp-ddns.service \ 13 file://kea-dhcp-ddns.service \
@@ -17,11 +17,15 @@ SRC_URI = "http://ftp.isc.org/isc/kea/${PV}/${BP}.tar.gz \
17 file://fix-multilib-conflict.patch \ 17 file://fix-multilib-conflict.patch \
18 file://fix_pid_keactrl.patch \ 18 file://fix_pid_keactrl.patch \
19 file://0001-src-lib-log-logger_unittest_support.cc-do-not-write-.patch \ 19 file://0001-src-lib-log-logger_unittest_support.cc-do-not-write-.patch \
20 file://0001-make-kea-environment-available-to-lfc.patch \ 20 file://0001-build-boost-1.89.0-fixes.patch \
21 file://0001-meson-use-a-runtime-safe-interpreter-string.patch \
22 file://0001-mk_cfgrpt.sh-strip-prefixes.patch \
21 " 23 "
22SRC_URI[sha256sum] = "6806405e4d559abc10febd2c273dc6e2bc6ac42767afa5ca20b118ffba84a671" 24SRC_URI[sha256sum] = "ec84fec4bb7f6b9d15a82e755a571e9348eb4d6fbc62bb3f6f1296cd7a24c566"
23 25
24inherit autotools systemd update-rc.d upstream-version-is-even 26inherit meson pkgconfig systemd update-rc.d upstream-version-is-even
27
28EXTRA_OECONF += "-Dcrypto=openssl -Drunstatedir=${runtimedir} -Dkrb5=disabled -Dnetconf=disabled"
25 29
26INITSCRIPT_NAME = "kea-dhcp4-server" 30INITSCRIPT_NAME = "kea-dhcp4-server"
27INITSCRIPT_PARAMS = "defaults 30" 31INITSCRIPT_PARAMS = "defaults 30"
@@ -40,20 +44,18 @@ BUILD_OPTIMIZATION:remove:mipsel = " -Og"
40BUILD_OPTIMIZATION:append:mipsel = " -O" 44BUILD_OPTIMIZATION:append:mipsel = " -O"
41 45
42CXXFLAGS:remove = "-fvisibility-inlines-hidden" 46CXXFLAGS:remove = "-fvisibility-inlines-hidden"
43EXTRA_OECONF = "--with-boost-libs=-lboost_system \
44 --with-log4cplus=${STAGING_DIR_TARGET}${prefix} \
45 --with-openssl=${STAGING_DIR_TARGET}${prefix}"
46 47
47do_configure:prepend() { 48do_configure:prepend() {
48 # replace abs_top_builddir to avoid introducing the build path 49 # replace abs_top_builddir to avoid introducing the build path
49 # don't expand the abs_top_builddir on the target as the abs_top_builddir is meanlingless on the target 50 # don't expand the abs_top_builddir on the target as the abs_top_builddir is meanlingless on the target
50 find ${S} -type f -name *.sh.in | xargs sed -i "s:@abs_top_builddir@:@abs_top_builddir_placeholder@:g" 51 find ${S} -type f -name *.sh.in | xargs sed -i "s:@abs_top_builddir@:@abs_top_builddir_placeholder@:g"
51 sed -i "s:@abs_top_builddir@:@abs_top_builddir_placeholder@:g" ${S}/src/bin/admin/kea-admin.in 52 sed -i "s:@abs_top_builddir@:@abs_top_builddir_placeholder@:g" ${S}/src/bin/admin/kea-admin.in
53 export STRIP_PREFIXES="${RECIPE_SYSROOT_NATIVE}:${RECIPE_SYSROOT}:${WORKDIR}:${B}"
52} 54}
53 55
54# patch out build host paths for reproducibility 56# patch out build host paths for reproducibility
55do_compile:prepend:class-target() { 57do_compile:prepend:class-target() {
56 sed -i -e "s,${WORKDIR},,g" ${B}/config.report 58 sed -i -e "s,${WORKDIR},,g" ${B}/config.report
57} 59}
58 60
59do_install:append() { 61do_install:append() {
@@ -65,7 +67,10 @@ do_install:append() {
65 sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@BASE_BINDIR@,${base_bindir},g' \ 67 sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@BASE_BINDIR@,${base_bindir},g' \
66 -e 's,@LOCALSTATEDIR@,${localstatedir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' \ 68 -e 's,@LOCALSTATEDIR@,${localstatedir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' \
67 ${D}${systemd_system_unitdir}/kea-dhcp*service ${D}${sbindir}/keactrl 69 ${D}${systemd_system_unitdir}/kea-dhcp*service ${D}${sbindir}/keactrl
68 sed -i "s:${B}:@abs_top_builddir_placeholder@:g" ${D}${sbindir}/kea-admin 70 sed -i -e "s:${B}:@abs_top_builddir_placeholder@:g" \
71 -e "s:${S}:@abs_top_srcdir_placeholder@:g" \
72 ${D}${sbindir}/kea-admin
73 rm -rf ${D}${datadir}/${BPN}/meson-info
69} 74}
70 75
71do_install:append() { 76do_install:append() {
@@ -74,7 +79,9 @@ do_install:append() {
74 79
75CONFFILES:${PN} = "${sysconfdir}/kea/keactrl.conf" 80CONFFILES:${PN} = "${sysconfdir}/kea/keactrl.conf"
76 81
82PACKAGES =+ "${PN}-python"
83FILES:${PN}-python = "${nonarch_libdir}/python*/site-packages/*"
84RDEPENDS:${PN}-python = "python3"
85
77FILES:${PN}-staticdev += "${libdir}/kea/hooks/*.a ${libdir}/hooks/*.a" 86FILES:${PN}-staticdev += "${libdir}/kea/hooks/*.a ${libdir}/hooks/*.a"
78FILES:${PN} += "${libdir}/hooks/*.so" 87FILES:${PN} += "${libdir}/hooks/*.so"
79
80PARALLEL_MAKEINST = ""