PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » PEAR » PEAR » Bug #5448

pear install --installroot broken

Details

Submitted2005-09-18 14:46 UTC
Fromglen at delfi dot ee
StatusDuplicate
PackagePEAR
PHP Version5.0.5
OSPLD Linux
Roadmaps(Not assigned)

Comments

[2005-09-18 14:46 UTC] glen at delfi dot ee

Description:
------------
pear --installroot leaves the installroot into
@@-replacement variables.

Test script:
---------------
$ pear install --installroot=/tmp/kokojambo --nodeps PEAR-1.4.0RC2.tgz

$ grep -C1 kokojambo /tmp/kokojambo/usr/bin/pear
else
if test "/tmp/kokojambo/usr/share/pear" = '@'php_dir'@'; then
INCDIR=`dirname $0`
--
else
INCDIR="/tmp/kokojambo/usr/share/pear"
INCARG="-d include_path=/tmp/kokojambo/usr/share/pear"
fi

Expected result:
----------------
$INSTALLROOT not being stored in output files:


else
if test "/usr/share/pear" = '@'php_dir'@'; then
INCDIR=`dirname $0`
--
else
INCDIR="/usr/share/pear"
INCARG="-d include_path=/usr/share/pear"
fi

[2005-09-18 15:19 UTC] glen at delfi dot ee

gehenna(wintersunset) distfiles # pear install
--installroot=/tmp/kokojambo --nodeps PEAR-1.3.5.tgz
install ok: PEAR 1.3.5

gehenna(wintersunset) distfiles #
less /tmp/kokojambo/usr/bin/pear
#!/bin/sh

# first find which PHP binary to use
if test "x$PHP_PEAR_PHP_BIN" != "x"; then
PHP="$PHP_PEAR_PHP_BIN"
else
if test "/usr/bin/php" = '@'php_bin'@'; then
PHP=php
else
PHP="/usr/bin/php"
fi
fi

# then look for the right pear include dir
if test "x$PHP_PEAR_INSTALL_DIR" != "x"; then
INCDIR=$PHP_PEAR_INSTALL_DIR
INCARG="-d include_path=$PHP_PEAR_INSTALL_DIR"
else
if test "/usr/lib/php" = '@'php_dir'@'; then
INCDIR=`dirname $0`
INCARG=""
else
INCDIR="/usr/lib/php"
INCARG="-d include_path=/usr/lib/php"
fi
fi

exec $PHP -C -q $INCARG -d output_buffering=1
$INCDIR/pearcmd.php "$@"

[2006-01-09 11:10 UTC] glen at delfi dot ee

still doesn't work. it apears to need system pear files to
exist and
being writable to current user:


$ strace -eopen pear -d doc_dir=/docs -d
php_dir=/usr/share/pear -d bin_dir=/usr/bin -d
data_dir=/usr/share/pear/data -d
test_dir=/usr/share/pear/tests install
--packagingroot=/home/builder/rpm/pld/pear/BUILD/PEAR-1.4.6
--offline
--nodeps /home/builder/rpm/pld/pear/SOURCES/PEAR-1.4.6.tgz
[...]

open("/usr/share/pear/.lock", O_RDONLY) = 3
open("/usr/share/pear/PEAR/ChannelFile.php", O_RDONLY) = 4
open("/usr/share/pear/PEAR/ErrorStack.php", O_RDONLY) = 4
open("/usr/share/pear/PEAR/XMLParser.php", O_RDONLY) = 4
open("/usr/share/pear/PEAR/Common.php", O_RDONLY) = 4
open("/usr/share/pear/.channels/pear.php.net.reg",
O_RDONLY) = 4
open("/usr/share/pear/.channels/pear.php.net.reg",
O_RDONLY) = 4
Cannot install, php_dir for channel "pear.php.net" is not
writeable by the current user
open("/home/builder/tmp/tmpq2n2dJ", O_RDONLY|O_NONBLOCK|
O_DIRECTORY) = 3


expected:
it should work files *only* under
/home/builder/rpm/pld/pear/BUILD/PEAR-1.4.6
and *nowhere* outside that dir.