diff options
| -rw-r--r-- | meta-networking/conf/include/ptest-packagelists-meta-networking.inc | 2 | ||||
| -rw-r--r-- | meta-networking/recipes-protocols/freediameter/files/0001-libfdcore-sctp.c-update-the-old-sctp-api-check.patch | 97 | ||||
| -rw-r--r-- | meta-networking/recipes-protocols/freediameter/files/run-ptest | 6 | ||||
| -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 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 @@ | |||
| 7 | # ptests which take less than ~30s each | 7 | # ptests which take less than ~30s each |
| 8 | 8 | ||
| 9 | PTESTS_FAST_META_NETWORKING = "\ | 9 | PTESTS_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 | ||
| 29 | PTESTS_PROBLEMS_META_NETWORKING = "\ | 30 | PTESTS_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 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 @@ | |||
| 1 | From d527a0b7b63e43263384540b5525714484bb089f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Mingli Yu <Mingli.Yu@windriver.com> | ||
| 3 | Date: Mon, 3 Sep 2018 14:40:56 +0800 | ||
| 4 | Subject: [PATCH] libfdcore/sctp.c: update the old sctp api check | ||
| 5 | |||
| 6 | The 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 | |||
| 24 | SCTP_RECVRCVINFO is defined in <linux/sctp.h>, | ||
| 25 | but <linux/sctp.h> is't included in the source code | ||
| 26 | previouly. So defined(SCTP_RECVRCVINFO) can be 0 | ||
| 27 | and it make old sctp socket api definiton in effect | ||
| 28 | as below: | ||
| 29 | # define OLD_SCTP_SOCKET_API | ||
| 30 | |||
| 31 | After lksctp-tools upgrade to 1.0.18, there is below | ||
| 32 | commit introduced: | ||
| 33 | === | ||
| 34 | commit 3c8bd0d26b64611c690f33f5802c734b0642c1d8 | ||
| 35 | Author: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> | ||
| 36 | Date: 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 | |||
| 58 | And above logic make defined(SCTP_RECVRCVINFO) to | ||
| 59 | be 1 and the old sctp socket api macro as below | ||
| 60 | won't be defined. | ||
| 61 | # define OLD_SCTP_SOCKET_API | ||
| 62 | |||
| 63 | And 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 | |||
| 72 | Update the old sctp socket api check to fix | ||
| 73 | the above build error. | ||
| 74 | |||
| 75 | Upstream-Status: Pending | ||
| 76 | |||
| 77 | Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> | ||
| 78 | --- | ||
| 79 | libfdcore/sctp.c | 2 +- | ||
| 80 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 81 | |||
| 82 | diff --git a/libfdcore/sctp.c b/libfdcore/sctp.c | ||
| 83 | index 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 | -- | ||
| 96 | 2.7.4 | ||
| 97 | |||
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 | |||
| 7 | fi | 7 | fi |
| 8 | 8 | ||
| 9 | cmake -E cmake_echo_color --cyan "Running tests..." | 9 | cmake -E cmake_echo_color --cyan "Running tests..." |
| 10 | ctest --force-new-ctest-process | 10 | if ctest --force-new-ctest-process ; then |
| 11 | echo "PASS: freediameter" | ||
| 12 | else | ||
| 13 | echo "FAIL: freediameter" | ||
| 14 | fi | ||
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 44fc46e3a8..36854c75bc 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 | ||
| 14 | fd_pkgname = "freeDiameter" | 14 | fd_pkgname = "freeDiameter" |
| 15 | 15 | ||
| 16 | SRC_URI = "\ | 16 | PV .= "+git" |
| 17 | http://www.freediameter.net/hg/${fd_pkgname}/archive/${PV}.tar.gz;downloadfilename=${fd_pkgname}-${PV}.tar.gz \ | 17 | SRCREV = "f9f1e464e6c675d222b3be4cab9c13408d544c83" |
| 18 | SRC_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 | ||
| 26 | SRC_URI[sha256sum] = "7a537401bd110c606594b7c6be71b993f0ccc73ae151ad68040979286ba4e50e" | 28 | S = "${WORKDIR}/git" |
| 27 | |||
| 28 | S = "${WORKDIR}/${fd_pkgname}-${PV}" | ||
| 29 | 29 | ||
| 30 | LICENSE = "BSD-3-Clause" | 30 | LICENSE = "BSD-3-Clause" |
| 31 | LIC_FILES_CHKSUM = "file://LICENSE;md5=69bdc1d97648a2d35914563fcbbb361a" | 31 | LIC_FILES_CHKSUM = "file://LICENSE;md5=868c059b6147748b1d621e500feeac4f" |
| 32 | 32 | ||
| 33 | PTEST_PATH = "${libdir}/${fd_pkgname}/ptest" | 33 | PTEST_PATH = "${libdir}/${fd_pkgname}/ptest" |
| 34 | 34 | ||
