Date: Tue, 28 May 2013 11:13:20 GMT From: Anton Yuzhaninov <ayuzhaninov@openstat.ru> To: FreeBSD-gnats-submit@freebsd.org Cc: mikeg@bsd-box.net Subject: ports/179047: [PATCH] net/nss_ldap: dpn't override ${PREFIX}/etc/nss_ldap.conf Message-ID: <201305281113.r4SBDK2T081608@monitoring.int.vega.ru> Resent-Message-ID: <201305281120.r4SBK1vi017552@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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@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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305281113.r4SBDK2T081608>