Alexander@Rau wrote:
1. Currently I am stuck at "repacked the anaconda sources (with the
change)". Do I use the tar command for that (what options)? and in what
folder /usr/src/redhat/SOURCES/ (will it overwrite the old tar or shoud
I delete the old tar file)?
2. Then I bzip2 it?
3. Then I buildrpm -ta it?
There are two ways to do this: patching or untar/tar. I prefer
patching, so I'll explain it first.
First, install the src.rpm and build it with any patches already included:
rpm -ivh anaconda-9.0-4.src.rpm
cd /usr/src/redhat/SPEC
rpmbuild -bp anaconda.spec
Now, go to the BUILD directory and make an original copy of the source
directory.
cd /usr/src/redhat/BUILD
cp -a anaconda-9.0 anaconda-9.0.orig
Then go to the anaconda-9.0 directory and make any changes that you deem
necessary. Once you are finished, make a patch of the differences
between the two (make sure you are in the BUILD directory):
diff -urN anaconda-9.0.orig anaconda-9.0 > ../SOURCES/my-changes.patch
Now edit the spec file and rebuild:
cd /usr/src/redhat/SPEC
gedit anaconda-9.0
under Source: anaconda-%{PACKAGE_VERSION}.tar.bz2, add this line:
Patch 1: my-changes.patch
under %setup -q, add this line:
%patch1 -p1
under %changelog, add a few lines stating what changes you made.
The first line should be date/name/email, the following lines
should be about the changes that you made.
Save the file, and run:
rpmbuild -ba anaconda.spec
which will create a new src.rpm, as well as the binary i386.rpm files.
The second method involves untarring the source, retarring it and
rebuilding the rpm:
cd /usr/src/redhat/SOURCES
tar xjvf anaconda-9.0.tar.bz2
<edit changes in anaconda-9.0/>
tar cjvf anaconda-9.0.tar.bz2 anaconda-9.0
cd /usr/src/redhat/SPEC
rpmbuild -ba anaconda.spec
This method is probably simpler for the newbie, but it lacks the
porability of the patch method.
Forrest
--