From 99f61d952467076abb68bf50f9220e422ed98e60 Mon Sep 17 00:00:00 2001 From: Sudip Mukherjee Date: Thu, 10 Aug 2023 10:17:21 +0100 Subject: kea: upgrade to v2.4.0 Changes: Update license checksum: change in copyright year. Update sha256sum for new version. An additinal patch to fix the reproducible build failure which is still under discussion with upstream. Signed-off-by: Sudip Mukherjee Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie --- .../0001-kea-fix-reproducible-build-failure.patch | 62 +++++++++++++++++ meta/recipes-connectivity/kea/kea_2.2.0.bb | 77 --------------------- meta/recipes-connectivity/kea/kea_2.4.0.bb | 78 ++++++++++++++++++++++ 3 files changed, 140 insertions(+), 77 deletions(-) create mode 100644 meta/recipes-connectivity/kea/files/0001-kea-fix-reproducible-build-failure.patch delete mode 100644 meta/recipes-connectivity/kea/kea_2.2.0.bb create mode 100644 meta/recipes-connectivity/kea/kea_2.4.0.bb (limited to 'meta/recipes-connectivity') diff --git a/meta/recipes-connectivity/kea/files/0001-kea-fix-reproducible-build-failure.patch b/meta/recipes-connectivity/kea/files/0001-kea-fix-reproducible-build-failure.patch new file mode 100644 index 0000000000..8a5bd00302 --- /dev/null +++ b/meta/recipes-connectivity/kea/files/0001-kea-fix-reproducible-build-failure.patch @@ -0,0 +1,62 @@ +From f9bcfed5a1d44d9211c5f6eba403a9898c8c9057 Mon Sep 17 00:00:00 2001 +From: Sudip Mukherjee +Date: Tue, 8 Aug 2023 19:03:13 +0100 +Subject: [PATCH] kea: fix reproducible build failure + +New version of Kea has started using path of build-dir instead of +src-dir which results in reproducible builds failure. +Use src-dir as is used in v2.2.0 + +Upstream-Status: Pending +https://gitlab.isc.org/isc-projects/kea/-/issues/3007 + +Upstream has confirmed the patch will not be accepted but discussions +with upstream is still going on, we might have a proper solution later. + +Signed-off-by: Sudip Mukherjee +--- + src/bin/admin/kea-admin.in | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/bin/admin/kea-admin.in b/src/bin/admin/kea-admin.in +index 034a0ee..8ab11ab 100644 +--- a/src/bin/admin/kea-admin.in ++++ b/src/bin/admin/kea-admin.in +@@ -51,14 +51,14 @@ dump_qry="" + if test -f "@datarootdir@/@PACKAGE_NAME@/scripts/admin-utils.sh"; then + . "@datarootdir@/@PACKAGE_NAME@/scripts/admin-utils.sh" + else +- . "@abs_top_builddir@/src/bin/admin/admin-utils.sh" ++ . "@abs_top_srcdir@/src/bin/admin/admin-utils.sh" + fi + + # Find the installed kea-lfc if available. Fallback to sources otherwise. + if test -x "@sbindir@/kea-lfc"; then + kea_lfc="@sbindir@/kea-lfc" + else +- kea_lfc="@abs_top_builddir@/src/bin/lfc/kea-lfc" ++ kea_lfc="@abs_top_srcdir@/src/bin/lfc/kea-lfc" + fi + + # Prints out usage version. +@@ -355,7 +355,7 @@ mysql_upgrade() { + # Check if there are any files in it + num_files=$(find "${upgrade_scripts_dir}" -name 'upgrade*.sh' -type f | wc -l) + if [ "$num_files" -eq 0 ]; then +- upgrade_scripts_dir=@abs_top_builddir@/src/share/database/scripts/mysql ++ upgrade_scripts_dir=@abs_top_srcdir@/src/share/database/scripts/mysql + + # Check if the scripts directory exists at all. + if [ ! -d ${upgrade_scripts_dir} ]; then +@@ -405,7 +405,7 @@ pgsql_upgrade() { + # Check if there are any files in it + num_files=$(find "${upgrade_scripts_dir}" -name 'upgrade*.sh' -type f | wc -l) + if [ "$num_files" -eq 0 ]; then +- upgrade_scripts_dir=@abs_top_builddir@/src/share/database/scripts/pgsql ++ upgrade_scripts_dir=@abs_top_srcdir@/src/share/database/scripts/pgsql + + # Check if the scripts directory exists at all. + if [ ! -d ${upgrade_scripts_dir} ]; then +-- +2.39.2 + diff --git a/meta/recipes-connectivity/kea/kea_2.2.0.bb b/meta/recipes-connectivity/kea/kea_2.2.0.bb deleted file mode 100644 index 2c2e5a74dd..0000000000 --- a/meta/recipes-connectivity/kea/kea_2.2.0.bb +++ /dev/null @@ -1,77 +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" -LIC_FILES_CHKSUM = "file://COPYING;md5=97ce14bdd2733f5b84ab5e29380d057d" - -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] = "da7d90ca62a772602dac6e77e507319038422895ad68eeb142f1487d67d531d2" - -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.4.0.bb b/meta/recipes-connectivity/kea/kea_2.4.0.bb new file mode 100644 index 0000000000..316468754e --- /dev/null +++ b/meta/recipes-connectivity/kea/kea_2.4.0.bb @@ -0,0 +1,78 @@ +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" +LIC_FILES_CHKSUM = "file://COPYING;md5=ea061fa0188838072c4248c1318ec131" + +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 \ + file://0001-kea-fix-reproducible-build-failure.patch \ + " +SRC_URI[sha256sum] = "3a33cd08dc3319ff544e6bbf2c0429042106f4051ebe115dc1bb2625c95003f7" + +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 1.2.3-korg