Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.3.0

Bug #10254 RPM-building specs for external channels fails
Submitted: 2007-03-03 11:48 UTC
From: timj at php dot net Assigned: timj
Status: Closed Package: PEAR_Command_Packaging (version CVS)
PHP Version: Irrelevant OS:
Roadmaps: 0.2.0    
Subscription  


 [2007-03-03 11:48 UTC] timj at php dot net (Tim Jackson)
Description: ------------ This is related to bug #9932. Specs for packages from channels other than pear.php.net can be correctly generated from the latest CVS version, but when you try to rpmbuild them, the process fails due to the fact that the temporary rpmbuild PEAR installation does not have the external channel registered. Test script: --------------- $ pear make-rpm-spec Chiara_PEAR_Server-0.18.7.tgz ... $ rpmbuild -ba CHIARA::Chiara_PEAR_Server-0.18.7.spec ... + pear -c pearrc install --nodeps --packagingroot /var/tmp/CHIARA::Chiara_PEAR_Server-0.18.7-root-user /path/to/rpmbuild/SOURCES/Chiara_PEAR_Server-0.18.7.tgz Unknown channel "pear.chiaraquartet.net" Parsing of package.xml from file "/path/to/cache/package.xml" failed Cannot initialize '/path/to/rpmbuild/SOURCES/Chiara_PEAR_Server-0.18.7.tgz', invalid or missing package file Package "/path/to/rpmbuild/SOURCES/Chiara_PEAR_Server-0.18.7.tgz" is not valid install failed

Comments

 [2007-03-03 11:52 UTC] timj at php dot net (Tim Jackson)
This is not particularly easy to fix in a "clean" way due to PEAR's intrinsic linking of channel metadata with package metadata. I think we could possibly do with a --ignore-channel-metadata flag to the "pear" binary. Anyway in the meantime I guess the fix is (as suggested in bug #9932) for PCP to include a copy of channel.xml with external packages. This is not particularly nice.
 [2007-03-04 11:20 UTC] timj at php dot net (Tim Jackson)
Actually, on reflection, the right way to do this is with separate "channel" RPM packages (goodness knows what we'd call them, maybe php-channel-chiara or something) which are a BR of packages from that channel. We'd still have to fiddle at RPM build time to make sure that the channel gets channel-discover'd in the package's build process. I'm not sure whether it's possible to channel-discover from a static XML file. If not, this is a major problem. I guess PEAR_Command_Packaging is the right place to generate "channel" RPM packages. My initial thought is to make it such that: pear make-rpm-spec channel:pear.chiaraquartet.net generates an RPM spec file for that channel.
 [2007-03-04 16:41 UTC] cellog (Greg Beaver)
channel.xml can be used offline to add a new channel. The command is "channel-add" pear help channel-add should answer any usage questions. The idea of having separate RPMS just for the channel.xml is a very good idea, and a simple way to implement channel support for RPMs. This way, channel packages can simply depend on the channel.xml RPM, which is going to be something like a 200 byte package, so not a huge burden :) If you can have . in the channel name, use pear-channel-pear.chiaraquartet.net as the RPM name. The alias is not guaranteed to be unique. Otherwise, mangle the . so that you can simulate the uniqueness
 [2007-03-11 01:05 UTC] timj (Tim Jackson)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. CVS now contains a fix which means that packages requiring external channels will have a BuildRequire of php-channel([channelname]). To go alongside this, "pear make-rpm-spec channel.xml" (where channel.xml is a downloaded channel description file) will generate a php-channel-XXX package.