pkgsrc/net/freeradius2/Makefile
adrianp 1ae672bd35 Update to 2.1.3
This should fix PR#39952
MAKE_JOBS_SAFE=no

05 December 2008 - Version 2.1.3 has been released.

The focus of this release is stability.

Feature Improvements
* Allow running with user=radiusd and binding to secure sockets.
* Start sending Status-Server "are you alive" messages earlier, which helps with proxying multiple realms to a home server.
* Removed thread pool code from rlm_perl. It's not necessary.
* Added example Perl configuration to raddb/modules/perl
* Force OpenSSL to support certificates with SHA256. This seems to be necessary for WiMAX certs.

Bug Fixes
* Fix Debian patch to allow it to build.
* Fix potential NULL dereference in debugging mode on certain platforms for TTLS and PEAP inner tunnels.
* Fix uninitialized memory in handling of vendor definitions
* Fix parsing of quoted (but non-string) attributes in the users< file.
* Initialize unknown NAS IP to 255.255.255.255, rather than 0.0.0.0
* use SUN_LEN in control socket, to avoid truncation on some platforms.
* Correct internal handling of debug condition to prevent it from being over-written.
* Check return code of regcomp in unlang, so that invalid regular expressions are caught rather than mishandled.
* Make rlm_sql use <ltdl.h>. Addresses bug #610.
* Document list "type = status" better. Closes bug #580.
* Set "default days" for certificates, because OpenSSL won't do it. This closes bug #615.
* Reference correct list in example raddb/modules/ldap. Closes #596.
* Increase default schema size for Acct-Session-Id to 64. Closes #540.
* Fix use of temporary files in dialup-admin. Closes #605 and addresses CVE-2008-4474.
* Addressed a number of minor issues found by Coverity.
* Added DHCP option 150 to the dictionary. Closes #618.

04 December 2008 - Version 2.1.2 has been released.
    Due to packaging issues, 2.1.2 has been pulled from the net.
2008-12-19 22:49:18 +00:00

175 lines
5.8 KiB
Makefile

# $NetBSD: Makefile,v 1.4 2008/12/19 22:49:18 adrianp Exp $
DISTNAME= freeradius-server-${RADVER}
PKGNAME= ${DISTNAME:S/-server//}
CATEGORIES= net
MASTER_SITES= ftp://ftp.freeradius.org/pub/freeradius/
EXTRACT_SUFX= .tar.bz2
MAINTAINER= adrianp@NetBSD.org
HOMEPAGE= http://www.freeradius.org/
COMMENT= Free RADIUS server implementation
.include "../../mk/bsd.prefs.mk"
CONFLICTS+= radiusd-cistron-[0-9]*
CONFLICTS+= freeradius<2.0
USE_TOOLS+= gmake perl:run
GNU_CONFIGURE= YES
USE_LIBTOOL= YES
USE_OLD_DES_API= YES
MAKE_JOBS_SAFE= NO
BUILD_DEFS= VARBASE
PLIST_SRC= ${WRKDIR}/.PLIST_SRC
FILES_SUBST+= RADIUS_USER=${RADIUS_USER}
FILES_SUBST+= RADIUS_GROUP=${RADIUS_GROUP}
PLIST_SUBST+= RADVER=${RADVER}
MESSAGE_SRC+= ${WRKDIR}/.MESSAGE_SRC
MESSAGE_SUBST+= CHOWN=${CHOWN:Q} CHMOD=${CHMOD:Q} VARBASE=${VARBASE}
MESSAGE_SUBST+= RADIUS_USER=${RADIUS_USER} XARGS=${XARGS:Q}
MESSAGE_SUBST+= RADIUS_GROUP=${RADIUS_GROUP} FIND=${FIND:Q}
PKG_SYSCONFSUBDIR= raddb
RCD_SCRIPTS= radiusd
RADIUS_USER?= radius
RADIUS_GROUP?= radius
PKG_GROUPS= ${RADIUS_USER}
PKG_USERS= ${RADIUS_USER}:${RADIUS_GROUP}
PKG_GROUPS_VARS+= RADIUS_GROUP
PKG_USERS_VARS+= RADIUS_USER
OWN_DIRS_PERMS+= ${VARBASE}/run/radiusd \
${RADIUS_USER} ${RADIUS_GROUP} 0750
OWN_DIRS_PERMS+= ${VARBASE}/log/radiusd \
${RADIUS_USER} ${RADIUS_GROUP} 0750
OWN_DIRS_PERMS+= ${VARBASE}/log/radiusd/radacct \
${RADIUS_USER} ${RADIUS_GROUP} 0750
RADVER= 2.1.3
EGDIR= ${PREFIX}/share/examples/freeradius
BUILDLINK_API_DEPENDS.openssl+= openssl>=0.9.7
CONFIGURE_ARGS+= --with-logdir=${VARBASE}/log/radiusd
CONFIGURE_ARGS+= --localstatedir=${VARBASE}
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFBASEDIR}
CONFIGURE_ARGS+= --disable-ltdl-install
CONFIGURE_ARGS+= --with-ltdl-lib=${PREFIX}/lib
CONFIGURE_ARGS+= --with-ltdl-include=${PREFIX}/include
CONFIGURE_ARGS+= --without-rlm_ippool
CONFIGURE_ARGS+= --without-rlm_smb
CONFIGURE_ARGS+= --without-rlm_sql_iodbc
CONFIGURE_ARGS+= --without-rlm_sql_oracle
CONFIGURE_ARGS+= --without-rlm_sql_unixodbc
CONFIGURE_ARGS+= --quiet
#CONFIGURE_ARGS+= --without-rlm_eap_peap
#CONFIGURE_ARGS+= --without-rlm_eap_sim
#CONFIGURE_ARGS+= --without-rlm_eap_tls
#CONFIGURE_ARGS+= --without-rlm_eap_ttls
REPLACE_PERL= scripts/radsqlrelay
SUBST_CLASSES= make
SUBST_STAGE.make= post-patch
SUBST_FILES.make= src/modules/rlm_sql/drivers/rlm_sql_postgresql/Makefile.in
SUBST_SED.make+= -e "s|RLM_SQL_LIBS =|RLM_SQL_LIBS = \
-L${PREFIX}/lib|g"
SUBST_MESSAGE.make= Fixing Makefiles.
SUBST_CLASSES+= config
SUBST_STAGE.config= post-patch
SUBST_FILES.config= raddb/radiusd.conf.in
SUBST_SED.config= -e "s|@@RADIUS_USER@@|${RADIUS_USER}|g"
SUBST_SED.config+= -e "s|@@RADIUS_GROUP@@|${RADIUS_GROUP}|g"
SUBST_MESSAGE.config= Fixing configuration files.
.include "options.mk"
EGFILES= certs/demoCA/cacert.pem certs/bootstrap certs/xpextensions \
certs/client.cnf certs/server.cnf certs/README certs/ca.cnf \
sql/mssql/dialup.conf sql/mssql/schema.sql \
sql/mysql/dialup.conf sql/mysql/nas.sql sql/mysql/ippool.conf \
sql/mysql/schema.sql sql/mysql/counter.conf \
sql/mysql/ippool.sql sql/oracle/dialup.conf sql/oracle/nas.sql \
sql/oracle/schema.sql sql/oracle/ippool.sql \
sql/postgresql/dialup.conf sql/postgresql/nas.sql \
sql/postgresql/voip-postpaid.conf sql/postgresql/ippool.conf \
sql/postgresql/schema.sql sql/postgresql/ippool.sql \
sql/postgresql/cisco_h323_db_schema.sql \
sql/postgresql/counter.conf sql/postgresql/admin.sql \
sql/postgresql/update_radacct_group_trigger.sql policy.txt \
experimental.conf radiusd.conf otp.conf policy.conf \
preproxy_users users vmpsd.conf.in acct_users \
ldap.attrmap clients.conf huntgroups sql.conf sqlippool.conf \
sites-available/inner-tunnel sites-available/example \
sites-available/buffered-sql sites-available/default \
sites-available/vmps sites-available/README \
sites-available/proxy-inner-tunnel \
sites-available/copy-acct-to-home-server attrs.pre-proxy \
sites-available/dhcp sites-available/robust-proxy-accounting \
sites-available/virtual.example.com sql/mysql/admin.sql \
eap.conf attrs.accounting_response hints attrs.access_reject \
templates.conf attrs proxy.conf dictionary
EGDIRS= certs certs/demoCA sql sql/mssql sql/mysql sql/oracle \
sql/postgresql sites-available
.for f in ${EGFILES}
CONF_FILES_PERMS+= ${EGDIR}/${f} ${PKG_SYSCONFDIR}/${f} \
${RADIUS_USER} ${RADIUS_GROUP} 0640
.endfor
.include "../../security/openssl/buildlink3.mk"
.include "../../devel/libltdl/buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
.if defined(PTHREAD_TYPE) && ${PTHREAD_TYPE} == "none"
CONFIGURE_ARGS+= --without-threads
.endif
.if defined(PTHREAD_TYPE) && ${PTHREAD_TYPE} == "pth"
.include "../../devel/pthread-sem/buildlink3.mk"
SUBST_SED.make+= -e 's|@ldap_ldflags@|@ldap_ldflags@ \
${PTHREAD_LDFLAGS:M*:Q} ${PTHREAD_LIBS:M*:Q} -lsemaphore|g'
.endif
.if defined(PTHREAD_TYPE) && ${PTHREAD_TYPE} == "native"
SUBST_SED.make+= -e 's|@ldap_ldflags@|@ldap_ldflags@ \
${PTHREAD_LDFLAGS:M*:Q} ${PTHREAD_LIBS:M*:Q}|g'
.endif
.if ${MACHINE_ARCH} == "amd64"
CFLAGS+= -fPIC
.endif
post-build:
${CP} ${PKGDIR}/PLIST ${WRKDIR}/.PLIST_SRC
${CP} ${PKGDIR:Q}/MESSAGE ${WRKDIR:Q}/.MESSAGE_SRC
. if !empty(PKG_OPTIONS:Mpam)
${CP} ${PKGDIR}/MESSAGE.pam ${WRKDIR}/.MESSAGE_SRC.pam
. endif
post-install:
${INSTALL_DATA_DIR} ${EGDIR}
. for d in ${EGDIRS}
${INSTALL_DATA_DIR} ${EGDIR}/${d}
. endfor
. for f in ${EGFILES}
${INSTALL_DATA} ${WRKSRC}/raddb/${f} ${EGDIR}/${f}
. endfor
${INSTALL_DATA} ${WRKSRC}/src/modules/rlm_perl/example.pl ${EGDIR}
. for d in ${EGDIRS}
${MKDIR} ${PKG_SYSCONFDIR}/${d}
. endfor
${CHOWN} ${RADIUS_USER}:${RADIUS_GROUP} ${PKG_SYSCONFDIR}/certs
${CHOWN} ${RADIUS_USER}:${RADIUS_GROUP} ${PKG_SYSCONFDIR}/certs/demoCA
${CHMOD} 0750 ${PKG_SYSCONFDIR}/certs
${CHMOD} 0750 ${PKG_SYSCONFDIR}/certs/demoCA
.include "../../mk/bsd.pkg.mk"