summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-04-14 08:20:27 -0700
committerKhem Raj <raj.khem@gmail.com>2024-04-15 21:01:12 -0700
commit47ccb88d94852e327f3bdd45425f33e56983b50c (patch)
tree313644ada95d8c1ccc5ab83de2d9f6e374de6ed0
parent6f31534c9f1f30ad12b7167f83131437b65e1edc (diff)
downloadmeta-openembedded-47ccb88d94852e327f3bdd45425f33e56983b50c.tar.gz
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 <raj.khem@gmail.com>
-rw-r--r--meta-networking/conf/include/ptest-packagelists-meta-networking.inc2
-rw-r--r--meta-networking/recipes-protocols/freediameter/files/0001-libfdcore-sctp.c-update-the-old-sctp-api-check.patch97
-rw-r--r--meta-networking/recipes-protocols/freediameter/files/run-ptest6
-rw-r--r--meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb (renamed from meta-networking/recipes-protocols/freediameter/freediameter_1.4.0.bb)16
4 files changed, 14 insertions, 107 deletions
diff --git a/meta-networking/conf/include/ptest-packagelists-meta-networking.inc b/meta-networking/conf/include/ptest-packagelists-meta-networking.inc
index 574e3a0aa..7ec6f9063 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 @@
7# ptests which take less than ~30s each 7# ptests which take less than ~30s each
8 8
9PTESTS_FAST_META_NETWORKING = "\ 9PTESTS_FAST_META_NETWORKING = "\
10 freediameter \
10 geoip \ 11 geoip \
11 libcoap \ 12 libcoap \
12 libldb \ 13 libldb \
@@ -27,7 +28,6 @@ PTESTS_SLOW_META_NETWORKING = "\
27" 28"
28 29
29PTESTS_PROBLEMS_META_NETWORKING = "\ 30PTESTS_PROBLEMS_META_NETWORKING = "\
30 freediameter \
31 geoip-perl \ 31 geoip-perl \
32 libtevent \ 32 libtevent \
33 lksctp-tools \ 33 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 d5e242ac2..000000000
--- a/meta-networking/recipes-protocols/freediameter/files/0001-libfdcore-sctp.c-update-the-old-sctp-api-check.patch
+++ /dev/null
@@ -1,97 +0,0 @@
1From d527a0b7b63e43263384540b5525714484bb089f Mon Sep 17 00:00:00 2001
2From: Mingli Yu <Mingli.Yu@windriver.com>
3Date: Mon, 3 Sep 2018 14:40:56 +0800
4Subject: [PATCH] libfdcore/sctp.c: update the old sctp api check
5
6The initial sctp api check for freediameter as below:
7 ===
8 commit d3c5e991cb532ea09684d69fb4d0d58e9bc39a0c
9 Author: Sebastien Decugis <sdecugis@freediameter.net>
10 Date: Mon Jun 3 12:05:37 2013 +0800
11
12 Add some compliancy to RFC6458. Not tested however as Ubuntu does not support this yet
13
14 [snip]
15 +/* Use old draft-ietf-tsvwg-sctpsocket-17 API ? If not defined, RFC6458 API will be used */
16 +/* #define OLD_SCTP_SOCKET_API */
17 +
18 +/* Automatically fallback to old API if some of the new symbols are not defined */
19 +#if (!defined(SCTP_CONNECTX_4_ARGS) || (!defined(SCTP_RECVRCVINFO)) || (!defined(SCTP_SNDINFO)))
20 +# define OLD_SCTP_SOCKET_API
21 +#endif
22 ===
23
24SCTP_RECVRCVINFO is defined in <linux/sctp.h>,
25but <linux/sctp.h> is't included in the source code
26previouly. So defined(SCTP_RECVRCVINFO) can be 0
27and it make old sctp socket api definiton in effect
28as below:
29 # define OLD_SCTP_SOCKET_API
30
31After lksctp-tools upgrade to 1.0.18, there is below
32commit introduced:
33===
34commit 3c8bd0d26b64611c690f33f5802c734b0642c1d8
35Author: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
36Date: Tue Apr 17 20:17:14 2018 -0300
37
38 sctp.h: make use kernel UAPI header
39
40 and with that, remove tons of duplicated declarations. These were
41 lagging behind the kernel header, which is always the most updated one,
42 and as the library is intended to be run only on Linux, there is no
43 reason that we cannot re-use what is in there.
44
45 That said, this patch drops all duplicated declarations and includes
46 linux/sctp.h to bring them into lksctp-tools.
47
48 Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
49
50 [snip]
51 #include <stdint.h>
52 #include <linux/types.h>
53 #include <sys/socket.h>
54+#include <linux/sctp.h>
55 [snip]
56===
57
58And above logic make defined(SCTP_RECVRCVINFO) to
59be 1 and the old sctp socket api macro as below
60won't be defined.
61 # define OLD_SCTP_SOCKET_API
62
63And it encouters below build error:
64| /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'?
65 case SCTP_SEND_FAILED_EVENT:
66 ^~~~~~~~~~~~~~~~~~~~~~
67 SCTP_SEND_FAILED
68| /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
69| /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'?
70 case SCTP_NOTIFICATIONS_STOPPED_EVENT:
71
72Update the old sctp socket api check to fix
73the above build error.
74
75Upstream-Status: Pending
76
77Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
78---
79 libfdcore/sctp.c | 2 +-
80 1 file changed, 1 insertion(+), 1 deletion(-)
81
82diff --git a/libfdcore/sctp.c b/libfdcore/sctp.c
83index c80a497..83440c7 100644
84--- a/libfdcore/sctp.c
85+++ b/libfdcore/sctp.c
86@@ -48,7 +48,7 @@
87 /* #define OLD_SCTP_SOCKET_API */
88
89 /* Automatically fallback to old API if some of the new symbols are not defined */
90-#if (!defined(SCTP_CONNECTX_4_ARGS) || (!defined(SCTP_RECVRCVINFO)) || (!defined(SCTP_SNDINFO)))
91+#if (!defined(SCTP_CONNECTX_4_ARGS) || (!defined(SCTP_NOTIFICATIONS_STOPPED_EVENT)) || (!defined(SCTP_SNDINFO)))
92 # define OLD_SCTP_SOCKET_API
93 #endif
94
95--
962.7.4
97
diff --git a/meta-networking/recipes-protocols/freediameter/files/run-ptest b/meta-networking/recipes-protocols/freediameter/files/run-ptest
index 3c841644b..7d0648935 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
7fi 7fi
8 8
9cmake -E cmake_echo_color --cyan "Running tests..." 9cmake -E cmake_echo_color --cyan "Running tests..."
10ctest --force-new-ctest-process 10if ctest --force-new-ctest-process ; then
11 echo "PASS: freediameter"
12else
13 echo "FAIL: freediameter"
14fi
diff --git a/meta-networking/recipes-protocols/freediameter/freediameter_1.4.0.bb b/meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb
index 44fc46e3a..36854c75b 100644
--- a/meta-networking/recipes-protocols/freediameter/freediameter_1.4.0.bb
+++ b/meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb
@@ -13,22 +13,22 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
13 13
14fd_pkgname = "freeDiameter" 14fd_pkgname = "freeDiameter"
15 15
16SRC_URI = "\ 16PV .= "+git"
17 http://www.freediameter.net/hg/${fd_pkgname}/archive/${PV}.tar.gz;downloadfilename=${fd_pkgname}-${PV}.tar.gz \ 17SRCREV = "f9f1e464e6c675d222b3be4cab9c13408d544c83"
18SRC_URI = "git://github.com/freeDiameter/freeDiameter;protocol=https;branch=master \
18 file://Replace-murmurhash-algorithm-with-Robert-Jenkin-s-ha.patch \ 19 file://Replace-murmurhash-algorithm-with-Robert-Jenkin-s-ha.patch \
20 file://run-ptest \
19 file://freediameter.service \ 21 file://freediameter.service \
20 file://freediameter.init \ 22 file://freediameter.init \
21 ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'file://install_test.patch file://run-ptest file://0001-tests-use-EXTENSIONS_DIR.patch', '', d)} \
22 file://freeDiameter.conf \ 23 file://freeDiameter.conf \
23 file://0001-libfdcore-sctp.c-update-the-old-sctp-api-check.patch \ 24 file://install_test.patch \
25 file://0001-tests-use-EXTENSIONS_DIR.patch \
24 " 26 "
25 27
26SRC_URI[sha256sum] = "7a537401bd110c606594b7c6be71b993f0ccc73ae151ad68040979286ba4e50e" 28S = "${WORKDIR}/git"
27
28S = "${WORKDIR}/${fd_pkgname}-${PV}"
29 29
30LICENSE = "BSD-3-Clause" 30LICENSE = "BSD-3-Clause"
31LIC_FILES_CHKSUM = "file://LICENSE;md5=69bdc1d97648a2d35914563fcbbb361a" 31LIC_FILES_CHKSUM = "file://LICENSE;md5=868c059b6147748b1d621e500feeac4f"
32 32
33PTEST_PATH = "${libdir}/${fd_pkgname}/ptest" 33PTEST_PATH = "${libdir}/${fd_pkgname}/ptest"
34 34