Bootstrapping PEAR for distros

From: Date: Thu, 13 Apr 2006 10:34:49 +0000
Subject: Bootstrapping PEAR for distros
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-42206@lists.php.net to get a copy of this message
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? Thanks a lot for any advice, Tim

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