diff --git a/0001-Ruby-1.9.3-has-a-different-error-when-require-fails.patch b/0001-Ruby-1.9.3-has-a-different-error-when-require-fails.patch new file mode 100644 index 0000000..f7fed29 --- /dev/null +++ b/0001-Ruby-1.9.3-has-a-different-error-when-require-fails.patch @@ -0,0 +1,31 @@ +From a71208ba651d96d2ac9792c5358f10231a140e10 Mon Sep 17 00:00:00 2001 +From: Daniel Pittman +Date: Fri, 9 Mar 2012 14:43:02 -0800 +Subject: [PATCH/puppet] Ruby 1.9.3 has a different error when `require` + fails. + +The text of the error message when load fails has changed, resulting in the +test failing. This adapts that to catch the different versions, allowing this +to pass in all cases. + +Signed-off-by: Daniel Pittman +--- + lib/puppet/provider/confine.rb | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/lib/puppet/provider/confine.rb b/lib/puppet/provider/confine.rb +index 6825def..b28d07d 100644 +--- a/lib/puppet/provider/confine.rb ++++ b/lib/puppet/provider/confine.rb +@@ -25,7 +25,7 @@ class Puppet::Provider::Confine + begin + require "puppet/provider/confine/#{name}" + rescue LoadError => detail +- unless detail.to_s =~ /No such file/i ++ unless detail.to_s =~ /No such file|cannot load such file/i + warn "Could not load confine test '#{name}': #{detail}" + end + # Could not find file +-- +1.7.6 + diff --git a/puppet.spec b/puppet.spec index 16cc58d..90b9418 100644 --- a/puppet.spec +++ b/puppet.spec @@ -22,6 +22,9 @@ Source1: http://downloads.puppetlabs.com/%{name}/%{name}-%{version}.tar.g Source2: puppetstoredconfigclean.rb # https://projects.puppetlabs.com/issues/9167 Patch0: 0001-9167-Do-not-sent-tagmail-reports-if-no-changes.patch +# http://projects.puppetlabs.com/issues/11325 +# https://github.com/puppetlabs/puppet/commit/a71208ba +Patch1: 0001-Ruby-1.9.3-has-a-different-error-when-require-fails.patch Group: System Environment/Base @@ -82,6 +85,7 @@ The server can also function as a certificate authority and file server. %prep %setup -q %patch0 -p1 +%patch1 -p1 patch -s -p1 < conf/redhat/rundir-perms.patch # Fix some rpmlint complaints @@ -279,6 +283,7 @@ rm -rf %{buildroot} - Change license from GPLv2 to ASL 2.0 - Drop %%post hacks to deal with upgrades from 0.25 - Minor rpmlint fixes +- Backport patch to silence confine warnings in ruby-1.9.3 * Wed Apr 11 2012 Todd Zullinger - 2.6.16-1 - Update to 2.6.16, fixes CVE-2012-1986, CVE-2012-1987, and CVE-2012-1988