diff options
Diffstat (limited to 'poky/meta/recipes-connectivity/kea')
3 files changed, 97 insertions, 1 deletions
diff --git a/poky/meta/recipes-connectivity/kea/files/0001-keactrl.in-create-var-lib-kea-and-var-run-kea-folder.patch b/poky/meta/recipes-connectivity/kea/files/0001-keactrl.in-create-var-lib-kea-and-var-run-kea-folder.patch new file mode 100644 index 000000000..ab3fd8394 --- /dev/null +++ b/poky/meta/recipes-connectivity/kea/files/0001-keactrl.in-create-var-lib-kea-and-var-run-kea-folder.patch @@ -0,0 +1,39 @@ +From 639dc25cdabc9d1846000a542c8cc19158b69994 Mon Sep 17 00:00:00 2001 +From: Mingli Yu <mingli.yu@windriver.com> +Date: Fri, 18 Sep 2020 08:18:08 +0000 +Subject: [PATCH] keactrl.in: create /var/lib/kea and /var/run/kea folder + +Create /var/lib/kea and /var/run/kea folder to fix below error: + # keactrl start + INFO/keactrl: Starting /usr/sbin/kea-dhcp4 -c /etc/kea/kea-dhcp4.conf + INFO/keactrl: Starting /usr/sbin/kea-dhcp6 -c /etc/kea/kea-dhcp6.conf + INFO/keactrl: Starting /usr/sbin/kea-ctrl-agent -c /etc/kea/kea-ctrl-agent.conf + Unable to use interprocess sync lockfile (No such file or directory): /var/run/kea/logger_lockfile + Service failed: Launch failed: Unable to open PID file '/var/run/kea/kea-ctrl-agent.kea-ctrl-agent.pid' for write + [snip] + ERROR [kea-dhcp4.dhcp4/615.140641792751488] DHCP4_CONFIG_LOAD_FAIL configuration error using file: /etc/kea/kea-dhcp4.conf, reason: Unable to open database: unable to open '/var/lib/kea/kea-leases4.csv' + [snip] + +Upstream-Status: Inappropriate [config specific] + +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +--- + src/bin/keactrl/keactrl.in | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/bin/keactrl/keactrl.in b/src/bin/keactrl/keactrl.in +index 12b2b3f..47cf6f9 100644 +--- a/src/bin/keactrl/keactrl.in ++++ b/src/bin/keactrl/keactrl.in +@@ -482,6 +482,8 @@ case ${command} in + # The variables (dhcp4_srv, dhcp6_serv, dhcp_ddns_srv etc) are set in the + # keactrl.conf file that shellcheck is unable to read. + # shellcheck disable=SC2154 ++ [ -d @LOCALSTATEDIR@/run/kea ] || mkdir -p @LOCALSTATEDIR@/run/kea ++ [ -d @LOCALSTATEDIR@/lib/kea ] || mkdir -p @LOCALSTATEDIR@/lib/kea + run_conditional "dhcp4" "start_server ${dhcp4_srv} -c ${kea_dhcp4_config_file} ${args}" 1 + run_conditional "dhcp6" "start_server ${dhcp6_srv} -c ${kea_dhcp6_config_file} ${args}" 1 + # shellcheck disable=SC2154 +-- +2.26.2 + diff --git a/poky/meta/recipes-connectivity/kea/files/fix-multilib-conflict.patch b/poky/meta/recipes-connectivity/kea/files/fix-multilib-conflict.patch new file mode 100644 index 000000000..733adf553 --- /dev/null +++ b/poky/meta/recipes-connectivity/kea/files/fix-multilib-conflict.patch @@ -0,0 +1,55 @@ +There are conflict of config files between kea and lib32-kea: + +| Error: Transaction test error: +| file /etc/kea/kea-ctrl-agent.conf conflicts between attempted installs of + lib32-kea-1.7.10-r0.core2_32 and kea-1.7.10-r0.core2_64 +| file /etc/kea/kea-dhcp4.conf conflicts between attempted installs of + lib32-kea-1.7.10-r0.core2_32 and kea-1.7.10-r0.core2_64 + +Because they are all commented out, replace the expanded libdir path with +'$libdir' in the config files to avoid conflict. + +Signed-off-by: Kai Kang <kai.kang@windriver.com> +--- + src/bin/keactrl/kea-ctrl-agent.conf.pre | 3 ++- + src/bin/keactrl/kea-dhcp4.conf.pre | 6 ++++-- + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/src/bin/keactrl/kea-ctrl-agent.conf.pre b/src/bin/keactrl/kea-ctrl-agent.conf.pre +index 211b7ff..d710ec7 100644 +--- a/src/bin/keactrl/kea-ctrl-agent.conf.pre ++++ b/src/bin/keactrl/kea-ctrl-agent.conf.pre +@@ -45,7 +45,8 @@ + // Agent will fail to start. + "hooks-libraries": [ + // { +-// "library": "@libdir@/kea/hooks/control-agent-commands.so", ++// // Replace $libdir with real library path /usr/lib or /usr/lib64 ++// "library": "$libdir/kea/hooks/control-agent-commands.so", + // "parameters": { + // "param1": "foo" + // } +diff --git a/src/bin/keactrl/kea-dhcp4.conf.pre b/src/bin/keactrl/kea-dhcp4.conf.pre +index 5f77a32..70ae3d9 100644 +--- a/src/bin/keactrl/kea-dhcp4.conf.pre ++++ b/src/bin/keactrl/kea-dhcp4.conf.pre +@@ -252,7 +252,8 @@ + // // of all devices serviced by Kea, including their identifiers + // // (like MAC address), their location in the network, times + // // when they were active etc. +- // "library": "@libdir@/kea/hooks/libdhcp_legal_log.so" ++ // // Replace $libdir with real library path /usr/lib or /usr/lib64 ++ // "library": "$libdir/kea/hooks/libdhcp_legal_log.so" + // "parameters": { + // "path": "/var/lib/kea", + // "base-name": "kea-forensic4" +@@ -269,7 +270,8 @@ + // // of specific options or perhaps even a combination of several + // // options and fields to uniquely identify a client. Those scenarios + // // are addressed by the Flexible Identifiers hook application. +- // "library": "@libdir@/kea/hooks/libdhcp_flex_id.so", ++ // // Replace $libdir with real library path /usr/lib or /usr/lib64 ++ // "library": "$libdir/kea/hooks/libdhcp_flex_id.so", + // "parameters": { + // "identifier-expression": "substring(relay6[0].option[18],0,8)" + // } diff --git a/poky/meta/recipes-connectivity/kea/kea_1.7.10.bb b/poky/meta/recipes-connectivity/kea/kea_1.7.10.bb index e2560b239..2ea4b1275 100644 --- a/poky/meta/recipes-connectivity/kea/kea_1.7.10.bb +++ b/poky/meta/recipes-connectivity/kea/kea_1.7.10.bb @@ -9,9 +9,11 @@ DEPENDS = "boost log4cplus openssl" SRC_URI = "\ http://ftp.isc.org/isc/kea/${PV}/${BP}.tar.gz \ + file://0001-keactrl.in-create-var-lib-kea-and-var-run-kea-folder.patch \ file://kea-dhcp4.service \ file://kea-dhcp6.service \ file://kea-dhcp-ddns.service \ + file://fix-multilib-conflict.patch \ " SRC_URI[sha256sum] = "4e121f0e58b175a827581c69cb1d60778647049fa47f142940dddc9ce58f3c82" @@ -46,7 +48,7 @@ do_install_append() { install -m 0644 ${WORKDIR}/kea-dhcp*service ${D}${systemd_system_unitdir} sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@BASE_BINDIR@,${base_bindir},g' \ -e 's,@LOCALSTATEDIR@,${localstatedir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' \ - ${D}${systemd_system_unitdir}/kea-dhcp*service + ${D}${systemd_system_unitdir}/kea-dhcp*service ${D}${sbindir}/keactrl } do_install_append() { |