kea: add new recipe
PATCH 1/1 kea: add new recipe
From: Mingli Yu <[email protected]>
* 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.
* Backport patch to fix issue with boost 1.66
* Add kea-msg-compiler related patch to support cross-compile
Signed-off-by Mingli Yu <[email protected]>
--- ...-Added-option-to-provide-kea-msg-compiler.patch | 235 +++++++++++++++++++++ ...-fix-compile-error-about-kea-msg-compiler.patch | 72 +++++++ ...akefile.am-update-hooksdir-for-lease_cmds.patch | 30 +++ .../0001-asiolink-fix-build-with-boost-1.66.patch | 103 +++++++++ .../kea/files/kea-dhcp-ddns.service | 13 ++ .../kea/files/kea-dhcp4.service | 13 ++ .../kea/files/kea-dhcp6.service | 13 ++ .../recipes-connectivity/kea/kea_1.3.0.bb | 52 +++++ 8 files changed, 531 insertions(+) create mode 100644 meta-networking/recipes-connectivity/kea/files/0001-Added-option-to-provide-kea-msg-compiler.patch create mode 100644 meta-networking/recipes-connectivity/kea/files/0001-Makefile.am-fix-compile-error-about-kea-msg-compiler.patch create mode 100644 meta-networking/recipes-connectivity/kea/files/0001-Makefile.am-update-hooksdir-for-lease_cmds.patch create mode 100644 meta-networking/recipes-connectivity/kea/files/0001-asiolink-fix-build-with-boost-1.66.patch create mode 100644 meta-networking/recipes-connectivity/kea/files/kea-dhcp-ddns.service create mode 100644 meta-networking/recipes-connectivity/kea/files/kea-dhcp4.service create mode 100644 meta-networking/recipes-connectivity/kea/files/kea-dhcp6.service create mode 100644 meta-networking/recipes-connectivity/kea/kea_1.3.0.bb
meta-networking/recipes-connectivity/kea/files/0001-Added-option-to-provide-kea-msg-compiler.patch new file +235 -0
@@ -0,0 +1,235 @@ +From c7806af2957627151ef603ad4aa893ca1a4bf59e Mon Sep 17 00:00:00 2001 +From: Siyu Zhang <[email protected]> +Date: Sat, 10 Sep 2016 15:44:10 +0200 +Subject: [PATCH 1/1] Added option to provide kea-msg-compiler + +Upstream-Status: Inappropriate[oe specific] + +Signed-off-by: Mingli Yu <[email protected]> +--- + configure.ac | 18 ++++++++++++++++++ + src/bin/d2/Makefile.am | 2 +- + src/bin/dhcp4/Makefile.am | 2 +- + src/bin/dhcp6/Makefile.am | 2 +- + src/bin/lfc/Makefile.am | 2 +- + src/hooks/dhcp/user_chk/Makefile.am | 2 +- + src/lib/asiodns/Makefile.am | 2 +- + src/lib/config/Makefile.am | 2 +- + src/lib/dhcp_ddns/Makefile.am | 2 +- + src/lib/dhcpsrv/Makefile.am | 6 +++--- + src/lib/eval/Makefile.am | 2 +- + src/lib/hooks/Makefile.am | 2 +- + src/lib/log/Makefile.am | 8 +++++++- + src/lib/log/tests/Makefile.am | 2 +- + 14 files changed, 39 insertions(+), 15 deletions(-) + +diff --git a/configure.ac b/configure.ac +index ea41f08..edb5120 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -202,6 +202,24 @@ case "$host" in + esac + KEA_CXXFLAGS="$KEA_CXXFLAGS $MULTITHREADING_FLAG" + ++AC_MSG_CHECKING(whether kea-msg-compiler is provided) ++AC_ARG_WITH(msg-compiler, ++ AC_HELP_STRING([--with-msg-compiler=PATH], [use provided kea-msg-compiler instead of local build]), ++ [ ++ dnl TODO: Validate provided kea-msg-compiler ++ AC_SUBST([KEA_MSG_COMPILER], [${withval}]) ++ AC_MSG_RESULT(${withval})], ++ [ ++ AC_MSG_RESULT([no]) ++ if test x"$host" != x"$build" && test x"$host" == x"$target"; then ++ AC_MSG_ERROR(native kea-msg-compiler not provided for cross compilation: build=${build} host=${host} target=${target}) ++ else ++ AC_SUBST([KEA_MSG_COMPILER], ['$(top_builddir)/src/lib/log/compiler/kea-msg-compiler']) ++ with_msg_compiler=no ++ fi]) ++ ++AM_CONDITIONAL([HAVE_MSG_COMPILER], [test x"$with_msg_compiler" != x"no"]) ++ + # Disable -Werror by default. Only use it if specifically enabled. + # The usage of this flag is: + # +diff --git a/src/bin/d2/Makefile.am b/src/bin/d2/Makefile.am +index 0b4e7d5..40cc094 100644 +--- a/src/bin/d2/Makefile.am ++++ b/src/bin/d2/Makefile.am +@@ -53,7 +53,7 @@ spec_config.h: spec_config.h.pre + d2_messages.h d2_messages.cc: s-messages + + s-messages: d2_messages.mes +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/bin/d2/d2_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/bin/d2/d2_messages.mes + touch $@ + + BUILT_SOURCES = d2_messages.h d2_messages.cc +diff --git a/src/bin/dhcp4/Makefile.am b/src/bin/dhcp4/Makefile.am +index 8360677..57acb91 100644 +--- a/src/bin/dhcp4/Makefile.am ++++ b/src/bin/dhcp4/Makefile.am +@@ -47,7 +47,7 @@ spec_config.h: spec_config.h.pre + dhcp4_messages.h dhcp4_messages.cc: s-messages + + s-messages: dhcp4_messages.mes +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/bin/dhcp4/dhcp4_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/bin/dhcp4/dhcp4_messages.mes + touch $@ + + BUILT_SOURCES = spec_config.h dhcp4_messages.h dhcp4_messages.cc +diff --git a/src/bin/dhcp6/Makefile.am b/src/bin/dhcp6/Makefile.am +index 47155ae..d7ed722 100644 +--- a/src/bin/dhcp6/Makefile.am ++++ b/src/bin/dhcp6/Makefile.am +@@ -48,7 +48,7 @@ spec_config.h: spec_config.h.pre + dhcp6_messages.h dhcp6_messages.cc: s-messages + + s-messages: dhcp6_messages.mes +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/bin/dhcp6/dhcp6_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/bin/dhcp6/dhcp6_messages.mes + touch $@ + + BUILT_SOURCES = spec_config.h dhcp6_messages.h dhcp6_messages.cc +diff --git a/src/bin/lfc/Makefile.am b/src/bin/lfc/Makefile.am +index 7bfeb96..09a700e 100644 +--- a/src/bin/lfc/Makefile.am ++++ b/src/bin/lfc/Makefile.am +@@ -32,7 +32,7 @@ endif + lfc_messages.h lfc_messages.cc: s-messages + + s-messages: lfc_messages.mes +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/bin/lfc/lfc_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/bin/lfc/lfc_messages.mes + touch $@ + + BUILT_SOURCES = lfc_messages.h lfc_messages.cc +diff --git a/src/hooks/dhcp/user_chk/Makefile.am b/src/hooks/dhcp/user_chk/Makefile.am +index 41ad7b2..32a93412 100644 +--- a/src/hooks/dhcp/user_chk/Makefile.am ++++ b/src/hooks/dhcp/user_chk/Makefile.am +@@ -7,7 +7,7 @@ AM_CXXFLAGS = $(KEA_CXXFLAGS) + # Define rule to build logging source files from message file + user_chk_messages.h user_chk_messages.cc: s-messages + s-messages: user_chk_messages.mes +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/hooks/dhcp/user_chk/user_chk_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/hooks/dhcp/user_chk/user_chk_messages.mes + touch $@ + + # Tell automake that the message files are built as part of the build process +diff --git a/src/lib/asiodns/Makefile.am b/src/lib/asiodns/Makefile.am +index 24dfe05..60c9f80 100644 +--- a/src/lib/asiodns/Makefile.am ++++ b/src/lib/asiodns/Makefile.am +@@ -11,7 +11,7 @@ CLEANFILES = *.gcno *.gcda asiodns_messages.h asiodns_messages.cc s-messages + asiodns_messages.h asiodns_messages.cc: s-messages + + s-messages: asiodns_messages.mes +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/asiodns/asiodns_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/lib/asiodns/asiodns_messages.mes + touch $@ + + BUILT_SOURCES = asiodns_messages.h asiodns_messages.cc +diff --git a/src/lib/config/Makefile.am b/src/lib/config/Makefile.am +index a89d530..26894ad 100644 +--- a/src/lib/config/Makefile.am ++++ b/src/lib/config/Makefile.am +@@ -7,7 +7,7 @@ AM_CPPFLAGS += $(BOOST_INCLUDES) + config_messages.h config_messages.cc: s-messages + + s-messages: config_messages.mes +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/config/config_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/lib/config/config_messages.mes + touch $@ + + BUILT_SOURCES = config_messages.h config_messages.cc +diff --git a/src/lib/dhcp_ddns/Makefile.am b/src/lib/dhcp_ddns/Makefile.am +index 820f448..fe15533 100644 +--- a/src/lib/dhcp_ddns/Makefile.am ++++ b/src/lib/dhcp_ddns/Makefile.am +@@ -8,7 +8,7 @@ AM_CXXFLAGS = $(KEA_CXXFLAGS) + dhcp_ddns_messages.h dhcp_ddns_messages.cc: s-messages + + s-messages: dhcp_ddns_messages.mes +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/dhcp_ddns/dhcp_ddns_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/lib/dhcp_ddns/dhcp_ddns_messages.mes + touch $@ + + # Tell automake that the message files are built as part of the build process +diff --git a/src/lib/dhcpsrv/Makefile.am b/src/lib/dhcpsrv/Makefile.am +index db95dbd..6499b9f 100644 +--- a/src/lib/dhcpsrv/Makefile.am ++++ b/src/lib/dhcpsrv/Makefile.am +@@ -52,11 +52,11 @@ alloc_engine_messages.h alloc_engine_messages.cc dhcpsrv_messages.h \ + dhcpsrv_messages.cc hosts_messages.h hosts_messages.cc: s-messages + + s-messages: alloc_engine_messages.mes dhcpsrv_messages.mes hosts_messages.mes +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/dhcpsrv/alloc_engine_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/lib/dhcpsrv/alloc_engine_messages.mes + touch $@ +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/dhcpsrv/dhcpsrv_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/lib/dhcpsrv/dhcpsrv_messages.mes + touch $@ +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/dhcpsrv/hosts_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/lib/dhcpsrv/hosts_messages.mes + touch $@ + + # Tell Automake that the {alloc_engine,dhcpsrv,hosts}_messages.{cc,h} source files +diff --git a/src/lib/eval/Makefile.am b/src/lib/eval/Makefile.am +index e4968c1..f8464f8 100644 +--- a/src/lib/eval/Makefile.am ++++ b/src/lib/eval/Makefile.am +@@ -47,7 +47,7 @@ EXTRA_DIST += lexer.ll parser.yy + eval_messages.h eval_messages.cc: s-messages + + s-messages: eval_messages.mes +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/eval/eval_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/lib/eval/eval_messages.mes + touch $@ + + # Tell Automake that the eval_messages.{cc,h} source files are created in the +diff --git a/src/lib/hooks/Makefile.am b/src/lib/hooks/Makefile.am +index 624e227..3458da8 100644 +--- a/src/lib/hooks/Makefile.am ++++ b/src/lib/hooks/Makefile.am +@@ -8,7 +8,7 @@ AM_CXXFLAGS = $(KEA_CXXFLAGS) + hooks_messages.h hooks_messages.cc: s-messages + + s-messages: hooks_messages.mes +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/hooks/hooks_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/lib/hooks/hooks_messages.mes + touch $@ + + # Tell automake that the message files are built as part of the build process +diff --git a/src/lib/log/Makefile.am b/src/lib/log/Makefile.am +index e1185cd..22e9ce6 100644 +--- a/src/lib/log/Makefile.am ++++ b/src/lib/log/Makefile.am +@@ -1,4 +1,10 @@ +-SUBDIRS = interprocess . compiler tests ++SUBDIRS = interprocess . ++ ++if !HAVE_MSG_COMPILER ++SUBDIRS += compiler ++endif ++ ++SUBDIRS += tests + + AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) +diff --git a/src/lib/log/tests/Makefile.am b/src/lib/log/tests/Makefile.am +index 03806f9..caf9cab 100644 +--- a/src/lib/log/tests/Makefile.am ++++ b/src/lib/log/tests/Makefile.am +@@ -17,7 +17,7 @@ BUILT_SOURCES = log_test_messages.h log_test_messages.cc + log_test_messages.h log_test_messages.cc: s-messages + + s-messages: log_test_messages.mes +- $(AM_V_GEN) $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/log/tests/log_test_messages.mes ++ $(AM_V_GEN) @KEA_MSG_COMPILER@ $(top_srcdir)/src/lib/log/tests/log_test_messages.mes + touch $@ + + CLEANFILES += log_test_messages.h log_test_messages.cc s-messages +-- +1.8.4.2 +
meta-networking/recipes-connectivity/kea/files/0001-Makefile.am-fix-compile-error-about-kea-msg-compiler.patch new file +72 -0
72 lines not on this page · raw message
meta-networking/recipes-connectivity/kea/files/0001-Makefile.am-update-hooksdir-for-lease_cmds.patch new file +30 -0
@@ -0,0 +1,30 @@ +From 77ab10015512e9cc0c7a160bd6b534bf4174bc95 Mon Sep 17 00:00:00 2001 +From: Mingli Yu <[email protected]> +Date: Wed, 21 Mar 2018 06:01:38 +0000 +Subject: [PATCH] Makefile.am: update hooksdir for lease_cmds + +update hooksdir for lease_cmds + +Upstream-Status: Pending + +Signed-off-by: Mingli Yu <[email protected]> +--- + src/hooks/dhcp/lease_cmds/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/hooks/dhcp/lease_cmds/Makefile.am b/src/hooks/dhcp/lease_cmds/Makefile.am +index cfd6779..22cc4a9 100644 +--- a/src/hooks/dhcp/lease_cmds/Makefile.am ++++ b/src/hooks/dhcp/lease_cmds/Makefile.am +@@ -37,7 +37,7 @@ liblease_cmds_la_CXXFLAGS = $(AM_CXXFLAGS) + liblease_cmds_la_CPPFLAGS = $(AM_CPPFLAGS) + + # install the shared object into $(libdir)/hooks +-lib_hooksdir = $(libdir)/hooks ++lib_hooksdir = $(libdir)/kea/hooks + lib_hooks_LTLIBRARIES = libdhcp_lease_cmds.la + + libdhcp_lease_cmds_la_SOURCES = +-- +2.13.3 +
meta-networking/recipes-connectivity/kea/files/0001-asiolink-fix-build-with-boost-1.66.patch new file +103 -0
103 lines not on this page · raw message
meta-networking/recipes-connectivity/kea/files/kea-dhcp-ddns.service new file +13 -0
@@ -0,0 +1,13 @@ +[Unit] +Description=Kea DHCP-DDNS Server +Wants=network-online.target +After=network-online.target +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] +WantedBy=multi-user.target
meta-networking/recipes-connectivity/kea/files/kea-dhcp4.service new file +13 -0
@@ -0,0 +1,13 @@ +[Unit] +Description=Kea DHCPv4 Server +Wants=network-online.target +After=network-online.target +After=time-sync.target + +[Service] +ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/ +ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/kea +ExecStart=@SBINDIR@/kea-dhcp4 -c @SYSCONFDIR@/kea/kea-dhcp4.conf + +[Install] +WantedBy=multi-user.target
meta-networking/recipes-connectivity/kea/files/kea-dhcp6.service new file +13 -0
@@ -0,0 +1,13 @@ +[Unit] +Description=Kea DHCPv6 Server +Wants=network-online.target +After=network-online.target +After=time-sync.target + +[Service] +ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/ +ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/kea +ExecStart=@SBINDIR@/kea-dhcp6 -c @SYSCONFDIR@/kea/kea-dhcp6.conf + +[Install] +WantedBy=multi-user.target
meta-networking/recipes-connectivity/kea/kea_1.3.0.bb new file +52 -0
52 lines not on this page · raw message
Signature · 1 line
2.11.0