From b4063acc8bf22d8885247e6a684d07ec8d084d60 Mon Sep 17 00:00:00 2001 From: ajacoutot Date: Fri, 8 Mar 2013 16:15:33 +0000 Subject: [PATCH] Remove the ldap patches which aren't needed anymore. ok robert@ (maintainer) --- sysutils/ruby-puppet/2/Makefile | 3 +- .../patch-lib_puppet_indirector_ldap_rb | 14 -------- .../patch-lib_puppet_indirector_node_ldap_rb | 33 ------------------- sysutils/ruby-puppet/3/Makefile | 4 +-- .../patch-lib_puppet_indirector_ldap_rb | 14 -------- .../patch-lib_puppet_indirector_node_ldap_rb | 33 ------------------- 6 files changed, 4 insertions(+), 97 deletions(-) delete mode 100644 sysutils/ruby-puppet/2/patches/patch-lib_puppet_indirector_ldap_rb delete mode 100644 sysutils/ruby-puppet/2/patches/patch-lib_puppet_indirector_node_ldap_rb delete mode 100644 sysutils/ruby-puppet/3/patches/patch-lib_puppet_indirector_ldap_rb delete mode 100644 sysutils/ruby-puppet/3/patches/patch-lib_puppet_indirector_node_ldap_rb diff --git a/sysutils/ruby-puppet/2/Makefile b/sysutils/ruby-puppet/2/Makefile index 5018c0de430..f3edd13720b 100644 --- a/sysutils/ruby-puppet/2/Makefile +++ b/sysutils/ruby-puppet/2/Makefile @@ -1,6 +1,7 @@ -# $OpenBSD: Makefile,v 1.1 2013/03/08 16:12:47 ajacoutot Exp $ +# $OpenBSD: Makefile,v 1.2 2013/03/08 16:15:33 ajacoutot Exp $ VERSION= 2.7.20 +REVISION= 0 post-install: ${INSTALL_DATA} ${WRKSRC}/examples/etc/puppet/{fileserver,puppet,tagmail}.conf \ diff --git a/sysutils/ruby-puppet/2/patches/patch-lib_puppet_indirector_ldap_rb b/sysutils/ruby-puppet/2/patches/patch-lib_puppet_indirector_ldap_rb deleted file mode 100644 index cdab72096eb..00000000000 --- a/sysutils/ruby-puppet/2/patches/patch-lib_puppet_indirector_ldap_rb +++ /dev/null @@ -1,14 +0,0 @@ -$OpenBSD: patch-lib_puppet_indirector_ldap_rb,v 1.1 2013/03/08 16:12:47 ajacoutot Exp $ ---- lib/puppet/indirector/ldap.rb.orig Fri Oct 29 00:02:05 2010 -+++ lib/puppet/indirector/ldap.rb Fri Oct 29 00:14:56 2010 -@@ -43,7 +43,9 @@ class Puppet::Indirector::Ldap < Puppet::Indirector::T - rescue SystemExit,NoMemoryError - raise - rescue Exception => detail -- if count == 0 -+ # XXX This is a bad workaround to avoid LDAP connection problems. -+ # We need to find the cause of the problem! -+ if count <= 10 - # Try reconnecting to ldap if we get an exception and we haven't yet retried. - count += 1 - @connection = nil diff --git a/sysutils/ruby-puppet/2/patches/patch-lib_puppet_indirector_node_ldap_rb b/sysutils/ruby-puppet/2/patches/patch-lib_puppet_indirector_node_ldap_rb deleted file mode 100644 index f2079c89ef8..00000000000 --- a/sysutils/ruby-puppet/2/patches/patch-lib_puppet_indirector_node_ldap_rb +++ /dev/null @@ -1,33 +0,0 @@ -$OpenBSD: patch-lib_puppet_indirector_node_ldap_rb,v 1.1 2013/03/08 16:12:47 ajacoutot Exp $ ---- lib/puppet/indirector/node/ldap.rb.orig Thu Sep 23 01:17:21 2010 -+++ lib/puppet/indirector/node/ldap.rb Fri Nov 12 11:15:22 2010 -@@ -1,3 +1,4 @@ -+require 'facter' - require 'puppet/node' - require 'puppet/indirector/ldap' - -@@ -29,6 +30,9 @@ class Puppet::Node::Ldap < Puppet::Indirector::Ldap - def find(request) - names = [request.key] - names << request.key.sub(/\..+/, '') if request.key.include?(".") # we assume it's an fqdn -+ -+ defnode = Puppet::Node::Facts.find(request.key).values['defnode'] -+ names << defnode if defnode - names << "default" - - node = nil -@@ -174,6 +178,14 @@ class Puppet::Node::Ldap < Puppet::Indirector::Ldap - parent_info = name2hash(parent) || raise(Puppet::Error.new("Could not find parent node '#{parent}'")) - information[:classes] += parent_info[:classes] - parent_info[:parameters].each do |param, value| -+ if (param =~ /^puppet[^class].*$/) -+ if information[:parameters][param].kind_of? String -+ information[:parameters][param] = information[:parameters][param].split("\n") -+ end -+ if information[:parameters][param] -+ information[:parameters][param] += parent_info[:parameters][param].to_a -+ end -+ end - # Specifically test for whether it's set, so false values are handled correctly. - information[:parameters][param] = value unless information[:parameters].include?(param) - end diff --git a/sysutils/ruby-puppet/3/Makefile b/sysutils/ruby-puppet/3/Makefile index b7ad58cb57f..0374cd22595 100644 --- a/sysutils/ruby-puppet/3/Makefile +++ b/sysutils/ruby-puppet/3/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.1 2013/03/08 16:12:47 ajacoutot Exp $ +# $OpenBSD: Makefile,v 1.2 2013/03/08 16:15:33 ajacoutot Exp $ VERSION= 3.1.0 -REVISION= 1 +REVISION= 2 .include diff --git a/sysutils/ruby-puppet/3/patches/patch-lib_puppet_indirector_ldap_rb b/sysutils/ruby-puppet/3/patches/patch-lib_puppet_indirector_ldap_rb deleted file mode 100644 index cdab72096eb..00000000000 --- a/sysutils/ruby-puppet/3/patches/patch-lib_puppet_indirector_ldap_rb +++ /dev/null @@ -1,14 +0,0 @@ -$OpenBSD: patch-lib_puppet_indirector_ldap_rb,v 1.1 2013/03/08 16:12:47 ajacoutot Exp $ ---- lib/puppet/indirector/ldap.rb.orig Fri Oct 29 00:02:05 2010 -+++ lib/puppet/indirector/ldap.rb Fri Oct 29 00:14:56 2010 -@@ -43,7 +43,9 @@ class Puppet::Indirector::Ldap < Puppet::Indirector::T - rescue SystemExit,NoMemoryError - raise - rescue Exception => detail -- if count == 0 -+ # XXX This is a bad workaround to avoid LDAP connection problems. -+ # We need to find the cause of the problem! -+ if count <= 10 - # Try reconnecting to ldap if we get an exception and we haven't yet retried. - count += 1 - @connection = nil diff --git a/sysutils/ruby-puppet/3/patches/patch-lib_puppet_indirector_node_ldap_rb b/sysutils/ruby-puppet/3/patches/patch-lib_puppet_indirector_node_ldap_rb deleted file mode 100644 index 6a464acd9ca..00000000000 --- a/sysutils/ruby-puppet/3/patches/patch-lib_puppet_indirector_node_ldap_rb +++ /dev/null @@ -1,33 +0,0 @@ -$OpenBSD: patch-lib_puppet_indirector_node_ldap_rb,v 1.1 2013/03/08 16:12:47 ajacoutot Exp $ ---- lib/puppet/indirector/node/ldap.rb.orig Sat Oct 20 06:57:51 2012 -+++ lib/puppet/indirector/node/ldap.rb Sun Oct 28 19:09:31 2012 -@@ -1,3 +1,4 @@ -+require 'facter' - require 'puppet/node' - require 'puppet/indirector/ldap' - -@@ -29,6 +30,9 @@ class Puppet::Node::Ldap < Puppet::Indirector::Ldap - def find(request) - names = [request.key] - names << request.key.sub(/\..+/, '') if request.key.include?(".") # we assume it's an fqdn -+ -+ defnode = Puppet::Node::Facts.find(request.key).values['defnode'] -+ names << defnode if defnode - names << "default" - - node = nil -@@ -179,6 +183,14 @@ class Puppet::Node::Ldap < Puppet::Indirector::Ldap - parent_info = name2hash(parent) || raise(Puppet::Error.new("Could not find parent node '#{parent}'")) - information[:classes] += parent_info[:classes] - parent_info[:parameters].each do |param, value| -+ if (param =~ /^puppet[^class].*$/) -+ if information[:parameters][param].kind_of? String -+ information[:parameters][param] = information[:parameters][param].split("\n") -+ end -+ if information[:parameters][param] -+ information[:parameters][param] += parent_info[:parameters][param].to_a -+ end -+ end - # Specifically test for whether it's set, so false values are handled correctly. - information[:parameters][param] = value unless information[:parameters].include?(param) - end