Bug 173270 - "pear makerpm" generates flawed RPMs
"pear makerpm" generates flawed RPMs
Product: Fedora
Classification: Fedora
Component: php-pear (Show other bugs)
i386 Linux
medium Severity low
: ---
: ---
Assigned To: Joe Orton
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2005-11-15 15:05 EST by Josh Kelley
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-12-12 11:18:59 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
patch for template.spec that fixes post/postun problem (747 bytes, patch)
2005-11-21 10:05 EST, Tim Jackson
no flags Details | Diff

  None (edit)
Description Josh Kelley 2005-11-15 15:05:04 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7

Description of problem:
There are (at least) three problems with the RPMs generated by "pear makerpm".

First, the %postun script tries to rely on the -r option to pear uninstall, and that doesn't work (see bug #173261), although I don't think the -r option is actually needed in this case.

Second, the %postun script should instead read
if [ "$1" = "0" ] ; then
pear uninstall --nodeps -r <package-name>
to avoid unregistering/uninstalling the package on an upgrade.

Third, php-pear is not listed as a prereq.

Fourth, the %post script should probably include a "--force" flag, otherwise pear will refuse to register a module on an upgrade.  (I haven't tested this extensively.)

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Download the source to a PEAR module and put it in your SOURCES directory.
2. cd to your SPECS directory
3. Run pear makerpm ../SOURCES/pear-source-module-name.tgz

Actual Results:  Generates an RPM spec file containing several errors.

Expected Results:  Generates an RPM spec file containing fewer errors.

Additional info:
Comment 1 Tim Jackson 2005-11-21 08:22:53 EST
Coincidental with this bug, I filed a separate bug upstream including a proposed
patch to the 'post/postun' issue which has been accepted upstream:
http://pear.php.net/bugs/bug.php?id=5959 . Works for me but any review by anyone
else appreciated.
Comment 2 Tim Jackson 2005-11-21 08:52:32 EST
An additional problem with "pear makerpm" (file naming conventions) is
documented in bug #173802
Comment 3 Tim Jackson 2005-11-21 09:57:53 EST
I am currently hacking around with PEAR wrt RPM compatibility and have filed a
number of other related issues:

bug #173804 - php core rpm does not have Provides
bug #173806 - php-pear does not have Provides:
bug #173808 - php-pear has too much bundled in it
bug #173810 - php-pear should be built separately to main PHP package
Comment 4 Tim Jackson 2005-11-21 10:05:18 EST
Created attachment 121298 [details]
patch for template.spec that fixes post/postun problem

applies to php-pear-5.0.4-10.5
Comment 5 Tim Jackson 2005-11-21 10:35:42 EST
Another problem (from upstream, not FC/RH specific) with "pear makerpm" (at
least versions included with current stable PHP) is lack of generation of
dependencies on other PEAR packages. See bug #173814 for more info and fix.
Comment 6 Tim Jackson 2005-11-23 07:27:44 EST
Patch for post/postun issue is in PEAR 1.4.5 upstream.
Comment 7 Tim Jackson 2005-11-23 07:46:54 EST
Since this bug is already turning into a meta-bug for "all the things that are
wrong with PEAR and RPMs" (perhaps we should actually turn it into a proper meta
bug, or create one?), here's another: bug #173980 - RPM errors when packaging 
doc files in some packages.
Comment 8 Tim Jackson 2005-12-12 11:17:34 EST
All the issues listed in this particular bug are fixed in php-pear-1.4.5-3. 
There are still some outstanding issues related to PHP/PEAR RPM packaging as
mentioned in bugs referenced above, but I think this bug can be closed.
Comment 9 Joe Orton 2005-12-12 11:18:59 EST
Great.  Thanks a lot for pushing this stuff upstream!

Note You need to log in before you can comment on or make changes to this bug.