Re: how to build a patched binary rpm from a source rpm?

Matthew Miller <[email protected]>
Newsgroups gmane.linux.redhat.rpm.general
Message-ID <[email protected]>
On Tue, Oct 16, 2007 at 11:21:16AM -0400, Robert P. J. Day wrote:
>   what's the canonical way to build a modified binary rpm from the
> original source rpm?  i can download the source rpm, install it under
> my own "rpms/" directory, then run:
>   $ rpmbuild -bp <spec file>
> to run the prep stage.
>   at that point, i can mess with the source, but it's not clear what
> command to invoke to have the build pick up at that point and finish
> off the build to create the (now modified) binary rpm.

Mess with the source, generate a patch, and then add it to the spec file.
Add a short string and number to the end of the release tag (so "Release: 1"
becomes "Release 1.rday.1" or similar), and then do rpmbuild -ba on that.

That way, when you want to rebuild it again, you've already got your patch.
And when there's a new version of the upstream package, if the affected code
wasn't touched, you can just carry your patch forward.

-- 
Matthew Miller           [email protected]          <http://mattdm.org/>
Boston University Linux      ------>              <http://linux.bu.edu/>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.