#44354 [NEW]: php build fails due to permissions on /tmp/pear/cache from existing install

2008-03-06 Thread cos at aaaaa dot org
From: cos at a dot org
Operating system: RedHat Linux - RHEL 4
PHP version:  5.2.5
PHP Bug Type: Compile Failure
Bug description:  php build fails due to permissions on /tmp/pear/cache from 
existing install

Description:

I am trying to build PHP 5.2.5 for an RPM, on a system which already 
has PHP 5.2.4 installed (I built that RPM several months ago).  In 
order to build the RPM, I need to make and install into a temporary 
local directory, as an unprivileged user.  The build fails with this 
error:

Installing PEAR environment:  /hlg/rpmbuild/buildroot/php-5.2.5-1-
manual/usr/local/lib/php/download directory /tmp/pear/cache is not 
writeable.  Change download_dir config variable to a writeable dir
 ...

... followed by a series of related errors, and resulting in an 
incomplete install tree.

I think this bug someone filed with debian.org is the same problem:
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=463979


Note: php.net directed me to file PEAR-related bugs on the PEAR web 
site; however, their bug system seems to only want bugs about to 
specific pear packages, so this problem did not seem to fit there.

Reproduce code:
---
Unpack PHP tarfile.
Configure it with the --with-pear option.

# mkdir -p /rpmbuild/buildroot/php-5.2.5-1-manual/etc/httpd/conf/
# cp -p /etc/httpd/conf/httpd.conf
/rpmbuild/buildroot/php-5.2.5-1-manual/etc/httpd/conf/
# make INSTALL_ROOT=/rpmbuild/buildroot/php-5.2.4-4-manual install



Expected result:

I expect a complete PHP install tree, with PEAR, in 
/rpmbuild/buildroot/php-5.2.5-1-manual/

Actual result:
--
Installing PHP SAPI module:   apache2handler
/usr/lib/httpd/build/instdso.sh SH_LIBTOOL='/bin/sh 
/usr/lib/apr/build/libtool' libphp5.la /rpmbuild/buildroot/php-5.2.4-
4-manual/usr/lib/httpd/modules
/bin/sh /usr/lib/apr/build/libtool --mode=install cp libphp5.la 
/rpmbuild/buildroot/php-5.2.4-4-manual/usr/lib/httpd/modules/
cp .libs/libphp5.so /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/lib/httpd/modules/libphp5.so
cp .libs/libphp5.lai /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/lib/httpd/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish 
/home/cos/php-5.2.4/libs'
chmod 755 /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/lib/httpd/modules/libphp5.so
[activating module `php5' in /rpmbuild/buildroot/php-5.2.4-4-
manual/etc/httpd/conf/httpd.conf]
Installing PHP CLI binary:/rpmbuild/buildroot/php-5.2.4-4-
manual/usr/local/bin/
Installing PHP CLI man page:  /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/local/man/man1/
Installing build environment: /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/local/lib/php/build/
Installing header files:  /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/local/include/php/
Installing helper programs:   /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/local/bin/
  program: phpize
  program: php-config
Installing man pages: /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/local/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:  /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/local/lib/php/
download directory /tmp/pear/cache is not writeable.  Change 
download_dir config variable to a writeable dir
[PEAR] Console_Getopt: Cannot initialize 'phar://install-pear-
nozlib.phar/Console_Getopt-1.2.3.tar', invalid or missing package file
download directory /tmp/pear/cache is not writeable.  Change 
download_dir config variable to a writeable dir
[PEAR] Archive_Tar: Cannot initialize 'phar://install-pear-
nozlib.phar/Archive_Tar-1.3.2.tar', invalid or missing package file
download directory /tmp/pear/cache is not writeable.  Change 
download_dir config variable to a writeable dir
[PEAR] Structures_Graph: Cannot initialize 'phar://install-pear-
nozlib.phar/Structures_Graph-1.0.2.tar', invalid or missing package 
file
download directory /tmp/pear/cache is not writeable.  Change 
download_dir config variable to a writeable dir
[PEAR] PEAR: Cannot initialize 'phar://install-pear-nozlib.phar/PEAR-
1.6.1.tar', invalid or missing package file
Installing PDO headers:  /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/local/include/php/ext/pdo/

(also at http://pastebin.com/f5c6ff39a )

-- 
Edit bug report at http://bugs.php.net/?id=44354edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44354r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44354r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44354r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44354r=fixedcvs
Fixed in release: 
http://bugs.php.net/fix.php?id=44354r=alreadyfixed
Need backtrace:   http://bugs.php.net/fix.php?id=44354r=needtrace
Need Reproduce Script:http://bugs.php.net/fix.php?id=44354r=needscript
Try newer version:http://bugs.php.net/fix.php?id=44354r=oldversion
Not developer

#44354 [Opn]: php build fails due to permissions on /tmp/pear/cache from existing install

2008-03-06 Thread cos at aaaaa dot org
 ID:   44354
 User updated by:  cos at a dot org
 Reported By:  cos at a dot org
 Status:   Open
 Bug Type: Compile Failure
 Operating System: RedHat Linux - RHEL 4
 PHP Version:  5.2.5
 New Comment:

The key, I think, is the INSTALL_ROOT I defined for php's make.

In the past, I believe this affected the pear build as well; now, it 
seems the pear build done by the php Makefile does not look at this,
and 
instead uses the same temp dir and subdirectories as it would use at 
runtime, which is what puts it in conflict with what's already
installed 
and in use on the system.

However, I can't figure out what changed in PHP such that INSTALL_ROOT

used to be honored but now isn't.


Previous Comments:


[2008-03-06 21:41:29] cos at a dot org

Description:

I am trying to build PHP 5.2.5 for an RPM, on a system which already 
has PHP 5.2.4 installed (I built that RPM several months ago).  In 
order to build the RPM, I need to make and install into a temporary 
local directory, as an unprivileged user.  The build fails with this 
error:

Installing PEAR environment:  /hlg/rpmbuild/buildroot/php-5.2.5-1-
manual/usr/local/lib/php/download directory /tmp/pear/cache is not 
writeable.  Change download_dir config variable to a writeable dir
 ...

... followed by a series of related errors, and resulting in an 
incomplete install tree.

I think this bug someone filed with debian.org is the same problem:
  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=463979


Note: php.net directed me to file PEAR-related bugs on the PEAR web 
site; however, their bug system seems to only want bugs about to 
specific pear packages, so this problem did not seem to fit there.

Reproduce code:
---
Unpack PHP tarfile.
Configure it with the --with-pear option.

# mkdir -p /rpmbuild/buildroot/php-5.2.5-1-manual/etc/httpd/conf/
# cp -p /etc/httpd/conf/httpd.conf
/rpmbuild/buildroot/php-5.2.5-1-manual/etc/httpd/conf/
# make INSTALL_ROOT=/rpmbuild/buildroot/php-5.2.4-4-manual install



Expected result:

I expect a complete PHP install tree, with PEAR, in 
/rpmbuild/buildroot/php-5.2.5-1-manual/

Actual result:
--
Installing PHP SAPI module:   apache2handler
/usr/lib/httpd/build/instdso.sh SH_LIBTOOL='/bin/sh 
/usr/lib/apr/build/libtool' libphp5.la /rpmbuild/buildroot/php-5.2.4-
4-manual/usr/lib/httpd/modules
/bin/sh /usr/lib/apr/build/libtool --mode=install cp libphp5.la 
/rpmbuild/buildroot/php-5.2.4-4-manual/usr/lib/httpd/modules/
cp .libs/libphp5.so /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/lib/httpd/modules/libphp5.so
cp .libs/libphp5.lai /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/lib/httpd/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish 
/home/cos/php-5.2.4/libs'
chmod 755 /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/lib/httpd/modules/libphp5.so
[activating module `php5' in /rpmbuild/buildroot/php-5.2.4-4-
manual/etc/httpd/conf/httpd.conf]
Installing PHP CLI binary:/rpmbuild/buildroot/php-5.2.4-4-
manual/usr/local/bin/
Installing PHP CLI man page:  /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/local/man/man1/
Installing build environment: /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/local/lib/php/build/
Installing header files:  /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/local/include/php/
Installing helper programs:   /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/local/bin/
  program: phpize
  program: php-config
Installing man pages: /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/local/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:  /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/local/lib/php/
download directory /tmp/pear/cache is not writeable.  Change 
download_dir config variable to a writeable dir
[PEAR] Console_Getopt: Cannot initialize 'phar://install-pear-
nozlib.phar/Console_Getopt-1.2.3.tar', invalid or missing package file
download directory /tmp/pear/cache is not writeable.  Change 
download_dir config variable to a writeable dir
[PEAR] Archive_Tar: Cannot initialize 'phar://install-pear-
nozlib.phar/Archive_Tar-1.3.2.tar', invalid or missing package file
download directory /tmp/pear/cache is not writeable.  Change 
download_dir config variable to a writeable dir
[PEAR] Structures_Graph: Cannot initialize 'phar://install-pear-
nozlib.phar/Structures_Graph-1.0.2.tar', invalid or missing package 
file
download directory /tmp/pear/cache is not writeable.  Change 
download_dir config variable to a writeable dir
[PEAR] PEAR: Cannot initialize 'phar://install-pear-nozlib.phar/PEAR-
1.6.1.tar', invalid or missing package file
Installing PDO headers:  /rpmbuild/buildroot/php-5.2.4-4-
manual/usr/local/include/php/ext/pdo/

(also at http://pastebin.com/f5c6ff39a )





-- 
Edit