[WBEL-users] editing and src rpm

Will Senn will_senn@comcast.net
Thu, 15 Apr 2004 10:47:17 -0500


This is a multi-part message in MIME format.
--------------030707010202060901080102
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Dominic,

Phil's got it right, safer that way - my bad.

Will


Phil Schaffner wrote:

>On Thu, 2004-04-15 at 10:17, scty Library wrote:
>  
>
>>Hello all,
>>
>>I would like to edit the freetype src rpm and then
>>create a new rpm.  Now I know what file has to be
>>edited in the source but I don't know how to make it
>>an bin rpm again that will install the files in
>>exactly the same place as the distro installed it.  If
>>anyone could point me in the right direction it would
>>be greatly appreciated.
>>
>>
>>Thanks all
>>Dominic
>>    
>>
>
>One could write a book on this.  May want to check out
>http://www.rpm.org/max-rpm/index.html
>
>Briefly:
>
># rpm -ivh freetype-2.1.4-4.0.src.rpm
># cd /usr/src/redhat/SPECS
>
>>From here on, it depends on the details of what you want to accomplish.
>Inspect freetype.spec in the above directory.  You will want to unpack
>the relevant sources (in ../SOURCES).
>
># rpmbuild -bp freetype.spec
>will unpack in ../BUILD/ and apply existing patches. If your patch does
>not overlap with others you can use that directory structure for your
>edits.  Otherwise unpack the tarball(s) elsewhere and make changes
>there.
>
>In either case you probably want to create a duplicate directory tree
>with cp -al <source-tree-dir> <modified-source-tree-dir> so you can
>create a patch file against the unmodified sources.
>
>After making your changes, create a patch file (see *.patch in the
>SOURCES directory for examples, and add yours there also, for instance
>"freetype-my-hack.patch")  then edit freetype.spec to add in your patch
>(e.g. "Patch99: freetype-my-hack.patch") and increment the release
>version (e.g "Release: 4.0.1").  Then in /usr/src/redhat/SPECS try:
>
># rpmbuild -ba freetype.spec
>
>Fix any errors and repeat until you get new source and binary packages
>built in ../RPMS/i386 and ../SRPMS.
>
>Do "rpm -Fvh ../RPMS/i386/freetype-*" or move the packages to a local
>repository and upgrade with yum or up2date.
>
>Good luck,
>Phil
>
>
>_______________________________________________
>Whitebox-users mailing list
>Whitebox-users@beau.org
>http://beau.org/mailman/listinfo/whitebox-users
>
>  
>

--------------030707010202060901080102
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Dominic,<br>
<br>
Phil's got it right, safer that way - my bad.<br>
<br>
Will<br>
<br>
<br>
Phil Schaffner wrote:<br>
<blockquote cite="mid1082042890.15303.114.camel@radar0.larc.nasa.gov"
 type="cite">
  <pre wrap="">On Thu, 2004-04-15 at 10:17, scty Library wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hello all,

I would like to edit the freetype src rpm and then
create a new rpm.  Now I know what file has to be
edited in the source but I don't know how to make it
an bin rpm again that will install the files in
exactly the same place as the distro installed it.  If
anyone could point me in the right direction it would
be greatly appreciated.


Thanks all
Dominic
    </pre>
  </blockquote>
  <pre wrap=""><!---->
One could write a book on this.  May want to check out
<a class="moz-txt-link-freetext" href="http://www.rpm.org/max-rpm/index.html">http://www.rpm.org/max-rpm/index.html</a>

Briefly:

# rpm -ivh freetype-2.1.4-4.0.src.rpm
# cd /usr/src/redhat/SPECS

&gt;From here on, it depends on the details of what you want to accomplish.
Inspect freetype.spec in the above directory.  You will want to unpack
the relevant sources (in ../SOURCES).

# rpmbuild -bp freetype.spec
will unpack in ../BUILD/ and apply existing patches. If your patch does
not overlap with others you can use that directory structure for your
edits.  Otherwise unpack the tarball(s) elsewhere and make changes
there.

In either case you probably want to create a duplicate directory tree
with cp -al &lt;source-tree-dir&gt; &lt;modified-source-tree-dir&gt; so you can
create a patch file against the unmodified sources.

After making your changes, create a patch file (see *.patch in the
SOURCES directory for examples, and add yours there also, for instance
"freetype-my-hack.patch")  then edit freetype.spec to add in your patch
(e.g. "Patch99: freetype-my-hack.patch") and increment the release
version (e.g "Release: 4.0.1").  Then in /usr/src/redhat/SPECS try:

# rpmbuild -ba freetype.spec

Fix any errors and repeat until you get new source and binary packages
built in ../RPMS/i386 and ../SRPMS.

Do "rpm -Fvh ../RPMS/i386/freetype-*" or move the packages to a local
repository and upgrade with yum or up2date.

Good luck,
Phil


_______________________________________________
Whitebox-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Whitebox-users@beau.org">Whitebox-users@beau.org</a>
<a class="moz-txt-link-freetext" href="http://beau.org/mailman/listinfo/whitebox-users">http://beau.org/mailman/listinfo/whitebox-users</a>

  </pre>
</blockquote>
</body>
</html>

--------------030707010202060901080102--