ports/79945: [maintainer-update] updates to net/freeradius

Andrew Thompson andy at fud.org.nz
Fri Apr 15 04:50:18 UTC 2005


>Number:         79945
>Category:       ports
>Synopsis:       [maintainer-update] updates to net/freeradius
>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:   Fri Apr 15 04:50:17 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Andrew Thompson
>Release:        FreeBSD 6.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD veg.fud.org.nz 6.0-CURRENT FreeBSD 6.0-CURRENT #1: Sun Apr 10 08:59:56 NZST 2005 root at veg.fud.org.nz:/usr/obj/usr/src/sys/DEV i386



>Description:

1. Install sample SQL database schemas
2. Install config files as .sample to not clobber on upgrade
3. Add kerberos support

Submitted by: 	Andrey V. Elsukov [1]
		Denis Shaposhnikov [2]
		George C. Kaplan [3]


>How-To-Repeat:
>Fix:



diff -urN net/freeradius.orig/Makefile net/freeradius/Makefile
--- net/freeradius.orig/Makefile	Sun Apr 10 15:36:03 2005
+++ net/freeradius/Makefile	Fri Apr 15 16:32:09 2005
@@ -7,6 +7,7 @@
 
 PORTNAME=	freeradius
 PORTVERSION=	1.0.2
+PORTREVISION=	1
 CATEGORIES=	net
 MASTER_SITES=	ftp://ftp.freeradius.org/pub/radius/ \
 		ftp://ftp.Awfulhak.org/pub/radius/
@@ -33,11 +34,12 @@
 		--with-ltdl-lib=${LOCALBASE}/lib \
 		--with-large-files --without-rlm_sql_unixodbc \
 		--without-rlm_sql_oracle --without-rlm_sql_iodbc \
-		--without-rlm_sql_db2 --without-rlm_krb5
+		--without-rlm_sql_db2
 
 PLIST_SUB=	PORTVERSION=${PORTVERSION}
 
-OPTIONS=	LDAP		"With LDAP user database" off \
+OPTIONS=	KERBEROS	"With Kerberos support" off \
+		LDAP		"With LDAP user database" off \
 		MYSQL		"With MySQL user database" off \
 		PGSQL		"With PostgreSQL use database" off \
 		SNMP		"With SNMP support" off \
@@ -45,6 +47,16 @@
 
 .include <bsd.port.pre.mk>
 
+.ifdef(WITH_KERBEROS)
+LIB_DEPENDS+=	krb5.3:${PORTSDIR}/security/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
 PLIST_SUB+=	LDAP=""
@@ -129,10 +141,21 @@
 		< ${FILESDIR}/radiusd.sh > ${WRKDIR}/radiusd.sh
 
 post-install:
-	@${MKDIR} ${PREFIX}/etc/raddb ${DATADIR}
+	@${MKDIR} ${PREFIX}/etc/raddb ${DATADIR} ${EXAMPLESDIR}
 .for dict in ${DICTS}
 	${INSTALL_DATA} ${WRKSRC}/share/${dict} ${DATADIR}/${dict}
 .endfor
 	${INSTALL_SCRIPT} ${WRKDIR}/radiusd.sh ${PREFIX}/etc/rc.d/radiusd.sh
+.ifdef(WITH_MYSQL)
+	${INSTALL_DATA} \
+	${WRKSRC}/src/modules/rlm_sql/drivers/rlm_sql_mysql/db_mysql.sql \
+	${EXAMPLESDIR}/db_mysql.sql
+.endif                                                                                                                 
+
+.ifdef(WITH_PGSQL)
+	${INSTALL_DATA} \
+	${WRKSRC}/src/modules/rlm_sql/drivers/rlm_sql_postgresql/db_postgresql.sql \
+	${EXAMPLESDIR}/db_postgresql.sql
+.endif
 
 .include <bsd.port.post.mk>
diff -urN net/freeradius.orig/files/patch-raddb-Makefile net/freeradius/files/patch-raddb-Makefile
--- net/freeradius.orig/files/patch-raddb-Makefile	Thu Jan  1 12:00:00 1970
+++ net/freeradius/files/patch-raddb-Makefile	Thu Apr 14 21:37:10 2005
@@ -0,0 +1,44 @@
+--- raddb/Makefile.orig	Thu Apr 14 21:31:54 2005
++++ raddb/Makefile	Thu Apr 14 21:36:19 2005
+@@ -7,7 +7,7 @@
+ 	  experimental.conf hints huntgroups ldap.attrmap \
+ 	  mssql.conf naslist naspasswd oraclesql.conf postgresql.conf \
+ 	  preproxy_users proxy.conf radiusd.conf realms snmp.conf \
+-	  sql.conf users x99.conf x99passwd.sample
++	  sql.conf users x99.conf
+ 
+ all:
+ 
+@@ -15,26 +15,12 @@
+ 	$(INSTALL) -d -m 755	$(R)$(raddbdir)
+ 	@echo "Creating/updating files in $(R)$(raddbdir)"; \
+ 	for i in $(FILES); do \
+-		[ ! -f $(R)$(raddbdir)/$$i ] && $(INSTALL) -m 644 $$i $(R)$(raddbdir); \
+-		if [ "`find $$i -newer $(R)$(raddbdir)/$$i`" ]; then \
+-			echo "** $(R)$(raddbdir)/$$i"; \
+-			nt=1; \
+-		fi; \
+-	done; \
+-	if [ "$$nt" ]; then \
+-		echo "**";\
+-		echo "** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING **";\
+-		echo "** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING **";\
+-		echo "**";\
+-		echo "** The sample configuration files in `pwd`";\
+-		echo "** are newer than those in $(R)$(raddbdir)";\
+-		echo "**";\
+-		echo "** Please investigate and manually copy (if appropriate) the files listed above.";\
+-		echo "**";\
+-		echo "** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING **";\
+-		echo "** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING ** WARNING **";\
+-	fi
+-	chmod 640 $(R)$(raddbdir)/naspasswd $(R)$(raddbdir)/clients $(R)$(raddbdir)/clients.conf
++		$(INSTALL) -m 644 $$i $(R)$(raddbdir)/$$i.sample; \
++	done
++	$(INSTALL) -m 644 x99passwd.sample $(R)$(raddbdir)
++	chmod 640 $(R)$(raddbdir)/naspasswd.sample \
++		$(R)$(raddbdir)/clients.sample \
++		$(R)$(raddbdir)/clients.conf.sample
+ 	if [ ! -d $(R)$(raddbdir)/certs ]; then \
+ 		mkdir $(R)$(raddbdir)/certs; \
+ 		mkdir $(R)$(raddbdir)/certs/demoCA; \
diff -urN net/freeradius.orig/files/radiusd.sh net/freeradius/files/radiusd.sh
--- net/freeradius.orig/files/radiusd.sh	Sun Apr 10 15:36:03 2005
+++ net/freeradius/files/radiusd.sh	Thu Apr 14 21:39:55 2005
@@ -22,6 +22,7 @@
 pidfile=/var/run/radiusd/radiusd.pid
 
 radiusd_enable=${radiusd_enable:-"NO"}
+start_precmd="${radiusd_start_precmd}"
 
 load_rc_config $name
 run_rc_command "$1"
diff -urN net/freeradius.orig/pkg-plist net/freeradius/pkg-plist
--- net/freeradius.orig/pkg-plist	Sun Apr 10 15:36:03 2005
+++ net/freeradius/pkg-plist	Fri Apr 15 16:35:10 2005
@@ -29,30 +29,30 @@
 etc/raddb/certs/cert-clt.der
 etc/raddb/certs/root.pem
 etc/raddb/certs/README
-etc/raddb/acct_users
-etc/raddb/attrs
-etc/raddb/clients
-etc/raddb/clients.conf
-etc/raddb/dictionary
+etc/raddb/acct_users.sample
+etc/raddb/attrs.sample
+etc/raddb/clients.sample
+etc/raddb/clients.conf.sample
+etc/raddb/dictionary.sample
 %%EXPM%%etc/raddb/example.pl
-etc/raddb/experimental.conf
-etc/raddb/eap.conf
-etc/raddb/hints
-etc/raddb/huntgroups
-etc/raddb/ldap.attrmap
-etc/raddb/mssql.conf
-etc/raddb/naslist
-etc/raddb/naspasswd
-etc/raddb/oraclesql.conf
-etc/raddb/postgresql.conf
-etc/raddb/preproxy_users
-etc/raddb/proxy.conf
-etc/raddb/radiusd.conf
-etc/raddb/realms
-etc/raddb/snmp.conf
-etc/raddb/sql.conf
-etc/raddb/users
-etc/raddb/x99.conf
+etc/raddb/experimental.conf.sample
+etc/raddb/eap.conf.sample
+etc/raddb/hints.sample
+etc/raddb/huntgroups.sample
+etc/raddb/ldap.attrmap.sample
+etc/raddb/mssql.conf.sample
+etc/raddb/naslist.sample
+etc/raddb/naspasswd.sample
+etc/raddb/oraclesql.conf.sample
+etc/raddb/postgresql.conf.sample
+etc/raddb/preproxy_users.sample
+etc/raddb/proxy.conf.sample
+etc/raddb/radiusd.conf.sample
+etc/raddb/realms.sample
+etc/raddb/snmp.conf.sample
+etc/raddb/sql.conf.sample
+etc/raddb/users.sample
+etc/raddb/x99.conf.sample
 etc/raddb/x99passwd.sample
 etc/rc.d/radiusd.sh
 lib/libeap-%%PORTVERSION%%.la
@@ -195,6 +195,11 @@
 lib/rlm_ippool.a
 lib/rlm_ippool.la
 lib/rlm_ippool.so
+%%KRB5%%lib/rlm_krb5-%%PORTVERSION%%.la
+%%KRB5%%lib/rlm_krb5-%%PORTVERSION%%.so
+%%KRB5%%lib/rlm_krb5.a
+%%KRB5%%lib/rlm_krb5.la
+%%KRB5%%lib/rlm_krb5.so
 %%LDAP%%lib/rlm_ldap-%%PORTVERSION%%.la
 %%LDAP%%lib/rlm_ldap-%%PORTVERSION%%.so
 %%LDAP%%lib/rlm_ldap.a
@@ -425,14 +430,16 @@
 %%DATADIR%%/dictionary.versanet
 %%DATADIR%%/dictionary.wispr
 %%DATADIR%%/dictionary.xedia
+%%MYSQL%%%%EXAMPLESDIR%%/db_mysql.sql
+%%PGSQL%%%%EXAMPLESDIR%%/db_postgresql.sql
 @dirrm %%DATADIR%%
+ at dirrm %%EXAMPLESDIR%%
 %%PORTDOCS%%@dirrm %%DOCSDIR%%/rfc
 %%PORTDOCS%%@dirrm %%DOCSDIR%%
 @dirrm etc/raddb/certs/demoCA
 @dirrm etc/raddb/certs
 @exec mkdir -p /var/log/raddb
 @exec chmod -R og= /var/log/raddb
- at unexec rm -fr /var/log/raddb
 @exec mkdir -p /var/run/radiusd
 @unexec rm -fr /var/run/radiusd
 @unexec rmdir %D/etc/raddb 2> /dev/null || echo "You should remove %D/etc/raddb if you don't need it anymore."

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



More information about the freebsd-ports-bugs mailing list