ports/136254: [maintainer update] update net/freeradius2 to 2.1.6
David Wood
david at wood2.org.uk
Thu Jul 2 19:00:22 UTC 2009
>Number: 136254
>Category: ports
>Synopsis: [maintainer update] update net/freeradius2 to 2.1.6
>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: Thu Jul 02 19:00:15 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator: David Wood
>Release: 7.2-RELEASE amd64
>Organization:
>Environment:
FreeBSD manganese.wood2.org.uk 7.2-RELEASE-p2 FreeBSD 7.2-RELEASE-p2 #0: Sun Jun 28 19:36:41 BST 2009 david at manganese.wood2.org.uk:/scratch/usr/obj/usr/src/sys/MANGANESE amd64
>Description:
Update to FreeRADIUS 2.1.6.
There was no version 2.1.5; internally, 2.1.4 declared itself to
be 2.1.5 so that version was skipped.
FreeBSD notes
=============
The Makefile has been refactored to use bsd.port.options.mk now
that it is available for use. The extensive diff against Makefile
is mostly re-ordering existing lines.
The dependencies on Perl and Python have been made optional via
the PERL and PYTHON OPTIONs. The main and rlm_perl configure.in
files are patched in files/patch-perl to add a --without-perl
option so that the dependency on Perl can be properly
disabled. This deals with the request in ports/131595 that these
dependencies become optional; only now that bsd.port.options.mk
is available can this be done without kludges.
[Possibly incompatible change] The NOPERL knob, which was never a
complete solution, has been retired. Those who used to compile
the port -DWITH_NOPERL should disable the PERL option before
building this version.
A RUBY OPTION has been introduced for the experimental rlm_ruby.
[Possibly incompatible change] DHCP support now has its own
DHCP OPTION and is not included in EXPERIMENTAL.
unixODBC support has been added (mirroring the change in PR
ports/133746 for net/freeradius).
I do not believe that the two possibly incompatible changes
necessarily need mentioning in UPDATING. The first deletes a knob
that was deprecated in all versions of net/freeradius2. The
second gives each of the two functions previously assigned to the
EXPERIMENTAL OPTION their own OPTION. In most if not all cases,
the change in OPTIONS= will mean an automatic 'make config'
before the port is built.
The new OPTIONs do not change the default features, so the
feature set of the package is unchanged. rlm_perl and rlm_python
remain on by default, following the upstream defaults.
Release notes
=============
Feature Improvements
* radclient exits with 0 on successful (accept / ack), and 1
otherwise (no response / reject)
* Added support for %{sql:UPDATE ..}, and insert/delete. Patch
from Arran Cudbard-Bell
* Added sample "do not respond" policy. See raddb/policy.conf and
raddb/sites-available/do_not_respond
* Cleanups to Suse spec file from Norbert Wegener
* New VSAs for Juniper from Bjorn Mork
* Include more RFC dictionaries in the default install
* More documentation for the WiMAX module
* Added "chase_referrals" and "rebind" configuration to
rlm_ldap. This helps with Active Directory. See
raddb/modules/ldap
* Don't load pre/post-proxy if proxying is disabled.
* Added %{md5:...}, which returns MD5 hash in hex.
* Added configurable "retry_interval" and "poll_interval" for
"detail" listeners.
* Added "delete_mppe_keys" configuration option to
rlm_wimax. Apparently some WiMAX clients misbehave when they
see those keys.
* Added experimental rlm_ruby from
http://github.com/Antti/freeradius-server/tree/master
* Add Tunnel attributes to ldap.attrmap
* Enable virtual servers to be reloaded on HUP. For now, only the
"authorize", "authenticate", etc. processing sections are
reloaded. Clients and "listen" sections are NOT reloaded.
* Updated "radwatch" script to be more robust. See scripts/radwatch
* Added certificate compatibility notes in raddb/certs/README,
for compatibility with different operating
systems. (i.e. Windows)
Bug Fixes
* Minor changes to allow building without VQP.
* Minor fixes from John Center
* Fixed raddebug example
* Don't crash when deleting attributes via unlang
* Be friendlier to very fast clients
* Updated the "detail" listener so that it only polls once, and
not many times in a row, leaking memory each time...
* Update comparison for Packet-Src-IP-Address (etc.) so that the
operators other than '==' work.
* Did autoconf magic to work around weird libtool bug
* Make rlm_perl keep tags for tagged attributes in more situations
* Update UID checking for radmin
* Added "include_length" field for TTLS. It's needed for RFC
compliance, but not (apparently) for interoperability.
INSTRUCTIONS
============
files/patch-version and files/patch-bootstrap have been been
deleted.
files/patch-perl and files/patch-bootstrap have been added.
Please note: portlint seems not to understand bsd.port.options.mk
and throws up a whole bunch of new FATAL errors that are bogus.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
Index: distinfo
===================================================================
--- distinfo (.../branches/FreeBSD-ports-tree/freeradius2) (revision 279)
+++ distinfo (.../trunk/freeradius2) (revision 279)
@@ -1,3 +1,3 @@
-MD5 (freeradius-server-2.1.4.tar.bz2) = ba1fd573222ed5c8bead1cce1383a7a9
-SHA256 (freeradius-server-2.1.4.tar.bz2) = d509191a2a0cd556f23639547d176c662c0fc0de09fc625e1afc62ed84cbd2de
-SIZE (freeradius-server-2.1.4.tar.bz2) = 2405962
+MD5 (freeradius-server-2.1.6.tar.bz2) = 645ac631505cde46e93c47e273bdec19
+SHA256 (freeradius-server-2.1.6.tar.bz2) = a3bb9ead594a612442a4ce1d7c6930002486055c3be8f20320634c7f2743cb9e
+SIZE (freeradius-server-2.1.6.tar.bz2) = 2512340
Index: files/patch-version
===================================================================
--- files/patch-version (.../branches/FreeBSD-ports-tree/freeradius2) (revision 279)
+++ files/patch-version (.../trunk/freeradius2) (revision 279)
@@ -1,5 +0,0 @@
---- VERSION 2009-03-19 13:59:05.000000000 +0000
-+++ VERSION 2009-03-19 13:59:14.000000000 +0000
-@@ -1 +1 @@
--2.1.5
-+2.1.4
Index: files/patch-bootstrap
===================================================================
--- files/patch-bootstrap (.../branches/FreeBSD-ports-tree/freeradius2) (revision 279)
+++ files/patch-bootstrap (.../trunk/freeradius2) (revision 279)
@@ -1,11 +0,0 @@
---- raddb/certs/bootstrap 2009-03-18 20:20:41.000000000 +0000
-+++ raddb/certs/bootstrap 2009-03-18 21:20:25.000000000 +0000
-@@ -17,7 +17,7 @@
- #
- # If that worked, exit. Otherwise, run the commands manually.
- #
--if [ "$?" == "0" ]
-+if [ $? -eq 0 ]
- then
- exit 0
- fi
Index: files/patch-perl
===================================================================
--- files/patch-perl (.../branches/FreeBSD-ports-tree/freeradius2) (revision 0)
+++ files/patch-perl (.../trunk/freeradius2) (revision 279)
@@ -0,0 +1,61 @@
+--- configure.in 2009-07-01 17:32:17.000000000 +0100
++++ configure.in 2009-07-01 17:45:44.000000000 +0100
+@@ -409,6 +409,21 @@
+ AC_DEFINE(WITH_UDPFROMTO, [], [define if you want udpfromto])
+ fi
+
++dnl extra argument: --with-perl
++WITH_PERL=yes
++AC_ARG_WITH(perl,
++[ --with-perl Enable Perl support. (default=yes)],
++[ case "$withval" in
++ yes)
++ ;;
++ *)
++ WITH_PERL=no
++ esac ]
++)
++if test "x$WITH_PERL" = "xno"; then
++ with_rlm_perl=no
++fi
++
+ dnl #############################################################
+ dnl #
+ dnl # 1. Checks for programs
+@@ -416,10 +431,14 @@
+ dnl #############################################################
+
+ CHECKRAD=checkrad.pl
++if test "x$WITH_PERL" = "xyes"; then
+ AC_PATH_PROG(PERL, perl, /usr/local/bin/perl)
+ if test "x$ac_cv_path_PERL" = "x"; then
+ AC_MSG_WARN(perl not found - Simultaneous-Use and checkrad.pl may not work)
+ fi
++else
++ AC_MSG_WARN(perl disabled - Simultaneous-Use and checkrad.pl may not work)
++fi
+ AC_PATH_PROG(SNMPGET, snmpget)
+ if test "x$ac_cv_path_SNMPGET" = "x"; then
+ AC_MSG_WARN(snmpget not found - Simultaneous-Use and checkrad.pl may not work)
+--- src/modules/rlm_perl/configure.in 2009-07-01 17:58:23.000000000 +0100
++++ src/modules/rlm_perl/configure.in 2009-07-01 20:09:39.000000000 +0100
+@@ -3,7 +3,18 @@
+ AC_REVISION($Revision$)
+ AC_DEFUN(modname,[rlm_perl])
+
+-if test x$with_[]modname != xno; then
++dnl extra argument: --with-perl
++WITH_PERL=yes
++AC_ARG_WITH(perl,
++[ --with-perl Enable Perl support. (default=yes)],
++[ case "$withval" in
++ yes)
++ ;;
++ *)
++ WITH_PERL=no
++ esac ]
++)
++if test x$with_[]modname != xno && test x$WITH_PERL != xno; then
+
+ AC_PROG_CC
+ AC_PROG_CPP
Index: pkg-plist
===================================================================
--- pkg-plist (.../branches/FreeBSD-ports-tree/freeradius2) (revision 279)
+++ pkg-plist (.../trunk/freeradius2) (revision 279)
@@ -374,11 +374,11 @@
%%EXPM%%%%LIBDIR%%/rlm_protocol_filter.a
%%EXPM%%%%LIBDIR%%/rlm_protocol_filter.la
%%EXPM%%%%LIBDIR%%/rlm_protocol_filter.so
-%%LIBDIR%%/rlm_python-%%PORTVERSION%%.la
-%%LIBDIR%%/rlm_python-%%PORTVERSION%%.so
-%%LIBDIR%%/rlm_python.a
-%%LIBDIR%%/rlm_python.la
-%%LIBDIR%%/rlm_python.so
+%%RLMPYTHON%%%%LIBDIR%%/rlm_python-%%PORTVERSION%%.la
+%%RLMPYTHON%%%%LIBDIR%%/rlm_python-%%PORTVERSION%%.so
+%%RLMPYTHON%%%%LIBDIR%%/rlm_python.a
+%%RLMPYTHON%%%%LIBDIR%%/rlm_python.la
+%%RLMPYTHON%%%%LIBDIR%%/rlm_python.so
%%LIBDIR%%/rlm_radutmp-%%PORTVERSION%%.la
%%LIBDIR%%/rlm_radutmp-%%PORTVERSION%%.so
%%LIBDIR%%/rlm_radutmp.a
@@ -389,6 +389,11 @@
%%LIBDIR%%/rlm_realm.a
%%LIBDIR%%/rlm_realm.la
%%LIBDIR%%/rlm_realm.so
+%%EXPM%%%%RLMRUBY%%%%LIBDIR%%/rlm_ruby-%%PORTVERSION%%.la
+%%EXPM%%%%RLMRUBY%%%%LIBDIR%%/rlm_ruby-%%PORTVERSION%%.so
+%%EXPM%%%%RLMRUBY%%%%LIBDIR%%/rlm_ruby.a
+%%EXPM%%%%RLMRUBY%%%%LIBDIR%%/rlm_ruby.la
+%%EXPM%%%%RLMRUBY%%%%LIBDIR%%/rlm_ruby.so
%%EXPM%%%%LIBDIR%%/rlm_sim_files-%%PORTVERSION%%.la
%%EXPM%%%%LIBDIR%%/rlm_sim_files-%%PORTVERSION%%.so
%%EXPM%%%%LIBDIR%%/rlm_sim_files.a
@@ -429,6 +434,11 @@
%%PGSQL%%%%LIBDIR%%/rlm_sql_postgresql.a
%%PGSQL%%%%LIBDIR%%/rlm_sql_postgresql.la
%%PGSQL%%%%LIBDIR%%/rlm_sql_postgresql.so
+%%UNIXODBC%%%%LIBDIR%%/rlm_sql_unixodbc-%%PORTVERSION%%.la
+%%UNIXODBC%%%%LIBDIR%%/rlm_sql_unixodbc-%%PORTVERSION%%.so
+%%UNIXODBC%%%%LIBDIR%%/rlm_sql_unixodbc.a
+%%UNIXODBC%%%%LIBDIR%%/rlm_sql_unixodbc.la
+%%UNIXODBC%%%%LIBDIR%%/rlm_sql_unixodbc.so
%%LIBDIR%%/rlm_sqlcounter-%%PORTVERSION%%.la
%%LIBDIR%%/rlm_sqlcounter-%%PORTVERSION%%.so
%%LIBDIR%%/rlm_sqlcounter.a
@@ -460,18 +470,34 @@
sbin/radiusd
sbin/radmin
sbin/radwatch
+include/freeradius/autoconf.h
+include/freeradius/conf.h
+include/freeradius/conffile.h
+include/freeradius/detail.h
+include/freeradius/dhcp.h
+include/freeradius/event.h
include/freeradius/hash.h
+include/freeradius/heap.h
include/freeradius/ident.h
include/freeradius/libradius.h
include/freeradius/md4.h
include/freeradius/md5.h
include/freeradius/missing.h
+include/freeradius/modcall.h
+include/freeradius/modules.h
include/freeradius/packet.h
+include/freeradius/rad_assert.h
include/freeradius/radius.h
+include/freeradius/radiusd.h
include/freeradius/radpaths.h
+include/freeradius/radutmp.h
+include/freeradius/realms.h
include/freeradius/sha1.h
+include/freeradius/stats.h
+include/freeradius/sysutmp.h
include/freeradius/token.h
include/freeradius/udpfromto.h
+include/freeradius/vmps.h
include/freeradius/vqp.h
@dirrm include/freeradius
%%PORTDOCS%%%%DOCSDIR%%/Acct-Type
@@ -630,6 +656,7 @@
%%DATADIR%%/dictionary.h3c
%%DATADIR%%/dictionary.hp
%%DATADIR%%/dictionary.huawei
+%%DATADIR%%/dictionary.infonet
%%DATADIR%%/dictionary.ipunplugged
%%DATADIR%%/dictionary.issanni
%%DATADIR%%/dictionary.itk
Index: Makefile
===================================================================
--- Makefile (.../branches/FreeBSD-ports-tree/freeradius2) (revision 279)
+++ Makefile (.../trunk/freeradius2) (revision 279)
@@ -8,7 +8,7 @@
#
PORTNAME= freeradius
-DISTVERSION= 2.1.4
+DISTVERSION= 2.1.6
CATEGORIES= net
MASTER_SITES= ftp://ftp.freeradius.org/pub/freeradius/%SUBDIR%/ \
ftp://ftp.ntua.gr/pub/net/radius/freeradius/%SUBDIR%/ \
@@ -25,7 +25,6 @@
LIB_DEPENDS= gdbm.3:${PORTSDIR}/databases/gdbm
USE_BZIP2= yes
-WANT_PERL= yes
LOGDIR?= /var/log
@@ -36,7 +35,6 @@
USE_AUTOTOOLS= libltdl:15 libtool:15 autoconf:262
USE_GMAKE= yes
USE_OPENSSL= yes
-USE_PYTHON= yes
MAKE_ARGS+= LDFLAGS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}"
CFLAGS+= -I${LOCALBASE}/include -L${LOCALBASE}/lib
MAKE_JOBS_UNSAFE= yes
@@ -49,96 +47,19 @@
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 \
- EXPERIMENTAL "Build experimental modules (including DHCP)" off
+ PERL "With Perl support" on \
+ PYTHON "With Python support" on \
+ RUBY "With Ruby support (EXPERIMENTAL)" off \
+ DHCP "With DHCP support (EXPERIMENTAL)" off \
+ EXPERIMENTAL "Build experimental modules" off
-.include <bsd.port.pre.mk>
+.include <bsd.port.options.mk>
-.if ${ARCH} == "sparc64" && ${OSVERSION} < 700000
-BROKEN= Does not build on sparc64-6
-.endif
-
# Default requirements for rc script
_REQUIRE= NETWORKING SERVERS
-# User and group to use if USER is set
-USER= freeradius
-GROUP= freeradius
-
-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+=--with-rlm-python-lib-dir=${PYTHON_LIBDIR} \
- --with-rlm-python-include-dir=${PYTHON_INCLUDEDIR} \
- --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_oracle \
- --without-rlm_sql_sqlite \
- --without-rlm_sql_sybase \
- --without-rlm_sql_unixodbc \
- --with-vmps
-
-.if ${ARCH} == amd64
-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
-USER!= ${GREP} -E '^${USER}:' ${PORTSDIR}/UIDs | \
- ${SED} -Ee 's/^([^:]*):([^:]*):([^:]*):([^:]*)::0:0:([^:]*):([^:]*):([^:]*)$$/USER="\1" UID="\3" GECOS="\5" HOME="\6" SHELL="\7"/'
-GROUP!= ${GREP} -E '^${GROUP}:' ${PORTSDIR}/GIDs | \
- ${SED} -Ee 's/^([^:]*):([^:]*):([^:]*):$$/GROUP="\1" GID="\3"/'
-
-# Apply the defaults where necessary
-RADIUS_USER?= ${USER:MUSER*:C/^[^=]*=\"([^\"]*)\"$/\1/}
-RADIUS_UID?= ${USER:MUID*:C/^[^=]*=\"([^\"]*)\"$/\1/}
-RADIUS_GECOS?= ${USER:MGECOS*:C/^[^=]*=\"([^\"]*)\"$/\1/}
-RADIUS_HOME?= ${USER:MHOME*:C/^[^=]*=\"([^\"]*)\"$/\1/}
-RADIUS_SHELL?= ${USER:MSHELL*:C/^[^=]*=\"([^\"]*)\"$/\1/}
-RADIUS_GROUP?= ${GROUP:MGROUP*:C/^[^=]*=\"([^\"]*)\"$/\1/}
-RADIUS_GID?= ${GROUP: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}" \
- RADDB_WORK="${WRKSRC}/raddb" \
- RADDB="${PREFIX}/etc/raddb" \
- LOGDIR="${LOGDIR}" \
- LIBDIR="${PREFIX}/${FREERADIUS_LIBDIR}" \
- RC_SUBR_SUFFIX="${RC_SUBR_SUFFIX}"
-SUB_FILES+= pkg-install pkg-deinstall pkg-message
.ifdef(WITH_USER)
SUB_LIST+= RUN_AS_USER="yes"
.else
@@ -195,6 +116,15 @@
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
@@ -209,6 +139,51 @@
WITH_EXPERIMENTAL= yes
.endif
+.ifdef(WITH_PERL)
+USE_PERL5= yes
+CONFIGURE_ARGS+=--with-rlm_perl
+PLIST_SUB+= RLMPERL=""
+.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
@@ -227,7 +202,7 @@
.endif
.ifdef(WITH_EXPERIMENTAL)
-CONFIGURE_ARGS+=--with-experimental-modules --with-dhcp
+CONFIGURE_ARGS+=--with-experimental-modules
PLIST_SUB+= EXPM=""
.else
PLIST_SUB+= EXPM="@comment "
@@ -239,23 +214,88 @@
CFLAGS!= ${ECHO} ${CFLAGS} | ${SED} -Ee 's:-O[0-9]?[[:space:]]*::g'
.endif
-# NOPERL has been removed from OPTIONS. It is a nasty hack as it doesn't
-# properly remove the dependency on perl. The main configure.in should be
-# patched so that the perl detection test fails to make this work properly,
-# though that configure run (at least in 2.0.0) only looks for perl to issue
-# a warning about Simultaneous-Use and checkrad.pl maybe not working without
-# perl.
-# Leave WITH_NOPERL as a knob for anyone that really wants it - or for
-# a proper fix in the future.
-.ifdef(WITH_NOPERL)
-CONFIGURE_ARGS+=--without-rlm_perl
-PLIST_SUB+= RLMPERL="@comment "
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == "sparc64" && ${OSVERSION} < 700000
+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}
+
+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
-USE_PERL5= yes
-CONFIGURE_ARGS+=--with-rlm_perl
-PLIST_SUB+= RLMPERL=""
+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_oracle \
+ --without-rlm_sql_sqlite \
+ --without-rlm_sql_sybase \
+ --with-vmps
+.if ${ARCH} == amd64
+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}" \
+ RADDB_WORK="${WRKSRC}/raddb" \
+ RADDB="${PREFIX}/etc/raddb" \
+ LOGDIR="${LOGDIR}" \
+ LIBDIR="${PREFIX}/${FREERADIUS_LIBDIR}" \
+ RC_SUBR_SUFFIX="${RC_SUBR_SUFFIX}"
+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 \
@@ -289,8 +329,8 @@
@${FIND} -E ${WRKSRC}/raddb/certs \
-regex '.*/(bootstrap|Makefile)\.(orig|bak)$$' \
-delete
-# If EXPERIMENTAL (and therefore DHCP) is enabled, enable the DHCP dictionary
-.ifdef(WITH_EXPERIMENTAL)
+# 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)
@@ -313,6 +353,7 @@
@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:
Property changes on: Makefile
___________________________________________________________________
Added: svn:keywords
+ Id
Property changes on: .
___________________________________________________________________
Added: svn:mergeinfo
Merged /branches/FreeBSD-ports-tree/freeradius2:r96-270
Merged /trunk/freeradius:r266
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list