From nobody@FreeBSD.org  Thu Feb 17 12:31:45 2011
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 4628A1065679
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 17 Feb 2011 12:31:45 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 2BA438FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 17 Feb 2011 12:31:45 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id p1HCVi1Y069765
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 17 Feb 2011 12:31:44 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id p1HCVinO069764;
	Thu, 17 Feb 2011 12:31:44 GMT
	(envelope-from nobody)
Message-Id: <201102171231.p1HCVinO069764@red.freebsd.org>
Date: Thu, 17 Feb 2011 12:31:44 GMT
From: Ganael Laplanche <martymac@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: net/nss_ldap - Fix configuration file comments + various changes
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: mikeg@bsd-box.net

>Number:         154843
>Category:       ports
>Synopsis:       net/nss_ldap - Fix configuration file comments + various changes
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    martymac
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 17 12:40:09 UTC 2011
>Closed-Date:    Fri Feb 18 08:43:34 UTC 2011
>Last-Modified:  Fri Feb 18 08:50:06 UTC 2011
>Originator:     Ganael Laplanche
>Release:        8.2-RC3
>Organization:
http://contribs.martymac.org
>Environment:
FreeBSD camembert.sis.pasteur.fr 8.2-RC3 FreeBSD 8.2-RC3 #0: Sun Jan 30 06:28:31 UTC 2011     root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
Dear maintainer of net/nss_ldap,

I would like to commit the attached patch, which provides the following :

- Fix several default paths relative to PREFIX
- Move REINPLACE_CMDs to the post-patch target to avoid patching the same
  files again when re-running the install target
- Provide a .conf file from the .conf.sample one as advised in the porter's
  handbook 
- Add a LOCAL mirror

Please, tell me if you agree with those changes.

Best regards,
Ganael Laplanche.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: nss_ldap/Makefile
===================================================================
RCS file: /home/pcvs/ports/net/nss_ldap/Makefile,v
retrieving revision 1.38
diff -u -r1.38 Makefile
--- nss_ldap/Makefile	4 Dec 2010 07:32:57 -0000	1.38
+++ nss_ldap/Makefile	16 Feb 2011 15:51:37 -0000
@@ -7,9 +7,10 @@
 
 PORTNAME=	nss_ldap
 PORTVERSION=	1.${NSS_LDAP_VERSION}
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	net
-MASTER_SITES=	http://www.padl.com/download/
+MASTER_SITES=	http://www.padl.com/download/ \
+		LOCAL/martymac
 DISTNAME=	${PORTNAME}-${NSS_LDAP_VERSION}
 
 MAINTAINER=	mikeg@bsd-box.net
@@ -27,9 +28,6 @@
 
 OPTIONS=	LCLASS "Enable login classes via the loginClass attribute" on
 
-PLIST_FILES=	etc/nss_ldap.conf.sample \
-		lib/nss_ldap.so.1
-
 CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
 		LDFLAGS="-L${LOCALBASE}/lib -Wl,-rpath,${LOCALBASE}/lib"
 
@@ -54,6 +52,13 @@
 post-extract:
 	${CP} ${FILESDIR}/bsdnss.c ${WRKSRC}
 
+post-patch:
+	@${REINPLACE_CMD} -e 's,/etc/ldap\.,${PREFIX}/etc/nss_ldap.,g' \
+		-e 's,/etc/openldap/ldap\.,${PREFIX}/etc/openldap/ldap.,g' \
+		${WRKSRC}/ldap.conf
+	@${REINPLACE_CMD} 's,/etc/ldap\.,${PREFIX}/etc/nss_ldap.,g' \
+		${WRKSRC}/${MAN5}
+
 # XXX: newer autoconf's rely on the compiler result, not the preprocessor
 #      for checking headers, so the configure.in needs to be fixed upstream
 #      to properly include dependencies
@@ -65,11 +70,12 @@
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/nss_ldap.so ${PREFIX}/lib/nss_ldap.so.1
 	${INSTALL_DATA} ${WRKSRC}/ldap.conf ${PREFIX}/etc/nss_ldap.conf.sample
-	@${REINPLACE_CMD} 's,/etc/ldap.,${PREFIX}/etc/nss_ldap.,g' \
-		${WRKSRC}/${MAN5}
 	${INSTALL_MAN} ${WRKSRC}/${MAN5} ${MAN5PREFIX}/man/man5
 
 post-install:
+.if !exists(${PREFIX}/etc/nss_ldap.conf)
+	${CP} -p ${PREFIX}/etc/nss_ldap.conf.sample ${PREFIX}/etc/nss_ldap.conf
+.endif
 .if !defined(PACKAGE_BUILDING)
 	@${CAT} ${PKGMESSAGE}
 .endif
Index: nss_ldap/distinfo
===================================================================
RCS file: /home/pcvs/ports/net/nss_ldap/distinfo,v
retrieving revision 1.16
diff -u -r1.16 distinfo
--- nss_ldap/distinfo	18 Jan 2010 03:43:56 -0000	1.16
+++ nss_ldap/distinfo	16 Feb 2011 15:51:37 -0000
@@ -1,3 +1,2 @@
-MD5 (nss_ldap-265.tar.gz) = c1cb02d1a85538cf16bca6f6a562abe4
 SHA256 (nss_ldap-265.tar.gz) = 77b54d905f50d774f28d5559d49126f1bc76720f741b0864a64bb4936ec226a8
 SIZE (nss_ldap-265.tar.gz) = 280976
Index: nss_ldap/pkg-plist
===================================================================
RCS file: nss_ldap/pkg-plist
diff -N nss_ldap/pkg-plist
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ nss_ldap/pkg-plist	16 Feb 2011 15:51:37 -0000
@@ -0,0 +1,4 @@
+lib/nss_ldap.so.1
+@unexec if cmp -s %D/etc/nss_ldap.conf %D/etc/nss_ldap.conf.sample; then rm -f %D/etc/nss_ldap.conf; fi
+etc/nss_ldap.conf.sample
+@exec if [ ! -f %D/etc/nss_ldap.conf ]; then cp %B/%f %D/etc/nss_ldap.conf; fi


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->martymac 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu Feb 17 12:40:15 UTC 2011 
Responsible-Changed-Why:  
Submitter has GNATS access (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=154843 
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Thu Feb 17 12:40:20 UTC 2011 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

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

From: Edwin Groothuis <edwin@FreeBSD.org>
To: mikeg@bsd-box.net
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/154843: net/nss_ldap - Fix configuration file comments + various changes
Date: Thu, 17 Feb 2011 12:40:18 UT

 Maintainer of net/nss_ldap,
 
 Please note that PR ports/154843 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/154843
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org

From: "Michael Graziano" <mikeg@bsd-box.net>
To: bug-followup@FreeBSD.ORG
Cc:  
Subject: Re: ports/154843: net/nss_ldap - Fix configuration file comments +
 various changes
Date: Thu, 17 Feb 2011 13:45:48 -0500

 All looks sane -- should be able to be applied as-is.
 
 -MG
 
 > Maintainer of net/nss_ldap,
 >
 > Please note that PR ports/154843 has just been submitted.
 >
 > If it contains a patch for an upgrade, an enhancement or a bug fix
 > you agree on, reply to this email stating that you approve the patch
 > and a committer will take care of it.
 >
 > The full text of the PR can be found at:
 >     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/154843
 >
 > --
 > Edwin Groothuis via the GNATS Auto Assign Tool
 > edwin@FreeBSD.org
 >
 
 
State-Changed-From-To: feedback->closed 
State-Changed-By: martymac 
State-Changed-When: Fri Feb 18 08:43:33 UTC 2011 
State-Changed-Why:  
Committed, thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/154843: commit references a PR
Date: Fri, 18 Feb 2011 08:41:12 +0000 (UTC)

 martymac    2011-02-18 08:41:07 UTC
 
   FreeBSD ports repository
 
   Modified files:
     net/nss_ldap         Makefile distinfo 
   Added files:
     net/nss_ldap         pkg-plist 
   Log:
   - Fix several default paths relative to PREFIX
   - Move REINPLACE_CMDs to the post-patch target to avoid patching
     the same files again when re-running the install target
   - Provide a .conf file from the .conf.sample one
   - Add a LOCAL mirror
   
   PR:     154843
   Approved by:    Michael Graziano <mikeg@bsd-box.net> (maintainer),
                   ehaupt (mentor)
   Feature safe:   yes
   
   Revision  Changes    Path
   1.39      +13 -7     ports/net/nss_ldap/Makefile
   1.17      +0 -1      ports/net/nss_ldap/distinfo
   1.5       +4 -0      ports/net/nss_ldap/pkg-plist (new)
 _______________________________________________
 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"
 
>Unformatted:
