[PATCH aeolus-cli (revised)] 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 | 31 +++++++++----
rubygem-aeolus-cli.spec | 113 --------------------------------------------
rubygem-aeolus-cli.spec.in | 113 ++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 139 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..7f914ee 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, {:suffix => '.in', :pkg_version => 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..94bd143 100644
--- a/rake/rpmtask.rb
+++ b/rake/rpmtask.rb
@@ -26,24 +26,41 @@ 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
+ # 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, args = {})
+ init(rpm_spec,args)
yield self if block_given?
define if block_given?
end
- def init(rpm_spec)
- @include_extra_release = true
+ def init(rpm_spec,args)
@rpm_spec = rpm_spec
+
+ if args[:suffix]
+ rpm_spec_in = @rpm_spec + args[:suffix]
+ @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}") : ''
+
+ if args[:pkg_version]
+ pkg_version = args[:pkg_version]
+ `sed -e "s|@VERSION@|#{pkg_version}|;s|^\\(Release:[^%]*\\)|\\1#{extra_release}|" #{rpm_spec_in} > #{@rpm_spec}`
+ else
+ `sed -e "s|^\\(Release:[^%]*\\)|\\1#{extra_release}|" #{rpm_spec_in} > #{@rpm_spec}`
+ end
+ end
# parse this out of the rpmbuild macros,
# not ideal but better than hardcoding this
@@ -94,16 +111,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, 3 months
[PATCH conductor] Allow creating deployables from imported images
by Matt Wagner
---
src/app/views/images/show.html.haml | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/src/app/views/images/show.html.haml b/src/app/views/images/show.html.haml
index 8dcd7da..9074e18 100644
--- a/src/app/views/images/show.html.haml
+++ b/src/app/views/images/show.html.haml
@@ -5,7 +5,6 @@
=t'return_to'
= link_to t('images.index.images'), images_path, :class => 'rounded-link'
.button-group
- - unless @image.imported?
= link_to t('.new_deployable_from_image'), new_deployable_path(:create_from_image => @image.id), :class => 'button pill'
- unless @image.imported?
= link_to t('.template_xml'), template_image_path((a)image.uuid), :class => 'button'
--
1.7.6.4
12 years, 3 months
[PATCH conductor] fix user dropdown in masthead
by Jirka Tomasek
From: Jiri Tomasek <jtomasek(a)redhat.com>
---
src/app/stylesheets/custom.scss | 18 ----------
src/app/stylesheets/layout.scss | 53 ++++++++++++++++++++++++-----
src/app/views/layouts/_masthead.html.haml | 5 ++-
src/public/javascripts/application.js | 14 --------
4 files changed, 47 insertions(+), 43 deletions(-)
diff --git a/src/app/stylesheets/custom.scss b/src/app/stylesheets/custom.scss
index 692c61c..2041fee 100644
--- a/src/app/stylesheets/custom.scss
+++ b/src/app/stylesheets/custom.scss
@@ -1,21 +1,3 @@
-#user-menu.nojs a {
- margin-left: 1em;
-}
-
-#user-menu.js {
- position: fixed;
- width: 100px;
- height: 30px;
- background: white;
- display: none;
- border: 2px solid #E7E7E7;
- padding: 0.5em;
-
- a {
- display: block;
- }
-}
-
/*fixes the button_to helper used in button-group problem*/
.button-group .button_to div .button.pill{
-webkit-border-radius: 0em 50em;
diff --git a/src/app/stylesheets/layout.scss b/src/app/stylesheets/layout.scss
index a6d5301..18a7c53 100644
--- a/src/app/stylesheets/layout.scss
+++ b/src/app/stylesheets/layout.scss
@@ -888,26 +888,61 @@ header#masthead{
margin: 0 auto;
width: 960px;
overflow: hidden;
- position: relative;
}
- a.user-dropdown{
+ label#user-dropdown-label{
border: 1px solid #ccc;
- background: url('../../images/button-userdrop.png') no-repeat center center;
- background: url('../../images/button-userdrop.png') no-repeat center center, -moz-linear-gradient(top, rgba(239,239,239,0), rgba(204,204,204,0));
- background: url('../../images/button-userdrop.png') no-repeat center center, -webkit-gradient(linear,left top,left bottom,color-stop(0, rgb(239,239,239)),color-stop(1, rgb(204,204,204)));
+ background: #e7e7e7 url('../../images/button-userdrop.png') no-repeat center 4px;
+ display: inline-block;
width: 46px;
margin-left: 4px;
padding: 5px 2px 5px 2px;
color: transparent;
font-size: 12px; /* match the font-size of the query box, for proper valign */
+ -webkit-border-radius: 50em;
+ -moz-border-radius: 50em;
+ border-radius: 50em;
+ position: relative;
+ z-index: 2;
+ cursor: pointer;
+ margin-left: -26px;
+ }
+
+ #user-menu {
+ position: absolute;
+ top: 34px;
+ left: 50%;
+ margin-left: 354px;
+ width: 100px;
+ height: 30px;
+ background: #e7e7e7;
+ display: none;
+ border: 1px solid #ccc;
+ padding: 8px 12px;
+ z-index: 1;
+ -webkit-border-radius: 7px 0px 7px 7px;
+ -moz-border-radius: 7px 0px 7px 7px;
+ border-radius: 7px 0px 7px 7px;
- &:active{
- background: url('../../images/button-userdrop.png') no-repeat center center;
- background: url('../../images/button-userdrop.png') no-repeat center center, -moz-linear-gradient(top, rgba(232,232,232,0), rgba(210,210,210,0));
- background: url('../../images/button-userdrop.png') no-repeat center center, -webkit-gradient(linear,left top,left bottom,color-stop(0, rgb(232,232,232)),color-stop(1, rgb(210,210,210)));
+ a {
+ display: block;
}
+ }
+ input[type="checkbox"]#user-dropdown{
+ margin: 0px 0px 0px 10px;
+ position: relative;
+ z-index: 0;
+ opacity: 0;
+ }
+ /*toggle user-menu on checkbox checking*/
+ input[type="checkbox"]#user-dropdown:checked ~ #user-menu{ display: block; }
+ input[type="checkbox"]#user-dropdown:checked ~ #user-dropdown-label{
+ border-bottom: none;
+ -webkit-border-radius: 1em 1em 0px 0px;
+ -moz-border-radius: 1em 1em 0px 0px;
+ border-radius: 1em 1em 0px 0px;
+ height: 18px;
}
nav#system{
diff --git a/src/app/views/layouts/_masthead.html.haml b/src/app/views/layouts/_masthead.html.haml
index ea66453..4eaa72f 100644
--- a/src/app/views/layouts/_masthead.html.haml
+++ b/src/app/views/layouts/_masthead.html.haml
@@ -5,8 +5,9 @@
%li.account
%span.name.label.strong.small-caps
= "#{current_user.first_name} #{current_user.last_name}" if current_user.present?
- %a.button.pill.user-dropdown{:href => '#'}
- %span#user-menu{ :class => javascript? ? 'js' : 'nojs' }
+ %input{:type => 'checkbox', :id => 'user-dropdown'}
+ %label{:for => "user-dropdown", :id => 'user-dropdown-label'}
+ #user-menu
= link_to t('masthead.my_account'), account_path
= link_to t('masthead.logout'), logout_path
/ %li.separator
diff --git a/src/public/javascripts/application.js b/src/public/javascripts/application.js
index 9df25bf..d2c262b 100644
--- a/src/public/javascripts/application.js
+++ b/src/public/javascripts/application.js
@@ -202,19 +202,6 @@ $.extend(Conductor, {
});
},
- enhanceUserMenu: function() {
- var $userDropdown = $('#system a.user-dropdown');
- if($userDropdown.length == 0) return;
-
- var offset = $userDropdown.offset()
- offset.top = offset.top + 40;
- $('#user-menu').offset(offset)
- $userDropdown.click(function(ev) {
- ev.preventDefault();
- $('#user-menu').toggle();
- });
- },
-
});
/* custom methods */
@@ -311,7 +298,6 @@ $(document).ready(function () {
Conductor.closeNotification();
Conductor.toggleCollapsible();
Conductor.selectAllCheckboxes();
- Conductor.enhanceUserMenu();
Conductor.tabAjaxRequest();
Conductor.initializeBackbone();
});
--
1.7.7.3
12 years, 3 months
ERROR: TargetImageNotFound
by Berezovski, Vladimir
Target image looks fine :
# aeolus-cli list --targetimages b520d82e-ecf6-4922-8188-1e090bd96cf6
ID Status Build
------------------------------------ -------- ------------------------------------
6947d44a-69c9-48e2-a73f-9092fa36f468 COMPLETE b520d82e-ecf6-4922-8188-1e090bd96cf6
But this makes error :
# aeolus-cli push --provider rhevm --account rhevm --image 2a1d7009-8d86-4148-b941-e4817cdce816 --build b520d82e-ecf6-4922-8188-1e090bd96cf6 --targetimage 6947d44a-69c9-48e2-a73f-9092fa36f468
ERROR: TargetImageNotFound => Could not find an appropriate target image for account rhevm
????
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, 3 months
update aeolus service with the latest patches
by Berezovski, Vladimir
Please advise what is the best scenario in order to upate aeolus<https://fedorahosted.org/pipermail/aeolus-devel/> service with the latest patches ?
Are these available now ?
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, 3 months