[Distutils] Instructions for bdist_rpm

Harry Henry Gebel hgebel@inet.net
Thu, 4 May 2000 03:53:54 -0400


On Wed, May 03, 2000 at 05:59:32PM -0400, Mark W. Alexander wrote:
> A couple of concerns: Redhat uses the /usr/src/redhat convention, 
> Mandrake uses /usr/src/RPM so it's even worse than you noted.
> You could use rpm --showrc, but you'd probably end up (re)writing
> a parser to handle RPM macros, which would be just as bad as
> parsing the rpmrc (once you fond it). The -ta option is interesting.

This was exactly my point.

> But still, don't you build the spec file from the distutil information
> anyway? That's going to be true of whatever package format the user
> requires, which, if it's not RPM the spec file is extraneous. I agree
> that figuring out the where's and what's of which rpm is going to
> be a nightmare...BUT, you can create a spec file with internal
> definitions for RPM_BUILD_ROOT, RPM_SOURCE_DIR, RPM_BUILD_DIR, etc,
> that does all the dirty work in /tmp, /var/tmp, or wherever, 
> leaving only the final binary and/or source RPMS in the user's
> home directory. (That's my theory and I'm sticking to it untill
> someone points out an obvious error ;-). 

I did not specify them in the spec file because I do not want them being
hard-coded as going places that the user does not expect. What I am going
to try is to dump the rc with `rpm --showrc` and then tag new definitions
to the end of the a temporory file and use that file as an rc file,
hopefully that will work. Believe me, I would rather use `rpm -ba` rather
than `rpm -ta` for a lot of reasons, if I could figure out a way to make
it work without stepping on source RPM user's expectations.

> BUT, they also support inclusion and application of patches with the
> "pristine" sources in order to support the inevitable modifications
> of dealing with multiple distributions and platforms. (By the way,
> for those that don't know, RPM does run on non-Linux UNIX'es. It's
> not pretty trying to get dependency interaction with stuff already
> installed, 'though...) So the big question is does the -ta option
> support the inclusion of patch sets?

`rpm -ta` does not support patches, but I do not think that is a problem
because I don't plan to put patch support into bdist_rpm. People who are
producing patched RPMs will have to add the patches to the spec file by
hand, this is a simple process that involves adding two lines to the spec
file per patch and is one of the reasons I tried to keep the spec file as
clean as possible.

-- 
Harry Henry Gebel, Senior Developer, Landon House SBS
West Dover Hundred, Delaware
PyNcurses ncurses binding for Python: http://pyncurses.sourceforge.net