How to make a minor revision to an existing RPM.
Description: You want to make a minor change to an existing e-smith interface RPM? Here's how ...
Instructions:
1. Configure your personal RPM environment (see "how to build an e-smith interface RPM")
2. Create a pristine copy of the existing source code (if you don't already have one).
a) Obtain the original source rpm and install it.
cd /usr/local
wget http://mirror.contribs.org/smeserver/releases/6.0.1/SRPMS/e-smith-pkg-0.3-3.src.rpm
rpm -Uvh e-smith-pkg-0.3-3.src.rpm
b) Build/prep the source into the RPM environment
cd $HOME/rpms
rpm -bp SPECS/e-smith-pkg.spec
mv BUILD/e-smith-pkg-0.3 BUILD/e-smith-pkg-0.3-3
3. Create a copy of the existing source code - this is the one which you will change.
cd $HOME/rpms
rpm -bp SPECS/e-smith-pkg.spec
mv BUILD/e-smith-pkg-0.3 BUILD/e-smith-pkg-0.3-4
4. Edit the RPM spec file, and increment the revision number (do it now, you might forget later): DE>
vi SPECS/e-smith-pkg.spec
- Change "#define release 3" to "#define release 4"
- 5. Make the changes that you need to make to the source code of the package
pushd BUILD/e-smith-pkg-0.3-4
vi root/... root/....... root/...... createlinks
popd- 6. Make a patch file containing your changes
pushd BUILD
diff -ruN e-smith-pkg-0.3-{3,4} > \../SOURCES/e-smith-pkgs.fixes.20000815001
popd
7. Edit the spec file of the package to apply your new patch:
vi SPECS/e-smith-pkg.spec
- Add "PatchN: e-smith-pkgs.fixes.20000815001" to the header
- Add "%patchN -p1" to the %prep section
- (where N is the next small integer)
8. Build new binary and source RPMS:
rpm -ba SPECS/e-smith-pkg.spec
9. Post your RPM(s) to your ftp site, and tell the world
10. Start testing your RPMs before your mailbox fills up :-)
Comments
Note that this development can be done on an e-smith server with no additional software. With a little searching you'll find most of the packages that you want to install in binary RPM form - so there's no need for make, no need for compilers, libraries etc.
copyright 2000 e-smith, inc. all rights reserved.
Back to Development