Bug 489644 - distutils produces invalid RPM packages of prerelease python packages
distutils produces invalid RPM packages of prerelease python packages
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: python (Show other bugs)
5.5
All Linux
low Severity medium
: rc
: ---
Assigned To: Dave Malcolm
BaseOS QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-10 23:43 EDT by Rudd-O DragonFear
Modified: 2013-03-21 00:07 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-21 00:07:16 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
fix for distutils (1.56 KB, patch)
2009-03-10 23:44 EDT, Rudd-O DragonFear
no flags Details | Diff
prerequisite fix for bdist_rpm (2.87 KB, patch)
2009-03-11 00:24 EDT, Rudd-O DragonFear
no flags Details | Diff
updated for svnversions use case (1.11 KB, patch)
2009-03-11 03:52 EDT, Rudd-O DragonFear
no flags Details | Diff
replaces others, handles improvement of corner cases, provides packager with the ability to turn it off (2.49 KB, patch)
2009-03-13 01:51 EDT, Rudd-O DragonFear
no flags Details | Diff
applies on top of the last one (lexicographical order), introduces automatic dependency detection based on egg metadata if available (3.08 KB, patch)
2009-03-13 04:33 EDT, Rudd-O DragonFear
no flags Details | Diff
fixed lexicographical order patch (2.53 KB, patch)
2009-03-13 07:33 EDT, Rudd-O DragonFear
no flags Details | Diff

  None (edit)
Description Rudd-O DragonFear 2009-03-10 23:43:42 EDT
Description of problem:

Building pre-release python distutils packages with python setup.py bdist_rpm works, but the version number is "RPM-higher" than the official release package that is released later.

This constitutes a problem because many of the components in major Python apps like Zope -- distributed as cheese shop eggs and downloadable via pip or buildout -- are pre-release packages which, when turned into RPMs, contain RPM-invalid version numbers.  The RPMs build, but the pre-release packages are considered "newer" by yum, so you can imagine the havoc that breaks.

How reproducible:

always


Steps to Reproduce:
1. python setup.py bdist_rpm
2. inspect version / release number of resulting RPMs, find out it's wrong
3. do not profit!
  
Actual results:

distutils package version: 1.4a
rpm package version: 1.4a


Expected results:

http://fedoraproject.org/wiki/Packaging/NamingGuidelines#Non-Numeric_Version_in_Release

Additional info:

patch attached.  works against python 2.4, may apply fine to python 2.5 or 2.6 too since distutils hasn't undergone that big of a rewrite.
Comment 1 Rudd-O DragonFear 2009-03-10 23:44:08 EDT
Created attachment 334745 [details]
fix for distutils
Comment 2 Rudd-O DragonFear 2009-03-11 00:23:23 EDT
Heads up: The fix requires a patch (distributed with the python 2.4.x RPM in CentOS) to be applied first.  I am attaching said patch so you can apply the fix.
Comment 3 Rudd-O DragonFear 2009-03-11 00:24:12 EDT
Created attachment 334747 [details]
prerequisite fix for bdist_rpm
Comment 4 Rudd-O DragonFear 2009-03-11 03:52:59 EDT
Created attachment 334758 [details]
updated for svnversions use case
Comment 5 Rudd-O DragonFear 2009-03-11 03:53:10 EDT
the newest svnversions patch is to handle the case of people who want to build svn checkouts (usually versionnumbered by dev or dev-rXXXYYZZ).  it overrides the release to be zero so they never upgrade alpha, beta packages.
Comment 6 James Antill 2009-03-11 14:43:25 EDT
You should create a separate BZ for the rpm change, and make this BZ depend on that ... however we don't change python in RHEL lightly, so if you really want this in RHEL I'd highly recommend creating a support request through the normal channels to get the priority bumped on this.
Comment 7 James Antill 2009-03-11 14:45:12 EDT
n/m the first part of the last comment ... I misread what you'd said. You just mean that there are two parts to the patch, to have it functional. Fair enough.

The part about bumping the priority still applies though.
Comment 8 Rudd-O DragonFear 2009-03-11 17:24:11 EDT
ATM I am building my own Python RPMs from 2.4.5 source on RHEL to take care of this issue and to be able to install my own RPMified plone 3.2 packages, cuz otherwise it's "unpossible" as they say in the hood.  I am of course being a good citizen and publishing these RPMs and SRPMs to my workbench / repo -- yum.rudd-o.com.  I have 32 bit and 64 bit versions going on and working just fine.  Feel free to take pointers from my SRPMs.
Comment 9 Rudd-O DragonFear 2009-03-13 01:51:19 EDT
Created attachment 335057 [details]
replaces others, handles improvement of corner cases, provides packager with the ability to turn it off
Comment 10 Rudd-O DragonFear 2009-03-13 04:33:18 EDT
Created attachment 335063 [details]
applies on top of the last one (lexicographical order), introduces automatic dependency detection based on egg metadata if available
Comment 11 Rudd-O DragonFear 2009-03-13 07:33:20 EDT
Created attachment 335072 [details]
fixed lexicographical order patch

brown paper bug in the last lexic patch
Comment 12 Rudd-O DragonFear 2012-01-31 20:34:01 EST
I guess this never went through...

Distribute has probably the same problem.
Comment 14 RHEL Product and Program Management 2013-03-21 00:07:16 EDT
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.

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