Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 173270 - "pear makerpm" generates flawed RPMs
Summary: "pear makerpm" generates flawed RPMs
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: php-pear
Version: rawhide
Hardware: i386
OS: Linux
medium
low
Target Milestone: ---
Assignee: Joe Orton
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-11-15 20:05 UTC by Josh Kelley
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-12-12 16:18:59 UTC
Type: ---
Embargoed:


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

Description Josh Kelley 2005-11-15 20:05:04 UTC
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>
fi
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):
php-pear-5.0.4-10.5

How reproducible:
Always

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 13:22:53 UTC
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 13:52:32 UTC
An additional problem with "pear makerpm" (file naming conventions) is
documented in bug #173802

Comment 3 Tim Jackson 2005-11-21 14:57:53 UTC
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 15:05:18 UTC
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 15:35:42 UTC
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 12:27:44 UTC
Patch for post/postun issue is in PEAR 1.4.5 upstream.

Comment 7 Tim Jackson 2005-11-23 12:46:54 UTC
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 16:17:34 UTC
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 16:18:59 UTC
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.