summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--distro/common/man/man8/chef-client.82
-rw-r--r--lib/chef/knife/cookbook_site_share.rb4
-rw-r--r--lib/chef/version.rb2
-rw-r--r--spec/scripts/ssl-serve.rb52
4 files changed, 56 insertions, 4 deletions
diff --git a/distro/common/man/man8/chef-client.8 b/distro/common/man/man8/chef-client.8
index 68a77c4ef6..5d083bbd8f 100644
--- a/distro/common/man/man8/chef-client.8
+++ b/distro/common/man/man8/chef-client.8
@@ -76,7 +76,7 @@ Indicates that the executable will be run as a daemon. This option is only avail
.B \fB\-E ENVIRONMENT_NAME\fP, \fB\-\-environment ENVIRONMENT_NAME\fP
The name of the environment.
.TP
-.B \fB\-\-[no\-]fork\fP
+.B \fB\-f\fP, \fB\-\-[no\-]fork\fP
Indicates that a chef\-client run will be contained in a secondary process with dedicated RAM. When the chef\-client run is complete the RAM will be returned to the master process. This option helps ensure that a chef\-client will use a steady amount of RAM over time because the master process will not run recipes. This option will also help prevent memory leaks (such as those that can be introduced by the code contained within a poorly designed cookbook). Use \fB\-\-no\-fork\fP to disable running the chef\-client in fork node. Default value: \fB\-\-fork\fP.
.TP
.B \fB\-F FORMAT\fP, \fB\-\-format FORMAT\fP
diff --git a/lib/chef/knife/cookbook_site_share.rb b/lib/chef/knife/cookbook_site_share.rb
index 21645d4a08..d3143a533a 100644
--- a/lib/chef/knife/cookbook_site_share.rb
+++ b/lib/chef/knife/cookbook_site_share.rb
@@ -58,7 +58,7 @@ class Chef
ui.info("Making tarball #{cookbook_name}.tgz")
Chef::Mixin::Command.run_command(:command => "tar -czf #{cookbook_name}.tgz #{cookbook_name}", :cwd => tmp_cookbook_dir)
rescue => e
- ui.error("Error making tarball #{cookbook_name}.tgz: #{e.message}. Set log level to debug (-l debug) for more information.")
+ ui.error("Error making tarball #{cookbook_name}.tgz: #{e.message}. Increase log verbosity (-VV) for more information.")
Chef::Log.debug("\n#{e.backtrace.join("\n")}")
exit(1)
end
@@ -69,7 +69,7 @@ class Chef
Chef::Log.debug("Removing local staging directory at #{tmp_cookbook_dir}")
FileUtils.rm_rf tmp_cookbook_dir
rescue => e
- ui.error("Error uploading cookbook #{cookbook_name} to the Opscode Cookbook Site: #{e.message}. Set log level to debug (-l debug) for more information.")
+ ui.error("Error uploading cookbook #{cookbook_name} to the Opscode Cookbook Site: #{e.message}. Increase log verbosity (-VV) for more information.")
Chef::Log.debug("\n#{e.backtrace.join("\n")}")
exit(1)
end
diff --git a/lib/chef/version.rb b/lib/chef/version.rb
index 138d773a5b..aab1536529 100644
--- a/lib/chef/version.rb
+++ b/lib/chef/version.rb
@@ -17,7 +17,7 @@
class Chef
CHEF_ROOT = File.dirname(File.expand_path(File.dirname(__FILE__)))
- VERSION = '11.8.0'
+ VERSION = '11.10.0.alpha.0'
end
# NOTE: the Chef::Version class is defined in version_class.rb
diff --git a/spec/scripts/ssl-serve.rb b/spec/scripts/ssl-serve.rb
new file mode 100644
index 0000000000..24ed70addc
--- /dev/null
+++ b/spec/scripts/ssl-serve.rb
@@ -0,0 +1,52 @@
+# ssl-serve.rb
+# USAGE: ruby ssl-serve.rb
+#
+# ssl-serve is a script that serves a local directory over SSL.
+# You can use it to test various HTTP behaviors in chef, like chef-client's
+# `-j` and `-c` options and remote_file with https connections.
+#
+require 'pp'
+require 'openssl'
+require 'webrick'
+require 'webrick/https'
+
+
+$ssl = true
+
+CHEF_SPEC_DATA = File.expand_path("../../data", __FILE__)
+cert_text = File.read(File.expand_path("ssl/chef-rspec.cert", CHEF_SPEC_DATA))
+cert = OpenSSL::X509::Certificate.new(cert_text)
+key_text = File.read(File.expand_path("ssl/chef-rspec.key", CHEF_SPEC_DATA))
+key = OpenSSL::PKey::RSA.new(key_text)
+
+server_opts = {}
+if $ssl
+server_opts.merge!( { :SSLEnable => true,
+ :SSLVerifyClient => OpenSSL::SSL::VERIFY_NONE,
+ :SSLCertificate => cert,
+ :SSLPrivateKey => key })
+end
+
+
+
+# 5 == debug, 3 == warning
+LOGGER = WEBrick::Log.new(STDOUT, 5)
+DEFAULT_OPTIONS = {
+ :server => 'webrick',
+ :Port => 9000,
+ :Host => 'localhost',
+ :environment => :none,
+ :Logger => LOGGER,
+ :DocumentRoot => File.expand_path("/tmp/chef-118-sampledata")
+ #:AccessLog => [] # Remove this option to enable the access log when debugging.
+}
+
+webrick_opts = DEFAULT_OPTIONS.merge(server_opts)
+pp :webrick_opts => webrick_opts
+
+server = WEBrick::HTTPServer.new(webrick_opts)
+trap 'INT' do server.shutdown end
+
+server.start
+
+