]> granicus.if.org Git - apache/commitdiff
Add support for an "epoch" in the RPM spec file. This epoch is a discrete
authorGraham Leggett <minfrin@apache.org>
Fri, 25 Sep 2009 21:02:33 +0000 (21:02 +0000)
committerGraham Leggett <minfrin@apache.org>
Fri, 25 Sep 2009 21:02:33 +0000 (21:02 +0000)
number used to determine if one RPM is newer than another, which in turn
ensures that v1.2.10 is always interpreted as newer than v1.2.9.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@819008 13f79535-47bb-0310-9956-ffa450edef68

build/get-version.sh
build/rpm/httpd.spec.in
buildconf

index ddf175cebdd7d72c55fd3ae5e91568e78eb68f29..376a5c730394e126788a90c5f43f50353db71fac 100755 (executable)
@@ -48,6 +48,8 @@ elif test "$1" = "major"; then
   echo ${major}
 elif test "$1" = "mmn"; then
   echo ${mmn}
+elif test "$1" = "epoch"; then
+  printf "%03d" ${major} ${minor} ${patch}
 elif test "$1" = "libtool"; then
   # Yes, ${minor}:${patch}:${minor} is correct due to libtool idiocy.
   echo ${minor}:${patch}:${minor}
index bd49d234024712a05c1f9a9f56489feb462aae08..6524a9beb3ed474d9b878edc07a3f5d23a3fcb62 100644 (file)
@@ -7,13 +7,14 @@ Summary: Apache HTTP Server
 Name: httpd
 Version: APACHE_VERSION
 Release: APACHE_RELEASE
+Epoch: APACHE_EPOCH00%{release}
 URL: http://httpd.apache.org/
 Vendor: Apache Software Foundation
 Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
 License: Apache License, Version 2.0
 Group: System Environment/Daemons
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
-BuildPrereq: apr-devel, apr-util-devel, openldap-devel, db4-devel, expat-devel, findutils, perl, pkgconfig, zlib-devel, pcre-devel >= 5.0
+BuildPrereq: apr-devel, apr-util-devel, openldap-devel, db4-devel, expat-devel, findutils, perl, pkgconfig, zlib-devel, pcre-devel >= 5.0, distcache-devel >= 1.4
 BuildPrereq: /usr/bin/apr-1-config, /usr/bin/apu-1-config
 Requires: apr >= 1.4.0, apr-util >= 1.4.0, pcre-devel >= 5.0, gawk, /usr/share/magic.mime, /usr/bin/find, openldap
 Prereq: /sbin/chkconfig, /bin/mktemp, /bin/rm, /bin/mv
@@ -32,7 +33,7 @@ Internet.
 Group: Development/Libraries
 Summary: Development tools for the Apache HTTP server.
 Obsoletes: secureweb-devel, apache-devel
-Requires: libtool, httpd = %{version}
+Requires: libtool, httpd = %{epoch}:%{version}-%{release}
 Requires: apr-devel >= 1.4.0, apr-util-devel >= 1.4.0
 
 %description devel
index 343983f3b87db86a0ce44a59a9db440c427426d6..ad43fe53c9f871bc5f3809a59ab3f278379f2f64 100755 (executable)
--- a/buildconf
+++ b/buildconf
@@ -198,6 +198,7 @@ rm -rf autom4te*.cache
 if [ -f `which cut` ]; then
   echo rebuilding rpm spec file
   ( VMMN=`build/get-version.sh mmn include/ap_mmn.h MODULE_MAGIC_NUMBER`
+    EPOCH=`build/get-version.sh epoch include/ap_release.h AP_SERVER`
     REVISION=`build/get-version.sh all include/ap_release.h AP_SERVER`
     VERSION=`echo $REVISION | cut -d- -s -f1`
     RELEASE=`echo $REVISION | cut -d- -s -f2`
@@ -209,6 +210,7 @@ if [ -f `which cut` ]; then
     sed -e "s/APACHE_VERSION/$VERSION/" \
         -e "s/APACHE_RELEASE/$RELEASE/" \
         -e "s/APACHE_MMN/$VMMN/" \
+        -e "s/APACHE_EPOCH/$EPOCH/" \
     > httpd.spec )
 fi