Edgewall Software
Modify

Opened 20 years ago

Closed 19 years ago

#163 closed defect (fixed)

RPM package

Reported by: daniel Owned by:
Priority: high Milestone: 0.9
Component: general Version: devel
Severity: normal Keywords: install helpwanted
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

setup.py should build RPM (Red Hat Package Manager) packages for 'binary' distribution.

Attachments (0)

Change History (13)

comment:1 by rocky, 20 years ago

Milestone: 0.70.6.1

After discussions on IrcChannel, it was determined this was already available with python's distutils setup. All that is needed is that the sdist command includes MANIFEST.in in the generated tarball.

Also, setting up dependencies for the generated rpm is quite easy. Following is info for setting up a trac rpm that has acceptable Suse 9.0 dependencies (may work on redhat too, unknown at this point).

Simply copy the following text and save it in a file called 'setup.cfg' in the same directory as setup.py.

[bdist_rpm] requires = python ≥ 2.1

python-xml ≥ 2.1 subversion-python ≥ 1.0.0 pysqlite ≥ 0.4.3 clearsilver ≥ 0.9.3 httpd

comment:2 by rocky, 20 years ago

Whoops, wiki formatting did a number on my paste. Let me trying pasting setup.cfg again:

[bdist_rpm]
requires = python >= 2.1
           subversion-python >= 1.0.0
           pysqlite >= 0.4.3
           clearsilver >= 0.9.3
           httpd

comment:3 by rocky, 20 years ago

Ok, on another sidenote, comments should be EDITABLE! :)

Anycase, one more attempt with the formatting (the previous paste was missing an entry).

requires = python >= 2.1
           python-xml >= 2.1
           subversion-python >= 1.0.0
           pysqlite >= 0.4.3
           clearsilver >= 0.9.3
           httpd

comment:4 by rocky, 20 years ago

I checked out branches/0.6-stable (Mar/28/2004 12:45am EST). Here is the 'svn diff' output for fixing the missing MANIFEST.in and adding setup.cfg. Should be no problem applying this diff against main trunk also.

Index: setup.cfg
===================================================================
--- setup.cfg   (revision 0)
+++ setup.cfg   (revision 0)
@@ -0,0 +1,8 @@
+[bdist_rpm]
+requires = python >= 2.1
+           python-xml >= 2.1
+           subversion-python >= 1.0.0
+           pysqlite >= 0.4.3
+           clearsilver >= 0.9.3
+           httpd
+
Index: MANIFEST.in
===================================================================
--- MANIFEST.in (revision 321)
+++ MANIFEST.in (working copy)
@@ -1,4 +1,4 @@
-include RELEASE COPYING AUTHORS INSTALL ChangeLog THANKS UPGRADE
+include RELEASE COPYING AUTHORS INSTALL ChangeLog THANKS UPGRADE MANIFEST.in setup.cfg
 include scripts/trac-admin
 include cgi-bin/trac.cgi
 recursive-include htdocs *.png *.gif *.js README

comment:5 by Jonas Borgström, 20 years ago

Resolution: fixed
Status: newclosed

Patch applied to both trunk and 0.6-stable.

Please test :)

Thanks!

comment:6 by joe@…, 19 years ago

Resolution: fixed
Severity: enhancementnormal
Status: closedreopened

bdist_rpm works but doesn't respect the —fix-python flag, so it can only build for whatever "which python" returns. It should build for whatever python was used to call setup.py. i.e.:

python2.3 setup.py bdist_rpm —fix-python

Should build a package that installs into the "/usr/lib/python2.3" lib directory. Instead, on a Red Hat or Fedora Core 1 system, it drops it into "/usr/lib/python2.3". I have no clue how to fix this, as I thought it was an automagic part of distutils. I've never seen it /not/ work.

comment:7 by daniel, 19 years ago

Milestone: 0.6.10.8

comment:8 by daniel, 19 years ago

Owner: changed from Jonas Borgström to daniel
Status: reopenednew

comment:9 by daniel, 19 years ago

Owner: daniel removed

comment:10 by Jonas Borgström, 19 years ago

Milestone: 0.80.9

This sound more like a distutils bug than a Trac bug, I don't think we can do anything about this?

Moving to 0.9 until this is verified…

comment:11 by Christopher Lenz, 19 years ago

Keywords: install helpwanted added

comment:12 by Mark Rowe <edgewall.com@…>, 19 years ago

The following patch should resolve the problem, but it relies on a private distutils API. The API in question hasn't changed in the 5 years since it was added, so it is relatively safe:

Index: setup.py
===================================================================
--- setup.py    (revision 1301)
+++ setup.py    (working copy)
@@ -179,6 +179,7 @@
         for distro in rpm_distros.keys():
             r = generic_bdist_rpm(self.dist, distro)
             r.initialize_options()
+            self.dist._set_command_options(r, self.dist.command_options['bdist_rpm'])
             r.finalize_options()
             r.run()

comment:13 by Christopher Lenz, 19 years ago

Resolution: fixed
Status: newclosed

Patch applied in [1304]. Thanks a lot, Mark!

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.