Date: Tue, 27 Mar 2007 23:10:28 GMT From: David Wood<david@wood2.org.uk> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/110948: [maintainer update] update net/freeradius to 1.1.5, various enhancements Message-ID: <200703272310.l2RNASwa066372@www.freebsd.org> Resent-Message-ID: <200703272320.l2RNK2MX091303@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 110948 >Category: ports >Synopsis: [maintainer update] update net/freeradius to 1.1.5, various enhancements >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: Tue Mar 27 23:20:01 GMT 2007 >Closed-Date: >Last-Modified: >Originator: David Wood >Release: FreeBSD 6.2-RELEASE-p2 i386 >Organization: >Environment: FreeBSD titanium.wood2.org.uk 6.2-RELEASE-p2 FreeBSD 6.2-RELEASE-p2 #0: Thu Mar 1 01:27:35 GMT 2007 david@titanium.wood2.org.uk:/usr/obj/usr/src/sys/TITANIUM i386 >Description: Update to FreeRADIUS 1.1.5 Add support for freeradius-mysql slave port (requested by Marshall Dias <marshall@dias.ws> - slave port will be submitted in a separate PR). Committers - if you don't like the way I've implemented this, can you come up with a better way without breaking OPTIONS handling? Automagically configure the REQUIRE: line in radiusd.sh for dependencies on OpenLDAP (slapd), MySQL and PostgreSQL (requested by Mike Jakubik <mikej@rogers.com>) Remove various obsolete patches Install default configuration in ${EXAMPLESDIR}/raddb rather than in ${PREFIX}/etc/raddb with the files suffixed with .sample Add support for the Firebird database (though the underlying FreeRADIUS code might be broken until 1.1.6 is released) Tidied SQL configuration section of the Makefile NOTE: files/patch-raddb-Makefile is deleted. files/patch-Make.inc.in is deleted. Please add the following note to /usr/ports/UPDATING: AFFECTS: users of net/freeradius AUTHOR: David Wood <david@wood2.org.uk> >From this version, FreeRADIUS 1.1.5, the FreeBSD port installs the sample FreeRADIUS configuration in ${EXAMPLESDIR}/raddb (default /usr/local/share/examples/freeradius/raddb). These sample files are not suffixed with .sample as they used to be. The 'live' FreeRADIUS configuration stays in the same location - ${PREFIX}/etc/raddb (default /usr/local/etc/raddb). When you install the port, any files in the sample configuration that are not found in the live configuration folder are copied from the sample configuration to the live configuration folder. This includes the certs folder (unlike previous versions of the port). When you remove the port, all files in the live configuration folder that are identical to the corresponding file in the sample configuration are removed. Changed files are left untouched. Hopefully these changes make managing your FreeRADIUS configuration easier. >How-To-Repeat: >Fix: Patch attached with submission follows: Index: distinfo =================================================================== --- distinfo (.../tags/1.1.4_1-FreeBSD-20070123/freeradius) (revision 27) +++ distinfo (.../trunk/freeradius) (revision 27) @@ -1,3 +1,3 @@ -MD5 (freeradius-1.1.4.tar.gz) = 0027d4cf8882bbafee30755a16632c6a -SHA256 (freeradius-1.1.4.tar.gz) = 017fe27b59c8d16c61739cd8aec123150365f2885dfdf04d289bf3039f26f7e3 -SIZE (freeradius-1.1.4.tar.gz) = 3088835 +MD5 (freeradius-1.1.5.tar.bz2) = e90c7976a3dcd80368ff3ed2b768b3a4 +SHA256 (freeradius-1.1.5.tar.bz2) = 02afff2d76edff01d2d94dc62f1168d49746a158e16c257083d22e8440e7ee96 +SIZE (freeradius-1.1.5.tar.bz2) = 2028582 Index: files/patch-raddb-Makefile =================================================================== --- files/patch-raddb-Makefile (.../tags/1.1.4_1-FreeBSD-20070123/freeradius) (revision 27) +++ files/patch-raddb-Makefile (.../trunk/freeradius) (revision 27) @@ -1,34 +0,0 @@ ---- raddb/Makefile.orig Wed Jan 25 13:01:45 2006 -+++ raddb/Makefile Wed Jan 25 13:22:54 2006 -@@ -15,26 +15,11 @@ - $(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 -+ 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; \ Index: files/patch-Make.inc.in =================================================================== --- files/patch-Make.inc.in (.../tags/1.1.4_1-FreeBSD-20070123/freeradius) (revision 27) +++ files/patch-Make.inc.in (.../trunk/freeradius) (revision 27) @@ -1,11 +0,0 @@ ---- Make.inc.in.orig Mon Mar 27 15:03:38 2006 -+++ Make.inc.in Mon Mar 27 15:03:55 2006 -@@ -25,7 +25,7 @@ - CC = @CC@ - RANLIB = @RANLIB@ - INCLUDE = --CFLAGS = $(INCLUDE) @CFLAGS@ @LFS_CFLAGS@ -+CFLAGS = $(INCLUDE) @CFLAGS@ @CPPFLAGS@ @LFS_CFLAGS@ - CPPFLAGS = @CPPFLAGS@ - LIBPREFIX = @LIBPREFIX@ - EXEEXT = @EXEEXT@ Index: files/patch-src-main-Makefile.in =================================================================== --- files/patch-src-main-Makefile.in (.../tags/1.1.4_1-FreeBSD-20070123/freeradius) (revision 27) +++ files/patch-src-main-Makefile.in (.../trunk/freeradius) (revision 27) @@ -1,45 +1,14 @@ ---- src/main/Makefile.in.orig Mon Aug 21 13:47:46 2006 -+++ src/main/Makefile.in Fri Oct 27 12:18:50 2006 -@@ -19,6 +19,7 @@ - CFLAGS += -DHOSTINFO=\"${HOSTINFO}\" - CFLAGS += -DRADIUSD_VERSION=\"${RADIUSD_VERSION}\" - CFLAGS += $(SNMP_INCLUDE) -+LDFLAGS_MAIN = -L../lib $(LDFLAGS) - VFLAGS = -DRADIUSD_MAJOR_VERSION=$(RADIUSD_MAJOR_VERSION) - VFLAGS += -DRADIUSD_MINOR_VERSION=$(RADIUSD_MINOR_VERSION) - MODULE_LIBS = $(STATIC_MODULES) -@@ -60,9 +61,9 @@ +--- src/main/Makefile.in.orig Wed Feb 14 15:44:23 2007 ++++ src/main/Makefile.in Mon Mar 12 13:20:32 2007 +@@ -61,9 +61,9 @@ radiusd: $(SERVER_OBJS) $(MODULE_OBJS) ../lib/libradius.la $(LIBTOOL) --mode=link $(CC) -export-dynamic -dlopen self \ -- $(LDFLAGS) $(LINK_MODE) -o $@ $(SERVER_OBJS) \ -+ $(CFLAGS) $(LDFLAGS_MAIN) $(LINK_MODE) -o $@ $(SERVER_OBJS) \ +- $(LDFLAGS) -pie $(LINK_MODE) -o $@ $(SERVER_OBJS) \ ++ $(CFLAGS) $(LDFLAGS) -pie $(LINK_MODE) -o $@ $(SERVER_OBJS) \ $(MODULE_LIBS) $(LIBS) $(SNMP_LIBS) $(PTHREADLIB) \ -- $(LIBLTDL) -+ $(LIBLTDL) $(LCRYPT) + $(LIBLTDL) $(OPENSSL_LIBS) radiusd.lo: radiusd.c ../include/request_list.h ../include/modules.h ../include/modcall.h ../include/modpriv.h $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c radiusd.c -@@ -141,19 +142,19 @@ - $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c radclient.c - - radclient: radclient.lo ../lib/libradius.la -- $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(LINK_MODE) -o radclient radclient.lo $(LIBS) -+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS_MAIN) $(LINK_MODE) -o radclient radclient.lo $(LIBS) - - radrelay.lo: radrelay.c $(INCLUDES) - $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c radrelay.c - - radrelay: radrelay.lo util.lo nas.lo client.lo log.lo conffile.lo files.lo xlat.lo ../lib/libradius.la -- $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(LINK_MODE) -o radrelay radrelay.lo util.lo nas.lo client.lo log.lo conffile.lo files.lo xlat.lo $(LIBS) -+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS_MAIN) $(LINK_MODE) -o radrelay radrelay.lo util.lo nas.lo client.lo log.lo conffile.lo files.lo xlat.lo $(LIBS) - - radwho.lo: radwho.c $(INCLUDES) - $(LIBTOOL) --mode=compile $(CC) $(CFLAGS) -c radwho.c - - radwho: radwho.lo util.lo log.lo conffile.lo ../lib/libradius.la -- $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(LINK_MODE) -o radwho radwho.lo util.lo log.lo conffile.lo $(LIBS) -+ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS_MAIN) $(LINK_MODE) -o radwho radwho.lo util.lo log.lo conffile.lo $(LIBS) - - - clean: + Index: files/radiusd.sh.in =================================================================== --- files/radiusd.sh.in (.../tags/1.1.4_1-FreeBSD-20070123/freeradius) (revision 27) +++ files/radiusd.sh.in (.../trunk/freeradius) (revision 27) @@ -1,8 +1,7 @@ #!/bin/sh # PROVIDE: radiusd -# REQUIRE: NETWORKING SERVERS -# BEFORE: DAEMON +# REQUIRE: %%REQUIRE%% # KEYWORD: shutdown # Index: pkg-plist =================================================================== --- pkg-plist (.../tags/1.1.4_1-FreeBSD-20070123/freeradius) (revision 27) +++ pkg-plist (.../trunk/freeradius) (revision 27) @@ -12,52 +12,58 @@ bin/rlm_dbm_parser bin/rlm_ippool_tool bin/smbencrypt -@unexec for i in `find %D/etc/raddb -maxdepth 1 -regex '.*\.sample' -print | sed -e 's/\.sample//g'`; do if [ -f ${i} ]; then if cmp -s ${i}.sample ${i}; then rm -f ${i}; fi; fi; done -etc/raddb/acct_users.sample -etc/raddb/attrs.sample -etc/raddb/certs/README -etc/raddb/certs/cert-clt.der -etc/raddb/certs/cert-clt.p12 -etc/raddb/certs/cert-clt.pem -etc/raddb/certs/cert-srv.der -etc/raddb/certs/cert-srv.p12 -etc/raddb/certs/cert-srv.pem -etc/raddb/certs/demoCA/cacert.pem -etc/raddb/certs/demoCA/index.txt -etc/raddb/certs/demoCA/index.txt.old -etc/raddb/certs/demoCA/serial -etc/raddb/certs/demoCA/serial.old -etc/raddb/certs/dh -etc/raddb/certs/newcert.pem -etc/raddb/certs/newreq.pem -etc/raddb/certs/random -etc/raddb/certs/root.der -etc/raddb/certs/root.p12 -etc/raddb/certs/root.pem -etc/raddb/clients.conf.sample -etc/raddb/clients.sample -etc/raddb/dictionary.sample -etc/raddb/eap.conf.sample -etc/raddb/example.pl -etc/raddb/experimental.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/otp.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/sqlippool.conf.sample -etc/raddb/users.sample -@exec for i in `find %D/etc/raddb -maxdepth 1 -regex '.*\.sample' -print | sed -e 's/\.sample//g'`; do if [ ! -f ${i} ]; then cp -p ${i}.sample ${i}; fi; done +@unexec for i in `find %D/%%EXAMPLESDIR%%/raddb/ -type f -print | sed -e 's:^%D/%%EXAMPLESDIR%%/raddb/::g'`; do if [ -f %D/%%EXAMPLESDIR%%/raddb/${i} ]; then if cmp -s %D/%%EXAMPLESDIR%%/raddb/${i} %D/etc/raddb/${i}; then rm -f %D/etc/raddb/${i}; fi; fi; done +@unexec for i in `find -d %D/%%EXAMPLESDIR%%/raddb/ -type d -mindepth 1 -print | sed -e 's:^%D/%%EXAMPLESDIR%%/raddb/::g'`; do if [ -d %D/etc/raddb/${i} ]; then rmdir %D/etc/raddb/${i} 2>/dev/null || true; fi; done +%%EXAMPLESDIR%%/raddb/acct_users +%%EXAMPLESDIR%%/raddb/attrs +%%EXAMPLESDIR%%/raddb/certs/README +%%EXAMPLESDIR%%/raddb/certs/cert-clt.der +%%EXAMPLESDIR%%/raddb/certs/cert-clt.p12 +%%EXAMPLESDIR%%/raddb/certs/cert-clt.pem +%%EXAMPLESDIR%%/raddb/certs/cert-srv.der +%%EXAMPLESDIR%%/raddb/certs/cert-srv.p12 +%%EXAMPLESDIR%%/raddb/certs/cert-srv.pem +%%EXAMPLESDIR%%/raddb/certs/demoCA/cacert.pem +%%EXAMPLESDIR%%/raddb/certs/demoCA/index.txt +%%EXAMPLESDIR%%/raddb/certs/demoCA/index.txt.old +%%EXAMPLESDIR%%/raddb/certs/demoCA/serial +%%EXAMPLESDIR%%/raddb/certs/demoCA/serial.old +%%EXAMPLESDIR%%/raddb/certs/dh +%%EXAMPLESDIR%%/raddb/certs/newcert.pem +%%EXAMPLESDIR%%/raddb/certs/newreq.pem +%%EXAMPLESDIR%%/raddb/certs/random +%%EXAMPLESDIR%%/raddb/certs/root.der +%%EXAMPLESDIR%%/raddb/certs/root.p12 +%%EXAMPLESDIR%%/raddb/certs/root.pem +%%EXAMPLESDIR%%/raddb/clients.conf +%%EXAMPLESDIR%%/raddb/clients +%%EXAMPLESDIR%%/raddb/dictionary +%%EXAMPLESDIR%%/raddb/eap.conf +%%EXAMPLESDIR%%/raddb/example.pl +%%EXAMPLESDIR%%/raddb/experimental.conf +%%EXAMPLESDIR%%/raddb/hints +%%EXAMPLESDIR%%/raddb/huntgroups +%%EXAMPLESDIR%%/raddb/ldap.attrmap +%%EXAMPLESDIR%%/raddb/mssql.conf +%%EXAMPLESDIR%%/raddb/naslist +%%EXAMPLESDIR%%/raddb/naspasswd +%%EXAMPLESDIR%%/raddb/oraclesql.conf +%%EXAMPLESDIR%%/raddb/otp.conf +%%EXAMPLESDIR%%/raddb/postgresql.conf +%%EXAMPLESDIR%%/raddb/preproxy_users +%%EXAMPLESDIR%%/raddb/proxy.conf +%%EXAMPLESDIR%%/raddb/radiusd.conf +%%EXAMPLESDIR%%/raddb/realms +%%EXAMPLESDIR%%/raddb/snmp.conf +%%EXAMPLESDIR%%/raddb/sql.conf +%%EXAMPLESDIR%%/raddb/sqlippool.conf +%%EXAMPLESDIR%%/raddb/users +@exec for i in `find %D/%%EXAMPLESDIR%%/raddb/ -type d -mindepth 1 -print | sed -e 's:^%D/%%EXAMPLESDIR%%/raddb/::g'`; do if [ ! -d %D/etc/raddb/${i} ]; then mkdir -p %D/etc/raddb/${i}; fi; done +@exec for i in `find %D/%%EXAMPLESDIR%%/raddb/ -type f -print | sed -e 's:^%D/%%EXAMPLESDIR%%/raddb/::g'`; do if [ ! -f %D/etc/raddb/${i} ]; then cp -p %D/%%EXAMPLESDIR%%/raddb/${i} %D/etc/raddb/${i}; fi; done +@dirrm %%EXAMPLESDIR%%/raddb/certs/demoCA +@dirrm %%EXAMPLESDIR%%/raddb/certs +@dirrm %%EXAMPLESDIR%%/raddb +@dirrm %%EXAMPLESDIR%% lib/libeap-%%PORTVERSION%%.la lib/libeap-%%PORTVERSION%%.so lib/libeap.a @@ -278,6 +284,10 @@ lib/rlm_sql.a lib/rlm_sql.la lib/rlm_sql.so +%%FIREBIRD%%lib/rlm_sql_firebird-%%PORTVERSION%%.so +%%FIREBIRD%%lib/rlm_sql_firebird.a +%%FIREBIRD%%lib/rlm_sql_firebird.la +%%FIREBIRD%%lib/rlm_sql_firebird.so lib/rlm_sql_log-%%PORTVERSION%%.la lib/rlm_sql_log-%%PORTVERSION%%.so lib/rlm_sql_log.a @@ -296,6 +306,16 @@ lib/rlm_sqlcounter.a lib/rlm_sqlcounter.la lib/rlm_sqlcounter.so +%%EXPM%%lib/rlm_sqlhpwippool-%%PORTVERSION%%.la +%%EXPM%%lib/rlm_sqlhpwippool-%%PORTVERSION%%.so +%%EXPM%%lib/rlm_sqlhpwippool.a +%%EXPM%%lib/rlm_sqlhpwippool.la +%%EXPM%%lib/rlm_sqlhpwippool.so +%%EXPM%%lib/rlm_sqlippool-%%PORTVERSION%%.la +%%EXPM%%lib/rlm_sqlippool-%%PORTVERSION%%.so +%%EXPM%%lib/rlm_sqlippool.a +%%EXPM%%lib/rlm_sqlippool.la +%%EXPM%%lib/rlm_sqlippool.so lib/rlm_unix-%%PORTVERSION%%.la lib/rlm_unix-%%PORTVERSION%%.so lib/rlm_unix.a @@ -411,6 +431,7 @@ %%DATADIR%%/dictionary.aptis %%DATADIR%%/dictionary.aruba %%DATADIR%%/dictionary.ascend +%%DATADIR%%/dictionary.asn %%DATADIR%%/dictionary.avaya %%DATADIR%%/dictionary.bay %%DATADIR%%/dictionary.bintec @@ -498,11 +519,11 @@ %%PORTDOCS%%@dirrm %%DOCSDIR%%/rfc %%PORTDOCS%%@dirrm %%DOCSDIR%%/examples %%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 @exec mkdir -p /var/run/radiusd @unexec rm -fr /var/run/radiusd +@dirrmtry etc/raddb/certs/demoCA +@dirrmtry etc/raddb/certs @dirrmtry etc/raddb @unexec if [ -d %D/etc/raddb ]; then echo "You should remove %D/etc/raddb if you don't need it anymore."; fi Index: Makefile =================================================================== --- Makefile (.../tags/1.1.4_1-FreeBSD-20070123/freeradius) (revision 27) +++ Makefile (.../trunk/freeradius) (revision 27) @@ -6,8 +6,8 @@ # PORTNAME= freeradius -PORTVERSION= 1.1.4 -PORTREVISION= 1 +PORTVERSION?= 1.1.5 +PORTREVISION?= 0 CATEGORIES= net MASTER_SITES= ftp://ftp.freeradius.org/pub/radius/ \ ftp://ftp.ntua.gr/pub/net/radius/freeradius/ \ @@ -16,14 +16,25 @@ ftp://ftp.freeradius.org/pub/radius/old/ \ http://freeradius.portal-to-web.de/ -MAINTAINER= david@wood2.org.uk -COMMENT= A free RADIUS server implementation +MAINTAINER?= david@wood2.org.uk +COMMENT?= A free RADIUS server implementation + +USE_BZIP2= yes LIB_DEPENDS= gdbm.3:${PORTSDIR}/databases/gdbm LOGDIR?= /var/log +# If FREERADIUS_SLAVE_MYSQL is defined, we want to build the +# freeradius-mysql slave port + CONFLICTS= gnu-radius-1.* openradius-0.* radiusd-cistron-1.* +.ifdef(FREERADIUS_SLAVE_MYSQL) +CONFLICTS+= freeradius-1.* +PKGNAMESUFFIX= -mysql +.else +CONFLICTS+= freeradius-mysql-1.* +.endif USE_RC_SUBR= radiusd.sh USE_AUTOTOOLS= libltdl:15 libtool:15 @@ -36,9 +47,12 @@ OPTIONS= KERBEROS "With Kerberos support" off \ HEIMDAL "With Heimdal Kerberos support" off \ - LDAP "With LDAP user database" off \ - MYSQL "With MySQL user database" off \ - PGSQL "With PostgreSQL use database" off \ + LDAP "With LDAP database support" off +.ifndef(FREERADIUS_SLAVE_MYSQL) +OPTIONS+= MYSQL "With MySQL database support" off +.endif +OPTIONS+= PGSQL "With PostgreSQL database support" off \ + FIREBIRD "With Firebird database support (EXPERIMENTAL)" off \ SNMP "With SNMP support" off \ EDIR "With Novell eDirectory support" off \ NOPERL "Do not require perl (use only if necessary)" off \ @@ -46,6 +60,13 @@ .include <bsd.port.pre.mk> +# Default requirements for rc script +_REQUIRE= NETWORKING SERVERS + +.ifdef(FREERADIUS_SLAVE_MYSQL) +WITH_MYSQL= yes +.endif + CONFIGURE_ARGS= --quiet \ --prefix=${PREFIX} \ --localstatedir=/var \ @@ -56,10 +77,12 @@ --with-large-files \ --with-openssl-includes=${OPENSSLINC} \ --with-openssl-libraries=${OPENSSLLIB} \ - --without-rlm_sql_unixodbc \ - --without-rlm_sql_oracle \ + --without-rlm_sql_db2 \ + --without-rlm_sql_freetds \ --without-rlm_sql_iodbc \ - --without-rlm_sql_db2 + --without-rlm_sql_oracle \ + --without-rlm_sql_sybase \ + --without-rlm_sql_unixodbc .if ${OSVERSION} < 500000 && ${OPENSSLBASE} == "/usr" PLIST_SUB+= 4SSL="@comment " @@ -97,6 +120,7 @@ .ifdef(WITH_LDAP) USE_OPENLDAP= YES PLIST_SUB+= LDAP="" +_REQUIRE+= slapd .else CONFIGURE_ARGS+=--without-rlm_ldap PLIST_SUB+= LDAP="@comment " @@ -108,7 +132,9 @@ .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 " @@ -116,12 +142,28 @@ .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_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_SNMP) LIB_DEPENDS+= snmp.4:${PORTSDIR}/net-mgmt/net-snmp4 .else @@ -169,7 +211,7 @@ DICTS= dictionary.3com dictionary.3gpp dictionary.3gpp2 dictionary.acc \ dictionary.airespace dictionary.alcatel dictionary.alteon \ dictionary.altiga dictionary.alvarion dictionary.aptis \ - dictionary.aruba dictionary.ascend dictionary.avaya \ + dictionary.aruba dictionary.ascend dictionary.asn dictionary.avaya \ dictionary.bay dictionary.bintec dictionary.bristol \ dictionary.cablelabs dictionary.cabletron dictionary.cisco \ dictionary.cisco.bbsm dictionary.cisco.vpn3000 dictionary.cisco.vpn5000 \ @@ -199,12 +241,16 @@ dictionary.versanet dictionary.walabi dictionary.waverider \ dictionary.wispr dictionary.xedia dictionary.xylan dictionary.zyxel +SUB_LIST+= REQUIRE="${_REQUIRE}" + post-patch: - @${RM} ${WRKSRC}/doc/Makefile.orig -# rlm_sql_firebird in 1.1.4 makes configure fail with experimental modules enabled, -# even though the port implicitly issues --without-rlm_sql_firebird. Delete the module -# until it is fixed - @${RM} -r ${WRKSRC}/src/modules/rlm_sql/drivers/rlm_sql_firebird +# Patch Makefile / Makefile.in throughout the source tree to install in EXAMPLESDIR not raddb + @for i in `${FIND} -E ${WRKSRC} -regex '.*Makefile(\.in)?$$' -print` ; do \ + ${REINPLACE_CMD} -e "s:\$$(R)\$$(raddbdir):${EXAMPLESDIR}/raddb:g" $${i}; \ + done + @for i in `${FIND} -E ${WRKSRC} -regex '.*Makefile(\.in)?\.(orig|bak)$$' -print` ; do \ + ${RM} $${i}; \ + done .if ${OSVERSION} < 500000 @${REINPLACE_CMD} -e 's/-DNO_OPENSSL//' ${WRKSRC}/configure .endif @@ -214,9 +260,17 @@ .for dict in ${DICTS} ${INSTALL_DATA} ${WRKSRC}/share/${dict} ${DATADIR}/${dict} .endfor - for i in `${FIND} ${PREFIX}/etc/raddb -maxdepth 1 -regex '.*\.sample' -print \ - | ${SED} -e 's/\.sample//g'`; do \ - if [ ! -f $${i} ]; then ${CP} -p $${i}.sample $${i}; fi; \ + for i in `${FIND} ${EXAMPLESDIR}/raddb/ -type d -mindepth 1 -print \ + | ${SED} -e 's:^${EXAMPLESDIR}/raddb/::g'`; do \ + if [ ! -d ${PREFIX}/etc/raddb/$${i} ]; then \ + ${MKDIR} ${PREFIX}/etc/raddb/$${i}; \ + fi; \ + done + for i in `${FIND} ${EXAMPLESDIR}/raddb/ -type f -print \ + | ${SED} -e 's:^${EXAMPLESDIR}/raddb/::g'`; do \ + if [ ! -f ${PREFIX}/etc/raddb/$${i} ]; then \ + ${CP} -p ${EXAMPLESDIR}/raddb/$${i} ${PREFIX}/etc/raddb/$${i}; \ + fi; \ done .include <bsd.port.post.mk> >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200703272310.l2RNASwa066372>