On Fri, 2011-02-11 at 16:44 -0500, Mohammed Morsi wrote:
---
contrib/deltacloud-configure.spec | 2 +-
rake/rpmtask.rb | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/contrib/deltacloud-configure.spec b/contrib/deltacloud-configure.spec
index 670d401..d190b46 100644
--- a/contrib/deltacloud-configure.spec
+++ b/contrib/deltacloud-configure.spec
@@ -4,7 +4,7 @@
Summary: DeltaCloud Configure Puppet Recipe
Name: deltacloud-configure
Version: 2.0.0
-Release: 2%{?dist}
+Release: 2%{?dist}.%{timestamp}
Group: Applications/Internet
License: GPLv2+
diff --git a/rake/rpmtask.rb b/rake/rpmtask.rb
index ff2ee66..fa21df8 100644
--- a/rake/rpmtask.rb
+++ b/rake/rpmtask.rb
@@ -69,7 +69,10 @@ module Rake
file rpm_file => [:package, "#{@topdir}/SOURCES",
"#{@topdir}/SPECS"] do
cp "#{package_dir}/#{@name}-#{(a)version}.tgz",
"#{@topdir}/SOURCES/"
cp @rpm_spec, "#{@topdir}/SPECS"
- sh "#{@rpmbuild_cmd} --define '_topdir #{@topdir}' -ba
#{@rpm_spec}"
+ sh "#{@rpmbuild_cmd} " +
+ "--define '_topdir #{@topdir}' " +
+ "--define 'timestamp
#{Time.now.strftime("%Y%m%d%k%M%s")}' " +
+ "-ba #{@rpm_spec}"
end
end
NACK, this doesn't quite work right, looks like it introduces a space in
the rpm name:
rake rpms
(in /home/jay/projects/fedorahosted/aeolus/configure)
cp pkg/deltacloud-configure-2.0.0.tgz /home/jay/rpmbuild/SOURCES/
cp contrib/deltacloud-configure.spec /home/jay/rpmbuild/SPECS
rpmbuild --define '_topdir /home/jay/rpmbuild' --define 'timestamp
20110214 8541297691691' -ba contrib/deltacloud-configure.spec
error: line 7: Tag takes single token only: Release: 2.fc14.20110214
8541297691691
rake aborted!
Command failed with status (1): [rpmbuild --define
'_topdir /home/jay/rpmbu...]