diff options
| author | Mingli Yu <mingli.yu@windriver.com> | 2021-04-02 17:10:33 +0800 |
|---|---|---|
| committer | Armin Kuster <akuster808@gmail.com> | 2021-04-07 09:37:36 -0700 |
| commit | f282f0829a4deb8e9ae215819b972d27fac0f7ac (patch) | |
| tree | feff5546dda0905fde9cddafca74db764f5aced3 /meta-networking/recipes-connectivity/freeradius/freeradius_3.0.21.bb | |
| parent | 7580c96d6ae244262c6c74395b1a656f1dc50a36 (diff) | |
| download | meta-openembedded-f282f0829a4deb8e9ae215819b972d27fac0f7ac.tar.gz | |
freeradius: Upgrade to 3.0.21
Drop one patch at the issue is already fixed in new version
(307678b268 Fix rlm_python3 build)
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit ece4e7d4f06581b2e68b9f662bc208b050f76cf1)
Signed-off-by: Armin Kuster <akuster808@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 | 239 |
1 files changed, 239 insertions, 0 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 new file mode 100644 index 0000000000..864a4e9447 --- /dev/null +++ b/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.21.bb | |||
| @@ -0,0 +1,239 @@ | |||
| 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 = "GPLv2 & LGPLv2+" | ||
| 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; \ | ||
| 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 | " | ||
| 35 | |||
| 36 | SRCREV = "af428abda249b2279ba0582180985a9f6f4a144a" | ||
| 37 | |||
| 38 | PARALLEL_MAKE = "" | ||
| 39 | |||
| 40 | S = "${WORKDIR}/git" | ||
| 41 | |||
| 42 | LDFLAGS_append_powerpc = " -latomic" | ||
| 43 | LDFLAGS_append_mipsarch = " -latomic" | ||
| 44 | LDFLAGS_append_armv5 = " -latomic" | ||
| 45 | |||
| 46 | EXTRA_OECONF = " --enable-strict-dependencies \ | ||
| 47 | --with-docdir=${docdir}/freeradius-${PV} \ | ||
| 48 | --with-openssl-includes=${STAGING_INCDIR} \ | ||
| 49 | --with-openssl-libraries=${STAGING_LIBDIR} \ | ||
| 50 | --without-rlm_ippool \ | ||
| 51 | --without-rlm_cache_memcached \ | ||
| 52 | --without-rlm_counter \ | ||
| 53 | --without-rlm_couchbase \ | ||
| 54 | --without-rlm_dbm \ | ||
| 55 | --without-rlm_eap_tnc \ | ||
| 56 | --without-rlm_eap_ikev2 \ | ||
| 57 | --without-rlm_opendirectory \ | ||
| 58 | --without-rlm_redis \ | ||
| 59 | --without-rlm_rediswho \ | ||
| 60 | --without-rlm_sql_db2 \ | ||
| 61 | --without-rlm_sql_firebird \ | ||
| 62 | --without-rlm_sql_freetds \ | ||
| 63 | --without-rlm_sql_iodbc \ | ||
| 64 | --without-rlm_sql_oracle \ | ||
| 65 | --without-rlm_sql_sybase \ | ||
| 66 | --without-rlm_sql_mongo \ | ||
| 67 | --without-rlm_sqlhpwippool \ | ||
| 68 | --without-rlm_securid \ | ||
| 69 | --without-rlm_unbound \ | ||
| 70 | --without-rlm_python \ | ||
| 71 | ac_cv_path_PERL=${bindir}/perl \ | ||
| 72 | ax_cv_cc_builtin_choose_expr=no \ | ||
| 73 | ax_cv_cc_builtin_types_compatible_p=no \ | ||
| 74 | ax_cv_cc_builtin_bswap64=no \ | ||
| 75 | ax_cv_cc_bounded_attribute=no \ | ||
| 76 | " | ||
| 77 | |||
| 78 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \ | ||
| 79 | pcre libcap \ | ||
| 80 | openssl rlm-eap-fast rlm-eap-pwd \ | ||
| 81 | " | ||
| 82 | |||
| 83 | PACKAGECONFIG[krb5] = "--with-rlm_krb5,--without-rlm_krb5,krb5" | ||
| 84 | PACKAGECONFIG[pam] = "--with-rlm_pam,--without-rlm_pam,libpam" | ||
| 85 | PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap" | ||
| 86 | PACKAGECONFIG[ldap] = "--with-rlm_ldap,--without-rlm_ldap,openldap" | ||
| 87 | PACKAGECONFIG[mysql] = "--with-rlm_sql_mysql,--without-rlm_sql_mysql,mysql5" | ||
| 88 | PACKAGECONFIG[sqlite] = "--with-rlm_sql_sqlite,--without-rlm_sql_sqlite,sqlite3" | ||
| 89 | PACKAGECONFIG[unixodbc] = "--with-rlm_sql_unixodbc,--without-rlm_sql_unixodbc,unixodbc" | ||
| 90 | PACKAGECONFIG[postgresql] = "--with-rlm_sql_postgresql,--without-rlm_sql_postgresql,postgresql" | ||
| 91 | PACKAGECONFIG[pcre] = "--with-pcre,--without-pcre,libpcre" | ||
| 92 | PACKAGECONFIG[perl] = "--with-perl=${STAGING_BINDIR_NATIVE}/perl-native/perl --with-rlm_perl,--without-rlm_perl,perl-native perl,perl" | ||
| 93 | 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" | ||
| 94 | PACKAGECONFIG[rest] = "--with-rlm_rest,--without-rlm_rest,curl json-c" | ||
| 95 | PACKAGECONFIG[ruby] = "--with-rlm_ruby,--without-rlm_ruby,ruby" | ||
| 96 | PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl" | ||
| 97 | PACKAGECONFIG[rlm-eap-fast] = "--with-rlm_eap_fast, --without-rlm_eap_fast" | ||
| 98 | PACKAGECONFIG[rlm-eap-pwd] = "--with-rlm_eap_pwd, --without-rlm_eap_pwd" | ||
| 99 | |||
| 100 | inherit useradd autotools-brokensep update-rc.d systemd | ||
| 101 | |||
| 102 | # This is not a cpan or python based package, but it needs some definitions | ||
| 103 | # from cpan-base and python3-dir bbclasses for building rlm_perl and rlm_python | ||
| 104 | # correctly. | ||
| 105 | inherit cpan-base python3-dir | ||
| 106 | |||
| 107 | # The modules subdirs also need to be processed by autoreconf. Use autogen.sh | ||
| 108 | # in order to handle the subdirs correctly. | ||
| 109 | do_configure () { | ||
| 110 | ./autogen.sh | ||
| 111 | |||
| 112 | # the configure of rlm_perl needs this to get correct | ||
| 113 | # mod_cflags and mod_ldflags | ||
| 114 | if ${@bb.utils.contains('PACKAGECONFIG', 'perl', 'true', 'false', d)}; then | ||
| 115 | export PERL5LIB="${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}" | ||
| 116 | fi | ||
| 117 | |||
| 118 | oe_runconf | ||
| 119 | |||
| 120 | # we don't need dhcpclient | ||
| 121 | sed -i -e 's/dhcpclient.mk//' ${S}/src/modules/proto_dhcp/all.mk | ||
| 122 | } | ||
| 123 | |||
| 124 | INITSCRIPT_NAME = "radiusd" | ||
| 125 | |||
| 126 | SYSTEMD_SERVICE_${PN} = "radiusd.service" | ||
| 127 | |||
| 128 | USERADD_PACKAGES = "${PN}" | ||
| 129 | USERADD_PARAM_${PN} = "--system --no-create-home --shell /bin/false --user-group radiusd" | ||
| 130 | |||
| 131 | do_install() { | ||
| 132 | rm -rf ${D} | ||
| 133 | mkdir -p ${D}/${sysconfdir}/logrotate.d | ||
| 134 | mkdir -p ${D}/${sysconfdir}/pam.d | ||
| 135 | mkdir -p ${D}/${sysconfdir}/init.d | ||
| 136 | mkdir -p ${D}/${localstatedir}/lib/radiusd | ||
| 137 | mkdir -p ${D}${sysconfdir}/default/volatiles | ||
| 138 | |||
| 139 | export LD_LIBRARY_PATH=${D}/${libdir} | ||
| 140 | oe_runmake install R=${D} INSTALLSTRIP="" | ||
| 141 | |||
| 142 | # remove unsupported config files | ||
| 143 | rm -f ${D}/${sysconfdir}/raddb/experimental.conf | ||
| 144 | |||
| 145 | # remove scripts that required Perl(DBI) | ||
| 146 | rm -rf ${D}/${bindir}/radsqlrelay | ||
| 147 | |||
| 148 | cp -f ${WORKDIR}/freeradius ${D}/etc/init.d/radiusd | ||
| 149 | rm -f ${D}/${sbindir}/rc.radiusd | ||
| 150 | chmod +x ${D}/${sysconfdir}/init.d/radiusd | ||
| 151 | rm -rf ${D}/${localstatedir}/run/ | ||
| 152 | rm -rf ${D}/${localstatedir}/log/ | ||
| 153 | install -m 0644 ${WORKDIR}/volatiles.58_radiusd ${D}${sysconfdir}/default/volatiles/58_radiusd | ||
| 154 | |||
| 155 | chown -R radiusd:radiusd ${D}/${sysconfdir}/raddb/ | ||
| 156 | chown -R radiusd:radiusd ${D}/${localstatedir}/lib/radiusd | ||
| 157 | |||
| 158 | # For systemd | ||
| 159 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
| 160 | install -d ${D}${systemd_unitdir}/system | ||
| 161 | install -m 0644 ${WORKDIR}/radiusd.service ${D}${systemd_unitdir}/system | ||
| 162 | sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ | ||
| 163 | -e 's,@SBINDIR@,${sbindir},g' \ | ||
| 164 | -e 's,@STATEDIR@,${localstatedir},g' \ | ||
| 165 | -e 's,@SYSCONFDIR@,${sysconfdir},g' \ | ||
| 166 | ${D}${systemd_unitdir}/system/radiusd.service | ||
| 167 | |||
| 168 | install -d ${D}${sysconfdir}/tmpfiles.d/ | ||
| 169 | install -m 0644 ${WORKDIR}/radiusd-volatiles.conf ${D}${sysconfdir}/tmpfiles.d/radiusd.conf | ||
| 170 | fi | ||
| 171 | } | ||
| 172 | |||
| 173 | # This is only needed when we install/update on a running target. | ||
| 174 | # | ||
| 175 | pkg_postinst_${PN} () { | ||
| 176 | if [ -z "$D" ]; then | ||
| 177 | if command -v systemd-tmpfiles >/dev/null; then | ||
| 178 | # create /var/log/radius, /var/run/radiusd | ||
| 179 | systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/radiusd.conf | ||
| 180 | elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then | ||
| 181 | ${sysconfdir}/init.d/populate-volatile.sh update | ||
| 182 | fi | ||
| 183 | |||
| 184 | # Fix ownership for /etc/raddb/*, /var/lib/radiusd | ||
| 185 | chown -R radiusd:radiusd ${sysconfdir}/raddb | ||
| 186 | chown -R radiusd:radiusd ${localstatedir}/lib/radiusd | ||
| 187 | fi | ||
| 188 | } | ||
| 189 | |||
| 190 | # We really need the symlink :( | ||
| 191 | INSANE_SKIP_${PN} = "dev-so" | ||
| 192 | INSANE_SKIP_${PN}-krb5 = "dev-so" | ||
| 193 | INSANE_SKIP_${PN}-ldap = "dev-so" | ||
| 194 | INSANE_SKIP_${PN}-mysql = "dev-so" | ||
| 195 | INSANE_SKIP_${PN}-perl = "dev-so" | ||
| 196 | INSANE_SKIP_${PN}-postgresql = "dev-so" | ||
| 197 | INSANE_SKIP_${PN}-python = "dev-so" | ||
| 198 | INSANE_SKIP_${PN}-unixodbc = "dev-so" | ||
| 199 | |||
| 200 | PACKAGES =+ "${PN}-utils ${PN}-ldap ${PN}-krb5 ${PN}-perl \ | ||
| 201 | ${PN}-python ${PN}-mysql ${PN}-postgresql ${PN}-unixodbc" | ||
| 202 | |||
| 203 | FILES_${PN}-utils = "${bindir}/*" | ||
| 204 | |||
| 205 | FILES_${PN}-ldap = "${libdir}/rlm_ldap.so* \ | ||
| 206 | ${sysconfdir}/raddb/mods-available/ldap \ | ||
| 207 | " | ||
| 208 | |||
| 209 | FILES_${PN}-krb5 = "${libdir}/rlm_krb5.so* \ | ||
| 210 | ${sysconfdir}/raddb/mods-available/krb5 \ | ||
| 211 | " | ||
| 212 | |||
| 213 | FILES_${PN}-perl = "${libdir}/rlm_perl.so* \ | ||
| 214 | ${sysconfdir}/raddb/mods-config/perl \ | ||
| 215 | ${sysconfdir}/raddb/mods-available/perl \ | ||
| 216 | " | ||
| 217 | |||
| 218 | FILES_${PN}-python = "${libdir}/rlm_python3.so* \ | ||
| 219 | ${sysconfdir}/raddb/mods-config/python3 \ | ||
| 220 | ${sysconfdir}/raddb/mods-available/python3 \ | ||
| 221 | " | ||
| 222 | |||
| 223 | FILES_${PN}-mysql = "${libdir}/rlm_sql_mysql.so* \ | ||
| 224 | ${sysconfdir}/raddb/mods-config/sql/*/mysql \ | ||
| 225 | ${sysconfdir}/raddb/mods-available/sql \ | ||
| 226 | " | ||
| 227 | |||
| 228 | FILES_${PN}-postgresql = "${libdir}/rlm_sql_postgresql.so* \ | ||
| 229 | ${sysconfdir}/raddb/mods-config/sql/*/postgresql \ | ||
| 230 | " | ||
| 231 | |||
| 232 | FILES_${PN}-unixodbc = "${libdir}/rlm_sql_unixodbc.so*" | ||
| 233 | |||
| 234 | FILES_${PN} =+ "${libdir}/rlm_*.so* ${libdir}/proto_*so*" | ||
| 235 | |||
| 236 | RDEPENDS_${PN} += "perl" | ||
| 237 | RDEPENDS_${PN}-utils = "${PN} perl" | ||
| 238 | |||
| 239 | CLEANBROKEN = "1" | ||
