Patchwork [04,of,22] buildrpm: include release version in .tar.gz name

login
register
mail settings
Submitter Mads Kiilerich
Date May 20, 2014, 2:09 a.m.
Message ID <d92c61a619e5e350da6d.1400551799@mk-desktop>
Download mbox | patch
Permalink /patch/4826/
State Accepted
Commit 977e5bd6eb76b74c015c562b56923e4bc6ad087d
Headers show

Comments

Mads Kiilerich - May 20, 2014, 2:09 a.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1400551678 -7200
#      Tue May 20 04:07:58 2014 +0200
# Node ID d92c61a619e5e350da6d7c192a91dc3ccd743efb
# Parent  c5aad482861c9e9d1ac219eac180ccaac0d6124f
buildrpm: include release version in .tar.gz name

Official releases are fully indentified by the version number, these builds are
not.

Specs are however traditionally not versioned.
Matt Mackall - May 30, 2014, 12:10 a.m.
On Tue, 2014-05-20 at 04:09 +0200, Mads Kiilerich wrote:
> # HG changeset patch
> # User Mads Kiilerich <madski@unity3d.com>
> # Date 1400551678 -7200
> #      Tue May 20 04:07:58 2014 +0200
> # Node ID d92c61a619e5e350da6d7c192a91dc3ccd743efb
> # Parent  c5aad482861c9e9d1ac219eac180ccaac0d6124f
> buildrpm: include release version in .tar.gz name
> 
> Official releases are fully indentified by the version number, these builds are
> not.

Queued these first four so far for default.

Patch

diff --git a/contrib/buildrpm b/contrib/buildrpm
--- a/contrib/buildrpm
+++ b/contrib/buildrpm
@@ -43,8 +43,8 @@  else
     release='0'
 fi
 
-$HG archive -t tgz $rpmdir/SOURCES/mercurial-$version.tar.gz
-rpmspec=$rpmdir/SPECS/mercurial-$version.spec
+$HG archive -t tgz $rpmdir/SOURCES/mercurial-$version-$release.tar.gz
+rpmspec=$rpmdir/SPECS/mercurial.spec
 
 sed -e "s,^Version:.*,Version: $version," \
     -e "s,^Release:.*,Release: $release," \
diff --git a/contrib/mercurial.spec b/contrib/mercurial.spec
--- a/contrib/mercurial.spec
+++ b/contrib/mercurial.spec
@@ -8,7 +8,7 @@  Release: 0
 License: GPLv2+
 Group: Development/Tools
 URL: http://mercurial.selenic.com/
-Source0: http://mercurial.selenic.com/release/%{name}-%{version}.tar.gz
+Source0: %{name}-%{version}-%{release}.tar.gz
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
 
 BuildRequires: python >= 2.4, python-devel, make, gcc, python-docutils >= 0.5, gettext
@@ -22,7 +22,7 @@  Mercurial is a fast, lightweight source 
 for efficient handling of very large distributed projects.
 
 %prep
-%setup -q
+%setup -q -n mercurial-%{version}-%{release}
 
 %build
 make all