ports/179047: [PATCH] net/nss_ldap: dpn't override ${PREFIX}/etc/nss_ldap.conf
Anton Yuzhaninov
ayuzhaninov at openstat.ru
Tue May 28 11:20:02 UTC 2013
>Number: 179047
>Category: ports
>Synopsis: [PATCH] net/nss_ldap: dpn't override ${PREFIX}/etc/nss_ldap.conf
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Tue May 28 11:20:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Anton Yuzhaninov
>Release: FreeBSD 8.3-PRERELEASE-20120415 amd64
>Organization:
>Environment:
System: FreeBSD monitoring.int.vega.ru 8.3-PRERELEASE-20120415 FreeBSD 8.3-PRERELEASE-20120415 #0: Sun Apr 15 00:27:26 UTC 2012
>Description:
After upgrade net/nss_ldap my local /usr/local/etc/nss_ldap.conf was
overridden by nss_ldap.conf.sample
Port Makefile has
!exists(${PREFIX}/etc/nss_ldap.conf)
But this don't work, and should not work as need:
variable ${PREFIX} expanded after !exists evaluted and cached.
If you run make -d A install you will see:
....
Searching for /etc/nss_ldap.conf...Looking for "/etc/nss_ldap.conf"...failed. Returning NULL
....
Global:PREFIX = ${LOCALBASE}
....
Port maintainer (mikeg at bsd-box.net) is cc'd.
Generated with FreeBSD Port Tools 0.99_7 (mode: change, diff: ports)
>How-To-Repeat:
Edit /usr/local/etc/nss_ldap.conf
update/install net/nss_ldap
Local changes in /usr/local/etc/nss_ldap.conf will be lost.
>Fix:
Just follow the Handbook:
http://www.freebsd.org/doc/en/books/porters-handbook/plist-config.html
--- nss_ldap-1.265_7.patch begins here ---
diff -ruN /usr/ports//net/nss_ldap/Makefile ./Makefile
--- /usr/ports//net/nss_ldap/Makefile 2013-05-17 13:47:11.000000000 +0000
+++ ./Makefile 2013-05-28 10:52:30.000000000 +0000
@@ -75,9 +75,9 @@
${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 [ ! -f ${PREFIX}/etc/nss_ldap.conf ]; then \
+ ${CP} -pv ${PREFIX}/etc/nss_ldap.conf.sample ${PREFIX}/etc/nss_ldap.conf ; \
+ fi
.if !defined(PACKAGE_BUILDING)
@${CAT} ${PKGMESSAGE}
.endif
--- nss_ldap-1.265_7.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list