summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-protocols/freediameter
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-protocols/freediameter')
-rw-r--r--meta-networking/recipes-protocols/freediameter/files/0001-bison-flex-Add-flags-for-carrying-user-specified-par.patch39
-rw-r--r--meta-networking/recipes-protocols/freediameter/files/0001-fixes-for-gcc-15.patch69
-rw-r--r--meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb13
3 files changed, 115 insertions, 6 deletions
diff --git a/meta-networking/recipes-protocols/freediameter/files/0001-bison-flex-Add-flags-for-carrying-user-specified-par.patch b/meta-networking/recipes-protocols/freediameter/files/0001-bison-flex-Add-flags-for-carrying-user-specified-par.patch
new file mode 100644
index 0000000000..98ba4d5283
--- /dev/null
+++ b/meta-networking/recipes-protocols/freediameter/files/0001-bison-flex-Add-flags-for-carrying-user-specified-par.patch
@@ -0,0 +1,39 @@
1From fa6227d92725af5ae17b8435c0d50d92ff7a575c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 14 Aug 2024 19:32:25 -0700
4Subject: [PATCH] bison/flex: Add flags for carrying user specified parameters
5
6This helps in passing cmdline to flex and bison e.g. to remove lines
7from generated output to avoid absolute paths
8
9Upstream-Status: Pending
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 cmake/Modules/CMakeUserUseBison.cmake | 1 +
13 cmake/Modules/CMakeUserUseFlex.cmake | 1 +
14 2 files changed, 2 insertions(+)
15
16diff --git a/cmake/Modules/CMakeUserUseBison.cmake b/cmake/Modules/CMakeUserUseBison.cmake
17index 9257545..b61bd0e 100644
18--- a/cmake/Modules/CMakeUserUseBison.cmake
19+++ b/cmake/Modules/CMakeUserUseBison.cmake
20@@ -52,6 +52,7 @@ IF(BISON_EXECUTABLE)
21 OUTPUT "${OUTFILE}" "${HEADER}"
22 COMMAND "${BISON_EXECUTABLE}"
23 ARGS "--name-prefix=${PREFIX}"
24+ "${BISON_TARGET_ARG_COMPILE_FLAGS}"
25 "--defines"
26 "--output-file=${OUTFILE}"
27 "${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}"
28diff --git a/cmake/Modules/CMakeUserUseFlex.cmake b/cmake/Modules/CMakeUserUseFlex.cmake
29index 7d0394f..1221dca 100644
30--- a/cmake/Modules/CMakeUserUseFlex.cmake
31+++ b/cmake/Modules/CMakeUserUseFlex.cmake
32@@ -39,6 +39,7 @@ IF(FLEX_EXECUTABLE)
33 OUTPUT "${OUTFILE}"
34 COMMAND "${FLEX_EXECUTABLE}"
35 ARGS "-P${PREFIX}"
36+ "${FLEX_TARGET_ARG_COMPILE_FLAGS}"
37 "-o${OUTFILE}"
38 "${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}"
39 DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}")
diff --git a/meta-networking/recipes-protocols/freediameter/files/0001-fixes-for-gcc-15.patch b/meta-networking/recipes-protocols/freediameter/files/0001-fixes-for-gcc-15.patch
new file mode 100644
index 0000000000..41aeec4ee0
--- /dev/null
+++ b/meta-networking/recipes-protocols/freediameter/files/0001-fixes-for-gcc-15.patch
@@ -0,0 +1,69 @@
1From a54f10082f819dadfa6931166e71edffadb565dd Mon Sep 17 00:00:00 2001
2From: Victor Seva <vseva@debian.org>
3Date: Sun, 23 Feb 2025 13:38:48 +0100
4Subject: [PATCH] fixes for gcc-15
5
6fixes #72
7
8Upstream-Status: Backport [https://github.com/freeDiameter/freeDiameter/commit/a54f10082f819dadfa6931166e71edffadb565dd]
9Signed-off-by: mark.yang <mark.yang@lge.com>
10---
11 libfdcore/sctp.c | 22 +++++++++++-----------
12 1 file changed, 11 insertions(+), 11 deletions(-)
13
14diff --git a/libfdcore/sctp.c b/libfdcore/sctp.c
15index 95e822e..a4a7f40 100644
16--- a/libfdcore/sctp.c
17+++ b/libfdcore/sctp.c
18@@ -532,29 +532,29 @@ static int fd_setsockopt_prebind(int sk)
19 /* SCTP_EXPLICIT_EOR: we assume implicit EOR in freeDiameter, so let's ensure this is known by the stack */
20 #ifdef SCTP_EXPLICIT_EOR
21 {
22- int bool;
23+ int _bool;
24
25 if (TRACE_BOOL(ANNOYING)) {
26 sz = sizeof(bool);
27 /* Read socket defaults */
28- CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_EXPLICIT_EOR, &bool, &sz) );
29- if (sz != sizeof(bool))
30+ CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_EXPLICIT_EOR, &_bool, &sz) );
31+ if (sz != sizeof(_bool))
32 {
33- TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(bool));
34+ TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(_bool));
35 return ENOTSUP;
36 }
37- fd_log_debug( "Def SCTP_EXPLICIT_EOR value : %s", bool ? "true" : "false");
38+ fd_log_debug( "Def SCTP_EXPLICIT_EOR value : %s", _bool ? "true" : "false");
39 }
40
41- bool = 0;
42+ _bool = 0;
43
44 /* Set the option to the socket */
45- CHECK_SYS( setsockopt(sk, IPPROTO_SCTP, SCTP_EXPLICIT_EOR, &bool, sizeof(bool)) );
46+ CHECK_SYS( setsockopt(sk, IPPROTO_SCTP, SCTP_EXPLICIT_EOR, &_bool, sizeof(_bool)) );
47
48 if (TRACE_BOOL(ANNOYING)) {
49 /* Check new values */
50- CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_EXPLICIT_EOR, &bool, &sz) );
51- fd_log_debug( "New SCTP_EXPLICIT_EOR value : %s", bool ? "true" : "false");
52+ CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_EXPLICIT_EOR, &_bool, &sz) );
53+ fd_log_debug( "New SCTP_EXPLICIT_EOR value : %s", _bool ? "true" : "false");
54 }
55 }
56 #else /* SCTP_EXPLICIT_EOR */
57@@ -619,10 +619,10 @@ static int fd_setsockopt_prebind(int sk)
58
59 #ifdef SCTP_RECVRCVINFO /* Replaces SCTP_SNDRCV */
60 {
61- int bool = 1;
62+ int _bool = 1;
63
64 /* Set the option to the socket */
65- CHECK_SYS( setsockopt(sk, IPPROTO_SCTP, SCTP_RECVRCVINFO, &bool, sizeof(bool)) );
66+ CHECK_SYS( setsockopt(sk, IPPROTO_SCTP, SCTP_RECVRCVINFO, &_bool, sizeof(_bool)) );
67
68 }
69 #else /* SCTP_RECVRCVINFO */
diff --git a/meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb b/meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb
index c7c329a5d4..89b2572c04 100644
--- a/meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb
+++ b/meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb
@@ -7,7 +7,7 @@ Accounting needs."
7 7
8HOMEPAGE = "http://www.freediameter.net" 8HOMEPAGE = "http://www.freediameter.net"
9 9
10DEPENDS = "flex bison cmake-native libgcrypt gnutls libidn2 lksctp-tools virtual/kernel bison-native" 10DEPENDS = "flex-native bison-native cmake-native libgcrypt gnutls libidn2 lksctp-tools virtual/kernel bison-native"
11 11
12PACKAGE_ARCH = "${MACHINE_ARCH}" 12PACKAGE_ARCH = "${MACHINE_ARCH}"
13 13
@@ -23,9 +23,10 @@ SRC_URI = "git://github.com/freeDiameter/freeDiameter;protocol=https;branch=mast
23 file://freeDiameter.conf \ 23 file://freeDiameter.conf \
24 file://install_test.patch \ 24 file://install_test.patch \
25 file://0001-tests-use-EXTENSIONS_DIR.patch \ 25 file://0001-tests-use-EXTENSIONS_DIR.patch \
26 file://0001-bison-flex-Add-flags-for-carrying-user-specified-par.patch \
27 file://0001-fixes-for-gcc-15.patch \
26 " 28 "
27 29
28S = "${WORKDIR}/git"
29 30
30LICENSE = "BSD-3-Clause" 31LICENSE = "BSD-3-Clause"
31LIC_FILES_CHKSUM = "file://LICENSE;md5=868c059b6147748b1d621e500feeac4f" 32LIC_FILES_CHKSUM = "file://LICENSE;md5=868c059b6147748b1d621e500feeac4f"
@@ -49,6 +50,8 @@ EXTRA_OECMAKE = " \
49 -DEXTENSIONS_DIR:PATH=${libdir}/${fd_pkgname} \ 50 -DEXTENSIONS_DIR:PATH=${libdir}/${fd_pkgname} \
50 -DINSTALL_TEST_SUFFIX:PATH=${PTEST_PATH}-tests \ 51 -DINSTALL_TEST_SUFFIX:PATH=${PTEST_PATH}-tests \
51 -DCMAKE_SKIP_RPATH:BOOL=ON \ 52 -DCMAKE_SKIP_RPATH:BOOL=ON \
53 -DFLEX_TARGET_ARG_COMPILE_FLAGS='--noline' \
54 -DBISON_TARGET_ARG_COMPILE_FLAGS='--no-lines' \
52" 55"
53# INSTALL_LIBRARY_SUFFIX is relative to CMAKE_INSTALL_PREFIX 56# INSTALL_LIBRARY_SUFFIX is relative to CMAKE_INSTALL_PREFIX
54# specify it on cmd line will fix the SET bug in CMakeList.txt 57# specify it on cmd line will fix the SET bug in CMakeList.txt
@@ -62,7 +65,7 @@ EXTRA_OECMAKE = " \
62 65
63# -DALL_EXTENSIONS=ON will enable all 66# -DALL_EXTENSIONS=ON will enable all
64 67
65FD_KEY ?="${BPN}.key" 68FD_KEY ?= "${BPN}.key"
66FD_PEM ?= "${BPN}.pem" 69FD_PEM ?= "${BPN}.pem"
67FD_CA ?= "${BPN}.pem" 70FD_CA ?= "${BPN}.pem"
68FD_DH_PEM ?= "${BPN}-dh.pem" 71FD_DH_PEM ?= "${BPN}-dh.pem"
@@ -107,15 +110,13 @@ EOF
107 # create self cert 110 # create self cert
108 openssl req -x509 -config ${STAGING_DIR_NATIVE}/etc/ssl/openssl.cnf -newkey rsa:4096 -sha256 -nodes -out ${D}${sysconfdir}/freeDiameter/${FD_PEM} -keyout ${D}${sysconfdir}/freeDiameter/${FD_KEY} -days 3650 -subj '/CN=${FD_HOSTNAME}.${FD_REALM}' 111 openssl req -x509 -config ${STAGING_DIR_NATIVE}/etc/ssl/openssl.cnf -newkey rsa:4096 -sha256 -nodes -out ${D}${sysconfdir}/freeDiameter/${FD_PEM} -keyout ${D}${sysconfdir}/freeDiameter/${FD_KEY} -days 3650 -subj '/CN=${FD_HOSTNAME}.${FD_REALM}'
109 openssl dhparam -out ${D}${sysconfdir}/freeDiameter/${FD_DH_PEM} 1024 112 openssl dhparam -out ${D}${sysconfdir}/freeDiameter/${FD_DH_PEM} 1024
110
111 find ${B} \( -name "*.c" -o -name "*.h" \) -exec sed -i -e 's#${UNPACKDIR}##g' {} \;
112} 113}
113 114
114do_install_ptest() { 115do_install_ptest() {
115 mv ${D}${PTEST_PATH}-tests/* ${D}${PTEST_PATH}/ 116 mv ${D}${PTEST_PATH}-tests/* ${D}${PTEST_PATH}/
116 rmdir ${D}${PTEST_PATH}-tests 117 rmdir ${D}${PTEST_PATH}-tests
117 install -m 0644 ${B}/tests/CTestTestfile.cmake ${D}${PTEST_PATH}/ 118 install -m 0644 ${B}/tests/CTestTestfile.cmake ${D}${PTEST_PATH}/
118 sed -i -e 's#${UNPACKDIR}##g' ${D}${PTEST_PATH}/CTestTestfile.cmake 119 sed -i -e 's#${WORKDIR}##g' ${D}${PTEST_PATH}/CTestTestfile.cmake
119 sed -i "/^set_tests_properties/d" ${D}${PTEST_PATH}/CTestTestfile.cmake 120 sed -i "/^set_tests_properties/d" ${D}${PTEST_PATH}/CTestTestfile.cmake
120} 121}
121 122