[wallaby/f17] updated BuildRequires on F17

William Christian Benton willb at fedoraproject.org
Tue Mar 27 05:01:49 UTC 2012


commit f073cb571f6b25fe3e7b1e2d5b17be6ba948ee32
Author: Will Benton <willb at redhat.com>
Date:   Tue Mar 27 00:02:17 2012 -0500

    updated BuildRequires on F17

 .gitignore                                         |    1 +
 ...mands-will-blank-a-field-if-no-list-is-pr.patch |  149 +++++++++++++++++++
 0001-updated-spec-for-0.13.0-2.patch               |  152 --------------------
 0002-Added-command-to-remove-a-snapshot.patch      |   46 ++++++
 ...logging-and-failsafe-in-Parameter-default.patch |   35 +++++
 ...ustChangeParams-to-Store-in-config-client.patch |   27 ++++
 ...sue-blanking-non-param-type-relationships.patch |   25 ++++
 sources                                            |    2 +-
 wallaby.spec                                       |   30 ++++-
 9 files changed, 309 insertions(+), 158 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 8e0fc8a..7ce12ca 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
 /wallaby-0.12.4.tar.gz
 /wallaby-0.13.0.tar.gz
+/wallaby-0.13.1.tar.gz
diff --git a/0001-replace-commands-will-blank-a-field-if-no-list-is-pr.patch b/0001-replace-commands-will-blank-a-field-if-no-list-is-pr.patch
new file mode 100644
index 0000000..83d307b
--- /dev/null
+++ b/0001-replace-commands-will-blank-a-field-if-no-list-is-pr.patch
@@ -0,0 +1,149 @@
+From 11f90714b98ec5133d1863e9e693834470145efa Mon Sep 17 00:00:00 2001
+From: Robert Rati <rrati at redhat.com>
+Date: Thu, 9 Feb 2012 13:47:44 -0600
+Subject: [PATCH 1/5] replace-* commands will blank a field if no list is
+ provided
+
+---
+ lib/mrg/grid/config/shell/cmd_relationships.rb |   89 +++++++++++------------
+ 1 files changed, 43 insertions(+), 46 deletions(-)
+
+diff --git a/lib/mrg/grid/config/shell/cmd_relationships.rb b/lib/mrg/grid/config/shell/cmd_relationships.rb
+index 4186d8a..d9dc57b 100644
+--- a/lib/mrg/grid/config/shell/cmd_relationships.rb
++++ b/lib/mrg/grid/config/shell/cmd_relationships.rb
+@@ -18,24 +18,28 @@ module Mrg
+   module Grid
+     module Config
+       module Shell
+-        module GroupMembershipOps
+-          def act
+-            result = 0
+-
+-            cname = Mrg::Grid::Config.constants.grep(/^#{target_type.capitalize}/).select {|x| Mrg::Grid::Config.const_get(x).ancestors.include?(::SPQR::Manageable) }[0]
++        module VerifyOps
++          def verify_input
+             bad_target = verify_target
+             bad_names = verify_names
+-            if (bad_target != []) || (bad_names != [])
+-              puts "Invalid #{options[0][:opt_name]}: #{bad_target.inspect}" if bad_target != []
+-              puts "Invalid #{options[1][:opt_name].split("[")[0]}: #{bad_names.inspect}" if bad_names != []
+-              result = 1
+-            else
+-              @names.each do |n|
+-                obj = store.getNode(n)
+-                obj.modifyMemberships(command, [@target], {})
+-              end
++            if (not bad_target.empty?) || (not bad_names.empty?)
++              bad_target.each {|n| puts "#{options[0][:opt_name].split('-')[0].downcase} '#{n}' does not exist"}
++              bad_names.each {|n| puts "#{options[1][:opt_name].split('-')[0].downcase} '#{n}' does not exist"}
++              exit!(1, "Invalid input")
+             end
+-            result
++          end
++        end
++
++        module GroupMembershipOps
++          include VerifyOps
++
++          def act
++            verify_input
++            @names.each do |n|
++              obj = store.getNode(n)
++              obj.modifyMemberships(command, [@target], {})
++            end
++            return 0
+           end
+         end
+ 
+@@ -70,6 +74,8 @@ module Mrg
+         end
+ 
+         module RelationshipOps
++          include VerifyOps
++
+           def supports_options
+             false
+           end
+@@ -113,7 +119,7 @@ module Mrg
+             opts = 0
+             self.options.each do |opt|
+               input = args.shift
+-              if input == nil
++              if input == nil and command != "REPLACE"
+                 exit!(1, "you must specify a #{opt[:opt_name]}")
+               elsif opts < (self.options.length-1)
+                 @target = input
+@@ -128,9 +134,9 @@ module Mrg
+                   end
+                 else
+                   @names = []
+-                  @names << input
++                  @names << input if input and not input.empty?
+                   args.each do |a|
+-                    @names << a
++                    @names << a if not a.empty?
+                   end
+                   @names.uniq!
+                 end
+@@ -179,38 +185,29 @@ module Mrg
+           end
+ 
+           def act
+-            result = 0
+-
++            verify_input
+             cname = Mrg::Grid::Config.constants.grep(/^#{target_type.capitalize}/).select {|x| Mrg::Grid::Config.const_get(x).ancestors.include?(::SPQR::Manageable) }[0]
+-            bad_target = verify_target
+-            bad_names = verify_names
+-            if (bad_target != []) || (bad_names != [])
+-              puts "Invalid #{options[0][:opt_name]}: #{bad_target.inspect}" if bad_target != []
+-              puts "Invalid #{options[1][:opt_name].split("[")[0]}: #{bad_names.inspect}" if bad_names != []
+-              result = 1
++            smethod = Mrg::Grid::MethodUtils.find_store_method("get#{cname.slice(0,5)}")
++            obj = store.send(smethod, @target)
++            if cname == "Node" and sub_group_for_node
++              obj = obj.identity_group
++              cname = "Group"
++            end
++            cmethod = Mrg::Grid::MethodUtils.find_method(name_type.slice(0,5).capitalize, cname).select {|m| m if m.index("modify") != nil}[0]
++            if (@priority == nil) || (command != "ADD")
++              obj.send(cmethod, command, @names, {})
+             else
+-              smethod = Mrg::Grid::MethodUtils.find_store_method("get#{cname.slice(0,5)}")
+-              obj = store.send(smethod, @target)
+-              if cname == "Node" and sub_group_for_node
+-                obj = obj.identity_group
+-                cname = "Group"
+-              end
+-              cmethod = Mrg::Grid::MethodUtils.find_method(name_type.slice(0,5).capitalize, cname).select {|m| m if m.index("modify") != nil}[0]
+-              if (@priority == nil) || (command != "ADD")
+-                obj.send(cmethod, command, @names, {})
+-              else
+-                get = Mrg::Grid::Config.const_get(cname).get_from_set(cmethod.to_sym)
+-                cur = obj.send(get)
+-                cnt = 0
+-                @names.select {|x| cur.include?(x)}.each {|y| cnt += 1 if cur.index(y) < @priority}
+-                cur = cur - @names
+-                if command == "ADD"
+-                  cur.insert(@priority - cnt, *@names).compact!
+-                end
+-                obj.send(cmethod, "REPLACE", cur, {})
++              get = Mrg::Grid::Config.const_get(cname).get_from_set(cmethod.to_sym)
++              cur = obj.send(get)
++              cnt = 0
++              @names.select {|x| cur.include?(x)}.each {|y| cnt += 1 if cur.index(y) < @priority}
++              cur = cur - @names
++              if command == "ADD"
++                cur.insert(@priority - cnt, *@names).compact!
+               end
++              obj.send(cmethod, "REPLACE", cur, {})
+             end
+-            result
++            return 0
+           end
+         end
+ 
+-- 
+1.7.7.6
+
diff --git a/0002-Added-command-to-remove-a-snapshot.patch b/0002-Added-command-to-remove-a-snapshot.patch
new file mode 100644
index 0000000..2d55fc4
--- /dev/null
+++ b/0002-Added-command-to-remove-a-snapshot.patch
@@ -0,0 +1,46 @@
+From 8bf41ed6c4330c90966f10ff7096bbe67167c221 Mon Sep 17 00:00:00 2001
+From: Robert Rati <rrati at redhat.com>
+Date: Thu, 8 Mar 2012 22:14:40 -0600
+Subject: [PATCH 2/5] Added command to remove a snapshot
+
+---
+ lib/mrg/grid/config/shell/cmd_snapshot.rb |   23 +++++++++++++++++++++++
+ 1 files changed, 23 insertions(+), 0 deletions(-)
+
+diff --git a/lib/mrg/grid/config/shell/cmd_snapshot.rb b/lib/mrg/grid/config/shell/cmd_snapshot.rb
+index 942310b..7fe035d 100644
+--- a/lib/mrg/grid/config/shell/cmd_snapshot.rb
++++ b/lib/mrg/grid/config/shell/cmd_snapshot.rb
+@@ -65,6 +65,29 @@ module Mrg
+             :makeSnapshot
+           end
+         end
++
++        class RemoveSnapshot < Command
++          include SnapshotBase
++
++          def self.opname
++            "remove-snapshot"
++          end
++          
++          def self.opargs
++            " SNAPNAME"
++          end
++          
++          def self.description
++            "Removes a snapshot with a given name."
++          end
++
++          register_callback :after_option_parsing, :check_name
++
++          private
++          def storeop
++            :removeSnapshot
++          end
++        end
+         
+         class LoadSnapshot < Command
+           include SnapshotBase
+-- 
+1.7.7.6
+
diff --git a/0003-additional-logging-and-failsafe-in-Parameter-default.patch b/0003-additional-logging-and-failsafe-in-Parameter-default.patch
new file mode 100644
index 0000000..c0693b4
--- /dev/null
+++ b/0003-additional-logging-and-failsafe-in-Parameter-default.patch
@@ -0,0 +1,35 @@
+From 2e4dafae57f2e47ae9d94de08691daa9edaf3235 Mon Sep 17 00:00:00 2001
+From: Will Benton <willb at redhat.com>
+Date: Tue, 13 Mar 2012 18:03:47 -0500
+Subject: [PATCH 3/5] additional logging and failsafe in Parameter#default
+
+---
+ lib/mrg/grid/config/Parameter.rb |    8 ++++++--
+ 1 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/lib/mrg/grid/config/Parameter.rb b/lib/mrg/grid/config/Parameter.rb
+index 530a513..327bca3 100644
+--- a/lib/mrg/grid/config/Parameter.rb
++++ b/lib/mrg/grid/config/Parameter.rb
+@@ -92,12 +92,16 @@ module Mrg
+         # default 
+         # * default (lstr/O)
+         def default
+-          log.debug "getDefault called on param #{self.inspect}"
++          log.debug "default called on param #{self.inspect}"
+           log.warn "param #{self.name} is a must_change parameter; its default value is meaningless by definition" if self.must_change
++
+           # Assign values to output parameters
+           self.default_val ||= ""
++
++          log.warn "param #{self.name} does not have a String value; it has a #{self.default_val.class} value" unless self.default_val.is_a?(String)
++
+           # Return value
+-          return self.default_val
++          return (self.default_val.to_s)
+         end
+         
+         # setDefault 
+-- 
+1.7.7.6
+
diff --git a/0004-Added-getMustChangeParams-to-Store-in-config-client.patch b/0004-Added-getMustChangeParams-to-Store-in-config-client.patch
new file mode 100644
index 0000000..d753939
--- /dev/null
+++ b/0004-Added-getMustChangeParams-to-Store-in-config-client.patch
@@ -0,0 +1,27 @@
+From 66fc917646a355d2ef7a563933d517aa77be412f Mon Sep 17 00:00:00 2001
+From: Robert Rati <rrati at redhat.com>
+Date: Wed, 21 Mar 2012 10:05:03 -0500
+Subject: [PATCH 4/5] Added getMustChangeParams to Store in config-client
+
+---
+ lib/mrg/grid/config-client.rb |    4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/lib/mrg/grid/config-client.rb b/lib/mrg/grid/config-client.rb
+index b4cba82..0604eb8 100644
+--- a/lib/mrg/grid/config-client.rb
++++ b/lib/mrg/grid/config-client.rb
+@@ -437,6 +437,10 @@ module Mrg
+           get_object(check_result(@qmfo.getParam(name)).obj, Parameter)
+         end
+ 
++        def getMustChangeParams
++          check_result(@qmfo.getMustChangeParams).params
++        end
++
+         def removeParam(name)
+           check_result(@qmfo.removeParam(name))
+           nil
+-- 
+1.7.7.6
+
diff --git a/0005-Fixed-issue-blanking-non-param-type-relationships.patch b/0005-Fixed-issue-blanking-non-param-type-relationships.patch
new file mode 100644
index 0000000..0b67938
--- /dev/null
+++ b/0005-Fixed-issue-blanking-non-param-type-relationships.patch
@@ -0,0 +1,25 @@
+From 91c5fdb80be5a3687678613e57e77d28e3b9016b Mon Sep 17 00:00:00 2001
+From: Robert Rati <rrati at redhat.com>
+Date: Wed, 21 Mar 2012 14:26:22 -0500
+Subject: [PATCH 5/5] Fixed issue blanking non-param type relationships
+
+---
+ lib/mrg/grid/config/shell/cmd_relationships.rb |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/lib/mrg/grid/config/shell/cmd_relationships.rb b/lib/mrg/grid/config/shell/cmd_relationships.rb
+index d9dc57b..5478116 100644
+--- a/lib/mrg/grid/config/shell/cmd_relationships.rb
++++ b/lib/mrg/grid/config/shell/cmd_relationships.rb
+@@ -126,7 +126,7 @@ module Mrg
+               else
+                 if (name_type == "param") && (target_type != "subsystem") && (command != "REMOVE")
+                   @names = {}
+-                  args.unshift(input)
++                  args.unshift(input) if input
+                   args.each do |a|
+                     tmp = a.split("=", 2)
+                     @names[tmp[0]] = 0 if tmp.length == 1
+-- 
+1.7.7.6
+
diff --git a/sources b/sources
index 61dc69f..db464ac 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-8058c9647f68f8cc3ab818931b28b524  wallaby-0.13.0.tar.gz
+7e5b7133453c920d8c99944d29d1d22a  wallaby-0.13.1.tar.gz
diff --git a/wallaby.spec b/wallaby.spec
index ee19248..5e99c66 100644
--- a/wallaby.spec
+++ b/wallaby.spec
@@ -21,7 +21,9 @@
 %if (0%{?fedora} >= 17)
 %global ruby_abi 1.9.1
 %global ruby_appropriate_install_dir %{ruby_vendorlibdir}
+%global requires_ruby_devel 1
 %else
+%global requires_ruby_devel 0
 %global ruby_abi 1.8
 %{!?ruby_sitelib: %global ruby_sitelib %(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"] ')}
 %global ruby_appropriate_install_dir %{ruby_sitelib}
@@ -34,13 +36,17 @@
 
 Summary: Condor pool configuration service with QMF interface
 Name: wallaby
-Version: 0.13.0
+Version: 0.13.1
 Release: 2%{?dist}
 Group: Applications/System
 License: ASL 2.0
 URL: http://git.fedorahosted.org/git/grid/wallaby.git
 Source0: https://fedorahosted.org/releases/g/r/grid/%{name}-%{version}.tar.gz
-Patch0: 0001-updated-spec-for-0.13.0-2.patch
+Patch0: 0001-replace-commands-will-blank-a-field-if-no-list-is-pr.patch
+Patch1: 0002-Added-command-to-remove-a-snapshot.patch
+Patch2: 0003-additional-logging-and-failsafe-in-Parameter-default.patch
+Patch3: 0004-Added-getMustChangeParams-to-Store-in-config-client.patch
+Patch4: 0005-Fixed-issue-blanking-non-param-type-relationships.patch
 %if %{building_for_el5}
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 %endif
@@ -93,6 +99,9 @@ Requires: ruby-irb
 Requires: ruby-qmf >= 0.7.929717
 Requires: ruby-spqr >= 0.3.5
 Requires: ruby-rhubarb >= 0.2.6
+%if %{requires_ruby_devel}
+BuildRequires: ruby-devel
+%endif
 Provides: ruby(mrg/grid/config) = %{version}
 
 %package -n python-wallaby
@@ -133,6 +142,10 @@ Wallaby.
 %setup -q
 
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
 %build
 
 sed 's/^export //' < etc/sysconfig/wallaby-agent > etc/sysconfig/wallaby-agent-env
@@ -271,16 +284,23 @@ fi
 %if %{building_for_el5}
 %defattr(-, root, root, -)
 %endif
-/%{ruby_appropriate_install_dir}/mrg/grid/
+%{ruby_appropriate_install_dir}/mrg/grid/
 %if %{has_sinatra}
-%exclude /%{ruby_appropriate_install_dir}/mrg/grid/config/shell/cmd_http_server.rb
+%exclude %{ruby_appropriate_install_dir}/mrg/grid/config/shell/cmd_http_server.rb
 
 %files -n wallaby-http-server
-/%{ruby_appropriate_install_dir}/mrg/grid/config/shell/cmd_http_server.rb
+%{ruby_appropriate_install_dir}/mrg/grid/config/shell/cmd_http_server.rb
 %endif
 
 %changelog
 
+* Mon Mar 26 2012 willb <willb at redhat> - 0.13.1-2
+- F17 fixes
+
+* Fri Mar 9 2012 willb <willb at redhat> - 0.13.1-1
+- Fixes BZs 786801 and 796406
+- specfile updates from Fedora work
+
 * Fri Feb 10 2012 willb <willb at redhat> - 0.13.0-2
 - specfile fixes
 


More information about the scm-commits mailing list