Subject: pkg/28718: lang/php5 doesn't fully honor PKG_SYSCONFDIR
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <schmonz-lists-netbsd-public-bugs-sendpr@schmonz.com>
List: pkgsrc-bugs
Date: 12/20/2004 00:27:00
>Number:         28718
>Category:       pkg
>Synopsis:       lang/php5 doesn't fully honor PKG_SYSCONFDIR
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec 20 00:27:00 +0000 2004
>Originator:     Amitai Schlair
>Release:        NetBSD 2.0
>Organization:
Schmonz Enterprises
>Environment:
System: NetBSD mood-tooth.scl.cwru.edu 2.0 NetBSD 2.0 (GENERIC) #0: Thu Dec 2 13:16:48 EST 2004 schmonz@mood-tooth.scl.cwru.edu:/home/schmonz/builds/2-0-i386/obj/home/schmonz/netbsd/src-2-0/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
I set PKG_SYSCONFBASE=/etc in /etc/mk.conf. lang/php5 installs a
php.ini in /etc, as it should, but this file doesn't affect PHP's
behavior because '--with-config-file-path=/usr/pkg/etc/' was passed
to ./configure.
>How-To-Repeat:
Set PKG_SYSCONFBASE to any non-default value. php.ini will be
installed in the correct location, but will not affect PHP's
behavior.
>Fix:
The following may be sufficient, depending on which other PHP config
files (if any) are affected by --with-config-file-path.

Index: Makefile.php
===================================================================
RCS file: /cvsroot/pkgsrc/lang/php5/Makefile.php,v
retrieving revision 1.2
diff -u -r1.2 Makefile.php
--- Makefile.php        17 Dec 2004 07:36:13 -0000      1.2
+++ Makefile.php        20 Dec 2004 00:11:26 -0000
@@ -17,7 +17,7 @@
 
 .include "../../mk/bsd.prefs.mk"
 
-CONFIGURE_ARGS+=       --with-config-file-path=${PREFIX}/etc/
+CONFIGURE_ARGS+=       --with-config-file-path=${PKG_SYSCONFDIR}/
 CONFIGURE_ARGS+=       --with-regex=system
 
 CONFIGURE_ARGS+=       --without-mysql