[puppet/el4] Handle CR/LF in puppet.conf (upstream #3514)
Todd Zullinger
tmz at fedoraproject.org
Tue Oct 4 01:21:47 UTC 2011
commit 09ca6ecfaa893f90570c4f8a45e05c11b217ac8d
Author: Todd Zullinger <tmz at pobox.com>
Date: Mon Oct 3 21:13:50 2011 -0400
Handle CR/LF in puppet.conf (upstream #3514)
puppet-0.25.5-puppet.conf-line-endings.patch | 33 ++++++++++++++++++++++++++
puppet.spec | 4 +++
2 files changed, 37 insertions(+), 0 deletions(-)
---
diff --git a/puppet-0.25.5-puppet.conf-line-endings.patch b/puppet-0.25.5-puppet.conf-line-endings.patch
new file mode 100644
index 0000000..570f2e1
--- /dev/null
+++ b/puppet-0.25.5-puppet.conf-line-endings.patch
@@ -0,0 +1,33 @@
+From 1e89bff59448bfc22c22f0b03bf965b7f4da0c77 Mon Sep 17 00:00:00 2001
+From: James Turnbull <james at lovedthanlost.net>
+Date: Wed, 16 Jun 2010 03:22:17 +1000
+Subject: [PATCH/puppet] Fixes #3514 - CR/LF line ending in puppet.conf cause silent failure
+
+Patch thanks to Alan Barrett
+---
+ lib/puppet/util/settings.rb | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/puppet/util/settings.rb b/lib/puppet/util/settings.rb
+index 11d760f..2dedc31 100644
+--- a/lib/puppet/util/settings.rb
++++ b/lib/puppet/util/settings.rb
+@@ -894,13 +894,13 @@ Generated on #{Time.now}.
+ text.split(/\n/).each { |line|
+ count += 1
+ case line
+- when /^\s*\[(\w+)\]$/
++ when /^\s*\[(\w+)\]\s*$/
+ section = $1.intern # Section names
+ # Add a meta section
+ result[section][:_meta] ||= {}
+ when /^\s*#/; next # Skip comments
+ when /^\s*$/; next # Skip blanks
+- when /^\s*(\w+)\s*=\s*(.*)$/ # settings
++ when /^\s*(\w+)\s*=\s*(.*?)\s*$/ # settings
+ var = $1.intern
+
+ # We don't want to munge modes, because they're specified in octal, so we'll
+--
+1.7.2.1
+
diff --git a/puppet.spec b/puppet.spec
index cda2211..b5ba383 100644
--- a/puppet.spec
+++ b/puppet.spec
@@ -15,6 +15,8 @@ Source1: http://puppetlabs.com/downloads/%{name}/%{name}-%{version}.tar.g
# http://projects.puppetlabs.com/issues/show/4252
# https://bugzilla.redhat.com/show_bug.cgi?id=615175
Patch0: puppet-0.25.5-yumrepo-deprecation-warning.patch
+# http://projects.reductivelabs.com/issues/3514
+Patch1: puppet-0.25.5-puppet.conf-line-endings.patch
Group: System Environment/Base
@@ -70,6 +72,7 @@ The server can also function as a certificate authority and file server.
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
patch -p1 < conf/redhat/rundir-perms.patch
%build
@@ -229,6 +232,7 @@ rm -rf %{buildroot}
* Mon Oct 03 2011 Todd Zullinger <tmz at pobox.com> - 0.25.5-2
- Create and own /usr/share/puppet/modules (#615432)
- Silence deprecation warnings in yumrepo type (#615175, upstream #4252)
+- Handle CR/LF in puppet.conf (upstream #3514)
* Mon May 17 2010 Todd Zullinger <tmz at pobox.com> - 0.25.5-1
- Update to 0.25.5
More information about the scm-commits
mailing list