[PATCH aeolus-cli] Changes to build behavior in rpmtask.rb, Rakefile
by steve linabery
Source a .spec.in file and output .spec.
Determine whether to include extra_release based on setting of Release in .spec.in
Make Version a constant in Rakefile.
---
Rakefile | 6 ++-
rake/rpmtask.rb | 28 +++++++----
rubygem-aeolus-cli.spec | 113 --------------------------------------------
rubygem-aeolus-cli.spec.in | 113 ++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 136 insertions(+), 124 deletions(-)
delete mode 100644 rubygem-aeolus-cli.spec
create mode 100644 rubygem-aeolus-cli.spec.in
diff --git a/Rakefile b/Rakefile
index f37a160..922deee 100644
--- a/Rakefile
+++ b/Rakefile
@@ -23,10 +23,12 @@ require 'rake/rpmtask'
RPMBUILD_DIR = "#{File.expand_path('~')}/rpmbuild"
RPM_SPEC = "rubygem-aeolus-cli.spec"
+RPM_SPEC_IN = "rubygem-aeolus-cli.spec.in"
+PKG_VERSION = "0.3.0"
spec = Gem::Specification.new do |s|
s.name = 'aeolus-cli'
- s.version = '0.3.0'
+ s.version = PKG_VERSION
s.summary= 'cli for aeolus cloud suite'
s.description = 'Commandline interface for working with the aeolus cloud management suite'
s.author = 'Jason Guiditta, Martyn Taylor'
@@ -67,7 +69,7 @@ RSpec::Core::RakeTask.new do |t|
t.pattern = FileList['spec/**/*.rb']
end
-Rake::RpmTask.new(RPM_SPEC) do |rpm|
+Rake::RpmTask.new(RPM_SPEC_IN,RPM_SPEC,PKG_VERSION) do |rpm|
rpm.need_tar = true
rpm.package_files.include("lib/*")
rpm.topdir = "#{RPMBUILD_DIR}"
diff --git a/rake/rpmtask.rb b/rake/rpmtask.rb
index 93d24e9..934ad06 100644
--- a/rake/rpmtask.rb
+++ b/rake/rpmtask.rb
@@ -26,25 +26,39 @@ module Rake
# Create a package based upon a RPM spec.
# RPM packages, can be produced by this task.
class RpmTask < PackageTask
- # RPM spec containing the metadata for this package
+ # input RPM spec containing the metadata for this package
+ attr_accessor :rpm_spec_in
+
+ # filename for output RPM spec
attr_accessor :rpm_spec
+ # package version
+ attr_accessor :pkg_version
+
# RPM build dir
attr_accessor :topdir
# Include extra_release information in the rpm
attr_accessor :include_extra_release
- def initialize(rpm_spec)
- init(rpm_spec)
+ def initialize(rpm_spec_in,rpm_spec,pkg_version)
+ init(rpm_spec_in,rpm_spec,pkg_version)
yield self if block_given?
define if block_given?
end
- def init(rpm_spec)
- @include_extra_release = true
+ def init(rpm_spec_in,rpm_spec,pkg_version)
+ @rpm_spec_in = rpm_spec_in
@rpm_spec = rpm_spec
+ @pkg_version = pkg_version
+
+ @include_extra_release = eval `grep -q '^[[:space:]]*Release:[[:space:]]*0' #{@rpm_spec_in} && echo true || echo false`
+
+ git_head = `git log -1 --pretty=format:%h`
+ extra_release = @include_extra_release ? ("." + Time.now.strftime("%Y%m%d%H%M%S").gsub(/\s/, '') + "git" + "#{git_head}") : ''
+ `sed -e "s|@VERSION@|#{@pkg_version}|;s|^\\(Release:[^%]*\\)|\\1#{extra_release}|" #{@rpm_spec_in} > #{@rpm_spec}`
+
# parse this out of the rpmbuild macros,
# not ideal but better than hardcoding this
File.open('/etc/rpm/macros.dist', "r") { |f|
@@ -94,16 +108,12 @@ module Rake
# FIXME properly determine :package build artifact(s) to copy to sources dir
file rpm_file, [:include_extra_release] => [:package, "#{@topdir}/SOURCES", "#{@topdir}/SPECS"] do |t,args|
- @include_extra_release = args.include_extra_release != "false"
- git_head = `git log -1 --pretty=format:%h`
- extra_release = "." + Time.now.strftime("%Y%m%d%H%M%S").gsub(/\s/, '') + "git" + "#{git_head}"
cp "#{package_dir}/#{@name}-#{(a)version}.tgz", "#{@topdir}/SOURCES/"
# FIXME - This seems like a hack, but we don't know the gem's name
cp "#{package_dir}/#{(a)name.gsub('rubygem-', '')}-#{(a)version}.gem", "#{@topdir}/SOURCES/"
cp @rpm_spec, "#{@topdir}/SPECS"
sh "#{@rpmbuild_cmd} " +
"--define '_topdir #{@topdir}' " +
- "--define 'extra_release #{@include_extra_release ? extra_release : ''}' " +
"-ba #{@rpm_spec}"
end
end
diff --git a/rubygem-aeolus-cli.spec b/rubygem-aeolus-cli.spec
deleted file mode 100644
index bf46aa5..0000000
--- a/rubygem-aeolus-cli.spec
+++ /dev/null
@@ -1,113 +0,0 @@
-%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
-%global gemname aeolus-cli
-%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
-%global mandir %{_mandir}/man1
-%global rubyabi 1.8
-
-Summary: Command-line interface for working with the Aeolus cloud suite
-Name: rubygem-aeolus-cli
-Version: 0.3.0
-Release: 0%{?extra_release}%{?dist}
-Group: Development/Languages
-License: ASL 2.0
-URL: http://aeolusproject.org
-
-# The source for this packages was pulled from the upstream's git repo.
-# Use the following commands to generate the gem
-# git clone git://github.com/aeolusproject/aeolus-cli.git
-# cd aeolus-cli
-# rake gem
-Source0: %{gemname}-%{version}.gem
-
-Requires: ruby(abi) = %{rubyabi}
-Requires: rubygems
-Requires: rubygem(nokogiri) >= 1.4.0
-Requires: rubygem(rest-client)
-Requires: rubygem(imagefactory-console) >= 0.4.0
-Requires: rubygem(activesupport)
-Requires: rubygem(activeresource)
-
-BuildRequires: ruby
-BuildRequires: rubygems
-BuildRequires: rubygem(rspec-core)
-
-BuildArch: noarch
-Provides: rubygem(%{gemname}) = %{version}
-
-%description
-CLI for Aeolus Image Factory
-
-%prep
-%setup -q -c -T
-mkdir -p ./%{gemdir}
-gem install --local --install-dir ./%{gemdir} --force --rdoc %{SOURCE0}
-
-%build
-
-%install
-rm -rf %{buildroot}
-mkdir -p %{buildroot}%{gemdir}
-cp -a .%{gemdir}/* %{buildroot}%{gemdir}/
-
-mkdir -p %{buildroot}/%{_bindir}
-mv %{buildroot}%{gemdir}/bin/* %{buildroot}/%{_bindir}
-find %{buildroot}%{geminstdir}/bin -type f | xargs chmod 755
-rmdir %{buildroot}%{gemdir}/bin
-rm -rf %{buildroot}%{gemdir}/gems/%{gemname}-%{version}/.yardoc
-
-mkdir -p %{buildroot}%{mandir}
-mv %{buildroot}%{geminstdir}/man/* %{buildroot}%{mandir}
-
-%files
-%doc %{geminstdir}/COPYING
-%{_bindir}/aeolus
-%{_bindir}/aeolus-image
-%dir %{geminstdir}
-%{geminstdir}/Rakefile
-%{geminstdir}/bin
-%{geminstdir}/examples
-%{geminstdir}/lib
-%{geminstdir}/man
-%{geminstdir}/spec
-%doc %{gemdir}/doc/%{gemname}-%{version}
-%{gemdir}/cache/%{gemname}-%{version}.gem
-%{gemdir}/specifications/%{gemname}-%{version}.gemspec
-%{mandir}/*
-
-%changelog
-* Thu Dec 1 2011 Steve Linabery <slinaber(a)redhat.com> - 0.3.0-0
-- Bump version
-
-* Thu Dec 1 2011 Steve Linabery <slinaber(a)redhat.com> - 0.2.0-1
-- 785c8be Change and refactor tests for refactored option parser use
-- 911d47c refactored option parser to support multiple same options
-- dd580f4 Set language in HTTP_ACCEPT_LANGUAGE header
-- 48bbaa0 RM 2803 - Add status checking on image builds and pushes - v2
-- 6907390 Added provider content cleanup output
-- d721dc0 added mention of .aeolus-cli into default help
-- 44aa00c added section explaining .aeolus-cli into manpage
-- 5db097e Added format since ARes changed default
-- f0df5bb added dependency on ActiveSupport and ActiveResource to specfile
-- 445347f bumped version in gem specification to reflect ver. in specfile
-- 97585c1 Utilize Conductor API Error Messaging
-
-* Mon Nov 21 2011 Maros Zatko <mzatko(a)redhat.com> 0.2.0-0
-- added dependency on ActiveSupport and ActiveResource
-
-* Wed Nov 16 2011 Steve Linabery <slinaber(a)redhat.com> 0.2.0-0
-- bump version and release for ongoing development
-
-* Wed Nov 9 2011 Martyn Taylor <mmorsi(a)redhat.com> - 0.0.1-4
-- Renamed Bin file to aeolus-cli
-
-* Wed Jul 20 2011 Mo Morsi <mmorsi(a)redhat.com> - 0.0.1-3
-- more updates to conform to fedora guidelines
-
-* Fri Jul 15 2011 Mo Morsi <mmorsi(a)redhat.com> - 0.0.1-2
-- updated package to conform to fedora guidelines
-
-* Mon Jul 04 2011 <mtaylor(a)redhat.com> - 0.0.1-1
-- Added man files
-
-* Wed Jun 15 2011 <jguiditt(a)redhat.com> - 0.0.1-1
-- Initial package
diff --git a/rubygem-aeolus-cli.spec.in b/rubygem-aeolus-cli.spec.in
new file mode 100644
index 0000000..100d5c0
--- /dev/null
+++ b/rubygem-aeolus-cli.spec.in
@@ -0,0 +1,113 @@
+%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
+%global gemname aeolus-cli
+%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
+%global mandir %{_mandir}/man1
+%global rubyabi 1.8
+
+Summary: Command-line interface for working with the Aeolus cloud suite
+Name: rubygem-aeolus-cli
+Version: @VERSION@
+Release: 0%{?extra_release}%{?dist}
+Group: Development/Languages
+License: ASL 2.0
+URL: http://aeolusproject.org
+
+# The source for this packages was pulled from the upstream's git repo.
+# Use the following commands to generate the gem
+# git clone git://github.com/aeolusproject/aeolus-cli.git
+# cd aeolus-cli
+# rake gem
+Source0: %{gemname}-%{version}.gem
+
+Requires: ruby(abi) = %{rubyabi}
+Requires: rubygems
+Requires: rubygem(nokogiri) >= 1.4.0
+Requires: rubygem(rest-client)
+Requires: rubygem(imagefactory-console) >= 0.4.0
+Requires: rubygem(activesupport)
+Requires: rubygem(activeresource)
+
+BuildRequires: ruby
+BuildRequires: rubygems
+BuildRequires: rubygem(rspec-core)
+
+BuildArch: noarch
+Provides: rubygem(%{gemname}) = %{version}
+
+%description
+CLI for Aeolus Image Factory
+
+%prep
+%setup -q -c -T
+mkdir -p ./%{gemdir}
+gem install --local --install-dir ./%{gemdir} --force --rdoc %{SOURCE0}
+
+%build
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}%{gemdir}
+cp -a .%{gemdir}/* %{buildroot}%{gemdir}/
+
+mkdir -p %{buildroot}/%{_bindir}
+mv %{buildroot}%{gemdir}/bin/* %{buildroot}/%{_bindir}
+find %{buildroot}%{geminstdir}/bin -type f | xargs chmod 755
+rmdir %{buildroot}%{gemdir}/bin
+rm -rf %{buildroot}%{gemdir}/gems/%{gemname}-%{version}/.yardoc
+
+mkdir -p %{buildroot}%{mandir}
+mv %{buildroot}%{geminstdir}/man/* %{buildroot}%{mandir}
+
+%files
+%doc %{geminstdir}/COPYING
+%{_bindir}/aeolus
+%{_bindir}/aeolus-image
+%dir %{geminstdir}
+%{geminstdir}/Rakefile
+%{geminstdir}/bin
+%{geminstdir}/examples
+%{geminstdir}/lib
+%{geminstdir}/man
+%{geminstdir}/spec
+%doc %{gemdir}/doc/%{gemname}-%{version}
+%{gemdir}/cache/%{gemname}-%{version}.gem
+%{gemdir}/specifications/%{gemname}-%{version}.gemspec
+%{mandir}/*
+
+%changelog
+* Thu Dec 1 2011 Steve Linabery <slinaber(a)redhat.com> - 0.3.0-0
+- Bump version
+
+* Thu Dec 1 2011 Steve Linabery <slinaber(a)redhat.com> - 0.2.0-1
+- 785c8be Change and refactor tests for refactored option parser use
+- 911d47c refactored option parser to support multiple same options
+- dd580f4 Set language in HTTP_ACCEPT_LANGUAGE header
+- 48bbaa0 RM 2803 - Add status checking on image builds and pushes - v2
+- 6907390 Added provider content cleanup output
+- d721dc0 added mention of .aeolus-cli into default help
+- 44aa00c added section explaining .aeolus-cli into manpage
+- 5db097e Added format since ARes changed default
+- f0df5bb added dependency on ActiveSupport and ActiveResource to specfile
+- 445347f bumped version in gem specification to reflect ver. in specfile
+- 97585c1 Utilize Conductor API Error Messaging
+
+* Mon Nov 21 2011 Maros Zatko <mzatko(a)redhat.com> 0.2.0-0
+- added dependency on ActiveSupport and ActiveResource
+
+* Wed Nov 16 2011 Steve Linabery <slinaber(a)redhat.com> 0.2.0-0
+- bump version and release for ongoing development
+
+* Wed Nov 9 2011 Martyn Taylor <mmorsi(a)redhat.com> - 0.0.1-4
+- Renamed Bin file to aeolus-cli
+
+* Wed Jul 20 2011 Mo Morsi <mmorsi(a)redhat.com> - 0.0.1-3
+- more updates to conform to fedora guidelines
+
+* Fri Jul 15 2011 Mo Morsi <mmorsi(a)redhat.com> - 0.0.1-2
+- updated package to conform to fedora guidelines
+
+* Mon Jul 04 2011 <mtaylor(a)redhat.com> - 0.0.1-1
+- Added man files
+
+* Wed Jun 15 2011 <jguiditt(a)redhat.com> - 0.0.1-1
+- Initial package
--
1.7.6.4
12 years, 4 months
[PATCH aeolus-image-rubygem] Changes to build behavior in rpmtask.rb, Rakefile
by steve linabery
Source a .spec.in file and output .spec.
Determine whether to include extra_release based on setting of Release in .spec.in
Make Version a constant in Rakefile.
---
Rakefile | 6 ++-
rake/rpmtask.rb | 28 ++++++++----
rubygem-aeolus-image.spec | 99 ------------------------------------------
rubygem-aeolus-image.spec.in | 99 ++++++++++++++++++++++++++++++++++++++++++
4 files changed, 122 insertions(+), 110 deletions(-)
delete mode 100644 rubygem-aeolus-image.spec
create mode 100644 rubygem-aeolus-image.spec.in
diff --git a/Rakefile b/Rakefile
index abb6d46..121a297 100644
--- a/Rakefile
+++ b/Rakefile
@@ -23,10 +23,12 @@ require 'rake/rpmtask'
RPMBUILD_DIR = "#{File.expand_path('~')}/rpmbuild"
RPM_SPEC = "rubygem-aeolus-image.spec"
+RPM_SPEC_IN = "rubygem-aeolus-image.spec.in"
+PKG_VERSION = "0.3.0"
spec = Gem::Specification.new do |s|
s.name = 'aeolus-image'
- s.version = '0.3.0'
+ s.version = PKG_VERSION
s.summary= 'cli for aeolus cloud suite'
s.description = 'Commandline interface for working with the aeolus cloud management suite'
s.author = 'Jason Guiditta, Martyn Taylor'
@@ -65,7 +67,7 @@ RSpec::Core::RakeTask.new do |t|
t.pattern = FileList['spec/**/*.rb']
end
-Rake::RpmTask.new(RPM_SPEC) do |rpm|
+Rake::RpmTask.new(RPM_SPEC_IN,RPM_SPEC,PKG_VERSION) do |rpm|
rpm.need_tar = true
rpm.package_files.include("lib/*")
rpm.topdir = "#{RPMBUILD_DIR}"
diff --git a/rake/rpmtask.rb b/rake/rpmtask.rb
index 93d24e9..934ad06 100644
--- a/rake/rpmtask.rb
+++ b/rake/rpmtask.rb
@@ -26,25 +26,39 @@ module Rake
# Create a package based upon a RPM spec.
# RPM packages, can be produced by this task.
class RpmTask < PackageTask
- # RPM spec containing the metadata for this package
+ # input RPM spec containing the metadata for this package
+ attr_accessor :rpm_spec_in
+
+ # filename for output RPM spec
attr_accessor :rpm_spec
+ # package version
+ attr_accessor :pkg_version
+
# RPM build dir
attr_accessor :topdir
# Include extra_release information in the rpm
attr_accessor :include_extra_release
- def initialize(rpm_spec)
- init(rpm_spec)
+ def initialize(rpm_spec_in,rpm_spec,pkg_version)
+ init(rpm_spec_in,rpm_spec,pkg_version)
yield self if block_given?
define if block_given?
end
- def init(rpm_spec)
- @include_extra_release = true
+ def init(rpm_spec_in,rpm_spec,pkg_version)
+ @rpm_spec_in = rpm_spec_in
@rpm_spec = rpm_spec
+ @pkg_version = pkg_version
+
+ @include_extra_release = eval `grep -q '^[[:space:]]*Release:[[:space:]]*0' #{@rpm_spec_in} && echo true || echo false`
+
+ git_head = `git log -1 --pretty=format:%h`
+ extra_release = @include_extra_release ? ("." + Time.now.strftime("%Y%m%d%H%M%S").gsub(/\s/, '') + "git" + "#{git_head}") : ''
+ `sed -e "s|@VERSION@|#{@pkg_version}|;s|^\\(Release:[^%]*\\)|\\1#{extra_release}|" #{@rpm_spec_in} > #{@rpm_spec}`
+
# parse this out of the rpmbuild macros,
# not ideal but better than hardcoding this
File.open('/etc/rpm/macros.dist', "r") { |f|
@@ -94,16 +108,12 @@ module Rake
# FIXME properly determine :package build artifact(s) to copy to sources dir
file rpm_file, [:include_extra_release] => [:package, "#{@topdir}/SOURCES", "#{@topdir}/SPECS"] do |t,args|
- @include_extra_release = args.include_extra_release != "false"
- git_head = `git log -1 --pretty=format:%h`
- extra_release = "." + Time.now.strftime("%Y%m%d%H%M%S").gsub(/\s/, '') + "git" + "#{git_head}"
cp "#{package_dir}/#{@name}-#{(a)version}.tgz", "#{@topdir}/SOURCES/"
# FIXME - This seems like a hack, but we don't know the gem's name
cp "#{package_dir}/#{(a)name.gsub('rubygem-', '')}-#{(a)version}.gem", "#{@topdir}/SOURCES/"
cp @rpm_spec, "#{@topdir}/SPECS"
sh "#{@rpmbuild_cmd} " +
"--define '_topdir #{@topdir}' " +
- "--define 'extra_release #{@include_extra_release ? extra_release : ''}' " +
"-ba #{@rpm_spec}"
end
end
diff --git a/rubygem-aeolus-image.spec b/rubygem-aeolus-image.spec
deleted file mode 100644
index e3c4c3a..0000000
--- a/rubygem-aeolus-image.spec
+++ /dev/null
@@ -1,99 +0,0 @@
-%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
-%global gemname aeolus-image
-%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
-%global rubyabi 1.8
-
-Summary: Ruby Client for interacting with Image Warehouse and Image Factory
-Name: rubygem-aeolus-image
-Version: 0.3.0
-Release: 0%{?extra_release}%{?dist}
-Group: Development/Languages
-License: ASL 2.0
-URL: http://aeolusproject.org
-
-Source0: %{gemname}-%{version}.gem
-
-Requires: ruby(abi) = %{rubyabi}
-Requires: rubygems
-Requires: rubygem(nokogiri) >= 1.4.0
-Requires: rubygem(rest-client)
-Requires: rubygem(imagefactory-console) >= 0.4.0
-Requires: rubygem(oauth)
-Requires: rubygem(vcr)
-Requires: rubygem(webmock)
-Requires: rubygem(timecop)
-
-BuildRequires: ruby
-BuildRequires: rubygems
-
-BuildArch: noarch
-Provides: rubygem(%{gemname}) = %{version}
-
-%description
-Ruby Client for Image Warehouse and Image Factory
-
-%prep
-%setup -q -c -T
-mkdir -p ./%{gemdir}
-gem install --local --install-dir ./%{gemdir} --force --rdoc %{SOURCE0}
-
-%build
-
-%install
-rm -rf %{buildroot}
-mkdir -p %{buildroot}%{gemdir}
-cp -a .%{gemdir}/* %{buildroot}%{gemdir}/
-
-rm -rf %{buildroot}%{gemdir}/gems/%{gemname}-%{version}/.yardoc
-
-%files
-%doc %{geminstdir}/COPYING
-%doc %{gemdir}/doc/%{gemname}-%{version}
-%dir %{geminstdir}
-%{geminstdir}/Rakefile
-%{geminstdir}/lib
-%{geminstdir}/spec
-%{gemdir}/cache/%{gemname}-%{version}.gem
-%{gemdir}/specifications/%{gemname}-%{version}.gemspec
-
-%changelog
-* Thu Dec 1 2011 Steve Linabery <slinaber(a)redhat.com> - 0.2.0-1
-- d451628 Fixed creation of a bucket when saving a bucket object
-- 289dcbf Added builder helper methods
-- 4f708c8 Added couple of helper methods to image model
-- 6ae089c Added convenience methods for checking providerimages on image/build
-- 90154e0 Updated models to use iwhd query syntax
-- 1cba777 Fixed comparing of two warehouse objects
-- 2e2d735 Commented out couple of tests
-- 4b6408d Updated fetching of template for an image
-- 424c117 Added create method and enabled access to body
-- dd829cd BZ#752494 Handle 404 for status in rubygem
-- 5d4cdc0 Add tests for aeolus-image-rubygem
-- 0706f29 Fixed request_without_oauth method
-- a121b34 Fixed template body initialize
-- 105420b Updated warehouse models initialize method and fixed image body
-- cd55966 adding icicle support
-- 3aa588a Fixes formatting of README.md
-- 0cf1a58 Adds README file
-
-* Tue Nov 29 2011 Steve Linabery <slinaber(a)redhat.com> - 0.2.0-0
-- Bump release, set version to 0
-
-* Mon Oct 17 2011 Matt Wagner <matt.wagner(a)redhat.com> - 0.0.1-4
-- Adds OAuth support for Factory client
-- Add vcr and webmock dependencies
-
-* Tue Sep 20 2011 Martyn Taylor <mtaylor(a)redhat.com> - 0.0.1-3
-- split out command line tools
-
-* Wed Jul 20 2011 Mo Morsi <mmorsi(a)redhat.com> - 0.0.1-3
-- more updates to conform to fedora guidelines
-
-* Fri Jul 15 2011 Mo Morsi <mmorsi(a)redhat.com> - 0.0.1-2
-- updated package to conform to fedora guidelines
-
-* Mon Jul 04 2011 <mtaylor(a)redhat.com> - 0.0.1-1
-- Added man files
-
-* Wed Jun 15 2011 <jguiditt(a)redhat.com> - 0.0.1-1
-- Initial package
diff --git a/rubygem-aeolus-image.spec.in b/rubygem-aeolus-image.spec.in
new file mode 100644
index 0000000..8e700a3
--- /dev/null
+++ b/rubygem-aeolus-image.spec.in
@@ -0,0 +1,99 @@
+%global gemdir %(ruby -rubygems -e 'puts Gem::dir' 2>/dev/null)
+%global gemname aeolus-image
+%global geminstdir %{gemdir}/gems/%{gemname}-%{version}
+%global rubyabi 1.8
+
+Summary: Ruby Client for interacting with Image Warehouse and Image Factory
+Name: rubygem-aeolus-image
+Version: @VERSION@
+Release: 0%{?extra_release}%{?dist}
+Group: Development/Languages
+License: ASL 2.0
+URL: http://aeolusproject.org
+
+Source0: %{gemname}-%{version}.gem
+
+Requires: ruby(abi) = %{rubyabi}
+Requires: rubygems
+Requires: rubygem(nokogiri) >= 1.4.0
+Requires: rubygem(rest-client)
+Requires: rubygem(imagefactory-console) >= 0.4.0
+Requires: rubygem(oauth)
+Requires: rubygem(vcr)
+Requires: rubygem(webmock)
+Requires: rubygem(timecop)
+
+BuildRequires: ruby
+BuildRequires: rubygems
+
+BuildArch: noarch
+Provides: rubygem(%{gemname}) = %{version}
+
+%description
+Ruby Client for Image Warehouse and Image Factory
+
+%prep
+%setup -q -c -T
+mkdir -p ./%{gemdir}
+gem install --local --install-dir ./%{gemdir} --force --rdoc %{SOURCE0}
+
+%build
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}%{gemdir}
+cp -a .%{gemdir}/* %{buildroot}%{gemdir}/
+
+rm -rf %{buildroot}%{gemdir}/gems/%{gemname}-%{version}/.yardoc
+
+%files
+%doc %{geminstdir}/COPYING
+%doc %{gemdir}/doc/%{gemname}-%{version}
+%dir %{geminstdir}
+%{geminstdir}/Rakefile
+%{geminstdir}/lib
+%{geminstdir}/spec
+%{gemdir}/cache/%{gemname}-%{version}.gem
+%{gemdir}/specifications/%{gemname}-%{version}.gemspec
+
+%changelog
+* Thu Dec 1 2011 Steve Linabery <slinaber(a)redhat.com> - 0.2.0-1
+- d451628 Fixed creation of a bucket when saving a bucket object
+- 289dcbf Added builder helper methods
+- 4f708c8 Added couple of helper methods to image model
+- 6ae089c Added convenience methods for checking providerimages on image/build
+- 90154e0 Updated models to use iwhd query syntax
+- 1cba777 Fixed comparing of two warehouse objects
+- 2e2d735 Commented out couple of tests
+- 4b6408d Updated fetching of template for an image
+- 424c117 Added create method and enabled access to body
+- dd829cd BZ#752494 Handle 404 for status in rubygem
+- 5d4cdc0 Add tests for aeolus-image-rubygem
+- 0706f29 Fixed request_without_oauth method
+- a121b34 Fixed template body initialize
+- 105420b Updated warehouse models initialize method and fixed image body
+- cd55966 adding icicle support
+- 3aa588a Fixes formatting of README.md
+- 0cf1a58 Adds README file
+
+* Tue Nov 29 2011 Steve Linabery <slinaber(a)redhat.com> - 0.2.0-0
+- Bump release, set version to 0
+
+* Mon Oct 17 2011 Matt Wagner <matt.wagner(a)redhat.com> - 0.0.1-4
+- Adds OAuth support for Factory client
+- Add vcr and webmock dependencies
+
+* Tue Sep 20 2011 Martyn Taylor <mtaylor(a)redhat.com> - 0.0.1-3
+- split out command line tools
+
+* Wed Jul 20 2011 Mo Morsi <mmorsi(a)redhat.com> - 0.0.1-3
+- more updates to conform to fedora guidelines
+
+* Fri Jul 15 2011 Mo Morsi <mmorsi(a)redhat.com> - 0.0.1-2
+- updated package to conform to fedora guidelines
+
+* Mon Jul 04 2011 <mtaylor(a)redhat.com> - 0.0.1-1
+- Added man files
+
+* Wed Jun 15 2011 <jguiditt(a)redhat.com> - 0.0.1-1
+- Initial package
--
1.7.6.4
12 years, 4 months
[PATCH] BZ#740089: fix wording in interactive installer (rev2)
by Mo Morsi
---
recipes/aeolus/cli.rb | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/recipes/aeolus/cli.rb b/recipes/aeolus/cli.rb
index cd3d0dd..2f43b22 100644
--- a/recipes/aeolus/cli.rb
+++ b/recipes/aeolus/cli.rb
@@ -33,22 +33,25 @@ NODE_YAML='/etc/aeolus-configure/nodes/custom'
IMAGE_TEMPLATE='/etc/aeolus-configure/custom_template.tdl'
PROFILE_RECIPE='/usr/share/aeolus-configure/modules/aeolus/manifests/profiles/custom.pp'
+
installed_component = nil
install_components = ["- aeolus::conductor"]
-while ![:None, :All].include?(installed_component)
+component_options = [:"Select All Components", :"Finish Selection",
+ :"Select Image Factory", :"Select Image Warehouse"]
+all_option,none_option,imagefactory_option, image_warehouse_option = *component_options
+while ![none_option, all_option].include?(installed_component)
clear_screen
say "Select Aeolus Components to Install"
installed_component =
choose do |menu|
menu.prompt = "Install Aeolus Component: "
- menu.choice :All
- menu.choice :None
- menu.choice :"Image Factory"
- menu.choice :"Image Warehouse"
+ component_options.each { |op|
+ menu.choice op
+ }
end
- if installed_component == :"Image Factory"
+ if installed_component == imagefactory_option
install_components << "- aeolus::image-factory"
- elsif installed_component == :"Image Warehouse"
+ elsif installed_component == image_warehouse_option
install_components << "- aeolus::iwhd"
elsif installed_component == :All
install_components << "- aeolus::conductor" <<
--
1.7.6.4
12 years, 4 months
rhev-m setup verification
by Berezovski, Vladimir
Can you pls verify these steps while configuring the rhev-m setup from https://www.aeolusproject.org/redmine/projects/aeolus/wiki/RHEV-M_Setup ?
4. Conductor Setup
I added rhev account and test succeeded . Then I created new realm say example.com and using "add mapping to realm " option selected my rhev nfs storage domain . Is that what was required ?
>From the doc it is not clear this statement - "create a realm and map it to a backend realm - you must use backend realm, mapping to provider doesn't work for RHEVM."
6. Create a deployable
The doc says following -" Create an xml descriptor following the example below and save it to /var/www/html/deployable.xml. Then add it to "Suggested Deployables" in conductor "Administer" tab. The URL for the deployable is http://localhost/deployable.xml"
I do not find this - "add it to "Suggested Deployables" in conductor "Administer" tab ..."
Thanks .
Best regards ,
Vladimir Berezovski
________________________________
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster(a)nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes.
To protect the environment please do not print this e-mail unless necessary.
An NDS Group Limited company. www.nds.com
12 years, 4 months
[PATCH conductor] Fixing jQuery template on deployments#show
by Imre Farkas
From: Imre Farkas <ifarkas(a)redhat.com>
---
.../views/deployments/_pretty_view_show.html.haml | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/app/views/deployments/_pretty_view_show.html.haml b/src/app/views/deployments/_pretty_view_show.html.haml
index c8cfec6..a52ea08 100644
--- a/src/app/views/deployments/_pretty_view_show.html.haml
+++ b/src/app/views/deployments/_pretty_view_show.html.haml
@@ -55,9 +55,11 @@
<dt class="state">#{t('deployments.pretty_view_show.state')}</dt>
<dd>${state}</dd>
</li>
- <li>
- <a href="#{key_instance_path('replace_id').sub('replace_id', '${id}')}">#{t('deployments.pretty_view_show.download_key')}</a>
- </li>
+ {{if has_key}}
+ <li>
+ <a href="#{key_instance_path('replace_id').sub('replace_id', '${id}')}">#{t('deployments.pretty_view_show.download_key')}</a>
+ </li>
+ {{/if}}
</ul>
</dl>
<hr>
--
1.7.6.4
12 years, 4 months
[PATCH conductor] Removed edit pool family button from pool families table (bz768154)
by Jirka Tomasek
From: Jiri Tomasek <jtomasek(a)redhat.com>
---
src/app/views/pool_families/_list.html.haml | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/src/app/views/pool_families/_list.html.haml b/src/app/views/pool_families/_list.html.haml
index 1243856..422a678 100644
--- a/src/app/views/pool_families/_list.html.haml
+++ b/src/app/views/pool_families/_list.html.haml
@@ -14,7 +14,6 @@
= link_to pool_family.name, pool_family
.section-controls
#obj_actions
- = link_to t(:edit), edit_pool_family_path(pool_family), :class => 'pool_family_button'
= link_to t("pools.new_pool"), new_pool_path(:pool_family_id => pool_family.id), :class => 'pool_family_button'
= link_to t("images.new.new_image"), new_image_path( :environment => pool_family.id), :class => 'pool_family_button'
- unless pool_family.pools.blank?
--
1.7.7.3
12 years, 4 months
[PATCH conductor] Fix catalog dropdown when no catalog exist, bz769279
by Jirka Tomasek
From: Jiri Tomasek <jtomasek(a)redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=769279
---
src/app/views/layouts/_catalog_dropdown.html.haml | 8 ++++++--
src/config/locales/en.yml | 2 ++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/app/views/layouts/_catalog_dropdown.html.haml b/src/app/views/layouts/_catalog_dropdown.html.haml
index 837b349..311cb28 100644
--- a/src/app/views/layouts/_catalog_dropdown.html.haml
+++ b/src/app/views/layouts/_catalog_dropdown.html.haml
@@ -1,5 +1,9 @@
 
%div.catalog_list
%ul.more
- - catalogs.each do |catalog|
- %li.catalog= link_to catalog.name, launch_from_catalog_deployments_path(:catalog_id => catalog.id)
\ No newline at end of file
+ - if catalogs.empty?
+ %li.catalog
+ %a= t("catalogs.catalog_list.no_catalogs")
+ - else
+ - catalogs.each do |catalog|
+ %li.catalog= link_to catalog.name, launch_from_catalog_deployments_path(:catalog_id => catalog.id)
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index c1526a0..4654de4 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -662,6 +662,8 @@ en:
preset_filters:
all_catalogs: "All Catalogs"
belongs_to_default_pool: "Belongs to Default Pool"
+ catalog_list:
+ no_catalogs: "-- No Catalogs --"
target_images:
flash:
notice:
--
1.7.7.3
12 years, 4 months
problem to push Fedora image into ec2
by Berezovski, Vladimir
Hi ,
When I ran aeolus-cli push command I got this error :
#aeolus-cli push --provider ec2-eu-west-1 --account my-ec2-euw --image b7aefc7c-2ca8-4f5b-b46b-003b6483d406 --build 038a8a1b-572d-4906-9fb8-c9c652589cdf --targetimage ae864a3c-a547-4b95-8079-60d0216969bc
ImageFactoryException: Unable to gain ssh access after 300 seconds - aborting
2011-12-21 17:49:04,992 DEBUG imgfac.BuildJob.BuildJob pid(506) Message: Builder (b323fb8d-eb42-4fba-9e7f-bb56c26024e5) changed status from PUSHING to FAILED
Ec2 account test was successful from the conductor .
I set permissions 400 to /etc/oz/id_rsa-icicle-gen
Image status :
# aeolus-cli list --targetimages 16563f45-be7b-4f14-b59e-ce2a1c4f60fd
ID Status Build
------------------------------------ -------- ------------------------------------
926c00a1-f42a-4876-9a45-6d3687a4ccc9 COMPLETE 16563f45-be7b-4f14-b59e-ce2a1c4f60fd
Best regards ,
Vladimir Berezovski
________________________________
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster(a)nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes.
To protect the environment please do not print this e-mail unless necessary.
An NDS Group Limited company. www.nds.com
12 years, 4 months
Proposed Update to Aeolus "Getting Started" Guide
by Tzu-Mainn Chen
Hi,
I'd like to propose the following changes to the "Getting Started" guide:
a) add in a short glossary of terms in the beginning
b) include a path for configuring against a mock provider
I think that these would be useful for a person looking to evaluate
Aeolus with fresh eyes.
Any comments/objections/other things that might be useful to add? I'll
probably get started on updating the documentation in a little bit.
Thanks,
Tzu-Mainn Chen
12 years, 4 months
[PATCH configure] BZ#740089: fix wording in interactive installer
by Mo Morsi
---
recipes/aeolus/cli.rb | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/recipes/aeolus/cli.rb b/recipes/aeolus/cli.rb
index cd3d0dd..a685d18 100644
--- a/recipes/aeolus/cli.rb
+++ b/recipes/aeolus/cli.rb
@@ -33,11 +33,13 @@ NODE_YAML='/etc/aeolus-configure/nodes/custom'
IMAGE_TEMPLATE='/etc/aeolus-configure/custom_template.tdl'
PROFILE_RECIPE='/usr/share/aeolus-configure/modules/aeolus/manifests/profiles/custom.pp'
+first = true
installed_component = nil
install_components = ["- aeolus::conductor"]
while ![:None, :All].include?(installed_component)
clear_screen
- say "Select Aeolus Components to Install"
+ say "Select #{first ? "First" : "Next" } Aeolus Component to Install"
+ first = false
installed_component =
choose do |menu|
menu.prompt = "Install Aeolus Component: "
--
1.7.6.4
12 years, 4 months