Re: Bootstrapping PEAR for distros

From: Date: Thu, 13 Apr 2006 17:18:17 +0000
Subject: Re: Bootstrapping PEAR for distros
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-42207@lists.php.net to get a copy of this message
On 4/13/06, Tim Jackson <lists@timj.co.uk> wrote: > Hi guys, > > Arguably this is one for the users list, but it's fairly in-depth so if > nobody objects I thought here would be better. > > A number of distributions include PEAR in their own systems/packaging. I > use Fedora and have been working with Joe Orton @ Red Hat (responsible > for PHP/PEAR packaging) to try to make the whole PEAR experience as good > as possible for Fedora users whilst staying with Fedora conventions. > (Hence PEAR_Command_Packaging, though that's not the issue here). > > One big change that I suggested and that has been implemented was to > split off PEAR from the main PHP package. Originally they were generated > together from the PHP source and therefore PEAR only got upgraded when > PHP did. Having it in a separate package means that Fedora can in theory > track PEAR releases closely, and users benefit from new PEAR versions etc.. > > Great, except when you split PEAR into a separate package there comes > the problem of bootstrapping. Ideally we would like the PEAR package to > be built direct from the PEAR tarball (i.e. PEAR-x.y.z.tgz). The trouble > is, we can't see an easy way of doing this in an environment without an > existing PEAR installation (e.g. a build environment). Indeed, it looks > like others can't either: for example, although PLD *do* build from the > tarball, they have to hack around a bit, making calls direct to > pearcmd.php and fiddling lots with internal PEAR files which (although > it works) seems a bit hacky and to require an unnecessarily deep > knowledge of the internal workings of PEAR. PLD spec: > > > http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/php-pear-PEAR.spec > > Mandriva do a similar thing: > > > http://cvs.mandriva.com/cgi-bin/cvsweb.cgi/SPECS/php-pear/php-pear.spec?rev=1.44&content-type=text/x-cvsweb-markup > > So, Joe went down the alternative path of using the .phar installer as > supplied with the PHP core distribution: > > > http://cvs.fedora.redhat.com/viewcvs/rpms/php-pear/FC-5/php-pear.spec?rev=1.10&view=markup > > This is cleaner, but downside of this is that, as far as we can > determine, there isn't an official .phar build for new PEAR releases and > therefore PEAR in Fedora is currently locked to the last PEAR version > included in a PHP release, which mostly defeats the object of splitting > the package off. > > So, at the moment, there seem to be two main options: > > - bootstrap the PLD/Mandriva way. OK, but I think Joe's concerns about > this being a bit hacky are not entirely unreasonable. > > - add PHP_Archive (including an interesting circular dependency) to the > build process so that the PEAR build process uses PHP_Archive to take > the PEAR tarball, builds a .phar using PEAR_Package and then carries on > as currently. This seems horrendously inelegant. > > > The questions are: > > - Are we missing something? Is there a simpler way of bootstrapping PEAR > from the normal tarballs? > > - What would you recommend to bootstrap in a distro environment? > > Bootstrap PEAR with go-pear. That's how it's done. The phar is convenient, but you don't need to use it, you can just use go-pear.org. If you use the normal go-pear you should get the newest packages. It's a bit hackish in the first place for distros to be repackaging PEAR packages and installing them with its installer since PEAR has its own installer. The correct way to upgrade PEAR packages is to use the PEAR installer directly. -- Justin Patrin

« previous php.pear.dev (#42207) next »