ports/147188: [maintainer update] Update net/freeradis2 to 2.1.9

Ryan Steinmetz rpsfa at rit.edu
Sat May 29 14:00:13 UTC 2010


>Number:         147188
>Category:       ports
>Synopsis:       [maintainer update] Update net/freeradis2 to 2.1.9
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 29 14:00:12 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Ryan Steinmetz
>Release:        7.3-R
>Organization:
Rochester Institute of Technology
>Environment:
FreeBSD xxx.rit.edu 7.3-RELEASE FreeBSD 7.3-RELEASE #12: Sat Apr  3 10:37:02 EDT 2010     root at xxx.rit.edu:/usr/obj/usr/src/sys/xxx  i386
>Description:
-Use USERS= and GROUPS= instead of pkg-install.in script.
-Use USE_GMAKE=yes instead of RUN_DEPEND=gmake:${PORTSDIR}/devel/gmake

-Update net/freeradius2 to 2.1.9:

Feature improvements

    * Add radmin command "stats detail " to see what is going on inside of a detail file reader.
    * Added documentation for CoA. See raddb/sites-available/coa
    * Add sub-option support for Option 82. See dictionary.dhcp
    * Add "server" field to default SQL NAS table, and documented it.

Bug fixes

    * Reset "received ping" counter for Status-Server checks. In some corner cases it was not getting reset.
    * Handle large VMPS attributes.
    * Count accounting responses from a home server in SNMP / statistics code.
    * Set EAP-Session-Resumed = Yes, not "No" when session is resumed.
    * radmin packet counter statistics are now unsigned, for numbers 2^31..2^32. After that they roll over to zero.
    * Be more careful about expanding data in PAP and MS-CHAP modules. This prevents login failures when passwords contain '{'.
    * Clean up zombie children if there were many "exec" modules being run for one packet, all with "wait = no".
    * re-open log file after HUP. Closes bug #63.
    * Fix "no response to proxied packet" complaint for Coa / Disconnect packets. It shouldn't ignore replies to packets it sent.
    * Calculate IPv6 netmasks correctly. Closes bug #69.
    * Fix SQL module to re-open sockets if they unexpectedly close.
    * Track scope for IPv6 addresses. This lets us use link-local addresses properly. Closes bug #70.
    * Updated Makefiles to no longer use the shell for recursing into subdirs. "make -j 2" should now work.
    * Updated raddb/sql/mysql/ippool.conf to use "= NULL". Closes bug #75.
    * Updated Makefiles so that "make reconfig" no longer uses the shell for recursing into subdirs, and re-builds all "configure" files.
    * Used above method to regenerate all configure scripts. Closes bug #34.
    * Updated SQL module to allow "server" field of "nas" table to be blank: "". This means the same as it being NULL.
    * Fixed regex realm example. Create Realm attribute with value of realm from User-Name, not from regex. Closes bug #40.
    * If processing a DHCP Discover returns "fail / reject", ignore the packet rather than sending a NAK.
    * Allow '%' to be escaped in sqlcounter module.
    * Fix typo internal hash table.
    * For PEAP and TTLS, the tunneled reply is added to the reply, rather than integrated via the operators. This allows multiple VSAs to be added, where they would previously be discarded.
    * Make request number unsigned. This changes nothing other than the debug output when the server receives more than 2^31 packets.
    * Don't block when reading child output in 'exec wait'. This means that blocked children get killed, instead of blocking the server.
    * Enabled building without any proxy functionality
    * radclient now prefers IPv4, to match the default server config.
    * Print useful error when a realm regex is invalid
    * relaxed rules for preprocess module "with_cisco_vsa_hack". The attributes can now be integer, ipaddr, etc. (i.e. non-string)
    * Allow rlm_ldap to build if ldap_set_rebind_proc() has only 2 arguments.
    * Update configure script for rlm_python to avoid dynamic linking problems on some platforms.
    * Work-around for bug #35
    * Do suid to "user" when running in debug mode as root
    * Make "allow_core_dumps" work in more situations.
    * In detail file reader, treat bad records as EOF. This allows it to continue working when the disk is full.
    * Fix Oracle default accounting queries to work when there are no gigawords attributes. Other databases already had the fix.
    * Fix rlm_sql to show when it opens and closes sockets. It already says when it cannot connect, so it should say when it can connect.
    * "chmod -x" for a few C source files.
    * Pull update spec files, etc. from RedHat into the redhat/ directory.
    * Allow spaces when parsing integer values. This helps people who put "too much" into an SQL value field.


>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff -urN /usr/ports/net/freeradius2/Makefile freeradius2/Makefile
--- /usr/ports/net/freeradius2/Makefile	2010-03-27 15:33:51.000000000 -0400
+++ freeradius2/Makefile	2010-05-29 09:50:18.000000000 -0400
@@ -8,8 +8,7 @@
 #
 
 PORTNAME=	freeradius
-DISTVERSION=	2.1.8
-PORTREVISION=	1
+DISTVERSION=	2.1.9
 CATEGORIES=	net
 MASTER_SITES=	ftp://ftp.freeradius.org/pub/freeradius/%SUBDIR%/ \
 		ftp://ftp.ntua.gr/pub/net/radius/freeradius/%SUBDIR%/ \
@@ -22,9 +21,10 @@
 MAINTAINER=	rpsfa at rit.edu
 COMMENT=	A free RADIUS server implementation
 
-RUN_DEPENDS=	gmake:${PORTSDIR}/devel/gmake
 LIB_DEPENDS=	gdbm.3:${PORTSDIR}/databases/gdbm
 
+USE_GMAKE=	yes
+
 USE_BZIP2=	yes
 
 LOGDIR?=	/var/log
@@ -68,6 +68,13 @@
 SUB_LIST+=	RUN_AS_USER="no"
 .endif
 
+# User and group to use if USER option is chosen
+RADIUS_USER=	freeradius
+RADIUS_GROUP=	freeradius
+
+USERS=		${RADIUS_USER}
+GROUPS=		${RADIUS_GROUP}
+
 .if defined(WITH_HEIMDAL) && !defined(WITH_KERBEROS)
 WITH_KERBEROS=	yes
 .endif
@@ -207,7 +214,7 @@
 
 # Oracle support is experimental under FreeBSD
 .ifdef(WITH_OCI8)
-EXTRA_PATCHES+=	files/extra-patch-exec.c
+EXTRA_PATCHES+=	${FILESDIR}/extra-patch-exec.c
 CONFIGURE_ENV=	ORACLE_HOME="${ORACLE_HOME}"
 ORACLE_HOME?=	${LOCALBASE}/oracle8-client
 BUILD_DEPENDS+=	${ORACLE_HOME}/lib/libclntst8.a:${PORTSDIR}/databases/oracle8-client
@@ -237,10 +244,6 @@
 BROKEN=		Does not build on sparc64-6
 .endif
 
-# User and group to use if USER option is chosen
-USER=	freeradius
-GROUP=	freeradius
-
 FREERADIUS_LIBDIR=	lib/freeradius-${PORTVERSION}
 PLIST_SUB+=	LIBDIR="${FREERADIUS_LIBDIR}"
 USE_LDCONFIG=	${PREFIX}/${FREERADIUS_LIBDIR}
@@ -280,31 +283,8 @@
 CONFIGURE_ARGS+=	--with-pic
 .endif
 
-# Credentials for WITH_USER are RADIUS_USER, RADIUS_UID, RADIUS_GECOS,
-# RADIUS_HOME, RADIUS_SHELL, RADIUS_GROUP and RADIUS_GID.
-
-# Parse ${PORTSDIR}/UIDs and GIDs for the defaults
-USERCREDS!=	${GREP} -E '^${USER}:' ${PORTSDIR}/UIDs | \
-		${SED} -Ee 's/^([^:]*):([^:]*):([^:]*):([^:]*)::0:0:([^:]*):([^:]*):([^:]*)$$/USER="\1" UID="\3" GECOS="\5" HOME="\6" SHELL="\7"/'
-GROUPCREDS!=	${GREP} -E '^${GROUP}:' ${PORTSDIR}/GIDs | \
-		${SED} -Ee 's/^([^:]*):([^:]*):([^:]*):$$/GROUP="\1" GID="\3"/'
-
-# Apply the defaults where necessary
-RADIUS_USER?=	${USERCREDS:MUSER*:C/^[^=]*=\"([^\"]*)\"$/\1/}
-RADIUS_UID?=	${USERCREDS:MUID*:C/^[^=]*=\"([^\"]*)\"$/\1/}
-RADIUS_GECOS?=	${USERCREDS:MGECOS*:C/^[^=]*=\"([^\"]*)\"$/\1/}
-RADIUS_HOME?=	${USERCREDS:MHOME*:C/^[^=]*=\"([^\"]*)\"$/\1/}
-RADIUS_SHELL?=	${USERCREDS:MSHELL*:C/^[^=]*=\"([^\"]*)\"$/\1/}
-RADIUS_GROUP?=	${GROUPCREDS:MGROUP*:C/^[^=]*=\"([^\"]*)\"$/\1/}
-RADIUS_GID?=	${GROUPCREDS:MGID*:C/^[^=]*=\"([^\"]*)\"$/\1/}
-
-SUB_LIST+=	USER="${RADIUS_USER}" \
-		UID="${RADIUS_UID}" \
-		GECOS="${RADIUS_GECOS}" \
-		HOME="${RADIUS_HOME}" \
-		SHELL="${RADIUS_SHELL}" \
-		GROUP="${RADIUS_GROUP}" \
-		GID="${RADIUS_GID}" \
+SUB_LIST+=	RADIUS_USER="${RADIUS_USER}" \
+		RADIUS_GROUP="${RADIUS_GROUP}" \
 		RADDB_WORK="${WRKSRC}/raddb" \
 		RADDB="${PREFIX}/etc/raddb" \
 		LOGDIR="${LOGDIR}" \
diff -urN /usr/ports/net/freeradius2/Makefile~ freeradius2/Makefile~
--- /usr/ports/net/freeradius2/Makefile~	1969-12-31 19:00:00.000000000 -0500
+++ freeradius2/Makefile~	2010-05-27 18:00:56.000000000 -0400
@@ -0,0 +1,378 @@
+# New ports collection makefile for:    freeradius
+# Date created:         May 9 2002
+# Whom:                 Brian Somers <brian at FreeBSD.org>
+#
+# $FreeBSD: ports/net/freeradius2/Makefile,v 1.85 2010/03/27 19:33:51 dougb Exp $
+#
+# $Id$
+#
+
+PORTNAME=	freeradius
+DISTVERSION=	2.1.9
+CATEGORIES=	net
+MASTER_SITES=	ftp://ftp.freeradius.org/pub/freeradius/%SUBDIR%/ \
+		ftp://ftp.ntua.gr/pub/net/radius/freeradius/%SUBDIR%/ \
+		ftp://ftp.uk.freeradius.org/pub/radius/%SUBDIR%/ \
+		http://ftp.cc.uoc.gr/mirrors/ftp.freeradius.org/%SUBDIR%/ \
+		http://freeradius.portal-to-web.de/%SUBDIR%/
+MASTER_SITE_SUBDIR=	. old
+DISTNAME=	freeradius-server-${DISTVERSION}
+
+MAINTAINER=	rpsfa at rit.edu
+COMMENT=	A free RADIUS server implementation
+
+LIB_DEPENDS=	gdbm.3:${PORTSDIR}/databases/gdbm
+
+USE_GMAKE=	yes
+#RUN_DEPENDS=	gmake:${PORTSDIR}/devel/gmake
+
+USE_BZIP2=	yes
+
+LOGDIR?=	/var/log
+
+CONFLICTS=	gnu-radius-[0-9].* openradius-[0-9].* radiusd-cistron-[0-9].* \
+		freeradius-mysql-[0-9].* freeradius-[013-9].*
+
+USE_RC_SUBR=	radiusd.sh
+USE_AUTOTOOLS=	libltdl:22 libtool:22 autoconf:262
+USE_GMAKE=	yes
+USE_OPENSSL=	yes
+MAKE_ARGS+=	LDFLAGS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}"
+CFLAGS+=	-I${LOCALBASE}/include -L${LOCALBASE}/lib
+MAKE_JOBS_UNSAFE=	yes
+
+PLIST_SUB=	PORTVERSION=${DISTVERSION}
+
+OPTIONS=	USER		"Run as user freeradius, group freeradius" on \
+		KERBEROS	"With Kerberos support" off \
+		HEIMDAL		"With Heimdal Kerberos support" off \
+		LDAP		"With LDAP database support" off \
+		MYSQL		"With MySQL database support" off \
+		PGSQL		"With PostgreSQL database support" off \
+		UNIXODBC	"With unixODBC database support" off \
+		FIREBIRD	"With Firebird database support (EXPERIMENTAL)" off \
+		PERL		"With Perl support" on \
+		PYTHON		"With Python support" on \
+		OCI8		"With Oracle support (currently experimental)" off \
+		RUBY		"With Ruby support (EXPERIMENTAL)" off \
+		DHCP		"With DHCP support (EXPERIMENTAL)" off \
+		EXPERIMENTAL	"Build experimental modules" off
+
+.include <bsd.port.options.mk>
+
+# Default requirements for rc script
+_REQUIRE=	NETWORKING SERVERS
+
+.ifdef(WITH_USER)
+SUB_LIST+=	RUN_AS_USER="yes"
+.else
+SUB_LIST+=	RUN_AS_USER="no"
+.endif
+
+# User and group to use if USER option is chosen
+RADIUS_USER=	freeradius
+RADIUS_GROUP=	freeradius
+
+USERS=		${RADIUS_USER}
+GROUPS=		${RADIUS_GROUP}
+
+.if defined(WITH_HEIMDAL) && !defined(WITH_KERBEROS)
+WITH_KERBEROS=	yes
+.endif
+
+.ifdef(WITH_KERBEROS)
+.ifdef(WITH_HEIMDAL)
+LIB_DEPENDS+=	krb5.23:${PORTSDIR}/security/heimdal
+CONFIGURE_ARGS+=--enable-heimdal-krb5
+.else
+LIB_DEPENDS+=	krb5.3:${PORTSDIR}/security/krb5
+.endif
+CONFIGURE_ARGS+=--with-rlm_krb5
+CONFIGURE_ARGS+=--with-rlm-krb5-lib-dir=${LOCALBASE}/lib
+CONFIGURE_ARGS+=--with-rlm-krb5-include-dir=${LOCALBASE}/include
+PLIST_SUB+=	KRB5=""
+.else
+CONFIGURE_ARGS+=--without-rlm_krb5
+PLIST_SUB+=	KRB5="@comment "
+.endif
+
+.ifdef(WITH_LDAP)
+USE_OPENLDAP=	YES
+CONFIGURE_ARGS+=--with-rlm_ldap
+PLIST_SUB+=	LDAP=""
+_REQUIRE+=	slapd
+.else
+CONFIGURE_ARGS+=--without-rlm_ldap
+PLIST_SUB+=	LDAP="@comment "
+.endif
+
+.ifdef(WITH_MYSQL)
+USE_MYSQL=	YES
+CONFIGURE_ARGS+=--with-rlm_sql_mysql
+PLIST_SUB+=	MYSQL=""
+_REQUIRE+=	mysql
+.else
+CONFIGURE_ARGS+=--without-rlm_sql_mysql
+PLIST_SUB+=	MYSQL="@comment "
+.endif
+
+.ifdef(WITH_PGSQL)
+USE_PGSQL=	YES
+CONFIGURE_ARGS+=--with-rlm_sql_postgresql
+PLIST_SUB+=	PGSQL=""
+_REQUIRE+=	postgresql
+.else
+CONFIGURE_ARGS+=--without-rlm_sql_postgresql
+PLIST_SUB+=	PGSQL="@comment "
+.endif
+
+.ifdef(WITH_UNIXODBC)
+CONFIGURE_ARGS+=--with-rlm_sql_unixodbc
+PLIST_SUB+=	UNIXODBC=""
+LIB_DEPENDS+=	odbc.1:${PORTSDIR}/databases/unixODBC
+.else
+CONFIGURE_ARGS+=--without-rlm_sql_unixodbc
+PLIST_SUB+=	UNIXODBC="@comment "
+.endif
+
+.ifdef(WITH_FIREBIRD)
+USE_FIREBIRD=	YES
+CONFIGURE_ARGS+=--with-rlm_sql_firebird
+PLIST_SUB+=	FIREBIRD=""
+.else
+CONFIGURE_ARGS+=--without-rlm_sql_firebird
+PLIST_SUB+=	FIREBIRD="@comment "
+.endif
+
+# Firebird module is still experimental
+.if defined(WITH_FIREBIRD) && !defined(WITH_EXPERIMENTAL)
+WITH_EXPERIMENTAL=	yes
+.endif
+
+.ifdef(WITH_PERL)
+USE_PERL5=	yes
+CONFIGURE_ARGS+=--with-rlm_perl
+PLIST_SUB+=	RLMPERL=""
+# temporary workaround for libtool issue until FR 2.2.x is released
+CFLAGS+=	-DHAVE_LT_DLADVISE_INIT
+.else
+CONFIGURE_ARGS+=--without-perl --without-rlm_perl
+PLIST_SUB+=	RLMPERL="@comment "
+.endif
+
+.ifdef(WITH_PYTHON)
+USE_PYTHON=	yes
+CONFIGURE_ARGS+=--with-rlm_python \
+		--with-rlm-python-lib-dir=${PYTHON_LIBDIR} \
+		--with-rlm-python-include-dir=${PYTHON_INCLUDEDIR}
+PLIST_SUB+=	RLMPYTHON=""
+.else
+CONFIGURE_ARGS+=--without-rlm_python
+PLIST_SUB+=	RLMPYTHON="@comment "
+.endif
+
+.ifdef(WITH_RUBY)
+USE_RUBY=	yes
+CONFIGURE_ARGS+=--with-rlm_ruby
+PLIST_SUB+=	RLMRUBY=""
+.else
+CONFIGURE_ARGS+=--without-rlm_ruby
+PLIST_SUB+=	RLMRUBY="@comment "
+.endif
+
+# rlm_ruby module is still experimental
+.if defined(WITH_RUBY) && !defined(WITH_EXPERIMENTAL)
+WITH_EXPERIMENTAL=	yes
+.endif
+
+.ifdef(WITH_DHCP)
+CONFIGURE_ARGS+=--with-dhcp
+.else
+CONFIGURE_ARGS+=--without-dhcp
+.endif
+
+# DHCP is still experimental
+.if defined(WITH_DHCP) && !defined(WITH_EXPERIMENTAL)
+WITH_EXPERIMENTAL=	yes
+.endif
+
+# No SMB option yet; rlm_smb is still unbuildable
+.ifdef(WITH_SMB)
+LIB_DEPENDS=	smbclient.0:${PORTSDIR}/net/samba-libsmbclient
+CONFIGURE_ARGS+=--with-rlm_smb
+CONFIGURE_ARGS+=--with-rlm-smb-lib-dir=${LOCALBASE}/lib
+CONFIGURE_ARGS+=--with-rlm-smb-include-dir=${LOCALBASE}/include
+PLIST_SUB+=	SMB=""
+.else
+CONFIGURE_ARGS+=--without-rlm_smb
+PLIST_SUB+=	SMB="@comment "
+.endif
+
+# SMB module is still experimental
+.if defined(WITH_SMB) && !defined(WITH_EXPERIMENTAL)
+WITH_EXPERIMENTAL=	yes
+.endif
+
+# Oracle support is experimental under FreeBSD
+.ifdef(WITH_OCI8)
+EXTRA_PATCHES+=	${FILESDIR}/extra-patch-exec.c
+CONFIGURE_ENV=	ORACLE_HOME="${ORACLE_HOME}"
+ORACLE_HOME?=	${LOCALBASE}/oracle8-client
+BUILD_DEPENDS+=	${ORACLE_HOME}/lib/libclntst8.a:${PORTSDIR}/databases/oracle8-client
+CONFIGURE_ARGS+=--with-oracle-home-dir=${ORACLE_HOME}/rdbms/demo
+PLIST_SUB+=	OCI8=""
+.else
+CONFIGURE_ARGS+=--without-rlm_sql_oracle
+PLIST_SUB+=	OCI8="@comment "
+.endif
+
+.ifdef(WITH_EXPERIMENTAL)
+CONFIGURE_ARGS+=--with-experimental-modules
+PLIST_SUB+=	EXPM=""
+.else
+PLIST_SUB+=	EXPM="@comment "
+.endif
+
+.ifdef(WITH_DEVELOPER)
+CONFIGURE_ARGS+=--enable-developer
+# Turn off compiler optimisations
+CFLAGS!=	${ECHO} ${CFLAGS} | ${SED} -Ee 's:-O[0-9]?[[:space:]]*::g'
+.endif
+
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == "sparc64" && ${OSVERSION} < 700000
+BROKEN=		Does not build on sparc64-6
+.endif
+
+FREERADIUS_LIBDIR=	lib/freeradius-${PORTVERSION}
+PLIST_SUB+=	LIBDIR="${FREERADIUS_LIBDIR}"
+USE_LDCONFIG=	${PREFIX}/${FREERADIUS_LIBDIR}
+
+CONFIGURE_ARGS+=--quiet \
+		--prefix=${PREFIX} \
+		--libdir=${PREFIX}/${FREERADIUS_LIBDIR} \
+		--localstatedir=/var \
+		--with-system-libtool
+.ifdef(NOPORTDOCS)
+CONFIGURE_ARGS+=--without-docdir
+PLIST_SUB+=	PORTDOCS="@comment "
+SUB_LIST+=	PORTDOCS="@comment "
+.else
+CONFIGURE_ARGS+=--with-docdir=${DOCSDIR}
+PLIST_SUB+=	PORTDOCS=""
+SUB_LIST+=	PORTDOCS=""
+.endif
+CONFIGURE_ARGS+=--with-logdir=${LOGDIR} \
+		--with-openssl-includes=${OPENSSLINC}
+# This conditionality avoids -L/usr/lib in the radiusd build step when
+# building with base system OpenSSL
+.if ${OPENSSLLIB} != "/usr/lib"
+CONFIGURE_ARGS+=--with-openssl-libraries=${OPENSSLLIB}
+.endif
+CONFIGURE_ARGS+=--without-rlm_eap_ikev2 \
+		--without-rlm_eap_tnc \
+		--without-rlm_eap2 \
+		--without-rlm_opendirectory \
+		--without-rlm_sql_db2 \
+		--without-rlm_sql_iodbc \
+		--without-rlm_sql_sqlite \
+		--without-rlm_sql_sybase \
+		--with-vmps
+
+.if ${ARCH} == amd64
+CONFIGURE_ARGS+=	--with-pic
+.endif
+
+SUB_LIST+=	RADIUS_USER="${RADIUS_USER}" \
+		RADIUS_GROUP="${RADIUS_GROUP}" \
+		RADDB_WORK="${WRKSRC}/raddb" \
+		RADDB="${PREFIX}/etc/raddb" \
+		LOGDIR="${LOGDIR}" \
+		LIBDIR="${PREFIX}/${FREERADIUS_LIBDIR}"
+SUB_FILES+=	pkg-install pkg-deinstall pkg-message
+
+MAN1=		radclient.1 radeapclient.1 radlast.1 radtest.1 radwho.1 \
+		radzap.1
+MAN5=		acct_users.5 clients.conf.5 dictionary.5 radiusd.conf.5 \
+		radrelay.conf.5 rlm_acct_unique.5 rlm_always.5 \
+		rlm_attr_filter.5 rlm_attr_rewrite.5 rlm_chap.5 rlm_counter.5 \
+		rlm_detail.5 rlm_digest.5 rlm_expr.5 rlm_files.5 rlm_mschap.5 \
+		rlm_pap.5 rlm_passwd.5 rlm_policy.5 rlm_realm.5 rlm_sql.5 \
+		rlm_sql_log.5 rlm_unix.5 unlang.5 users.5
+MAN8=		radiusd.8 radmin.8 raddebug.8 radrelay.8 radsqlrelay.8 \
+		radwatch.8 rlm_ippool_tool.8
+
+SUB_LIST+=	REQUIRE="${_REQUIRE}"
+
+post-patch:
+# Patch Makefile / Makefile.in throughout the source tree to install raddb
+# contents in ${EXAMPLESDIR}/raddb rather than the raddbdir from configure
+	@${FIND} -E ${WRKSRC} -regex '.*/Makefile(\.in)?$$' -exec \
+		${REINPLACE_CMD} -e "s:\$$(R)\$$(raddbdir):${EXAMPLESDIR}/raddb:g" {} \;
+# Clean up after the last operation (so as not to get unwanted files when installing doc/)
+	@${FIND} -E ${WRKSRC} -regex '.*/Makefile(\.in)?\.(orig|bak)$$' -delete
+# Patch raddb/certs/bootstrap to use gmake instead of make
+	@${REINPLACE_CMD} -Ee "s:^make:${GMAKE}:" \
+		${WRKSRC}/raddb/certs/bootstrap
+# Patch raddb/certs/Makefile for the full path to the openssl binary (using
+# ports OpenSSL if installed)
+	@${REINPLACE_CMD} -E \
+		-e "s:^([[:space:]])+openssl:\1${OPENSSLBASE}/bin/openssl:g" \
+		${WRKSRC}/raddb/certs/Makefile
+# Clean up after the last two operations (so as not to get unwanted files in
+# raddb)
+	@${FIND} -E ${WRKSRC}/raddb/certs \
+		-regex '.*/(bootstrap|Makefile)\.(orig|bak)$$' \
+		-delete
+# If DHCPis enabled, enable the DHCP dictionary
+.ifdef(WITH_DHCP)
+	@${REINPLACE_CMD} -Ee 's:^#(.+ dictionary\.dhcp)$$:\1:g' \
+		${WRKSRC}/share/dictionary
+# Clean up (so as not to get an unwanted file in share)
+	@${FIND} -E ${WRKSRC}/share \
+		-regex '.*/dictionary\.(orig|bak)$$' \
+		-delete
+.endif
+# Patch scripts/Makefile not to install (unnecessary) rc.radiusd
+	@${REINPLACE_CMD} -Ee 's:^(.+rc\.radiusd.+)$$:#\1:g' \
+		${WRKSRC}/scripts/Makefile
+
+pre-configure:
+# Replace -pthread with ${PTHREAD_LIBS} in configure(.in) files
+	@${FIND} -E ${WRKSRC} -regex '.*/configure(\.in)?$$' -exec \
+		${REINPLACE_CMD} -e "s:-pthread:${PTHREAD_LIBS}:g" {} \;
+# Force the rebuild of some configures from configure.in, as we're patching
+# the configure.in
+# NOTE: ${WRKSRC}/configure is rebuilt automatically once autoconf:262 is
+# added to USE_AUTOTOOLS
+	@cd ${WRKSRC}/src/modules/rlm_ldap && ${AUTOCONF} -I ${WRKSRC}
+	@cd ${WRKSRC}/src/modules/rlm_sql/drivers/rlm_sql_mysql \
+		&& ${AUTOCONF} -I ${WRKSRC}
+	@cd ${WRKSRC}/src/modules/rlm_perl && ${AUTOCONF} -I ${WRKSRC}
+	@cd ${WRKSRC}/src/modules/rlm_python && ${AUTOCONF} -I ${WRKSRC}
+
+pre-install:
+# Run pkg-install PRE-INSTALL
+	@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} \
+		PRE-INSTALL
+
+post-install:
+# If ${PREFIX}/etc/raddb isn't a directory (or a symlink), make a copy
+# of ${EXAMPLESDIR}/raddb as ${PREFIX}/etc/raddb, then bootstrap the
+# certificates
+	@if ! [ -d ${PREFIX}/etc/raddb -o -L ${PREFIX}/etc/raddb ]; then \
+		${CP} -RP ${EXAMPLESDIR}/raddb ${PREFIX}/etc/raddb; \
+		${ECHO_MSG} '===> Bootstrapping default certificates, please wait...'; \
+		${PREFIX}/etc/raddb/certs/bootstrap >/dev/null 2>&1; \
+	fi
+# Set ${PREFIX}/etc/raddb and all the files and folders in it to g-w,o-rwx
+# (FreeRADIUS will probably complain if this is not done)
+	@${CHMOD} -R g-w,o-rwx ${PREFIX}/etc/raddb
+# Run pkg-install POST-INSTALL
+	@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} \
+		POST-INSTALL
+# Display the contents of pkg-message
+	@${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.post.mk>
diff -urN /usr/ports/net/freeradius2/distinfo freeradius2/distinfo
--- /usr/ports/net/freeradius2/distinfo	2010-02-02 09:40:27.000000000 -0500
+++ freeradius2/distinfo	2010-05-24 21:48:00.000000000 -0400
@@ -1,3 +1,3 @@
-MD5 (freeradius-server-2.1.8.tar.bz2) = d326525490bfba273471d77560471fcb
-SHA256 (freeradius-server-2.1.8.tar.bz2) = 9329607d8082f8d7197b7ebad23a83c5239fb129c68b9cab43a3752300708d22
-SIZE (freeradius-server-2.1.8.tar.bz2) = 2544696
+MD5 (freeradius-server-2.1.9.tar.bz2) = 5e16a0869acdf448b191c7e30f6507d8
+SHA256 (freeradius-server-2.1.9.tar.bz2) = b0b7c5fe334e826e2f643569485ce203520ecb1d058d42b8df2a94a73acb05b1
+SIZE (freeradius-server-2.1.9.tar.bz2) = 2524497
diff -urN /usr/ports/net/freeradius2/files/pkg-deinstall.in freeradius2/files/pkg-deinstall.in
--- /usr/ports/net/freeradius2/files/pkg-deinstall.in	2008-04-02 09:07:01.000000000 -0400
+++ freeradius2/files/pkg-deinstall.in	2010-05-27 17:54:37.000000000 -0400
@@ -9,15 +9,15 @@
 
 If you are not upgrading and don't intend to use
 FreeRADIUS any more then you may wish to delete
-the %%GROUP%% group, which can be done with the
+the %%RADIUS_GROUP%% group, which can be done with the
 following command:
 
-    # pw groupdel %%GROUP%%
+    # pw groupdel %%RADIUS_GROUP%%
 
-You may also wish to delete the %%USER%% user,
+You may also wish to delete the %%RADIUS_USER%% user,
 which can be done with the following command:
 
-    # pw userdel %%USER%%
+    # pw userdel %%RADIUS_USER%%
 EOMSG
         ;;
 esac
diff -urN /usr/ports/net/freeradius2/files/pkg-install.in freeradius2/files/pkg-install.in
--- /usr/ports/net/freeradius2/files/pkg-install.in	2009-09-18 07:18:09.000000000 -0400
+++ freeradius2/files/pkg-install.in	2010-05-27 17:54:49.000000000 -0400
@@ -3,14 +3,8 @@
 
 PATH=/usr/sbin:/usr/bin:/bin ; export PATH
 
-radius_user="%%USER%%"
-radius_uid="%%UID%%"
-radius_gecos="%%GECOS%%"
-radius_home="%%HOME%%"
-radius_shell="%%SHELL%%"
-
-radius_group="%%GROUP%%"
-radius_gid="%%GID%%"
+radius_user="%%RADIUS_USER%%"
+radius_group="%%RADIUS_GROUP%%"
 
 radius_raddb_work="%%RADDB_WORK%%"
 radius_raddb="%%RADDB%%"
@@ -20,87 +14,10 @@
 radius_run_as_user="%%RUN_AS_USER%%"
 
 
-create_group() {
-    local user uid group gid gecos home shell
-
-    user=$1
-    uid=$2
-    group=$3
-    gid=$4
-    gecos=$5
-    home=$6
-    shell=$7
-
-
-    if pw group show -n $group >/dev/null 2>&1 ; then
-        echo "===> Using existing group $group"
-    else
-        if pw groupadd -n $group -g $gid ; then
-            echo "===> Created group $group"
-        else
-            cat <<-EOERRORMSG
-*** Failed to create group $group.
-
-Please add user $user and group $group
-manually with the following commands:
-
-    pw groupadd -n $group -g $gid
-    pw useradd -n $user -u $uid -g $group -c "$gecos" \\
-        -d $home -s $shell -h -
-
-and retry installing this package.
-EOERRORMSG
-            exit 1
-        fi
-    fi
-
-}
-
-
-create_user() {
-    local user uid group gid gecos home shell
-
-    user=$1
-    uid=$2
-    group=$3
-    gid=$4
-    gecos=$5
-    home=$6
-    shell=$7
-
-    if pw user show -n $user >/dev/null 2>&1 ; then
-        echo "===> Using existing user $user"
-    else
-        if pw useradd -n $user -u $uid -g $group -c "$gecos" \
-            -d $home -s $shell -h - ; then
-            echo "===> Created user $user"
-        else
-            cat <<-EOERRORMSG
-*** Failed to create user $user.
-
-Please add user $user manually with the following command:
-
-    pw useradd -n $user -u $uid -g $group -c "$gecos" \\
-       -d $home -s $shell -h -
-
-and retry installing this package.
-EOERRORMSG
-            exit 1
-        fi
-    fi
-}
-
-
 if [ ${radius_run_as_user} != "yes" ]; then exit 0; fi
 
 case $2 in
     PRE-INSTALL)
-        # Create the radius user and group if they do not already exist
-        create_group $radius_user $radius_uid $radius_group $radius_gid \
-                     "$radius_gecos" $radius_home $radius_shell
-        create_user  $radius_user $radius_uid $radius_group $radius_gid \
-                     "$radius_gecos" $radius_home $radius_shell
-
         # Fix the user and group in raddb/radiusd.conf
 	echo "===> Setting user and group in radiusd.conf"
 	for file in ${radius_raddb_work}/radiusd.conf ${radius_raddb}/radiusd.conf; do
diff -urN /usr/ports/net/freeradius2/pkg-plist freeradius2/pkg-plist
--- /usr/ports/net/freeradius2/pkg-plist	2010-02-02 09:40:27.000000000 -0500
+++ freeradius2/pkg-plist	2010-05-24 22:08:22.000000000 -0400
@@ -85,6 +85,7 @@
 %%EXAMPLESDIR%%/raddb/radiusd.conf
 %%EXAMPLESDIR%%/raddb/sites-available/README
 %%EXAMPLESDIR%%/raddb/sites-available/buffered-sql
+%%EXAMPLESDIR%%/raddb/sites-available/coa
 %%EXAMPLESDIR%%/raddb/sites-available/control-socket
 %%EXAMPLESDIR%%/raddb/sites-available/copy-acct-to-home-server
 %%EXAMPLESDIR%%/raddb/sites-available/decoupled-accounting
@@ -749,6 +750,7 @@
 %%DATADIR%%/dictionary.vqp
 %%DATADIR%%/dictionary.walabi
 %%DATADIR%%/dictionary.waverider
+%%DATADIR%%/dictionary.wichorus
 %%DATADIR%%/dictionary.wimax
 %%DATADIR%%/dictionary.wispr
 %%DATADIR%%/dictionary.xedia


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list