From 47ccb88d94852e327f3bdd45425f33e56983b50c Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 14 Apr 2024 08:20:27 -0700 Subject: freediameter: Upgrade to latest on master 1.5.0+ This also fixes all ptests, therefore move freediameter out of PTESTS_PROBLEMS_META_NETWORKING to PTESTS_FAST_META_NETWORKING Signed-off-by: Khem Raj --- .../include/ptest-packagelists-meta-networking.inc | 2 +- ...core-sctp.c-update-the-old-sctp-api-check.patch | 97 -------------- .../recipes-protocols/freediameter/files/run-ptest | 6 +- .../freediameter/freediameter_1.4.0.bb | 141 --------------------- .../freediameter/freediameter_1.5.0.bb | 141 +++++++++++++++++++++ 5 files changed, 147 insertions(+), 240 deletions(-) delete mode 100644 meta-networking/recipes-protocols/freediameter/files/0001-libfdcore-sctp.c-update-the-old-sctp-api-check.patch delete mode 100644 meta-networking/recipes-protocols/freediameter/freediameter_1.4.0.bb create mode 100644 meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb (limited to 'meta-networking') diff --git a/meta-networking/conf/include/ptest-packagelists-meta-networking.inc b/meta-networking/conf/include/ptest-packagelists-meta-networking.inc index 574e3a0aa1..7ec6f9063d 100644 --- a/meta-networking/conf/include/ptest-packagelists-meta-networking.inc +++ b/meta-networking/conf/include/ptest-packagelists-meta-networking.inc @@ -7,6 +7,7 @@ # ptests which take less than ~30s each PTESTS_FAST_META_NETWORKING = "\ + freediameter \ geoip \ libcoap \ libldb \ @@ -27,7 +28,6 @@ PTESTS_SLOW_META_NETWORKING = "\ " PTESTS_PROBLEMS_META_NETWORKING = "\ - freediameter \ geoip-perl \ libtevent \ lksctp-tools \ diff --git a/meta-networking/recipes-protocols/freediameter/files/0001-libfdcore-sctp.c-update-the-old-sctp-api-check.patch b/meta-networking/recipes-protocols/freediameter/files/0001-libfdcore-sctp.c-update-the-old-sctp-api-check.patch deleted file mode 100644 index d5e242ac21..0000000000 --- a/meta-networking/recipes-protocols/freediameter/files/0001-libfdcore-sctp.c-update-the-old-sctp-api-check.patch +++ /dev/null @@ -1,97 +0,0 @@ -From d527a0b7b63e43263384540b5525714484bb089f Mon Sep 17 00:00:00 2001 -From: Mingli Yu -Date: Mon, 3 Sep 2018 14:40:56 +0800 -Subject: [PATCH] libfdcore/sctp.c: update the old sctp api check - -The initial sctp api check for freediameter as below: - === - commit d3c5e991cb532ea09684d69fb4d0d58e9bc39a0c - Author: Sebastien Decugis - Date: Mon Jun 3 12:05:37 2013 +0800 - - Add some compliancy to RFC6458. Not tested however as Ubuntu does not support this yet - - [snip] - +/* Use old draft-ietf-tsvwg-sctpsocket-17 API ? If not defined, RFC6458 API will be used */ - +/* #define OLD_SCTP_SOCKET_API */ - + - +/* Automatically fallback to old API if some of the new symbols are not defined */ - +#if (!defined(SCTP_CONNECTX_4_ARGS) || (!defined(SCTP_RECVRCVINFO)) || (!defined(SCTP_SNDINFO))) - +# define OLD_SCTP_SOCKET_API - +#endif - === - -SCTP_RECVRCVINFO is defined in , -but is't included in the source code -previouly. So defined(SCTP_RECVRCVINFO) can be 0 -and it make old sctp socket api definiton in effect -as below: - # define OLD_SCTP_SOCKET_API - -After lksctp-tools upgrade to 1.0.18, there is below -commit introduced: -=== -commit 3c8bd0d26b64611c690f33f5802c734b0642c1d8 -Author: Marcelo Ricardo Leitner -Date: Tue Apr 17 20:17:14 2018 -0300 - - sctp.h: make use kernel UAPI header - - and with that, remove tons of duplicated declarations. These were - lagging behind the kernel header, which is always the most updated one, - and as the library is intended to be run only on Linux, there is no - reason that we cannot re-use what is in there. - - That said, this patch drops all duplicated declarations and includes - linux/sctp.h to bring them into lksctp-tools. - - Signed-off-by: Marcelo Ricardo Leitner - - [snip] - #include - #include - #include -+#include - [snip] -=== - -And above logic make defined(SCTP_RECVRCVINFO) to -be 1 and the old sctp socket api macro as below -won't be defined. - # define OLD_SCTP_SOCKET_API - -And it encouters below build error: -| /build/freediameter/1.2.1-r0/freeDiameter-1.2.1/libfdcore/sctp.c:1262:9: error: 'SCTP_SEND_FAILED_EVENT' undeclared (first use in this function); did you mean 'SCTP_SEND_FAILED'? - case SCTP_SEND_FAILED_EVENT: - ^~~~~~~~~~~~~~~~~~~~~~ - SCTP_SEND_FAILED -| /build/freediameter/1.2.1-r0/freeDiameter-1.2.1/libfdcore/sctp.c:1262:9: note: each undeclared identifier is reported only once for each function it appears in -| /build/freediameter/1.2.1-r0/freeDiameter-1.2.1/libfdcore/sctp.c:1274:9: error: 'SCTP_NOTIFICATIONS_STOPPED_EVENT' undeclared (first use in this function); did you mean 'SCTP_AUTHENTICATION_EVENT'? - case SCTP_NOTIFICATIONS_STOPPED_EVENT: - -Update the old sctp socket api check to fix -the above build error. - -Upstream-Status: Pending - -Signed-off-by: Mingli Yu ---- - libfdcore/sctp.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libfdcore/sctp.c b/libfdcore/sctp.c -index c80a497..83440c7 100644 ---- a/libfdcore/sctp.c -+++ b/libfdcore/sctp.c -@@ -48,7 +48,7 @@ - /* #define OLD_SCTP_SOCKET_API */ - - /* Automatically fallback to old API if some of the new symbols are not defined */ --#if (!defined(SCTP_CONNECTX_4_ARGS) || (!defined(SCTP_RECVRCVINFO)) || (!defined(SCTP_SNDINFO))) -+#if (!defined(SCTP_CONNECTX_4_ARGS) || (!defined(SCTP_NOTIFICATIONS_STOPPED_EVENT)) || (!defined(SCTP_SNDINFO))) - # define OLD_SCTP_SOCKET_API - #endif - --- -2.7.4 - diff --git a/meta-networking/recipes-protocols/freediameter/files/run-ptest b/meta-networking/recipes-protocols/freediameter/files/run-ptest index 3c841644b7..7d0648935c 100644 --- a/meta-networking/recipes-protocols/freediameter/files/run-ptest +++ b/meta-networking/recipes-protocols/freediameter/files/run-ptest @@ -7,4 +7,8 @@ if ! lsmod | grep -q sctp && ! modprobe sctp 2>/dev/null; then fi cmake -E cmake_echo_color --cyan "Running tests..." -ctest --force-new-ctest-process +if ctest --force-new-ctest-process ; then + echo "PASS: freediameter" +else + echo "FAIL: freediameter" +fi diff --git a/meta-networking/recipes-protocols/freediameter/freediameter_1.4.0.bb b/meta-networking/recipes-protocols/freediameter/freediameter_1.4.0.bb deleted file mode 100644 index 44fc46e3a8..0000000000 --- a/meta-networking/recipes-protocols/freediameter/freediameter_1.4.0.bb +++ /dev/null @@ -1,141 +0,0 @@ -SUMMARY = "An open source implementation of the diameter protocol" -DESCRIPTION = "\ -freeDiameter is an open source Diameter protocol implementation \ -(RFC3588). It provides an extensible platform for deploying a \ -Diameter network for your Authentication, Authorization and \ -Accounting needs." - -HOMEPAGE = "http://www.freediameter.net" - -DEPENDS = "flex bison cmake-native libgcrypt gnutls libidn lksctp-tools virtual/kernel bison-native" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -fd_pkgname = "freeDiameter" - -SRC_URI = "\ - http://www.freediameter.net/hg/${fd_pkgname}/archive/${PV}.tar.gz;downloadfilename=${fd_pkgname}-${PV}.tar.gz \ - file://Replace-murmurhash-algorithm-with-Robert-Jenkin-s-ha.patch \ - file://freediameter.service \ - file://freediameter.init \ - ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'file://install_test.patch file://run-ptest file://0001-tests-use-EXTENSIONS_DIR.patch', '', d)} \ - file://freeDiameter.conf \ - file://0001-libfdcore-sctp.c-update-the-old-sctp-api-check.patch \ - " - -SRC_URI[sha256sum] = "7a537401bd110c606594b7c6be71b993f0ccc73ae151ad68040979286ba4e50e" - -S = "${WORKDIR}/${fd_pkgname}-${PV}" - -LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=69bdc1d97648a2d35914563fcbbb361a" - -PTEST_PATH = "${libdir}/${fd_pkgname}/ptest" - -inherit cmake pkgconfig update-rc.d ptest systemd - -EXTRA_OECMAKE = " \ - -DDEFAULT_CONF_PATH:PATH=${sysconfdir}/${fd_pkgname} \ - -DBUILD_DBG_MONITOR:BOOL=ON \ - -DBUILD_TEST_APP:BOOL=ON \ - -DBUILD_TESTING:BOOL=ON \ - -DBUILD_APP_RADGW:BOOL=ON \ - -DBUILD_APP_REDIRECT:BOOL=ON \ - -DBUILD_TEST_ACCT:BOOL=ON \ - -DBUILD_TEST_NETEMUL:BOOL=ON \ - -DBUILD_TEST_RT_ANY:BOOL=ON \ - -DINSTALL_LIBRARY_SUFFIX:PATH=${baselib} \ - -DINSTALL_EXTENSIONS_SUFFIX:PATH=${baselib}/${fd_pkgname} \ - -DEXTENSIONS_DIR:PATH=${libdir}/${fd_pkgname} \ - -DINSTALL_TEST_SUFFIX:PATH=${PTEST_PATH}-tests \ - -DCMAKE_SKIP_RPATH:BOOL=ON \ -" -# INSTALL_LIBRARY_SUFFIX is relative to CMAKE_INSTALL_PREFIX -# specify it on cmd line will fix the SET bug in CMakeList.txt - -# -DBUILD_APP_ACCT:BOOL=ON This needs POSTGRESQL support - -# -DBUILD_APP_DIAMEAP:BOOL=ON -DBUILD_APP_SIP:BOOL=ON -DBUILD_TEST_SIP:BOOL=ON -# These need MySQL support - -# -DBUILD_DBG_INTERACTIVE:BOOL=ON This needs SWIG support - -# -DALL_EXTENSIONS=ON will enable all - -FD_KEY ?="${BPN}.key" -FD_PEM ?= "${BPN}.pem" -FD_CA ?= "${BPN}.pem" -FD_DH_PEM ?= "${BPN}-dh.pem" -FD_HOSTNAME ?= "${MACHINE}" -FD_REALM ?= "openembedded.org" - -do_install:append() { - # install the sample configuration files - install -d -m 0755 ${D}${sysconfdir}/${fd_pkgname} - for i in ${S}/doc/*.conf.sample; do - install -m 0644 $i ${D}${sysconfdir}/${fd_pkgname}/ - done - mv ${D}${sysconfdir}/${fd_pkgname}/freediameter.conf.sample \ - ${D}${sysconfdir}/${fd_pkgname}/freeDiameter.conf.sample - install -d ${D}${sysconfdir}/freeDiameter - install ${WORKDIR}/freeDiameter.conf ${D}${sysconfdir}/${fd_pkgname}/freeDiameter.conf - - # install daemon init related files - install -d -m 0755 ${D}${sysconfdir}/default - install -d -m 0755 ${D}${sysconfdir}/init.d - install -m 0644 ${S}/contrib/debian/freediameter-daemon.default \ - ${D}${sysconfdir}/default/${BPN} - install -m 0755 ${WORKDIR}/freediameter.init ${D}${sysconfdir}/init.d/${BPN} - - # install for systemd - install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/freediameter.service ${D}${systemd_system_unitdir} - sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_system_unitdir}/*.service - - cat >> ${D}${sysconfdir}/freeDiameter/freeDiameter.conf <> ${D}${sysconfdir}/freeDiameter/freeDiameter.conf <