[CentOS] New rpm, same name, how to update

Warren Young warren at etr-usa.com
Mon Dec 8 18:28:40 UTC 2008


Robert Moskowitz wrote:
> 
> I await the developers help.

It's not hard to do it yourself.

First, find the .spec file:

	$ cd the/source/trees/root
	$ find . -name \*.spec -print

Then see if there is a top-level 'make' rule for building RPMs:

	$ grep -l spec *akefile
	$ less the-file-you-found-if-you-did-in-fact-find-one

Likely you'll find that you can say something like 'make rpm' to build 
the RPM.  If not, try something like:

	# cp the-spec-file.spec /usr/src/redhat/SPECS
	# cd /usr/src/redhat/SPECS
	# rpmbuild -bb the-spec-file.spec

Once you've figured out how to build the RPM, you can edit the spec file 
and rebuild the RPM.  Right up at the top, you'll find the version 
number stuff.  You want to change the "Release:" line.  It's typically 
an integer, and you just increase it by 1 each time you make a new RPM 
with the same "Version:" line.  When the version number changes, the 
release number gets reset to 1.  A higher release number is all it takes 
to make rpm not complain when trying to replace an existing package with 
a new one with the same version number.


More information about the CentOS mailing list