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