Red Hat Bugzilla – Bug 176725
Miscellaneous problems with "pear makerpm"
Last modified: 2007-11-30 17:11:20 EST
Description of problem:
Although it fixes bug #173270 and bug #173814, the current version of PEAR
(1.4.5) has a "pear makerpm" function which has the following problems as far as
Fedora is concerned:
1. (General problem) RPMs cannot be uninstalled. Bug pushed upstream:
2. (General problem) Documentation installation causes rpmbuild to fail. Fixed
upstream in CVS: http://pear.php.net/bugs/bug.php?id=6047
3. (Fedora specific) File locations in template.spec do not match RH/Fedora
naming conventions (i.e. /usr/share/pear/...)
4. (Fedora specific) Format of package names and Requires/Provides does not
match new Fedora conventions [Name: php-pear-Package-Name; Provides/Requires:
php-pear(Package_Name)]. Although this is a Fedora-specific problem, the
solution can be facilitated in a generalised way: see
5. (Generalish) pear makerpm does not generate deps on php extensions (e.g.
php-pcre). This would be a Good Thing though requires bug #173804 to be resolved.
Since these problems are preventing simple use of "pear makerpm" under Fedora it
would be good to fix them with an updated package, even the ones that may
eventually be fixed upstream. In any case, the Fedora-specific ones are always
going to require local patches since upstream are presumably not going to change
established conventions. Thus, I have patched the Fedora php-pear RPM to resolve
all these problems. Patch list below.
Spec file : php-pear-spec-makerpm-fixup.patch
Problem 1 : php-pear-1.4.5-template-postun.patch
Problems 2,3: php-pear-1.4.5-template-fixes.patch
Problem 4: php-pear-1.4.5-makerpm-cleanup.patch
Problem 5: php-pear-1.4.5-makerpm-rh-namingconvs.patch (again)
Version-Release number of selected component (if applicable):
Created attachment 122652 [details]
Patch for the spec file incorporating makerpm fixes
Created attachment 122653 [details]
Rollup fixes to template for RH naming convs and PEAR bug 6047
Created attachment 122654 [details]
Fix for PEAR bug 5373 (RPMs can't be uninstalled)
Created attachment 122655 [details]
Additional functionality for makerpm that enables easier distro-specific naming conventions (PEAR bug 6375)
Created attachment 122656 [details]
Patch for RH/Fedora naming conventions. Also includes patch to generate deps on php-[ext]
Tim; these patches don't seem to actually apply if I upgared to 1.4.6, they
really are for 1.4.5? Have you got rediffed versions vs 1.4.6 handy?
+ /usr/bin/patch -p0 data/PEAR/template.spec
patching file data/PEAR/template.spec
Hunk #2 FAILED at 10.
Hunk #3 FAILED at 18.
Hunk #4 FAILED at 52.
3 out of 4 hunks FAILED -- saving rejects to file data/PEAR/template.spec.rej
Hmm, the 1.4.6 template.spec has changed so I'm not entirely surprised they
don't apply. I'll do a new set shortly.
Created attachment 123160 [details]
Patch to put PEAR stuff in the right place
New patch for 1.4.6 eliminates most of the fixes as they have already been done
upstream. Also makes the detection of PEAR installation generic rather than
FC/RH-specific (as suggested in bug #176733) which means these changes can be
pushed upstream in future (I will do).
The rest of the patches (template-postun, makerpm-cleanup and
makerpm-rh-namingconvs) are still needed but all apply fine to PEAR 1.4.6. Need
to be applied in the above order, though, and after the
php-pear-1.4.6-template-fixes.patch (attachment #123160 [details]) that I just uploaded.
OK, this should all be fixed in 1.4.6-1; please let me know if I've missed
Looks great Joe - thanks - *except* that there is the huge problem of bug
#173804 - this *really* needs fixing or it will block any attempts either here
or upstream to be able to meaningfully build php-pear RPM packages.
e.g. if I build PHPUnit2 with "pear makerpm" from your 1.4.6 packages, it's all
cool except when I install it:
# rpm -ivh ../RPMS/noarch/php-pear-PHPUnit2-2.3.3-1.noarch.rpm
error: Failed dependencies:
php-dom is needed by php-pear-PHPUnit2-2.3.3-1.noarch
php-spl is needed by php-pear-PHPUnit2-2.3.3-1.noarch
Now, in fact these deps (in Fedora) - well, the php-spl one at least - are
provided by the Core php package, but it just doesn't declare them.