Home » PEAR » PEAR_Command_Packaging » Bug #6738
Various problems with 'pear makerpm'
Details
| Request #6738 | Various problems with 'pear makerpm' |
|---|---|
| Submitted | 2006-02-09 19:48 UTC |
| From | dlutter at redhat dot com |
| Assigned | timj |
| Status | Closed |
| Package | PEAR_Command_Packaging |
| PHP Version | 5.0.4 |
| OS | Fedora Core 4 |
| Roadmaps | (Not assigned) |
Comments
[2006-02-09 19:48 UTC] dlutter at redhat dot com
Description:
------------
The spec files that 'pear makerpm' produces deviate from recommended practices for building rpm's in a number of ways:
- The %files section claims ownership of '/'; this is a big nono. Instead, the package should only claim ownership of the actual files that belong to the pear
- The specfile needs to have Requires and BuildRequires tags for the package pear came in (php-pear for FC)
- BuildRoot should by default be set to '%{_tmppath}/%{name}-%{version}-root-%(%{__id_u} -n)'
- The default name for the spec file should not contain the version number of the pear. Also, naming the rpm's and specfiles something like 'php-pear-PEARNAME' (e.g. php-pear-Log) instead of PEAR::Log would be more in line with standard packaging practice
[2006-02-10 12:15 UTC] timj at php dot net
David,
There is a lot going on in this area at the moment. First take a look back home (at Red Hat) at some of the pear makerpm bugs, e.g.:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=176725
Also do a search for "pear makerpm" on the PEAR bug system.
Myself & jorton@redhat have been working hard on cleaning things up a bit for Fedora. The latest version of php-pear in Fedora CVS is a significant improvement although still not quite there.
Also by way of a proof-of-concept I have submitted php-pear-DB as an FE package:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=176733
My goal there is to establish what is a "good" spec file and work backwards from that. My goal is that Fedora, out of the box, should generate spec files that are as close to Fedora/RH packaging conventions as possible. Bear in mind as well that there is a need to divide what is "good" into "generally applicable" and "distro-specific" stuff. As you will see from the many PEAR and Red Hat bugs filed by me in the last 2 months, I have been trying to push "general" stuff upstream whilst pushing "local" stuff into Fedora.
To further that goal I am taking over the pear makerpm stuff in the separate package PEAR_Command_Packaging. I am working to make as many changes as possible here upstream, so long as they are generally applicable. Indeed, if you check CVS for PEAR_Command_Packaging this morning you will see a number of important fixes, not least ones that make it easier to make distro-specific changes downstream (see PEAR bug #6375).
As for naming conventions, I intend to stick with PEAR::XXX_YYY here upstream (at least for the time being) to avoid causing grief to those who have been using the PEAR defaults in the past. However with the patch discussed above, Fedora/Red Hat should only need a couple-of-lines patch to convert that to php-pear-XXX-YYY.
Hope that explains things. Hang in there, and any testing/comments on PEAR_Command_Packaging as it develops are most welcome. Once a release is made, I will submit php-pear-PEAR-Command-Packaging to Fedora Extras, with appropriate distro-naming-convention patches.
[2006-02-10 13:00 UTC] timj at php dot net
Most of these issues are now fixed in CVS.
David, to do what you want:
pear make-rpm-spec -d "php-pear(%s)" -p "php-pear-%S" ../SOURCES/Net_Socket-1.0.6.tgz
will give you something that is quite close to what you want, including a BuildRequire on base PEAR.
Making sure that the package owns the correct files (rather than /) is a slightly more complex deal and will be addressed soon.
[2006-02-21 22:54 UTC] timj at php dot net
Claiming ownership of / isn't, but isn't a blocker (it's been like that forever, and does work) and needs some thought to get it working generically. Will investigate/fix when I get a chance but this doesn't need to block an initial release.
[2006-03-15 23:37 UTC] timj at php dot net
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.
/ is no longer owned in the CVS version.