[packages/puppet] ruby 19 patch from fedora
glen
glen at pld-linux.org
Sun Aug 26 16:48:22 CEST 2012
commit 9af5b5eb92c2996b94b84d000465f44223fa99f7
Author: Elan Ruusamäe <glen at delfi.ee>
Date: Sun Aug 26 17:48:10 2012 +0300
ruby 19 patch from fedora
puppet.spec | 4 +++-
ruby19.patch | 31 +++++++++++++++++++++++++++++++
2 files changed, 34 insertions(+), 1 deletion(-)
---
diff --git a/puppet.spec b/puppet.spec
index 310ce19..56bbe73 100644
--- a/puppet.spec
+++ b/puppet.spec
@@ -5,12 +5,13 @@
Summary: A network tool for managing many disparate systems
Name: puppet
Version: 2.7.18
-Release: 0.4
+Release: 0.5
License: GPL v2+
Group: Networking/Admin
Source0: http://puppetlabs.com/downloads/puppet/%{name}-%{version}.tar.gz
# Source0-md5: 210725704692a0ca7b8ffc312471796e
Patch0: install-p.patch
+Patch1: ruby19.patch
URL: http://www.puppetlabs.com/
BuildRequires: docutils
BuildRequires: rpmbuild(macros) >= 1.484
@@ -53,6 +54,7 @@ Vim syntax for puppet .pp files
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
# puppet-queue.conf is more of an example, used for stompserver
mv conf/puppet-queue.conf examples/etc/puppet/
diff --git a/ruby19.patch b/ruby19.patch
new file mode 100644
index 0000000..f7fed29
--- /dev/null
+++ b/ruby19.patch
@@ -0,0 +1,31 @@
+From a71208ba651d96d2ac9792c5358f10231a140e10 Mon Sep 17 00:00:00 2001
+From: Daniel Pittman <daniel at puppetlabs.com>
+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 <daniel at puppetlabs.com>
+---
+ 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
+
More information about the pld-cvs-commit
mailing list