From owner-freebsd-ports-bugs@FreeBSD.ORG Tue May 28 11:20:02 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4D58BEE0 for ; Tue, 28 May 2013 11:20:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 2FC70F05 for ; Tue, 28 May 2013 11:20:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r4SBK1j4017553 for ; Tue, 28 May 2013 11:20:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r4SBK1vi017552; Tue, 28 May 2013 11:20:01 GMT (envelope-from gnats) Resent-Date: Tue, 28 May 2013 11:20:01 GMT Resent-Message-Id: <201305281120.r4SBK1vi017552@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Anton Yuzhaninov Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A2D61E21 for ; Tue, 28 May 2013 11:13:24 +0000 (UTC) (envelope-from citrin@example.ru) Received: from mail.openstat.ru (mail.openstat.ru [193.169.234.252]) by mx1.freebsd.org (Postfix) with ESMTP id 5BAFEEAB for ; Tue, 28 May 2013 11:13:23 +0000 (UTC) Received: from monitoring.int.vega.ru ([10.25.1.153]) by mail.openstat.ru with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1UhHqD-000ISg-2R; Tue, 28 May 2013 15:13:21 +0400 Received: from monitoring.int.vega.ru (monitoring.int.vega.ru [10.25.1.153]) by monitoring.int.vega.ru (8.14.5/8.14.5) with ESMTP id r4SBDKFO081609; Tue, 28 May 2013 11:13:20 GMT (envelope-from citrin@example.ru) Received: (from ayuzhaninov@localhost) by monitoring.int.vega.ru (8.14.5/8.14.5/Submit) id r4SBDK2T081608; Tue, 28 May 2013 11:13:20 GMT (envelope-from citrin@example.ru) Message-Id: <201305281113.r4SBDK2T081608@monitoring.int.vega.ru> Date: Tue, 28 May 2013 11:13:20 GMT From: Anton Yuzhaninov To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/179047: [PATCH] net/nss_ldap: dpn't override ${PREFIX}/etc/nss_ldap.conf Cc: mikeg@bsd-box.net X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 May 2013 11:20:02 -0000 >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: