From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Jan 22 00:20:16 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D46FA16A403 for ; Mon, 22 Jan 2007 00:20:16 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id B1FAA13C45E for ; Mon, 22 Jan 2007 00:20:16 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l0M0KG63061799 for ; Mon, 22 Jan 2007 00:20:16 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l0M0KGrZ061795; Mon, 22 Jan 2007 00:20:16 GMT (envelope-from gnats) Resent-Date: Mon, 22 Jan 2007 00:20:16 GMT Resent-Message-Id: <200701220020.l0M0KGrZ061795@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, David Wood Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5D1A516A400 for ; Mon, 22 Jan 2007 00:16:03 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [69.147.83.33]) by mx1.freebsd.org (Postfix) with ESMTP id 4B8DC13C457 for ; Mon, 22 Jan 2007 00:16:03 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l0M0G3Js039288 for ; Mon, 22 Jan 2007 00:16:03 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id l0M0G2Vd039287; Mon, 22 Jan 2007 00:16:03 GMT (envelope-from nobody) Message-Id: <200701220016.l0M0G2Vd039287@www.freebsd.org> Date: Mon, 22 Jan 2007 00:16:03 GMT From: David Wood To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.0 Cc: Subject: ports/108196: [maintainer update] Various fixes to net/freeradius including easier 'out of the box' configuration X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jan 2007 00:20:16 -0000 >Number: 108196 >Category: ports >Synopsis: [maintainer update] Various fixes to net/freeradius including easier 'out of the box' configuration >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: Mon Jan 22 00:20:15 GMT 2007 >Closed-Date: >Last-Modified: >Originator: David Wood >Release: 6.2-RELEASE >Organization: >Environment: FreeBSD titanium.wood2.org.uk 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Wed Jan 17 11:50:20 GMT 2007 david@titanium.wood2.org.uk:/usr/obj/usr/src/sys/TITANIUM i386 >Description: On make install or pkg_add, copy .sample to if doesn't exist. On deinstall, remove if .sample and are identical. These changes make configuring FreeRADIUS 'out of the box' much more straightforward as you have a default configuration in place ready to customise. Hand crafted configuration files are left alone. [1] Add US mirror to MASTER_SITES. Fix CFLAGS so that the problem with AC_LIBLTDL_INSTALLABLE mentioned in ports/104949 goes away. Tidy CONFIGURE_ARGS so that it matches the order of configure --help Remove EXAMPLESDIR references from the post-install target of Makefile and pkg-plist. This folder isn't used; the change gets rid of an error message when deinstalling the package. Pet portlint(1) somewhat (it doesn't like the python kludge in the Makefile, but I can't see a way around that). [1] Requested by Alan DeKok of the FreeRADIUS Project. See http://lists.freeradius.org/pipermail/freeradius-users/2007-January/059487.html >How-To-Repeat: >Fix: Patch attached with submission follows: diff -ruN /usr/ports/net/freeradius/Makefile /usr/ports_updated/net/freeradius/Makefile --- /usr/ports/net/freeradius/Makefile Thu Jan 18 19:13:29 2007 +++ /usr/ports_updated/net/freeradius/Makefile Sun Jan 21 23:05:12 2007 @@ -12,6 +12,7 @@ MASTER_SITES= ftp://ftp.freeradius.org/pub/radius/ \ ftp://ftp.ntua.gr/pub/net/radius/freeradius/ \ ftp://ftp.uk.freeradius.org/pub/radius/ \ + ftp://ftp.us.freeradius.org/pub/radius/ \ ftp://ftp.freeradius.org/pub/radius/old/ \ http://freeradius.portal-to-web.de/ @@ -29,7 +30,7 @@ USE_GMAKE= yes USE_OPENSSL= yes MAKE_ARGS+= LDFLAGS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}" -CFLAGS+= -I${LOCALBASE}/include +CFLAGS+= -I${LOCALBASE}/include -L${LOCALBASE}/lib PLIST_SUB= PORTVERSION=${PORTVERSION} @@ -45,17 +46,20 @@ .include -CONFIGURE_ARGS= --prefix=${PREFIX} --quiet --with-logdir=${LOGDIR} \ +CONFIGURE_ARGS= --quiet \ + --prefix=${PREFIX} \ --localstatedir=/var \ + --mandir=${PREFIX}/man \ --with-system-libtool \ - --disable-ltdl-install \ --with-docdir=${DOCSDIR} \ - --mandir=${PREFIX}/man \ - --with-large-files --without-rlm_sql_unixodbc \ - --without-rlm_sql_oracle --without-rlm_sql_iodbc \ - --without-rlm_sql_db2 \ + --with-logdir=${LOGDIR} \ + --with-large-files \ --with-openssl-includes=${OPENSSLINC} \ - --with-openssl-libraries=${OPENSSLLIB} + --with-openssl-libraries=${OPENSSLLIB} \ + --without-rlm_sql_unixodbc \ + --without-rlm_sql_oracle \ + --without-rlm_sql_iodbc \ + --without-rlm_sql_db2 .if ${OSVERSION} < 500000 && ${OPENSSLBASE} == "/usr" PLIST_SUB+= 4SSL="@comment " @@ -206,9 +210,13 @@ .endif post-install: - @${MKDIR} ${PREFIX}/etc/raddb ${DATADIR} ${EXAMPLESDIR} + @${MKDIR} ${PREFIX}/etc/raddb ${DATADIR} .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; \ + done .include diff -ruN /usr/ports/net/freeradius/pkg-plist /usr/ports_updated/net/freeradius/pkg-plist --- /usr/ports/net/freeradius/pkg-plist Mon Jan 15 14:55:38 2007 +++ /usr/ports_updated/net/freeradius/pkg-plist Sun Jan 21 19:41:43 2007 @@ -12,6 +12,7 @@ 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 @@ -56,6 +57,7 @@ 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 lib/libeap-%%PORTVERSION%%.la lib/libeap-%%PORTVERSION%%.so lib/libeap.a @@ -492,7 +494,6 @@ %%DATADIR%%/dictionary.xedia %%DATADIR%%/dictionary.xylan %%DATADIR%%/dictionary.zyxel -@dirrm %%EXAMPLESDIR%% @dirrm %%DATADIR%% %%PORTDOCS%%@dirrm %%DOCSDIR%%/rfc %%PORTDOCS%%@dirrm %%DOCSDIR%%/examples @@ -503,4 +504,5 @@ @exec chmod -R og= /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." +@dirrmtry %D/etc/raddb +@unexec if [ -d %D/etc/raddb ]; then echo "You should remove %D/etc/raddb if you don't need it anymore."; fi >Release-Note: >Audit-Trail: >Unformatted: