diff options
author | Khem Raj <raj.khem@gmail.com> | 2024-04-14 08:20:27 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-04-15 21:01:12 -0700 |
commit | 47ccb88d94852e327f3bdd45425f33e56983b50c (patch) | |
tree | 313644ada95d8c1ccc5ab83de2d9f6e374de6ed0 /meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb | |
parent | 6f31534c9f1f30ad12b7167f83131437b65e1edc (diff) | |
download | meta-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>
Diffstat (limited to 'meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb')
-rw-r--r-- | meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb | 141 |
1 files changed, 141 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb b/meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb new file mode 100644 index 000000000..36854c75b --- /dev/null +++ b/meta-networking/recipes-protocols/freediameter/freediameter_1.5.0.bb | |||
@@ -0,0 +1,141 @@ | |||
1 | SUMMARY = "An open source implementation of the diameter protocol" | ||
2 | DESCRIPTION = "\ | ||
3 | freeDiameter is an open source Diameter protocol implementation \ | ||
4 | (RFC3588). It provides an extensible platform for deploying a \ | ||
5 | Diameter network for your Authentication, Authorization and \ | ||
6 | Accounting needs." | ||
7 | |||
8 | HOMEPAGE = "http://www.freediameter.net" | ||
9 | |||
10 | DEPENDS = "flex bison cmake-native libgcrypt gnutls libidn lksctp-tools virtual/kernel bison-native" | ||
11 | |||
12 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
13 | |||
14 | fd_pkgname = "freeDiameter" | ||
15 | |||
16 | PV .= "+git" | ||
17 | SRCREV = "f9f1e464e6c675d222b3be4cab9c13408d544c83" | ||
18 | SRC_URI = "git://github.com/freeDiameter/freeDiameter;protocol=https;branch=master \ | ||
19 | file://Replace-murmurhash-algorithm-with-Robert-Jenkin-s-ha.patch \ | ||
20 | file://run-ptest \ | ||
21 | file://freediameter.service \ | ||
22 | file://freediameter.init \ | ||
23 | file://freeDiameter.conf \ | ||
24 | file://install_test.patch \ | ||
25 | file://0001-tests-use-EXTENSIONS_DIR.patch \ | ||
26 | " | ||
27 | |||
28 | S = "${WORKDIR}/git" | ||
29 | |||
30 | LICENSE = "BSD-3-Clause" | ||
31 | LIC_FILES_CHKSUM = "file://LICENSE;md5=868c059b6147748b1d621e500feeac4f" | ||
32 | |||
33 | PTEST_PATH = "${libdir}/${fd_pkgname}/ptest" | ||
34 | |||
35 | inherit cmake pkgconfig update-rc.d ptest systemd | ||
36 | |||
37 | EXTRA_OECMAKE = " \ | ||
38 | -DDEFAULT_CONF_PATH:PATH=${sysconfdir}/${fd_pkgname} \ | ||
39 | -DBUILD_DBG_MONITOR:BOOL=ON \ | ||
40 | -DBUILD_TEST_APP:BOOL=ON \ | ||
41 | -DBUILD_TESTING:BOOL=ON \ | ||
42 | -DBUILD_APP_RADGW:BOOL=ON \ | ||
43 | -DBUILD_APP_REDIRECT:BOOL=ON \ | ||
44 | -DBUILD_TEST_ACCT:BOOL=ON \ | ||
45 | -DBUILD_TEST_NETEMUL:BOOL=ON \ | ||
46 | -DBUILD_TEST_RT_ANY:BOOL=ON \ | ||
47 | -DINSTALL_LIBRARY_SUFFIX:PATH=${baselib} \ | ||
48 | -DINSTALL_EXTENSIONS_SUFFIX:PATH=${baselib}/${fd_pkgname} \ | ||
49 | -DEXTENSIONS_DIR:PATH=${libdir}/${fd_pkgname} \ | ||
50 | -DINSTALL_TEST_SUFFIX:PATH=${PTEST_PATH}-tests \ | ||
51 | -DCMAKE_SKIP_RPATH:BOOL=ON \ | ||
52 | " | ||
53 | # INSTALL_LIBRARY_SUFFIX is relative to CMAKE_INSTALL_PREFIX | ||
54 | # specify it on cmd line will fix the SET bug in CMakeList.txt | ||
55 | |||
56 | # -DBUILD_APP_ACCT:BOOL=ON This needs POSTGRESQL support | ||
57 | |||
58 | # -DBUILD_APP_DIAMEAP:BOOL=ON -DBUILD_APP_SIP:BOOL=ON -DBUILD_TEST_SIP:BOOL=ON | ||
59 | # These need MySQL support | ||
60 | |||
61 | # -DBUILD_DBG_INTERACTIVE:BOOL=ON This needs SWIG support | ||
62 | |||
63 | # -DALL_EXTENSIONS=ON will enable all | ||
64 | |||
65 | FD_KEY ?="${BPN}.key" | ||
66 | FD_PEM ?= "${BPN}.pem" | ||
67 | FD_CA ?= "${BPN}.pem" | ||
68 | FD_DH_PEM ?= "${BPN}-dh.pem" | ||
69 | FD_HOSTNAME ?= "${MACHINE}" | ||
70 | FD_REALM ?= "openembedded.org" | ||
71 | |||
72 | do_install:append() { | ||
73 | # install the sample configuration files | ||
74 | install -d -m 0755 ${D}${sysconfdir}/${fd_pkgname} | ||
75 | for i in ${S}/doc/*.conf.sample; do | ||
76 | install -m 0644 $i ${D}${sysconfdir}/${fd_pkgname}/ | ||
77 | done | ||
78 | mv ${D}${sysconfdir}/${fd_pkgname}/freediameter.conf.sample \ | ||
79 | ${D}${sysconfdir}/${fd_pkgname}/freeDiameter.conf.sample | ||
80 | install -d ${D}${sysconfdir}/freeDiameter | ||
81 | install ${WORKDIR}/freeDiameter.conf ${D}${sysconfdir}/${fd_pkgname}/freeDiameter.conf | ||
82 | |||
83 | # install daemon init related files | ||
84 | install -d -m 0755 ${D}${sysconfdir}/default | ||
85 | install -d -m 0755 ${D}${sysconfdir}/init.d | ||
86 | install -m 0644 ${S}/contrib/debian/freediameter-daemon.default \ | ||
87 | ${D}${sysconfdir}/default/${BPN} | ||
88 | install -m 0755 ${WORKDIR}/freediameter.init ${D}${sysconfdir}/init.d/${BPN} | ||
89 | |||
90 | # install for systemd | ||
91 | install -d ${D}${systemd_system_unitdir} | ||
92 | install -m 0644 ${WORKDIR}/freediameter.service ${D}${systemd_system_unitdir} | ||
93 | sed -i -e 's,@BINDIR@,${bindir},g' ${D}${systemd_system_unitdir}/*.service | ||
94 | |||
95 | cat >> ${D}${sysconfdir}/freeDiameter/freeDiameter.conf <<EOF | ||
96 | ## OE specific ## | ||
97 | #Identity="${FD_HOSTNAME}"; | ||
98 | Identity = "${FD_HOSTNAME}.${FD_REALM}"; | ||
99 | Realm = "${FD_REALM}"; | ||
100 | Port = 30868; | ||
101 | SecPort = 30869; | ||
102 | TLS_Cred = "/etc/freeDiameter/${FD_PEM}" , "/etc/freeDiameter/${FD_KEY}"; | ||
103 | TLS_CA = "/etc/freeDiameter/${FD_CA}"; | ||
104 | TLS_DH_File = "/etc/freeDiameter/${FD_DH_PEM}"; | ||
105 | EOF | ||
106 | |||
107 | # 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}' | ||
109 | openssl dhparam -out ${D}${sysconfdir}/freeDiameter/${FD_DH_PEM} 1024 | ||
110 | |||
111 | find ${B} \( -name "*.c" -o -name "*.h" \) -exec sed -i -e 's#${WORKDIR}##g' {} \; | ||
112 | } | ||
113 | |||
114 | do_install_ptest() { | ||
115 | mv ${D}${PTEST_PATH}-tests/* ${D}${PTEST_PATH}/ | ||
116 | rmdir ${D}${PTEST_PATH}-tests | ||
117 | install -m 0644 ${B}/tests/CTestTestfile.cmake ${D}${PTEST_PATH}/ | ||
118 | sed -i -e 's#${WORKDIR}##g' ${D}${PTEST_PATH}/CTestTestfile.cmake | ||
119 | sed -i "/^set_tests_properties/d" ${D}${PTEST_PATH}/CTestTestfile.cmake | ||
120 | } | ||
121 | |||
122 | FILES:${PN}-dbg += "${libdir}/${fd_pkgname}/.debug/*" | ||
123 | |||
124 | # include the extensions in main package | ||
125 | FILES:${PN} += "${libdir}/${fd_pkgname}/*" | ||
126 | |||
127 | RDEPENDS:${PN} = "glib-2.0 gnutls libidn" | ||
128 | RDEPENDS:${PN} += "openssl openssl-conf openssl-engines" | ||
129 | RRECOMMENDS:${PN} += "kernel-module-tipc kernel-module-sctp" | ||
130 | RRECOMMENDS:${PN} += "kernel-module-udp-tunnel kernel-module-ipip" | ||
131 | RDEPENDS:${PN}-ptest = "cmake" | ||
132 | |||
133 | INITSCRIPT_PACKAGES = "${PN}" | ||
134 | INITSCRIPT_NAME:${PN} = "${BPN}" | ||
135 | INITSCRIPT_PARAMS:${PN} = "start 30 . stop 70 0 1 2 3 4 5 6 ." | ||
136 | |||
137 | SYSTEMD_SERVICE:${PN} = "freediameter.service" | ||
138 | SYSTEMD_AUTO_ENABLE = "disable" | ||
139 | |||
140 | CONFFILES:${PN} = "${sysconfdir}/freediameter.conf" | ||
141 | |||