Commit 5000ff06 authored by Leo's avatar Leo Committed by Leonardo Arena

main/freeradius: modernize, fix license

parent 00a8fea4
...@@ -5,17 +5,15 @@ ...@@ -5,17 +5,15 @@
pkgname=freeradius pkgname=freeradius
_realname=freeradius _realname=freeradius
pkgver=3.0.19 pkgver=3.0.19
pkgrel=1 pkgrel=2
pkgdesc="RADIUS (Remote Authentication Dial-In User Service) server" pkgdesc="RADIUS (Remote Authentication Dial-In User Service) server"
url="http://freeradius.org/" url="https://freeradius.org/"
arch="all" arch="all"
license="GPL" license="GPL-2.0-or-later"
depends=""
makedepends="openssl-dev mariadb-connector-c-dev postgresql-dev gdbm-dev readline-dev makedepends="openssl-dev mariadb-connector-c-dev postgresql-dev gdbm-dev readline-dev
bash libtool autoconf automake perl-dev python2-dev openldap-dev krb5-dev bash libtool autoconf automake perl-dev python2-dev openldap-dev krb5-dev
unixodbc-dev linux-pam-dev sqlite-dev talloc-dev libpcap-dev unixodbc-dev linux-pam-dev sqlite-dev talloc-dev libpcap-dev
linux-headers curl-dev hiredis-dev json-c-dev net-snmp-tools linux-headers curl-dev hiredis-dev json-c-dev net-snmp-tools"
curl-dev"
pkggroups="radius" pkggroups="radius"
pkgusers="radius" pkgusers="radius"
install="$pkgname.pre-install" install="$pkgname.pre-install"
...@@ -40,11 +38,11 @@ builddir="$srcdir"/$_realname-server-$pkgver ...@@ -40,11 +38,11 @@ builddir="$srcdir"/$_realname-server-$pkgver
# - CVE-2019-11234 # - CVE-2019-11234
# - CVE-2019-11235 # - CVE-2019-11235
radconfdir="/etc/raddb" _radconfdir="/etc/raddb"
radmodsdir="$radconfdir/mods-available" _radmodsdir="$_radconfdir/mods-available"
radlibdir="/usr/lib/freeradius" _radlibdir="/usr/lib/freeradius"
radmodsconfdir="$radconfdir/mods-config" _radmodsconfdir="$_radconfdir/mods-config"
ldpath="$radlibdir" ldpath="$_radlibdir"
prepare() { prepare() {
default_prepare default_prepare
...@@ -68,7 +66,7 @@ build() { ...@@ -68,7 +66,7 @@ build() {
--infodir=/usr/share/info \ --infodir=/usr/share/info \
--localstatedir=/var \ --localstatedir=/var \
--datarootdir=/usr/share \ --datarootdir=/usr/share \
--libdir="$radlibdir" \ --libdir="$_radlibdir" \
--with-logdir=/var/log/radius \ --with-logdir=/var/log/radius \
--with-radacctdir=/var/log/radius/radacct \ --with-radacctdir=/var/log/radius/radacct \
--with-system-libtool \ --with-system-libtool \
...@@ -96,7 +94,7 @@ build() { ...@@ -96,7 +94,7 @@ build() {
package() { package() {
cd "$builddir" cd "$builddir"
install -d -m0750 -o root -g radius \ install -d -m0750 -o root -g radius \
"${pkgdir}"${radconfdir} "${pkgdir}"${_radconfdir}
install -d -m0750 -o radius -g radius \ install -d -m0750 -o radius -g radius \
"$pkgdir"/var/run/radius "$pkgdir"/var/run/radius
install -d -m0750 -o radius -g radius \ install -d -m0750 -o radius -g radius \
...@@ -112,58 +110,58 @@ package() { ...@@ -112,58 +110,58 @@ package() {
install -m644 -D "$srcdir"/$pkgname.confd \ install -m644 -D "$srcdir"/$pkgname.confd \
"$pkgdir"/etc/conf.d/radiusd "$pkgdir"/etc/conf.d/radiusd
#Install misses to create this #Install misses to create this
mkdir -p "${pkgdir}"${radmodsconfdir}/sql/ippool-dhcp/postgresql mkdir -p "${pkgdir}"${_radmodsconfdir}/sql/ippool-dhcp/postgresql
} }
_mvdb() { _mvdb() {
for dir in ippool-dhcp ippool counter main cui; do for dir in ippool-dhcp ippool counter main cui; do
mkdir -p "${subpkgdir}"${radmodsconfdir}/sql/$dir mkdir -p "${subpkgdir}"${_radmodsconfdir}/sql/$dir
mv "${pkgdir}"${radmodsconfdir}/sql/$dir/$1 \ mv "${pkgdir}"${_radmodsconfdir}/sql/$dir/$1 \
"${subpkgdir}"${radmodsconfdir}/sql/$dir "${subpkgdir}"${_radmodsconfdir}/sql/$dir
done done
mkdir -p "${subpkgdir}"${radlibdir} mkdir -p "${subpkgdir}"${_radlibdir}
mv "${pkgdir}"${radlibdir}/rlm_sql_${1}.so "${subpkgdir}"${radlibdir} mv "${pkgdir}"${_radlibdir}/rlm_sql_${1}.so "${subpkgdir}"${_radlibdir}
} }
eap() { eap() {
depends="freeradius=$pkgver-r$pkgrel" depends="freeradius=$pkgver-r$pkgrel"
provides="freeradius3-eap=$pkgver-r$pkgrel" provides="freeradius3-eap=$pkgver-r$pkgrel"
pkgdesc="EAP module for FreeRADIUS server" pkgdesc="EAP module for FreeRADIUS server"
mkdir -p "${subpkgdir}"${radlibdir} "$subpkgdir"/usr/bin mkdir -p "${subpkgdir}"${_radlibdir} "$subpkgdir"/usr/bin
mv "${pkgdir}"${radlibdir}/rlm_eap*.so "${subpkgdir}"${radlibdir} mv "${pkgdir}"${_radlibdir}/rlm_eap*.so "${subpkgdir}"${_radlibdir}
mv "$pkgdir"/usr/bin/radeapclient "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/radeapclient "$subpkgdir"/usr/bin
mkdir -p "${subpkgdir}"${radmodsdir} "$subpkgdir"$radconfdir/mods-enabled mkdir -p "${subpkgdir}"${_radmodsdir} "$subpkgdir"$_radconfdir/mods-enabled
mv "${pkgdir}"${radmodsdir}/eap "${subpkgdir}"${radmodsdir} mv "${pkgdir}"${_radmodsdir}/eap "${subpkgdir}"${_radmodsdir}
mv "$pkgdir"$radconfdir/mods-enabled/eap \ mv "$pkgdir"$_radconfdir/mods-enabled/eap \
"$subpkgdir"$radconfdir/mods-enabled/ "$subpkgdir"$_radconfdir/mods-enabled/
mkdir -p "${subpkgdir}"${radconfdir} mkdir -p "${subpkgdir}"${_radconfdir}
mv "${pkgdir}"${radconfdir}/certs "${subpkgdir}"${radconfdir} mv "${pkgdir}"${_radconfdir}/certs "${subpkgdir}"${_radconfdir}
} }
ldap() { ldap() {
depends="freeradius=$pkgver-r$pkgrel" depends="freeradius=$pkgver-r$pkgrel"
provides="freeradius3-ldap=$pkgver-r$pkgrel" provides="freeradius3-ldap=$pkgver-r$pkgrel"
pkgdesc="LDAP module for FreeRADIUS server" pkgdesc="LDAP module for FreeRADIUS server"
mkdir -p "${subpkgdir}"${radlibdir} mkdir -p "${subpkgdir}"${_radlibdir}
mv "${pkgdir}"${radlibdir}/rlm_ldap* "${subpkgdir}"${radlibdir} mv "${pkgdir}"${_radlibdir}/rlm_ldap* "${subpkgdir}"${_radlibdir}
} }
krb5() { krb5() {
depends="freeradius=$pkgver-r$pkgrel" depends="freeradius=$pkgver-r$pkgrel"
provides="freeradius3-krb5=$pkgver-r$pkgrel" provides="freeradius3-krb5=$pkgver-r$pkgrel"
pkgdesc="Kerberos module for FreeRADIUS server" pkgdesc="Kerberos module for FreeRADIUS server"
mkdir -p "${subpkgdir}"${radlibdir} mkdir -p "${subpkgdir}"${_radlibdir}
mv "${pkgdir}"${radlibdir}/rlm_krb5* "${subpkgdir}"${radlibdir} mv "${pkgdir}"${_radlibdir}/rlm_krb5* "${subpkgdir}"${_radlibdir}
} }
lib() { lib() {
depends="" depends=""
pkgdesc="Freeradius shared libraries" pkgdesc="Freeradius shared libraries"
mkdir -p "${subpkgdir}"${radlibdir} "${subpkgdir}"${radconfdir} \ mkdir -p "${subpkgdir}"${_radlibdir} "${subpkgdir}"${_radconfdir} \
"$subpkgdir"/usr/share/freeradius "$subpkgdir"/usr/share/freeradius
mv "${pkgdir}"${radlibdir}/libfreeradius-*.so \ mv "${pkgdir}"${_radlibdir}/libfreeradius-*.so \
"${subpkgdir}"${radlibdir} "${subpkgdir}"${_radlibdir}
mv "${pkgdir}"/usr/share/freeradius/* \ mv "${pkgdir}"/usr/share/freeradius/* \
"${subpkgdir}"/usr/share/freeradius "${subpkgdir}"/usr/share/freeradius
} }
...@@ -172,16 +170,16 @@ sql() { ...@@ -172,16 +170,16 @@ sql() {
depends="freeradius=$pkgver-r$pkgrel" depends="freeradius=$pkgver-r$pkgrel"
provides="freeradius3-sql=$pkgver-r$pkgrel" provides="freeradius3-sql=$pkgver-r$pkgrel"
pkgdesc="SQL module for FreeRADIUS server" pkgdesc="SQL module for FreeRADIUS server"
mkdir -p "${subpkgdir}"${radlibdir} mkdir -p "${subpkgdir}"${_radlibdir}
for lib in sql sqlippool sql_null sqlcounter; do for lib in sql sqlippool sql_null sqlcounter; do
mv "${pkgdir}"${radlibdir}/rlm_${lib}.so \ mv "${pkgdir}"${_radlibdir}/rlm_${lib}.so \
"${subpkgdir}"${radlibdir} "${subpkgdir}"${_radlibdir}
done done
mkdir -p "${subpkgdir}"${radconfdir}/sites-available mkdir -p "${subpkgdir}"${_radconfdir}/sites-available
mv "${pkgdir}"${radconfdir}/sites-available/buffered-sql \ mv "${pkgdir}"${_radconfdir}/sites-available/buffered-sql \
"${subpkgdir}"${radconfdir}/sites-available "${subpkgdir}"${_radconfdir}/sites-available
mkdir -p "${subpkgdir}"${radmodsdir} mkdir -p "${subpkgdir}"${_radmodsdir}
mv "${pkgdir}"${radmodsdir}/*sql* "${subpkgdir}"${radmodsdir} mv "${pkgdir}"${_radmodsdir}/*sql* "${subpkgdir}"${_radmodsdir}
} }
mysql() { mysql() {
...@@ -195,20 +193,20 @@ mssql() { ...@@ -195,20 +193,20 @@ mssql() {
depends="freeradius-sql=$pkgver-r$pkgrel" depends="freeradius-sql=$pkgver-r$pkgrel"
provides="freeradius3-mssql=$pkgver-r$pkgrel" provides="freeradius3-mssql=$pkgver-r$pkgrel"
pkgdesc="MSSQL module for FreeRADIUS server" pkgdesc="MSSQL module for FreeRADIUS server"
mkdir -p "${subpkgdir}"${radmodsconfdir}/sql/main mkdir -p "${subpkgdir}"${_radmodsconfdir}/sql/main
mv "${pkgdir}"${radmodsconfdir}/sql/main/mssql \ mv "${pkgdir}"${_radmodsconfdir}/sql/main/mssql \
"${subpkgdir}"${radmodsconfdir}/sql/main "${subpkgdir}"${_radmodsconfdir}/sql/main
} }
perl() { perl() {
depends="freeradius=$pkgver-r$pkgrel perl" depends="freeradius=$pkgver-r$pkgrel perl"
provides="freeradius3-perl=$pkgver-r$pkgrel" provides="freeradius3-perl=$pkgver-r$pkgrel"
pkgdesc="Perl module for FreeRADIUS server" pkgdesc="Perl module for FreeRADIUS server"
mkdir -p "${subpkgdir}"${radlibdir} mkdir -p "${subpkgdir}"${_radlibdir}
mv "${pkgdir}"${radlibdir}/rlm_perl* "${subpkgdir}"${radlibdir} mv "${pkgdir}"${_radlibdir}/rlm_perl* "${subpkgdir}"${_radlibdir}
mkdir -p "${subpkgdir}"${radconfdir}/mods-available mkdir -p "${subpkgdir}"${_radconfdir}/mods-available
mv "${pkgdir}"${radconfdir}/mods-available/perl \ mv "${pkgdir}"${_radconfdir}/mods-available/perl \
"${subpkgdir}"${radconfdir}/mods-available/perl "${subpkgdir}"${_radconfdir}/mods-available/perl
} }
checkrad() { checkrad() {
...@@ -229,9 +227,9 @@ python() { ...@@ -229,9 +227,9 @@ python() {
depends="freeradius=$pkgver-r$pkgrel python2" depends="freeradius=$pkgver-r$pkgrel python2"
provides="freeradius3-python=$pkgver-r$pkgrel" provides="freeradius3-python=$pkgver-r$pkgrel"
pkgdesc="Python module for FreeRADIUS server" pkgdesc="Python module for FreeRADIUS server"
mkdir -p "${subpkgdir}"${radlibdir} mkdir -p "${subpkgdir}"${_radlibdir}
mv "${pkgdir}"${radlibdir}/rlm_python* "${subpkgdir}"${radlibdir} mv "${pkgdir}"${_radlibdir}/rlm_python* "${subpkgdir}"${_radlibdir}
for dir in $radmodsdir $radmodsconfdir; do for dir in $_radmodsdir $_radmodsconfdir; do
mkdir -p "${subpkgdir}"$dir mkdir -p "${subpkgdir}"$dir
mv "${pkgdir}"$dir/python "${subpkgdir}"$dir mv "${pkgdir}"$dir/python "${subpkgdir}"$dir
done done
...@@ -256,31 +254,31 @@ unixodbc() { ...@@ -256,31 +254,31 @@ unixodbc() {
depends="freeradius=$pkgver-r$pkgrel" depends="freeradius=$pkgver-r$pkgrel"
provides="freeradius3-unixodbc=$pkgver-r$pkgrel" provides="freeradius3-unixodbc=$pkgver-r$pkgrel"
pkgdesc="ODBC module for FreeRADIUS server" pkgdesc="ODBC module for FreeRADIUS server"
mkdir -p "${subpkgdir}"${radlibdir} mkdir -p "${subpkgdir}"${_radlibdir}
mv "${pkgdir}"${radlibdir}/rlm_sql_unixodbc.so \ mv "${pkgdir}"${_radlibdir}/rlm_sql_unixodbc.so \
"${subpkgdir}"${radlibdir} "${subpkgdir}"${_radlibdir}
} }
pam() { pam() {
depends="freeradius=$pkgver-r$pkgrel" depends="freeradius=$pkgver-r$pkgrel"
provides="freeradius3-pam=$pkgver-r$pkgrel" provides="freeradius3-pam=$pkgver-r$pkgrel"
pkgdesc="PAM module for FreeRADIUS server" pkgdesc="PAM module for FreeRADIUS server"
mkdir -p "${subpkgdir}"${radlibdir} mkdir -p "${subpkgdir}"${_radlibdir}
mv "${pkgdir}"${radlibdir}/rlm_pam* "${subpkgdir}"${radlibdir} mv "${pkgdir}"${_radlibdir}/rlm_pam* "${subpkgdir}"${_radlibdir}
} }
rest() { rest() {
depends="freeradius=$pkgver-r$pkgrel" depends="freeradius=$pkgver-r$pkgrel"
pkgdesc="REST module for FreeRADIUS server" pkgdesc="REST module for FreeRADIUS server"
mkdir -p "${subpkgdir}"${radlibdir} mkdir -p "${subpkgdir}"${_radlibdir}
mv "${pkgdir}"${radlibdir}/rlm_rest* "${subpkgdir}"${radlibdir} mv "${pkgdir}"${_radlibdir}/rlm_rest* "${subpkgdir}"${_radlibdir}
} }
redis() { redis() {
depends="freeradius=$pkgver-r$pkgrel" depends="freeradius=$pkgver-r$pkgrel"
pkgdesc="Redis modules for FreeRADIUS server" pkgdesc="Redis modules for FreeRADIUS server"
mkdir -p "${subpkgdir}"${radlibdir} mkdir -p "${subpkgdir}"${_radlibdir}
mv "${pkgdir}"${radlibdir}/rlm_redis* "${subpkgdir}"${radlibdir} mv "${pkgdir}"${_radlibdir}/rlm_redis* "${subpkgdir}"${_radlibdir}
} }
sha512sums="8a914e2ad1fbeb4cf8c00aaf7eaa154ea17f70e4d58734716bfaf71b3ddef9f8f63a4d3217bdc07dfa776273e5bf090bc98f7bb16f5b565339ddc3b9c13e091f freeradius-server-3.0.19.tar.gz sha512sums="8a914e2ad1fbeb4cf8c00aaf7eaa154ea17f70e4d58734716bfaf71b3ddef9f8f63a4d3217bdc07dfa776273e5bf090bc98f7bb16f5b565339ddc3b9c13e091f freeradius-server-3.0.19.tar.gz
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment