Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have taken the Apache httpd 2.2.3 SRPM and extracted the .spec file. From this I've replaced 2.2.3 with 2.2.14 and removed the Serial tag from the specfile (as rpmbuild complained about the Serial tag - I presume this has been deprecated). Downloaded the httpd tarball, and built (rpmbuild) with no errors (to my surprise).

Upon running rpm --upgrade <newrpms> I received an error that my new RPMs were not newer versions even though the Version tag is clearly later. I set the Release, however, to 1.

I've tried looking through Google to find out how rpm determines what the newest version is (no luck). From the rpm -qi commands I have the following for the default 2.2.3 install:

Name        : httpd                        Relocations: (not relocatable)
Version     : 2.2.3                             Vendor: CentOS
Release     : 31.el5.centos                 Build Date: Thu 03 Sep 2009 10:43:06 PM BST
Install Date: Mon 26 Oct 2009 10:27:12 AM GMT      Build Host:
Group       : System Environment/Daemons    Source RPM: httpd-2.2.3-31.el5.centos.src.rpm
Size        : 3254910                          License: Apache Software License
Signature   : DSA/SHA1, Sun 20 Sep 2009 04:53:42 AM BST, Key ID a8a447dce8562897
URL         :
Summary     : Apache HTTP Server

From my 2.2.14 build I have:

Name        : httpd                        Relocations: (not relocatable)
Version     : 2.2.14                            Vendor: Apache Software Foundation
Release     : 1                             Build Date: Mon 16 Nov 2009 11:40:41 AM GMT
Install Date: Mon 16 Nov 2009 11:44:38 AM GMT      Build Host: build01.local
Group       : System Environment/Daemons    Source RPM: httpd-2.2.14-1.src.rpm
Size        : 5101686                          License: Apache License, Version 2.0
Signature   : (none)
URL         :
Summary     : Apache HTTP Server

So the question is: how does rpm determine which is the most recent RPM for upgrade purposes?

share|improve this question
up vote 2 down vote accepted

The serial tag was deprecated and replaced with the epoch tag.

I don't know how the serial tag worked but version comparisons with the epoch tag have the epoch prepended to the version before the comparison.

I assume something similar was done with serial.

I'm guessing the serial value was also prepended so you are comparing versions like this:


If the serial value was > 1 in the original I'm guessing its defaulting to 1 when not specified.

You can alwasy use rpm --force to force an upgrade to a specific RPM

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .