diff --git a/0003-Remove-unused-requre-xmlrpc-client.patch b/0003-Remove-unused-requre-xmlrpc-client.patch new file mode 100644 index 0000000..a875561 --- /dev/null +++ b/0003-Remove-unused-requre-xmlrpc-client.patch @@ -0,0 +1,30 @@ +From 484623eda09d8e8b9857f5279ebb891a423588dc Mon Sep 17 00:00:00 2001 +From: Kylo Ginsberg +Date: Sun, 18 Sep 2016 06:42:46 -0700 +Subject: [PATCH] (maint) Remove unused: requre 'xmlrpc/client' + +In 152299cc, as part of PUP-6120, use of the xmlrpc library +was removed from the code, but the require itself was not +removed. This commit simply removes the vestigial require. + +Note that this change is required to support ruby 2.4, +which no longer includes the xmlrpc library. +--- + lib/puppet/provider/package/pip.rb | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/lib/puppet/provider/package/pip.rb b/lib/puppet/provider/package/pip.rb +index 9300b7b..aad447b 100644 +--- a/lib/puppet/provider/package/pip.rb ++++ b/lib/puppet/provider/package/pip.rb +@@ -2,7 +2,6 @@ + # + + require 'puppet/provider/package' +-require 'xmlrpc/client' + require 'puppet/util/http_proxy' + + Puppet::Type.type(:package).provide :pip, +-- +2.7.4 + diff --git a/0004-PUP-7383-Skip-cipher-monkey-patch-on-ruby-2.4.patch b/0004-PUP-7383-Skip-cipher-monkey-patch-on-ruby-2.4.patch new file mode 100644 index 0000000..1fff912 --- /dev/null +++ b/0004-PUP-7383-Skip-cipher-monkey-patch-on-ruby-2.4.patch @@ -0,0 +1,36 @@ +From 578687a00195191185f44d8cb38f4b7716d99c31 Mon Sep 17 00:00:00 2001 +From: Josh Cooper +Date: Tue, 16 May 2017 15:47:04 -0700 +Subject: [PATCH] (PUP-7383) Skip cipher monkey patch on ruby 2.4+ + +Previously, we appended "!SSLv2" to the SSLContext +DEFAULT_PARAMS[:ciphers] to ensure that puppet never uses SSLv2, either +from our http client or when using open-uri. However, ruby 2.4 only +defines the `:ciphers` array if using openssl < 1.1.0[1]. As a result, +puppet as a gem running on newer systems would hard fail. + +Check existence of array before trying to append to it. + +[1] https://github.com/ruby/ruby/commit/c9dc016#diff-8406e11e4a42f9de6badcd0f6a6c4262R33 +--- + lib/puppet/util/monkey_patches.rb | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/lib/puppet/util/monkey_patches.rb b/lib/puppet/util/monkey_patches.rb +index b999fc4..ffb887e 100644 +--- a/lib/puppet/util/monkey_patches.rb ++++ b/lib/puppet/util/monkey_patches.rb +@@ -35,7 +35,9 @@ class OpenSSL::SSL::SSLContext + else + DEFAULT_PARAMS[:options] = OpenSSL::SSL::OP_NO_SSLv2 | OpenSSL::SSL::OP_NO_SSLv3 + end +- DEFAULT_PARAMS[:ciphers] << ':!SSLv2' ++ if DEFAULT_PARAMS[:ciphers] ++ DEFAULT_PARAMS[:ciphers] << ':!SSLv2' ++ end + + alias __original_initialize initialize + private :__original_initialize +-- +2.7.4 + diff --git a/puppet.spec b/puppet.spec index 71e94cd..da303d7 100644 --- a/puppet.spec +++ b/puppet.spec @@ -19,7 +19,7 @@ Name: puppet Version: 4.6.2 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A network tool for managing many disparate systems License: ASL 2.0 URL: http://puppetlabs.com @@ -32,6 +32,8 @@ Source4: start-puppet-wrapper # Puppetlabs messed up with default paths Patch01: 0001-Fix-puppet-paths.patch Patch02: 0002-Revert-maint-Remove-puppetmaster.service.patch +Patch03: 0003-Remove-unused-requre-xmlrpc-client.patch +Patch04: 0004-PUP-7383-Skip-cipher-monkey-patch-on-ruby-2.4.patch Group: System Environment/Base BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -119,6 +121,8 @@ The server can also function as a certificate authority and file server. %setup -q %patch01 -p1 -b .paths %patch02 -p1 -b .server +%patch03 -p1 +%patch04 -p1 # Unbundle rm -r lib/puppet/vendor/*{pathspec,rgen}* @@ -386,6 +390,9 @@ exit 0 rm -rf %{buildroot} %changelog +* Thu May 18 2017 Dominic Cleal - 4.6.2-3 +- Fix Ruby 2.4 compatibility, xmlrpc + OpenSSL errors (BZ#1443673, BZ#1440710) + * Sat Feb 11 2017 Fedora Release Engineering - 4.6.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild