Home » PEAR » PEAR_Command_Packaging » Bug #10254
RPM-building specs for external channels fails
Details
| Submitted | 2007-03-03 11:48 UTC |
|---|---|
| From | timj at php dot net |
| Assigned | timj |
| Status | Closed |
| Package | PEAR_Command_Packaging |
| PHP Version | Irrelevant |
| Roadmaps | 0.2.0 |
Comments
[2007-03-03 11:48 UTC] timj at php dot net
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
[2007-03-03 11:52 UTC] timj at php dot net
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
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.