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

Michael Jennings <[email protected]>
Newsgroups gmane.linux.redhat.rpm.general
Message-ID <[email protected]>
On Tuesday, 16 October 2007, at 11:21:16 (-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.
> 
>   i would have thought this would involve "--short-circuit" in some
> way, but that doesn't seem possible.

What you're looking for is Mezzanine:

http://beta.kainx.org/articles/6

The basic procedure is something like this:

1.  mzimport -L foo.src.rpm
2.  cd foo
3.  mzprep
4.  <Make changes to source tree found under work/>
5.  mzpatch -n foo-change_description.patch
6.  <Add patch to spec file>
7.  mzbuild

Michael

-- 
Michael Jennings (a.k.a. KainX)  http://www.kainx.org/  <[email protected]>
Linux Server/Cluster Admin, LBL.gov       Author, Eterm (www.eterm.org)
-----------------------------------------------------------------------
 "There are two ways to slide easily through life:  to believe
  everything, or to doubt everything; both ways save us from
  thinking."                       -- Polish Linguist Alfred Korzybski
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.