summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/kea
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/kea')
-rw-r--r--meta/recipes-connectivity/kea/files/0001-Replace-Name-NameString-with-vector-of-uint8_t.patch90
-rw-r--r--meta/recipes-connectivity/kea/files/0002-Fix-unittests-Typo-in-Name-Name-append-to-ndata_-not.patch36
-rw-r--r--meta/recipes-connectivity/kea/files/fix-multilib-conflict.patch10
-rw-r--r--meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch12
-rw-r--r--meta/recipes-connectivity/kea/files/kea-dhcp-ddns.service1
-rw-r--r--meta/recipes-connectivity/kea/kea_2.6.1.bb (renamed from meta/recipes-connectivity/kea/kea_2.0.0.bb)16
6 files changed, 150 insertions, 15 deletions
diff --git a/meta/recipes-connectivity/kea/files/0001-Replace-Name-NameString-with-vector-of-uint8_t.patch b/meta/recipes-connectivity/kea/files/0001-Replace-Name-NameString-with-vector-of-uint8_t.patch
new file mode 100644
index 0000000000..a7deeca243
--- /dev/null
+++ b/meta/recipes-connectivity/kea/files/0001-Replace-Name-NameString-with-vector-of-uint8_t.patch
@@ -0,0 +1,90 @@
+From 6b9fb56e3573aa65923df9a08201dd5321a1b1f1 Mon Sep 17 00:00:00 2001
+From: Dimitry Andric <dimitry@andric.com>
+Date: Sat, 3 Aug 2024 14:37:52 +0200
+Subject: [PATCH 1/2] Replace Name::NameString with vector of uint8_t
+
+As noted in the libc++ 19 release notes, it now only provides
+std::char_traits<> for types char, char8_t, char16_t, char32_t and
+wchar_t, and any instantiation for other types will fail.
+
+Name::NameString is defined as a std::basic_string<uint8_t>, so that
+will no longer work. Redefine it as a std::vector<uint8_t> instead.
+
+Upstream-Status: Submitted [https://gitlab.isc.org/isc-projects/kea/-/merge_requests/2410]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/lib/dns/name.cc | 12 ++++++------
+ src/lib/dns/name.h | 2 +-
+ 2 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/src/lib/dns/name.cc b/src/lib/dns/name.cc
+index ac48205..085229b 100644
+--- a/src/lib/dns/name.cc
++++ b/src/lib/dns/name.cc
+@@ -303,7 +303,7 @@ Name::Name(const std::string &namestring, bool downcase) {
+ // And get the output
+ labelcount_ = offsets.size();
+ isc_throw_assert(labelcount_ > 0 && labelcount_ <= Name::MAX_LABELS);
+- ndata_.assign(ndata.data(), ndata.size());
++ ndata_.assign(ndata.data(), ndata.data() + ndata.size());
+ length_ = ndata_.size();
+ offsets_.assign(offsets.begin(), offsets.end());
+ }
+@@ -336,7 +336,7 @@ Name::Name(const char* namedata, size_t data_len, const Name* origin,
+ // Get the output
+ labelcount_ = offsets.size();
+ isc_throw_assert(labelcount_ > 0 && labelcount_ <= Name::MAX_LABELS);
+- ndata_.assign(ndata.data(), ndata.size());
++ ndata_.assign(ndata.data(), ndata.data() + ndata.size());
+ length_ = ndata_.size();
+ offsets_.assign(offsets.begin(), offsets.end());
+
+@@ -347,7 +347,7 @@ Name::Name(const char* namedata, size_t data_len, const Name* origin,
+ // Drop the last character of the data (the \0) and append a copy of
+ // the origin's data
+ ndata_.erase(ndata_.end() - 1);
+- ndata_.append(origin->ndata_);
++ ndata_.insert(ndata.end(), origin->ndata_.begin(), origin->ndata_.end());
+
+ // Do a similar thing with offsets. However, we need to move them
+ // so they point after the prefix we parsed before.
+@@ -582,7 +582,7 @@ Name::concatenate(const Name& suffix) const {
+
+ Name retname;
+ retname.ndata_.reserve(length);
+- retname.ndata_.assign(ndata_, 0, length_ - 1);
++ retname.ndata_.assign(ndata_.data(), ndata_.data() + length_ - 1);
+ retname.ndata_.insert(retname.ndata_.end(),
+ suffix.ndata_.begin(), suffix.ndata_.end());
+ isc_throw_assert(retname.ndata_.size() == length);
+@@ -622,7 +622,7 @@ Name::reverse() const {
+ NameString::const_iterator n0 = ndata_.begin();
+ retname.offsets_.push_back(0);
+ while (rit1 != offsets_.rend()) {
+- retname.ndata_.append(n0 + *rit1, n0 + *rit0);
++ retname.ndata_.insert(retname.ndata_.end(), n0 + *rit1, n0 + *rit0);
+ retname.offsets_.push_back(retname.ndata_.size());
+ ++rit0;
+ ++rit1;
+@@ -662,7 +662,7 @@ Name::split(const unsigned int first, const unsigned int n) const {
+ // original name, and append the trailing dot explicitly.
+ //
+ retname.ndata_.reserve(retname.offsets_.back() + 1);
+- retname.ndata_.assign(ndata_, offsets_[first], retname.offsets_.back());
++ retname.ndata_.assign(ndata_.data() + offsets_[first], ndata_.data() + retname.offsets_.back());
+ retname.ndata_.push_back(0);
+
+ retname.length_ = retname.ndata_.size();
+diff --git a/src/lib/dns/name.h b/src/lib/dns/name.h
+index 37723e8..fac0036 100644
+--- a/src/lib/dns/name.h
++++ b/src/lib/dns/name.h
+@@ -228,7 +228,7 @@ class Name {
+ //@{
+ private:
+ /// \brief Name data string
+- typedef std::basic_string<uint8_t> NameString;
++ typedef std::vector<uint8_t> NameString;
+ /// \brief Name offsets type
+ typedef std::vector<uint8_t> NameOffsets;
+
diff --git a/meta/recipes-connectivity/kea/files/0002-Fix-unittests-Typo-in-Name-Name-append-to-ndata_-not.patch b/meta/recipes-connectivity/kea/files/0002-Fix-unittests-Typo-in-Name-Name-append-to-ndata_-not.patch
new file mode 100644
index 0000000000..a24a25f1c9
--- /dev/null
+++ b/meta/recipes-connectivity/kea/files/0002-Fix-unittests-Typo-in-Name-Name-append-to-ndata_-not.patch
@@ -0,0 +1,36 @@
+From b5f6cc6b3a2b2c35c9b9bb856861c502771079cc Mon Sep 17 00:00:00 2001
+From: Dimitry Andric <dimitry@unified-streaming.com>
+Date: Wed, 28 Aug 2024 22:32:44 +0200
+Subject: [PATCH 2/2] Fix unittests: * Typo in `Name::Name`: append to
+ `ndata_`, not `ndata` * In `Name::split`, use the correct iterators for
+ assigning
+
+Upstream-Status: Submitted [https://gitlab.isc.org/isc-projects/kea/-/merge_requests/2410]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/lib/dns/name.cc | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/lib/dns/name.cc b/src/lib/dns/name.cc
+index 085229b..47d9b8f 100644
+--- a/src/lib/dns/name.cc
++++ b/src/lib/dns/name.cc
+@@ -347,7 +347,7 @@ Name::Name(const char* namedata, size_t data_len, const Name* origin,
+ // Drop the last character of the data (the \0) and append a copy of
+ // the origin's data
+ ndata_.erase(ndata_.end() - 1);
+- ndata_.insert(ndata.end(), origin->ndata_.begin(), origin->ndata_.end());
++ ndata_.insert(ndata_.end(), origin->ndata_.begin(), origin->ndata_.end());
+
+ // Do a similar thing with offsets. However, we need to move them
+ // so they point after the prefix we parsed before.
+@@ -662,7 +662,8 @@ Name::split(const unsigned int first, const unsigned int n) const {
+ // original name, and append the trailing dot explicitly.
+ //
+ retname.ndata_.reserve(retname.offsets_.back() + 1);
+- retname.ndata_.assign(ndata_.data() + offsets_[first], ndata_.data() + retname.offsets_.back());
++ auto it = ndata_.data() + offsets_[first];
++ retname.ndata_.assign(it, it + retname.offsets_.back());
+ retname.ndata_.push_back(0);
+
+ retname.length_ = retname.ndata_.size();
diff --git a/meta/recipes-connectivity/kea/files/fix-multilib-conflict.patch b/meta/recipes-connectivity/kea/files/fix-multilib-conflict.patch
index 78f475a495..5b135b3aee 100644
--- a/meta/recipes-connectivity/kea/files/fix-multilib-conflict.patch
+++ b/meta/recipes-connectivity/kea/files/fix-multilib-conflict.patch
@@ -1,4 +1,4 @@
-From d027b1d85a8c1a0193b6e4a00083d3038d699a59 Mon Sep 17 00:00:00 2001
+From 06ebd1b2ced426c420ed162980eca194f9f918ae Mon Sep 17 00:00:00 2001
From: Kai Kang <kai.kang@windriver.com>
Date: Tue, 22 Sep 2020 15:02:33 +0800
Subject: [PATCH] There are conflict of config files between kea and lib32-kea:
@@ -12,7 +12,7 @@ Subject: [PATCH] There are conflict of config files between kea and lib32-kea:
Because they are all commented out, replace the expanded libdir path with
'$libdir' in the config files to avoid conflict.
-Upstream-Status: Pending
+Upstream-Status: Submitted [https://gitlab.isc.org/isc-projects/kea/-/issues/2602]
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
@@ -35,10 +35,10 @@ index e6ae8b8..50a3092 100644
// "param1": "foo"
// }
diff --git a/src/bin/keactrl/kea-dhcp4.conf.pre b/src/bin/keactrl/kea-dhcp4.conf.pre
-index 26bf163..49ddb0a 100644
+index 6edb8a1..b2a7385 100644
--- a/src/bin/keactrl/kea-dhcp4.conf.pre
+++ b/src/bin/keactrl/kea-dhcp4.conf.pre
-@@ -252,7 +252,7 @@
+@@ -255,7 +255,7 @@
// // of all devices serviced by Kea, including their identifiers
// // (like MAC address), their location in the network, times
// // when they were active etc.
@@ -47,7 +47,7 @@ index 26bf163..49ddb0a 100644
// "parameters": {
// "path": "/var/lib/kea",
// "base-name": "kea-forensic4"
-@@ -269,7 +269,7 @@
+@@ -272,7 +272,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.
diff --git a/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch b/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch
index b7c2fd4f0d..2f5a217d3f 100644
--- a/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch
+++ b/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch
@@ -1,4 +1,4 @@
-From 18f4f6206c248d6169aa67b3ecf16bf54e9292e8 Mon Sep 17 00:00:00 2001
+From f5125725e4e2e250ccc78a17a8b77431100e7c15 Mon Sep 17 00:00:00 2001
From: Armin kuster <akuster808@gmail.com>
Date: Wed, 14 Oct 2020 22:48:31 -0700
Subject: [PATCH] Busybox does not support ps -p so use pgrep
@@ -8,15 +8,18 @@ Based on changes from Diego Sueiro <Diego.Sueiro@arm.com>
Signed-off-by: Armin kuster <akuster808@gmail.com>
+Refresh to apply on top of 2.6.1.
+
+Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
---
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
+index cccfdac303..20ae2e6ec5 100644
--- a/src/bin/keactrl/keactrl.in
+++ b/src/bin/keactrl/keactrl.in
-@@ -151,8 +151,8 @@ check_running() {
+@@ -146,8 +146,8 @@ check_running() {
# Get the PID from the PID file (if it exists)
get_pid_from_file "${proc_name}"
if [ ${_pid} -gt 0 ]; then
@@ -27,3 +30,6 @@ index ae5bd8e..e9f9b73 100644
# No error, so PID IS ALIVE
_running=1
fi
+--
+2.39.2
+
diff --git a/meta/recipes-connectivity/kea/files/kea-dhcp-ddns.service b/meta/recipes-connectivity/kea/files/kea-dhcp-ddns.service
index 91aa2eb14f..f6059d73cb 100644
--- a/meta/recipes-connectivity/kea/files/kea-dhcp-ddns.service
+++ b/meta/recipes-connectivity/kea/files/kea-dhcp-ddns.service
@@ -6,7 +6,6 @@ After=time-sync.target
[Service]
ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/
-ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/kea
ExecStart=@SBINDIR@/kea-dhcp-ddns -c @SYSCONFDIR@/kea/kea-dhcp-ddns.conf
[Install]
diff --git a/meta/recipes-connectivity/kea/kea_2.0.0.bb b/meta/recipes-connectivity/kea/kea_2.6.1.bb
index 9f33c325bd..4f8c4124cb 100644
--- a/meta/recipes-connectivity/kea/kea_2.0.0.bb
+++ b/meta/recipes-connectivity/kea/kea_2.6.1.bb
@@ -2,8 +2,8 @@ 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"
+LICENSE = "MPL-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=618093ea9de92c70a115268c1d53421f"
DEPENDS = "boost log4cplus openssl"
@@ -17,8 +17,10 @@ SRC_URI = "http://ftp.isc.org/isc/kea/${PV}/${BP}.tar.gz \
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-Replace-Name-NameString-with-vector-of-uint8_t.patch \
+ file://0002-Fix-unittests-Typo-in-Name-Name-append-to-ndata_-not.patch \
"
-SRC_URI[sha256sum] = "05854e0c3871b452edace18eccc6ab618940e0249fbe7c232a36d06ae59bf41d"
+SRC_URI[sha256sum] = "d2ce14a91c2e248ad2876e29152d647bcc5e433bc68dafad0ee96ec166fcfad1"
inherit autotools systemd update-rc.d upstream-version-is-even
@@ -38,6 +40,7 @@ DEBUG_OPTIMIZATION:append:mipsel = " -O"
BUILD_OPTIMIZATION:remove:mipsel = " -Og"
BUILD_OPTIMIZATION:append:mipsel = " -O"
+CXXFLAGS:remove = "-fvisibility-inlines-hidden"
EXTRA_OECONF = "--with-boost-libs=-lboost_system \
--with-log4cplus=${STAGING_DIR_TARGET}${prefix} \
--with-openssl=${STAGING_DIR_TARGET}${prefix}"
@@ -46,7 +49,7 @@ 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
+ sed -i "s:@abs_top_builddir@:@abs_top_builddir_placeholder@:g" ${S}/src/bin/admin/kea-admin.in
}
# patch out build host paths for reproducibility
@@ -58,11 +61,12 @@ 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
+ install -m 0644 ${UNPACKDIR}/kea-dhcp*service ${D}${systemd_system_unitdir}
+ install -m 0755 ${UNPACKDIR}/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
+ sed -i "s:${B}/../${BPN}-${PV}:@abs_top_builddir_placeholder@:g" ${D}${sbindir}/kea-admin
}
do_install:append() {