aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-support/puppet/puppet/safe_yaml-syck-isn-t-available-for-Ruby-2.0.0.patch
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2015-08-20 16:14:01 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2015-08-20 22:55:18 -0400
commit2b9a979b624eeb2fa9efdc64ebe5670498b044d7 (patch)
tree73d2226d6d0a78efcdbf7e0770271017b9f78540 /recipes-support/puppet/puppet/safe_yaml-syck-isn-t-available-for-Ruby-2.0.0.patch
parentdcb148f4ccfa5896ebffaf4eb8b76a9999173faa (diff)
downloadmeta-cloud-services-2b9a979b624eeb2fa9efdc64ebe5670498b044d7.tar.gz
meta-cloud-services-2b9a979b624eeb2fa9efdc64ebe5670498b044d7.tar.bz2
meta-cloud-services-2b9a979b624eeb2fa9efdc64ebe5670498b044d7.zip
puppet: back-port some patches to fix issues with Ruby >= 2.0.0
We should uprev puppet at some point but for the sake of stabilizing first the following set of patches will allow puppet to work with the newer version of Ruby that we are using. The first two are upstream commits and the third is a commit which borrows a fix found in various puppet forks (repos which people host to stabalize older versions of puppet). With these patches puppet can now execute commands like 'help' and 'apply' without falling over. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-support/puppet/puppet/safe_yaml-syck-isn-t-available-for-Ruby-2.0.0.patch')
-rw-r--r--recipes-support/puppet/puppet/safe_yaml-syck-isn-t-available-for-Ruby-2.0.0.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/recipes-support/puppet/puppet/safe_yaml-syck-isn-t-available-for-Ruby-2.0.0.patch b/recipes-support/puppet/puppet/safe_yaml-syck-isn-t-available-for-Ruby-2.0.0.patch
new file mode 100644
index 0000000..1cd5e25
--- /dev/null
+++ b/recipes-support/puppet/puppet/safe_yaml-syck-isn-t-available-for-Ruby-2.0.0.patch
@@ -0,0 +1,35 @@
+From fca1579d62d5b978375511e062b9c18f4413dd5a Mon Sep 17 00:00:00 2001
+From: Mark Asselstine <mark.asselstine@windriver.com>
+Date: Thu, 20 Aug 2015 14:06:32 -0400
+Subject: [PATCH] safe_yaml: syck isn't available for Ruby >= 2.0.0
+
+This change was taken from various puppet forks but does not exist in
+puppet upstream as they drop support for YAML on the network as part
+of work to fix PUP-3272.
+
+https://tickets.puppetlabs.com/browse/PUP-3272
+
+Community versions of this change:
+https://github.com/kylog/puppet/commit/42b2e77ec24dfbbf2317d08615a35127afbc4782
+
+Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
+---
+ lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb b/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb
+index 8670ace..722dd3e 100644
+--- a/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb
++++ b/lib/puppet/vendor/safe_yaml/lib/safe_yaml.rb
+@@ -3,7 +3,7 @@ require "yaml"
+ # This needs to be defined up front in case any internal classes need to base
+ # their behavior off of this.
+ module SafeYAML
+- YAML_ENGINE = defined?(YAML::ENGINE) ? YAML::ENGINE.yamler : "syck"
++ YAML_ENGINE = defined?(YAML::ENGINE) ? YAML::ENGINE.yamler : (defined?(Psych) && YAML == Psych ? "psych" : "syck")
+ end
+
+ require "set"
+--
+2.1.4
+