From 39a7aeddfbef262bcebaa1df25697c080f2a9e7b Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Tue, 19 Oct 2021 17:33:17 +0200 Subject: kea: update 1.8.2 -> 2.0.0 Remove 0001-keactrl.in-create-var-lib-kea-and-var-run-kea-folder.patch as code removed upstream. License-Update: formatting (From OE-Core rev: 3af27805d8cf88d03c34690241ecba899c33a26b) Signed-off-by: Alexander Kanavin Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- .../0001-add-missing-headers-in-timer_mgr.cc.patch | 29 -------- .../0001-ax_cpp11.m4-Include-memory-header.patch | 24 ------- .../kea/files/0001-include-limits.h.patch | 35 ---------- ...create-var-lib-kea-and-var-run-kea-folder.patch | 39 ----------- ...-logger_unittest_support.cc-do-not-write-.patch | 7 +- .../kea/files/fix-multilib-conflict.patch | 54 ++++++++------- .../kea/files/fix_pid_keactrl.patch | 27 +++++--- meta/recipes-connectivity/kea/kea_1.8.2.bb | 81 ---------------------- meta/recipes-connectivity/kea/kea_2.0.0.bb | 77 ++++++++++++++++++++ 9 files changed, 126 insertions(+), 247 deletions(-) delete mode 100644 meta/recipes-connectivity/kea/files/0001-add-missing-headers-in-timer_mgr.cc.patch delete mode 100644 meta/recipes-connectivity/kea/files/0001-ax_cpp11.m4-Include-memory-header.patch delete mode 100644 meta/recipes-connectivity/kea/files/0001-include-limits.h.patch delete mode 100644 meta/recipes-connectivity/kea/files/0001-keactrl.in-create-var-lib-kea-and-var-run-kea-folder.patch delete mode 100644 meta/recipes-connectivity/kea/kea_1.8.2.bb create mode 100644 meta/recipes-connectivity/kea/kea_2.0.0.bb (limited to 'meta') diff --git a/meta/recipes-connectivity/kea/files/0001-add-missing-headers-in-timer_mgr.cc.patch b/meta/recipes-connectivity/kea/files/0001-add-missing-headers-in-timer_mgr.cc.patch deleted file mode 100644 index 1cd8bc70f5..0000000000 --- a/meta/recipes-connectivity/kea/files/0001-add-missing-headers-in-timer_mgr.cc.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 11981d637273778f408d15f488cc9e1d244dcae8 Mon Sep 17 00:00:00 2001 -From: Andrei Pavel -Date: Thu, 29 Jul 2021 21:33:42 +0300 -Subject: [PATCH] add missing headers in timer_mgr.cc - -Upstream-Status: Backport [https://github.com/isc-projects/kea/commit/2bba96164f6c5c8f56de7a5dc52af73bfd51cccd] -Signed-off-by: Alexander Kanavin ---- - src/lib/dhcpsrv/timer_mgr.cc | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/src/lib/dhcpsrv/timer_mgr.cc b/src/lib/dhcpsrv/timer_mgr.cc -index 5ec4123..5611c46 100644 ---- a/src/lib/dhcpsrv/timer_mgr.cc -+++ b/src/lib/dhcpsrv/timer_mgr.cc -@@ -14,6 +14,13 @@ - #include - #include - -+#include -+#include -+#include -+#include -+#include -+#include -+ - using namespace isc; - using namespace isc::asiolink; - diff --git a/meta/recipes-connectivity/kea/files/0001-ax_cpp11.m4-Include-memory-header.patch b/meta/recipes-connectivity/kea/files/0001-ax_cpp11.m4-Include-memory-header.patch deleted file mode 100644 index 4978cae87c..0000000000 --- a/meta/recipes-connectivity/kea/files/0001-ax_cpp11.m4-Include-memory-header.patch +++ /dev/null @@ -1,24 +0,0 @@ -From 5314a4815006e3a42f3ce265d1597db700cdb784 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 26 Feb 2021 23:14:20 -0800 -Subject: [PATCH] ax_cpp11.m4: Include header - -This is needed for std::shared_ptr -GCC-11 throws errors if header is not included - -Upstream-Status: Submitted [https://github.com/isc-projects/kea/pull/120] -Signed-off-by: Khem Raj ---- - m4macros/ax_cpp11.m4 | 1 + - 1 file changed, 1 insertion(+) - ---- a/m4macros/ax_cpp11.m4 -+++ b/m4macros/ax_cpp11.m4 -@@ -182,6 +182,7 @@ for retry in "none" "--std=c++11" "--std - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [#include -+ #include - std::shared_ptr th;], - [th.reset(new std::thread([[]]() { return; })); - th->join();])], diff --git a/meta/recipes-connectivity/kea/files/0001-include-limits.h.patch b/meta/recipes-connectivity/kea/files/0001-include-limits.h.patch deleted file mode 100644 index 3856b3d523..0000000000 --- a/meta/recipes-connectivity/kea/files/0001-include-limits.h.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 7bca122e15bbe98c7b8da851ef3e1cf9a714afd9 Mon Sep 17 00:00:00 2001 -From: Khem Raj -Date: Fri, 26 Feb 2021 23:31:15 -0800 -Subject: [PATCH] include limits.h - -Fixes build with gcc11 -backend_selector.cc:61:35: error: 'numeric_limits' is not a member of 'std' - -Upstream-Status: Submitted [https://github.com/isc-projects/kea/pull/120] -Signed-off-by: Khem Raj ---- - src/lib/exceptions/exceptions.h | 1 + - 1 file changed, 1 insertion(+) - ---- a/src/lib/database/backend_selector.cc -+++ b/src/lib/database/backend_selector.cc -@@ -6,7 +6,7 @@ - - #include - #include --#include -+#include - #include - - using namespace isc::data; ---- a/src/lib/dhcpsrv/subnet_id.h -+++ b/src/lib/dhcpsrv/subnet_id.h -@@ -10,6 +10,7 @@ - #include - #include - #include -+#include - - namespace isc { - namespace dhcp { diff --git a/meta/recipes-connectivity/kea/files/0001-keactrl.in-create-var-lib-kea-and-var-run-kea-folder.patch b/meta/recipes-connectivity/kea/files/0001-keactrl.in-create-var-lib-kea-and-var-run-kea-folder.patch deleted file mode 100644 index ab3fd83946..0000000000 --- a/meta/recipes-connectivity/kea/files/0001-keactrl.in-create-var-lib-kea-and-var-run-kea-folder.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 639dc25cdabc9d1846000a542c8cc19158b69994 Mon Sep 17 00:00:00 2001 -From: Mingli Yu -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 ---- - 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/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 226bc5b311..94fbd12737 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 @@ -1,4 +1,4 @@ -From 9985a03f13da4d7bb0a433f7305d2ffae3d82a27 Mon Sep 17 00:00:00 2001 +From 841924e1fe8db2bff3eab8d37634ef08f86c00ec Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Tue, 10 Nov 2020 15:57:03 +0000 Subject: [PATCH] src/lib/log/logger_unittest_support.cc: do not write build @@ -8,12 +8,13 @@ This breaks reproducibility and is needed only in unit testing. Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin + --- src/lib/log/logger_unittest_support.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/log/logger_unittest_support.cc b/src/lib/log/logger_unittest_support.cc -index 58dbef8..9a2929c 100644 +index fc01c6e..f46d17e 100644 --- a/src/lib/log/logger_unittest_support.cc +++ b/src/lib/log/logger_unittest_support.cc @@ -84,7 +84,7 @@ void initLogger(isc::log::Severity severity, int dbglevel) { @@ -24,4 +25,4 @@ index 58dbef8..9a2929c 100644 + //setenv("KEA_LOCKFILE_DIR", TOP_BUILDDIR, 0); // Initialize logging - initLogger(root, isc::log::DEBUG, isc::log::MAX_DEBUG_LEVEL, localfile); + initLogger(root, severity, dbglevel, localfile); diff --git a/meta/recipes-connectivity/kea/files/fix-multilib-conflict.patch b/meta/recipes-connectivity/kea/files/fix-multilib-conflict.patch index 733adf5536..8de9fce4b4 100644 --- a/meta/recipes-connectivity/kea/files/fix-multilib-conflict.patch +++ b/meta/recipes-connectivity/kea/files/fix-multilib-conflict.patch @@ -1,4 +1,7 @@ -There are conflict of config files between kea and lib32-kea: +From d027b1d85a8c1a0193b6e4a00083d3038d699a59 Mon Sep 17 00:00:00 2001 +From: Kai Kang +Date: Tue, 22 Sep 2020 15:02:33 +0800 +Subject: [PATCH] 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 @@ -10,16 +13,17 @@ 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 + --- src/bin/keactrl/kea-ctrl-agent.conf.pre | 3 ++- - src/bin/keactrl/kea-dhcp4.conf.pre | 6 ++++-- - 2 files changed, 6 insertions(+), 3 deletions(-) + src/bin/keactrl/kea-dhcp4.conf.pre | 4 ++-- + 2 files changed, 4 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 +index e6ae8b8..50a3092 100644 --- a/src/bin/keactrl/kea-ctrl-agent.conf.pre +++ b/src/bin/keactrl/kea-ctrl-agent.conf.pre -@@ -45,7 +45,8 @@ +@@ -51,7 +51,8 @@ // Agent will fail to start. "hooks-libraries": [ // { @@ -30,26 +34,24 @@ index 211b7ff..d710ec7 100644 // "param1": "foo" // } diff --git a/src/bin/keactrl/kea-dhcp4.conf.pre b/src/bin/keactrl/kea-dhcp4.conf.pre -index 5f77a32..70ae3d9 100644 +index 26bf163..49ddb0a 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)" - // } +@@ -252,7 +252,7 @@ + // // 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", ++ // "library": "$libdir/kea/hooks/libdhcp_legal_log.so", + // "parameters": { + // "path": "/var/lib/kea", + // "base-name": "kea-forensic4" +@@ -269,7 +269,7 @@ + // // 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", ++ // "library": "$libdir/kea/hooks/libdhcp_flex_id.so", + // "parameters": { + // "identifier-expression": "relay4[2].hex" + // } diff --git a/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch b/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch index eeeb89942b..b7c2fd4f0d 100644 --- a/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch +++ b/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch @@ -1,22 +1,29 @@ -Busybox does not support ps -p so use pgrep +From 18f4f6206c248d6169aa67b3ecf16bf54e9292e8 Mon Sep 17 00:00:00 2001 +From: Armin kuster +Date: Wed, 14 Oct 2020 22:48:31 -0700 +Subject: [PATCH] Busybox does not support ps -p so use pgrep Upstream-Status: Inappropriate [embedded specific] Based on changes from Diego Sueiro Signed-off-by: Armin kuster -Index: kea-1.7.10/src/bin/keactrl/keactrl.in -=================================================================== ---- kea-1.7.10.orig/src/bin/keactrl/keactrl.in -+++ kea-1.7.10/src/bin/keactrl/keactrl.in -@@ -137,8 +137,8 @@ check_running() { +--- + src/bin/keactrl/keactrl.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/bin/keactrl/keactrl.in b/src/bin/keactrl/keactrl.in +index ae5bd8e..e9f9b73 100644 +--- a/src/bin/keactrl/keactrl.in ++++ b/src/bin/keactrl/keactrl.in +@@ -151,8 +151,8 @@ check_running() { # Get the PID from the PID file (if it exists) get_pid_from_file "${proc_name}" if [ ${_pid} -gt 0 ]; then - # Use ps to check if PID is alive -- ps -p ${_pid} 1>/dev/null +- if ps -p ${_pid} 1>/dev/null; then + # Use pgrep and grep to check if PID is alive -+ pgrep -v 1 | grep ${_pid} 1>/dev/null - retcode=$? - if [ $retcode -eq 0 ]; then ++ if pgrep -v 1 | grep ${_pid} 1>/dev/null; then # No error, so PID IS ALIVE + _running=1 + fi diff --git a/meta/recipes-connectivity/kea/kea_1.8.2.bb b/meta/recipes-connectivity/kea/kea_1.8.2.bb deleted file mode 100644 index 04424d0d70..0000000000 --- a/meta/recipes-connectivity/kea/kea_1.8.2.bb +++ /dev/null @@ -1,81 +0,0 @@ -SUMMARY = "ISC Kea DHCP Server" -DESCRIPTION = "Kea is the next generation of DHCP software developed by ISC. It supports both DHCPv4 and DHCPv6 protocols along with their extensions, e.g. prefix delegation and dynamic updates to DNS." -HOMEPAGE = "http://kea.isc.org" -SECTION = "connectivity" -LICENSE = "MPL-2.0 & Apache-2.0" -LIC_FILES_CHKSUM = "file://COPYING;md5=68d95543d2096459290a4e6b9ceccffa" - -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://kea-dhcp4-server \ - file://kea-dhcp6-server \ - file://kea-dhcp-ddns-server \ - file://fix-multilib-conflict.patch \ - file://fix_pid_keactrl.patch \ - file://0001-src-lib-log-logger_unittest_support.cc-do-not-write-.patch \ - file://0001-ax_cpp11.m4-Include-memory-header.patch \ - file://0001-include-limits.h.patch \ - file://0001-add-missing-headers-in-timer_mgr.cc.patch \ - " -SRC_URI[sha256sum] = "486ca7abedb9d6fdf8e4344ad8688d1171f2ef0f5506d118988aadeae80a1d39" - -inherit autotools systemd update-rc.d upstream-version-is-even - -INITSCRIPT_NAME = "kea-dhcp4-server" -INITSCRIPT_PARAMS = "defaults 30" - -SYSTEMD_SERVICE:${PN} = "kea-dhcp4.service kea-dhcp6.service kea-dhcp-ddns.service" -SYSTEMD_AUTO_ENABLE = "disable" - -DEBUG_OPTIMIZATION:remove:mips = " -Og" -DEBUG_OPTIMIZATION:append:mips = " -O" -BUILD_OPTIMIZATION:remove:mips = " -Og" -BUILD_OPTIMIZATION:append:mips = " -O" - -DEBUG_OPTIMIZATION:remove:mipsel = " -Og" -DEBUG_OPTIMIZATION:append:mipsel = " -O" -BUILD_OPTIMIZATION:remove:mipsel = " -Og" -BUILD_OPTIMIZATION:append:mipsel = " -O" - -EXTRA_OECONF = "--with-boost-libs=-lboost_system \ - --with-log4cplus=${STAGING_DIR_TARGET}${prefix} \ - --with-openssl=${STAGING_DIR_TARGET}${prefix}" - -do_configure:prepend() { - # replace abs_top_builddir to avoid introducing the build path - # don't expand the abs_top_builddir on the target as the abs_top_builddir is meanlingless on the target - find ${S} -type f -name *.sh.in | xargs sed -i "s:@abs_top_builddir@:@abs_top_builddir_placeholder@:g" - sed -i "s:@abs_top_srcdir@:@abs_top_srcdir_placeholder@:g" ${S}/src/bin/admin/kea-admin.in -} - -# patch out build host paths for reproducibility -do_compile:prepend:class-target() { - sed -i -e "s,${WORKDIR},,g" ${B}/config.report -} - -do_install:append() { - install -d ${D}${sysconfdir}/init.d - install -d ${D}${systemd_system_unitdir} - - install -m 0644 ${WORKDIR}/kea-dhcp*service ${D}${systemd_system_unitdir} - install -m 0755 ${WORKDIR}/kea-*-server ${D}${sysconfdir}/init.d - 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}${sbindir}/keactrl -} - -do_install:append() { - rm -rf "${D}${localstatedir}" -} - -CONFFILES:${PN} = "${sysconfdir}/kea/keactrl.conf" - -FILES:${PN}-staticdev += "${libdir}/kea/hooks/*.a ${libdir}/hooks/*.a" -FILES:${PN} += "${libdir}/hooks/*.so" - -PARALLEL_MAKEINST = "" diff --git a/meta/recipes-connectivity/kea/kea_2.0.0.bb b/meta/recipes-connectivity/kea/kea_2.0.0.bb new file mode 100644 index 0000000000..9f33c325bd --- /dev/null +++ b/meta/recipes-connectivity/kea/kea_2.0.0.bb @@ -0,0 +1,77 @@ +SUMMARY = "ISC Kea DHCP Server" +DESCRIPTION = "Kea is the next generation of DHCP software developed by ISC. It supports both DHCPv4 and DHCPv6 protocols along with their extensions, e.g. prefix delegation and dynamic updates to DNS." +HOMEPAGE = "http://kea.isc.org" +SECTION = "connectivity" +LICENSE = "MPL-2.0 & Apache-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=07b7477a1d815a4aacab73b1531f577a" + +DEPENDS = "boost log4cplus openssl" + +SRC_URI = "http://ftp.isc.org/isc/kea/${PV}/${BP}.tar.gz \ + file://kea-dhcp4.service \ + file://kea-dhcp6.service \ + file://kea-dhcp-ddns.service \ + file://kea-dhcp4-server \ + file://kea-dhcp6-server \ + file://kea-dhcp-ddns-server \ + file://fix-multilib-conflict.patch \ + file://fix_pid_keactrl.patch \ + file://0001-src-lib-log-logger_unittest_support.cc-do-not-write-.patch \ + " +SRC_URI[sha256sum] = "05854e0c3871b452edace18eccc6ab618940e0249fbe7c232a36d06ae59bf41d" + +inherit autotools systemd update-rc.d upstream-version-is-even + +INITSCRIPT_NAME = "kea-dhcp4-server" +INITSCRIPT_PARAMS = "defaults 30" + +SYSTEMD_SERVICE:${PN} = "kea-dhcp4.service kea-dhcp6.service kea-dhcp-ddns.service" +SYSTEMD_AUTO_ENABLE = "disable" + +DEBUG_OPTIMIZATION:remove:mips = " -Og" +DEBUG_OPTIMIZATION:append:mips = " -O" +BUILD_OPTIMIZATION:remove:mips = " -Og" +BUILD_OPTIMIZATION:append:mips = " -O" + +DEBUG_OPTIMIZATION:remove:mipsel = " -Og" +DEBUG_OPTIMIZATION:append:mipsel = " -O" +BUILD_OPTIMIZATION:remove:mipsel = " -Og" +BUILD_OPTIMIZATION:append:mipsel = " -O" + +EXTRA_OECONF = "--with-boost-libs=-lboost_system \ + --with-log4cplus=${STAGING_DIR_TARGET}${prefix} \ + --with-openssl=${STAGING_DIR_TARGET}${prefix}" + +do_configure:prepend() { + # replace abs_top_builddir to avoid introducing the build path + # don't expand the abs_top_builddir on the target as the abs_top_builddir is meanlingless on the target + find ${S} -type f -name *.sh.in | xargs sed -i "s:@abs_top_builddir@:@abs_top_builddir_placeholder@:g" + sed -i "s:@abs_top_srcdir@:@abs_top_srcdir_placeholder@:g" ${S}/src/bin/admin/kea-admin.in +} + +# patch out build host paths for reproducibility +do_compile:prepend:class-target() { + sed -i -e "s,${WORKDIR},,g" ${B}/config.report +} + +do_install:append() { + install -d ${D}${sysconfdir}/init.d + install -d ${D}${systemd_system_unitdir} + + install -m 0644 ${WORKDIR}/kea-dhcp*service ${D}${systemd_system_unitdir} + install -m 0755 ${WORKDIR}/kea-*-server ${D}${sysconfdir}/init.d + 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}${sbindir}/keactrl +} + +do_install:append() { + rm -rf "${D}${localstatedir}" +} + +CONFFILES:${PN} = "${sysconfdir}/kea/keactrl.conf" + +FILES:${PN}-staticdev += "${libdir}/kea/hooks/*.a ${libdir}/hooks/*.a" +FILES:${PN} += "${libdir}/hooks/*.so" + +PARALLEL_MAKEINST = "" -- cgit v1.2.3-54-g00ecf