Subject: pkg/30359: www/php-eaccelerator fails to fetch the distribution file.
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <mikawa@terra.dti.ne.jp>
List: pkgsrc-bugs
Date: 05/28/2005 16:48:00
>Number: 30359
>Category: pkg
>Synopsis: www/php-eaccelerator fails to fetch the distribution file.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat May 28 16:48:00 +0000 2005
>Originator: Masanori Mikawa
>Release: NetBSD 3.99.3
>Organization:
>Environment:
System: NetBSD raven 3.99.3 NetBSD 3.99.3 (RAVEN) #0: Thu May 26 19:32:11 JST 2005 root@raven:/a/NetBSD/obj.i386/sys/arch/i386/compile/RAVEN i386
Architecture: i386
Machine: i386
>Description:
I tried to build www/php-eaccelerator package with php-5.0.4
but it failed to fetch the distribution file.
The package specified MASTER_SITES is
${MASTER_SITE_SOURCEFORGE:=eaccelerator/}, EXTRACT_SUFX is .tar.gz
and PECL_VERSION is 0.9.2a.
But the package tried to fetch the distribution file from
http://pecl.php.net/get/ with .tgz suffix.
The package's Makefile includes lang/php/ext.mk makefile.
ext.mk overrides MASTER_SITES and EXTRACT_SUFX to
http://pecl.php.net/get/ and .tgz, if PECL_VERSION is defined.
The package tries to fetch the distribution file
from overrided MASTER_SITES with overrided EXTRACT_SUFX,
it never succeed.
>How-To-Repeat:
Enter the command 'make fetch' on
www/php-eaccelerator subdirectory of pkgsrc.
If you already have the distribution file
(distfiles/php-eaccelerator/eaccelerator-0.9.2a.tar.gz),
remove it first.
# pwd
/usr/pkgsrc/www/php-eaccelerator
# make fetch
=> eaccelerator-0.9.2a.tgz doesn't seem to exist on this system.
=> Attempting to fetch eaccelerator-0.9.2a.tgz from http://pecl.php.net/get/.
ftp: Error retrieving file - `404 Not Found'
=> Attempting to fetch eaccelerator-0.9.2a.tgz from http://ftp.fi.NetBSD.org/pub/NetBSD/packages/distfiles/php-eaccelerator/.
=> FTP didn't fetch expected file, trying next site.
=> Attempting to fetch eaccelerator-0.9.2a.tgz from ftp://ftp.NetBSD.org/pub/NetBSD/packages/distfiles/php-eaccelerator/.
Trying 2001:4f8:4:7:2e0:81ff:fe21:6563...
ftp: connect to address 2001:4f8:4:7:2e0:81ff:fe21:6563: No route to host
Trying 204.152.190.13...
eaccelerator-0.9.2a.tgz: No such file or directory.
=> Attempting to fetch eaccelerator-0.9.2a.tgz from ftp://ftp.FreeBSD.org/pub/FreeBSD/distfiles/php-eaccelerator/.
Trying 2001:4f8:0:2::e...
ftp: connect to address 2001:4f8:0:2::e: No route to host
Trying 204.152.184.73...
Failed to change directory.
=> Couldn't fetch eaccelerator-0.9.2a.tgz - please try to retrieve this
=> file manually into /usr/pkgsrc/distfiles/php-eaccelerator and try again.
*** Error code 1
Stop.
make: stopped in /usr/pkgsrc/www/php-eaccelerator
*** Error code 1
Stop.
make: stopped in /usr/pkgsrc/www/php-eaccelerator
>Fix:
Modify lang/php/ext.mk. Assign MASTER_SITES and EXTRACT_SUFX
if it is not already defined.
(The problem can fix by modifying the package's Makefile to assign
MASTER_SITES and EXTRACT_SUFX after including ext.mk.
But modified Makefile does not follow the order of the pkgsrc
variables. It is not preferable.)
The following patch is for that based upon lang/php/ext.mk
revision 1.5.
I tested patched ext.mk with php-5.0.4 to archivers/php-zip,
print/php-pdflib, www/php-eaccelerator and www/php4-apc package.
These packages includes lang/php/ext.mk and defines PECL_VERSION.
--- lang/php/ext.mk.orig 2004-12-12 18:13:56.000000000 +0900
+++ lang/php/ext.mk
@@ -26,10 +26,10 @@ DISTINFO_FILE= ${.CURDIR}/${PHPPKGSRCDI
.else
# PECL extension
PKGNAME?= php-${MODNAME}-${PHP_BASE_VERS}.${PECL_VERSION}
-MASTER_SITES= http://pecl.php.net/get/
+MASTER_SITES?= http://pecl.php.net/get/
DISTNAME= ${MODNAME}-${PECL_VERSION}
DIST_SUBDIR= php-${MODNAME}
-EXTRACT_SUFX= .tgz
+EXTRACT_SUFX?= .tgz
.endif
PHPIZE?= ${BUILDLINK_PREFIX.php}/bin/phpize