From nobody@FreeBSD.org  Tue Dec  4 15:26:35 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 8075F16A468
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  4 Dec 2007 15:26:35 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 70B6413C525
	for <freebsd-gnats-submit@FreeBSD.org>; Tue,  4 Dec 2007 15:26:35 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id lB4FQY7x020806
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 4 Dec 2007 15:26:34 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id lB4FQYva020805;
	Tue, 4 Dec 2007 15:26:34 GMT
	(envelope-from nobody)
Message-Id: <200712041526.lB4FQYva020805@www.freebsd.org>
Date: Tue, 4 Dec 2007 15:26:34 GMT
From: David Wood <david@wood2.org.uk>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [maintainer update] net/freeradius - fix build on 7.x amd64 and 6.x with gcc 4.2, also various other fixes
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         118425
>Category:       ports
>Synopsis:       [maintainer update] net/freeradius - fix build on 7.x amd64 and 6.x with gcc 4.2, also various other fixes
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    araujo
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 04 15:30:01 UTC 2007
>Closed-Date:    Thu Dec 06 10:23:38 UTC 2007
>Last-Modified:  Thu Dec 06 10:23:38 UTC 2007
>Originator:     David Wood
>Release:        6.2-RELEASE i386
>Organization:
>Environment:
FreeBSD titanium.wood2.org.uk 6.2-RELEASE-p9 FreeBSD 6.2-RELEASE-p9 #0: Sat Dec  1 18:14:52 GMT 2007     david@titanium.wood2.org.uk:/usr/obj/usr/src/sys/TITANIUM  i386
>Description:
- Patch src/main/Makefile to remove -pie for radiusd. [1]
  This produces a runnable radiusd on:
  * 6.2-RELEASE-p9 i386 with USE_GCC=4.2 and up to date lang/gcc42
  * RELENG_7 i386 from a couple of days ago
  * RELENG_7 amd64 (according to the report I received)
  which were previously broken, and is a no-op on:
  * 6.2-RELEASE-p9 i386
  * RELENG_6_3 i386 from a couple of days ago.
- Chase heimdal shared version library bump (which was missed somehow). [2]
- Remove files/patch-src-modules-rlm_attr_rewrite-rlm_attr_rewrite.c. This is
  4.x cruft which should have been removed as parts of ports/117160 but got
  missed.
- Rework files/radiusd.sh.in, not least to address the bug reported in
  ports/117262
- Bump PORTREVISION.

[1] Reported by: Sean McNeil <sean@mcneil.com>
[2] Reported by: Gioto Alves Lourenco <gioto@pop-ro.rnp.br>

Note: this affects the patch in ports/117161, which will not now apply
cleanly. The solution is to update files/patch-radiusd-no-pie for the 2.x
version of src/main/Makefile (the same change is needed as in 1.x).


******************************************************************************
PORTS FREEZE COMMENTS
******************************************************************************
- Item 1 fixes a build failure on RELENG_7 amd64.
- Item 2 fixes a build failure on all platforms (though not with
  default options).

I believe that at least these two items may qualify for committing during the
current ports freeze (portmgr@ alerted).


If the deletion of 
files/patch-src-modules-rlm_attr_rewrite-rlm_attr_rewrite.c
and the changes to
files/radiusd.sh.in
do not qualify for committing during ports freeze, ignore the patches to those
files, and I'll PR them separately. The other changes can stand alone (patch
to Makefile and new file files/patch-radiusd-no-pie).


******************************************************************************
FILES TO BE ADDED
******************************************************************************
files/patch-radiusd-no-pie

******************************************************************************
FILES TO BE REMOVED
******************************************************************************
files/patch-src-modules-rlm_attr_rewrite-rlm_attr_rewrite.c
>How-To-Repeat:

>Fix:
Apply the attached patch.

Patch attached with submission follows:

Index: files/patch-src-modules-rlm_attr_rewrite-rlm_attr_rewrite.c
===================================================================
--- files/patch-src-modules-rlm_attr_rewrite-rlm_attr_rewrite.c	(.../branches/FreeBSD-ports-tree/freeradius)	(revision 128)
+++ files/patch-src-modules-rlm_attr_rewrite-rlm_attr_rewrite.c	(.../trunk/freeradius)	(revision 128)
@@ -1,10 +0,0 @@
---- src/modules/rlm_attr_rewrite/rlm_attr_rewrite.c.orig	Sat Jun 18 14:29:43 2005
-+++ src/modules/rlm_attr_rewrite/rlm_attr_rewrite.c	Sat Jun 18 14:31:48 2005
-@@ -27,6 +27,7 @@
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
-+#include <sys/types.h>
- #ifdef HAVE_REGEX_H
- #	include <regex.h>
- #endif
Index: files/radiusd.sh.in
===================================================================
--- files/radiusd.sh.in	(.../branches/FreeBSD-ports-tree/freeradius)	(revision 128)
+++ files/radiusd.sh.in	(.../trunk/freeradius)	(revision 128)
@@ -14,13 +14,19 @@
 
 name=radiusd
 rcvar=`set_rcvar`
+load_rc_config $name
 
 command=%%PREFIX%%/sbin/radiusd
-radiusd_config=${radiusd_config:-"%%PREFIX%%/etc/raddb/radiusd.conf"}
-required_files=${radiusd_config}
 pidfile=/var/run/radiusd/radiusd.pid
 
+# The radiusd_config parameter is now obsolete. Instead, derive the
+# configuration directory name from radiusd_flags if possible, otherwise
+# default to %%PREFIX%%/etc/raddb
+required_dirs=`echo ${radiusd_flags} | sed -Ee 's:.*\-[^[:space:]d]*d[[:space:]]*([^[:space:]]+).*:\1:'`
+required_dirs=${required_dirs:-"%%PREFIX%%/etc/raddb"}
+
+required_files="${required_dirs}/radiusd.conf"
+
 radiusd_enable=${radiusd_enable-"NO"}
 
-load_rc_config $name
 run_rc_command "$1"
Index: files/patch-radiusd-no-pie
===================================================================
--- files/patch-radiusd-no-pie	(.../branches/FreeBSD-ports-tree/freeradius)	(revision 0)
+++ files/patch-radiusd-no-pie	(.../trunk/freeradius)	(revision 128)
@@ -0,0 +1,11 @@
+--- src/main/Makefile.in	Wed Feb 14 15:44:23 2007
++++ src/main/Makefile.in	Mon Dec  3 14:26:53 2007
+@@ -61,7 +61,7 @@
+ 
+ radiusd: $(SERVER_OBJS) $(MODULE_OBJS) ../lib/libradius.la
+ 	$(LIBTOOL) --mode=link $(CC) -export-dynamic -dlopen self \
+-		$(LDFLAGS) -pie $(LINK_MODE) -o $@ $(SERVER_OBJS)      \
++		$(LDFLAGS) $(LINK_MODE) -o $@ $(SERVER_OBJS)      \
+ 		$(MODULE_LIBS) $(LIBS) $(SNMP_LIBS) $(PTHREADLIB) \
+ 		$(LIBLTDL) $(OPENSSL_LIBS)
+ 
Index: Makefile
===================================================================
--- Makefile	(.../branches/FreeBSD-ports-tree/freeradius)	(revision 128)
+++ Makefile	(.../trunk/freeradius)	(revision 128)
@@ -7,7 +7,7 @@
 
 PORTNAME=	freeradius
 PORTVERSION?=	1.1.7
-PORTREVISION?=	1
+PORTREVISION?=	2
 CATEGORIES=	net
 MASTER_SITES=	ftp://ftp.freeradius.org/pub/radius/ \
 		ftp://ftp.ntua.gr/pub/net/radius/freeradius/ \
@@ -61,12 +61,6 @@
 
 .include <bsd.port.pre.mk>
 
-.if ${OSVERSION} >= 700042
-.if ${ARCH} == "amd64"
-BROKEN=		Does not compile with GCC 4.2
-.endif
-.endif
-
 # Default requirements for rc script
 _REQUIRE=	NETWORKING SERVERS
 
@@ -110,7 +104,7 @@
 
 .ifdef(WITH_KERBEROS)
 .ifdef(WITH_HEIMDAL)
-LIB_DEPENDS+=	krb5.21:${PORTSDIR}/security/heimdal
+LIB_DEPENDS+=	krb5.23:${PORTSDIR}/security/heimdal
 CONFIGURE_ARGS+=--enable-heimdal-krb5
 .else
 LIB_DEPENDS+=	krb5.3:${PORTSDIR}/security/krb5


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->araujo 
Responsible-Changed-By: araujo 
Responsible-Changed-When: Wed Dec 5 10:17:25 UTC 2007 
Responsible-Changed-Why:  
I'll take it. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=118425 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/118425: commit references a PR
Date: Thu,  6 Dec 2007 10:01:07 +0000 (UTC)

 araujo      2007-12-06 10:01:03 UTC
 
   FreeBSD ports repository
 
   Modified files:
     net/freeradius       Makefile 
     net/freeradius/files radiusd.sh.in 
   Added files:
     net/freeradius/files patch-radiusd-no-pie 
   Log:
   - Added patch to remove -pie for radiusd. [1]
   - Fixed a build failure on RELENG_7 AMD64.
   - Chase heimdal shared version library bump. [2]
   - Reworked RC script. [3]
   - Mark as unbroken on AMD64.
   - Bump PORTREVISION.
   
   PR:             ports/118425, ports/117262 [3]
   Reported by:    Sean McNeil <sean@mcneil.com> [1], Gioto Alves Lourenco <gioto@pop-ro.rnp.br> [2]
   Submitted by:   Craig Leres <leres@ee.lbl.gov> [3], David Wood <david@wood2.org.uk> (maintainer)
   Approved by:    portmgr (marcus), stas (mentor, implicit)
   
   Revision  Changes    Path
   1.63      +6 -12     ports/net/freeradius/Makefile
   1.1       +11 -0     ports/net/freeradius/files/patch-radiusd-no-pie (new)
   1.3       +9 -3      ports/net/freeradius/files/radiusd.sh.in
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: araujo 
State-Changed-When: Thu Dec 6 10:23:38 UTC 2007 
State-Changed-Why:  
Committed, with minor changes. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=118425 
>Unformatted:
