From ea23f017151b12d01c08b943ace5e8733dd63434 Mon Sep 17 00:00:00 2001
From: Sjoerd Mulder
Date: Tue, 8 Jan 2013 13:29:15 +0100
Subject: Fixing ssl_cert task error message
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
If you run `rake ssl_cert` without arguments it fails on .gsub method,
this should be done after the checkĀ
---
lib/chef/tasks/chef_repo.rake | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/chef/tasks/chef_repo.rake b/lib/chef/tasks/chef_repo.rake
index 6f839a486f..dab8602fd0 100644
--- a/lib/chef/tasks/chef_repo.rake
+++ b/lib/chef/tasks/chef_repo.rake
@@ -188,8 +188,8 @@ task :ssl_cert do
fqdn =~ /^(.+?)\.(.+)$/
hostname = $1
domain = $2
- keyfile = fqdn.gsub("*", "wildcard")
raise "Must provide FQDN!" unless fqdn && hostname && domain
+ keyfile = fqdn.gsub("*", "wildcard")
puts "** Creating self signed SSL Certificate for #{fqdn}"
sh("(cd #{CADIR} && openssl genrsa 2048 > #{keyfile}.key)")
sh("(cd #{CADIR} && chmod 644 #{keyfile}.key)")
--
cgit v1.2.1
From 46303598f9af0b050c291c07bde39f902eb80ba8 Mon Sep 17 00:00:00 2001
From: sersut
Date: Tue, 9 Jul 2013 22:44:13 +0300
Subject: Add -E flag to chef-solor so that users can make use of environments
with chef-solo.
---
lib/chef/application/solo.rb | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/chef/application/solo.rb b/lib/chef/application/solo.rb
index 5e3fe90607..ada8cb0ae7 100644
--- a/lib/chef/application/solo.rb
+++ b/lib/chef/application/solo.rb
@@ -160,6 +160,11 @@ class Chef::Application::Solo < Chef::Application
:description => 'Enable whyrun mode',
:boolean => true
+ option :environment,
+ :short => '-E ENVIRONMENT',
+ :long => '--environment ENVIRONMENT',
+ :description => 'Set the Chef Environment on the node'
+
attr_reader :chef_solo_json
def initialize
--
cgit v1.2.1
From 17d2789d4823b026d6ed673b05a13f6586116814 Mon Sep 17 00:00:00 2001
From: Ameya Varade
Date: Thu, 4 Jul 2013 18:55:54 +0530
Subject: Disabling Readline extension module in IRB
---
bin/chef-shell | 2 ++
1 file changed, 2 insertions(+)
diff --git a/bin/chef-shell b/bin/chef-shell
index 90598d665d..c1cd0d4873 100755
--- a/bin/chef-shell
+++ b/bin/chef-shell
@@ -31,4 +31,6 @@ $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")))
require "chef/shell"
+#irb --noreadline Don't use Readline extension module
+IRB.conf[:USE_READLINE] = false
Shell.start
--
cgit v1.2.1
From 1643a817a9605fadba11d797d33fc5aa37c72bf3 Mon Sep 17 00:00:00 2001
From: Ameya Varade
Date: Thu, 4 Jul 2013 19:33:05 +0530
Subject: disable readline module if Windows box
---
bin/chef-shell | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/chef-shell b/bin/chef-shell
index c1cd0d4873..29a2cb7746 100755
--- a/bin/chef-shell
+++ b/bin/chef-shell
@@ -32,5 +32,5 @@ $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")))
require "chef/shell"
#irb --noreadline Don't use Readline extension module
-IRB.conf[:USE_READLINE] = false
+IRB.conf[:USE_READLINE] = false if (ENV['OS'] == 'Windows_NT')
Shell.start
--
cgit v1.2.1
From 69b214405bfd475c100551b396a9ccf2d1839669 Mon Sep 17 00:00:00 2001
From: adamedx
Date: Tue, 9 Jul 2013 15:18:05 -0700
Subject: Use standard platform detection for Windows
---
bin/chef-shell | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/bin/chef-shell b/bin/chef-shell
index 29a2cb7746..d6ebfc9fe2 100755
--- a/bin/chef-shell
+++ b/bin/chef-shell
@@ -31,6 +31,7 @@ $:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "..", "lib")))
require "chef/shell"
-#irb --noreadline Don't use Readline extension module
-IRB.conf[:USE_READLINE] = false if (ENV['OS'] == 'Windows_NT')
+# On Windows only, enable irb --noreadline because of input problems --
+# See CHEF-3284.
+IRB.conf[:USE_READLINE] = false if RUBY_PLATFORM =~ /mswin|mingw|windows/
Shell.start
--
cgit v1.2.1
From 466cdfde0fe9d54edcacf37737b982c672fd8357 Mon Sep 17 00:00:00 2001
From: adamedx
Date: Wed, 10 Jul 2013 14:15:58 -0700
Subject: Use Chef for reliable platform detection
---
bin/chef-shell | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/chef-shell b/bin/chef-shell
index d6ebfc9fe2..f334635742 100755
--- a/bin/chef-shell
+++ b/bin/chef-shell
@@ -33,5 +33,5 @@ require "chef/shell"
# On Windows only, enable irb --noreadline because of input problems --
# See CHEF-3284.
-IRB.conf[:USE_READLINE] = false if RUBY_PLATFORM =~ /mswin|mingw|windows/
+IRB.conf[:USE_READLINE] = false if Chef::Platform::windows?
Shell.start
--
cgit v1.2.1
From 18d2e44052046019c54b9b5d8d22026b9b1bfe68 Mon Sep 17 00:00:00 2001
From: danielsdeleo
Date: Wed, 10 Jul 2013 14:52:06 -0700
Subject: Upgrade rspec to 2.13.x
---
chef.gemspec | 2 +-
spec/unit/mixin/shell_out_spec.rb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/chef.gemspec b/chef.gemspec
index caf2e4cffc..cbee2c0a00 100644
--- a/chef.gemspec
+++ b/chef.gemspec
@@ -31,7 +31,7 @@ Gem::Specification.new do |s|
s.add_dependency "erubis"
%w(rdoc sdoc rake rack rspec_junit_formatter).each { |gem| s.add_development_dependency gem }
- %w(rspec-core rspec-expectations rspec-mocks).each { |gem| s.add_development_dependency gem, "~> 2.12.0" }
+ %w(rspec-core rspec-expectations rspec-mocks).each { |gem| s.add_development_dependency gem, "~> 2.13.0" }
s.add_development_dependency "chef-zero", "~> 1.4"
s.add_development_dependency "puma", "~> 1.6"
diff --git a/spec/unit/mixin/shell_out_spec.rb b/spec/unit/mixin/shell_out_spec.rb
index 6ca700fcdb..c7ca56fe84 100644
--- a/spec/unit/mixin/shell_out_spec.rb
+++ b/spec/unit/mixin/shell_out_spec.rb
@@ -31,7 +31,7 @@ describe Chef::Mixin::ShellOut do
let(:cmd) { "echo '#{rand(1000)}'" }
let(:output) { StringIO.new }
- let(:capture_log_output) { Chef::Log.logger = Logger.new(output) }
+ let!(:capture_log_output) { Chef::Log.logger = Logger.new(output) }
let(:assume_deprecation_log_level) { Chef::Log.stub!(:level).and_return(:warn) }
context 'without options' do
--
cgit v1.2.1
From 7bac32f746a6e341c1cd1aa63fa097ca27325560 Mon Sep 17 00:00:00 2001
From: danielsdeleo
Date: Wed, 10 Jul 2013 15:58:00 -0700
Subject: Don't prepend the path b/c it breaks custom ruby
E.g., system ruby may be used instead of the intended ruby if there is a
ruby in /usr/local/bin
---
ci/jenkins_run_tests.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ci/jenkins_run_tests.sh b/ci/jenkins_run_tests.sh
index 9330d7cd07..5bf7def062 100755
--- a/ci/jenkins_run_tests.sh
+++ b/ci/jenkins_run_tests.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-export PATH=/usr/local/bin:$PATH
+export PATH=$PATH:/usr/local/bin
ruby -v;
# remove the Gemfile.lock and try again if bundler fails.
--
cgit v1.2.1
From 44f1bf6f0e904aa7196c543ff38f1385428c0525 Mon Sep 17 00:00:00 2001
From: danielsdeleo
Date: Wed, 10 Jul 2013 16:00:50 -0700
Subject: Avoid conflicts w/ rspec's ARGV in tests
---
spec/unit/application/client_spec.rb | 9 +++++++++
spec/unit/application_spec.rb | 3 +++
2 files changed, 12 insertions(+)
diff --git a/spec/unit/application/client_spec.rb b/spec/unit/application/client_spec.rb
index e894b8f702..45893119e2 100644
--- a/spec/unit/application/client_spec.rb
+++ b/spec/unit/application/client_spec.rb
@@ -19,6 +19,8 @@ require 'spec_helper'
describe Chef::Application::Client, "reconfigure" do
before do
+ @original_argv = ARGV.dup
+ ARGV.clear
@original_config = Chef::Config.configuration.dup
@app = Chef::Application::Client.new
@@ -34,6 +36,7 @@ describe Chef::Application::Client, "reconfigure" do
after do
Chef::Config.configuration.replace(@original_config)
+ ARGV.replace(@original_argv)
end
describe "when in daemonized mode and no interval has been set" do
@@ -137,10 +140,16 @@ end
describe Chef::Application::Client, "configure_chef" do
before do
+ @original_argv = ARGV.dup
+ ARGV.clear
@app = Chef::Application::Client.new
@app.configure_chef
end
+ after do
+ ARGV.replace(@original_argv)
+ end
+
it "should set the colored output to false by default on windows and true otherwise" do
if windows?
Chef::Config[:color].should be_false
diff --git a/spec/unit/application_spec.rb b/spec/unit/application_spec.rb
index f3df8c14cd..e0701614a3 100644
--- a/spec/unit/application_spec.rb
+++ b/spec/unit/application_spec.rb
@@ -20,6 +20,8 @@ require 'spec_helper'
describe Chef::Application do
before do
+ @original_argv = ARGV.dup
+ ARGV.clear
@original_conf = Chef::Config.configuration
Chef::Log.logger = Logger.new(StringIO.new)
@app = Chef::Application.new
@@ -29,6 +31,7 @@ describe Chef::Application do
after do
Chef::Config.configuration.replace(@original_conf)
+ ARGV.replace(@original_argv)
end
describe "reconfigure" do
--
cgit v1.2.1
From 0109ad550956f30e1348072ef13cd4de9c6c68d4 Mon Sep 17 00:00:00 2001
From: danielsdeleo
Date: Mon, 1 Jul 2013 18:16:59 -0700
Subject: Buffer ssh output by line to avoid mangling it.
Fixes CHEF-4335 ( http://tickets.opscode.com/browse/CHEF-4335 )
Reads SSH output by slicing up to the first newline and then printing.
Output with no newline is buffered on a per-host basis so that it does
not get interleaved with other hosts' output.
---
lib/chef/knife/ssh.rb | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
diff --git a/lib/chef/knife/ssh.rb b/lib/chef/knife/ssh.rb
index 8cc05bd433..ba6b9ae0e1 100644
--- a/lib/chef/knife/ssh.rb
+++ b/lib/chef/knife/ssh.rb
@@ -211,15 +211,28 @@ class Chef
end
def print_data(host, data)
- if data =~ /\n/
- data.split(/\n/).each { |d| print_data(host, d) }
+ @buffers ||= {}
+ if leftover = @buffers[host]
+ @buffers[host] = nil
+ print_data(host, leftover + data)
else
- padding = @longest - host.length
- str = ui.color(host, :cyan) + (" " * (padding + 1)) + data
- ui.msg(str)
+ if newline_index = data.index("\n")
+ line = data.slice!(0...newline_index)
+ data.slice!(0)
+ print_line(host, line)
+ print_data(host, data)
+ else
+ @buffers[host] = data
+ end
end
end
+ def print_line(host, data)
+ padding = @longest - host.length
+ str = ui.color(host, :cyan) + (" " * (padding + 1)) + data
+ ui.msg(str)
+ end
+
def ssh_command(command, subsession=nil)
exit_status = 0
subsession ||= session
@@ -232,6 +245,7 @@ class Chef
ch.on_data do |ichannel, data|
print_data(ichannel[:host], data)
if data =~ /^knife sudo password: /
+ print_data(ichannel[:host], "\n")
ichannel.send_data("#{get_password}\n")
end
end
--
cgit v1.2.1
From 2c8b2f926dd15edf9e4cc91ffb32b01d593c3c07 Mon Sep 17 00:00:00 2001
From: Lamont Granquist
Date: Thu, 11 Jul 2013 14:23:15 -0700
Subject: get first gem.bat in path rather than last
---
spec/unit/provider/package/rubygems_spec.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spec/unit/provider/package/rubygems_spec.rb b/spec/unit/provider/package/rubygems_spec.rb
index d883a7f882..7d0567314a 100644
--- a/spec/unit/provider/package/rubygems_spec.rb
+++ b/spec/unit/provider/package/rubygems_spec.rb
@@ -256,7 +256,7 @@ describe Chef::Provider::Package::Rubygems::AlternateGemEnvironment do
it "determines the installed versions of gems from the source index (part2: the unmockening)" do
$stdout.stub!(:write)
path_to_gem = if windows?
- `where gem`.split[-1]
+ `where gem`.split[1]
else
`which gem`.strip
end
--
cgit v1.2.1
From d3ecfbd40333c08777d2bb200bb8dccb26a48bec Mon Sep 17 00:00:00 2001
From: danielsdeleo
Date: Tue, 16 Jul 2013 09:11:55 -0700
Subject: Bump dev version to 11.8.0.alpha.0
Ongoing bugfixes for 11.6.0 release will occur in the 11-stable branch.
---
distro/common/html/chef-client.8.html | 6 +++---
distro/common/html/chef-expander.8.html | 6 +++---
distro/common/html/chef-expanderctl.8.html | 6 +++---
distro/common/html/chef-server-webui.8.html | 6 +++---
distro/common/html/chef-server.8.html | 6 +++---
distro/common/html/chef-shell.1.html | 6 +++---
distro/common/html/chef-solo.8.html | 6 +++---
distro/common/html/chef-solr.8.html | 8 ++++----
distro/common/html/knife-bootstrap.1.html | 6 +++---
distro/common/html/knife-client.1.html | 6 +++---
distro/common/html/knife-configure.1.html | 6 +++---
distro/common/html/knife-cookbook-site.1.html | 6 +++---
distro/common/html/knife-cookbook.1.html | 6 +++---
distro/common/html/knife-data-bag.1.html | 6 +++---
distro/common/html/knife-environment.1.html | 6 +++---
distro/common/html/knife-exec.1.html | 6 +++---
distro/common/html/knife-index.1.html | 6 +++---
distro/common/html/knife-node.1.html | 6 +++---
distro/common/html/knife-role.1.html | 6 +++---
distro/common/html/knife-search.1.html | 6 +++---
distro/common/html/knife-ssh.1.html | 6 +++---
distro/common/html/knife-status.1.html | 6 +++---
distro/common/html/knife-tag.1.html | 6 +++---
distro/common/html/knife.1.html | 6 +++---
distro/common/man/man1/chef-shell.1 | 2 +-
distro/common/man/man1/knife-bootstrap.1 | 2 +-
distro/common/man/man1/knife-client.1 | 2 +-
distro/common/man/man1/knife-configure.1 | 2 +-
distro/common/man/man1/knife-cookbook-site.1 | 2 +-
distro/common/man/man1/knife-cookbook.1 | 2 +-
distro/common/man/man1/knife-data-bag.1 | 2 +-
distro/common/man/man1/knife-environment.1 | 2 +-
distro/common/man/man1/knife-exec.1 | 2 +-
distro/common/man/man1/knife-index.1 | 2 +-
distro/common/man/man1/knife-node.1 | 2 +-
distro/common/man/man1/knife-role.1 | 2 +-
distro/common/man/man1/knife-search.1 | 2 +-
distro/common/man/man1/knife-ssh.1 | 2 +-
distro/common/man/man1/knife-status.1 | 2 +-
distro/common/man/man1/knife-tag.1 | 2 +-
distro/common/man/man1/knife.1 | 2 +-
distro/common/man/man8/chef-client.8 | 2 +-
distro/common/man/man8/chef-expander.8 | 2 +-
distro/common/man/man8/chef-expanderctl.8 | 2 +-
distro/common/man/man8/chef-server-webui.8 | 2 +-
distro/common/man/man8/chef-server.8 | 2 +-
distro/common/man/man8/chef-solo.8 | 2 +-
distro/common/man/man8/chef-solr.8 | 2 +-
lib/chef/version.rb | 2 +-
49 files changed, 98 insertions(+), 98 deletions(-)
diff --git a/distro/common/html/chef-client.8.html b/distro/common/html/chef-client.8.html
index 54ada7da86..5e7eee7861 100644
--- a/distro/common/html/chef-client.8.html
+++ b/distro/common/html/chef-client.8.html
@@ -124,9 +124,9 @@ wiki, http://wiki.opscode.com/display/chef/Home.
AUTHOR
-Chef was written by Adam Jacob adam@ospcode.com of Opscode
+
Chef was written by Adam Jacob adam@ospcode.com of Opscode
(http://www.opscode.com), with contributions from the community. This
-manual page was written by Joshua Timberman joshua@opscode.com with
+manual page was written by Joshua Timberman joshua@opscode.com with
help2man. Permission is granted to copy, distribute and / or modify
this document under the terms of the Apache 2.0 License.
@@ -135,7 +135,7 @@ found in /usr/share/common-licenses/Apache-2.0.
diff --git a/distro/common/html/chef-expander.8.html b/distro/common/html/chef-expander.8.html
index 7ef729ee77..b4117034d3 100644
--- a/distro/common/html/chef-expander.8.html
+++ b/distro/common/html/chef-expander.8.html
@@ -143,9 +143,9 @@ wiki, http://wiki.opscode.com/display/chef/Home.
AUTHOR
-Chef was written by Adam Jacob adam@ospcode.com of Opscode
+
Chef was written by Adam Jacob adam@ospcode.com of Opscode
(http://www.opscode.com), with contributions from the community. This
-manual page was created by Nuo Yan nuo@opscode.com. Permission is
+manual page was created by Nuo Yan nuo@opscode.com. Permission is
granted to copy, distribute and / or modify this document under the
terms of the Apache 2.0 License.
@@ -154,7 +154,7 @@ found in /usr/share/common-licenses/Apache-2.0.
diff --git a/distro/common/html/chef-expanderctl.8.html b/distro/common/html/chef-expanderctl.8.html
index 6b889c0720..2d93233feb 100644
--- a/distro/common/html/chef-expanderctl.8.html
+++ b/distro/common/html/chef-expanderctl.8.html
@@ -125,9 +125,9 @@ wiki, http://wiki.opscode.com/display/chef/Home.
AUTHOR
-Chef was written by Adam Jacob adam@ospcode.com of Opscode
+
Chef was written by Adam Jacob adam@ospcode.com of Opscode
(http://www.opscode.com), with contributions from the community. This
-manual page was created by Nuo Yan nuo@opscode.com. Permission is
+manual page was created by Nuo Yan nuo@opscode.com. Permission is
granted to copy, distribute and / or modify this document under the
terms of the Apache 2.0 License.
@@ -136,7 +136,7 @@ found in /usr/share/common-licenses/Apache-2.0.
diff --git a/distro/common/html/chef-server-webui.8.html b/distro/common/html/chef-server-webui.8.html
index 6a8b0ca2c8..f498e36302 100644
--- a/distro/common/html/chef-server-webui.8.html
+++ b/distro/common/html/chef-server-webui.8.html
@@ -163,9 +163,9 @@ is located on the Chef wiki, http://wiki.opscode.com/display/chef/Home.
AUTHOR
-Chef was written by Adam Jacob adam@ospcode.com of Opscode
+
Chef was written by Adam Jacob adam@ospcode.com of Opscode
(http://www.opscode.com), with contributions from the community. This
-manual page was written by Joshua Timberman joshua@opscode.com with
+manual page was written by Joshua Timberman joshua@opscode.com with
help2man for the Debian project (but may be used by others). Permission
is granted to copy, distribute and / or modify this document under the
terms of the Apache 2.0 License.
@@ -175,7 +175,7 @@ found in /usr/share/common-licenses/Apache-2.0.
diff --git a/distro/common/html/chef-server.8.html b/distro/common/html/chef-server.8.html
index 454d3504c0..ed59f0f62c 100644
--- a/distro/common/html/chef-server.8.html
+++ b/distro/common/html/chef-server.8.html
@@ -161,9 +161,9 @@ wiki, http://wiki.opscode.com/display/chef/Home.
AUTHOR
-Chef was written by Adam Jacob adam@ospcode.com of Opscode
+
Chef was written by Adam Jacob adam@ospcode.com of Opscode
(http://www.opscode.com), with contributions from the community. This
-manual page was written by Joshua Timberman joshua@opscode.com with
+manual page was written by Joshua Timberman joshua@opscode.com with
help2man. Permission is granted to copy, distribute and / or modify
this document under the terms of the Apache 2.0 License.
@@ -172,7 +172,7 @@ found in /usr/share/common-licenses/Apache-2.0.
diff --git a/distro/common/html/chef-shell.1.html b/distro/common/html/chef-shell.1.html
index edb5f75f2a..a77e2b9060 100644
--- a/distro/common/html/chef-shell.1.html
+++ b/distro/common/html/chef-shell.1.html
@@ -260,13 +260,13 @@ libraries.
AUTHOR
- Chef was written by Adam Jacob adam@opscode.com with many
+
Chef was written by Adam Jacob adam@opscode.com with many
contributions from the community. chef-shell was written by Daniel
DeLeo.
DOCUMENTATION
- This manual page was written by Daniel DeLeo dan@opscode.com.
+
This manual page was written by Daniel DeLeo dan@opscode.com.
Permission is granted to copy, distribute and / or modify this
document under the terms of the Apache 2.0 License.
@@ -276,7 +276,7 @@ libraries.
diff --git a/distro/common/html/chef-solo.8.html b/distro/common/html/chef-solo.8.html
index 8a10f52023..3356c32bed 100644
--- a/distro/common/html/chef-solo.8.html
+++ b/distro/common/html/chef-solo.8.html
@@ -164,9 +164,9 @@ http://wiki.opscode.com/display/chef/Home.
AUTHOR
-Chef was written by Adam Jacob adam@ospcode.com of Opscode
+
Chef was written by Adam Jacob adam@ospcode.com of Opscode
(http://www.opscode.com), with contributions from the community. This
-manual page was written by Joshua Timberman joshua@opscode.com with
+manual page was written by Joshua Timberman joshua@opscode.com with
help2man. Permission is granted to copy, distribute and / or modify
this document under the terms of the Apache 2.0 License.
@@ -175,7 +175,7 @@ found in /usr/share/common-licenses/Apache-2.0.
diff --git a/distro/common/html/chef-solr.8.html b/distro/common/html/chef-solr.8.html
index 702f8341f4..3ef7108ad0 100644
--- a/distro/common/html/chef-solr.8.html
+++ b/distro/common/html/chef-solr.8.html
@@ -3,7 +3,7 @@
- chef-solr(8) - Runs as Chef's search server
+ chef-solr(8) - Runs as Chef's search server