[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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           mattdm mattdm org          <http://mattdm.org/>
Boston University Linux      ------>              <http://linux.bu.edu/>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]