summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-connectivity/freeradius/freeradius_3.2.8.bb
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2025-10-29 23:31:12 +0800
committerKhem Raj <raj.khem@gmail.com>2025-10-29 21:02:20 -0700
commitb6876c517a5510efe71cc6bd71ff27bed2264b3e (patch)
tree1cdc55e2a493629a48b291a28da2d9068a701236 /meta-networking/recipes-connectivity/freeradius/freeradius_3.2.8.bb
parentaa430364a26e2f763644648675d45d62b678cccb (diff)
downloadmeta-openembedded-b6876c517a5510efe71cc6bd71ff27bed2264b3e.tar.gz
freeradius: upgrade 3.2.7 -> 3.2.8
ChangeLog: https://github.com/FreeRADIUS/freeradius-server/releases/tag/release_3_2_8 * Add PACKAGECONFIG[kafka] * Drop backport patch 0018-Fix-Service-start-error.patch * Refresh 0013-raddb-certs-Makefile-fix-the-occasional-verification.patch * Drop 0019-freeradius-Remove-files-which-have-license-issues.patch and backport upstream patches to fix license issue[1]. [1] https://github.com/FreeRADIUS/freeradius-server/issues/5664 Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-connectivity/freeradius/freeradius_3.2.8.bb')
-rw-r--r--meta-networking/recipes-connectivity/freeradius/freeradius_3.2.8.bb303
1 files changed, 303 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/freeradius/freeradius_3.2.8.bb b/meta-networking/recipes-connectivity/freeradius/freeradius_3.2.8.bb
new file mode 100644
index 0000000000..2de6ce5bae
--- /dev/null
+++ b/meta-networking/recipes-connectivity/freeradius/freeradius_3.2.8.bb
@@ -0,0 +1,303 @@
1DESCRIPTION = "FreeRADIUS is an Internet authentication daemon, which implements the RADIUS \
2protocol, as defined in RFC 2865 (and others). It allows Network Access \
3Servers (NAS boxes) to perform authentication for dial-up users. There are \
4also RADIUS clients available for Web servers, firewalls, Unix logins, and \
5more. Using RADIUS allows authentication and authorization for a network to \
6be centralized, and minimizes the amount of re-configuration which has to be \
7done when adding or deleting new users."
8
9SUMMARY = "High-performance and highly configurable RADIUS server"
10HOMEPAGE = "http://www.freeradius.org/"
11SECTION = "System/Servers"
12LICENSE = "GPL-2.0-only & LGPL-2.0-or-later"
13LIC_FILES_CHKSUM = "file://LICENSE;md5=eb723b61539feef013de476e68b5c50a"
14DEPENDS = "openssl-native openssl libidn libtool libpcap libtalloc"
15
16PATCHTOOL = "git"
17
18SRC_URI = "git://github.com/FreeRADIUS/freeradius-server.git;branch=v3.2.x;lfs=0;;protocol=https \
19 file://freeradius \
20 file://volatiles.58_radiusd \
21 file://radiusd.service \
22 file://radiusd-volatiles.conf \
23 file://0001-Add-autogen.sh.patch \
24 file://0002-Enable-and-change-user-and-group-of-freeradius-serve.patch \
25 file://0003-configure.ac-allow-cross-compilation.patch \
26 file://0004-Fix-libtool-detection.patch \
27 file://0005-configure.ac-add-option-for-libcap.patch \
28 file://0006-Avoid-searching-host-dirs.patch \
29 file://0007-rlm_python-add-PY_INC_DIR-in-search-dir.patch \
30 file://0008-libtool-do-not-use-jlibtool.patch \
31 file://0009-Fix-quoting-for-BUILD_WITH.patch \
32 file://0010-fix-error-for-expansion-of-macro-in-thread.h.patch \
33 file://0011-rlm_mschap-Use-includedir-instead-of-hardcoding-usr-.patch \
34 file://0012-raddb-certs-Makefile-fix-the-existed-certificate-err.patch \
35 file://0013-raddb-certs-Makefile-fix-the-occasional-verification.patch \
36 file://0014-Workaround-error-with-autoconf-2.7.patch \
37 file://0015-bootstrap-check-commands-of-openssl-exist.patch \
38 file://0016-version.c-don-t-print-build-flags.patch \
39 file://0017-Add-acinclude.m4-to-include-required-macros.patch \
40 file://0018-update-license-1.patch \
41 file://0019-update-license-2.patch \
42 file://0020-update-license-3.patch \
43"
44
45raddbdir = "${sysconfdir}/${MLPREFIX}raddb"
46
47SRCREV = "032be31bb52646171099617928ec1703335bcf73"
48
49UPSTREAM_CHECK_GITTAGREGEX = "release_(?P<pver>\d+(\_\d+)+)"
50
51CVE_STATUS[CVE-2002-0318] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions."
52CVE_STATUS[CVE-2011-4966] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions."
53
54PARALLEL_MAKE = ""
55
56
57LDFLAGS:append:powerpc = " -latomic"
58LDFLAGS:append:mipsarch = " -latomic"
59LDFLAGS:append:armv5 = " -latomic"
60
61EXTRA_OECONF = " --enable-strict-dependencies \
62 --with-docdir=${docdir}/freeradius-${PV} \
63 --with-openssl-includes=${STAGING_INCDIR} \
64 --with-openssl-libraries=${STAGING_LIBDIR} \
65 --with-raddbdir=${raddbdir} \
66 --without-rlm_ippool \
67 --without-rlm_cache_memcached \
68 --without-rlm_counter \
69 --without-rlm_couchbase \
70 --without-rlm_dbm \
71 --without-rlm_eap_tnc \
72 --without-rlm_eap_ikev2 \
73 --without-rlm_opendirectory \
74 --without-rlm_redis \
75 --without-rlm_rediswho \
76 --without-rlm_cache_redis \
77 --without-rlm_sql_db2 \
78 --without-rlm_sql_firebird \
79 --without-rlm_sql_freetds \
80 --without-rlm_sql_iodbc \
81 --without-rlm_sql_oracle \
82 --without-rlm_sql_sybase \
83 --without-rlm_sql_mongo \
84 --without-rlm_sqlhpwippool \
85 --without-rlm_securid \
86 --without-rlm_unbound \
87 --without-rlm_python \
88 ac_cv_path_PERL=${bindir}/perl \
89 ax_cv_cc_builtin_choose_expr=no \
90 ax_cv_cc_builtin_types_compatible_p=no \
91 ax_cv_cc_builtin_bswap64=no \
92 ax_cv_cc_bounded_attribute=no \
93"
94
95PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
96 pcre libcap \
97 openssl rlm-eap-fast rlm-eap-pwd \
98"
99
100PACKAGECONFIG[krb5] = "--with-rlm_krb5,--without-rlm_krb5,krb5"
101PACKAGECONFIG[pam] = "--with-rlm_pam,--without-rlm_pam,libpam"
102PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap"
103PACKAGECONFIG[ldap] = "--with-rlm_ldap,--without-rlm_ldap,openldap"
104PACKAGECONFIG[mysql] = "--with-rlm_sql_mysql,--without-rlm_sql_mysql,mysql5"
105PACKAGECONFIG[sqlite] = "--with-rlm_sql_sqlite,--without-rlm_sql_sqlite,sqlite3"
106PACKAGECONFIG[unixodbc] = "--with-rlm_sql_unixodbc,--without-rlm_sql_unixodbc,unixodbc"
107PACKAGECONFIG[postgresql] = "--with-rlm_sql_postgresql,--without-rlm_sql_postgresql,postgresql"
108PACKAGECONFIG[pcre] = "--with-pcre,--without-pcre,libpcre"
109PACKAGECONFIG[perl] = "--with-perl=${STAGING_BINDIR_NATIVE}/perl-native/perl --with-rlm_perl,--without-rlm_perl,perl-native perl,perl"
110PACKAGECONFIG[python3] = "--with-rlm_python3 --with-rlm-python3-bin=${STAGING_BINDIR_NATIVE}/python3-native/python3 --with-rlm-python3-include-dir=${STAGING_INCDIR}/${PYTHON_DIR},--without-rlm_python3,python3-native python3"
111PACKAGECONFIG[rest] = "--with-rlm_rest,--without-rlm_rest --without-rlm_json,curl json-c"
112PACKAGECONFIG[ruby] = "--with-rlm_ruby,--without-rlm_ruby,ruby"
113PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl"
114PACKAGECONFIG[rlm-eap-fast] = "--with-rlm_eap_fast, --without-rlm_eap_fast"
115PACKAGECONFIG[rlm-eap-pwd] = "--with-rlm_eap_pwd, --without-rlm_eap_pwd"
116PACKAGECONFIG[kafka] = "--with-rlm_kafka, --without-rlm_kafka, librdkafka"
117
118inherit useradd autotools-brokensep update-rc.d systemd multilib_script multilib_header
119
120MULTILIB_SCRIPTS = "${PN}:${sbindir}/checkrad"
121
122# This is not a cpan or python based package, but it needs some definitions
123# from cpan-base and python3-dir bbclasses for building rlm_perl and rlm_python
124# correctly.
125inherit cpan-base python3-dir
126
127# The modules subdirs also need to be processed by autoreconf. Use autogen.sh
128# in order to handle the subdirs correctly.
129do_configure() {
130 ./autogen.sh
131
132 # the configure of rlm_perl needs this to get correct
133 # mod_cflags and mod_ldflags
134 if ${@bb.utils.contains('PACKAGECONFIG', 'perl', 'true', 'false', d)}; then
135 export PERL5LIB="${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}"
136 fi
137
138 oe_runconf
139
140 # we don't need dhcpclient
141 sed -i -e 's/dhcpclient.mk//' ${S}/src/modules/proto_dhcp/all.mk
142}
143
144INITSCRIPT_NAME = "radiusd"
145
146SYSTEMD_SERVICE:${PN} = "radiusd.service"
147
148USERADD_PACKAGES = "${PN}"
149USERADD_PARAM:${PN} = "--system --no-create-home --shell /bin/false --user-group radiusd"
150
151do_install() {
152 rm -rf ${D}
153 install -d ${D}/${sysconfdir}/logrotate.d
154 install -d ${D}/${sysconfdir}/pam.d
155 install -d ${D}/${localstatedir}/lib/radiusd
156
157 export LD_LIBRARY_PATH=${D}/${libdir}
158 oe_runmake install R=${D} INSTALLSTRIP=""
159
160 # remove unsupported config files
161 rm -f ${D}/${raddbdir}/experimental.conf
162
163 # remove scripts that required Perl(DBI)
164 rm -rf ${D}/${bindir}/radsqlrelay
165
166 rm -f ${D}/${sbindir}/rc.radiusd
167 rm -rf ${D}/${localstatedir}/run/
168 rm -rf ${D}/${localstatedir}/log/
169
170 chown -R radiusd:radiusd ${D}/${raddbdir}
171 chown -R radiusd:radiusd ${D}/${localstatedir}/lib/radiusd
172
173 # For sysvinit
174 if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
175 install -d ${D}${sysconfdir}/init.d
176 install -d ${D}${sysconfdir}/default/volatiles
177 install -m 0755 ${UNPACKDIR}/freeradius ${D}/etc/init.d/radiusd
178 install -m 0644 ${UNPACKDIR}/volatiles.58_radiusd ${D}${sysconfdir}/default/volatiles/58_radiusd
179 fi
180
181 # For systemd
182 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
183 install -d ${D}${systemd_unitdir}/system
184 install -m 0644 ${UNPACKDIR}/radiusd.service ${D}${systemd_unitdir}/system
185 sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \
186 -e 's,@SBINDIR@,${sbindir},g' \
187 -e 's,@STATEDIR@,${localstatedir},g' \
188 -e 's,@SYSCONFDIR@,${sysconfdir},g' \
189 ${D}${systemd_unitdir}/system/radiusd.service
190
191 install -d ${D}${sysconfdir}/tmpfiles.d/
192 install -m 0644 ${UNPACKDIR}/radiusd-volatiles.conf ${D}${sysconfdir}/tmpfiles.d/radiusd.conf
193 fi
194
195 oe_multilib_header freeradius/autoconf.h
196 oe_multilib_header freeradius/missing.h
197 oe_multilib_header freeradius/radpaths.h
198}
199
200# This is only needed when we install/update on a running target.
201#
202pkg_postinst:${PN} () {
203 if [ -z "$D" ]; then
204 if command -v systemd-tmpfiles >/dev/null; then
205 # create /var/log/radius, /var/run/radiusd
206 systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/radiusd.conf
207 elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then
208 ${sysconfdir}/init.d/populate-volatile.sh update
209 fi
210
211 # Fix ownership for /etc/raddb/*, /var/lib/radiusd
212 chown -R radiusd:radiusd ${raddbdir}
213 chown -R radiusd:radiusd ${localstatedir}/lib/radiusd
214
215 # for radiusd.service with multilib
216 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
217 install -d ${sysconfdir}/sysconfig
218 echo "MLPREFIX=" > ${sysconfdir}/sysconfig/radiusd
219 fi
220 else
221 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
222 install -d $D${sysconfdir}/sysconfig
223 echo "MLPREFIX=" > $D${sysconfdir}/sysconfig/radiusd
224 fi
225 fi
226}
227
228pkg_postrm:${PN} () {
229 # only try to remove ${sysconfdir}/sysconfig/radiusd for systemd
230 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'false', 'true', d)}; then
231 exit 0
232 fi
233
234 if [ -d ${sysconfdir}/raddb ]; then
235 exit 0
236 fi
237 for variant in ${MULTILIB_GLOBAL_VARIANTS}; do
238 if [ -d ${sysconfdir}/${variant}-raddb ]; then
239 exit 0
240 fi
241 done
242
243 rm -f ${sysconfdir}/sysconfig/radiusd
244 rmdir --ignore-fail-on-non-empty ${sysconfdir}/sysconfig
245}
246
247# We really need the symlink :(
248INSANE_SKIP:${PN} = "dev-so"
249INSANE_SKIP:${PN}-krb5 = "dev-so"
250INSANE_SKIP:${PN}-ldap = "dev-so"
251INSANE_SKIP:${PN}-mysql = "dev-so"
252INSANE_SKIP:${PN}-perl = "dev-so"
253INSANE_SKIP:${PN}-postgresql = "dev-so"
254INSANE_SKIP:${PN}-python = "dev-so"
255INSANE_SKIP:${PN}-unixodbc = "dev-so"
256
257PACKAGES =+ "${PN}-utils ${PN}-ldap ${PN}-krb5 ${PN}-perl \
258 ${PN}-python ${PN}-mysql ${PN}-postgresql ${PN}-unixodbc"
259
260FILES:${PN}-utils = "${bindir}/*"
261
262FILES:${PN}-ldap = "${libdir}/rlm_ldap.so* \
263 ${raddbdir}/mods-available/ldap \
264"
265
266FILES:${PN}-krb5 = "${libdir}/rlm_krb5.so* \
267 ${raddbdir}/mods-available/krb5 \
268"
269
270FILES:${PN}-perl = "${libdir}/rlm_perl.so* \
271 ${raddbdir}/mods-config/perl \
272 ${raddbdir}/mods-available/perl \
273"
274
275FILES:${PN}-python = "${libdir}/rlm_python3.so* \
276 ${raddbdir}/mods-config/python3 \
277 ${raddbdir}/mods-available/python3 \
278"
279
280FILES:${PN}-mysql = "${libdir}/rlm_sql_mysql.so* \
281 ${raddbdir}/mods-config/sql/*/mysql \
282 ${raddbdir}/mods-available/sql \
283"
284
285FILES:${PN}-postgresql = "${libdir}/rlm_sql_postgresql.so* \
286 ${raddbdir}/mods-config/sql/*/postgresql \
287"
288
289FILES:${PN}-unixodbc = "${libdir}/rlm_sql_unixodbc.so*"
290
291FILES:${PN} =+ "${libdir}/rlm_*.so* ${libdir}/proto_*so*"
292
293RDEPENDS:${PN} += "perl"
294RDEPENDS:${PN}-utils = "${PN} perl"
295RDEPENDS:${PN}-krb5 = "${PN}"
296RDEPENDS:${PN}-ldap = "${PN}"
297RDEPENDS:${PN}-mysql = "${PN}"
298RDEPENDS:${PN}-perl = "${PN}"
299RDEPENDS:${PN}-postgresql = "${PN}"
300RDEPENDS:${PN}-python = "${PN}"
301RDEPENDS:${PN}-unixodbc = "${PN}"
302
303CLEANBROKEN = "1"