From 5000ff06e26f8e780cec024850772451991b14d4 Mon Sep 17 00:00:00 2001 From: Leo Date: Wed, 5 Jun 2019 02:34:57 -0300 Subject: main/freeradius: modernize, fix license --- main/freeradius/APKBUILD | 122 +++++++++++++++++++++++------------------------ 1 file changed, 60 insertions(+), 62 deletions(-) (limited to 'main/freeradius/APKBUILD') diff --git a/main/freeradius/APKBUILD b/main/freeradius/APKBUILD index 828a6bc205..8d365112f9 100644 --- a/main/freeradius/APKBUILD +++ b/main/freeradius/APKBUILD @@ -5,17 +5,15 @@ pkgname=freeradius _realname=freeradius pkgver=3.0.19 -pkgrel=1 +pkgrel=2 pkgdesc="RADIUS (Remote Authentication Dial-In User Service) server" -url="http://freeradius.org/" +url="https://freeradius.org/" arch="all" -license="GPL" -depends="" +license="GPL-2.0-or-later" 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 unixodbc-dev linux-pam-dev sqlite-dev talloc-dev libpcap-dev - linux-headers curl-dev hiredis-dev json-c-dev net-snmp-tools - curl-dev" + linux-headers curl-dev hiredis-dev json-c-dev net-snmp-tools" pkggroups="radius" pkgusers="radius" install="$pkgname.pre-install" @@ -40,11 +38,11 @@ builddir="$srcdir"/$_realname-server-$pkgver # - CVE-2019-11234 # - CVE-2019-11235 -radconfdir="/etc/raddb" -radmodsdir="$radconfdir/mods-available" -radlibdir="/usr/lib/freeradius" -radmodsconfdir="$radconfdir/mods-config" -ldpath="$radlibdir" +_radconfdir="/etc/raddb" +_radmodsdir="$_radconfdir/mods-available" +_radlibdir="/usr/lib/freeradius" +_radmodsconfdir="$_radconfdir/mods-config" +ldpath="$_radlibdir" prepare() { default_prepare @@ -68,7 +66,7 @@ build() { --infodir=/usr/share/info \ --localstatedir=/var \ --datarootdir=/usr/share \ - --libdir="$radlibdir" \ + --libdir="$_radlibdir" \ --with-logdir=/var/log/radius \ --with-radacctdir=/var/log/radius/radacct \ --with-system-libtool \ @@ -96,7 +94,7 @@ build() { package() { cd "$builddir" install -d -m0750 -o root -g radius \ - "${pkgdir}"${radconfdir} + "${pkgdir}"${_radconfdir} install -d -m0750 -o radius -g radius \ "$pkgdir"/var/run/radius install -d -m0750 -o radius -g radius \ @@ -112,58 +110,58 @@ package() { install -m644 -D "$srcdir"/$pkgname.confd \ "$pkgdir"/etc/conf.d/radiusd #Install misses to create this - mkdir -p "${pkgdir}"${radmodsconfdir}/sql/ippool-dhcp/postgresql + mkdir -p "${pkgdir}"${_radmodsconfdir}/sql/ippool-dhcp/postgresql } _mvdb() { for dir in ippool-dhcp ippool counter main cui; do - mkdir -p "${subpkgdir}"${radmodsconfdir}/sql/$dir - mv "${pkgdir}"${radmodsconfdir}/sql/$dir/$1 \ - "${subpkgdir}"${radmodsconfdir}/sql/$dir + mkdir -p "${subpkgdir}"${_radmodsconfdir}/sql/$dir + mv "${pkgdir}"${_radmodsconfdir}/sql/$dir/$1 \ + "${subpkgdir}"${_radmodsconfdir}/sql/$dir done - mkdir -p "${subpkgdir}"${radlibdir} - mv "${pkgdir}"${radlibdir}/rlm_sql_${1}.so "${subpkgdir}"${radlibdir} + mkdir -p "${subpkgdir}"${_radlibdir} + mv "${pkgdir}"${_radlibdir}/rlm_sql_${1}.so "${subpkgdir}"${_radlibdir} } eap() { depends="freeradius=$pkgver-r$pkgrel" provides="freeradius3-eap=$pkgver-r$pkgrel" pkgdesc="EAP module for FreeRADIUS server" - mkdir -p "${subpkgdir}"${radlibdir} "$subpkgdir"/usr/bin - mv "${pkgdir}"${radlibdir}/rlm_eap*.so "${subpkgdir}"${radlibdir} + mkdir -p "${subpkgdir}"${_radlibdir} "$subpkgdir"/usr/bin + mv "${pkgdir}"${_radlibdir}/rlm_eap*.so "${subpkgdir}"${_radlibdir} mv "$pkgdir"/usr/bin/radeapclient "$subpkgdir"/usr/bin - mkdir -p "${subpkgdir}"${radmodsdir} "$subpkgdir"$radconfdir/mods-enabled - mv "${pkgdir}"${radmodsdir}/eap "${subpkgdir}"${radmodsdir} - mv "$pkgdir"$radconfdir/mods-enabled/eap \ - "$subpkgdir"$radconfdir/mods-enabled/ + mkdir -p "${subpkgdir}"${_radmodsdir} "$subpkgdir"$_radconfdir/mods-enabled + mv "${pkgdir}"${_radmodsdir}/eap "${subpkgdir}"${_radmodsdir} + mv "$pkgdir"$_radconfdir/mods-enabled/eap \ + "$subpkgdir"$_radconfdir/mods-enabled/ - mkdir -p "${subpkgdir}"${radconfdir} - mv "${pkgdir}"${radconfdir}/certs "${subpkgdir}"${radconfdir} + mkdir -p "${subpkgdir}"${_radconfdir} + mv "${pkgdir}"${_radconfdir}/certs "${subpkgdir}"${_radconfdir} } ldap() { depends="freeradius=$pkgver-r$pkgrel" provides="freeradius3-ldap=$pkgver-r$pkgrel" pkgdesc="LDAP module for FreeRADIUS server" - mkdir -p "${subpkgdir}"${radlibdir} - mv "${pkgdir}"${radlibdir}/rlm_ldap* "${subpkgdir}"${radlibdir} + mkdir -p "${subpkgdir}"${_radlibdir} + mv "${pkgdir}"${_radlibdir}/rlm_ldap* "${subpkgdir}"${_radlibdir} } krb5() { depends="freeradius=$pkgver-r$pkgrel" provides="freeradius3-krb5=$pkgver-r$pkgrel" pkgdesc="Kerberos module for FreeRADIUS server" - mkdir -p "${subpkgdir}"${radlibdir} - mv "${pkgdir}"${radlibdir}/rlm_krb5* "${subpkgdir}"${radlibdir} + mkdir -p "${subpkgdir}"${_radlibdir} + mv "${pkgdir}"${_radlibdir}/rlm_krb5* "${subpkgdir}"${_radlibdir} } lib() { depends="" pkgdesc="Freeradius shared libraries" - mkdir -p "${subpkgdir}"${radlibdir} "${subpkgdir}"${radconfdir} \ + mkdir -p "${subpkgdir}"${_radlibdir} "${subpkgdir}"${_radconfdir} \ "$subpkgdir"/usr/share/freeradius - mv "${pkgdir}"${radlibdir}/libfreeradius-*.so \ - "${subpkgdir}"${radlibdir} + mv "${pkgdir}"${_radlibdir}/libfreeradius-*.so \ + "${subpkgdir}"${_radlibdir} mv "${pkgdir}"/usr/share/freeradius/* \ "${subpkgdir}"/usr/share/freeradius } @@ -172,16 +170,16 @@ sql() { depends="freeradius=$pkgver-r$pkgrel" provides="freeradius3-sql=$pkgver-r$pkgrel" pkgdesc="SQL module for FreeRADIUS server" - mkdir -p "${subpkgdir}"${radlibdir} + mkdir -p "${subpkgdir}"${_radlibdir} for lib in sql sqlippool sql_null sqlcounter; do - mv "${pkgdir}"${radlibdir}/rlm_${lib}.so \ - "${subpkgdir}"${radlibdir} + mv "${pkgdir}"${_radlibdir}/rlm_${lib}.so \ + "${subpkgdir}"${_radlibdir} done - mkdir -p "${subpkgdir}"${radconfdir}/sites-available - mv "${pkgdir}"${radconfdir}/sites-available/buffered-sql \ - "${subpkgdir}"${radconfdir}/sites-available - mkdir -p "${subpkgdir}"${radmodsdir} - mv "${pkgdir}"${radmodsdir}/*sql* "${subpkgdir}"${radmodsdir} + mkdir -p "${subpkgdir}"${_radconfdir}/sites-available + mv "${pkgdir}"${_radconfdir}/sites-available/buffered-sql \ + "${subpkgdir}"${_radconfdir}/sites-available + mkdir -p "${subpkgdir}"${_radmodsdir} + mv "${pkgdir}"${_radmodsdir}/*sql* "${subpkgdir}"${_radmodsdir} } mysql() { @@ -195,20 +193,20 @@ mssql() { depends="freeradius-sql=$pkgver-r$pkgrel" provides="freeradius3-mssql=$pkgver-r$pkgrel" pkgdesc="MSSQL module for FreeRADIUS server" - mkdir -p "${subpkgdir}"${radmodsconfdir}/sql/main - mv "${pkgdir}"${radmodsconfdir}/sql/main/mssql \ - "${subpkgdir}"${radmodsconfdir}/sql/main + mkdir -p "${subpkgdir}"${_radmodsconfdir}/sql/main + mv "${pkgdir}"${_radmodsconfdir}/sql/main/mssql \ + "${subpkgdir}"${_radmodsconfdir}/sql/main } perl() { depends="freeradius=$pkgver-r$pkgrel perl" provides="freeradius3-perl=$pkgver-r$pkgrel" pkgdesc="Perl module for FreeRADIUS server" - mkdir -p "${subpkgdir}"${radlibdir} - mv "${pkgdir}"${radlibdir}/rlm_perl* "${subpkgdir}"${radlibdir} - mkdir -p "${subpkgdir}"${radconfdir}/mods-available - mv "${pkgdir}"${radconfdir}/mods-available/perl \ - "${subpkgdir}"${radconfdir}/mods-available/perl + mkdir -p "${subpkgdir}"${_radlibdir} + mv "${pkgdir}"${_radlibdir}/rlm_perl* "${subpkgdir}"${_radlibdir} + mkdir -p "${subpkgdir}"${_radconfdir}/mods-available + mv "${pkgdir}"${_radconfdir}/mods-available/perl \ + "${subpkgdir}"${_radconfdir}/mods-available/perl } checkrad() { @@ -229,9 +227,9 @@ python() { depends="freeradius=$pkgver-r$pkgrel python2" provides="freeradius3-python=$pkgver-r$pkgrel" pkgdesc="Python module for FreeRADIUS server" - mkdir -p "${subpkgdir}"${radlibdir} - mv "${pkgdir}"${radlibdir}/rlm_python* "${subpkgdir}"${radlibdir} - for dir in $radmodsdir $radmodsconfdir; do + mkdir -p "${subpkgdir}"${_radlibdir} + mv "${pkgdir}"${_radlibdir}/rlm_python* "${subpkgdir}"${_radlibdir} + for dir in $_radmodsdir $_radmodsconfdir; do mkdir -p "${subpkgdir}"$dir mv "${pkgdir}"$dir/python "${subpkgdir}"$dir done @@ -256,31 +254,31 @@ unixodbc() { depends="freeradius=$pkgver-r$pkgrel" provides="freeradius3-unixodbc=$pkgver-r$pkgrel" pkgdesc="ODBC module for FreeRADIUS server" - mkdir -p "${subpkgdir}"${radlibdir} - mv "${pkgdir}"${radlibdir}/rlm_sql_unixodbc.so \ - "${subpkgdir}"${radlibdir} + mkdir -p "${subpkgdir}"${_radlibdir} + mv "${pkgdir}"${_radlibdir}/rlm_sql_unixodbc.so \ + "${subpkgdir}"${_radlibdir} } pam() { depends="freeradius=$pkgver-r$pkgrel" provides="freeradius3-pam=$pkgver-r$pkgrel" pkgdesc="PAM module for FreeRADIUS server" - mkdir -p "${subpkgdir}"${radlibdir} - mv "${pkgdir}"${radlibdir}/rlm_pam* "${subpkgdir}"${radlibdir} + mkdir -p "${subpkgdir}"${_radlibdir} + mv "${pkgdir}"${_radlibdir}/rlm_pam* "${subpkgdir}"${_radlibdir} } rest() { depends="freeradius=$pkgver-r$pkgrel" pkgdesc="REST module for FreeRADIUS server" - mkdir -p "${subpkgdir}"${radlibdir} - mv "${pkgdir}"${radlibdir}/rlm_rest* "${subpkgdir}"${radlibdir} + mkdir -p "${subpkgdir}"${_radlibdir} + mv "${pkgdir}"${_radlibdir}/rlm_rest* "${subpkgdir}"${_radlibdir} } redis() { depends="freeradius=$pkgver-r$pkgrel" pkgdesc="Redis modules for FreeRADIUS server" - mkdir -p "${subpkgdir}"${radlibdir} - mv "${pkgdir}"${radlibdir}/rlm_redis* "${subpkgdir}"${radlibdir} + mkdir -p "${subpkgdir}"${_radlibdir} + mv "${pkgdir}"${_radlibdir}/rlm_redis* "${subpkgdir}"${_radlibdir} } sha512sums="8a914e2ad1fbeb4cf8c00aaf7eaa154ea17f70e4d58734716bfaf71b3ddef9f8f63a4d3217bdc07dfa776273e5bf090bc98f7bb16f5b565339ddc3b9c13e091f freeradius-server-3.0.19.tar.gz -- cgit v1.2.3