NetBSD Problem Report #39081

From kimmo@global-wire.fi  Wed Jul  2 11:53:26 2008
Return-Path: <kimmo@global-wire.fi>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 9A45163B880
	for <gnats-bugs@gnats.NetBSD.org>; Wed,  2 Jul 2008 11:53:26 +0000 (UTC)
Message-Id: <20080702115323.121D72AC6A@beowulf.gw.com>
Date: Wed,  2 Jul 2008 14:53:23 +0300 (EEST)
From: kimmo@global-wire.fi
To: gnats-bugs@gnats.NetBSD.org
Subject:
X-Send-Pr-Version: 3.95

>Number:         39081
>Category:       pkg
>Synopsis:       
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    adrianp
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 02 11:55:00 +0000 2008
>Closed-Date:    Tue Jul 08 20:31:39 +0000 2008
>Last-Modified:  Tue Jul 08 20:31:39 +0000 2008
>Originator:     Kimmo Suominen
>Release:        NetBSD 3.99.5 / pkgsrc-current (2008-02-07)
>Organization:
<A HREF="http://kimmo.suominen.com/">Kimmo Suominen</A>
>Environment:
System: NetBSD beowulf.gw.com 3.99.5 NetBSD 3.99.5 (GW-GENERIC) #0: Wed Jul 20 22:59:59 EEST 2005 aselonen@fw.selonen.org:/fs/cvs/obj/i386/src/sys/arch/i386/compile/GW-GENERIC i386
Architecture: i386
Machine: i386
Userland: 3.99.1 (2005-03-27)
>Description:
Package databases/pear-DB will not install, because the pear command
does not find its dependencies.

It looks like pear is looking for /usr/pkg/lib/php5/pear/PEAR, even
though the installed files are in /usr/pkg/lib/php5/PEAR.  The latter
is the path I'd expect PEAR to use (and what it used to use before,
e.g. with php-5.1.6, when there was no separate php5-pear package).
>How-To-Repeat:
beowulf:...databases/pear-DB# make
=> Bootstrap dependency digest>=20010302: found digest-20050731
===> Checking for vulnerabilities in php5-pear-DB-1.7.6
=> Checksum SHA1 OK for pear/DB-1.7.6.tgz
=> Checksum RMD160 OK for pear/DB-1.7.6.tgz
===> Installing dependencies for php5-pear-DB-1.7.6
=> Full dependency php5-pear-[0-9]*: found php5-pear-1.5.4nb1
=> Full dependency php>=5.1.2: found php-5.2.6
===> Overriding tools for php5-pear-DB-1.7.6
===> Extracting for php5-pear-DB-1.7.6
===> Patching for php5-pear-DB-1.7.6
===> Creating toolchain wrappers for php5-pear-DB-1.7.6
===> Configuring for php5-pear-DB-1.7.6
beowulf:...databases/pear-DB# make install
=> Bootstrap dependency digest>=20010302: found digest-20050731
===> Checking for vulnerabilities in php5-pear-DB-1.7.6
===> Installing for php5-pear-DB-1.7.6
cd /usr/obj/i386/pkgsrc/databases/pear-DB/work.i386/DB-1.7.6 && /usr/pkg/bin/pear "install"  package.xml || exit 1
Did not download dependencies: pear/PEAR, use --alldeps or --onlyreqdeps to download automatically
pear/DB requires package "pear/PEAR" (version >= 1.0b1)
No valid packages found
install failed
*** Error code 1

Stop.
make: stopped in /src/pkgsrc/databases/pear-DB
*** Error code 1

Stop.
make: stopped in /src/pkgsrc/databases/pear-DB
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/databases/pear-DB
Exit 1

>Fix:
I could not figure out where the additional "pear" directory is coming
from.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->adrianp
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Wed, 02 Jul 2008 12:50:47 +0000
Responsible-Changed-Why:
Assign pear and pear-DB mailtainer.


From: Mark Davies <mark@mcs.vuw.ac.nz>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/39081:
Date: Sat, 5 Jul 2008 14:57:48 +1200

 --Boundary-00=_sMubIbUtIC4aSpz
 Content-Type: text/plain;
   charset="iso-8859-1"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline

 On Wednesday 02 July 2008 23:55:01 kimmo@global-wire.fi wrote:
 > Package databases/pear-DB will not install, because the pear command
 > does not find its dependencies.
 >
 > It looks like pear is looking for /usr/pkg/lib/php5/pear/PEAR, even
 > though the installed files are in /usr/pkg/lib/php5/PEAR.  The latter
 > is the path I'd expect PEAR to use (and what it used to use before,
 > e.g. with php-5.1.6, when there was no separate php5-pear package).

 I struck this a while ago and made the attached change to fix it but I 
 don't now remember the reasoning behind the change.

 cheers
 mark

 --Boundary-00=_sMubIbUtIC4aSpz
 Content-Type: text/x-diff;
   charset="iso-8859-1";
   name="diff"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: attachment;
 	filename="diff"

 Index: pear.mk
 ===================================================================
 RCS file: /src/cvs/netbsd/pkgsrc/lang/php/pear.mk,v
 retrieving revision 1.11
 diff -u -r1.11 pear.mk
 --- pear.mk	12 Jun 2008 00:20:10 -0000	1.11
 +++ pear.mk	24 Jun 2008 01:23:48 -0000
 @@ -46,6 +46,7 @@
  	${ECHO} "@comment The following lines are automatically generated"; \
  	PEAR_LIB="${PEAR_LIB}" WRKSRC="${WRKSRC}" \
  	PEAR_DIRRM_BASEDIR="${PEAR_DIRRM_BASEDIR}" \
 +	PHP_PEAR_SYSCONF_DIR="${PKG_SYSCONFBASE}" \
  	${PREFIX}/bin/php -d include_path=".:${PREFIX}/lib/php" \
  		-C -n ${PKGDIR}/../../lang/php/pear_plist.php;
  GENERATE_PLIST+=	${PEAR_GENERATE_PLIST}
 @@ -56,7 +57,7 @@
  	@cd ${WRKSRC} && ${LN} -s ${WRKDIR}/package.xml package.xml

  do-install:
 -	cd ${WRKSRC} && ${PEAR_CMD} "install" ${PEAR_DESTDIR} package.xml || exit 1
 +	cd ${WRKSRC} && PHP_PEAR_SYSCONF_DIR="${PKG_SYSCONFBASE}" ${PEAR_CMD} "install" ${PEAR_DESTDIR} package.xml || exit 1

  .if ${_USE_DESTDIR} != "no"
  CHECK_FILES_SKIP+=	${PREFIX}/lib/php/.channels/.alias/pear.txt

 --Boundary-00=_sMubIbUtIC4aSpz--

From: Kimmo Suominen <kimmo@global-wire.fi>
To: gnats-bugs@NetBSD.org
Cc: adrianp@NetBSD.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org,
	kimmo@global-wire.fi
Subject: Re: pkg/39081:
Date: Sat, 5 Jul 2008 13:45:21 +0300

 Mark's patch works for me.  I guess this means that the installed "pear"
 command is not looking for its config file in the right place.  I'll try
 to take a look at that at some point.

 Best regards,
 + Kimmo

From: Adrian Portelli <adrianp@stindustries.net>
To: gnats-bugs@NetBSD.org
Cc: kimmo@global-wire.fi
Subject: Re: pkg/39081:
Date: Sun, 06 Jul 2008 19:47:48 +0100

 Hi,

 Sorry but I can't replicate this bug on NetBSD-4 with pkgsrc HEAD.  I've
 setup a clean pkg_comp environment and removed any pear and php binary
 packages I had around the place so everything was built from source.

 I then did a build of databases/pear-DB and the package built fine.  Got 
 anything strange in an mk.conf ?

 adrian.

From: Kimmo Suominen <kimmo@global-wire.fi>
To: Adrian Portelli <adrianp@stindustries.net>
Cc: gnats-bugs@NetBSD.org, kimmo@global-wire.fi
Subject: Re: pkg/39081:
Date: Sun, 6 Jul 2008 23:43:25 +0300

 Hi Adrian,

 You probably need to set

     PKG_SYSCONFBASE=/etc

 or some other non-default value.  My guess is that the installed
 script only looks at the default location inside ${LOCALBASE}.
 However, the rest of the pkgsrc framework respects the setting
 and installs /etc/pear.conf as expected.

 I haven't tested this theory, though, as I don't have a spare
 machine to play with at the moment.

 Best regards,
 + Kimmo


 On Sun, Jul 06, 2008 at 07:47:48PM +0100, Adrian Portelli wrote:
 > Hi,
 >
 > Sorry but I can't replicate this bug on NetBSD-4 with pkgsrc HEAD.  I've
 > setup a clean pkg_comp environment and removed any pear and php binary
 > packages I had around the place so everything was built from source.
 >
 > I then did a build of databases/pear-DB and the package built fine.  Got  
 > anything strange in an mk.conf ?
 >
 > adrian.
 >

From: Adrian Portelli <adrianp@stindustries.net>
To: gnats-bugs@NetBSD.org
Cc: kimmo@global-wire.fi, Mark Davies <mark@mcs.vuw.ac.nz>
Subject: Re: pkg/39081:
Date: Mon, 07 Jul 2008 22:29:12 +0100

 Kimmo Suominen wrote:
 > The following reply was made to PR pkg/39081; it has been noted by GNATS.
 > 
 > From: Kimmo Suominen <kimmo@global-wire.fi>
 > To: Adrian Portelli <adrianp@stindustries.net>
 > Cc: gnats-bugs@NetBSD.org, kimmo@global-wire.fi
 > Subject: Re: pkg/39081:
 > Date: Sun, 6 Jul 2008 23:43:25 +0300
 > 
 >  Hi Adrian,
 >  
 >  You probably need to set
 >  
 >      PKG_SYSCONFBASE=/etc
 >  

 Hi,

 It looks like the problem is with PHP and not PEAR.  Try the attached 
 patch and see how it goes.

 adrian.

 Index: Makefile
 ===================================================================
 RCS file: /cvsroot/pkgsrc/lang/php5/Makefile,v
 retrieving revision 1.64
 diff -u -r1.64 Makefile
 --- Makefile    4 May 2008 16:50:44 -0000       1.64
 +++ Makefile    7 Jul 2008 21:25:19 -0000
 @@ -2,7 +2,7 @@

   PKGNAME=               php-${PHP_BASE_VERS}
   CATEGORIES=            lang
 -
 +PKGREVISION=           1
   HOMEPAGE=              http://www.php.net/
   COMMENT=               PHP Hypertext Preprocessor version 5

 Index: Makefile.common
 ===================================================================
 RCS file: /cvsroot/pkgsrc/lang/php5/Makefile.common,v
 retrieving revision 1.29
 diff -u -r1.29 Makefile.common
 --- Makefile.common     4 May 2008 16:50:44 -0000       1.29
 +++ Makefile.common     7 Jul 2008 21:25:19 -0000
 @@ -1,4 +1,5 @@
   # $NetBSD: Makefile.common,v 1.29 2008/05/04 16:50:44 adrianp Exp $
 +# used by lang/php5/Makefile.php

   .if !defined(DISTNAME)
   DISTNAME=              php-${PHP_BASE_VERS}
 Index: Makefile.php
 ===================================================================
 RCS file: /cvsroot/pkgsrc/lang/php5/Makefile.php,v
 retrieving revision 1.26
 diff -u -r1.26 Makefile.php
 --- Makefile.php        7 Sep 2007 22:12:13 -0000       1.26
 +++ Makefile.php        7 Jul 2008 21:25:19 -0000
 @@ -9,6 +9,7 @@
   USE_LIBTOOL=           YES
   USE_LANGUAGES=         c c++
   GNU_CONFIGURE=         YES
 +BUILD_DEFS+=           VARBASE

   CONFIGURE_ENV+= 
 EXTENSION_DIR="${PREFIX}/${PHP_EXTENSION_DIR}"

 @@ -18,6 +19,8 @@
   .include "../../mk/bsd.prefs.mk"

   CONFIGURE_ARGS+=       --with-config-file-path=${PKG_SYSCONFDIR:Q}
 +CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFDIR:Q}
 +CONFIGURE_ARGS+=       --localstatedir=${VARBASE}

   CONFIGURE_ARGS+=       --with-regex=system

From: Adrian Portelli <adrianp@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/39081 CVS commit: pkgsrc/lang/php5
Date: Tue,  8 Jul 2008 20:28:55 +0000 (UTC)

 Module Name:	pkgsrc
 Committed By:	adrianp
 Date:		Tue Jul  8 20:28:55 UTC 2008

 Modified Files:
 	pkgsrc/lang/php5: Makefile Makefile.common Makefile.php

 Log Message:
 Fix PEAR installs where PKG_SYSCONFDIR is not the default.
 Fixes PR 39081
 PKGREVISION++


 To generate a diff of this commit:
 cvs rdiff -r1.64 -r1.65 pkgsrc/lang/php5/Makefile
 cvs rdiff -r1.29 -r1.30 pkgsrc/lang/php5/Makefile.common
 cvs rdiff -r1.26 -r1.27 pkgsrc/lang/php5/Makefile.php

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: adrianp@NetBSD.org
State-Changed-When: Tue, 08 Jul 2008 20:31:39 +0000
State-Changed-Why:
Fixed in pkgsrc HEAD. Please update to php-5.2.6nb1


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.