From 46f58b13432085f28ca2aaadaed5ab54b5d536ae Mon Sep 17 00:00:00 2001 From: Fletcher Nichol Date: Thu, 8 Nov 2012 11:17:35 -0700 Subject: [CHEF-3597] Handle frozen strings in knife.rb chef_server_url var. --- chef/lib/chef/config.rb | 2 +- chef/spec/unit/config_spec.rb | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/chef/lib/chef/config.rb b/chef/lib/chef/config.rb index 6817ab008a..702aa04a9e 100644 --- a/chef/lib/chef/config.rb +++ b/chef/lib/chef/config.rb @@ -67,7 +67,7 @@ class Chef # url:: String to be set for all of the chef-server-api URL's # config_attr_writer :chef_server_url do |url| - url.strip! + url = url.strip configure do |c| [ :registration_url, :template_url, diff --git a/chef/spec/unit/config_spec.rb b/chef/spec/unit/config_spec.rb index 89161c9df1..f26b7a39eb 100644 --- a/chef/spec/unit/config_spec.rb +++ b/chef/spec/unit/config_spec.rb @@ -62,6 +62,14 @@ describe Chef::Config do it_behaves_like "server URL" end + context "when the url is a frozen string" do + before do + Chef::Config.chef_server_url = " https://junglist.gen.nz".freeze + end + + it_behaves_like "server URL" + end + describe "class method: manage_secret_key" do before do Chef::FileCache.stub!(:load).and_return(true) -- cgit v1.2.1 From 647f7c9f835f890ba210a85de1ca776da4a5cfba Mon Sep 17 00:00:00 2001 From: Teemu Matilainen Date: Tue, 30 Oct 2012 13:34:42 -0300 Subject: [CHEF-3572] Fix chefignore whitespace matching `COMMENTS_AND_WHITESPACE` matched lines starting with word characters (\w) when it should have matched whitespaces (\s). Thus comment lines starting with spaces were not skipped but filenames with only word characters were. --- chef/lib/chef/cookbook/chefignore.rb | 2 +- chef/spec/data/cookbooks/chefignore | 2 ++ chef/spec/unit/cookbook/chefignore_spec.rb | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/chef/lib/chef/cookbook/chefignore.rb b/chef/lib/chef/cookbook/chefignore.rb index e9d54639e4..af145f3a3c 100644 --- a/chef/lib/chef/cookbook/chefignore.rb +++ b/chef/lib/chef/cookbook/chefignore.rb @@ -20,7 +20,7 @@ class Chef class Cookbook class Chefignore - COMMENTS_AND_WHITESPACE = /^\w*(?:#.*)?$/ + COMMENTS_AND_WHITESPACE = /^\s*(?:#.*)?$/ attr_reader :ignores diff --git a/chef/spec/data/cookbooks/chefignore b/chef/spec/data/cookbooks/chefignore index cfd4e65832..84b4f1e99f 100644 --- a/chef/spec/data/cookbooks/chefignore +++ b/chef/spec/data/cookbooks/chefignore @@ -4,3 +4,5 @@ # recipes/ignoreme.rb + # comments can be indented +ignored diff --git a/chef/spec/unit/cookbook/chefignore_spec.rb b/chef/spec/unit/cookbook/chefignore_spec.rb index 30b97e865d..aacb60c012 100644 --- a/chef/spec/unit/cookbook/chefignore_spec.rb +++ b/chef/spec/unit/cookbook/chefignore_spec.rb @@ -23,7 +23,7 @@ describe Chef::Cookbook::Chefignore do end it "loads the globs in the chefignore file" do - @chefignore.ignores.should =~ %w[recipes/ignoreme.rb] + @chefignore.ignores.should =~ %w[recipes/ignoreme.rb ignored] end it "removes items from an array that match the ignores" do @@ -32,6 +32,7 @@ describe Chef::Cookbook::Chefignore do end it "determines if a file is ignored" do + @chefignore.ignored?('ignored').should be_true @chefignore.ignored?('recipes/ignoreme.rb').should be_true @chefignore.ignored?('recipes/dontignoreme.rb').should be_false end -- cgit v1.2.1 From 6a3afe5b6cff92187ac61c356ab3a9161ed29c06 Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Fri, 2 Nov 2012 10:51:54 -0700 Subject: CHEF-3568: expand path in validation_key for bootstrap Allows ~ in path. Some day we should probably expand paths in Chef::Config. Also expand encrypted data bag secret while we're in there. --- chef/lib/chef/knife/core/bootstrap_context.rb | 4 ++-- chef/spec/unit/knife/core/bootstrap_context_spec.rb | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/chef/lib/chef/knife/core/bootstrap_context.rb b/chef/lib/chef/knife/core/bootstrap_context.rb index 71dc008d39..dd41d8e596 100644 --- a/chef/lib/chef/knife/core/bootstrap_context.rb +++ b/chef/lib/chef/knife/core/bootstrap_context.rb @@ -47,11 +47,11 @@ class Chef end def validation_key - IO.read(@chef_config[:validation_key]) + IO.read(File.expand_path(@chef_config[:validation_key])) end def encrypted_data_bag_secret - IO.read(@chef_config[:encrypted_data_bag_secret]) + IO.read(File.expand_path(@chef_config[:encrypted_data_bag_secret])) end def config_content diff --git a/chef/spec/unit/knife/core/bootstrap_context_spec.rb b/chef/spec/unit/knife/core/bootstrap_context_spec.rb index f8a58484a5..ecd0e7fda1 100644 --- a/chef/spec/unit/knife/core/bootstrap_context_spec.rb +++ b/chef/spec/unit/knife/core/bootstrap_context_spec.rb @@ -56,6 +56,13 @@ describe Chef::Knife::Core::BootstrapContext do @context.validation_key.should == IO.read(File.join(CHEF_SPEC_DATA, 'ssl', 'private_key.pem')) end + it "reads the validation key when it contains a ~" do + IO.should_receive(:read).with("#{ENV['HOME']}/my.key") + @chef_config = {:validation_key => '~/my.key'} + @context = Chef::Knife::Core::BootstrapContext.new(@config, @run_list, @chef_config) + @context.validation_key + end + it "generates the config file data" do expected=<<-EXPECTED log_level :info -- cgit v1.2.1 From 6e16f3b89e9c2f59ef4b53c62bc09cce409138cd Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Tue, 27 Nov 2012 08:27:56 -0800 Subject: CHEF-3411: Do not try to inspect recipes that do not exist We can't easily look at a recipe that was written in chef-shell, so we should try to open that 'file' because we will mask the real exception. --- .../error_inspectors/resource_failure_inspector.rb | 1 + .../resource_failure_inspector_spec.rb | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/chef/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb b/chef/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb index 57d8de0ef9..813f755560 100644 --- a/chef/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb +++ b/chef/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb @@ -56,6 +56,7 @@ class Chef return nil if dynamic_resource? @snippet ||= begin if file = resource.source_line[/^(([\w]:)?[^:]+):([\d]+)/,1] and line = resource.source_line[/^#{file}:([\d]+)/,1].to_i + return nil unless ::File.exists?(file) lines = IO.readlines(file) relevant_lines = ["# In #{file}\n\n"] diff --git a/chef/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb b/chef/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb index fac7feb465..91f0b64d4f 100644 --- a/chef/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb +++ b/chef/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb @@ -112,6 +112,7 @@ describe Chef::Formatters::ErrorInspectors::ResourceFailureInspector do # fake code to run through #recipe_snippet source_file = [ "if true", "var = non_existant", "end" ] IO.stub!(:readlines).and_return(source_file) + File.stub!(:exists?).and_return(true) end it "parses a Windows path" do @@ -127,6 +128,25 @@ describe Chef::Formatters::ErrorInspectors::ResourceFailureInspector do @inspector = Chef::Formatters::ErrorInspectors::ResourceFailureInspector.new(@resource, :create, @exception) @inspector.recipe_snippet.should match(/^# In \/home\/btm/) end + + context "when the recipe file does not exist" do + before do + File.stub!(:exists?).and_return(false) + IO.stub!(:readlines).and_raise(Errno::ENOENT) + end + + it "does not try to parse a recipe in chef-shell/irb (CHEF-3411)" do + @resource.source_line = "(irb#1):1:in `irb_binding'" + @inspector = Chef::Formatters::ErrorInspectors::ResourceFailureInspector.new(@resource, :create, @exception) + @inspector.recipe_snippet.should be_nil + end + + it "does not raise an exception trying to load a non-existant file (CHEF-3411)" do + @resource.source_line = "/somewhere/in/space" + @inspector = Chef::Formatters::ErrorInspectors::ResourceFailureInspector.new(@resource, :create, @exception) + lambda { @inspector.recipe_snippet }.should_not raise_error + end + end end describe "when examining a resource that confuses the parser" do -- cgit v1.2.1 From e54c79b68bb5e9c768675cc0094ea4f83a8da06f Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Thu, 15 Nov 2012 14:47:42 -0800 Subject: try running functional tests first ...should help avoid pollution of global state from unit tests --- ci/jenkins_run_tests.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/jenkins_run_tests.bat b/ci/jenkins_run_tests.bat index 445798090c..9bcec5c445 100644 --- a/ci/jenkins_run_tests.bat +++ b/ci/jenkins_run_tests.bat @@ -5,4 +5,4 @@ cd chef ruby -v call bundle install --binstubs --path vendor/bundle || ( call rm Gemfile.lock && call bundle install --binstubs --path vendor/bundle ) -ruby bin\rspec -r rspec_junit_formatter -f RspecJunitFormatter -o test.xml -f documentation spec/unit spec/functional +ruby bin\rspec -r rspec_junit_formatter -f RspecJunitFormatter -o test.xml -f documentation spec/functional spec/unit -- cgit v1.2.1 From 40eb061dac38dad114054b77e235c84b3606cfef Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Thu, 15 Nov 2012 16:16:36 -0800 Subject: replace thin w/ webrick for func. test server --- chef/Gemfile | 6 ---- chef/spec/functional/knife/cookbook_delete_spec.rb | 2 -- chef/spec/functional/knife/exec_spec.rb | 6 ++-- chef/spec/functional/knife/ssh_spec.rb | 1 - chef/spec/functional/resource/remote_file_spec.rb | 1 - chef/spec/functional/tiny_server_spec.rb | 9 ++--- chef/spec/tiny_server.rb | 39 ++++++++++++++++------ 7 files changed, 36 insertions(+), 28 deletions(-) diff --git a/chef/Gemfile b/chef/Gemfile index 858484d83c..b912e8d7b9 100644 --- a/chef/Gemfile +++ b/chef/Gemfile @@ -8,12 +8,6 @@ gem "ronn" group(:development, :test) do gem 'rack' - gem 'thin' - - # Eventmachine 1.0.0 is causing functional test failures on Solaris - # 9 SPARC. Pinning em to 0.12.10 solves this issue until we can - # replace thin with webrat or some other alternative. - gem 'eventmachine', '0.12.10', :platforms => :ruby gem 'ruby-shadow', :platforms => :ruby unless RUBY_PLATFORM.downcase.match(/(darwin|freebsd)/) # gem 'awesome_print' diff --git a/chef/spec/functional/knife/cookbook_delete_spec.rb b/chef/spec/functional/knife/cookbook_delete_spec.rb index 54081263f0..ef38cb2e1f 100644 --- a/chef/spec/functional/knife/cookbook_delete_spec.rb +++ b/chef/spec/functional/knife/cookbook_delete_spec.rb @@ -23,8 +23,6 @@ describe Chef::Knife::CookbookDelete do before(:all) do @original_config = Chef::Config.hash_dup - Thin::Logging.silent = true - @server = TinyServer::Manager.new @server.start end diff --git a/chef/spec/functional/knife/exec_spec.rb b/chef/spec/functional/knife/exec_spec.rb index ab3f38ac94..22162e02a2 100644 --- a/chef/spec/functional/knife/exec_spec.rb +++ b/chef/spec/functional/knife/exec_spec.rb @@ -6,9 +6,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,8 +23,6 @@ describe Chef::Knife::Exec do before(:all) do @original_config = Chef::Config.hash_dup - Thin::Logging.silent = false - @server = TinyServer::Manager.new#(:debug => true) @server.start end diff --git a/chef/spec/functional/knife/ssh_spec.rb b/chef/spec/functional/knife/ssh_spec.rb index 8f87e53bf7..696fd58c4d 100644 --- a/chef/spec/functional/knife/ssh_spec.rb +++ b/chef/spec/functional/knife/ssh_spec.rb @@ -24,7 +24,6 @@ describe Chef::Knife::Ssh do before(:all) do @original_config = Chef::Config.hash_dup Chef::Knife::Ssh.load_deps - Thin::Logging.silent = true @server = TinyServer::Manager.new @server.start end diff --git a/chef/spec/functional/resource/remote_file_spec.rb b/chef/spec/functional/resource/remote_file_spec.rb index e695e8feae..2ebeecd3d1 100644 --- a/chef/spec/functional/resource/remote_file_spec.rb +++ b/chef/spec/functional/resource/remote_file_spec.rb @@ -40,7 +40,6 @@ describe Chef::Resource::RemoteFile do end before(:all) do - Thin::Logging.silent = false @server = TinyServer::Manager.new @server.start @api = TinyServer::API.instance diff --git a/chef/spec/functional/tiny_server_spec.rb b/chef/spec/functional/tiny_server_spec.rb index 0cfef4305f..68ab9e7294 100644 --- a/chef/spec/functional/tiny_server_spec.rb +++ b/chef/spec/functional/tiny_server_spec.rb @@ -37,15 +37,16 @@ describe TinyServer::API do it "creates a route for a GET request" do @api.get('/foo/bar', 200, 'hello foobar') - response = @api.call("REQUEST_METHOD" => "GET", "REQUEST_URI" => '/foo/bar') - response.should == [200, {'Content-Type' => 'application/json'}, 'hello foobar'] + # WEBrick gives you the full URI with host, Thin only gave the part after scheme+host+port + response = @api.call("REQUEST_METHOD" => "GET", "REQUEST_URI" => 'http://localhost:1974/foo/bar') + response.should == [200, {'Content-Type' => 'application/json'}, [ 'hello foobar' ]] end it "creates a route for a request with a block" do block_called = false @api.get('/bar/baz', 200) { block_called = true; 'hello barbaz' } - response = @api.call("REQUEST_METHOD" => "GET", "REQUEST_URI" => '/bar/baz') - response.should == [200, {'Content-Type' => 'application/json'}, 'hello barbaz'] + response = @api.call("REQUEST_METHOD" => "GET", "REQUEST_URI" => 'http://localhost:1974/bar/baz') + response.should == [200, {'Content-Type' => 'application/json'}, [ 'hello barbaz' ]] block_called.should be_true end diff --git a/chef/spec/tiny_server.rb b/chef/spec/tiny_server.rb index ae8518097b..ba75cd57c1 100644 --- a/chef/spec/tiny_server.rb +++ b/chef/spec/tiny_server.rb @@ -17,11 +17,13 @@ # require 'rubygems' +require 'webrick' require 'rack' -require 'thin' +#require 'thin' require 'singleton' require 'chef/json_compat' require 'open-uri' +require 'chef/config' module TinyServer @@ -29,30 +31,42 @@ module TinyServer attr_writer :app - def self.run(options=nil, &block) + def self.setup(options=nil, &block) tiny_app = new(options) app_code = Rack::Builder.new(&block).to_app tiny_app.app = app_code - tiny_app.start + tiny_app + end + + def shutdown + server.shutdown end end class Manager - DEFAULT_OPTIONS = {:server => 'thin', :Port => 9000, :Host => 'localhost', :environment => :none} + # 5 == debug, 3 == warning + LOGGER = WEBrick::Log.new(STDOUT, 3) + DEFAULT_OPTIONS = { + :server => 'webrick', + :Port => 9000, + :Host => 'localhost', + :environment => :none, + :Logger => LOGGER, + :AccessLog => [] # Remove this option to enable the access log when debugging. + } def initialize(options=nil) @options = options ? DEFAULT_OPTIONS.merge(options) : DEFAULT_OPTIONS @creator = caller.first - - Thin::Logging.silent = !@options[:debug] end def start @server_thread = Thread.new do - @server = Server.run(@options) do + @server = Server.setup(@options) do run API.instance end + @server.start end block_until_started end @@ -63,7 +77,10 @@ module TinyServer def block_until_started 200.times do - return true if started? + if started? + raise "ivar weirdness" if @server.nil? + return true + end end raise "TinyServer failed to boot :/" end @@ -84,6 +101,7 @@ module TinyServer def stop # yes, this is terrible. + @server.shutdown @server_thread.kill @server_thread.join @server_thread = nil @@ -132,7 +150,7 @@ module TinyServer debug_info = {:message => "no data matches the request for #{env['REQUEST_URI']}", :available_routes => @routes, :request => env} # Uncomment me for glorious debugging - #pp :not_found => debug_info + # pp :not_found => debug_info [404, {'Content-Type' => 'application/json'}, debug_info.to_json] end end @@ -152,6 +170,7 @@ module TinyServer end def matches_request?(uri) + uri = URI.parse(uri).request_uri @path_spec === uri end @@ -171,7 +190,7 @@ module TinyServer def call data = @data || @block.call - [@response_code, HEADERS, data] + [@response_code, HEADERS, Array(data)] end def to_s -- cgit v1.2.1 From 30dfde19219a58ab94f4f76963a78a792bce7ef2 Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Fri, 16 Nov 2012 16:28:49 -0800 Subject: fixes binmode issues on windows --- chef/spec/functional/resource/cookbook_file_spec.rb | 8 +++++++- chef/spec/functional/resource/remote_file_spec.rb | 12 ++++++++++-- chef/spec/spec_helper.rb | 1 + chef/spec/support/chef_helpers.rb | 13 +++++++++++++ chef/spec/support/shared/functional/file_resource.rb | 15 +++++++++++---- chef/spec/support/shared/functional/securable_resource.rb | 4 ++++ chef/spec/unit/provider/file_spec.rb | 6 ++++-- 7 files changed, 50 insertions(+), 9 deletions(-) diff --git a/chef/spec/functional/resource/cookbook_file_spec.rb b/chef/spec/functional/resource/cookbook_file_spec.rb index adc1f7eef8..684dd85a12 100644 --- a/chef/spec/functional/resource/cookbook_file_spec.rb +++ b/chef/spec/functional/resource/cookbook_file_spec.rb @@ -24,7 +24,13 @@ describe Chef::Resource::CookbookFile do let(:file_base) { 'cookbook_file_spec' } let(:source) { 'java.response' } let(:cookbook_name) { 'java' } - let(:expected_content) { IO.read(File.join(CHEF_SPEC_DATA, 'cookbooks', 'java', 'files', 'default', 'java.response')) } + let(:expected_content) do + content = File.open(File.join(CHEF_SPEC_DATA, 'cookbooks', 'java', 'files', 'default', 'java.response'), "rb") do |f| + f.read + end + content.force_encoding(Encoding::BINARY) if content.respond_to?(:force_encoding) + content + end def create_resource # set up cookbook collection for this run to use, based on our diff --git a/chef/spec/functional/resource/remote_file_spec.rb b/chef/spec/functional/resource/remote_file_spec.rb index 2ebeecd3d1..998255e720 100644 --- a/chef/spec/functional/resource/remote_file_spec.rb +++ b/chef/spec/functional/resource/remote_file_spec.rb @@ -24,7 +24,13 @@ describe Chef::Resource::RemoteFile do let(:file_base) { "remote_file_spec" } let(:source) { 'http://localhost:9000/nyan_cat.png' } - let(:expected_content) { IO.read(File.join(CHEF_SPEC_DATA, 'remote_file', 'nyan_cat.png')) } + let(:expected_content) do + content = File.open(File.join(CHEF_SPEC_DATA, 'remote_file', 'nyan_cat.png'), "rb") do |f| + f.read + end + content.force_encoding(Encoding::BINARY) if content.respond_to?(:force_encoding) + content + end def create_resource node = Chef::Node.new @@ -45,7 +51,9 @@ describe Chef::Resource::RemoteFile do @api = TinyServer::API.instance @api.clear @api.get("/nyan_cat.png", 200) { - IO.read(File.join(CHEF_SPEC_DATA, 'remote_file', 'nyan_cat.png')) + File.open(File.join(CHEF_SPEC_DATA, 'remote_file', 'nyan_cat.png'), "rb") do |f| + f.read + end } end diff --git a/chef/spec/spec_helper.rb b/chef/spec/spec_helper.rb index 32bddeb415..3611297aa6 100644 --- a/chef/spec/spec_helper.rb +++ b/chef/spec/spec_helper.rb @@ -71,6 +71,7 @@ RSpec.configure do |config| config.filter_run_excluding :ruby_19_only => true unless ruby_19? config.filter_run_excluding :requires_root => true unless ENV['USER'] == 'root' config.filter_run_excluding :requires_unprivileged_user => true if ENV['USER'] == 'root' + config.filter_run_excluding :uses_diff => true unless has_diff? config.run_all_when_everything_filtered = true config.treat_symbols_as_metadata_keys_with_true_values = true diff --git a/chef/spec/support/chef_helpers.rb b/chef/spec/support/chef_helpers.rb index 77f5fc7669..77cbe5b5cb 100644 --- a/chef/spec/support/chef_helpers.rb +++ b/chef/spec/support/chef_helpers.rb @@ -50,3 +50,16 @@ def make_tmpname(prefix_suffix, n) path << "-#{n}" if n path << suffix end + +# NOTE: +# This is a temporary fix to get tests passing on systems that have no `diff` +# until we can replace shelling out to `diff` with ruby diff-lcs +def has_diff? + begin + diff_cmd = Mixlib::ShellOut.new("diff -v") + diff_cmd.run_command + true + rescue Errno::ENOENT + false + end +end diff --git a/chef/spec/support/shared/functional/file_resource.rb b/chef/spec/support/shared/functional/file_resource.rb index 631a5ed742..c85512b5c6 100644 --- a/chef/spec/support/shared/functional/file_resource.rb +++ b/chef/spec/support/shared/functional/file_resource.rb @@ -78,6 +78,13 @@ shared_examples_for "a file resource" do # note the stripping of the drive letter from the tmpdir on windows let(:backup_glob) { File.join(CHEF_SPEC_BACKUP_PATH, Dir.tmpdir.sub(/^([A-Za-z]:)/, ""), "#{file_base}*") } + def binread(file) + content = File.open(file, "rb") do |f| + f.read + end + content.force_encoding(Encoding::BINARY) if "".respond_to?(:force_encoding) + end + context "when the target file does not exist" do it "creates the file when the :create action is run" do resource.run_action(:create) @@ -86,12 +93,12 @@ shared_examples_for "a file resource" do it "creates the file with the correct content when the :create action is run" do resource.run_action(:create) - IO.read(path).should == expected_content + binread(path).should == expected_content end it "creates the file with the correct content when the :create_if_missing action is run" do resource.run_action(:create_if_missing) - IO.read(path).should == expected_content + binread(path).should == expected_content end it "deletes the file when the :delete action is run" do @@ -112,7 +119,7 @@ shared_examples_for "a file resource" do context "when the target file has the wrong content" do before(:each) do - File.open(path, "w") { |f| f.print "This is so wrong!!!" } + File.open(path, "wb") { |f| f.print "This is so wrong!!!" } @expected_mtime = File.stat(path).mtime @expected_checksum = sha256_checksum(path) end @@ -136,7 +143,7 @@ shared_examples_for "a file resource" do context "when the target file has the correct content" do before(:each) do - File.open(path, "w") { |f| f.print expected_content } + File.open(path, "wb") { |f| f.print expected_content } @expected_mtime = File.stat(path).mtime @expected_atime = File.stat(path).atime @expected_checksum = sha256_checksum(path) diff --git a/chef/spec/support/shared/functional/securable_resource.rb b/chef/spec/support/shared/functional/securable_resource.rb index 2eeb16c784..2e5797bc8f 100644 --- a/chef/spec/support/shared/functional/securable_resource.rb +++ b/chef/spec/support/shared/functional/securable_resource.rb @@ -29,12 +29,16 @@ shared_context "setup correct permissions" do before :each do File.chown(Etc.getpwnam('nobody').uid, 1337, path) File.chmod(0776, path) + now = Time.now.to_i + File.utime(now - 9000, now - 9000, path) end end context "without root", :requires_unprivileged_user do before :each do File.chmod(0776, path) + now = Time.now.to_i + File.utime(now - 9000, now - 9000, path) end end end diff --git a/chef/spec/unit/provider/file_spec.rb b/chef/spec/unit/provider/file_spec.rb index 9f5ad3a8f8..23352a5124 100644 --- a/chef/spec/unit/provider/file_spec.rb +++ b/chef/spec/unit/provider/file_spec.rb @@ -342,10 +342,12 @@ describe Chef::Provider::File do end it "should call action create if the does not file exist" do - @resource.path("/tmp/non_existant_file") + @resource.path("/tmp/example-dir/non_existant_file") @provider = Chef::Provider::File.new(@resource, @run_context) @provider.should_receive(:diff_current_from_content).and_return("") ::File.stub!(:exists?).with(@resource.path).and_return(false) + ::File.stub!(:directory?).with("/tmp/example-dir/non_existant_file").and_return(false) + ::File.stub!(:directory?).with("/tmp/example-dir").and_return(true) @provider.stub!(:update_new_file_state) io = StringIO.new File.should_receive(:open).with(@provider.new_resource.path, "w+").and_yield(io) @@ -355,7 +357,7 @@ describe Chef::Provider::File do end end - describe "when a diff is requested" do + describe "when a diff is requested", :uses_diff => true do before(:each) do @original_config = Chef::Config.hash_dup -- cgit v1.2.1 From 2fccfe60bf87d670f8b425c8ceed12468bf2c8c6 Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Mon, 19 Nov 2012 12:55:55 -0800 Subject: remove deprecated `has_rdoc` --- chef/chef.gemspec | 1 - 1 file changed, 1 deletion(-) diff --git a/chef/chef.gemspec b/chef/chef.gemspec index e34c74fa6f..fc1820811d 100644 --- a/chef/chef.gemspec +++ b/chef/chef.gemspec @@ -5,7 +5,6 @@ Gem::Specification.new do |s| s.name = 'chef' s.version = Chef::VERSION s.platform = Gem::Platform::RUBY - s.has_rdoc = true s.extra_rdoc_files = ["README.rdoc", "LICENSE" ] s.summary = "A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure." s.description = s.summary -- cgit v1.2.1 From 76838caac7075c9258c4561a974c18811da01f78 Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Mon, 19 Nov 2012 15:19:52 -0800 Subject: fix binread for ruby 1.8 --- chef/spec/support/shared/functional/file_resource.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/chef/spec/support/shared/functional/file_resource.rb b/chef/spec/support/shared/functional/file_resource.rb index c85512b5c6..921c6d32d5 100644 --- a/chef/spec/support/shared/functional/file_resource.rb +++ b/chef/spec/support/shared/functional/file_resource.rb @@ -83,6 +83,7 @@ shared_examples_for "a file resource" do f.read end content.force_encoding(Encoding::BINARY) if "".respond_to?(:force_encoding) + content end context "when the target file does not exist" do -- cgit v1.2.1 From 49e7257d382c2fcb1f8e16c8939c40f5aa529603 Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Tue, 27 Nov 2012 15:53:15 -0500 Subject: Switch template provider to FileUtils.cp This reverses the changes made in CHEF-1396. When copying a file over an existing file, the permissions of the existing file are maintained. When moving the file the permissions of the source file are preserved. Since CHEF-1396, we now set permissions after copying (formerly moving) the file, but only do so if there are permissions specified by the user to be set. --- chef/lib/chef/provider/template.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chef/lib/chef/provider/template.rb b/chef/lib/chef/provider/template.rb index c937b9d980..4c0989ac26 100644 --- a/chef/lib/chef/provider/template.rb +++ b/chef/lib/chef/provider/template.rb @@ -61,7 +61,7 @@ class Chef description << diff_current(rendered_template.path) converge_by(description) do backup - FileUtils.mv(rendered_template.path, @new_resource.path) + FileUtils.cp(rendered_template.path, @new_resource.path) Chef::Log.info("#{@new_resource} updated content") access_controls.set_all! stat = ::File.stat(@new_resource.path) -- cgit v1.2.1 From 19d5a2ffd6d42a0f226555ea2cdeae79c6b42c0c Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Wed, 28 Nov 2012 10:15:48 -0800 Subject: move test.xml ci output file back up to workspace directory --- ci/jenkins_run_tests.bat | 1 + ci/jenkins_run_tests.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/ci/jenkins_run_tests.bat b/ci/jenkins_run_tests.bat index 9bcec5c445..5cb2923a4a 100644 --- a/ci/jenkins_run_tests.bat +++ b/ci/jenkins_run_tests.bat @@ -6,3 +6,4 @@ cd chef ruby -v call bundle install --binstubs --path vendor/bundle || ( call rm Gemfile.lock && call bundle install --binstubs --path vendor/bundle ) ruby bin\rspec -r rspec_junit_formatter -f RspecJunitFormatter -o test.xml -f documentation spec/functional spec/unit +move test.xml .. diff --git a/ci/jenkins_run_tests.sh b/ci/jenkins_run_tests.sh index 5e5078042d..8139d24d8c 100755 --- a/ci/jenkins_run_tests.sh +++ b/ci/jenkins_run_tests.sh @@ -10,3 +10,4 @@ ruby -v; # This should take care of Gemfile changes that result in "bad" bundles without forcing us to rebundle every time bundle install --binstubs --path vendor/bundle || ( rm Gemfile.lock && bundle install --binstubs --path vendor/bundle ) bin/rspec -r rspec_junit_formatter -f RspecJunitFormatter -o test.xml -f documentation spec; +mv test.xml .. -- cgit v1.2.1 From 098f7a7e6434399ace33a1a313b95f1484653a1a Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Thu, 29 Nov 2012 15:35:44 -0500 Subject: Update path for require spec/support/prof/win32.rb became spec/support/platforms/prof/win32.rb in 1172bb6b4459d0cf0a0dc8d44ac8454a58aa4ede --- chef/spec/support/matchers/leak.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chef/spec/support/matchers/leak.rb b/chef/spec/support/matchers/leak.rb index eb80fcd492..908770f042 100644 --- a/chef/spec/support/matchers/leak.rb +++ b/chef/spec/support/matchers/leak.rb @@ -60,7 +60,7 @@ module Matchers def profiler @profiler ||= begin if Chef::Platform.windows? - require File.join(File.dirname(__FILE__), '..', 'prof', 'win32') + require File.join(File.dirname(__FILE__), '..', 'platforms', 'prof', 'win32') RSpec::Prof::Win32::Profiler.new else require File.join(File.dirname(__FILE__), '..', 'prof', 'gc') -- cgit v1.2.1 From 066d2d4f8797f0fa674b67e63013a0c969e3d2bc Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Thu, 29 Nov 2012 15:50:11 -0500 Subject: Fully qualify Windows clases in stress tests CHEF-3155 moved Chef::Win32 to Chef::ReservedNames::Win32 to avoid collision with the Win32 gem namespace --- chef/spec/stress/win32/security_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/chef/spec/stress/win32/security_spec.rb b/chef/spec/stress/win32/security_spec.rb index cc0b6c0d4c..5d350e71be 100644 --- a/chef/spec/stress/win32/security_spec.rb +++ b/chef/spec/stress/win32/security_spec.rb @@ -56,11 +56,11 @@ describe 'Chef::ReservedNames::Win32::Security', :windows_only do end it "should not leak when creating a new ACL and setting it on a file" do - securable_object = Security::SecurableObject.new(@monkeyfoo) + securable_object = Chef::ReservedNames::Win32::Security::SecurableObject.new(@monkeyfoo) lambda { - securable_object.dacl = Security::ACL.create([ - Chef::ReservedNames::Win32::Security::ACE.access_allowed(Security::SID.Everyone, Chef::ReservedNames::Win32::API::Security::GENERIC_READ), - Chef::ReservedNames::Win32::Security::ACE.access_denied(Security::SID.from_account("Users"), Chef::ReservedNames::Win32::API::Security::GENERIC_ALL) + securable_object.dacl = Chef::ReservedNames::Win32::Security::ACL.create([ + Chef::ReservedNames::Win32::Security::ACE.access_allowed(Chef::ReservedNames::Win32::Security::SID.Everyone, Chef::ReservedNames::Win32::API::Security::GENERIC_READ), + Chef::ReservedNames::Win32::Security::ACE.access_denied(Chef::ReservedNames::Win32::Security::SID.from_account("Users"), Chef::ReservedNames::Win32::API::Security::GENERIC_ALL) ]) GC.start }.should_not leak_memory(:warmup => 50, :iterations => 100) -- cgit v1.2.1 From 0cb93634fa7f2b36e81d4d438ec19bd2a1277946 Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Thu, 29 Nov 2012 16:00:48 -0500 Subject: Add stress tests to jenkins on windows --- ci/jenkins_run_tests.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/jenkins_run_tests.bat b/ci/jenkins_run_tests.bat index 5cb2923a4a..f2ac0d18dd 100644 --- a/ci/jenkins_run_tests.bat +++ b/ci/jenkins_run_tests.bat @@ -5,5 +5,5 @@ cd chef ruby -v call bundle install --binstubs --path vendor/bundle || ( call rm Gemfile.lock && call bundle install --binstubs --path vendor/bundle ) -ruby bin\rspec -r rspec_junit_formatter -f RspecJunitFormatter -o test.xml -f documentation spec/functional spec/unit +ruby bin\rspec -r rspec_junit_formatter -f RspecJunitFormatter -o test.xml -f documentation spec/functional spec/unit spec/stress move test.xml .. -- cgit v1.2.1 From 72aee57b0360773d846c4e8e55d5c6129b70a374 Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Thu, 29 Nov 2012 17:04:35 -0500 Subject: Preserve return code from running rspec --- ci/jenkins_run_tests.bat | 6 ++++++ ci/jenkins_run_tests.sh | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/ci/jenkins_run_tests.bat b/ci/jenkins_run_tests.bat index f2ac0d18dd..a1ed4858c8 100644 --- a/ci/jenkins_run_tests.bat +++ b/ci/jenkins_run_tests.bat @@ -6,4 +6,10 @@ cd chef ruby -v call bundle install --binstubs --path vendor/bundle || ( call rm Gemfile.lock && call bundle install --binstubs --path vendor/bundle ) ruby bin\rspec -r rspec_junit_formatter -f RspecJunitFormatter -o test.xml -f documentation spec/functional spec/unit spec/stress +set RSPEC_ERRORLVL=%ERRORLEVEL% + +REM place rspec output back in jenkins working directory move test.xml .. + +REM Return the error level from rspec +exit /B %RSPEC_ERRORLVL% diff --git a/ci/jenkins_run_tests.sh b/ci/jenkins_run_tests.sh index 8139d24d8c..293ec84da5 100755 --- a/ci/jenkins_run_tests.sh +++ b/ci/jenkins_run_tests.sh @@ -10,4 +10,10 @@ ruby -v; # This should take care of Gemfile changes that result in "bad" bundles without forcing us to rebundle every time bundle install --binstubs --path vendor/bundle || ( rm Gemfile.lock && bundle install --binstubs --path vendor/bundle ) bin/rspec -r rspec_junit_formatter -f RspecJunitFormatter -o test.xml -f documentation spec; +RSPEC_RETURNCODE=$? + +# move the rspec results back into the jenkins working directory mv test.xml .. + +# exit with the result of running rspec +return $RSPEC_RETURNCODE -- cgit v1.2.1 From 81a724430f4cee4c35fb4d1671729eb258265f40 Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Thu, 29 Nov 2012 14:25:33 -0800 Subject: exit from shell jenkins shell script too much windows in that moment there; need to exit and not return --- 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 293ec84da5..5c0ab55000 100755 --- a/ci/jenkins_run_tests.sh +++ b/ci/jenkins_run_tests.sh @@ -16,4 +16,4 @@ RSPEC_RETURNCODE=$? mv test.xml .. # exit with the result of running rspec -return $RSPEC_RETURNCODE +exit $RSPEC_RETURNCODE -- cgit v1.2.1 From c536fb710531e051572f723174361e4ef3507e66 Mon Sep 17 00:00:00 2001 From: sdelano Date: Thu, 29 Nov 2012 16:06:49 -0800 Subject: tests: use File.expand_path for expected key location --- chef/spec/unit/knife/core/bootstrap_context_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chef/spec/unit/knife/core/bootstrap_context_spec.rb b/chef/spec/unit/knife/core/bootstrap_context_spec.rb index ecd0e7fda1..f77a1f7c6a 100644 --- a/chef/spec/unit/knife/core/bootstrap_context_spec.rb +++ b/chef/spec/unit/knife/core/bootstrap_context_spec.rb @@ -57,7 +57,7 @@ describe Chef::Knife::Core::BootstrapContext do end it "reads the validation key when it contains a ~" do - IO.should_receive(:read).with("#{ENV['HOME']}/my.key") + IO.should_receive(:read).with(File.expand_path("my.key", ENV['HOME'])) @chef_config = {:validation_key => '~/my.key'} @context = Chef::Knife::Core::BootstrapContext.new(@config, @run_list, @chef_config) @context.validation_key -- cgit v1.2.1 From eca4fd7a08379d93e2ba60b4b6d6246f48f7c597 Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Mon, 3 Dec 2012 10:49:28 -0800 Subject: CHEF-3555: fix knife cookbook site install when String Ensure we turn cookbook_path into an Array before calling #first on it, as this does not work in Ruby 1.9+ H/T Aaron Kalin for the fix --- chef/lib/chef/knife/cookbook_site_install.rb | 2 +- chef/spec/unit/knife/cookbook_site_install_spec.rb | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/chef/lib/chef/knife/cookbook_site_install.rb b/chef/lib/chef/knife/cookbook_site_install.rb index 584735d8ff..d7a3bfd62c 100644 --- a/chef/lib/chef/knife/cookbook_site_install.rb +++ b/chef/lib/chef/knife/cookbook_site_install.rb @@ -74,7 +74,7 @@ class Chef @cookbook_name = parse_name_args! # Check to ensure we have a valid source of cookbooks before continuing # - @install_path = File.expand_path(config[:cookbook_path].first) + @install_path = File.expand_path(Array(config[:cookbook_path]).first) ui.info "Installing #@cookbook_name to #{@install_path}" @repo = CookbookSCMRepo.new(@install_path, ui, config) diff --git a/chef/spec/unit/knife/cookbook_site_install_spec.rb b/chef/spec/unit/knife/cookbook_site_install_spec.rb index 2ec87b8d16..167ab490da 100644 --- a/chef/spec/unit/knife/cookbook_site_install_spec.rb +++ b/chef/spec/unit/knife/cookbook_site_install_spec.rb @@ -60,7 +60,6 @@ describe Chef::Knife::CookbookSiteInstall do describe "run" do - it "should return an error if a cookbook name is not provided" do @knife.name_args = [] @knife.ui.should_receive(:error).with("Please specify a cookbook to download and install.") @@ -91,7 +90,6 @@ describe Chef::Knife::CookbookSiteInstall do lambda { @knife.run }.should raise_error(SystemExit) end - it "should install the specified version if second argument is a three-digit version" do @knife.name_args = ["getting-started", "0.1.0"] @knife.config[:no_deps] = true @@ -134,5 +132,17 @@ describe Chef::Knife::CookbookSiteInstall do @repo.should_not_receive(:reset_to_default_state) @knife.run end + + it "should not raise an error if cookbook_path is a string" do + @knife.config[:cookbook_path] = '/var/tmp/chef' + @knife.config[:no_deps] = true + @knife.name_args = ["getting-started"] + upstream_file = File.join(@install_path, "getting-started.tar.gz") + @knife.should_receive(:download_cookbook_to).with(upstream_file) + @knife.should_receive(:extract_cookbook).with(upstream_file, "0.3.0") + @knife.should_receive(:clear_existing_files).with(File.join(@install_path, "getting-started")) + @repo.should_receive(:merge_updates_from).with("getting-started", "0.3.0") + lambda { @knife.run }.should_not raise_error + end end end -- cgit v1.2.1 From d47f40e6e14da337365fff68fb160b739fc3a6d5 Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Tue, 4 Dec 2012 10:04:40 -0800 Subject: CHEF-3555: Fix unit tests on windows I was worried about using @install_path because of its distance from this test; if someone change it to an array, it would defeat the purpose of the test. Alternately, I could have duplicated the short block that sets @install_path based on platform, but for the sake of simplicity just took the provided @install_path from the before block. --- chef/spec/unit/knife/cookbook_site_install_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chef/spec/unit/knife/cookbook_site_install_spec.rb b/chef/spec/unit/knife/cookbook_site_install_spec.rb index 167ab490da..43afe09f5e 100644 --- a/chef/spec/unit/knife/cookbook_site_install_spec.rb +++ b/chef/spec/unit/knife/cookbook_site_install_spec.rb @@ -134,7 +134,7 @@ describe Chef::Knife::CookbookSiteInstall do end it "should not raise an error if cookbook_path is a string" do - @knife.config[:cookbook_path] = '/var/tmp/chef' + @knife.config[:cookbook_path] = @install_path @knife.config[:no_deps] = true @knife.name_args = ["getting-started"] upstream_file = File.join(@install_path, "getting-started.tar.gz") -- cgit v1.2.1 From c74baca33c18d635f9b51fc50b9814e4b49db3cb Mon Sep 17 00:00:00 2001 From: Kishore Date: Mon, 3 Dec 2012 18:43:11 +0530 Subject: [CHEF-3650] check for whyrun using why_run key in doc formatter --- chef/lib/chef/formatters/doc.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chef/lib/chef/formatters/doc.rb b/chef/lib/chef/formatters/doc.rb index e5b2ab17d7..6a969404c1 100644 --- a/chef/lib/chef/formatters/doc.rb +++ b/chef/lib/chef/formatters/doc.rb @@ -21,7 +21,7 @@ class Chef end def run_completed(node) - if Chef::Config[:whyrun] + if Chef::Config[:why_run] puts "Chef Client finished, #{@updated_resources} resources would have been updated" else puts "Chef Client finished, #{@updated_resources} resources updated" @@ -29,7 +29,7 @@ class Chef end def run_failed(exception) - if Chef::Config[:whyrun] + if Chef::Config[:why_run] puts "Chef Client failed. #{@updated_resources} resources would have been updated" else puts "Chef Client failed. #{@updated_resources} resources updated" -- cgit v1.2.1 From 6e298e33702934c743d9e9f875e8c8f0c7e9b30e Mon Sep 17 00:00:00 2001 From: sersut Date: Tue, 4 Dec 2012 15:11:42 -0800 Subject: Disable link tests on Windows Server 2003 since symlink is not yet supported on this platform. --- chef/spec/functional/resource/link_spec.rb | 2 +- chef/spec/spec_helper.rb | 1 + chef/spec/support/platform_helpers.rb | 8 ++++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/chef/spec/functional/resource/link_spec.rb b/chef/spec/functional/resource/link_spec.rb index b80dc72d49..39be3d58d9 100644 --- a/chef/spec/functional/resource/link_spec.rb +++ b/chef/spec/functional/resource/link_spec.rb @@ -22,7 +22,7 @@ if windows? require 'chef/win32/file' #probably need this in spec_helper end -describe Chef::Resource::Link do +describe Chef::Resource::Link, :not_supported_on_win2k3 do let(:file_base) { "file_spec" } let(:base_dir) do diff --git a/chef/spec/spec_helper.rb b/chef/spec/spec_helper.rb index 3611297aa6..8b69439bee 100644 --- a/chef/spec/spec_helper.rb +++ b/chef/spec/spec_helper.rb @@ -66,6 +66,7 @@ RSpec.configure do |config| # Add jruby filters here config.filter_run_excluding :windows_only => true unless windows? + config.filter_run_excluding :not_supported_on_win2k3 => true if windows_win2k3? config.filter_run_excluding :unix_only => true unless unix? config.filter_run_excluding :ruby_18_only => true unless ruby_18? config.filter_run_excluding :ruby_19_only => true unless ruby_19? diff --git a/chef/spec/support/platform_helpers.rb b/chef/spec/support/platform_helpers.rb index 558817d72a..fcb825319c 100644 --- a/chef/spec/support/platform_helpers.rb +++ b/chef/spec/support/platform_helpers.rb @@ -10,6 +10,14 @@ def windows? !!(RUBY_PLATFORM =~ /mswin|mingw|windows/) end +def windows_win2k3? + return false unless windows? + require 'ruby-wmi' + + host = WMI::Win32_OperatingSystem.find(:first) + (host.version && host.version.start_with?("5.2")) +end + # def jruby? def unix? -- cgit v1.2.1 From 703ed50c0fcce8b054fc90cebaa2a8962c8a8b30 Mon Sep 17 00:00:00 2001 From: sersut Date: Tue, 4 Dec 2012 15:47:20 -0800 Subject: Marking more tests not to run on Win2k3 --- chef/spec/unit/provider/link_spec.rb | 2 +- chef/spec/unit/provider/remote_directory_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chef/spec/unit/provider/link_spec.rb b/chef/spec/unit/provider/link_spec.rb index bb3f01abbe..171e21171c 100644 --- a/chef/spec/unit/provider/link_spec.rb +++ b/chef/spec/unit/provider/link_spec.rb @@ -25,7 +25,7 @@ if Chef::Platform.windows? require 'chef/win32/file' #probably need this in spec_helper end -describe Chef::Resource::Link do +describe Chef::Resource::Link, :not_supported_on_win2k3 do let(:provider) do node = Chef::Node.new @events = Chef::EventDispatch::Dispatcher.new diff --git a/chef/spec/unit/provider/remote_directory_spec.rb b/chef/spec/unit/provider/remote_directory_spec.rb index 444d7584e8..821349e524 100644 --- a/chef/spec/unit/provider/remote_directory_spec.rb +++ b/chef/spec/unit/provider/remote_directory_spec.rb @@ -177,7 +177,7 @@ describe Chef::Provider::RemoteDirectory do ::File.exist?(@destination_dir + '/a/multiply/nested/directory/qux.txt').should be_false end - it "removes directory symlinks properly" do + it "removes directory symlinks properly", :not_supported_on_win2k3 do symlinked_dir_path = @destination_dir + '/symlinked_dir' @provider.action = :create @provider.run_action -- cgit v1.2.1 From e61406108e73e1bb33ab38e954b682408198de41 Mon Sep 17 00:00:00 2001 From: sersut Date: Thu, 6 Dec 2012 09:35:36 -0800 Subject: Fix directory_spec on Windows. --- chef/spec/unit/provider/directory_spec.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/chef/spec/unit/provider/directory_spec.rb b/chef/spec/unit/provider/directory_spec.rb index 5118d086fc..835be07bd6 100644 --- a/chef/spec/unit/provider/directory_spec.rb +++ b/chef/spec/unit/provider/directory_spec.rb @@ -19,13 +19,16 @@ require 'ostruct' require 'spec_helper' +require 'tmpdir' describe Chef::Provider::Directory do before(:each) do - @new_resource = Chef::Resource::Directory.new('/tmp') - @new_resource.owner(500) - @new_resource.group(500) - @new_resource.mode(0644) + @new_resource = Chef::Resource::Directory.new(Dir.tmpdir) + if !windows? + @new_resource.owner(500) + @new_resource.group(500) + @new_resource.mode(0644) + end @node = Chef::Node.new @events = Chef::EventDispatch::Dispatcher.new @run_context = Chef::RunContext.new(@node, {}, @events) -- cgit v1.2.1 From 30798e43b727b4dc7494fe75d91a8cabdca7b620 Mon Sep 17 00:00:00 2001 From: sdelano Date: Thu, 6 Dec 2012 11:21:34 -0800 Subject: use Dir.tmpdir for remote_directory spec tests --- chef/spec/unit/provider/remote_directory_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chef/spec/unit/provider/remote_directory_spec.rb b/chef/spec/unit/provider/remote_directory_spec.rb index 821349e524..692a169fab 100644 --- a/chef/spec/unit/provider/remote_directory_spec.rb +++ b/chef/spec/unit/provider/remote_directory_spec.rb @@ -32,7 +32,7 @@ describe Chef::Provider::RemoteDirectory do #to not have this line. Only affects updating state fields. Chef::Provider::CookbookFile.any_instance.stub(:update_new_file_state) - @resource = Chef::Resource::RemoteDirectory.new("/tmp/tafty") + @resource = Chef::Resource::RemoteDirectory.new(File.join("tafty", Dir.tmpdir)) # in CHEF_SPEC_DATA/cookbooks/openldap/files/default/remotedir @resource.source "remotedir" @resource.cookbook('openldap') @@ -79,8 +79,8 @@ describe Chef::Provider::RemoteDirectory do end it "configures access control on intermediate directorys" do - directory_resource = @provider.send(:resource_for_directory, "/tmp/intermediate_dir") - directory_resource.path.should == "/tmp/intermediate_dir" + directory_resource = @provider.send(:resource_for_directory, File.join("intermediate_dir", Dir.tmpdir)) + directory_resource.path.should == File.join("intermediate_dir", Dir.tmpdir) directory_resource.mode.should == "0750" directory_resource.group.should == "wheel" directory_resource.owner.should == "root" -- cgit v1.2.1 From 5aaeca38b742ec340af8d3b164a5ba5afe7c4ed8 Mon Sep 17 00:00:00 2001 From: sdelano Date: Thu, 6 Dec 2012 11:54:00 -0800 Subject: swap arguments on File.join --- chef/spec/unit/provider/remote_directory_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chef/spec/unit/provider/remote_directory_spec.rb b/chef/spec/unit/provider/remote_directory_spec.rb index 692a169fab..78af31dbbe 100644 --- a/chef/spec/unit/provider/remote_directory_spec.rb +++ b/chef/spec/unit/provider/remote_directory_spec.rb @@ -32,7 +32,7 @@ describe Chef::Provider::RemoteDirectory do #to not have this line. Only affects updating state fields. Chef::Provider::CookbookFile.any_instance.stub(:update_new_file_state) - @resource = Chef::Resource::RemoteDirectory.new(File.join("tafty", Dir.tmpdir)) + @resource = Chef::Resource::RemoteDirectory.new(File.join(Dir.tmpdir, "tafty")) # in CHEF_SPEC_DATA/cookbooks/openldap/files/default/remotedir @resource.source "remotedir" @resource.cookbook('openldap') @@ -79,8 +79,8 @@ describe Chef::Provider::RemoteDirectory do end it "configures access control on intermediate directorys" do - directory_resource = @provider.send(:resource_for_directory, File.join("intermediate_dir", Dir.tmpdir)) - directory_resource.path.should == File.join("intermediate_dir", Dir.tmpdir) + directory_resource = @provider.send(:resource_for_directory, File.join(Dir.tmpdir, "intermediate_dir")) + directory_resource.path.should == File.join(Dir.tmpdir, "intermediate_dir") directory_resource.mode.should == "0750" directory_resource.group.should == "wheel" directory_resource.owner.should == "root" -- cgit v1.2.1 From 013b7f44d3566d278ebb0df6edd0b7d3ecd8c137 Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Tue, 11 Dec 2012 13:17:57 -0800 Subject: CHEF-3619: fix obsolete require of 'rake/rdoctask' H/T: Adam Spiers --- chef-expander/Rakefile | 2 +- chef/Rakefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chef-expander/Rakefile b/chef-expander/Rakefile index c8c772ed39..71903878e4 100644 --- a/chef-expander/Rakefile +++ b/chef-expander/Rakefile @@ -19,7 +19,7 @@ $: << File.dirname(__FILE__) require 'lib/chef/expander/version' require 'rake/gempackagetask' -require 'rake/rdoctask' +require 'rdoc/task' require '../chef/tasks/rspec.rb' spec = eval(File.read("chef-expander.gemspec")) diff --git a/chef/Rakefile b/chef/Rakefile index 4340493908..b227bd3e7a 100644 --- a/chef/Rakefile +++ b/chef/Rakefile @@ -21,7 +21,7 @@ require File.dirname(__FILE__) + '/lib/chef/version' require 'rubygems' require 'rubygems/package_task' -require 'rake/rdoctask' +require 'rdoc/task' require './tasks/rspec.rb' GEM_NAME = "chef" -- cgit v1.2.1 From 7720c47e5583aa68895e4e3fabfa85150695b6e9 Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Wed, 12 Dec 2012 09:17:58 -0800 Subject: CHEF-3622: Fix proper curl proxy argument in chef-full --- chef/lib/chef/knife/bootstrap/chef-full.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chef/lib/chef/knife/bootstrap/chef-full.erb b/chef/lib/chef/knife/bootstrap/chef-full.erb index 771ef85884..f369ce4d49 100644 --- a/chef/lib/chef/knife/bootstrap/chef-full.erb +++ b/chef/lib/chef/knife/bootstrap/chef-full.erb @@ -18,7 +18,7 @@ if ! exists /usr/bin/chef-client; then bash <(wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %> ${install_sh} -O -) ${version_string} else if exists curl; then - bash <(curl -L <%= "--proxy=on " if knife_config[:bootstrap_proxy] %> ${install_sh}) ${version_string} + bash <(curl -L <%= "--proxy \"#{knife_config[:bootstrap_proxy]}\" " if knife_config[:bootstrap_proxy] %> ${install_sh}) ${version_string} fi fi fi -- cgit v1.2.1 From a9d8dc86fd0a442352eaa70d60bc3e4da019b611 Mon Sep 17 00:00:00 2001 From: sdelano Date: Mon, 3 Dec 2012 20:31:13 -0800 Subject: CHEF-3660: use FileUtils.cp_r to copy directories in deploy_provider --- chef/lib/chef/provider/deploy.rb | 2 +- chef/spec/unit/provider/deploy/revision_spec.rb | 4 ++-- chef/spec/unit/provider/deploy_spec.rb | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/chef/lib/chef/provider/deploy.rb b/chef/lib/chef/provider/deploy.rb index d05ab73f92..4c189b4cb1 100644 --- a/chef/lib/chef/provider/deploy.rb +++ b/chef/lib/chef/provider/deploy.rb @@ -262,7 +262,7 @@ class Chef target_dir_path = @new_resource.deploy_to + "/releases" converge_by("deploy from repo to #{@target_dir_path} ") do FileUtils.mkdir_p(target_dir_path) - run_command(:command => "cp -RPp #{::File.join(@new_resource.destination, ".")} #{release_path}") + FileUtils.cp_r(::File.join(@new_resource.destination, "."), release_path, :preserve => true) Chef::Log.info "#{@new_resource} copied the cached checkout to #{release_path}" release_created(release_path) end diff --git a/chef/spec/unit/provider/deploy/revision_spec.rb b/chef/spec/unit/provider/deploy/revision_spec.rb index 3287c085d5..d42235600f 100644 --- a/chef/spec/unit/provider/deploy/revision_spec.rb +++ b/chef/spec/unit/provider/deploy/revision_spec.rb @@ -53,7 +53,7 @@ describe Chef::Provider::Deploy::Revision do it "stores the release dir in the file cache when copying the cached repo" do FileUtils.stub!(:mkdir_p) - @provider.stub!(:run_command).and_return(true) + FileUtils.stub!(:cp_r) @provider.copy_cached_repo @provider.stub!(:release_slug).and_return("73219b87e977d9c7ba1aa57e9ad1d88fa91a0ec2") @provider.load_current_resource @@ -65,7 +65,7 @@ describe Chef::Provider::Deploy::Revision do it "removes a release from the file cache when it's used again in another release and append it to the end" do FileUtils.stub!(:mkdir_p) - @provider.stub!(:run_command).and_return(true) + FileUtils.stub!(:cp_r) @provider.copy_cached_repo @provider.stub!(:release_slug).and_return("73219b87e977d9c7ba1aa57e9ad1d88fa91a0ec2") @provider.load_current_resource diff --git a/chef/spec/unit/provider/deploy_spec.rb b/chef/spec/unit/provider/deploy_spec.rb index ebbc6e2823..ef4aed800d 100644 --- a/chef/spec/unit/provider/deploy_spec.rb +++ b/chef/spec/unit/provider/deploy_spec.rb @@ -320,13 +320,13 @@ describe Chef::Provider::Deploy do it "makes a copy of the cached repo in releases dir" do FileUtils.should_receive(:mkdir_p).with("/my/deploy/dir/releases") - @provider.should_receive(:run_command).with({:command => "cp -RPp /my/deploy/dir/shared/cached-copy/. #{@expected_release_dir}"}) + FileUtils.should_receive(:cp_r).with("/my/deploy/dir/shared/cached-copy/.", @expected_release_dir, :preserve => true) @provider.copy_cached_repo end it "calls the internal callback :release_created when copying the cached repo" do FileUtils.stub!(:mkdir_p) - @provider.stub!(:run_command).and_return(true) + FileUtils.stub!(:cp_r) @provider.should_receive(:release_created) @provider.copy_cached_repo end -- cgit v1.2.1 From e6dac43397a73d44b319700efd5552715a81be5b Mon Sep 17 00:00:00 2001 From: sdelano Date: Tue, 4 Dec 2012 10:16:17 -0800 Subject: CHEF-3660: add functional tests for executing FileUtils.cp_r(:preserve) on symlinks --- .../sinatra-test-app-with-symlinks.gitbundle | Bin 0 -> 2330 bytes chef/spec/functional/resource/deploy_revision_spec.rb | 18 +++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 chef/spec/data/git_bundles/sinatra-test-app-with-symlinks.gitbundle diff --git a/chef/spec/data/git_bundles/sinatra-test-app-with-symlinks.gitbundle b/chef/spec/data/git_bundles/sinatra-test-app-with-symlinks.gitbundle new file mode 100644 index 0000000000..0a96fbb24f Binary files /dev/null and b/chef/spec/data/git_bundles/sinatra-test-app-with-symlinks.gitbundle differ diff --git a/chef/spec/functional/resource/deploy_revision_spec.rb b/chef/spec/functional/resource/deploy_revision_spec.rb index cbe308c635..633546539a 100644 --- a/chef/spec/functional/resource/deploy_revision_spec.rb +++ b/chef/spec/functional/resource/deploy_revision_spec.rb @@ -69,16 +69,20 @@ describe Chef::Resource::DeployRevision, :unix_only => true do let(:git_bundle_with_in_repo_callbacks) { File.expand_path("git_bundles/sinatra-test-app-with-callback-files.gitbundle", CHEF_SPEC_DATA) } + let(:git_bundle_with_in_repo_symlinks) { File.expand_path("git_bundles/sinatra-test-app-with-symlinks.gitbundle", CHEF_SPEC_DATA) } + # This is the fourth version let(:latest_rev) { "3eb5ca6c353c83d9179dd3b29347539829b401f3" } # This is the third version let(:previous_rev) { "6d19a6dbecc8e37f5b2277345885c0c783eb8fb1" } - # This is the sixth version, it is on the "with-deploy-scripts" branch let(:rev_with_in_repo_callbacks) { "2404d015882659754bdb93ad6e4b4d3d02691a82" } + # This is the fifth version in the "with-symlinks" branch + let(:rev_with_in_repo_symlinks) { "5a4748c52aaea8250b4346a9b8ede95ee3755e28" } + # Read values from the +observe_order_file+ and split each line. This way you # can see in which order things really happened. def actual_operations_order @@ -494,6 +498,18 @@ describe Chef::Resource::DeployRevision, :unix_only => true do end end + context "when deploying an app with in-repo symlinks" do + let(:deploy_with_in_repo_symlinks) do + basic_deploy_resource.dup.tap do |r| + r.repo git_bundle_with_in_repo_symlinks + r.revision rev_with_in_repo_symlinks + end + end + + it "should not raise an exception calling File.utime on symlinks" do + lambda { deploy_with_in_repo_symlinks.run_action(:deploy) }.should_not raise_error + end + end end -- cgit v1.2.1 From a4b0b65e1fbb9d137fa3ca267fcd8f3bc14169ea Mon Sep 17 00:00:00 2001 From: sdelano Date: Tue, 4 Dec 2012 10:18:46 -0800 Subject: CHEF-3660: Add FileUtils::Entry_ monkey patch This change is equivalent to the changes made to core Ruby at: - https://github.com/ruby/ruby/commit/7d89ecdc523aab7b9908501b6743da2c26a53825 --- chef/lib/chef/monkey_patches/fileutils.rb | 63 +++++++++++++++++++++++++++++++ chef/lib/chef/provider/deploy.rb | 1 + 2 files changed, 64 insertions(+) create mode 100644 chef/lib/chef/monkey_patches/fileutils.rb diff --git a/chef/lib/chef/monkey_patches/fileutils.rb b/chef/lib/chef/monkey_patches/fileutils.rb new file mode 100644 index 0000000000..4b2b24bb34 --- /dev/null +++ b/chef/lib/chef/monkey_patches/fileutils.rb @@ -0,0 +1,63 @@ +# +# Author:: Stephen Delano () +# Copyright:: Copyright (c) 2012 Opscode, Inc. +# License:: Apache License, Version 2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# == FileUtils::Entry_ (Patch) +# On Ruby 1.9.3 and earlier, FileUtils.cp_r(foo, bar, :preserve => true) fails +# when attempting to copy a directory containing symlinks. This has been +# patched in the trunk of Ruby, and this is a monkey patch of the offending +# code. + +require 'fileutils' + +class FileUtils::Entry_ + def copy_metadata(path) + st = lstat() + if !st.symlink? + File.utime st.atime, st.mtime, path + end + begin + if st.symlink? + begin + File.lchown st.uid, st.gid, path + rescue NotImplementedError + end + else + File.chown st.uid, st.gid, path + end + rescue Errno::EPERM + # clear setuid/setgid + if st.symlink? + begin + File.lchmod st.mode & 01777, path + rescue NotImplementedError + end + else + File.chmod st.mode & 01777, path + end + else + if st.symlink? + begin + File.lchmod st.mode, path + rescue NotImplementedError + end + else + File.chmod st.mode, path + end + end + end +end diff --git a/chef/lib/chef/provider/deploy.rb b/chef/lib/chef/provider/deploy.rb index 4c189b4cb1..b93b8b9d4f 100644 --- a/chef/lib/chef/provider/deploy.rb +++ b/chef/lib/chef/provider/deploy.rb @@ -18,6 +18,7 @@ require "chef/mixin/command" require "chef/mixin/from_file" +require "chef/monkey_patches/fileutils" require "chef/provider/git" require "chef/provider/subversion" -- cgit v1.2.1 From 77c1b90ce259067b41151d2f9adc6fe0bfd318f5 Mon Sep 17 00:00:00 2001 From: sdelano Date: Wed, 12 Dec 2012 16:01:19 -0800 Subject: CHEF-3660: only monkeypatch on ruby 1.9 and earlier --- chef/lib/chef/monkey_patches/fileutils.rb | 62 ++++++++++++++++--------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/chef/lib/chef/monkey_patches/fileutils.rb b/chef/lib/chef/monkey_patches/fileutils.rb index 4b2b24bb34..f18bead144 100644 --- a/chef/lib/chef/monkey_patches/fileutils.rb +++ b/chef/lib/chef/monkey_patches/fileutils.rb @@ -22,41 +22,43 @@ # patched in the trunk of Ruby, and this is a monkey patch of the offending # code. -require 'fileutils' +unless RUBY_VERSION =~ /^2/ + require 'fileutils' -class FileUtils::Entry_ - def copy_metadata(path) - st = lstat() - if !st.symlink? - File.utime st.atime, st.mtime, path - end - begin - if st.symlink? - begin - File.lchown st.uid, st.gid, path - rescue NotImplementedError - end - else - File.chown st.uid, st.gid, path + class FileUtils::Entry_ + def copy_metadata(path) + st = lstat() + if !st.symlink? + File.utime st.atime, st.mtime, path end - rescue Errno::EPERM - # clear setuid/setgid - if st.symlink? - begin - File.lchmod st.mode & 01777, path - rescue NotImplementedError + begin + if st.symlink? + begin + File.lchown st.uid, st.gid, path + rescue NotImplementedError + end + else + File.chown st.uid, st.gid, path end - else - File.chmod st.mode & 01777, path - end - else - if st.symlink? - begin - File.lchmod st.mode, path - rescue NotImplementedError + rescue Errno::EPERM + # clear setuid/setgid + if st.symlink? + begin + File.lchmod st.mode & 01777, path + rescue NotImplementedError + end + else + File.chmod st.mode & 01777, path end else - File.chmod st.mode, path + if st.symlink? + begin + File.lchmod st.mode, path + rescue NotImplementedError + end + else + File.chmod st.mode, path + end end end end -- cgit v1.2.1 From 8afc9d5dc0b91658f7bb685ce4e1ed5545866b14 Mon Sep 17 00:00:00 2001 From: Xabier de Zuazo Date: Sun, 25 Nov 2012 21:13:11 +0100 Subject: [CHEF-3632] All providers have whyrun enabled by default due to RemoteDirectory --- chef/lib/chef/provider/remote_directory.rb | 7 +++---- chef/spec/unit/provider_spec.rb | 4 ++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/chef/lib/chef/provider/remote_directory.rb b/chef/lib/chef/provider/remote_directory.rb index 5b6348980c..947f65fd3b 100644 --- a/chef/lib/chef/provider/remote_directory.rb +++ b/chef/lib/chef/provider/remote_directory.rb @@ -169,11 +169,10 @@ class Chef dir end - end + def whyrun_supported? + true + end - def whyrun_supported? - true end - end end diff --git a/chef/spec/unit/provider_spec.rb b/chef/spec/unit/provider_spec.rb index ec0af03d47..7873be0f28 100644 --- a/chef/spec/unit/provider_spec.rb +++ b/chef/spec/unit/provider_spec.rb @@ -73,6 +73,10 @@ describe Chef::Provider do @provider.current_resource.should eql(nil) end + it "should not support whyrun by default" do + @provider.send(:whyrun_supported?).should eql(false) + end + it "should return true for action_nothing" do @provider.action_nothing.should eql(true) end -- cgit v1.2.1 From 373db000a0d0eaa582c000aeeb259453c6c5fef2 Mon Sep 17 00:00:00 2001 From: Xabier de Zuazo Date: Sun, 25 Nov 2012 22:37:52 +0100 Subject: [CHEF-3632] removed duplicated provider#whyrun_supported? method --- chef/lib/chef/provider.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/chef/lib/chef/provider.rb b/chef/lib/chef/provider.rb index 6e9c4f5acb..f1bd81de83 100644 --- a/chef/lib/chef/provider.rb +++ b/chef/lib/chef/provider.rb @@ -39,10 +39,6 @@ class Chef # break, e.g., Chef 11. attr_accessor :action - def whyrun_supported? - false - end - def initialize(new_resource, run_context) @new_resource = new_resource @action = action -- cgit v1.2.1 From 4444667071946c8a0a48331d1b9376aa93222756 Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Thu, 13 Dec 2012 10:30:42 -0800 Subject: CHEF-3672: Add Ruby 1.9 based Ubuntu 12.10 Gems bootstrap --- chef/lib/chef/knife/bootstrap/ubuntu12.10-gems.erb | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 chef/lib/chef/knife/bootstrap/ubuntu12.10-gems.erb diff --git a/chef/lib/chef/knife/bootstrap/ubuntu12.10-gems.erb b/chef/lib/chef/knife/bootstrap/ubuntu12.10-gems.erb new file mode 100644 index 0000000000..c93c591320 --- /dev/null +++ b/chef/lib/chef/knife/bootstrap/ubuntu12.10-gems.erb @@ -0,0 +1,60 @@ +bash -c ' +<%= "export http_proxy=\"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] -%> + +if [ ! -f /usr/bin/chef-client ]; then + aptitude update + aptitude install -y ruby ruby1.9.1-dev build-essential wget rubygems +fi + +gem update --no-rdoc --no-ri +gem install ohai --no-rdoc --no-ri --verbose +gem install chef --no-rdoc --no-ri --verbose <%= bootstrap_version_string %> + +mkdir -p /etc/chef + +( +cat <<'EOP' +<%= validation_key %> +EOP +) > /tmp/validation.pem +awk NF /tmp/validation.pem > /etc/chef/validation.pem +rm /tmp/validation.pem +chmod 0600 /etc/chef/validation.pem + +<% if @chef_config[:encrypted_data_bag_secret] -%> +( +cat <<'EOP' +<%= encrypted_data_bag_secret %> +EOP +) > /tmp/encrypted_data_bag_secret +awk NF /tmp/encrypted_data_bag_secret > /etc/chef/encrypted_data_bag_secret +rm /tmp/encrypted_data_bag_secret +chmod 0600 /etc/chef/encrypted_data_bag_secret +<% end -%> + +<%# Generate Ohai Hints -%> +<% unless @chef_config[:knife][:hints].nil? || @chef_config[:knife][:hints].empty? -%> +mkdir -p /etc/chef/ohai/hints + +<% @chef_config[:knife][:hints].each do |name, hash| -%> +( +cat <<'EOP' +<%= hash.to_json %> +EOP +) > /etc/chef/ohai/hints/<%= name %>.json +<% end -%> +<% end -%> + +( +cat <<'EOP' +<%= config_content %> +EOP +) > /etc/chef/client.rb + +( +cat <<'EOP' +<%= first_boot.to_json %> +EOP +) > /etc/chef/first-boot.json + +<%= start_chef %>' -- cgit v1.2.1 From 7d5dfbc0efc8e6a3431d034de2a61964bf9331ce Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Thu, 6 Dec 2012 11:13:40 -0800 Subject: [CHEF-3662] ApiClient can reregister itself --- chef/lib/chef/api_client.rb | 18 ++++++++++- chef/spec/unit/api_client_spec.rb | 67 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+), 1 deletion(-) diff --git a/chef/lib/chef/api_client.rb b/chef/lib/chef/api_client.rb index f95978afba..f2118c6798 100644 --- a/chef/lib/chef/api_client.rb +++ b/chef/lib/chef/api_client.rb @@ -180,6 +180,11 @@ class Chef rs["rows"].collect { |r| r[lookup] } end + def self.reregister(name) + api_client = load(name) + api_client.reregister + end + def self.list(inflate=false) if inflate response = Hash.new @@ -203,7 +208,7 @@ class Chef # Load a client by name via the API def self.load(name) - response = Chef::REST.new(Chef::Config[:chef_server_url]).get_rest("clients/#{name}") + response = Chef::REST.new(Chef::Config[:chef_server_url]).get("clients/#{name}") if response.kind_of?(Chef::ApiClient) response else @@ -251,6 +256,17 @@ class Chef end end + def reregister + r = Chef::REST.new(Chef::Config[:chef_server_url]) + reregistered_self = r.put("clients/#{name}", { :name => name, :admin => admin, :private_key => true }) + if reregistered_self.respond_to?(:[]) + private_key(reregistered_self["private_key"]) + else + private_key(reregistered_self.private_key) + end + self + end + # Create the client via the REST API def create Chef::REST.new(Chef::Config[:chef_server_url]).post_rest("clients", self) diff --git a/chef/spec/unit/api_client_spec.rb b/chef/spec/unit/api_client_spec.rb index b9d9cecc01..d0a6b3369f 100644 --- a/chef/spec/unit/api_client_spec.rb +++ b/chef/spec/unit/api_client_spec.rb @@ -179,6 +179,73 @@ describe Chef::ApiClient do end end + + describe "when requesting a new key" do + before do + @http_client = mock("Chef::REST mock") + Chef::REST.stub!(:new).and_return(@http_client) + end + + context "and the client does not exist on the server" do + before do + @a_404_response = Net::HTTPNotFound.new("404 not found and such", nil, nil) + @a_404_exception = Net::HTTPServerException.new("404 not found exception", @a_404_response) + + @http_client.should_receive(:get).with("clients/lost-my-key").and_raise(@a_404_exception) + end + it "raises a 404 error" do + lambda { Chef::ApiClient.reregister("lost-my-key") }.should raise_error(@a_404_exception) + end + end + + context "and the client exists" do + before do + @api_client_without_key = Chef::ApiClient.new + @api_client_without_key.name("lost-my-key") + @http_client.should_receive(:get).with("clients/lost-my-key").and_return(@api_client_without_key) + end + + + context "and the client exists on a Chef 11-like server" do + before do + @api_client_with_key = Chef::ApiClient.new + @api_client_with_key.name("lost-my-key") + @api_client_with_key.private_key("the new private key") + @http_client.should_receive(:put). + with("clients/lost-my-key", :name => "lost-my-key", :admin => false, :private_key => true). + and_return(@api_client_with_key) + end + + it "returns an ApiClient with a private key" do + response = Chef::ApiClient.reregister("lost-my-key") + # no sane == method for ApiClient :'( + response.should == @api_client_without_key + response.private_key.should == "the new private key" + response.name.should == "lost-my-key" + response.admin.should be_false + end + end + + context "and the client exists on a Chef 10-like server" do + before do + @api_client_with_key = {"name" => "lost-my-key", "private_key" => "the new private key"} + @http_client.should_receive(:put). + with("clients/lost-my-key", :name => "lost-my-key", :admin => false, :private_key => true). + and_return(@api_client_with_key) + end + + it "returns an ApiClient with a private key" do + response = Chef::ApiClient.reregister("lost-my-key") + # no sane == method for ApiClient :'( + response.should == @api_client_without_key + response.private_key.should == "the new private key" + response.name.should == "lost-my-key" + response.admin.should be_false + end + end + + end + end end -- cgit v1.2.1 From 8071f0da0e4dd58186508a4a0211212590d708b3 Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Thu, 6 Dec 2012 11:27:27 -0800 Subject: [CHEF-3662] fix spec for ruby 1.8.7 Can only expect exception class, not an instance. --- chef/spec/unit/api_client_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chef/spec/unit/api_client_spec.rb b/chef/spec/unit/api_client_spec.rb index d0a6b3369f..49e180ad43 100644 --- a/chef/spec/unit/api_client_spec.rb +++ b/chef/spec/unit/api_client_spec.rb @@ -193,8 +193,9 @@ describe Chef::ApiClient do @http_client.should_receive(:get).with("clients/lost-my-key").and_raise(@a_404_exception) end + it "raises a 404 error" do - lambda { Chef::ApiClient.reregister("lost-my-key") }.should raise_error(@a_404_exception) + lambda { Chef::ApiClient.reregister("lost-my-key") }.should raise_error(Net::HTTPServerException) end end -- cgit v1.2.1 From 8b22cd0e96be936aeb057611d0dbc56a44bbd59c Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Tue, 11 Dec 2012 19:45:00 -0800 Subject: [CHEF-3662] ApiClient can set a private key from JSON Without this change it's not possible to fix CHEF-3662 on the client without modifying Chef::REST to ignore json_class. Previously the behavior was explicitly defined to be the opposite, but the reasoning behind this decision wasn't documented; I suspect it may have been for server-side behavior that's no longer necessary. --- chef/lib/chef/api_client.rb | 1 + chef/spec/unit/api_client_spec.rb | 39 ++++++++++++++++++++++----------------- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/chef/lib/chef/api_client.rb b/chef/lib/chef/api_client.rb index f2118c6798..1640f733eb 100644 --- a/chef/lib/chef/api_client.rb +++ b/chef/lib/chef/api_client.rb @@ -164,6 +164,7 @@ class Chef def self.json_create(o) client = Chef::ApiClient.new client.name(o["name"] || o["clientname"]) + client.private_key(o["private_key"]) client.public_key(o["public_key"]) client.admin(o["admin"]) client.couchdb_rev = o["_rev"] diff --git a/chef/spec/unit/api_client_spec.rb b/chef/spec/unit/api_client_spec.rb index 49e180ad43..054b0bb2c8 100644 --- a/chef/spec/unit/api_client_spec.rb +++ b/chef/spec/unit/api_client_spec.rb @@ -151,31 +151,36 @@ describe Chef::ApiClient do end end - describe "deserialize" do + describe "when deserializing from JSON" do before(:each) do - @client.name("black") - @client.public_key("crowes") - @client.private_key("monkeypants") - @client.admin(true) - @deserial = Chef::JSONCompat.from_json(@client.to_json) + client = { + "name" => "black", + "public_key" => "crowes", + "private_key" => "monkeypants", + "admin" => true, + "json_class" => "Chef::ApiClient" + } + @client = Chef::JSONCompat.from_json(client.to_json) end it "should deserialize to a Chef::ApiClient object" do - @deserial.should be_a_kind_of(Chef::ApiClient) + @client.should be_a_kind_of(Chef::ApiClient) end - %w{ - name - public_key - admin - }.each do |t| - it "should match '#{t}'" do - @deserial.send(t.to_sym).should == @client.send(t.to_sym) - end + it "preserves the name" do + @client.name.should == "black" end - it "should not include the private key" do - @deserial.private_key.should == nil + it "preserves the public key" do + @client.public_key.should == "crowes" + end + + it "preserves the admin status" do + @client.admin.should be_true + end + + it "includes the private key if present" do + @client.private_key.should == "monkeypants" end end -- cgit v1.2.1 From 972b677b83cead81ea68ffbe96257a1152ad33cb Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Tue, 11 Dec 2012 20:31:24 -0800 Subject: [CHEF-3662] knife client reregister uses ApiClient#reregister --- chef/lib/chef/api_client.rb | 5 +++ chef/lib/chef/knife/client_reregister.rb | 9 +++--- chef/spec/unit/knife/client_reregister_spec.rb | 45 +++++++++++++------------- 3 files changed, 33 insertions(+), 26 deletions(-) diff --git a/chef/lib/chef/api_client.rb b/chef/lib/chef/api_client.rb index 1640f733eb..30004d0c6b 100644 --- a/chef/lib/chef/api_client.rb +++ b/chef/lib/chef/api_client.rb @@ -283,6 +283,11 @@ class Chef "client[#{@name}]" end + def inspect + "Chef::ApiClient name:'#{name}' admin:'#{admin.inspect}'" + + "public_key:'#{public_key}' private_key:#{private_key}" + end + end end diff --git a/chef/lib/chef/knife/client_reregister.rb b/chef/lib/chef/knife/client_reregister.rb index 73a93ec31d..666fd09fd2 100644 --- a/chef/lib/chef/knife/client_reregister.rb +++ b/chef/lib/chef/knife/client_reregister.rb @@ -43,14 +43,15 @@ class Chef exit 1 end - client = Chef::ApiClient.load(@client_name) - key = client.save(new_key=true) + client = Chef::ApiClient.reregister(@client_name) + Chef::Log.debug("Updated client data: #{client.inspect}") + key = client.private_key if config[:file] File.open(config[:file], "w") do |f| - f.print(key['private_key']) + f.print(key) end else - ui.msg key['private_key'] + ui.msg key end end end diff --git a/chef/spec/unit/knife/client_reregister_spec.rb b/chef/spec/unit/knife/client_reregister_spec.rb index 0d284c0f58..d9fc8ec180 100644 --- a/chef/spec/unit/knife/client_reregister_spec.rb +++ b/chef/spec/unit/knife/client_reregister_spec.rb @@ -22,40 +22,41 @@ describe Chef::Knife::ClientReregister do before(:each) do @knife = Chef::Knife::ClientReregister.new @knife.name_args = [ 'adam' ] - @client_mock = mock('client_mock') - @client_mock.stub!(:save).and_return({ 'private_key' => 'foo_key' }) - Chef::ApiClient.stub!(:load).and_return(@client_mock) + @client_mock = mock('client_mock', :private_key => "foo_key") @stdout = StringIO.new @knife.ui.stub!(:stdout).and_return(@stdout) end - describe 'run' do - it 'should load and save the client' do - Chef::ApiClient.should_receive(:load).with('adam').and_return(@client_mock) - @client_mock.should_receive(:save).with(true).and_return({'private_key' => 'foo_key'}) - @knife.run - end - - it 'should output the private key' do - @knife.run - @stdout.string.should match /foo_key/ + context "when no client name is given on the command line" do + before do + @knife.name_args = [] end it 'should print usage and exit when a client name is not provided' do - @knife.name_args = [] @knife.should_receive(:show_usage) @knife.ui.should_receive(:fatal) lambda { @knife.run }.should raise_error(SystemExit) end + end + + context 'when not configured for file output' do + it 'reregisters the client and prints the key' do + Chef::ApiClient.should_receive(:reregister).with('adam').and_return(@client_mock) + @knife.run + @stdout.string.should match( /foo_key/ ) + end + end - describe 'with -f or --file' do - it 'should write the private key to a file' do - @knife.config[:file] = '/tmp/monkeypants' - filehandle = mock('Filehandle') - filehandle.should_receive(:print).with('foo_key') - File.should_receive(:open).with('/tmp/monkeypants', 'w').and_yield(filehandle) - @knife.run - end + context 'when configured for file output' do + it 'should write the private key to a file' do + Chef::ApiClient.should_receive(:reregister).with('adam').and_return(@client_mock) + + @knife.config[:file] = '/tmp/monkeypants' + filehandle = StringIO.new + File.should_receive(:open).with('/tmp/monkeypants', 'w').and_yield(filehandle) + @knife.run + filehandle.string.should == "foo_key" end end + end -- cgit v1.2.1 From bc9b4f965b0279457d5d95ea05a69689f8270d71 Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Wed, 12 Dec 2012 14:52:33 -0800 Subject: [CHEF-3662] fix method calls for backport --- chef/lib/chef/api_client.rb | 4 ++-- chef/spec/unit/api_client_spec.rb | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/chef/lib/chef/api_client.rb b/chef/lib/chef/api_client.rb index 30004d0c6b..53f62324a2 100644 --- a/chef/lib/chef/api_client.rb +++ b/chef/lib/chef/api_client.rb @@ -209,7 +209,7 @@ class Chef # Load a client by name via the API def self.load(name) - response = Chef::REST.new(Chef::Config[:chef_server_url]).get("clients/#{name}") + response = Chef::REST.new(Chef::Config[:chef_server_url]).get_rest("clients/#{name}") if response.kind_of?(Chef::ApiClient) response else @@ -259,7 +259,7 @@ class Chef def reregister r = Chef::REST.new(Chef::Config[:chef_server_url]) - reregistered_self = r.put("clients/#{name}", { :name => name, :admin => admin, :private_key => true }) + reregistered_self = r.put_rest("clients/#{name}", { :name => name, :admin => admin, :private_key => true }) if reregistered_self.respond_to?(:[]) private_key(reregistered_self["private_key"]) else diff --git a/chef/spec/unit/api_client_spec.rb b/chef/spec/unit/api_client_spec.rb index 054b0bb2c8..24a15460aa 100644 --- a/chef/spec/unit/api_client_spec.rb +++ b/chef/spec/unit/api_client_spec.rb @@ -196,7 +196,7 @@ describe Chef::ApiClient do @a_404_response = Net::HTTPNotFound.new("404 not found and such", nil, nil) @a_404_exception = Net::HTTPServerException.new("404 not found exception", @a_404_response) - @http_client.should_receive(:get).with("clients/lost-my-key").and_raise(@a_404_exception) + @http_client.should_receive(:get_rest).with("clients/lost-my-key").and_raise(@a_404_exception) end it "raises a 404 error" do @@ -208,7 +208,7 @@ describe Chef::ApiClient do before do @api_client_without_key = Chef::ApiClient.new @api_client_without_key.name("lost-my-key") - @http_client.should_receive(:get).with("clients/lost-my-key").and_return(@api_client_without_key) + @http_client.should_receive(:get_rest).with("clients/lost-my-key").and_return(@api_client_without_key) end @@ -217,7 +217,7 @@ describe Chef::ApiClient do @api_client_with_key = Chef::ApiClient.new @api_client_with_key.name("lost-my-key") @api_client_with_key.private_key("the new private key") - @http_client.should_receive(:put). + @http_client.should_receive(:put_rest). with("clients/lost-my-key", :name => "lost-my-key", :admin => false, :private_key => true). and_return(@api_client_with_key) end @@ -235,7 +235,7 @@ describe Chef::ApiClient do context "and the client exists on a Chef 10-like server" do before do @api_client_with_key = {"name" => "lost-my-key", "private_key" => "the new private key"} - @http_client.should_receive(:put). + @http_client.should_receive(:put_rest). with("clients/lost-my-key", :name => "lost-my-key", :admin => false, :private_key => true). and_return(@api_client_with_key) end -- cgit v1.2.1 From fa14140a4977d889c0e6490065bd8e2fd687bdd5 Mon Sep 17 00:00:00 2001 From: Geoff Papilion Date: Tue, 3 Jan 2012 19:37:03 -0800 Subject: one line fix to http://tickets.opscode.com/browse/CHEF-2812 questionable if this is the right approach. --- chef/lib/chef/resource.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chef/lib/chef/resource.rb b/chef/lib/chef/resource.rb index 810c19cfd0..e90e475c83 100644 --- a/chef/lib/chef/resource.rb +++ b/chef/lib/chef/resource.rb @@ -265,7 +265,7 @@ F prior_resource = run_context.resource_collection.lookup(self.to_s) Chef::Log.debug("Setting #{self.to_s} to the state of the prior #{self.to_s}") prior_resource.instance_variables.each do |iv| - unless iv.to_sym == :@source_line || iv.to_sym == :@action + unless iv.to_sym == :@source_line || iv.to_sym == :@action || iv.to_sym == :@not_if || iv.to_sym == :@only_if self.instance_variable_set(iv, prior_resource.instance_variable_get(iv)) end end -- cgit v1.2.1 From 2b065f5880a9ee9ba5b509f782a6afeb0dd663a3 Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Thu, 13 Dec 2012 11:54:44 -0800 Subject: CHEF-2812: Warn the user when cloning resources --- chef/lib/chef/mixin/recipe_definition_dsl_core.rb | 2 +- chef/lib/chef/resource.rb | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/chef/lib/chef/mixin/recipe_definition_dsl_core.rb b/chef/lib/chef/mixin/recipe_definition_dsl_core.rb index cf89600654..3a19232f42 100644 --- a/chef/lib/chef/mixin/recipe_definition_dsl_core.rb +++ b/chef/lib/chef/mixin/recipe_definition_dsl_core.rb @@ -63,11 +63,11 @@ class Chef # If we have a resource like this one, we want to steal its state args << run_context resource = resource_class.new(*args) + resource.source_line = caller[0] resource.load_prior_resource resource.cookbook_name = cookbook_name resource.recipe_name = @recipe_name resource.params = @params - resource.source_line = caller[0] # Determine whether this resource is being created in the context of an enclosing Provider resource.enclosing_provider = self.is_a?(Chef::Provider) ? self : nil # Evaluate resource attribute DSL diff --git a/chef/lib/chef/resource.rb b/chef/lib/chef/resource.rb index e90e475c83..b5ed8b74bb 100644 --- a/chef/lib/chef/resource.rb +++ b/chef/lib/chef/resource.rb @@ -262,8 +262,9 @@ F def load_prior_resource begin + Chef::Log.warn("Cloning resource attributes for #{self.to_s} from prior resource (CHEF-3694)") + Chef::Log.warn("From: #{self.source_line}") if self.source_line prior_resource = run_context.resource_collection.lookup(self.to_s) - Chef::Log.debug("Setting #{self.to_s} to the state of the prior #{self.to_s}") prior_resource.instance_variables.each do |iv| unless iv.to_sym == :@source_line || iv.to_sym == :@action || iv.to_sym == :@not_if || iv.to_sym == :@only_if self.instance_variable_set(iv, prior_resource.instance_variable_get(iv)) -- cgit v1.2.1 From 957bb77ed079c380cb58b39dded39907dd37306d Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Wed, 14 Nov 2012 16:08:08 -0500 Subject: Add name attribute to metadata.rb by default --- chef/lib/chef/knife/cookbook_create.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/chef/lib/chef/knife/cookbook_create.rb b/chef/lib/chef/knife/cookbook_create.rb index c2e92e6b42..a289e20417 100644 --- a/chef/lib/chef/knife/cookbook_create.rb +++ b/chef/lib/chef/knife/cookbook_create.rb @@ -193,7 +193,7 @@ This file is used to list changes made in each version of #{cookbook_name}. * Initial release of #{cookbook_name} -- - - +- - - Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown. The [Github Flavored Markdown page](http://github.github.com/github-flavored-markdown/) describes the differences between markdown on github and standard markdown. @@ -271,12 +271,13 @@ EOH long_description = "long_description IO.read(File.join(File.dirname(__FILE__), 'README.#{readme_format}'))" end file.puts <<-EOH -maintainer "#{copyright}" -maintainer_email "#{email}" -license "#{license_name}" -description "Installs/Configures #{cookbook_name}" +name '#{cookbook_name}' +maintainer '#{copyright}' +maintainer_email '#{email}' +license '#{license_name}' +description 'Installs/Configures #{cookbook_name}' #{long_description} -version "0.1.0" +version '0.1.0' EOH end end -- cgit v1.2.1 From 0023382ffc26374c2677f3f57dca34eb55051b33 Mon Sep 17 00:00:00 2001 From: Dimitri Roche & Matthew Horan Date: Thu, 25 Oct 2012 11:36:52 -0400 Subject: CHEF-3560: Add coverage to knife ssh port Ensures we strip white space from port when provided on command line. --- chef/spec/functional/knife/ssh_spec.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/chef/spec/functional/knife/ssh_spec.rb b/chef/spec/functional/knife/ssh_spec.rb index 696fd58c4d..58c76ed545 100644 --- a/chef/spec/functional/knife/ssh_spec.rb +++ b/chef/spec/functional/knife/ssh_spec.rb @@ -89,6 +89,19 @@ describe Chef::Knife::Ssh do end end + describe "port" do + context "when -p 31337 is provided" do + before do + setup_knife(['-p 31337', '*:*', 'uptime']) + end + + it "uses the ssh_port" do + @knife.run + @knife.config[:ssh_port].should == "31337" + end + end + end + describe "user" do context "when knife[:ssh_user] is set" do before do -- cgit v1.2.1 From 65017c5d338dc8604aca64e20f44e307f1cf56a9 Mon Sep 17 00:00:00 2001 From: Dimitri Roche & Matthew Horan Date: Thu, 25 Oct 2012 14:16:55 -0400 Subject: CHEF-3560: Prompt for user's gateway password knife-ssh and knife-bootstrap should prompt for a password when required by the gateway. Also strip whitespace from the gateway when provided on the command line. --- chef/lib/chef/knife/ssh.rb | 32 ++++++++++++++++--------- chef/spec/functional/knife/ssh_spec.rb | 43 ++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 11 deletions(-) diff --git a/chef/lib/chef/knife/ssh.rb b/chef/lib/chef/knife/ssh.rb index c34bbe14ec..f0e4b73093 100644 --- a/chef/lib/chef/knife/ssh.rb +++ b/chef/lib/chef/knife/ssh.rb @@ -78,7 +78,7 @@ class Chef :short => "-G GATEWAY", :long => "--ssh-gateway GATEWAY", :description => "The ssh gateway", - :proc => Proc.new { |key| Chef::Config[:knife][:ssh_gateway] = key } + :proc => Proc.new { |key| Chef::Config[:knife][:ssh_gateway] = key.strip } option :identity_file, :short => "-i IDENTITY_FILE", @@ -114,6 +114,20 @@ class Chef @session ||= Net::SSH::Multi.start(:concurrent_connections => config[:concurrency], :on_error => ssh_error_handler) end + def configure_gateway + config[:ssh_gateway] ||= Chef::Config[:knife][:ssh_gateway] + if config[:ssh_gateway] + gw_host, gw_user = config[:ssh_gateway].split('@').reverse + gw_host, gw_port = gw_host.split(':') + gw_opts = gw_port ? { :port => gw_port } : {} + + session.via(gw_host, gw_user || config[:ssh_user], gw_opts) + end + rescue Net::SSH::AuthenticationFailed + gw_opts.merge!(:password => prompt_for_password) + session.via(gw_host, gw_user || config[:ssh_user], gw_opts) + end + def configure_session list = case config[:manual] when true @@ -154,15 +168,6 @@ class Chef end def session_from_list(list) - config[:ssh_gateway] ||= Chef::Config[:knife][:ssh_gateway] - if config[:ssh_gateway] - gw_host, gw_user = config[:ssh_gateway].split('@').reverse - gw_host, gw_port = gw_host.split(':') - gw_opts = gw_port ? { :port => gw_port } : {} - - session.via(gw_host, gw_user || config[:ssh_user], gw_opts) - end - list.each do |item| Chef::Log.debug("Adding #{item}") session_opts = {} @@ -230,7 +235,11 @@ class Chef end def get_password - @password ||= ui.ask("Enter your password: ") { |q| q.echo = false } + @password ||= prompt_for_password + end + + def prompt_for_password + ui.ask("Enter your password: ") { |q| q.echo = false } end # Present the prompt and read a single line from the console. It also @@ -412,6 +421,7 @@ class Chef configure_attribute configure_user configure_identity_file + configure_gateway configure_session exit_status = diff --git a/chef/spec/functional/knife/ssh_spec.rb b/chef/spec/functional/knife/ssh_spec.rb index 58c76ed545..5ca3f92b24 100644 --- a/chef/spec/functional/knife/ssh_spec.rb +++ b/chef/spec/functional/knife/ssh_spec.rb @@ -205,6 +205,49 @@ describe Chef::Knife::Ssh do end end + describe "gateway" do + context "when knife[:ssh_gateway] is set" do + before do + setup_knife(['*:*', 'uptime']) + Chef::Config[:knife][:ssh_gateway] = "user@ec2.public_hostname" + end + + it "uses the ssh_gateway" do + @knife.session.should_receive(:via).with("ec2.public_hostname", "user", {}) + @knife.run + @knife.config[:ssh_gateway].should == "user@ec2.public_hostname" + end + end + + context "when -G user@ec2.public_hostname is provided" do + before do + setup_knife(['-G user@ec2.public_hostname', '*:*', 'uptime']) + Chef::Config[:knife][:ssh_gateway] = nil + end + + it "uses the ssh_gateway" do + @knife.session.should_receive(:via).with("ec2.public_hostname", "user", {}) + @knife.run + @knife.config[:ssh_gateway].should == "user@ec2.public_hostname" + end + end + + context "when the gateway requires a password" do + before do + setup_knife(['-G user@ec2.public_hostname', '*:*', 'uptime']) + Chef::Config[:knife][:ssh_gateway] = nil + @knife.session.stub(:via) do |host, user, options| + raise Net::SSH::AuthenticationFailed unless options[:password] + end + end + + it "should prompt the user for a password" do + @knife.ui.should_receive(:ask).with("Enter your password: ").and_return("password") + @knife.run + end + end + end + def setup_knife(params=[]) @knife = Chef::Knife::Ssh.new(params) @knife.stub!(:ssh_command).and_return { [] } -- cgit v1.2.1 From a908baef862c535cbc8f23254f524ba768466c90 Mon Sep 17 00:00:00 2001 From: Dimitri Roche & Matthew Horan Date: Thu, 1 Nov 2012 12:14:57 -0700 Subject: CHEF-3560: Display user@hostname when prompting for pwd --- chef/lib/chef/knife/ssh.rb | 10 ++++++---- chef/spec/functional/knife/ssh_spec.rb | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/chef/lib/chef/knife/ssh.rb b/chef/lib/chef/knife/ssh.rb index f0e4b73093..de59c96965 100644 --- a/chef/lib/chef/knife/ssh.rb +++ b/chef/lib/chef/knife/ssh.rb @@ -124,8 +124,10 @@ class Chef session.via(gw_host, gw_user || config[:ssh_user], gw_opts) end rescue Net::SSH::AuthenticationFailed - gw_opts.merge!(:password => prompt_for_password) - session.via(gw_host, gw_user || config[:ssh_user], gw_opts) + user = gw_user || config[:ssh_user] + prompt = "Enter the password for #{user}@#{gw_host}: " + gw_opts.merge!(:password => prompt_for_password(prompt)) + session.via(gw_host, user, gw_opts) end def configure_session @@ -238,8 +240,8 @@ class Chef @password ||= prompt_for_password end - def prompt_for_password - ui.ask("Enter your password: ") { |q| q.echo = false } + def prompt_for_password(prompt = "Enter your password: ") + ui.ask(prompt) { |q| q.echo = false } end # Present the prompt and read a single line from the console. It also diff --git a/chef/spec/functional/knife/ssh_spec.rb b/chef/spec/functional/knife/ssh_spec.rb index 5ca3f92b24..875a1f52b3 100644 --- a/chef/spec/functional/knife/ssh_spec.rb +++ b/chef/spec/functional/knife/ssh_spec.rb @@ -242,7 +242,7 @@ describe Chef::Knife::Ssh do end it "should prompt the user for a password" do - @knife.ui.should_receive(:ask).with("Enter your password: ").and_return("password") + @knife.ui.should_receive(:ask).with("Enter the password for user@ec2.public_hostname: ").and_return("password") @knife.run end end -- cgit v1.2.1 From 73c6647492b15d78ce3ba61a5f1ce9f700256a78 Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Thu, 13 Dec 2012 12:20:00 -0800 Subject: CHEF-3560: Strip whitespace on port --- chef/lib/chef/knife/ssh.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chef/lib/chef/knife/ssh.rb b/chef/lib/chef/knife/ssh.rb index de59c96965..049dfce205 100644 --- a/chef/lib/chef/knife/ssh.rb +++ b/chef/lib/chef/knife/ssh.rb @@ -72,7 +72,7 @@ class Chef :short => "-p PORT", :long => "--ssh-port PORT", :description => "The ssh port", - :proc => Proc.new { |key| Chef::Config[:knife][:ssh_port] = key } + :proc => Proc.new { |key| Chef::Config[:knife][:ssh_port] = key.strip } option :ssh_gateway, :short => "-G GATEWAY", -- cgit v1.2.1 From a05f1ce1f39a383d5357be1d44ed361a0d4724d1 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Thu, 2 Aug 2012 14:29:00 -0400 Subject: Create a more detailed README file --- chef/lib/chef/knife/cookbook_create.rb | 68 ++++++++++++++++++++++++++-------- 1 file changed, 52 insertions(+), 16 deletions(-) diff --git a/chef/lib/chef/knife/cookbook_create.rb b/chef/lib/chef/knife/cookbook_create.rb index a289e20417..d56ac5f614 100644 --- a/chef/lib/chef/knife/cookbook_create.rb +++ b/chef/lib/chef/knife/cookbook_create.rb @@ -73,10 +73,10 @@ class Chef email = config[:cookbook_email] || "YOUR_EMAIL" license = ((config[:cookbook_license] != "false") && config[:cookbook_license]) || "none" readme_format = ((config[:readme_format] != "false") && config[:readme_format]) || "md" - create_cookbook(cookbook_path,cookbook_name, copyright, license) - create_readme(cookbook_path,cookbook_name,readme_format) - create_changelog(cookbook_path,cookbook_name) - create_metadata(cookbook_path,cookbook_name, copyright, email, license,readme_format) + create_cookbook(cookbook_path, cookbook_name, copyright, license) + create_readme(cookbook_path, cookbook_name, readme_format) + create_changelog(cookbook_path, cookbook_name) + create_metadata(cookbook_path, cookbook_name, copyright, email, license, readme_format) end def create_cookbook(dir, cookbook_name, copyright, license) @@ -202,54 +202,90 @@ EOH end end - def create_readme(dir, cookbook_name,readme_format) + def create_readme(dir, cookbook_name, readme_format) msg("** Creating README for cookbook: #{cookbook_name}") unless File.exists?(File.join(dir, cookbook_name, "README.#{readme_format}")) open(File.join(dir, cookbook_name, "README.#{readme_format}"), "w") do |file| case readme_format when "rdoc" file.puts <<-EOH -= DESCRIPTION: += #{cookbook_name} Cookbook +TODO: Enter the cookbook description here. -= REQUIREMENTS: +== Requirements +TODO: List your cookbook requirements. -= ATTRIBUTES: +== Attributes +==== #{cookbook_name}::default +- +default['#{cookbook_name}']['my_attribute']+ - this attribute does x, y, and z. -= USAGE: +== Usage +==== #{cookbook_name}::default +TODO: Write usage instructions for each cookbook. +== Contributing +TODO: (optional) If this is a public cookbook, detail the process for contributing. If this is a private cookbook, remove this section. + +== License and Authors +Authors: TODO: List authors EOH when "md","mkd","txt" file.puts <<-EOH -Description -=========== +#{cookbook_name} Cookbook +#{'='*"#{cookbook_name} Cookbook".length} +TODO: Enter the cookbook description here. Requirements -============ +------------ +TODO: List your cookbook requirements. Attributes -========== +---------- +#### #{cookbook_name}::default +- `default['#{cookbook_name}']['my_attribute']` - this attribute does x, y, and z. Usage -===== +----- +#### #{cookbook_name}::default +TODO: Write usage instructions for each cookbook. + +Contributing +------------ +TODO: (optional) If this is a public cookbook, detail the process for contributing. If this is a private cookbook, remove this section. +License and Authors +------------------- +Authors: TODO: List authors EOH else file.puts <<-EOH -Description +#{cookbook_name} Cookbook +#{'='*"#{cookbook_name} Cookbook".length} + TODO: Enter the cookbook description here. Requirements + TODO: List your cookbook requirements. Attributes + #{cookbook_name} + - `default['#{cookbook_name}']['my_attribute']` - this attribute does x, y, and z. Usage + #{cookbook_name} + TODO: Write usage instructions for each cookbook. + +Contributing + TODO: (optional) If this is a public cookbook, detail the process for contributing. If this is a private cookbook, remove this section. +License and Authors + Authors: TODO: List authors EOH end end end end - def create_metadata(dir, cookbook_name, copyright, email, license,readme_format) + def create_metadata(dir, cookbook_name, copyright, email, license, readme_format) msg("** Creating metadata for cookbook: #{cookbook_name}") license_name = case license -- cgit v1.2.1 From f28f4eda7ac5595148eb345a987784b241ad41e4 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Thu, 9 Aug 2012 15:39:48 -0400 Subject: add examples to better describe each section --- chef/lib/chef/knife/cookbook_create.rb | 125 +++++++++++++++++++++++++++++++-- 1 file changed, 119 insertions(+), 6 deletions(-) diff --git a/chef/lib/chef/knife/cookbook_create.rb b/chef/lib/chef/knife/cookbook_create.rb index d56ac5f614..1e6797e4e3 100644 --- a/chef/lib/chef/knife/cookbook_create.rb +++ b/chef/lib/chef/knife/cookbook_create.rb @@ -212,20 +212,61 @@ EOH = #{cookbook_name} Cookbook TODO: Enter the cookbook description here. +e.g. +This cookbook makes your favorite breakfast sandwhich. + == Requirements -TODO: List your cookbook requirements. +TODO: List your cookbook requirements. Be sure to include any requirements this cookbook has on platforms, libraries, other cookbooks, packages, operating systems, etc. + +e.g. +==== packages +- +toaster+ - #{cookbook_name} needs toaster to brown your bagel. == Attributes +TODO: List you cookbook attributes here. + +e.g. ==== #{cookbook_name}::default -- +default['#{cookbook_name}']['my_attribute']+ - this attribute does x, y, and z. + + + + + + + + + + + + + +
KeyTypeDescriptionDefault
['#{cookbook_name}']['bacon']Booleanwhether to include bacontrue
== Usage ==== #{cookbook_name}::default TODO: Write usage instructions for each cookbook. +e.g. +Just include +#{cookbook_name}+ in your node's +run_list+: + + { + "name":"my_node", + "run_list": [ + "recipe[#{cookbook_name}]" + ] + } + == Contributing TODO: (optional) If this is a public cookbook, detail the process for contributing. If this is a private cookbook, remove this section. +e.g. +1. Fork the repository on Github +2. Create a named feature branch (like `add_component_x`) +3. Write you change +4. Write tests for your change (if applicable) +5. Run the tests, ensuring they all pass +6. Submit a Pull Request using Github + == License and Authors Authors: TODO: List authors EOH @@ -235,24 +276,67 @@ EOH #{'='*"#{cookbook_name} Cookbook".length} TODO: Enter the cookbook description here. +e.g. +This cookbook makes your favorite breakfast sandwhich. + Requirements ------------ -TODO: List your cookbook requirements. +TODO: List your cookbook requirements. Be sure to include any requirements this cookbook has on platforms, libraries, other cookbooks, packages, operating systems, etc. + +e.g. +#### packages +- `toaster` - #{cookbook_name} needs toaster to brown your bagel. Attributes ---------- +TODO: List you cookbook attributes here. + +e.g. #### #{cookbook_name}::default -- `default['#{cookbook_name}']['my_attribute']` - this attribute does x, y, and z. + + + + + + + + + + + + + +
KeyTypeDescriptionDefault
['#{cookbook_name}']['bacon']Booleanwhether to include bacontrue
Usage ----- #### #{cookbook_name}::default TODO: Write usage instructions for each cookbook. +e.g. +Just include `#{cookbook_name}` in your node's `run_list`: + +```json +{ + "name":"my_node", + "run_list": [ + "recipe[#{cookbook_name}]" + ] +} +``` + Contributing ------------ TODO: (optional) If this is a public cookbook, detail the process for contributing. If this is a private cookbook, remove this section. +e.g. +1. Fork the repository on Github +2. Create a named feature branch (like `add_component_x`) +3. Write you change +4. Write tests for your change (if applicable) +5. Run the tests, ensuring they all pass +6. Submit a Pull Request using Github + License and Authors ------------------- Authors: TODO: List authors @@ -263,20 +347,49 @@ EOH #{'='*"#{cookbook_name} Cookbook".length} TODO: Enter the cookbook description here. + e.g. + This cookbook makes your favorite breakfast sandwhich. + Requirements - TODO: List your cookbook requirements. + TODO: List your cookbook requirements. Be sure to include any requirements this cookbook has on platforms, libraries, other cookbooks, packages, operating systems, etc. + + e.g. + toaster #{cookbook_name} needs toaster to brown your bagel. Attributes + TODO: List you cookbook attributes here. + #{cookbook_name} - - `default['#{cookbook_name}']['my_attribute']` - this attribute does x, y, and z. + Key Type Description Default + ['#{cookbook_name}']['bacon'] Boolean whether to include bacon true Usage #{cookbook_name} TODO: Write usage instructions for each cookbook. + e.g. + Just include `#{cookbook_name}` in your node's `run_list`: + + [code] + { + "name":"my_node", + "run_list": [ + "recipe[#{cookbook_name}]" + ] + } + [/code] + Contributing TODO: (optional) If this is a public cookbook, detail the process for contributing. If this is a private cookbook, remove this section. + e.g. + 1. Fork the repository on Github + 2. Create a named feature branch (like `add_component_x`) + 3. Write you change + 4. Write tests for your change (if applicable) + 5. Run the tests, ensuring they all pass + 6. Submit a Pull Request using Github + License and Authors Authors: TODO: List authors EOH -- cgit v1.2.1 From ff8bfa005155b5da34c7702244ec0f92356dbd18 Mon Sep 17 00:00:00 2001 From: Ilya Sher Date: Wed, 10 Oct 2012 01:00:48 +0200 Subject: Replaced inject() with simpler code --- chef/lib/chef/cookbook/cookbook_version_loader.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/chef/lib/chef/cookbook/cookbook_version_loader.rb b/chef/lib/chef/cookbook/cookbook_version_loader.rb index 48de17cc5a..c7c4d7a20c 100644 --- a/chef/lib/chef/cookbook/cookbook_version_loader.rb +++ b/chef/lib/chef/cookbook/cookbook_version_loader.rb @@ -104,9 +104,7 @@ class Chef end def empty? - cookbook_settings.inject(true) do |all_empty, files| - all_empty && files.last.empty? - end + @cookbook_settings.values.all? do |files_hash| files_hash.empty? end end def merge!(other_cookbook_loader) -- cgit v1.2.1 From 31c419ca36e5110a75e7dccf6bc510074c4cceef Mon Sep 17 00:00:00 2001 From: Ilya Sher Date: Fri, 16 Nov 2012 16:25:43 +0200 Subject: Replaced inject() with simpler code -- style fix --- chef/lib/chef/cookbook/cookbook_version_loader.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chef/lib/chef/cookbook/cookbook_version_loader.rb b/chef/lib/chef/cookbook/cookbook_version_loader.rb index c7c4d7a20c..e98da77d7f 100644 --- a/chef/lib/chef/cookbook/cookbook_version_loader.rb +++ b/chef/lib/chef/cookbook/cookbook_version_loader.rb @@ -104,7 +104,7 @@ class Chef end def empty? - @cookbook_settings.values.all? do |files_hash| files_hash.empty? end + @cookbook_settings.values.all? { |files_hash| files_hash.empty? } end def merge!(other_cookbook_loader) -- cgit v1.2.1 From 0c0f9fa8c636a1c65cfb37e5fc20f66c72b91e86 Mon Sep 17 00:00:00 2001 From: Matthew Kent Date: Wed, 24 Oct 2012 22:25:59 -0700 Subject: CHEF-3006: Add message attrib to log resource to permit typical notifications --- chef/lib/chef/provider/log.rb | 2 +- chef/lib/chef/resource/log.rb | 11 ++++++++++- chef/spec/unit/resource/log_spec.rb | 9 +++++++++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/chef/lib/chef/provider/log.rb b/chef/lib/chef/provider/log.rb index 5d0417ebda..927ee72fcc 100644 --- a/chef/lib/chef/provider/log.rb +++ b/chef/lib/chef/provider/log.rb @@ -38,7 +38,7 @@ class Chef # === Return # true:: Always return true def action_write - Chef::Log.send(@new_resource.level, @new_resource.name) + Chef::Log.send(@new_resource.level, @new_resource.message) @new_resource.updated_by_last_action(true) end diff --git a/chef/lib/chef/resource/log.rb b/chef/lib/chef/resource/log.rb index d1b6b5af0b..30a5bb93c6 100644 --- a/chef/lib/chef/resource/log.rb +++ b/chef/lib/chef/resource/log.rb @@ -20,7 +20,7 @@ class Chef class Resource class Log < Chef::Resource - identity_attr :name + identity_attr :message # Sends a string from a recipe to a log provider # @@ -47,6 +47,15 @@ class Chef @resource_name = :log @level = :info @action = :write + @message = name + end + + def message(arg=nil) + set_or_return( + :message, + arg, + :kind_of => String + ) end # Log level, one of :debug, :info, :warn, :error or :fatal diff --git a/chef/spec/unit/resource/log_spec.rb b/chef/spec/unit/resource/log_spec.rb index bc5ac13078..4c6b2c122d 100644 --- a/chef/spec/unit/resource/log_spec.rb +++ b/chef/spec/unit/resource/log_spec.rb @@ -38,6 +38,15 @@ describe Chef::Resource::Log do it "should allow you to set a log string" do @resource.name.should == @log_str end + + it "should set the message to the first argument to new" do + @resource.message.should == @log_str + end + + it "should accept a string for the log message" do + @resource.message "this is different" + @resource.message.should == "this is different" + end it "should accept a vaild level option" do @resource.level :debug -- cgit v1.2.1 From cfbba7b061039be4f8290a9c368ffb04c17e6022 Mon Sep 17 00:00:00 2001 From: Matthew Kent Date: Sun, 28 Oct 2012 00:23:16 -0700 Subject: CHEF-2427: Teach the yum provider how to handle --(enable|disable)repo passed as options. We collect these options while preserving their order, dump the cache, then pass them along to yum-dump.py during the refresh. yum-dump can now parse these options and enable/disable repos in exactly the same manner yum itself does, thus preserving our cache sanity. The next yum package resource that loads and doesn't have the same options set will blow away the cache. Under the current caching implementation passing these options will add client run time as the cache is rebuilt to account for the differences in package availability. As such I strongly suggest globally enabling/disabling the repo whenever possible. --- chef/lib/chef/provider/package/yum-dump.py | 20 +++++++ chef/lib/chef/provider/package/yum.rb | 41 +++++++++++++ chef/spec/unit/provider/package/yum_spec.rb | 90 +++++++++++++++++++++++++---- 3 files changed, 140 insertions(+), 11 deletions(-) diff --git a/chef/lib/chef/provider/package/yum-dump.py b/chef/lib/chef/provider/package/yum-dump.py index 99136eceec..407eb8f408 100644 --- a/chef/lib/chef/provider/package/yum-dump.py +++ b/chef/lib/chef/provider/package/yum-dump.py @@ -107,6 +107,14 @@ def setup(yb, options): elif YUM_MAJOR == 2: yb.conf.setConfigOption('cache', options.cache) + # Handle repo toggle via id or glob exactly like yum + for opt, repos in options.repo_control: + for repo in repos: + if opt == '--enablerepo': + yb.repos.enableRepo(repo) + elif opt == '--disablerepo': + yb.repos.disableRepo(repo) + return 0 def dump_packages(yb, list, output_provides): @@ -239,6 +247,12 @@ def yum_dump(options): print >> sys.stderr, "yum-dump Unlock Error: %s" % e return 200 +# Preserve order of enable/disable repo args like yum does +def gather_repo_opts(option, opt, value, parser): + if getattr(parser.values, option.dest, None) is None: + setattr(parser.values, option.dest, []) + getattr(parser.values, option.dest).append((opt, value.split(','))) + def main(): usage = "Usage: %prog [options]\n" + \ "Output a list of installed, available and re-installable packages via yum" @@ -261,6 +275,12 @@ def main(): parser.add_option("-a", "--available", action="store_const", const="available", dest="package_list", default="all", help="output only available and re-installable packages") + parser.add_option("--enablerepo", + action="callback", callback=gather_repo_opts, type="string", dest="repo_control", default=[], + help="enable disabled repositories by id or glob") + parser.add_option("--disablerepo", + action="callback", callback=gather_repo_opts, type="string", dest="repo_control", default=[], + help="disable repositories by id or glob") (options, args) = parser.parse_args() diff --git a/chef/lib/chef/provider/package/yum.rb b/chef/lib/chef/provider/package/yum.rb index 9048048b83..f67262ef6f 100644 --- a/chef/lib/chef/provider/package/yum.rb +++ b/chef/lib/chef/provider/package/yum.rb @@ -664,12 +664,16 @@ class Chef @allow_multi_install = [] + @extra_repo_control = nil + # these are for subsequent runs if we are on an interval Chef::Client.when_run_starts do YumCache.instance.reload end end + attr_reader :extra_repo_control + # Cache management # @@ -693,6 +697,10 @@ class Chef raise ArgumentError, "Unexpected value in next_refresh: #{@next_refresh}" end + if @extra_repo_control + opts << " #{@extra_repo_control}" + end + one_line = false error = nil @@ -848,6 +856,22 @@ class Chef @allow_multi_install end + def enable_extra_repo_control(arg) + # Don't touch cache if it's the same repos as the last load + unless @extra_repo_control == arg + @extra_repo_control = arg + reload + end + end + + def disable_extra_repo_control + # Only force reload when set + if @extra_repo_control + @extra_repo_control = nil + reload + end + end + private def version(package_name, arch=nil, is_available=false, is_installed=false) @@ -995,6 +1019,23 @@ class Chef @yum.reload end + if @new_resource.options + repo_control = [] + @new_resource.options.split.each do |opt| + if opt =~ %r{--(enable|disable)repo=.+} + repo_control << opt + end + end + + if repo_control.size > 0 + @yum.enable_extra_repo_control(repo_control.join(" ")) + else + @yum.disable_extra_repo_control + end + else + @yum.disable_extra_repo_control + end + # At this point package_name could be: # # 1) a package name, eg: "foo" diff --git a/chef/spec/unit/provider/package/yum_spec.rb b/chef/spec/unit/provider/package/yum_spec.rb index 4b890b1549..375ae0966b 100644 --- a/chef/spec/unit/provider/package/yum_spec.rb +++ b/chef/spec/unit/provider/package/yum_spec.rb @@ -34,7 +34,8 @@ describe Chef::Provider::Package::Yum do :package_available? => true, :version_available? => true, :allow_multi_install => [ "kernel" ], - :package_repository => "base" + :package_repository => "base", + :disable_extra_repo_control => true ) Chef::Provider::Package::Yum::YumCache.stub!(:instance).and_return(@yum_cache) @provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context) @@ -92,6 +93,7 @@ describe Chef::Provider::Package::Yum do end end @yum_cache.stub!(:package_available?).and_return(true) + @yum_cache.stub!(:disable_extra_repo_control).and_return(true) Chef::Provider::Package::Yum::YumCache.stub!(:instance).and_return(@yum_cache) @provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context) @provider.load_current_resource @@ -125,6 +127,7 @@ describe Chef::Provider::Package::Yum do nil end @yum_cache.stub!(:package_available?).and_return(true) + @yum_cache.stub!(:disable_extra_repo_control).and_return(true) Chef::Provider::Package::Yum::YumCache.stub!(:instance).and_return(@yum_cache) @provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context) # annoying side effect of the fun stub'ing above @@ -155,6 +158,7 @@ describe Chef::Provider::Package::Yum do nil end @yum_cache.stub!(:package_available?).and_return(true) + @yum_cache.stub!(:disable_extra_repo_control).and_return(true) Chef::Provider::Package::Yum::YumCache.stub!(:instance).and_return(@yum_cache) @provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context) @provider.load_current_resource @@ -189,6 +193,7 @@ describe Chef::Provider::Package::Yum do end end.and_return("something") @yum_cache.stub!(:package_available?).and_return(true) + @yum_cache.stub!(:disable_extra_repo_control).and_return(true) Chef::Provider::Package::Yum::YumCache.stub!(:instance).and_return(@yum_cache) @provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context) @provider.load_current_resource @@ -209,6 +214,24 @@ describe Chef::Provider::Package::Yum do @provider.load_current_resource end + it "should detect --enablerepo or --disablerepo when passed among options, collect them preserving order and notify the yum cache" do + @new_resource.stub!(:options).and_return("--stuff --enablerepo=foo --otherthings --disablerepo=a,b,c --enablerepo=bar") + @yum_cache.should_receive(:enable_extra_repo_control).with("--enablerepo=foo --disablerepo=a,b,c --enablerepo=bar") + @provider.load_current_resource + end + + it "should let the yum cache know extra repos are disabled if --enablerepo or --disablerepo aren't among options" do + @new_resource.stub!(:options).and_return("--stuff --otherthings") + @yum_cache.should_receive(:disable_extra_repo_control) + @provider.load_current_resource + end + + it "should let the yum cache know extra repos are disabled if options aren't set" do + @new_resource.stub!(:options).and_return(nil) + @yum_cache.should_receive(:disable_extra_repo_control) + @provider.load_current_resource + end + it "should search provides if package name can't be found then set package_name to match" do @yum_cache = mock( 'Chef::Provider::Yum::YumCache', @@ -217,7 +240,8 @@ describe Chef::Provider::Package::Yum do :installed_version => "1.2.4-11.18.el5", :candidate_version => "1.2.4-11.18.el5", :package_available? => false, - :version_available? => true + :version_available? => true, + :disable_extra_repo_control => true ) Chef::Provider::Package::Yum::YumCache.stub!(:instance).and_return(@yum_cache) pkg = Chef::Provider::Package::Yum::RPMPackage.new("test-package", "1.2.4-11.18.el5", "x86_64", []) @@ -235,7 +259,8 @@ describe Chef::Provider::Package::Yum do :installed_version => "1.2.4-11.18.el5", :candidate_version => "1.2.4-11.18.el5", :package_available? => false, - :version_available? => true + :version_available? => true, + :disable_extra_repo_control => true ) Chef::Provider::Package::Yum::YumCache.stub!(:instance).and_return(@yum_cache) pkg_x = Chef::Provider::Package::Yum::RPMPackage.new("test-package-x", "1.2.4-11.18.el5", "x86_64", []) @@ -255,7 +280,8 @@ describe Chef::Provider::Package::Yum do :installed_version => "1.2.4-11.18.el5", :candidate_version => "1.2.4-11.18.el5", :package_available? => false, - :version_available? => true + :version_available? => true, + :disable_extra_repo_control => true ) Chef::Provider::Package::Yum::YumCache.stub!(:instance).and_return(@yum_cache) @yum_cache.should_receive(:packages_from_require).twice.and_return([]) @@ -272,7 +298,8 @@ describe Chef::Provider::Package::Yum do :installed_version => "1.2.4-11.18.el5", :candidate_version => "1.2.4-11.18.el5", :package_available? => false, - :version_available? => true + :version_available? => true, + :disable_extra_repo_control => true ) Chef::Provider::Package::Yum::YumCache.stub!(:instance).and_return(@yum_cache) @provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context) @@ -295,7 +322,8 @@ describe Chef::Provider::Package::Yum do :installed_version => "1.2.4-11.18.el5", :candidate_version => "1.2.4-11.18.el5", :package_available? => false, - :version_available? => true + :version_available? => true, + :disable_extra_repo_control => true ) Chef::Provider::Package::Yum::YumCache.stub!(:instance).and_return(@yum_cache) @yum_cache.should_receive(:packages_from_require).twice.and_return([]) @@ -363,7 +391,8 @@ describe Chef::Provider::Package::Yum do :installed_version => "1.2.4-11.18.el5", :candidate_version => "1.2.4-11.18.el5_2.3", :package_available? => true, - :version_available? => nil + :version_available? => nil, + :disable_extra_repo_control => true ) Chef::Provider::Package::Yum::YumCache.stub!(:instance).and_return(@yum_cache) @provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context) @@ -380,7 +409,8 @@ describe Chef::Provider::Package::Yum do :candidate_version => "1.2.4-11.15.el5", :package_available? => true, :version_available? => true, - :allow_multi_install => [ "kernel" ] + :allow_multi_install => [ "kernel" ], + :disable_extra_repo_control => true ) Chef::Provider::Package::Yum::YumCache.stub!(:instance).and_return(@yum_cache) @provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context) @@ -398,7 +428,8 @@ describe Chef::Provider::Package::Yum do :package_available? => true, :version_available? => true, :allow_multi_install => [ "cups" ], - :package_repository => "base" + :package_repository => "base", + :disable_extra_repo_control => true ) Chef::Provider::Package::Yum::YumCache.stub!(:instance).and_return(@yum_cache) @provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context) @@ -420,7 +451,8 @@ describe Chef::Provider::Package::Yum do :package_available? => true, :version_available? => true, :allow_multi_install => [], - :package_repository => "base" + :package_repository => "base", + :disable_extra_repo_control => true ) Chef::Provider::Package::Yum::YumCache.stub!(:instance).and_return(@yum_cache) @provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context) @@ -485,7 +517,8 @@ describe Chef::Provider::Package::Yum do :candidate_version => "1.2.4-11.15.el5", :package_available? => true, :version_available? => true, - :allow_multi_install => [ "kernel" ] + :allow_multi_install => [ "kernel" ], + :disable_extra_repo_control => true ) Chef::Provider::Package::Yum::YumCache.stub!(:instance).and_return(@yum_cache) @provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context) @@ -1609,6 +1642,12 @@ EOF @yc.refresh end + it "should pass extra_repo_control args to yum-dump.py" do + @yc.enable_extra_repo_control("--enablerepo=foo --disablerepo=bar") + @yc.should_receive(:popen4).with(%r{^/usr/bin/python .*/yum-dump.py --options --installed-provides --enablerepo=foo --disablerepo=bar$}, :waitlast=>true) + @yc.refresh + end + it "should warn about invalid data with too many separators" do @yc.stub!(:popen4).and_yield(@pid, @stdin, @stdout_bad_separators, @stderr).and_return(@status) Chef::Log.should_receive(:warn).exactly(3).times.with(%r{Problem parsing}) @@ -1788,4 +1827,33 @@ EOF end end + describe "enable_extra_repo_control" do + it "should set @extra_repo_control to arg" do + @yc.enable_extra_repo_control("--enablerepo=test") + @yc.extra_repo_control.should be == "--enablerepo=test" + end + + it "should call reload once when set to flag cache for update" do + @yc.should_receive(:reload).once + @yc.enable_extra_repo_control("--enablerepo=test") + @yc.enable_extra_repo_control("--enablerepo=test") + end + end + + describe "disable_extra_repo_control" do + it "should set @extra_repo_control to nil" do + @yc.enable_extra_repo_control("--enablerepo=test") + @yc.disable_extra_repo_control + @yc.extra_repo_control.should be == nil + end + + it "should call reload once when cleared to flag cache for update" do + @yc.should_receive(:reload).once + @yc.enable_extra_repo_control("--enablerepo=test") + @yc.should_receive(:reload).once + @yc.disable_extra_repo_control + @yc.disable_extra_repo_control + end + end + end -- cgit v1.2.1 From 7da2c53898c191a998dbadfe7fca42739577795f Mon Sep 17 00:00:00 2001 From: Matthew Horan & Ryan Ong Date: Fri, 14 Dec 2012 08:46:38 -0800 Subject: CHEF-2627: Exit with non-zero exit code when ssh command fails --- chef/lib/chef/knife/ssh.rb | 8 +++-- chef/spec/functional/knife/ssh_spec.rb | 2 +- chef/spec/unit/knife/ssh_spec.rb | 56 ++++++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 3 deletions(-) diff --git a/chef/lib/chef/knife/ssh.rb b/chef/lib/chef/knife/ssh.rb index 049dfce205..d1f1e9a8ac 100644 --- a/chef/lib/chef/knife/ssh.rb +++ b/chef/lib/chef/knife/ssh.rb @@ -161,7 +161,7 @@ class Chef ui.fatal("No nodes returned from search!") else ui.fatal("#{@action_nodes.length} #{@action_nodes.length > 1 ? "nodes":"node"} found, " + - "but do not have the required attribute to stablish the connection. " + + "but does not have the required attribute to establish the connection. " + "Try setting another attribute to open the connection using --attribute.") end exit 10 @@ -447,7 +447,11 @@ class Chef end session.close - exit_status + if exit_status != 0 + exit exit_status + else + exit_status + end end end diff --git a/chef/spec/functional/knife/ssh_spec.rb b/chef/spec/functional/knife/ssh_spec.rb index 875a1f52b3..7e697238ff 100644 --- a/chef/spec/functional/knife/ssh_spec.rb +++ b/chef/spec/functional/knife/ssh_spec.rb @@ -250,7 +250,7 @@ describe Chef::Knife::Ssh do def setup_knife(params=[]) @knife = Chef::Knife::Ssh.new(params) - @knife.stub!(:ssh_command).and_return { [] } + @knife.stub!(:ssh_command).and_return { 0 } @api = TinyServer::API.instance @api.clear diff --git a/chef/spec/unit/knife/ssh_spec.rb b/chef/spec/unit/knife/ssh_spec.rb index cec3d40e65..6861ddea75 100644 --- a/chef/spec/unit/knife/ssh_spec.rb +++ b/chef/spec/unit/knife/ssh_spec.rb @@ -197,5 +197,61 @@ describe Chef::Knife::Ssh do @knife.session.servers[0].user.should == "locutus" end end + + describe "#ssh_command" do + let(:execution_channel) { double(:execution_channel, :on_data => nil) } + let(:session_channel) { double(:session_channel, :request_pty => nil)} + let(:session) { double(:session, :loop => nil) } + + let(:command) { "false" } + let(:exit_status) { 0 } + + before do + execution_channel. + should_receive(:on_request). + and_yield(nil, double(:data_stream, :read_long => exit_status)) + + session_channel. + should_receive(:exec). + with(command). + and_yield(execution_channel, true) + + session. + should_receive(:open_channel). + and_yield(session_channel) + end + + it "returns the exit status of the command" do + @knife.ssh_command(command, session).should == exit_status + end + end + + describe "#run" do + before do + @query = Chef::Search::Query.new + @query.should_receive(:search).and_return([[@node_foo]]) + Chef::Search::Query.stub!(:new).and_return(@query) + @knife.stub(:ssh_command).and_return(exit_code) + @knife.name_args = ['*:*', 'false'] + end + + context "with an error" do + let(:exit_code) { 1 } + + it "should exit with a non-zero exit code" do + @knife.should_receive(:exit).with(exit_code) + @knife.run + end + end + + context "with no error" do + let(:exit_code) { 0 } + + it "should not exit" do + @knife.should_not_receive(:exit) + @knife.run + end + end + end end -- cgit v1.2.1 From efcb40590471e9d73280843a8f4615e2d9498c08 Mon Sep 17 00:00:00 2001 From: Matthew Horan & Ryan Ong Date: Fri, 14 Dec 2012 08:47:32 -0800 Subject: CHEF-2627: Return non-zero exit code when any ssh command fails --- chef/lib/chef/knife/ssh.rb | 2 +- chef/spec/unit/knife/ssh_spec.rb | 45 +++++++++++++++++++++++++++++++++++----- 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/chef/lib/chef/knife/ssh.rb b/chef/lib/chef/knife/ssh.rb index d1f1e9a8ac..23c15bd603 100644 --- a/chef/lib/chef/knife/ssh.rb +++ b/chef/lib/chef/knife/ssh.rb @@ -228,7 +228,7 @@ class Chef end end ch.on_request "exit-status" do |ichannel, data| - exit_status = data.read_long + exit_status = [exit_status, data.read_long].max end end end diff --git a/chef/spec/unit/knife/ssh_spec.rb b/chef/spec/unit/knife/ssh_spec.rb index 6861ddea75..589088e8df 100644 --- a/chef/spec/unit/knife/ssh_spec.rb +++ b/chef/spec/unit/knife/ssh_spec.rb @@ -201,10 +201,13 @@ describe Chef::Knife::Ssh do describe "#ssh_command" do let(:execution_channel) { double(:execution_channel, :on_data => nil) } let(:session_channel) { double(:session_channel, :request_pty => nil)} + + let(:execution_channel2) { double(:execution_channel, :on_data => nil) } + let(:session_channel2) { double(:session_channel, :request_pty => nil)} + let(:session) { double(:session, :loop => nil) } let(:command) { "false" } - let(:exit_status) { 0 } before do execution_channel. @@ -216,13 +219,46 @@ describe Chef::Knife::Ssh do with(command). and_yield(execution_channel, true) + execution_channel2. + should_receive(:on_request). + and_yield(nil, double(:data_stream, :read_long => exit_status2)) + + session_channel2. + should_receive(:exec). + with(command). + and_yield(execution_channel2, true) + session. should_receive(:open_channel). - and_yield(session_channel) + and_yield(session_channel). + and_yield(session_channel2) + end + + context "both connections return 0" do + let(:exit_status) { 0 } + let(:exit_status2) { 0 } + + it "returns a 0 exit code" do + @knife.ssh_command(command, session).should == 0 + end end - it "returns the exit status of the command" do - @knife.ssh_command(command, session).should == exit_status + context "the first connection returns 1 and the second returns 0" do + let(:exit_status) { 1 } + let(:exit_status2) { 0 } + + it "returns a non-zero exit code" do + @knife.ssh_command(command, session).should == 1 + end + end + + context "the first connection returns 1 and the second returns 2" do + let(:exit_status) { 1 } + let(:exit_status2) { 2 } + + it "returns a non-zero exit code" do + @knife.ssh_command(command, session).should == 2 + end end end @@ -254,4 +290,3 @@ describe Chef::Knife::Ssh do end end end - -- cgit v1.2.1 From 38f33311b3d486b3eeb2e5385472539527c71ba3 Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Fri, 14 Dec 2012 08:59:29 -0800 Subject: CHEF-2627: Add missing knife[:manual] to test --- chef/spec/unit/knife/ssh_spec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/chef/spec/unit/knife/ssh_spec.rb b/chef/spec/unit/knife/ssh_spec.rb index 589088e8df..8d3287a053 100644 --- a/chef/spec/unit/knife/ssh_spec.rb +++ b/chef/spec/unit/knife/ssh_spec.rb @@ -269,6 +269,7 @@ describe Chef::Knife::Ssh do Chef::Search::Query.stub!(:new).and_return(@query) @knife.stub(:ssh_command).and_return(exit_code) @knife.name_args = ['*:*', 'false'] + @knife.config[:manual] = false end context "with an error" do -- cgit v1.2.1 From cace8de44f1d4dcf69ff27a680ba78d8e1e57a6b Mon Sep 17 00:00:00 2001 From: Michael Saffitz Date: Sat, 20 Oct 2012 11:17:36 -0700 Subject: [CHEF-3543] Support configuration of ssh_user, identity_file, and host_key_verify from knife.rb for bootstrap --- chef/lib/chef/knife/bootstrap.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chef/lib/chef/knife/bootstrap.rb b/chef/lib/chef/knife/bootstrap.rb index a4c117e28f..53b31ad676 100644 --- a/chef/lib/chef/knife/bootstrap.rb +++ b/chef/lib/chef/knife/bootstrap.rb @@ -200,13 +200,13 @@ class Chef ssh = Chef::Knife::Ssh.new ssh.ui = ui ssh.name_args = [ server_name, ssh_command ] - ssh.config[:ssh_user] = config[:ssh_user] + ssh.config[:ssh_user] = Chef::Config[:knife][:ssh_user] || config[:ssh_user] ssh.config[:ssh_password] = config[:ssh_password] ssh.config[:ssh_port] = Chef::Config[:knife][:ssh_port] || config[:ssh_port] ssh.config[:ssh_gateway] = Chef::Config[:knife][:ssh_gateway] || config[:ssh_gateway] - ssh.config[:identity_file] = config[:identity_file] + ssh.config[:identity_file] = Chef::Config[:knife][:identity_file] || config[:identity_file] ssh.config[:manual] = true - ssh.config[:host_key_verify] = config[:host_key_verify] + ssh.config[:host_key_verify] = Chef::Config[:knife][:host_key_verify] || config[:host_key_verify] ssh.config[:on_error] = :raise ssh end -- cgit v1.2.1 From 391fa80412c6e2d5116e221103edd05250f05f29 Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Fri, 14 Dec 2012 09:30:55 -0800 Subject: CHEF-3543: Add tests for reading from knife config for ssh values --- chef/spec/unit/knife/bootstrap_spec.rb | 97 ++++++++++++++++++++++++---------- 1 file changed, 69 insertions(+), 28 deletions(-) diff --git a/chef/spec/unit/knife/bootstrap_spec.rb b/chef/spec/unit/knife/bootstrap_spec.rb index 76261d96ab..a4ebc81910 100644 --- a/chef/spec/unit/knife/bootstrap_spec.rb +++ b/chef/spec/unit/knife/bootstrap_spec.rb @@ -132,36 +132,77 @@ describe Chef::Knife::Bootstrap do @knife.name_args.first.should == "barf" end - describe "when configuring the underlying knife ssh command" do - before do - @knife.name_args = ["foo.example.com"] - @knife.config[:ssh_user] = "rooty" - @knife.config[:ssh_password] = "open_sesame" - Chef::Config[:knife][:ssh_port] = "4001" - @knife.config[:identity_file] = "~/.ssh/me.rsa" - @knife.stub!(:read_template).and_return("") - @knife_ssh = @knife.knife_ssh - end - - it "configures the hostname" do - @knife_ssh.name_args.first.should == "foo.example.com" + describe "when configuring the underlying knife ssh command" + context "from the command line" do + before do + @knife.name_args = ["foo.example.com"] + @knife.config[:ssh_user] = "rooty" + @knife.config[:ssh_port] = "4001" + @knife.config[:ssh_password] = "open_sesame" + Chef::Config[:knife][:ssh_port] = nil + Chef::Config[:knife][:ssh_port] = nil + @knife.config[:identity_file] = "~/.ssh/me.rsa" + @knife.stub!(:read_template).and_return("") + @knife_ssh = @knife.knife_ssh + end + + it "configures the hostname" do + @knife_ssh.name_args.first.should == "foo.example.com" + end + + it "configures the ssh user" do + @knife_ssh.config[:ssh_user].should == 'rooty' + end + + it "configures the ssh password" do + @knife_ssh.config[:ssh_password].should == 'open_sesame' + end + + it "configures the ssh port" do + @knife_ssh.config[:ssh_port].should == '4001' + end + + it "configures the ssh identity file" do + @knife_ssh.config[:identity_file].should == '~/.ssh/me.rsa' + end end - it "configures the ssh user" do - @knife_ssh.config[:ssh_user].should == 'rooty' - end - - it "configures the ssh password" do - @knife_ssh.config[:ssh_password].should == 'open_sesame' - end - - it "configures the ssh port" do - @knife_ssh.config[:ssh_port].should == '4001' - end - - it "configures the ssh identity file" do - @knife_ssh.config[:identity_file].should == '~/.ssh/me.rsa' - end + context "from the knife config file" do + before do + @knife.name_args = ["config.example.com"] + @knife.config[:ssh_user] = nil + @knife.config[:ssh_port] = nil + @knife.config[:ssh_gateway] = nil + @knife.config[:identity_file] = nil + @knife.config[:host_key_verify] = nil + Chef::Config[:knife][:ssh_user] = "curiosity" + Chef::Config[:knife][:ssh_port] = "2430" + Chef::Config[:knife][:identity_file] = "~/.ssh/you.rsa" + Chef::Config[:knife][:ssh_gateway] = "towel.blinkenlights.nl" + Chef::Config[:knife][:host_key_verify] = true + @knife.stub!(:read_template).and_return("") + @knife_ssh = @knife.knife_ssh + end + + it "configures the ssh user" do + @knife_ssh.config[:ssh_user].should == 'curiosity' + end + + it "configures the ssh port" do + @knife_ssh.config[:ssh_port].should == '2430' + end + + it "configures the ssh identity file" do + @knife_ssh.config[:identity_file].should == '~/.ssh/you.rsa' + end + + it "configures the ssh gateway" do + @knife_ssh.config[:ssh_gateway].should == 'towel.blinkenlights.nl' + end + + it "configures the host key verify mode" do + @knife_ssh.config[:host_key_verify].should == true + end end describe "when falling back to password auth when host key auth fails" do -- cgit v1.2.1 From a2e4f6e80342980a099f49a2b4eec1ff63b9ee56 Mon Sep 17 00:00:00 2001 From: Teemu Matilainen Date: Thu, 11 Oct 2012 16:49:45 -0300 Subject: [CHEF-3514] Do not use hardcoded tmp file paths in bootstrap scripts Prefer pipelines and process substitution when possible, and use `mktemp` elsewhere. --- chef/lib/chef/knife/bootstrap/archlinux-gems.erb | 8 ++------ chef/lib/chef/knife/bootstrap/centos5-gems.erb | 21 ++++++++++----------- chef/lib/chef/knife/bootstrap/chef-full.erb | 8 ++------ chef/lib/chef/knife/bootstrap/fedora13-gems.erb | 8 ++------ chef/lib/chef/knife/bootstrap/ubuntu10.04-apt.erb | 8 ++------ chef/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb | 15 ++++----------- chef/lib/chef/knife/bootstrap/ubuntu12.04-gems.erb | 8 ++------ 7 files changed, 24 insertions(+), 52 deletions(-) diff --git a/chef/lib/chef/knife/bootstrap/archlinux-gems.erb b/chef/lib/chef/knife/bootstrap/archlinux-gems.erb index 85d6236197..f7492a8600 100644 --- a/chef/lib/chef/knife/bootstrap/archlinux-gems.erb +++ b/chef/lib/chef/knife/bootstrap/archlinux-gems.erb @@ -14,9 +14,7 @@ mkdir -p /etc/chef cat <<'EOP' <%= validation_key %> EOP -) > /tmp/validation.pem -awk NF /tmp/validation.pem > /etc/chef/validation.pem -rm /tmp/validation.pem +) | awk NF > /etc/chef/validation.pem chmod 0600 /etc/chef/validation.pem <% if @chef_config[:encrypted_data_bag_secret] -%> @@ -24,9 +22,7 @@ chmod 0600 /etc/chef/validation.pem cat <<'EOP' <%= encrypted_data_bag_secret %> EOP -) > /tmp/encrypted_data_bag_secret -awk NF /tmp/encrypted_data_bag_secret > /etc/chef/encrypted_data_bag_secret -rm /tmp/encrypted_data_bag_secret +) | awk NF > /etc/chef/encrypted_data_bag_secret chmod 0600 /etc/chef/encrypted_data_bag_secret <% end -%> diff --git a/chef/lib/chef/knife/bootstrap/centos5-gems.erb b/chef/lib/chef/knife/bootstrap/centos5-gems.erb index f9626c3c2b..74277e011c 100644 --- a/chef/lib/chef/knife/bootstrap/centos5-gems.erb +++ b/chef/lib/chef/knife/bootstrap/centos5-gems.erb @@ -2,6 +2,9 @@ bash -c ' <%= "export http_proxy=\"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] -%> if [ ! -f /usr/bin/chef-client ]; then + tmp_dir=$(mktemp -d) || exit 1 + pushd "$tmp_dir" + wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %>http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm rpm -Uvh epel-release-5-4.noarch.rpm wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %>http://rpm.aegisco.com/aegisco/rhel/aegisco-rhel.rpm @@ -9,11 +12,11 @@ if [ ! -f /usr/bin/chef-client ]; then yum install -y ruby ruby-devel gcc gcc-c++ automake autoconf make - cd /tmp - wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %>http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz - tar zxf rubygems-1.6.2.tgz - cd rubygems-1.6.2 - ruby setup.rb --no-format-executable + wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %>http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz -O - | tar zxf - + (cd rubygems-1.6.2 && ruby setup.rb --no-format-executable) + + popd + rm -r "$tmp_dir" fi gem update --system @@ -27,9 +30,7 @@ mkdir -p /etc/chef cat <<'EOP' <%= validation_key %> EOP -) > /tmp/validation.pem -awk NF /tmp/validation.pem > /etc/chef/validation.pem -rm /tmp/validation.pem +) | awk NF > /etc/chef/validation.pem chmod 0600 /etc/chef/validation.pem <% if @chef_config[:encrypted_data_bag_secret] -%> @@ -37,9 +38,7 @@ chmod 0600 /etc/chef/validation.pem cat <<'EOP' <%= encrypted_data_bag_secret %> EOP -) > /tmp/encrypted_data_bag_secret -awk NF /tmp/encrypted_data_bag_secret > /etc/chef/encrypted_data_bag_secret -rm /tmp/encrypted_data_bag_secret +) | awk NF > /etc/chef/encrypted_data_bag_secret chmod 0600 /etc/chef/encrypted_data_bag_secret <% end -%> diff --git a/chef/lib/chef/knife/bootstrap/chef-full.erb b/chef/lib/chef/knife/bootstrap/chef-full.erb index f369ce4d49..ebafca0552 100644 --- a/chef/lib/chef/knife/bootstrap/chef-full.erb +++ b/chef/lib/chef/knife/bootstrap/chef-full.erb @@ -29,9 +29,7 @@ mkdir -p /etc/chef cat <<'EOP' <%= validation_key %> EOP -) > /tmp/validation.pem -awk NF /tmp/validation.pem > /etc/chef/validation.pem -rm /tmp/validation.pem +) | awk NF > /etc/chef/validation.pem chmod 0600 /etc/chef/validation.pem <% if @chef_config[:encrypted_data_bag_secret] -%> @@ -39,9 +37,7 @@ chmod 0600 /etc/chef/validation.pem cat <<'EOP' <%= encrypted_data_bag_secret %> EOP -) > /tmp/encrypted_data_bag_secret -awk NF /tmp/encrypted_data_bag_secret > /etc/chef/encrypted_data_bag_secret -rm /tmp/encrypted_data_bag_secret +) | awk NF > /etc/chef/encrypted_data_bag_secret chmod 0600 /etc/chef/encrypted_data_bag_secret <% end -%> diff --git a/chef/lib/chef/knife/bootstrap/fedora13-gems.erb b/chef/lib/chef/knife/bootstrap/fedora13-gems.erb index a8448342df..e69bbdaae5 100644 --- a/chef/lib/chef/knife/bootstrap/fedora13-gems.erb +++ b/chef/lib/chef/knife/bootstrap/fedora13-gems.erb @@ -14,9 +14,7 @@ mkdir -p /etc/chef cat <<'EOP' <%= validation_key %> EOP -) > /tmp/validation.pem -awk NF /tmp/validation.pem > /etc/chef/validation.pem -rm /tmp/validation.pem +) | awk NF > /etc/chef/validation.pem chmod 0600 /etc/chef/validation.pem <% if @chef_config[:encrypted_data_bag_secret] -%> @@ -24,9 +22,7 @@ chmod 0600 /etc/chef/validation.pem cat <<'EOP' <%= encrypted_data_bag_secret %> EOP -) > /tmp/encrypted_data_bag_secret -awk NF /tmp/encrypted_data_bag_secret > /etc/chef/encrypted_data_bag_secret -rm /tmp/encrypted_data_bag_secret +) | awk NF > /etc/chef/encrypted_data_bag_secret chmod 0600 /etc/chef/encrypted_data_bag_secret <% end -%> diff --git a/chef/lib/chef/knife/bootstrap/ubuntu10.04-apt.erb b/chef/lib/chef/knife/bootstrap/ubuntu10.04-apt.erb index 0e44361d82..ba480003fa 100644 --- a/chef/lib/chef/knife/bootstrap/ubuntu10.04-apt.erb +++ b/chef/lib/chef/knife/bootstrap/ubuntu10.04-apt.erb @@ -14,9 +14,7 @@ apt-get install -y chef cat <<'EOP' <%= validation_key %> EOP -) > /tmp/validation.pem -awk NF /tmp/validation.pem > /etc/chef/validation.pem -rm /tmp/validation.pem +) | awk NF > /etc/chef/validation.pem chmod 0600 /etc/chef/validation.pem <% if @chef_config[:encrypted_data_bag_secret] -%> @@ -24,9 +22,7 @@ chmod 0600 /etc/chef/validation.pem cat <<'EOP' <%= encrypted_data_bag_secret %> EOP -) > /tmp/encrypted_data_bag_secret -awk NF /tmp/encrypted_data_bag_secret > /etc/chef/encrypted_data_bag_secret -rm /tmp/encrypted_data_bag_secret +) | awk NF > /etc/chef/encrypted_data_bag_secret chmod 0600 /etc/chef/encrypted_data_bag_secret <% end -%> diff --git a/chef/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb b/chef/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb index 63448fc4d3..7ac98669c1 100644 --- a/chef/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb +++ b/chef/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb @@ -4,11 +4,8 @@ bash -c ' if [ ! -f /usr/bin/chef-client ]; then apt-get update apt-get install -y ruby ruby1.8-dev build-essential wget libruby-extras libruby1.8-extras - cd /tmp - wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %>http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz - tar zxf rubygems-1.6.2.tgz - cd rubygems-1.6.2 - ruby setup.rb --no-format-executable + wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %>http://production.cf.rubygems.org/rubygems/rubygems-1.6.2.tgz -O - | tar zxf - + (cd rubygems-1.6.2 && ruby setup.rb --no-format-executable) fi gem update --no-rdoc --no-ri @@ -21,9 +18,7 @@ mkdir -p /etc/chef cat <<'EOP' <%= validation_key %> EOP -) > /tmp/validation.pem -awk NF /tmp/validation.pem > /etc/chef/validation.pem -rm /tmp/validation.pem +) | awk NF > /etc/chef/validation.pem chmod 0600 /etc/chef/validation.pem <% if @chef_config[:encrypted_data_bag_secret] -%> @@ -31,9 +26,7 @@ chmod 0600 /etc/chef/validation.pem cat <<'EOP' <%= encrypted_data_bag_secret %> EOP -) > /tmp/encrypted_data_bag_secret -awk NF /tmp/encrypted_data_bag_secret > /etc/chef/encrypted_data_bag_secret -rm /tmp/encrypted_data_bag_secret +) | awk NF > /etc/chef/encrypted_data_bag_secret chmod 0600 /etc/chef/encrypted_data_bag_secret <% end -%> diff --git a/chef/lib/chef/knife/bootstrap/ubuntu12.04-gems.erb b/chef/lib/chef/knife/bootstrap/ubuntu12.04-gems.erb index e7da7db39b..6378985988 100644 --- a/chef/lib/chef/knife/bootstrap/ubuntu12.04-gems.erb +++ b/chef/lib/chef/knife/bootstrap/ubuntu12.04-gems.erb @@ -16,9 +16,7 @@ mkdir -p /etc/chef cat <<'EOP' <%= validation_key %> EOP -) > /tmp/validation.pem -awk NF /tmp/validation.pem > /etc/chef/validation.pem -rm /tmp/validation.pem +) | awk NF > /etc/chef/validation.pem chmod 0600 /etc/chef/validation.pem <% if @chef_config[:encrypted_data_bag_secret] -%> @@ -26,9 +24,7 @@ chmod 0600 /etc/chef/validation.pem cat <<'EOP' <%= encrypted_data_bag_secret %> EOP -) > /tmp/encrypted_data_bag_secret -awk NF /tmp/encrypted_data_bag_secret > /etc/chef/encrypted_data_bag_secret -rm /tmp/encrypted_data_bag_secret +) | awk NF > /etc/chef/encrypted_data_bag_secret chmod 0600 /etc/chef/encrypted_data_bag_secret <% end -%> -- cgit v1.2.1 From 9a65cc8e88f17f350f56b301c6aa9e994e007ba1 Mon Sep 17 00:00:00 2001 From: Teemu Matilainen Date: Sun, 14 Oct 2012 16:42:27 -0300 Subject: Avoid unneeded subshells in bootstrap templates --- chef/lib/chef/knife/bootstrap/archlinux-gems.erb | 21 ++++++--------------- chef/lib/chef/knife/bootstrap/centos5-gems.erb | 20 +++++--------------- chef/lib/chef/knife/bootstrap/chef-full.erb | 20 +++++--------------- chef/lib/chef/knife/bootstrap/fedora13-gems.erb | 20 +++++--------------- chef/lib/chef/knife/bootstrap/ubuntu10.04-apt.erb | 16 ++++------------ chef/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb | 20 +++++--------------- chef/lib/chef/knife/bootstrap/ubuntu12.04-gems.erb | 20 +++++--------------- 7 files changed, 35 insertions(+), 102 deletions(-) diff --git a/chef/lib/chef/knife/bootstrap/archlinux-gems.erb b/chef/lib/chef/knife/bootstrap/archlinux-gems.erb index f7492a8600..4b9cd07c8f 100644 --- a/chef/lib/chef/knife/bootstrap/archlinux-gems.erb +++ b/chef/lib/chef/knife/bootstrap/archlinux-gems.erb @@ -10,19 +10,16 @@ if [ ! -f /usr/bin/chef-client ]; then fi mkdir -p /etc/chef -( -cat <<'EOP' + +awk NF > /etc/chef/validation.pem <<'EOP' <%= validation_key %> EOP -) | awk NF > /etc/chef/validation.pem chmod 0600 /etc/chef/validation.pem <% if @chef_config[:encrypted_data_bag_secret] -%> -( -cat <<'EOP' +awk NF > /etc/chef/encrypted_data_bag_secret <<'EOP' <%= encrypted_data_bag_secret %> EOP -) | awk NF > /etc/chef/encrypted_data_bag_secret chmod 0600 /etc/chef/encrypted_data_bag_secret <% end -%> @@ -31,16 +28,13 @@ chmod 0600 /etc/chef/encrypted_data_bag_secret mkdir -p /etc/chef/ohai/hints <% @chef_config[:knife][:hints].each do |name, hash| -%> -( -cat <<'EOP' +cat > /etc/chef/ohai/hints/<%= name %>.json <<'EOP' <%= hash.to_json %> EOP -) > /etc/chef/ohai/hints/<%= name %>.json <% end -%> <% end -%> -( -cat <<'EOP' +cat > /etc/chef/client.rb <<'EOP' log_level :info log_location STDOUT chef_server_url "<%= @chef_config[:chef_server_url] %>" @@ -60,12 +54,9 @@ http_proxy "<%= knife_config[:bootstrap_proxy] %>" https_proxy "<%= knife_config[:bootstrap_proxy] %>" <% end -%> EOP -) > /etc/chef/client.rb -( -cat <<'EOP' +cat > /etc/chef/first-boot.json <<'EOP' <%= first_boot.to_json %> EOP -) > /etc/chef/first-boot.json <%= start_chef %>' diff --git a/chef/lib/chef/knife/bootstrap/centos5-gems.erb b/chef/lib/chef/knife/bootstrap/centos5-gems.erb index 74277e011c..8459718003 100644 --- a/chef/lib/chef/knife/bootstrap/centos5-gems.erb +++ b/chef/lib/chef/knife/bootstrap/centos5-gems.erb @@ -26,19 +26,15 @@ gem install chef --no-rdoc --no-ri --verbose <%= bootstrap_version_string %> mkdir -p /etc/chef -( -cat <<'EOP' +awk NF > /etc/chef/validation.pem <<'EOP' <%= validation_key %> EOP -) | awk NF > /etc/chef/validation.pem chmod 0600 /etc/chef/validation.pem <% if @chef_config[:encrypted_data_bag_secret] -%> -( -cat <<'EOP' +awk NF > /etc/chef/encrypted_data_bag_secret <<'EOP' <%= encrypted_data_bag_secret %> EOP -) | awk NF > /etc/chef/encrypted_data_bag_secret chmod 0600 /etc/chef/encrypted_data_bag_secret <% end -%> @@ -47,24 +43,18 @@ chmod 0600 /etc/chef/encrypted_data_bag_secret mkdir -p /etc/chef/ohai/hints <% @chef_config[:knife][:hints].each do |name, hash| -%> -( -cat <<'EOP' +cat > /etc/chef/ohai/hints/<%= name %>.json <<'EOP' <%= hash.to_json %> EOP -) > /etc/chef/ohai/hints/<%= name %>.json <% end -%> <% end -%> -( -cat <<'EOP' +cat > /etc/chef/client.rb <<'EOP' <%= config_content %> EOP -) > /etc/chef/client.rb -( -cat <<'EOP' +cat > /etc/chef/first-boot.json <<'EOP' <%= first_boot.to_json %> EOP -) > /etc/chef/first-boot.json <%= start_chef %>' diff --git a/chef/lib/chef/knife/bootstrap/chef-full.erb b/chef/lib/chef/knife/bootstrap/chef-full.erb index ebafca0552..723b652faa 100644 --- a/chef/lib/chef/knife/bootstrap/chef-full.erb +++ b/chef/lib/chef/knife/bootstrap/chef-full.erb @@ -25,19 +25,15 @@ fi mkdir -p /etc/chef -( -cat <<'EOP' +awk NF > /etc/chef/validation.pem <<'EOP' <%= validation_key %> EOP -) | awk NF > /etc/chef/validation.pem chmod 0600 /etc/chef/validation.pem <% if @chef_config[:encrypted_data_bag_secret] -%> -( -cat <<'EOP' +awk NF > /etc/chef/encrypted_data_bag_secret <<'EOP' <%= encrypted_data_bag_secret %> EOP -) | awk NF > /etc/chef/encrypted_data_bag_secret chmod 0600 /etc/chef/encrypted_data_bag_secret <% end -%> @@ -46,24 +42,18 @@ chmod 0600 /etc/chef/encrypted_data_bag_secret mkdir -p /etc/chef/ohai/hints <% @chef_config[:knife][:hints].each do |name, hash| -%> -( -cat <<'EOP' +cat > /etc/chef/ohai/hints/<%= name %>.json <<'EOP' <%= hash.to_json %> EOP -) > /etc/chef/ohai/hints/<%= name %>.json <% end -%> <% end -%> -( -cat <<'EOP' +cat > /etc/chef/client.rb <<'EOP' <%= config_content %> EOP -) > /etc/chef/client.rb -( -cat <<'EOP' +cat > /etc/chef/first-boot.json <<'EOP' <%= first_boot.to_json %> EOP -) > /etc/chef/first-boot.json <%= start_chef %>' diff --git a/chef/lib/chef/knife/bootstrap/fedora13-gems.erb b/chef/lib/chef/knife/bootstrap/fedora13-gems.erb index e69bbdaae5..e555c0652a 100644 --- a/chef/lib/chef/knife/bootstrap/fedora13-gems.erb +++ b/chef/lib/chef/knife/bootstrap/fedora13-gems.erb @@ -10,19 +10,15 @@ gem install chef --no-rdoc --no-ri --verbose <%= bootstrap_version_string %> mkdir -p /etc/chef -( -cat <<'EOP' +awk NF > /etc/chef/validation.pem <<'EOP' <%= validation_key %> EOP -) | awk NF > /etc/chef/validation.pem chmod 0600 /etc/chef/validation.pem <% if @chef_config[:encrypted_data_bag_secret] -%> -( -cat <<'EOP' +awk NF > /etc/chef/encrypted_data_bag_secret <<'EOP' <%= encrypted_data_bag_secret %> EOP -) | awk NF > /etc/chef/encrypted_data_bag_secret chmod 0600 /etc/chef/encrypted_data_bag_secret <% end -%> @@ -31,24 +27,18 @@ chmod 0600 /etc/chef/encrypted_data_bag_secret mkdir -p /etc/chef/ohai/hints <% @chef_config[:knife][:hints].each do |name, hash| -%> -( -cat <<'EOP' +cat > /etc/chef/ohai/hints/<%= name %>.json <<'EOP' <%= hash.to_json %> EOP -) > /etc/chef/ohai/hints/<%= name %>.json <% end -%> <% end -%> -( -cat <<'EOP' +cat > /etc/chef/client.rb <<'EOP' <%= config_content %> EOP -) > /etc/chef/client.rb -( -cat <<'EOP' +cat > /etc/chef/first-boot.json <<'EOP' <%= first_boot.to_json %> EOP -) > /etc/chef/first-boot.json <%= start_chef %>' diff --git a/chef/lib/chef/knife/bootstrap/ubuntu10.04-apt.erb b/chef/lib/chef/knife/bootstrap/ubuntu10.04-apt.erb index ba480003fa..93ec208ac3 100644 --- a/chef/lib/chef/knife/bootstrap/ubuntu10.04-apt.erb +++ b/chef/lib/chef/knife/bootstrap/ubuntu10.04-apt.erb @@ -10,19 +10,15 @@ fi apt-get update apt-get install -y chef -( -cat <<'EOP' +awk NF > /etc/chef/validation.pem <<'EOP' <%= validation_key %> EOP -) | awk NF > /etc/chef/validation.pem chmod 0600 /etc/chef/validation.pem <% if @chef_config[:encrypted_data_bag_secret] -%> -( -cat <<'EOP' +awk NF > /etc/chef/encrypted_data_bag_secret <<'EOP' <%= encrypted_data_bag_secret %> EOP -) | awk NF > /etc/chef/encrypted_data_bag_secret chmod 0600 /etc/chef/encrypted_data_bag_secret <% end -%> @@ -31,11 +27,9 @@ chmod 0600 /etc/chef/encrypted_data_bag_secret mkdir -p /etc/chef/ohai/hints <% @chef_config[:knife][:hints].each do |name, hash| -%> -( -cat <<'EOP' +cat > /etc/chef/ohai/hints/<%= name %>.json <<'EOP' <%= hash.to_json %> EOP -) > /etc/chef/ohai/hints/<%= name %>.json <% end -%> <% end -%> @@ -52,10 +46,8 @@ echo 'http_proxy "knife_config[:bootstrap_proxy]"' >> /etc/chef/client.rb echo 'https_proxy "knife_config[:bootstrap_proxy]"' >> /etc/chef/client.rb <% end -%> -( -cat <<'EOP' +cat > /etc/chef/first-boot.json <<'EOP' <%= first_boot.to_json %> EOP -) > /etc/chef/first-boot.json <%= start_chef %>' diff --git a/chef/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb b/chef/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb index 7ac98669c1..f5ecc5f7b9 100644 --- a/chef/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb +++ b/chef/lib/chef/knife/bootstrap/ubuntu10.04-gems.erb @@ -14,19 +14,15 @@ gem install chef --no-rdoc --no-ri --verbose <%= bootstrap_version_string %> mkdir -p /etc/chef -( -cat <<'EOP' +awk NF > /etc/chef/validation.pem <<'EOP' <%= validation_key %> EOP -) | awk NF > /etc/chef/validation.pem chmod 0600 /etc/chef/validation.pem <% if @chef_config[:encrypted_data_bag_secret] -%> -( -cat <<'EOP' +awk NF > /etc/chef/encrypted_data_bag_secret <<'EOP' <%= encrypted_data_bag_secret %> EOP -) | awk NF > /etc/chef/encrypted_data_bag_secret chmod 0600 /etc/chef/encrypted_data_bag_secret <% end -%> @@ -35,24 +31,18 @@ chmod 0600 /etc/chef/encrypted_data_bag_secret mkdir -p /etc/chef/ohai/hints <% @chef_config[:knife][:hints].each do |name, hash| -%> -( -cat <<'EOP' +cat > /etc/chef/ohai/hints/<%= name %>.json <<'EOP' <%= hash.to_json %> EOP -) > /etc/chef/ohai/hints/<%= name %>.json <% end -%> <% end -%> -( -cat <<'EOP' +cat > /etc/chef/client.rb <<'EOP' <%= config_content %> EOP -) > /etc/chef/client.rb -( -cat <<'EOP' +cat > /etc/chef/first-boot.json <<'EOP' <%= first_boot.to_json %> EOP -) > /etc/chef/first-boot.json <%= start_chef %>' diff --git a/chef/lib/chef/knife/bootstrap/ubuntu12.04-gems.erb b/chef/lib/chef/knife/bootstrap/ubuntu12.04-gems.erb index 6378985988..7d9549a125 100644 --- a/chef/lib/chef/knife/bootstrap/ubuntu12.04-gems.erb +++ b/chef/lib/chef/knife/bootstrap/ubuntu12.04-gems.erb @@ -12,19 +12,15 @@ gem install chef --no-rdoc --no-ri --verbose <%= bootstrap_version_string %> mkdir -p /etc/chef -( -cat <<'EOP' +awk NF > /etc/chef/validation.pem <<'EOP' <%= validation_key %> EOP -) | awk NF > /etc/chef/validation.pem chmod 0600 /etc/chef/validation.pem <% if @chef_config[:encrypted_data_bag_secret] -%> -( -cat <<'EOP' +awk NF > /etc/chef/encrypted_data_bag_secret <<'EOP' <%= encrypted_data_bag_secret %> EOP -) | awk NF > /etc/chef/encrypted_data_bag_secret chmod 0600 /etc/chef/encrypted_data_bag_secret <% end -%> @@ -33,24 +29,18 @@ chmod 0600 /etc/chef/encrypted_data_bag_secret mkdir -p /etc/chef/ohai/hints <% @chef_config[:knife][:hints].each do |name, hash| -%> -( -cat <<'EOP' +cat > /etc/chef/ohai/hints/<%= name %>.json <<'EOP' <%= hash.to_json %> EOP -) > /etc/chef/ohai/hints/<%= name %>.json <% end -%> <% end -%> -( -cat <<'EOP' +cat > /etc/chef/client.rb <<'EOP' <%= config_content %> EOP -) > /etc/chef/client.rb -( -cat <<'EOP' +cat > /etc/chef/first-boot.json <<'EOP' <%= first_boot.to_json %> EOP -) > /etc/chef/first-boot.json <%= start_chef %>' -- cgit v1.2.1 From dfa05ae3459f536cb2e1a5bd7a748ffde0f2e4ef Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Fri, 14 Dec 2012 09:37:19 -0800 Subject: CHEF-3543: fix yank/paste error in tests --- chef/spec/unit/knife/bootstrap_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chef/spec/unit/knife/bootstrap_spec.rb b/chef/spec/unit/knife/bootstrap_spec.rb index a4ebc81910..e8ca7cca87 100644 --- a/chef/spec/unit/knife/bootstrap_spec.rb +++ b/chef/spec/unit/knife/bootstrap_spec.rb @@ -139,7 +139,7 @@ describe Chef::Knife::Bootstrap do @knife.config[:ssh_user] = "rooty" @knife.config[:ssh_port] = "4001" @knife.config[:ssh_password] = "open_sesame" - Chef::Config[:knife][:ssh_port] = nil + Chef::Config[:knife][:ssh_user] = nil Chef::Config[:knife][:ssh_port] = nil @knife.config[:identity_file] = "~/.ssh/me.rsa" @knife.stub!(:read_template).and_return("") -- cgit v1.2.1 From cd883c265b1fbffb81d7b4194bfa3f7e8895d784 Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Fri, 14 Dec 2012 17:14:28 -0500 Subject: Update contributing for new code review workflow --- CONTRIBUTING.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6da0defc81..4b532feab3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -119,9 +119,12 @@ Opscode regularly reviews code contributions and provides suggestions for improv We find contributions by searching the ticket tracker for _resolved_ tickets with a status of _fixed_. If we have feedback we will reopen the ticket and you should resolve it again when you've made the changes or have a response to our feedback. When we believe -the patch is ready to be merged, we will tag the _Code Reviewed_ field with _Reviewed_. +the patch is ready to be merged, we update the status to _Fix Reviewed_. -Depending on the project, these tickets are then merged within a week or two, depending on the current release cycle. +Depending on the project, these tickets are then merged within a week or two, depending on the current release cycle. At this +point the ticket status will be updated to _Fix Committed_ or _Closed_. + +Please see the [Code Review|http://wiki.opscode.com/display/chef/Code+Review] page on the wiki for additional information. ## Release Cycle -- cgit v1.2.1 From 9acee14516369599669500714a1066f7f68fea5b Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Fri, 14 Dec 2012 17:41:53 -0500 Subject: Fix incorrect link syntax in CONTRIBUTING --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4b532feab3..4744593eeb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -124,7 +124,7 @@ the patch is ready to be merged, we update the status to _Fix Reviewed_. Depending on the project, these tickets are then merged within a week or two, depending on the current release cycle. At this point the ticket status will be updated to _Fix Committed_ or _Closed_. -Please see the [Code Review|http://wiki.opscode.com/display/chef/Code+Review] page on the wiki for additional information. +Please see the [Code Review](http://wiki.opscode.com/display/chef/Code+Review) page on the wiki for additional information. ## Release Cycle -- cgit v1.2.1 From 2f8fbc16f12d36875dfd5d633ebc45ec20db40f3 Mon Sep 17 00:00:00 2001 From: Teemu Matilainen Date: Wed, 10 Oct 2012 14:22:46 -0300 Subject: [CHEF-2905] Error out loudly if neither wget nor curl found on chef-full bootstrap If the system does not have wget or curl installed, the bootstrap script silently skipped the omnibus installation and then failed when trying to execute the missing chef-client. So inform the user to install wget or curl and exit with an error code. --- chef/lib/chef/knife/bootstrap/chef-full.erb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/chef/lib/chef/knife/bootstrap/chef-full.erb b/chef/lib/chef/knife/bootstrap/chef-full.erb index 723b652faa..b7d73b3442 100644 --- a/chef/lib/chef/knife/bootstrap/chef-full.erb +++ b/chef/lib/chef/knife/bootstrap/chef-full.erb @@ -16,10 +16,11 @@ version_string="-v <%= chef_version %>" if ! exists /usr/bin/chef-client; then if exists wget; then bash <(wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %> ${install_sh} -O -) ${version_string} + elif exists curl; then + bash <(curl -L <%= "--proxy \"#{knife_config[:bootstrap_proxy]}\" " if knife_config[:bootstrap_proxy] %> ${install_sh}) ${version_string} else - if exists curl; then - bash <(curl -L <%= "--proxy \"#{knife_config[:bootstrap_proxy]}\" " if knife_config[:bootstrap_proxy] %> ${install_sh}) ${version_string} - fi + echo "Neither wget nor curl found. Please install one and try again." >&2 + exit 1 fi fi -- cgit v1.2.1 From 3c164ca9ea96c89e1db9128cb5dc87ff006af152 Mon Sep 17 00:00:00 2001 From: Teemu Matilainen Date: Wed, 10 Oct 2012 14:43:32 -0300 Subject: [CHEF-2905] Ensure wget is installed on CentOS bootstrap --- chef/lib/chef/knife/bootstrap/centos5-gems.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chef/lib/chef/knife/bootstrap/centos5-gems.erb b/chef/lib/chef/knife/bootstrap/centos5-gems.erb index 8459718003..5db3c1a0e8 100644 --- a/chef/lib/chef/knife/bootstrap/centos5-gems.erb +++ b/chef/lib/chef/knife/bootstrap/centos5-gems.erb @@ -5,6 +5,8 @@ if [ ! -f /usr/bin/chef-client ]; then tmp_dir=$(mktemp -d) || exit 1 pushd "$tmp_dir" + yum install -y wget + wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %>http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm rpm -Uvh epel-release-5-4.noarch.rpm wget <%= "--proxy=on " if knife_config[:bootstrap_proxy] %>http://rpm.aegisco.com/aegisco/rhel/aegisco-rhel.rpm -- cgit v1.2.1 From 82f1d5d01d1bd0d7fe8920f26f13f9b938922254 Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Thu, 13 Dec 2012 16:32:40 -0800 Subject: [CHEF-3689] don't set private key from JSON when not present ApiClient.json_parse would fail on a response from the server with "private_key": false. Also, make ApiClient.inspect a bit nicer --- chef/lib/chef/api_client.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chef/lib/chef/api_client.rb b/chef/lib/chef/api_client.rb index 53f62324a2..02dd34d0d5 100644 --- a/chef/lib/chef/api_client.rb +++ b/chef/lib/chef/api_client.rb @@ -164,7 +164,7 @@ class Chef def self.json_create(o) client = Chef::ApiClient.new client.name(o["name"] || o["clientname"]) - client.private_key(o["private_key"]) + client.private_key(o["private_key"]) if o["private_key"] client.public_key(o["public_key"]) client.admin(o["admin"]) client.couchdb_rev = o["_rev"] @@ -284,8 +284,8 @@ class Chef end def inspect - "Chef::ApiClient name:'#{name}' admin:'#{admin.inspect}'" + - "public_key:'#{public_key}' private_key:#{private_key}" + "Chef::ApiClient name:'#{name}' admin:'#{admin.inspect}' " + + "public_key:'#{public_key}' private_key:'#{private_key}'" end end -- cgit v1.2.1 From 5c2665b0b27d2224e1404d8d0f0728aa375abef0 Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Thu, 13 Dec 2012 16:46:21 -0800 Subject: [CHEF-3689] register works when ApiClient returned from save --- chef/lib/chef/rest.rb | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/chef/lib/chef/rest.rb b/chef/lib/chef/rest.rb index cd595c8fdf..80c98c4620 100644 --- a/chef/lib/chef/rest.rb +++ b/chef/lib/chef/rest.rb @@ -99,11 +99,18 @@ class Chef begin response = nc.save(true, true) Chef::Log.debug("Registration response: #{response.inspect}") - raise Chef::Exceptions::CannotWritePrivateKey, "The response from the server did not include a private key!" unless response.has_key?("private_key") + private_key = if response.respond_to?(:[]) + response["private_key"] + else + response.private_key + end + unless private_key + raise Chef::Exceptions::CannotWritePrivateKey, "The response from the server did not include a private key!" + end # Write out the private key ::File.open(destination, "w") {|f| f.chmod(0600) - f.print(response["private_key"]) + f.print(private_key) } throw :done rescue IOError @@ -360,7 +367,7 @@ class Chef begin http_attempts += 1 - res = yield rest_request + yield rest_request rescue SocketError, Errno::ETIMEDOUT => e e.message.replace "Error connecting to #{url} - #{e.message}" @@ -452,7 +459,6 @@ class Chef Chef::Log.debug("Streaming download from #{url.to_s} to tempfile #{tf.path}") # Stolen from http://www.ruby-forum.com/topic/166423 # Kudos to _why! - size, total = 0, response.header['Content-Length'].to_i inflater = if gzip_disabled? NoopInflater.new @@ -471,7 +477,6 @@ class Chef response.read_body do |chunk| tf.write(inflater.inflate(chunk)) - size += chunk.size end tf.close tf -- cgit v1.2.1 From 7272aa7193e1e70c0fb8eaa8e84099e1e4cff730 Mon Sep 17 00:00:00 2001 From: sersut Date: Mon, 17 Dec 2012 15:17:02 -0800 Subject: Reload original knife config after knife functional tests. --- chef/spec/functional/knife/ssh_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chef/spec/functional/knife/ssh_spec.rb b/chef/spec/functional/knife/ssh_spec.rb index 7e697238ff..3003bae3bc 100644 --- a/chef/spec/functional/knife/ssh_spec.rb +++ b/chef/spec/functional/knife/ssh_spec.rb @@ -23,6 +23,7 @@ describe Chef::Knife::Ssh do before(:all) do @original_config = Chef::Config.hash_dup + @original_knife_config = Chef::Config[:knife].dup Chef::Knife::Ssh.load_deps @server = TinyServer::Manager.new @server.start @@ -30,6 +31,7 @@ describe Chef::Knife::Ssh do after(:all) do Chef::Config.configuration = @original_config + Chef::Config[:knife] = @original_knife_config @server.stop end -- cgit v1.2.1 From 82b1fc02499b0b3b753f53879113533107201dd1 Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Wed, 19 Dec 2012 15:42:00 -0800 Subject: 10.18.0.rc.1 --- chef-expander/lib/chef/expander/version.rb | 2 +- chef-server-api/lib/chef-server-api/version.rb | 2 +- chef-server-webui/lib/chef-server-webui/version.rb | 2 +- chef-server/lib/chef-server/version.rb | 2 +- chef-solr/lib/chef/solr/version.rb | 2 +- chef/lib/chef/version.rb | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/chef-expander/lib/chef/expander/version.rb b/chef-expander/lib/chef/expander/version.rb index ab190bc257..66d08aa4f6 100644 --- a/chef-expander/lib/chef/expander/version.rb +++ b/chef-expander/lib/chef/expander/version.rb @@ -23,7 +23,7 @@ require 'open3' module Chef module Expander - VERSION = "10.16.3" + VERSION = "10.18.0.rc.1" def self.version @rev ||= begin diff --git a/chef-server-api/lib/chef-server-api/version.rb b/chef-server-api/lib/chef-server-api/version.rb index 87ea1c23a6..ef458a6430 100644 --- a/chef-server-api/lib/chef-server-api/version.rb +++ b/chef-server-api/lib/chef-server-api/version.rb @@ -1,3 +1,3 @@ module ChefServerApi - VERSION = '10.16.3' + VERSION = '10.18.0.rc.1' end diff --git a/chef-server-webui/lib/chef-server-webui/version.rb b/chef-server-webui/lib/chef-server-webui/version.rb index 6920de1cdd..2d77a738dd 100644 --- a/chef-server-webui/lib/chef-server-webui/version.rb +++ b/chef-server-webui/lib/chef-server-webui/version.rb @@ -1,3 +1,3 @@ module ChefServerWebui - VERSION = '10.16.3' + VERSION = '10.18.0.rc.1' end diff --git a/chef-server/lib/chef-server/version.rb b/chef-server/lib/chef-server/version.rb index 54e38cbf38..8f307d1e5c 100644 --- a/chef-server/lib/chef-server/version.rb +++ b/chef-server/lib/chef-server/version.rb @@ -17,5 +17,5 @@ # module ChefServer - VERSION = '10.16.3' + VERSION = '10.18.0.rc.1' end diff --git a/chef-solr/lib/chef/solr/version.rb b/chef-solr/lib/chef/solr/version.rb index 6756508d7b..03bc7e7358 100644 --- a/chef-solr/lib/chef/solr/version.rb +++ b/chef-solr/lib/chef/solr/version.rb @@ -1,6 +1,6 @@ class Chef class Solr - VERSION = '10.16.3' + VERSION = '10.18.0.rc.1' # Solr Schema. Used to detect incompatibilities between installed solr and # chef-solr versions. diff --git a/chef/lib/chef/version.rb b/chef/lib/chef/version.rb index f109be487f..69be760068 100644 --- a/chef/lib/chef/version.rb +++ b/chef/lib/chef/version.rb @@ -17,7 +17,7 @@ class Chef CHEF_ROOT = File.dirname(File.expand_path(File.dirname(__FILE__))) - VERSION = '10.16.3' + VERSION = '10.18.0.rc.1' end # NOTE: the Chef::Version class is defined in version_class.rb -- cgit v1.2.1 From 373b140a880e423d233f866a592a44b30baba492 Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Wed, 19 Dec 2012 16:18:03 -0800 Subject: Stress tests randomly fail in Ci. Exclude them ...until someone has a chance to look at them in-depth and make them more stable. Conflicts: spec/spec_helper.rb spec/stress/win32/security_spec.rb --- chef/spec/spec_helper.rb | 3 +++ chef/spec/stress/win32/security_spec.rb | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/chef/spec/spec_helper.rb b/chef/spec/spec_helper.rb index 8b69439bee..ebde491420 100644 --- a/chef/spec/spec_helper.rb +++ b/chef/spec/spec_helper.rb @@ -64,6 +64,9 @@ RSpec.configure do |config| config.filter_run :focus => true config.filter_run_excluding :external => true + # Tests that randomly fail, but may have value. + config.filter_run_excluding :volatile => true + # Add jruby filters here config.filter_run_excluding :windows_only => true unless windows? config.filter_run_excluding :not_supported_on_win2k3 => true if windows_win2k3? diff --git a/chef/spec/stress/win32/security_spec.rb b/chef/spec/stress/win32/security_spec.rb index 5d350e71be..2d8f0b9e0d 100644 --- a/chef/spec/stress/win32/security_spec.rb +++ b/chef/spec/stress/win32/security_spec.rb @@ -48,14 +48,14 @@ describe 'Chef::ReservedNames::Win32::Security', :windows_only do FileUtils.rm_rf(@test_tempdir) end - it "should not leak when retrieving and reading the ACE from a file" do + it "should not leak when retrieving and reading the ACE from a file", :volatile do lambda { sids = Chef::ReservedNames::Win32::Security::SecurableObject.new(@monkeyfoo).security_descriptor.dacl.select { |ace| ace.sid } GC.start }.should_not leak_memory(:warmup => 50, :iterations => 100) end - it "should not leak when creating a new ACL and setting it on a file" do + it "should not leak when creating a new ACL and setting it on a file", :volatile do securable_object = Chef::ReservedNames::Win32::Security::SecurableObject.new(@monkeyfoo) lambda { securable_object.dacl = Chef::ReservedNames::Win32::Security::ACL.create([ -- cgit v1.2.1 From ba63bb699bec20d429aba5f367eb97147304ba8e Mon Sep 17 00:00:00 2001 From: Fletcher Nichol Date: Thu, 8 Nov 2012 11:17:35 -0700 Subject: [CHEF-3597] Handle frozen strings in knife.rb chef_server_url var. --- chef/lib/chef/config.rb | 2 +- chef/spec/unit/config_spec.rb | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/chef/lib/chef/config.rb b/chef/lib/chef/config.rb index 6817ab008a..702aa04a9e 100644 --- a/chef/lib/chef/config.rb +++ b/chef/lib/chef/config.rb @@ -67,7 +67,7 @@ class Chef # url:: String to be set for all of the chef-server-api URL's # config_attr_writer :chef_server_url do |url| - url.strip! + url = url.strip configure do |c| [ :registration_url, :template_url, diff --git a/chef/spec/unit/config_spec.rb b/chef/spec/unit/config_spec.rb index 89161c9df1..f26b7a39eb 100644 --- a/chef/spec/unit/config_spec.rb +++ b/chef/spec/unit/config_spec.rb @@ -62,6 +62,14 @@ describe Chef::Config do it_behaves_like "server URL" end + context "when the url is a frozen string" do + before do + Chef::Config.chef_server_url = " https://junglist.gen.nz".freeze + end + + it_behaves_like "server URL" + end + describe "class method: manage_secret_key" do before do Chef::FileCache.stub!(:load).and_return(true) -- cgit v1.2.1 From 1206d59a1868ae49d0b4cd23c5f4b60b2eda872b Mon Sep 17 00:00:00 2001 From: Xabier de Zuazo Date: Sun, 25 Nov 2012 21:13:11 +0100 Subject: [CHEF-3632] All providers have whyrun enabled by default due to RemoteDirectory --- chef/lib/chef/provider/remote_directory.rb | 7 +++---- chef/spec/unit/provider_spec.rb | 4 ++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/chef/lib/chef/provider/remote_directory.rb b/chef/lib/chef/provider/remote_directory.rb index 5b6348980c..947f65fd3b 100644 --- a/chef/lib/chef/provider/remote_directory.rb +++ b/chef/lib/chef/provider/remote_directory.rb @@ -169,11 +169,10 @@ class Chef dir end - end + def whyrun_supported? + true + end - def whyrun_supported? - true end - end end diff --git a/chef/spec/unit/provider_spec.rb b/chef/spec/unit/provider_spec.rb index ec0af03d47..7873be0f28 100644 --- a/chef/spec/unit/provider_spec.rb +++ b/chef/spec/unit/provider_spec.rb @@ -73,6 +73,10 @@ describe Chef::Provider do @provider.current_resource.should eql(nil) end + it "should not support whyrun by default" do + @provider.send(:whyrun_supported?).should eql(false) + end + it "should return true for action_nothing" do @provider.action_nothing.should eql(true) end -- cgit v1.2.1 From 29621836104b5a3d0637b782319433608d743dbc Mon Sep 17 00:00:00 2001 From: Xabier de Zuazo Date: Sun, 25 Nov 2012 22:37:52 +0100 Subject: [CHEF-3632] removed duplicated provider#whyrun_supported? method --- chef/lib/chef/provider.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/chef/lib/chef/provider.rb b/chef/lib/chef/provider.rb index 6e9c4f5acb..f1bd81de83 100644 --- a/chef/lib/chef/provider.rb +++ b/chef/lib/chef/provider.rb @@ -39,10 +39,6 @@ class Chef # break, e.g., Chef 11. attr_accessor :action - def whyrun_supported? - false - end - def initialize(new_resource, run_context) @new_resource = new_resource @action = action -- cgit v1.2.1 From 86b188aa1b524682f4f62fbe17c619ba0deb5c11 Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Thu, 13 Dec 2012 10:30:42 -0800 Subject: CHEF-3672: Add Ruby 1.9 based Ubuntu 12.10 Gems bootstrap --- chef/lib/chef/knife/bootstrap/ubuntu12.10-gems.erb | 60 ++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 chef/lib/chef/knife/bootstrap/ubuntu12.10-gems.erb diff --git a/chef/lib/chef/knife/bootstrap/ubuntu12.10-gems.erb b/chef/lib/chef/knife/bootstrap/ubuntu12.10-gems.erb new file mode 100644 index 0000000000..c93c591320 --- /dev/null +++ b/chef/lib/chef/knife/bootstrap/ubuntu12.10-gems.erb @@ -0,0 +1,60 @@ +bash -c ' +<%= "export http_proxy=\"#{knife_config[:bootstrap_proxy]}\"" if knife_config[:bootstrap_proxy] -%> + +if [ ! -f /usr/bin/chef-client ]; then + aptitude update + aptitude install -y ruby ruby1.9.1-dev build-essential wget rubygems +fi + +gem update --no-rdoc --no-ri +gem install ohai --no-rdoc --no-ri --verbose +gem install chef --no-rdoc --no-ri --verbose <%= bootstrap_version_string %> + +mkdir -p /etc/chef + +( +cat <<'EOP' +<%= validation_key %> +EOP +) > /tmp/validation.pem +awk NF /tmp/validation.pem > /etc/chef/validation.pem +rm /tmp/validation.pem +chmod 0600 /etc/chef/validation.pem + +<% if @chef_config[:encrypted_data_bag_secret] -%> +( +cat <<'EOP' +<%= encrypted_data_bag_secret %> +EOP +) > /tmp/encrypted_data_bag_secret +awk NF /tmp/encrypted_data_bag_secret > /etc/chef/encrypted_data_bag_secret +rm /tmp/encrypted_data_bag_secret +chmod 0600 /etc/chef/encrypted_data_bag_secret +<% end -%> + +<%# Generate Ohai Hints -%> +<% unless @chef_config[:knife][:hints].nil? || @chef_config[:knife][:hints].empty? -%> +mkdir -p /etc/chef/ohai/hints + +<% @chef_config[:knife][:hints].each do |name, hash| -%> +( +cat <<'EOP' +<%= hash.to_json %> +EOP +) > /etc/chef/ohai/hints/<%= name %>.json +<% end -%> +<% end -%> + +( +cat <<'EOP' +<%= config_content %> +EOP +) > /etc/chef/client.rb + +( +cat <<'EOP' +<%= first_boot.to_json %> +EOP +) > /etc/chef/first-boot.json + +<%= start_chef %>' -- cgit v1.2.1 From c6b6103e3befa355c2645c35fc3b8ba0159375f0 Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Mon, 24 Dec 2012 10:30:13 -0800 Subject: CHEF-3721: Pin moneta to < breaking 0.7.0 rewrite --- chef/chef.gemspec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chef/chef.gemspec b/chef/chef.gemspec index e34c74fa6f..7a44f82ce9 100644 --- a/chef/chef.gemspec +++ b/chef/chef.gemspec @@ -29,7 +29,8 @@ Gem::Specification.new do |s| s.add_dependency "net-ssh-multi", "~> 1.1.0" # CHEF-3027: The knife-cloud plugins require newer features from highline, core chef should not. s.add_dependency "highline", ">= 1.6.9" - %w{erubis moneta uuidtools}.each { |gem| s.add_dependency gem } + s.add_dependency "moneta", "< 0.7.0" + %w{erubis uuidtools}.each { |gem| s.add_dependency gem } # development_dependency thin: eventmachine 0.12.10 doesn't support Ruby 1.9 on Windows %w(rdoc sdoc ronn rake rack rspec_junit_formatter).each { |gem| s.add_development_dependency gem } -- cgit v1.2.1 From ad662f5e81970912050e876fda240bc26d1293fb Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Mon, 24 Dec 2012 10:38:55 -0800 Subject: 10.16.4.rc.1 --- chef-expander/lib/chef/expander/version.rb | 2 +- chef-server-api/lib/chef-server-api/version.rb | 2 +- chef-server-webui/lib/chef-server-webui/version.rb | 2 +- chef-server/lib/chef-server/version.rb | 2 +- chef-solr/lib/chef/solr/version.rb | 2 +- chef/lib/chef/version.rb | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/chef-expander/lib/chef/expander/version.rb b/chef-expander/lib/chef/expander/version.rb index ab190bc257..1cadde81a4 100644 --- a/chef-expander/lib/chef/expander/version.rb +++ b/chef-expander/lib/chef/expander/version.rb @@ -23,7 +23,7 @@ require 'open3' module Chef module Expander - VERSION = "10.16.3" + VERSION = "10.16.4.rc.1" def self.version @rev ||= begin diff --git a/chef-server-api/lib/chef-server-api/version.rb b/chef-server-api/lib/chef-server-api/version.rb index 87ea1c23a6..ea98982792 100644 --- a/chef-server-api/lib/chef-server-api/version.rb +++ b/chef-server-api/lib/chef-server-api/version.rb @@ -1,3 +1,3 @@ module ChefServerApi - VERSION = '10.16.3' + VERSION = '10.16.4.rc.1' end diff --git a/chef-server-webui/lib/chef-server-webui/version.rb b/chef-server-webui/lib/chef-server-webui/version.rb index 6920de1cdd..bc69e5ac8d 100644 --- a/chef-server-webui/lib/chef-server-webui/version.rb +++ b/chef-server-webui/lib/chef-server-webui/version.rb @@ -1,3 +1,3 @@ module ChefServerWebui - VERSION = '10.16.3' + VERSION = '10.16.4.rc.1' end diff --git a/chef-server/lib/chef-server/version.rb b/chef-server/lib/chef-server/version.rb index 54e38cbf38..42e0c43729 100644 --- a/chef-server/lib/chef-server/version.rb +++ b/chef-server/lib/chef-server/version.rb @@ -17,5 +17,5 @@ # module ChefServer - VERSION = '10.16.3' + VERSION = '10.16.4.rc.1' end diff --git a/chef-solr/lib/chef/solr/version.rb b/chef-solr/lib/chef/solr/version.rb index 6756508d7b..f8dc698958 100644 --- a/chef-solr/lib/chef/solr/version.rb +++ b/chef-solr/lib/chef/solr/version.rb @@ -1,6 +1,6 @@ class Chef class Solr - VERSION = '10.16.3' + VERSION = '10.16.4.rc.1' # Solr Schema. Used to detect incompatibilities between installed solr and # chef-solr versions. diff --git a/chef/lib/chef/version.rb b/chef/lib/chef/version.rb index f109be487f..b4e354d4c4 100644 --- a/chef/lib/chef/version.rb +++ b/chef/lib/chef/version.rb @@ -17,7 +17,7 @@ class Chef CHEF_ROOT = File.dirname(File.expand_path(File.dirname(__FILE__))) - VERSION = '10.16.3' + VERSION = '10.16.4.rc.1' end # NOTE: the Chef::Version class is defined in version_class.rb -- cgit v1.2.1 From 2dab51f2eca4a50eb72872becb00e37a7ba8f7b9 Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Mon, 24 Dec 2012 12:41:18 -0800 Subject: 10.16.4 release --- chef-expander/lib/chef/expander/version.rb | 2 +- chef-server-api/lib/chef-server-api/version.rb | 2 +- chef-server-webui/lib/chef-server-webui/version.rb | 2 +- chef-server/lib/chef-server/version.rb | 2 +- chef-solr/lib/chef/solr/version.rb | 2 +- chef/lib/chef/version.rb | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/chef-expander/lib/chef/expander/version.rb b/chef-expander/lib/chef/expander/version.rb index 1cadde81a4..25f100b934 100644 --- a/chef-expander/lib/chef/expander/version.rb +++ b/chef-expander/lib/chef/expander/version.rb @@ -23,7 +23,7 @@ require 'open3' module Chef module Expander - VERSION = "10.16.4.rc.1" + VERSION = "10.16.4" def self.version @rev ||= begin diff --git a/chef-server-api/lib/chef-server-api/version.rb b/chef-server-api/lib/chef-server-api/version.rb index ea98982792..fed65764de 100644 --- a/chef-server-api/lib/chef-server-api/version.rb +++ b/chef-server-api/lib/chef-server-api/version.rb @@ -1,3 +1,3 @@ module ChefServerApi - VERSION = '10.16.4.rc.1' + VERSION = '10.16.4' end diff --git a/chef-server-webui/lib/chef-server-webui/version.rb b/chef-server-webui/lib/chef-server-webui/version.rb index bc69e5ac8d..505eddfa16 100644 --- a/chef-server-webui/lib/chef-server-webui/version.rb +++ b/chef-server-webui/lib/chef-server-webui/version.rb @@ -1,3 +1,3 @@ module ChefServerWebui - VERSION = '10.16.4.rc.1' + VERSION = '10.16.4' end diff --git a/chef-server/lib/chef-server/version.rb b/chef-server/lib/chef-server/version.rb index 42e0c43729..7e4012488d 100644 --- a/chef-server/lib/chef-server/version.rb +++ b/chef-server/lib/chef-server/version.rb @@ -17,5 +17,5 @@ # module ChefServer - VERSION = '10.16.4.rc.1' + VERSION = '10.16.4' end diff --git a/chef-solr/lib/chef/solr/version.rb b/chef-solr/lib/chef/solr/version.rb index f8dc698958..d0dc0bc2a2 100644 --- a/chef-solr/lib/chef/solr/version.rb +++ b/chef-solr/lib/chef/solr/version.rb @@ -1,6 +1,6 @@ class Chef class Solr - VERSION = '10.16.4.rc.1' + VERSION = '10.16.4' # Solr Schema. Used to detect incompatibilities between installed solr and # chef-solr versions. diff --git a/chef/lib/chef/version.rb b/chef/lib/chef/version.rb index b4e354d4c4..584ed09f1d 100644 --- a/chef/lib/chef/version.rb +++ b/chef/lib/chef/version.rb @@ -17,7 +17,7 @@ class Chef CHEF_ROOT = File.dirname(File.expand_path(File.dirname(__FILE__))) - VERSION = '10.16.4.rc.1' + VERSION = '10.16.4' end # NOTE: the Chef::Version class is defined in version_class.rb -- cgit v1.2.1 From eb5e9f1eaeed10f8fbef819604095098521b40e2 Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Tue, 4 Sep 2012 11:50:23 -0700 Subject: Add version.rb files to .gitattributes Ignore these files when merging because they're usually just a change to the version. --- .gitattributes | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitattributes b/.gitattributes index 18f4b2447c..68f32f5d66 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,3 +3,9 @@ chef/distro/common/html/* merge=ignore chef/distro/common/man/man1/* merge=ignore chef/distro/common/man/man8/* merge=ignore +chef/lib/chef/version.rb merge=ignore +chef-solr/lib/chef/solr/version.rb merge=ignore +chef-server/lib/chef-server/version.rb merge=ignore +chef-server-webui/lib/chef-server-webui/version.rb merge=ignore +chef-server-api/lib/chef-server-api/version.rb merge=ignore +chef-expander/lib/chef/expander/version.rb merge=ignore -- cgit v1.2.1 From 82ce467ce8a0c9fda23427264a6dd87a40948ff1 Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Tue, 13 Nov 2012 09:56:32 -0800 Subject: Save @config[:knife] before tests Stop trampling on the other tests bootstrap. --- chef/spec/unit/knife/bootstrap_spec.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/chef/spec/unit/knife/bootstrap_spec.rb b/chef/spec/unit/knife/bootstrap_spec.rb index b2247bb5a4..76261d96ab 100644 --- a/chef/spec/unit/knife/bootstrap_spec.rb +++ b/chef/spec/unit/knife/bootstrap_spec.rb @@ -22,6 +22,16 @@ Chef::Knife::Bootstrap.load_deps require 'net/ssh' describe Chef::Knife::Bootstrap do + before(:all) do + @original_config = Chef::Config.hash_dup + @original_knife_config = Chef::Config[:knife].dup + end + + after(:all) do + Chef::Config.configuration = @original_config + Chef::Config[:knife] = @original_knife_config + end + before(:each) do Chef::Log.logger = Logger.new(StringIO.new) @knife = Chef::Knife::Bootstrap.new -- cgit v1.2.1 From baada4b9ef94e52b0661f7ea3d09f6706efd3486 Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Mon, 24 Dec 2012 14:10:21 -0800 Subject: CHEF-3718: pin systemu version for windows --- chef/Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/chef/Gemfile b/chef/Gemfile index 858484d83c..3e3a1d5e3a 100644 --- a/chef/Gemfile +++ b/chef/Gemfile @@ -21,6 +21,7 @@ group(:development, :test) do end platforms :mswin, :mingw do + gem "systemu", "2.2.0" # CHEF-3718 gem "ffi", "1.0.9" gem "rdp-ruby-wmi", "0.3.1" gem "windows-api", "0.4.0" -- cgit v1.2.1 From 14f4635b6d886123cd1b5b89282ecd3ea14fd5ed Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Thu, 15 Nov 2012 16:16:36 -0800 Subject: replace thin w/ webrick for func. test server --- chef/Gemfile | 6 ---- chef/spec/functional/knife/cookbook_delete_spec.rb | 2 -- chef/spec/functional/knife/exec_spec.rb | 6 ++-- chef/spec/functional/knife/ssh_spec.rb | 1 - chef/spec/functional/resource/remote_file_spec.rb | 1 - chef/spec/functional/tiny_server_spec.rb | 9 ++--- chef/spec/tiny_server.rb | 39 ++++++++++++++++------ 7 files changed, 36 insertions(+), 28 deletions(-) diff --git a/chef/Gemfile b/chef/Gemfile index 3e3a1d5e3a..f21ac77c5b 100644 --- a/chef/Gemfile +++ b/chef/Gemfile @@ -8,12 +8,6 @@ gem "ronn" group(:development, :test) do gem 'rack' - gem 'thin' - - # Eventmachine 1.0.0 is causing functional test failures on Solaris - # 9 SPARC. Pinning em to 0.12.10 solves this issue until we can - # replace thin with webrat or some other alternative. - gem 'eventmachine', '0.12.10', :platforms => :ruby gem 'ruby-shadow', :platforms => :ruby unless RUBY_PLATFORM.downcase.match(/(darwin|freebsd)/) # gem 'awesome_print' diff --git a/chef/spec/functional/knife/cookbook_delete_spec.rb b/chef/spec/functional/knife/cookbook_delete_spec.rb index 54081263f0..ef38cb2e1f 100644 --- a/chef/spec/functional/knife/cookbook_delete_spec.rb +++ b/chef/spec/functional/knife/cookbook_delete_spec.rb @@ -23,8 +23,6 @@ describe Chef::Knife::CookbookDelete do before(:all) do @original_config = Chef::Config.hash_dup - Thin::Logging.silent = true - @server = TinyServer::Manager.new @server.start end diff --git a/chef/spec/functional/knife/exec_spec.rb b/chef/spec/functional/knife/exec_spec.rb index ab3f38ac94..22162e02a2 100644 --- a/chef/spec/functional/knife/exec_spec.rb +++ b/chef/spec/functional/knife/exec_spec.rb @@ -6,9 +6,9 @@ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -23,8 +23,6 @@ describe Chef::Knife::Exec do before(:all) do @original_config = Chef::Config.hash_dup - Thin::Logging.silent = false - @server = TinyServer::Manager.new#(:debug => true) @server.start end diff --git a/chef/spec/functional/knife/ssh_spec.rb b/chef/spec/functional/knife/ssh_spec.rb index 8f87e53bf7..696fd58c4d 100644 --- a/chef/spec/functional/knife/ssh_spec.rb +++ b/chef/spec/functional/knife/ssh_spec.rb @@ -24,7 +24,6 @@ describe Chef::Knife::Ssh do before(:all) do @original_config = Chef::Config.hash_dup Chef::Knife::Ssh.load_deps - Thin::Logging.silent = true @server = TinyServer::Manager.new @server.start end diff --git a/chef/spec/functional/resource/remote_file_spec.rb b/chef/spec/functional/resource/remote_file_spec.rb index e695e8feae..2ebeecd3d1 100644 --- a/chef/spec/functional/resource/remote_file_spec.rb +++ b/chef/spec/functional/resource/remote_file_spec.rb @@ -40,7 +40,6 @@ describe Chef::Resource::RemoteFile do end before(:all) do - Thin::Logging.silent = false @server = TinyServer::Manager.new @server.start @api = TinyServer::API.instance diff --git a/chef/spec/functional/tiny_server_spec.rb b/chef/spec/functional/tiny_server_spec.rb index 0cfef4305f..68ab9e7294 100644 --- a/chef/spec/functional/tiny_server_spec.rb +++ b/chef/spec/functional/tiny_server_spec.rb @@ -37,15 +37,16 @@ describe TinyServer::API do it "creates a route for a GET request" do @api.get('/foo/bar', 200, 'hello foobar') - response = @api.call("REQUEST_METHOD" => "GET", "REQUEST_URI" => '/foo/bar') - response.should == [200, {'Content-Type' => 'application/json'}, 'hello foobar'] + # WEBrick gives you the full URI with host, Thin only gave the part after scheme+host+port + response = @api.call("REQUEST_METHOD" => "GET", "REQUEST_URI" => 'http://localhost:1974/foo/bar') + response.should == [200, {'Content-Type' => 'application/json'}, [ 'hello foobar' ]] end it "creates a route for a request with a block" do block_called = false @api.get('/bar/baz', 200) { block_called = true; 'hello barbaz' } - response = @api.call("REQUEST_METHOD" => "GET", "REQUEST_URI" => '/bar/baz') - response.should == [200, {'Content-Type' => 'application/json'}, 'hello barbaz'] + response = @api.call("REQUEST_METHOD" => "GET", "REQUEST_URI" => 'http://localhost:1974/bar/baz') + response.should == [200, {'Content-Type' => 'application/json'}, [ 'hello barbaz' ]] block_called.should be_true end diff --git a/chef/spec/tiny_server.rb b/chef/spec/tiny_server.rb index ae8518097b..ba75cd57c1 100644 --- a/chef/spec/tiny_server.rb +++ b/chef/spec/tiny_server.rb @@ -17,11 +17,13 @@ # require 'rubygems' +require 'webrick' require 'rack' -require 'thin' +#require 'thin' require 'singleton' require 'chef/json_compat' require 'open-uri' +require 'chef/config' module TinyServer @@ -29,30 +31,42 @@ module TinyServer attr_writer :app - def self.run(options=nil, &block) + def self.setup(options=nil, &block) tiny_app = new(options) app_code = Rack::Builder.new(&block).to_app tiny_app.app = app_code - tiny_app.start + tiny_app + end + + def shutdown + server.shutdown end end class Manager - DEFAULT_OPTIONS = {:server => 'thin', :Port => 9000, :Host => 'localhost', :environment => :none} + # 5 == debug, 3 == warning + LOGGER = WEBrick::Log.new(STDOUT, 3) + DEFAULT_OPTIONS = { + :server => 'webrick', + :Port => 9000, + :Host => 'localhost', + :environment => :none, + :Logger => LOGGER, + :AccessLog => [] # Remove this option to enable the access log when debugging. + } def initialize(options=nil) @options = options ? DEFAULT_OPTIONS.merge(options) : DEFAULT_OPTIONS @creator = caller.first - - Thin::Logging.silent = !@options[:debug] end def start @server_thread = Thread.new do - @server = Server.run(@options) do + @server = Server.setup(@options) do run API.instance end + @server.start end block_until_started end @@ -63,7 +77,10 @@ module TinyServer def block_until_started 200.times do - return true if started? + if started? + raise "ivar weirdness" if @server.nil? + return true + end end raise "TinyServer failed to boot :/" end @@ -84,6 +101,7 @@ module TinyServer def stop # yes, this is terrible. + @server.shutdown @server_thread.kill @server_thread.join @server_thread = nil @@ -132,7 +150,7 @@ module TinyServer debug_info = {:message => "no data matches the request for #{env['REQUEST_URI']}", :available_routes => @routes, :request => env} # Uncomment me for glorious debugging - #pp :not_found => debug_info + # pp :not_found => debug_info [404, {'Content-Type' => 'application/json'}, debug_info.to_json] end end @@ -152,6 +170,7 @@ module TinyServer end def matches_request?(uri) + uri = URI.parse(uri).request_uri @path_spec === uri end @@ -171,7 +190,7 @@ module TinyServer def call data = @data || @block.call - [@response_code, HEADERS, data] + [@response_code, HEADERS, Array(data)] end def to_s -- cgit v1.2.1 From 5b5d0de30df42f9868a217cc839f5cebf6268add Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Fri, 16 Nov 2012 16:28:49 -0800 Subject: fixes binmode issues on windows --- chef/spec/functional/resource/cookbook_file_spec.rb | 8 +++++++- chef/spec/functional/resource/remote_file_spec.rb | 12 ++++++++++-- chef/spec/spec_helper.rb | 1 + chef/spec/support/chef_helpers.rb | 13 +++++++++++++ chef/spec/support/shared/functional/file_resource.rb | 15 +++++++++++---- chef/spec/support/shared/functional/securable_resource.rb | 4 ++++ chef/spec/unit/provider/file_spec.rb | 6 ++++-- 7 files changed, 50 insertions(+), 9 deletions(-) diff --git a/chef/spec/functional/resource/cookbook_file_spec.rb b/chef/spec/functional/resource/cookbook_file_spec.rb index adc1f7eef8..684dd85a12 100644 --- a/chef/spec/functional/resource/cookbook_file_spec.rb +++ b/chef/spec/functional/resource/cookbook_file_spec.rb @@ -24,7 +24,13 @@ describe Chef::Resource::CookbookFile do let(:file_base) { 'cookbook_file_spec' } let(:source) { 'java.response' } let(:cookbook_name) { 'java' } - let(:expected_content) { IO.read(File.join(CHEF_SPEC_DATA, 'cookbooks', 'java', 'files', 'default', 'java.response')) } + let(:expected_content) do + content = File.open(File.join(CHEF_SPEC_DATA, 'cookbooks', 'java', 'files', 'default', 'java.response'), "rb") do |f| + f.read + end + content.force_encoding(Encoding::BINARY) if content.respond_to?(:force_encoding) + content + end def create_resource # set up cookbook collection for this run to use, based on our diff --git a/chef/spec/functional/resource/remote_file_spec.rb b/chef/spec/functional/resource/remote_file_spec.rb index 2ebeecd3d1..998255e720 100644 --- a/chef/spec/functional/resource/remote_file_spec.rb +++ b/chef/spec/functional/resource/remote_file_spec.rb @@ -24,7 +24,13 @@ describe Chef::Resource::RemoteFile do let(:file_base) { "remote_file_spec" } let(:source) { 'http://localhost:9000/nyan_cat.png' } - let(:expected_content) { IO.read(File.join(CHEF_SPEC_DATA, 'remote_file', 'nyan_cat.png')) } + let(:expected_content) do + content = File.open(File.join(CHEF_SPEC_DATA, 'remote_file', 'nyan_cat.png'), "rb") do |f| + f.read + end + content.force_encoding(Encoding::BINARY) if content.respond_to?(:force_encoding) + content + end def create_resource node = Chef::Node.new @@ -45,7 +51,9 @@ describe Chef::Resource::RemoteFile do @api = TinyServer::API.instance @api.clear @api.get("/nyan_cat.png", 200) { - IO.read(File.join(CHEF_SPEC_DATA, 'remote_file', 'nyan_cat.png')) + File.open(File.join(CHEF_SPEC_DATA, 'remote_file', 'nyan_cat.png'), "rb") do |f| + f.read + end } end diff --git a/chef/spec/spec_helper.rb b/chef/spec/spec_helper.rb index 32bddeb415..3611297aa6 100644 --- a/chef/spec/spec_helper.rb +++ b/chef/spec/spec_helper.rb @@ -71,6 +71,7 @@ RSpec.configure do |config| config.filter_run_excluding :ruby_19_only => true unless ruby_19? config.filter_run_excluding :requires_root => true unless ENV['USER'] == 'root' config.filter_run_excluding :requires_unprivileged_user => true if ENV['USER'] == 'root' + config.filter_run_excluding :uses_diff => true unless has_diff? config.run_all_when_everything_filtered = true config.treat_symbols_as_metadata_keys_with_true_values = true diff --git a/chef/spec/support/chef_helpers.rb b/chef/spec/support/chef_helpers.rb index 77f5fc7669..77cbe5b5cb 100644 --- a/chef/spec/support/chef_helpers.rb +++ b/chef/spec/support/chef_helpers.rb @@ -50,3 +50,16 @@ def make_tmpname(prefix_suffix, n) path << "-#{n}" if n path << suffix end + +# NOTE: +# This is a temporary fix to get tests passing on systems that have no `diff` +# until we can replace shelling out to `diff` with ruby diff-lcs +def has_diff? + begin + diff_cmd = Mixlib::ShellOut.new("diff -v") + diff_cmd.run_command + true + rescue Errno::ENOENT + false + end +end diff --git a/chef/spec/support/shared/functional/file_resource.rb b/chef/spec/support/shared/functional/file_resource.rb index 631a5ed742..c85512b5c6 100644 --- a/chef/spec/support/shared/functional/file_resource.rb +++ b/chef/spec/support/shared/functional/file_resource.rb @@ -78,6 +78,13 @@ shared_examples_for "a file resource" do # note the stripping of the drive letter from the tmpdir on windows let(:backup_glob) { File.join(CHEF_SPEC_BACKUP_PATH, Dir.tmpdir.sub(/^([A-Za-z]:)/, ""), "#{file_base}*") } + def binread(file) + content = File.open(file, "rb") do |f| + f.read + end + content.force_encoding(Encoding::BINARY) if "".respond_to?(:force_encoding) + end + context "when the target file does not exist" do it "creates the file when the :create action is run" do resource.run_action(:create) @@ -86,12 +93,12 @@ shared_examples_for "a file resource" do it "creates the file with the correct content when the :create action is run" do resource.run_action(:create) - IO.read(path).should == expected_content + binread(path).should == expected_content end it "creates the file with the correct content when the :create_if_missing action is run" do resource.run_action(:create_if_missing) - IO.read(path).should == expected_content + binread(path).should == expected_content end it "deletes the file when the :delete action is run" do @@ -112,7 +119,7 @@ shared_examples_for "a file resource" do context "when the target file has the wrong content" do before(:each) do - File.open(path, "w") { |f| f.print "This is so wrong!!!" } + File.open(path, "wb") { |f| f.print "This is so wrong!!!" } @expected_mtime = File.stat(path).mtime @expected_checksum = sha256_checksum(path) end @@ -136,7 +143,7 @@ shared_examples_for "a file resource" do context "when the target file has the correct content" do before(:each) do - File.open(path, "w") { |f| f.print expected_content } + File.open(path, "wb") { |f| f.print expected_content } @expected_mtime = File.stat(path).mtime @expected_atime = File.stat(path).atime @expected_checksum = sha256_checksum(path) diff --git a/chef/spec/support/shared/functional/securable_resource.rb b/chef/spec/support/shared/functional/securable_resource.rb index 2eeb16c784..2e5797bc8f 100644 --- a/chef/spec/support/shared/functional/securable_resource.rb +++ b/chef/spec/support/shared/functional/securable_resource.rb @@ -29,12 +29,16 @@ shared_context "setup correct permissions" do before :each do File.chown(Etc.getpwnam('nobody').uid, 1337, path) File.chmod(0776, path) + now = Time.now.to_i + File.utime(now - 9000, now - 9000, path) end end context "without root", :requires_unprivileged_user do before :each do File.chmod(0776, path) + now = Time.now.to_i + File.utime(now - 9000, now - 9000, path) end end end diff --git a/chef/spec/unit/provider/file_spec.rb b/chef/spec/unit/provider/file_spec.rb index 9f5ad3a8f8..23352a5124 100644 --- a/chef/spec/unit/provider/file_spec.rb +++ b/chef/spec/unit/provider/file_spec.rb @@ -342,10 +342,12 @@ describe Chef::Provider::File do end it "should call action create if the does not file exist" do - @resource.path("/tmp/non_existant_file") + @resource.path("/tmp/example-dir/non_existant_file") @provider = Chef::Provider::File.new(@resource, @run_context) @provider.should_receive(:diff_current_from_content).and_return("") ::File.stub!(:exists?).with(@resource.path).and_return(false) + ::File.stub!(:directory?).with("/tmp/example-dir/non_existant_file").and_return(false) + ::File.stub!(:directory?).with("/tmp/example-dir").and_return(true) @provider.stub!(:update_new_file_state) io = StringIO.new File.should_receive(:open).with(@provider.new_resource.path, "w+").and_yield(io) @@ -355,7 +357,7 @@ describe Chef::Provider::File do end end - describe "when a diff is requested" do + describe "when a diff is requested", :uses_diff => true do before(:each) do @original_config = Chef::Config.hash_dup -- cgit v1.2.1 From 4e256440e309a116f98b2497f9a1eca743de42df Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Mon, 19 Nov 2012 12:55:55 -0800 Subject: remove deprecated `has_rdoc` --- chef/chef.gemspec | 1 - 1 file changed, 1 deletion(-) diff --git a/chef/chef.gemspec b/chef/chef.gemspec index 7a44f82ce9..124c13e208 100644 --- a/chef/chef.gemspec +++ b/chef/chef.gemspec @@ -5,7 +5,6 @@ Gem::Specification.new do |s| s.name = 'chef' s.version = Chef::VERSION s.platform = Gem::Platform::RUBY - s.has_rdoc = true s.extra_rdoc_files = ["README.rdoc", "LICENSE" ] s.summary = "A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure." s.description = s.summary -- cgit v1.2.1 From 2f7b2da9153b5a47757b4a778f4a5fbf57f5e6ef Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Mon, 19 Nov 2012 15:19:52 -0800 Subject: fix binread for ruby 1.8 --- chef/spec/support/shared/functional/file_resource.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/chef/spec/support/shared/functional/file_resource.rb b/chef/spec/support/shared/functional/file_resource.rb index c85512b5c6..921c6d32d5 100644 --- a/chef/spec/support/shared/functional/file_resource.rb +++ b/chef/spec/support/shared/functional/file_resource.rb @@ -83,6 +83,7 @@ shared_examples_for "a file resource" do f.read end content.force_encoding(Encoding::BINARY) if "".respond_to?(:force_encoding) + content end context "when the target file does not exist" do -- cgit v1.2.1 From 1ac62464201985b36043b460075ceb5f32bd8f22 Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Tue, 27 Nov 2012 15:53:15 -0500 Subject: Switch template provider to FileUtils.cp This reverses the changes made in CHEF-1396. When copying a file over an existing file, the permissions of the existing file are maintained. When moving the file the permissions of the source file are preserved. Since CHEF-1396, we now set permissions after copying (formerly moving) the file, but only do so if there are permissions specified by the user to be set. --- chef/lib/chef/provider/template.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chef/lib/chef/provider/template.rb b/chef/lib/chef/provider/template.rb index c937b9d980..4c0989ac26 100644 --- a/chef/lib/chef/provider/template.rb +++ b/chef/lib/chef/provider/template.rb @@ -61,7 +61,7 @@ class Chef description << diff_current(rendered_template.path) converge_by(description) do backup - FileUtils.mv(rendered_template.path, @new_resource.path) + FileUtils.cp(rendered_template.path, @new_resource.path) Chef::Log.info("#{@new_resource} updated content") access_controls.set_all! stat = ::File.stat(@new_resource.path) -- cgit v1.2.1 From 84dcb7768d2d31ab0d3fa703e77e98b3dee2f38c Mon Sep 17 00:00:00 2001 From: sdelano Date: Mon, 3 Dec 2012 20:31:13 -0800 Subject: CHEF-3660: use FileUtils.cp_r to copy directories in deploy_provider --- chef/lib/chef/provider/deploy.rb | 2 +- chef/spec/unit/provider/deploy/revision_spec.rb | 4 ++-- chef/spec/unit/provider/deploy_spec.rb | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/chef/lib/chef/provider/deploy.rb b/chef/lib/chef/provider/deploy.rb index d05ab73f92..4c189b4cb1 100644 --- a/chef/lib/chef/provider/deploy.rb +++ b/chef/lib/chef/provider/deploy.rb @@ -262,7 +262,7 @@ class Chef target_dir_path = @new_resource.deploy_to + "/releases" converge_by("deploy from repo to #{@target_dir_path} ") do FileUtils.mkdir_p(target_dir_path) - run_command(:command => "cp -RPp #{::File.join(@new_resource.destination, ".")} #{release_path}") + FileUtils.cp_r(::File.join(@new_resource.destination, "."), release_path, :preserve => true) Chef::Log.info "#{@new_resource} copied the cached checkout to #{release_path}" release_created(release_path) end diff --git a/chef/spec/unit/provider/deploy/revision_spec.rb b/chef/spec/unit/provider/deploy/revision_spec.rb index 3287c085d5..d42235600f 100644 --- a/chef/spec/unit/provider/deploy/revision_spec.rb +++ b/chef/spec/unit/provider/deploy/revision_spec.rb @@ -53,7 +53,7 @@ describe Chef::Provider::Deploy::Revision do it "stores the release dir in the file cache when copying the cached repo" do FileUtils.stub!(:mkdir_p) - @provider.stub!(:run_command).and_return(true) + FileUtils.stub!(:cp_r) @provider.copy_cached_repo @provider.stub!(:release_slug).and_return("73219b87e977d9c7ba1aa57e9ad1d88fa91a0ec2") @provider.load_current_resource @@ -65,7 +65,7 @@ describe Chef::Provider::Deploy::Revision do it "removes a release from the file cache when it's used again in another release and append it to the end" do FileUtils.stub!(:mkdir_p) - @provider.stub!(:run_command).and_return(true) + FileUtils.stub!(:cp_r) @provider.copy_cached_repo @provider.stub!(:release_slug).and_return("73219b87e977d9c7ba1aa57e9ad1d88fa91a0ec2") @provider.load_current_resource diff --git a/chef/spec/unit/provider/deploy_spec.rb b/chef/spec/unit/provider/deploy_spec.rb index ebbc6e2823..ef4aed800d 100644 --- a/chef/spec/unit/provider/deploy_spec.rb +++ b/chef/spec/unit/provider/deploy_spec.rb @@ -320,13 +320,13 @@ describe Chef::Provider::Deploy do it "makes a copy of the cached repo in releases dir" do FileUtils.should_receive(:mkdir_p).with("/my/deploy/dir/releases") - @provider.should_receive(:run_command).with({:command => "cp -RPp /my/deploy/dir/shared/cached-copy/. #{@expected_release_dir}"}) + FileUtils.should_receive(:cp_r).with("/my/deploy/dir/shared/cached-copy/.", @expected_release_dir, :preserve => true) @provider.copy_cached_repo end it "calls the internal callback :release_created when copying the cached repo" do FileUtils.stub!(:mkdir_p) - @provider.stub!(:run_command).and_return(true) + FileUtils.stub!(:cp_r) @provider.should_receive(:release_created) @provider.copy_cached_repo end -- cgit v1.2.1 From edead51e01b5aedc8ab9499f0fae7f61e2924f05 Mon Sep 17 00:00:00 2001 From: sdelano Date: Tue, 4 Dec 2012 10:16:17 -0800 Subject: CHEF-3660: add functional tests for executing FileUtils.cp_r(:preserve) on symlinks --- .../sinatra-test-app-with-symlinks.gitbundle | Bin 0 -> 2330 bytes chef/spec/functional/resource/deploy_revision_spec.rb | 18 +++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 chef/spec/data/git_bundles/sinatra-test-app-with-symlinks.gitbundle diff --git a/chef/spec/data/git_bundles/sinatra-test-app-with-symlinks.gitbundle b/chef/spec/data/git_bundles/sinatra-test-app-with-symlinks.gitbundle new file mode 100644 index 0000000000..0a96fbb24f Binary files /dev/null and b/chef/spec/data/git_bundles/sinatra-test-app-with-symlinks.gitbundle differ diff --git a/chef/spec/functional/resource/deploy_revision_spec.rb b/chef/spec/functional/resource/deploy_revision_spec.rb index cbe308c635..633546539a 100644 --- a/chef/spec/functional/resource/deploy_revision_spec.rb +++ b/chef/spec/functional/resource/deploy_revision_spec.rb @@ -69,16 +69,20 @@ describe Chef::Resource::DeployRevision, :unix_only => true do let(:git_bundle_with_in_repo_callbacks) { File.expand_path("git_bundles/sinatra-test-app-with-callback-files.gitbundle", CHEF_SPEC_DATA) } + let(:git_bundle_with_in_repo_symlinks) { File.expand_path("git_bundles/sinatra-test-app-with-symlinks.gitbundle", CHEF_SPEC_DATA) } + # This is the fourth version let(:latest_rev) { "3eb5ca6c353c83d9179dd3b29347539829b401f3" } # This is the third version let(:previous_rev) { "6d19a6dbecc8e37f5b2277345885c0c783eb8fb1" } - # This is the sixth version, it is on the "with-deploy-scripts" branch let(:rev_with_in_repo_callbacks) { "2404d015882659754bdb93ad6e4b4d3d02691a82" } + # This is the fifth version in the "with-symlinks" branch + let(:rev_with_in_repo_symlinks) { "5a4748c52aaea8250b4346a9b8ede95ee3755e28" } + # Read values from the +observe_order_file+ and split each line. This way you # can see in which order things really happened. def actual_operations_order @@ -494,6 +498,18 @@ describe Chef::Resource::DeployRevision, :unix_only => true do end end + context "when deploying an app with in-repo symlinks" do + let(:deploy_with_in_repo_symlinks) do + basic_deploy_resource.dup.tap do |r| + r.repo git_bundle_with_in_repo_symlinks + r.revision rev_with_in_repo_symlinks + end + end + + it "should not raise an exception calling File.utime on symlinks" do + lambda { deploy_with_in_repo_symlinks.run_action(:deploy) }.should_not raise_error + end + end end -- cgit v1.2.1 From b6df419e83ed8c6d8fbebcdef22328ee0e346404 Mon Sep 17 00:00:00 2001 From: sdelano Date: Tue, 4 Dec 2012 10:18:46 -0800 Subject: CHEF-3660: Add FileUtils::Entry_ monkey patch This change is equivalent to the changes made to core Ruby at: - https://github.com/ruby/ruby/commit/7d89ecdc523aab7b9908501b6743da2c26a53825 --- chef/lib/chef/monkey_patches/fileutils.rb | 63 +++++++++++++++++++++++++++++++ chef/lib/chef/provider/deploy.rb | 1 + 2 files changed, 64 insertions(+) create mode 100644 chef/lib/chef/monkey_patches/fileutils.rb diff --git a/chef/lib/chef/monkey_patches/fileutils.rb b/chef/lib/chef/monkey_patches/fileutils.rb new file mode 100644 index 0000000000..4b2b24bb34 --- /dev/null +++ b/chef/lib/chef/monkey_patches/fileutils.rb @@ -0,0 +1,63 @@ +# +# Author:: Stephen Delano () +# Copyright:: Copyright (c) 2012 Opscode, Inc. +# License:: Apache License, Version 2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# == FileUtils::Entry_ (Patch) +# On Ruby 1.9.3 and earlier, FileUtils.cp_r(foo, bar, :preserve => true) fails +# when attempting to copy a directory containing symlinks. This has been +# patched in the trunk of Ruby, and this is a monkey patch of the offending +# code. + +require 'fileutils' + +class FileUtils::Entry_ + def copy_metadata(path) + st = lstat() + if !st.symlink? + File.utime st.atime, st.mtime, path + end + begin + if st.symlink? + begin + File.lchown st.uid, st.gid, path + rescue NotImplementedError + end + else + File.chown st.uid, st.gid, path + end + rescue Errno::EPERM + # clear setuid/setgid + if st.symlink? + begin + File.lchmod st.mode & 01777, path + rescue NotImplementedError + end + else + File.chmod st.mode & 01777, path + end + else + if st.symlink? + begin + File.lchmod st.mode, path + rescue NotImplementedError + end + else + File.chmod st.mode, path + end + end + end +end diff --git a/chef/lib/chef/provider/deploy.rb b/chef/lib/chef/provider/deploy.rb index 4c189b4cb1..b93b8b9d4f 100644 --- a/chef/lib/chef/provider/deploy.rb +++ b/chef/lib/chef/provider/deploy.rb @@ -18,6 +18,7 @@ require "chef/mixin/command" require "chef/mixin/from_file" +require "chef/monkey_patches/fileutils" require "chef/provider/git" require "chef/provider/subversion" -- cgit v1.2.1 From c739928ed93bde5572e7843dbbe8ff2e62f72766 Mon Sep 17 00:00:00 2001 From: sdelano Date: Wed, 12 Dec 2012 16:01:19 -0800 Subject: CHEF-3660: only monkeypatch on ruby 1.9 and earlier --- chef/lib/chef/monkey_patches/fileutils.rb | 62 ++++++++++++++++--------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/chef/lib/chef/monkey_patches/fileutils.rb b/chef/lib/chef/monkey_patches/fileutils.rb index 4b2b24bb34..f18bead144 100644 --- a/chef/lib/chef/monkey_patches/fileutils.rb +++ b/chef/lib/chef/monkey_patches/fileutils.rb @@ -22,41 +22,43 @@ # patched in the trunk of Ruby, and this is a monkey patch of the offending # code. -require 'fileutils' +unless RUBY_VERSION =~ /^2/ + require 'fileutils' -class FileUtils::Entry_ - def copy_metadata(path) - st = lstat() - if !st.symlink? - File.utime st.atime, st.mtime, path - end - begin - if st.symlink? - begin - File.lchown st.uid, st.gid, path - rescue NotImplementedError - end - else - File.chown st.uid, st.gid, path + class FileUtils::Entry_ + def copy_metadata(path) + st = lstat() + if !st.symlink? + File.utime st.atime, st.mtime, path end - rescue Errno::EPERM - # clear setuid/setgid - if st.symlink? - begin - File.lchmod st.mode & 01777, path - rescue NotImplementedError + begin + if st.symlink? + begin + File.lchown st.uid, st.gid, path + rescue NotImplementedError + end + else + File.chown st.uid, st.gid, path end - else - File.chmod st.mode & 01777, path - end - else - if st.symlink? - begin - File.lchmod st.mode, path - rescue NotImplementedError + rescue Errno::EPERM + # clear setuid/setgid + if st.symlink? + begin + File.lchmod st.mode & 01777, path + rescue NotImplementedError + end + else + File.chmod st.mode & 01777, path end else - File.chmod st.mode, path + if st.symlink? + begin + File.lchmod st.mode, path + rescue NotImplementedError + end + else + File.chmod st.mode, path + end end end end -- cgit v1.2.1 From fb7e3f79ca1e95edcfb20353a385cac4a1c3c229 Mon Sep 17 00:00:00 2001 From: sersut Date: Tue, 4 Dec 2012 15:11:42 -0800 Subject: Disable link tests on Windows Server 2003 since symlink is not yet supported on this platform. --- chef/spec/functional/resource/link_spec.rb | 2 +- chef/spec/spec_helper.rb | 1 + chef/spec/support/platform_helpers.rb | 8 ++++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/chef/spec/functional/resource/link_spec.rb b/chef/spec/functional/resource/link_spec.rb index b80dc72d49..39be3d58d9 100644 --- a/chef/spec/functional/resource/link_spec.rb +++ b/chef/spec/functional/resource/link_spec.rb @@ -22,7 +22,7 @@ if windows? require 'chef/win32/file' #probably need this in spec_helper end -describe Chef::Resource::Link do +describe Chef::Resource::Link, :not_supported_on_win2k3 do let(:file_base) { "file_spec" } let(:base_dir) do diff --git a/chef/spec/spec_helper.rb b/chef/spec/spec_helper.rb index 3611297aa6..8b69439bee 100644 --- a/chef/spec/spec_helper.rb +++ b/chef/spec/spec_helper.rb @@ -66,6 +66,7 @@ RSpec.configure do |config| # Add jruby filters here config.filter_run_excluding :windows_only => true unless windows? + config.filter_run_excluding :not_supported_on_win2k3 => true if windows_win2k3? config.filter_run_excluding :unix_only => true unless unix? config.filter_run_excluding :ruby_18_only => true unless ruby_18? config.filter_run_excluding :ruby_19_only => true unless ruby_19? diff --git a/chef/spec/support/platform_helpers.rb b/chef/spec/support/platform_helpers.rb index 558817d72a..fcb825319c 100644 --- a/chef/spec/support/platform_helpers.rb +++ b/chef/spec/support/platform_helpers.rb @@ -10,6 +10,14 @@ def windows? !!(RUBY_PLATFORM =~ /mswin|mingw|windows/) end +def windows_win2k3? + return false unless windows? + require 'ruby-wmi' + + host = WMI::Win32_OperatingSystem.find(:first) + (host.version && host.version.start_with?("5.2")) +end + # def jruby? def unix? -- cgit v1.2.1 From 2df61cb94bd4f53b049644990fd96981544c2aad Mon Sep 17 00:00:00 2001 From: sersut Date: Tue, 4 Dec 2012 15:47:20 -0800 Subject: Marking more tests not to run on Win2k3 --- chef/spec/unit/provider/link_spec.rb | 2 +- chef/spec/unit/provider/remote_directory_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chef/spec/unit/provider/link_spec.rb b/chef/spec/unit/provider/link_spec.rb index bb3f01abbe..171e21171c 100644 --- a/chef/spec/unit/provider/link_spec.rb +++ b/chef/spec/unit/provider/link_spec.rb @@ -25,7 +25,7 @@ if Chef::Platform.windows? require 'chef/win32/file' #probably need this in spec_helper end -describe Chef::Resource::Link do +describe Chef::Resource::Link, :not_supported_on_win2k3 do let(:provider) do node = Chef::Node.new @events = Chef::EventDispatch::Dispatcher.new diff --git a/chef/spec/unit/provider/remote_directory_spec.rb b/chef/spec/unit/provider/remote_directory_spec.rb index 444d7584e8..821349e524 100644 --- a/chef/spec/unit/provider/remote_directory_spec.rb +++ b/chef/spec/unit/provider/remote_directory_spec.rb @@ -177,7 +177,7 @@ describe Chef::Provider::RemoteDirectory do ::File.exist?(@destination_dir + '/a/multiply/nested/directory/qux.txt').should be_false end - it "removes directory symlinks properly" do + it "removes directory symlinks properly", :not_supported_on_win2k3 do symlinked_dir_path = @destination_dir + '/symlinked_dir' @provider.action = :create @provider.run_action -- cgit v1.2.1 From c5a65b60a4cc54c9b9a1a06166aded07c38b5439 Mon Sep 17 00:00:00 2001 From: sersut Date: Thu, 6 Dec 2012 09:35:36 -0800 Subject: Fix directory_spec on Windows. --- chef/spec/unit/provider/directory_spec.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/chef/spec/unit/provider/directory_spec.rb b/chef/spec/unit/provider/directory_spec.rb index 5118d086fc..835be07bd6 100644 --- a/chef/spec/unit/provider/directory_spec.rb +++ b/chef/spec/unit/provider/directory_spec.rb @@ -19,13 +19,16 @@ require 'ostruct' require 'spec_helper' +require 'tmpdir' describe Chef::Provider::Directory do before(:each) do - @new_resource = Chef::Resource::Directory.new('/tmp') - @new_resource.owner(500) - @new_resource.group(500) - @new_resource.mode(0644) + @new_resource = Chef::Resource::Directory.new(Dir.tmpdir) + if !windows? + @new_resource.owner(500) + @new_resource.group(500) + @new_resource.mode(0644) + end @node = Chef::Node.new @events = Chef::EventDispatch::Dispatcher.new @run_context = Chef::RunContext.new(@node, {}, @events) -- cgit v1.2.1 From 11b1f5b684f4e8e9e319650386fa97cd922276c7 Mon Sep 17 00:00:00 2001 From: sdelano Date: Thu, 6 Dec 2012 11:21:34 -0800 Subject: use Dir.tmpdir for remote_directory spec tests --- chef/spec/unit/provider/remote_directory_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chef/spec/unit/provider/remote_directory_spec.rb b/chef/spec/unit/provider/remote_directory_spec.rb index 821349e524..692a169fab 100644 --- a/chef/spec/unit/provider/remote_directory_spec.rb +++ b/chef/spec/unit/provider/remote_directory_spec.rb @@ -32,7 +32,7 @@ describe Chef::Provider::RemoteDirectory do #to not have this line. Only affects updating state fields. Chef::Provider::CookbookFile.any_instance.stub(:update_new_file_state) - @resource = Chef::Resource::RemoteDirectory.new("/tmp/tafty") + @resource = Chef::Resource::RemoteDirectory.new(File.join("tafty", Dir.tmpdir)) # in CHEF_SPEC_DATA/cookbooks/openldap/files/default/remotedir @resource.source "remotedir" @resource.cookbook('openldap') @@ -79,8 +79,8 @@ describe Chef::Provider::RemoteDirectory do end it "configures access control on intermediate directorys" do - directory_resource = @provider.send(:resource_for_directory, "/tmp/intermediate_dir") - directory_resource.path.should == "/tmp/intermediate_dir" + directory_resource = @provider.send(:resource_for_directory, File.join("intermediate_dir", Dir.tmpdir)) + directory_resource.path.should == File.join("intermediate_dir", Dir.tmpdir) directory_resource.mode.should == "0750" directory_resource.group.should == "wheel" directory_resource.owner.should == "root" -- cgit v1.2.1 From f351f91238f0be10fb96e6e8f4716e36025c85e7 Mon Sep 17 00:00:00 2001 From: sdelano Date: Thu, 6 Dec 2012 11:54:00 -0800 Subject: swap arguments on File.join --- chef/spec/unit/provider/remote_directory_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chef/spec/unit/provider/remote_directory_spec.rb b/chef/spec/unit/provider/remote_directory_spec.rb index 692a169fab..78af31dbbe 100644 --- a/chef/spec/unit/provider/remote_directory_spec.rb +++ b/chef/spec/unit/provider/remote_directory_spec.rb @@ -32,7 +32,7 @@ describe Chef::Provider::RemoteDirectory do #to not have this line. Only affects updating state fields. Chef::Provider::CookbookFile.any_instance.stub(:update_new_file_state) - @resource = Chef::Resource::RemoteDirectory.new(File.join("tafty", Dir.tmpdir)) + @resource = Chef::Resource::RemoteDirectory.new(File.join(Dir.tmpdir, "tafty")) # in CHEF_SPEC_DATA/cookbooks/openldap/files/default/remotedir @resource.source "remotedir" @resource.cookbook('openldap') @@ -79,8 +79,8 @@ describe Chef::Provider::RemoteDirectory do end it "configures access control on intermediate directorys" do - directory_resource = @provider.send(:resource_for_directory, File.join("intermediate_dir", Dir.tmpdir)) - directory_resource.path.should == File.join("intermediate_dir", Dir.tmpdir) + directory_resource = @provider.send(:resource_for_directory, File.join(Dir.tmpdir, "intermediate_dir")) + directory_resource.path.should == File.join(Dir.tmpdir, "intermediate_dir") directory_resource.mode.should == "0750" directory_resource.group.should == "wheel" directory_resource.owner.should == "root" -- cgit v1.2.1 From eac005439bed8731f96776c03ddb0d746dfa17be Mon Sep 17 00:00:00 2001 From: Bryan McLellan Date: Tue, 11 Dec 2012 13:17:57 -0800 Subject: CHEF-3619: fix obsolete require of 'rake/rdoctask' H/T: Adam Spiers --- chef-expander/Rakefile | 2 +- chef/Rakefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chef-expander/Rakefile b/chef-expander/Rakefile index c8c772ed39..71903878e4 100644 --- a/chef-expander/Rakefile +++ b/chef-expander/Rakefile @@ -19,7 +19,7 @@ $: << File.dirname(__FILE__) require 'lib/chef/expander/version' require 'rake/gempackagetask' -require 'rake/rdoctask' +require 'rdoc/task' require '../chef/tasks/rspec.rb' spec = eval(File.read("chef-expander.gemspec")) diff --git a/chef/Rakefile b/chef/Rakefile index 4340493908..b227bd3e7a 100644 --- a/chef/Rakefile +++ b/chef/Rakefile @@ -21,7 +21,7 @@ require File.dirname(__FILE__) + '/lib/chef/version' require 'rubygems' require 'rubygems/package_task' -require 'rake/rdoctask' +require 'rdoc/task' require './tasks/rspec.rb' GEM_NAME = "chef" -- cgit v1.2.1 From ceaa50b6840c414d1c7d967085c7d7d59f218aca Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Thu, 10 Jan 2013 11:46:58 -0800 Subject: update extlib to at least 0.9.16 --- chef-server-api/chef-server-api.gemspec | 1 + chef-server-webui/chef-server-webui.gemspec | 2 ++ 2 files changed, 3 insertions(+) diff --git a/chef-server-api/chef-server-api.gemspec b/chef-server-api/chef-server-api.gemspec index a10556559c..8d37ac6ef6 100644 --- a/chef-server-api/chef-server-api.gemspec +++ b/chef-server-api/chef-server-api.gemspec @@ -12,6 +12,7 @@ Gem::Specification.new do |s| s.email = "chef@opscode.com" s.homepage = "http://wiki.opscode.com/display/chef" + a.add_dependency "extlib", "~> 0.9.16" s.add_dependency "merb-core", "~> 1.1.0" s.add_dependency "merb-assets", "~> 1.1.0" s.add_dependency "merb-helpers", "~> 1.1.0" diff --git a/chef-server-webui/chef-server-webui.gemspec b/chef-server-webui/chef-server-webui.gemspec index 00ad7602bf..87dba1462a 100644 --- a/chef-server-webui/chef-server-webui.gemspec +++ b/chef-server-webui/chef-server-webui.gemspec @@ -12,6 +12,8 @@ Gem::Specification.new do |s| s.email = "chef@opscode.com" s.homepage = "http://wiki.opscode.com/display/chef" + a.add_dependency "extlib", "~> 0.9.16" + s.add_dependency "merb-core", "~> 1.1.0" s.add_dependency "merb-assets", "~> 1.1.0" s.add_dependency "merb-helpers", "~> 1.1.0" -- cgit v1.2.1 From 9bf0f8f91e9051c5ed8fe8874858f7e14ee0fba7 Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Thu, 10 Jan 2013 13:37:16 -0800 Subject: Fix local variable usage in gemspecs --- chef-server-api/chef-server-api.gemspec | 2 +- chef-server-webui/chef-server-webui.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chef-server-api/chef-server-api.gemspec b/chef-server-api/chef-server-api.gemspec index 8d37ac6ef6..d9c8ea1a10 100644 --- a/chef-server-api/chef-server-api.gemspec +++ b/chef-server-api/chef-server-api.gemspec @@ -12,7 +12,7 @@ Gem::Specification.new do |s| s.email = "chef@opscode.com" s.homepage = "http://wiki.opscode.com/display/chef" - a.add_dependency "extlib", "~> 0.9.16" + s.add_dependency "extlib", "~> 0.9.16" s.add_dependency "merb-core", "~> 1.1.0" s.add_dependency "merb-assets", "~> 1.1.0" s.add_dependency "merb-helpers", "~> 1.1.0" diff --git a/chef-server-webui/chef-server-webui.gemspec b/chef-server-webui/chef-server-webui.gemspec index 87dba1462a..2f0d6d2cbe 100644 --- a/chef-server-webui/chef-server-webui.gemspec +++ b/chef-server-webui/chef-server-webui.gemspec @@ -12,7 +12,7 @@ Gem::Specification.new do |s| s.email = "chef@opscode.com" s.homepage = "http://wiki.opscode.com/display/chef" - a.add_dependency "extlib", "~> 0.9.16" + s.add_dependency "extlib", "~> 0.9.16" s.add_dependency "merb-core", "~> 1.1.0" s.add_dependency "merb-assets", "~> 1.1.0" -- cgit v1.2.1 From 9a87fed77e0b7c53a3f4d92db0a994d3cb49988b Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Fri, 11 Jan 2013 13:46:06 -0800 Subject: back porting 841a8c363e1073f0509586ba917bf61d9af171e6 from master --- chef/spec/tiny_server.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chef/spec/tiny_server.rb b/chef/spec/tiny_server.rb index ba75cd57c1..9eecf13cec 100644 --- a/chef/spec/tiny_server.rb +++ b/chef/spec/tiny_server.rb @@ -77,11 +77,11 @@ module TinyServer def block_until_started 200.times do - if started? - raise "ivar weirdness" if @server.nil? + if started? && !@server.nil? return true end end + raise "ivar weirdness" if started? && @server.nil? raise "TinyServer failed to boot :/" end -- cgit v1.2.1 From 03094aee7f2e6ab7ad806a36c9573d20e2d173d7 Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Thu, 10 Jan 2013 13:41:46 -0800 Subject: switch to rubygems/package_task --- chef-expander/Rakefile | 4 ++-- chef-server-api/Rakefile | 6 +++--- chef-server-webui/Rakefile | 6 +++--- chef-server/Rakefile | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/chef-expander/Rakefile b/chef-expander/Rakefile index 71903878e4..9fb8fb1810 100644 --- a/chef-expander/Rakefile +++ b/chef-expander/Rakefile @@ -18,13 +18,13 @@ $: << File.dirname(__FILE__) require 'lib/chef/expander/version' -require 'rake/gempackagetask' +require 'rubygems/package_task' require 'rdoc/task' require '../chef/tasks/rspec.rb' spec = eval(File.read("chef-expander.gemspec")) -Rake::GemPackageTask.new(spec) do |pkg| +Gem::PackageTask.new(spec) do |pkg| pkg.gem_spec = spec end diff --git a/chef-server-api/Rakefile b/chef-server-api/Rakefile index 73f846978d..3f6607f736 100644 --- a/chef-server-api/Rakefile +++ b/chef-server-api/Rakefile @@ -1,7 +1,7 @@ require File.dirname(__FILE__) + '/lib/chef-server-api/version' require 'rubygems' -require 'rake/gempackagetask' +require 'rubygems/package_task' begin require 'merb-core' @@ -12,9 +12,9 @@ end GEM_NAME = "chef-server-api" -spec = eval(File.read("chef-server-api.gemspec")) +spec = eval(File.read("chef-server-api.gemspec"), nil, "chef-server-api.gemspec", 1) -Rake::GemPackageTask.new(spec) do |pkg| +Gem::PackageTask.new(spec) do |pkg| pkg.gem_spec = spec end diff --git a/chef-server-webui/Rakefile b/chef-server-webui/Rakefile index 2c4b6d458c..c7643aaf5a 100644 --- a/chef-server-webui/Rakefile +++ b/chef-server-webui/Rakefile @@ -1,7 +1,7 @@ require File.dirname(__FILE__) + '/lib/chef-server-webui/version' require 'rubygems' -require 'rake/gempackagetask' +require 'rubygems/package_task' begin require 'merb-core' @@ -18,7 +18,7 @@ SUMMARY = "A systems integration framework, built to bring the benefits of confi spec = eval(File.read("chef-server-webui.gemspec")) -Rake::GemPackageTask.new(spec) do |pkg| +Gem::PackageTask.new(spec) do |pkg| pkg.gem_spec = spec end @@ -48,4 +48,4 @@ task :new_mockup, :name do |t, args| src = "mockups/base-mockup/." dest = "mockups/#{args[:name]}" FileUtils.cp_r src, dest -end \ No newline at end of file +end diff --git a/chef-server/Rakefile b/chef-server/Rakefile index fb3100269a..c46c4ca96d 100644 --- a/chef-server/Rakefile +++ b/chef-server/Rakefile @@ -17,7 +17,7 @@ # require File.dirname(__FILE__) + '/lib/chef-server/version' -require 'rake/gempackagetask' +require 'rubygems/package_task' GEM_NAME = "chef-server" @@ -33,6 +33,6 @@ task :uninstall do sh %{gem uninstall #{GEM_NAME} -x -v #{ChefServer::VERSION} } end -Rake::GemPackageTask.new(spec) do |pkg| +Gem::PackageTask.new(spec) do |pkg| pkg.gem_spec = spec end -- cgit v1.2.1 From 86fe340d6c109c87227328a387c5bc728030a0a8 Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Fri, 11 Jan 2013 14:45:11 -0800 Subject: bump to 10.18.0 RC 2 Patches from 10.16.6 and a few other minor changes added. --- chef-expander/lib/chef/expander/version.rb | 2 +- chef-server-api/lib/chef-server-api/version.rb | 2 +- chef-server-webui/lib/chef-server-webui/version.rb | 2 +- chef-server/lib/chef-server/version.rb | 2 +- chef-solr/lib/chef/solr/version.rb | 2 +- chef/lib/chef/version.rb | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/chef-expander/lib/chef/expander/version.rb b/chef-expander/lib/chef/expander/version.rb index 66d08aa4f6..ec3ed5fd44 100644 --- a/chef-expander/lib/chef/expander/version.rb +++ b/chef-expander/lib/chef/expander/version.rb @@ -23,7 +23,7 @@ require 'open3' module Chef module Expander - VERSION = "10.18.0.rc.1" + VERSION = "10.18.0.rc.2" def self.version @rev ||= begin diff --git a/chef-server-api/lib/chef-server-api/version.rb b/chef-server-api/lib/chef-server-api/version.rb index ef458a6430..61601d8fe1 100644 --- a/chef-server-api/lib/chef-server-api/version.rb +++ b/chef-server-api/lib/chef-server-api/version.rb @@ -1,3 +1,3 @@ module ChefServerApi - VERSION = '10.18.0.rc.1' + VERSION = '10.18.0.rc.2' end diff --git a/chef-server-webui/lib/chef-server-webui/version.rb b/chef-server-webui/lib/chef-server-webui/version.rb index 2d77a738dd..a66dc9727c 100644 --- a/chef-server-webui/lib/chef-server-webui/version.rb +++ b/chef-server-webui/lib/chef-server-webui/version.rb @@ -1,3 +1,3 @@ module ChefServerWebui - VERSION = '10.18.0.rc.1' + VERSION = '10.18.0.rc.2' end diff --git a/chef-server/lib/chef-server/version.rb b/chef-server/lib/chef-server/version.rb index 8f307d1e5c..6afaa482ba 100644 --- a/chef-server/lib/chef-server/version.rb +++ b/chef-server/lib/chef-server/version.rb @@ -17,5 +17,5 @@ # module ChefServer - VERSION = '10.18.0.rc.1' + VERSION = '10.18.0.rc.2' end diff --git a/chef-solr/lib/chef/solr/version.rb b/chef-solr/lib/chef/solr/version.rb index 03bc7e7358..defc04a396 100644 --- a/chef-solr/lib/chef/solr/version.rb +++ b/chef-solr/lib/chef/solr/version.rb @@ -1,6 +1,6 @@ class Chef class Solr - VERSION = '10.18.0.rc.1' + VERSION = '10.18.0.rc.2' # Solr Schema. Used to detect incompatibilities between installed solr and # chef-solr versions. diff --git a/chef/lib/chef/version.rb b/chef/lib/chef/version.rb index 69be760068..f775da1706 100644 --- a/chef/lib/chef/version.rb +++ b/chef/lib/chef/version.rb @@ -17,7 +17,7 @@ class Chef CHEF_ROOT = File.dirname(File.expand_path(File.dirname(__FILE__))) - VERSION = '10.18.0.rc.1' + VERSION = '10.18.0.rc.2' end # NOTE: the Chef::Version class is defined in version_class.rb -- cgit v1.2.1 From 57626fdff12cb4f03def2f9be5ffbbc5159fb33d Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Fri, 11 Jan 2013 14:47:09 -0800 Subject: regen manpages --- chef/distro/common/html/chef-client.8.html | 8 ++++---- chef/distro/common/html/chef-expander.8.html | 8 ++++---- chef/distro/common/html/chef-expanderctl.8.html | 8 ++++---- chef/distro/common/html/chef-server-webui.8.html | 8 ++++---- chef/distro/common/html/chef-server.8.html | 8 ++++---- chef/distro/common/html/chef-solo.8.html | 8 ++++---- chef/distro/common/html/chef-solr.8.html | 8 ++++---- chef/distro/common/html/knife-bootstrap.1.html | 10 +++++----- chef/distro/common/html/knife-client.1.html | 10 +++++----- chef/distro/common/html/knife-configure.1.html | 8 ++++---- chef/distro/common/html/knife-cookbook-site.1.html | 14 +++++++------- chef/distro/common/html/knife-cookbook.1.html | 8 ++++---- chef/distro/common/html/knife-data-bag.1.html | 8 ++++---- chef/distro/common/html/knife-environment.1.html | 8 ++++---- chef/distro/common/html/knife-exec.1.html | 8 ++++---- chef/distro/common/html/knife-index.1.html | 10 +++++----- chef/distro/common/html/knife-node.1.html | 10 +++++----- chef/distro/common/html/knife-role.1.html | 8 ++++---- chef/distro/common/html/knife-search.1.html | 8 ++++---- chef/distro/common/html/knife-ssh.1.html | 10 +++++----- chef/distro/common/html/knife-status.1.html | 8 ++++---- chef/distro/common/html/knife-tag.1.html | 10 +++++----- chef/distro/common/html/knife.1.html | 8 ++++---- chef/distro/common/html/shef.1.html | 16 ++++++++-------- chef/distro/common/man/man1/knife-bootstrap.1 | 2 +- chef/distro/common/man/man1/knife-client.1 | 2 +- chef/distro/common/man/man1/knife-configure.1 | 2 +- chef/distro/common/man/man1/knife-cookbook-site.1 | 2 +- chef/distro/common/man/man1/knife-cookbook.1 | 2 +- chef/distro/common/man/man1/knife-data-bag.1 | 2 +- chef/distro/common/man/man1/knife-environment.1 | 2 +- chef/distro/common/man/man1/knife-exec.1 | 2 +- chef/distro/common/man/man1/knife-index.1 | 2 +- chef/distro/common/man/man1/knife-node.1 | 2 +- chef/distro/common/man/man1/knife-role.1 | 2 +- chef/distro/common/man/man1/knife-search.1 | 2 +- chef/distro/common/man/man1/knife-ssh.1 | 2 +- chef/distro/common/man/man1/knife-status.1 | 2 +- chef/distro/common/man/man1/knife-tag.1 | 2 +- chef/distro/common/man/man1/knife.1 | 2 +- chef/distro/common/man/man1/shef.1 | 2 +- chef/distro/common/man/man8/chef-client.8 | 2 +- chef/distro/common/man/man8/chef-expander.8 | 2 +- chef/distro/common/man/man8/chef-expanderctl.8 | 2 +- chef/distro/common/man/man8/chef-server-webui.8 | 2 +- chef/distro/common/man/man8/chef-server.8 | 2 +- chef/distro/common/man/man8/chef-solo.8 | 2 +- chef/distro/common/man/man8/chef-solr.8 | 2 +- 48 files changed, 133 insertions(+), 133 deletions(-) diff --git a/chef/distro/common/html/chef-client.8.html b/chef/distro/common/html/chef-client.8.html index c2b1daff47..1103e47196 100644 --- a/chef/distro/common/html/chef-client.8.html +++ b/chef/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,8 +135,8 @@ found in /usr/share/common-licenses/Apache-2.0.

    -
  1. Chef 10.16.0.rc.1
  2. -
  3. October 2012
  4. +
  5. Chef 10.18.0.rc.2
  6. +
  7. January 2013
  8. chef-client(8)
diff --git a/chef/distro/common/html/chef-expander.8.html b/chef/distro/common/html/chef-expander.8.html index 2d5c616871..016e38c8c1 100644 --- a/chef/distro/common/html/chef-expander.8.html +++ b/chef/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,8 +154,8 @@ found in /usr/share/common-licenses/Apache-2.0.

    -
  1. Chef 10.16.0.rc.1
  2. -
  3. October 2012
  4. +
  5. Chef 10.18.0.rc.2
  6. +
  7. January 2013
  8. chef-expander(8)
diff --git a/chef/distro/common/html/chef-expanderctl.8.html b/chef/distro/common/html/chef-expanderctl.8.html index b7abb1f8c1..f789172fdd 100644 --- a/chef/distro/common/html/chef-expanderctl.8.html +++ b/chef/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,8 +136,8 @@ found in /usr/share/common-licenses/Apache-2.0.

    -
  1. Chef 10.16.0.rc.1
  2. -
  3. October 2012
  4. +
  5. Chef 10.18.0.rc.2
  6. +
  7. January 2013
  8. chef-expanderctl(8)
diff --git a/chef/distro/common/html/chef-server-webui.8.html b/chef/distro/common/html/chef-server-webui.8.html index 4d30c589b6..c45a5d66bc 100644 --- a/chef/distro/common/html/chef-server-webui.8.html +++ b/chef/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,8 +175,8 @@ found in /usr/share/common-licenses/Apache-2.0.

    -
  1. Chef 10.16.0.rc.1
  2. -
  3. October 2012
  4. +
  5. Chef 10.18.0.rc.2
  6. +
  7. January 2013
  8. chef-server-webui(8)
diff --git a/chef/distro/common/html/chef-server.8.html b/chef/distro/common/html/chef-server.8.html index eb9a63bad3..5c91331d36 100644 --- a/chef/distro/common/html/chef-server.8.html +++ b/chef/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,8 +172,8 @@ found in /usr/share/common-licenses/Apache-2.0.

    -
  1. Chef 10.16.0.rc.1
  2. -
  3. October 2012
  4. +
  5. Chef 10.18.0.rc.2
  6. +
  7. January 2013
  8. chef-server(8)
diff --git a/chef/distro/common/html/chef-solo.8.html b/chef/distro/common/html/chef-solo.8.html index 267d1775e6..188218ab48 100644 --- a/chef/distro/common/html/chef-solo.8.html +++ b/chef/distro/common/html/chef-solo.8.html @@ -170,9 +170,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.

@@ -181,8 +181,8 @@ found in /usr/share/common-licenses/Apache-2.0.

    -
  1. Chef 10.16.0.rc.1
  2. -
  3. October 2012
  4. +
  5. Chef 10.18.0.rc.2
  6. +
  7. January 2013
  8. chef-solo(8)
diff --git a/chef/distro/common/html/chef-solr.8.html b/chef/distro/common/html/chef-solr.8.html index 0d9ecdfd2a..789dee5390 100644 --- a/chef/distro/common/html/chef-solr.8.html +++ b/chef/distro/common/html/chef-solr.8.html @@ -144,9 +144,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.

@@ -155,8 +155,8 @@ found in /usr/share/common-licenses/Apache-2.0.

    -
  1. Chef 10.16.0.rc.1
  2. -
  3. October 2012
  4. +
  5. Chef 10.18.0.rc.2
  6. +
  7. January 2013
  8. chef-solr(8)
diff --git a/chef/distro/common/html/knife-bootstrap.1.html b/chef/distro/common/html/knife-bootstrap.1.html index ada2b0da4c..292de1d5bd 100644 --- a/chef/distro/common/html/knife-bootstrap.1.html +++ b/chef/distro/common/html/knife-bootstrap.1.html @@ -218,21 +218,21 @@ to other users via the process list using tools such as ps

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

-

Knife is distributed with Chef. http://wiki.opscode.com/display/chef/Home

+

Knife is distributed with Chef. http://wiki.opscode.com/display/chef/Home

    -
  1. Chef 10.16.0.rc.1
  2. -
  3. October 2012
  4. +
  5. Chef 10.18.0.rc.2
  6. +
  7. January 2013
  8. knife-bootstrap(1)
diff --git a/chef/distro/common/html/knife-client.1.html b/chef/distro/common/html/knife-client.1.html index 2501408517..d41fbfb5d7 100644 --- a/chef/distro/common/html/knife-client.1.html +++ b/chef/distro/common/html/knife-client.1.html @@ -196,21 +196,21 @@ setting up a host for management with Chef.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

-

Knife is distributed with Chef. http://wiki.opscode.com/display/chef/Home

+

Knife is distributed with Chef. http://wiki.opscode.com/display/chef/Home

    -
  1. Chef 10.16.0.rc.1
  2. -
  3. October 2012
  4. +
  5. Chef 10.18.0.rc.2
  6. +
  7. January 2013
  8. knife-client(1)
diff --git a/chef/distro/common/html/knife-configure.1.html b/chef/distro/common/html/knife-configure.1.html index 3f0cc7e129..9461f2afd4 100644 --- a/chef/distro/common/html/knife-configure.1.html +++ b/chef/distro/common/html/knife-configure.1.html @@ -147,11 +147,11 @@ may need to modify that setting after copying to a remote host.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -160,8 +160,8 @@ may need to modify that setting after copying to a remote host.

    -
  1. Chef 10.16.0.rc.1
  2. -
  3. October 2012
  4. +
  5. Chef 10.18.0.rc.2
  6. +
  7. January 2013
  8. knife-configure(1)
diff --git a/chef/distro/common/html/knife-cookbook-site.1.html b/chef/distro/common/html/knife-cookbook-site.1.html index 17f128e0a7..6e7a0f6a76 100644 --- a/chef/distro/common/html/knife-cookbook-site.1.html +++ b/chef/distro/common/html/knife-cookbook-site.1.html @@ -192,7 +192,7 @@ configuration file.

DESCRIPTION

-

The cookbook site, http://community.opscode.com/, is a cookbook +

The cookbook site, http://community.opscode.com/, is a cookbook distribution service operated by Opscode. This service provides users with a central location to publish cookbooks for sharing with other community members.

@@ -214,25 +214,25 @@ configuration file.

SEE ALSO

knife-cookbook(1) - http://community.opscode.com/cookbooks

+ http://community.opscode.com/cookbooks

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

-

Knife is distributed with Chef. http://wiki.opscode.com/display/chef/Home

+

Knife is distributed with Chef. http://wiki.opscode.com/display/chef/Home

    -
  1. Chef 10.16.0.rc.1
  2. -
  3. October 2012
  4. +
  5. Chef 10.18.0.rc.2
  6. +
  7. January 2013
  8. knife-cookbook-site(1)
diff --git a/chef/distro/common/html/knife-cookbook.1.html b/chef/distro/common/html/knife-cookbook.1.html index 44978911c7..19a8d11265 100644 --- a/chef/distro/common/html/knife-cookbook.1.html +++ b/chef/distro/common/html/knife-cookbook.1.html @@ -361,11 +361,11 @@ cookbook.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -374,8 +374,8 @@ cookbook.

    -
  1. Chef 10.16.0.rc.1
  2. -
  3. October 2012
  4. +
  5. Chef 10.18.0.rc.2
  6. +
  7. January 2013
  8. knife-cookbook(1)
diff --git a/chef/distro/common/html/knife-data-bag.1.html b/chef/distro/common/html/knife-data-bag.1.html index b9cce7c364..d2a3f37292 100644 --- a/chef/distro/common/html/knife-data-bag.1.html +++ b/chef/distro/common/html/knife-data-bag.1.html @@ -215,11 +215,11 @@ encryption keys.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -228,8 +228,8 @@ encryption keys.

    -
  1. Chef 10.16.0.rc.1
  2. -
  3. October 2012
  4. +
  5. Chef 10.18.0.rc.2
  6. +
  7. January 2013
  8. knife-data-bag(1)
diff --git a/chef/distro/common/html/knife-environment.1.html b/chef/distro/common/html/knife-environment.1.html index 7fe006a3f6..015ef67c4e 100644 --- a/chef/distro/common/html/knife-environment.1.html +++ b/chef/distro/common/html/knife-environment.1.html @@ -244,11 +244,11 @@ override_attributes "aws_s3_bucket" => "production"

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

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.

CHEF

@@ -257,8 +257,8 @@ override_attributes "aws_s3_bucket" => "production"
    -
  1. Chef 10.16.0.rc.1
  2. -
  3. October 2012
  4. +
  5. Chef 10.18.0.rc.2
  6. +
  7. January 2013
  8. knife-environment(1)
diff --git a/chef/distro/common/html/knife-exec.1.html b/chef/distro/common/html/knife-exec.1.html index 257712220a..4833434690 100644 --- a/chef/distro/common/html/knife-exec.1.html +++ b/chef/distro/common/html/knife-exec.1.html @@ -111,11 +111,11 @@ commands available.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -124,8 +124,8 @@ commands available.

    -
  1. Chef 10.16.0.rc.1
  2. -
  3. October 2012
  4. +
  5. Chef 10.18.0.rc.2
  6. +
  7. January 2013
  8. knife-exec(1)
diff --git a/chef/distro/common/html/knife-index.1.html b/chef/distro/common/html/knife-index.1.html index c0c80d917b..24debbb0c0 100644 --- a/chef/distro/common/html/knife-index.1.html +++ b/chef/distro/common/html/knife-index.1.html @@ -102,21 +102,21 @@ time for all objects to be indexed and available for search.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

-

Knife is distributed with Chef. http://wiki.opscode.com/display/chef/Home

+

Knife is distributed with Chef. http://wiki.opscode.com/display/chef/Home

    -
  1. Chef 10.16.0.rc.1
  2. -
  3. October 2012
  4. +
  5. Chef 10.18.0.rc.2
  6. +
  7. January 2013
  8. knife-index(1)
diff --git a/chef/distro/common/html/knife-node.1.html b/chef/distro/common/html/knife-node.1.html index f0110de21a..0d51233de4 100644 --- a/chef/distro/common/html/knife-node.1.html +++ b/chef/distro/common/html/knife-node.1.html @@ -227,21 +227,21 @@ run list, the correct syntax is "role[ROLE_NAME]"

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

-

Knife is distributed with Chef. http://wiki.opscode.com/display/chef/Home

+

Knife is distributed with Chef. http://wiki.opscode.com/display/chef/Home

    -
  1. Chef 10.16.0.rc.1
  2. -
  3. October 2012
  4. +
  5. Chef 10.18.0.rc.2
  6. +
  7. January 2013
  8. knife-node(1)
diff --git a/chef/distro/common/html/knife-role.1.html b/chef/distro/common/html/knife-role.1.html index efc35457c2..4ebc5d543d 100644 --- a/chef/distro/common/html/knife-role.1.html +++ b/chef/distro/common/html/knife-role.1.html @@ -177,11 +177,11 @@ run_list.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -190,8 +190,8 @@ run_list.

    -
  1. Chef 10.16.0.rc.1
  2. -
  3. October 2012
  4. +
  5. Chef 10.18.0.rc.2
  6. +
  7. January 2013
  8. knife-role(1)
diff --git a/chef/distro/common/html/knife-search.1.html b/chef/distro/common/html/knife-search.1.html index 1a2aeb37b9..b171ea112a 100644 --- a/chef/distro/common/html/knife-search.1.html +++ b/chef/distro/common/html/knife-search.1.html @@ -265,11 +265,11 @@ www.example.com:

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -278,8 +278,8 @@ www.example.com:

    -
  1. Chef 10.16.0.rc.1
  2. -
  3. October 2012
  4. +
  5. Chef 10.18.0.rc.2
  6. +
  7. January 2013
  8. knife-search(1)
diff --git a/chef/distro/common/html/knife-ssh.1.html b/chef/distro/common/html/knife-ssh.1.html index a1fec75527..bb3adca136 100644 --- a/chef/distro/common/html/knife-ssh.1.html +++ b/chef/distro/common/html/knife-ssh.1.html @@ -133,21 +133,21 @@ option.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

-

Knife is distributed with Chef. http://wiki.opscode.com/display/chef/Home

+

Knife is distributed with Chef. http://wiki.opscode.com/display/chef/Home

    -
  1. Chef 10.16.0.rc.1
  2. -
  3. October 2012
  4. +
  5. Chef 10.18.0.rc.2
  6. +
  7. January 2013
  8. knife-ssh(1)
diff --git a/chef/distro/common/html/knife-status.1.html b/chef/distro/common/html/knife-status.1.html index e621df0e62..4b58a6aa32 100644 --- a/chef/distro/common/html/knife-status.1.html +++ b/chef/distro/common/html/knife-status.1.html @@ -105,11 +105,11 @@ may not be publicly reachable.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -118,8 +118,8 @@ may not be publicly reachable.

    -
  1. Chef 10.16.0.rc.1
  2. -
  3. October 2012
  4. +
  5. Chef 10.18.0.rc.2
  6. +
  7. January 2013
  8. knife-status(1)
diff --git a/chef/distro/common/html/knife-tag.1.html b/chef/distro/common/html/knife-tag.1.html index 2ab55e04b0..915d2413bf 100644 --- a/chef/distro/common/html/knife-tag.1.html +++ b/chef/distro/common/html/knife-tag.1.html @@ -114,21 +114,21 @@

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

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.

CHEF

-

Knife is distributed with Chef. http://wiki.opscode.com/display/chef/Home

+

Knife is distributed with Chef. http://wiki.opscode.com/display/chef/Home

    -
  1. Chef 10.16.0.rc.1
  2. -
  3. October 2012
  4. +
  5. Chef 10.18.0.rc.2
  6. +
  7. January 2013
  8. knife-tag(1)
diff --git a/chef/distro/common/html/knife.1.html b/chef/distro/common/html/knife.1.html index 402503b835..14ca516233 100644 --- a/chef/distro/common/html/knife.1.html +++ b/chef/distro/common/html/knife.1.html @@ -291,12 +291,12 @@ data editing entirely.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com of Opscode +

Chef was written by Adam Jacob adam@opscode.com of Opscode (http://www.opscode.com), with contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com.

+

This manual page was written by Joshua Timberman joshua@opscode.com.

LICENSE

@@ -310,8 +310,8 @@ data editing entirely.
    -
  1. Chef 10.16.0.rc.1
  2. -
  3. October 2012
  4. +
  5. Chef 10.18.0.rc.2
  6. +
  7. January 2013
  8. knife(1)
diff --git a/chef/distro/common/html/shef.1.html b/chef/distro/common/html/shef.1.html index 614445947d..1140532c0e 100644 --- a/chef/distro/common/html/shef.1.html +++ b/chef/distro/common/html/shef.1.html @@ -205,8 +205,8 @@ DSL is outside the scope of this document. See the following pages in the Chef documentation for more information:

@@ -254,27 +254,27 @@ and may become out of sync with the behavior of those libraries.

SEE ALSO

chef-client(8) knife(1) - http://wiki.opscode.com/display/chef/Shef

+ http://wiki.opscode.com/display/chef/Shef

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. Shef 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.

CHEF

-

Shef is distributed with Chef. http://wiki.opscode.com/display/chef/Home

+

Shef is distributed with Chef. http://wiki.opscode.com/display/chef/Home

    -
  1. Chef 10.16.0.rc.1
  2. -
  3. October 2012
  4. +
  5. Chef 10.18.0.rc.2
  6. +
  7. January 2013
  8. shef(1)
diff --git a/chef/distro/common/man/man1/knife-bootstrap.1 b/chef/distro/common/man/man1/knife-bootstrap.1 index 8a7990db8c..0b417f411e 100644 --- a/chef/distro/common/man/man1/knife-bootstrap.1 +++ b/chef/distro/common/man/man1/knife-bootstrap.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-BOOTSTRAP" "1" "October 2012" "Chef 10.16.0.rc.1" "Chef Manual" +.TH "KNIFE\-BOOTSTRAP" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" . .SH "NAME" \fBknife\-bootstrap\fR \- Install Chef Client on a remote host diff --git a/chef/distro/common/man/man1/knife-client.1 b/chef/distro/common/man/man1/knife-client.1 index 6b60b19ff3..a6e492c466 100644 --- a/chef/distro/common/man/man1/knife-client.1 +++ b/chef/distro/common/man/man1/knife-client.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-CLIENT" "1" "October 2012" "Chef 10.16.0.rc.1" "Chef Manual" +.TH "KNIFE\-CLIENT" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" . .SH "NAME" \fBknife\-client\fR \- Manage Chef API Clients diff --git a/chef/distro/common/man/man1/knife-configure.1 b/chef/distro/common/man/man1/knife-configure.1 index de0dda8764..ef3c5e7f75 100644 --- a/chef/distro/common/man/man1/knife-configure.1 +++ b/chef/distro/common/man/man1/knife-configure.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-CONFIGURE" "1" "October 2012" "Chef 10.16.0.rc.1" "Chef Manual" +.TH "KNIFE\-CONFIGURE" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" . .SH "NAME" \fBknife\-configure\fR \- Generate configuration files for knife or Chef Client diff --git a/chef/distro/common/man/man1/knife-cookbook-site.1 b/chef/distro/common/man/man1/knife-cookbook-site.1 index 5a61320440..49e24ffb84 100644 --- a/chef/distro/common/man/man1/knife-cookbook-site.1 +++ b/chef/distro/common/man/man1/knife-cookbook-site.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-COOKBOOK\-SITE" "1" "October 2012" "Chef 10.16.0.rc.1" "Chef Manual" +.TH "KNIFE\-COOKBOOK\-SITE" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" . .SH "NAME" \fBknife\-cookbook\-site\fR \- Install and update open source cookbooks diff --git a/chef/distro/common/man/man1/knife-cookbook.1 b/chef/distro/common/man/man1/knife-cookbook.1 index bed3cee68d..946c03c72b 100644 --- a/chef/distro/common/man/man1/knife-cookbook.1 +++ b/chef/distro/common/man/man1/knife-cookbook.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-COOKBOOK" "1" "October 2012" "Chef 10.16.0.rc.1" "Chef Manual" +.TH "KNIFE\-COOKBOOK" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" . .SH "NAME" \fBknife\-cookbook\fR \- upload and manage chef cookbooks diff --git a/chef/distro/common/man/man1/knife-data-bag.1 b/chef/distro/common/man/man1/knife-data-bag.1 index 8052246e87..288e2cf8c3 100644 --- a/chef/distro/common/man/man1/knife-data-bag.1 +++ b/chef/distro/common/man/man1/knife-data-bag.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-DATA\-BAG" "1" "October 2012" "Chef 10.16.0.rc.1" "Chef Manual" +.TH "KNIFE\-DATA\-BAG" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" . .SH "NAME" \fBknife\-data\-bag\fR \- Store arbitrary data on a Chef Server diff --git a/chef/distro/common/man/man1/knife-environment.1 b/chef/distro/common/man/man1/knife-environment.1 index f98ca858ca..27a62a6a71 100644 --- a/chef/distro/common/man/man1/knife-environment.1 +++ b/chef/distro/common/man/man1/knife-environment.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-ENVIRONMENT" "1" "October 2012" "Chef 10.16.0.rc.1" "Chef Manual" +.TH "KNIFE\-ENVIRONMENT" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" . .SH "NAME" \fBknife\-environment\fR \- Define cookbook policies for the environments in your infrastructure diff --git a/chef/distro/common/man/man1/knife-exec.1 b/chef/distro/common/man/man1/knife-exec.1 index 63df06920d..b81b822c97 100644 --- a/chef/distro/common/man/man1/knife-exec.1 +++ b/chef/distro/common/man/man1/knife-exec.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-EXEC" "1" "October 2012" "Chef 10.16.0.rc.1" "Chef Manual" +.TH "KNIFE\-EXEC" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" . .SH "NAME" \fBknife\-exec\fR \- Run user scripts using the Chef API DSL diff --git a/chef/distro/common/man/man1/knife-index.1 b/chef/distro/common/man/man1/knife-index.1 index ee738b9337..740493bce9 100644 --- a/chef/distro/common/man/man1/knife-index.1 +++ b/chef/distro/common/man/man1/knife-index.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-INDEX" "1" "October 2012" "Chef 10.16.0.rc.1" "Chef Manual" +.TH "KNIFE\-INDEX" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" . .SH "NAME" \fBknife\-index\fR \- Rebuild the search index on a Chef Server diff --git a/chef/distro/common/man/man1/knife-node.1 b/chef/distro/common/man/man1/knife-node.1 index a97e713c5f..dae638e709 100644 --- a/chef/distro/common/man/man1/knife-node.1 +++ b/chef/distro/common/man/man1/knife-node.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-NODE" "1" "October 2012" "Chef 10.16.0.rc.1" "Chef Manual" +.TH "KNIFE\-NODE" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" . .SH "NAME" \fBknife\-node\fR \- Manage the hosts in your infrastructure diff --git a/chef/distro/common/man/man1/knife-role.1 b/chef/distro/common/man/man1/knife-role.1 index 07e33f5a71..7458922f05 100644 --- a/chef/distro/common/man/man1/knife-role.1 +++ b/chef/distro/common/man/man1/knife-role.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-ROLE" "1" "October 2012" "Chef 10.16.0.rc.1" "Chef Manual" +.TH "KNIFE\-ROLE" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" . .SH "NAME" \fBknife\-role\fR \- Group common configuration settings diff --git a/chef/distro/common/man/man1/knife-search.1 b/chef/distro/common/man/man1/knife-search.1 index 07a27b65d9..7288b2c345 100644 --- a/chef/distro/common/man/man1/knife-search.1 +++ b/chef/distro/common/man/man1/knife-search.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-SEARCH" "1" "October 2012" "Chef 10.16.0.rc.1" "Chef Manual" +.TH "KNIFE\-SEARCH" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" . .SH "NAME" \fBknife\-search\fR \- Find objects on a Chef Server by query diff --git a/chef/distro/common/man/man1/knife-ssh.1 b/chef/distro/common/man/man1/knife-ssh.1 index 9a1120e94c..682d72e075 100644 --- a/chef/distro/common/man/man1/knife-ssh.1 +++ b/chef/distro/common/man/man1/knife-ssh.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-SSH" "1" "October 2012" "Chef 10.16.0.rc.1" "Chef Manual" +.TH "KNIFE\-SSH" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" . .SH "NAME" \fBknife\-ssh\fR \- Run a command or interactive session on multiple remote hosts diff --git a/chef/distro/common/man/man1/knife-status.1 b/chef/distro/common/man/man1/knife-status.1 index af733d39ec..a9721cd391 100644 --- a/chef/distro/common/man/man1/knife-status.1 +++ b/chef/distro/common/man/man1/knife-status.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-STATUS" "1" "October 2012" "Chef 10.16.0.rc.1" "Chef Manual" +.TH "KNIFE\-STATUS" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" . .SH "NAME" \fBknife\-status\fR \- Display status information for the nodes in your infrastructure diff --git a/chef/distro/common/man/man1/knife-tag.1 b/chef/distro/common/man/man1/knife-tag.1 index bcea872242..4b5e0e41e7 100644 --- a/chef/distro/common/man/man1/knife-tag.1 +++ b/chef/distro/common/man/man1/knife-tag.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-TAG" "1" "October 2012" "Chef 10.16.0.rc.1" "Chef Manual" +.TH "KNIFE\-TAG" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" . .SH "NAME" \fBknife\-tag\fR \- Apply tags to nodes on a Chef Server diff --git a/chef/distro/common/man/man1/knife.1 b/chef/distro/common/man/man1/knife.1 index 06d7034410..d8090332ce 100644 --- a/chef/distro/common/man/man1/knife.1 +++ b/chef/distro/common/man/man1/knife.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE" "1" "October 2012" "Chef 10.16.0.rc.1" "Chef Manual" +.TH "KNIFE" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" . .SH "NAME" \fBknife\fR \- Chef Server API client utility diff --git a/chef/distro/common/man/man1/shef.1 b/chef/distro/common/man/man1/shef.1 index 350e7d1354..9e81fe62af 100644 --- a/chef/distro/common/man/man1/shef.1 +++ b/chef/distro/common/man/man1/shef.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "SHEF" "1" "October 2012" "Chef 10.16.0.rc.1" "Chef Manual" +.TH "SHEF" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" . .SH "NAME" \fBshef\fR \- Interactive Chef Console diff --git a/chef/distro/common/man/man8/chef-client.8 b/chef/distro/common/man/man8/chef-client.8 index c6150fc1e5..e6cb280bd6 100644 --- a/chef/distro/common/man/man8/chef-client.8 +++ b/chef/distro/common/man/man8/chef-client.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-CLIENT" "8" "October 2012" "Chef 10.16.0.rc.1" "Chef Manual" +.TH "CHEF\-CLIENT" "8" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" . .SH "NAME" \fBchef\-client\fR \- Runs a client node connecting to a chef\-server\. diff --git a/chef/distro/common/man/man8/chef-expander.8 b/chef/distro/common/man/man8/chef-expander.8 index e92d205154..a1f5b25804 100644 --- a/chef/distro/common/man/man8/chef-expander.8 +++ b/chef/distro/common/man/man8/chef-expander.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-EXPANDER" "8" "October 2012" "Chef 10.16.0.rc.1" "Chef Manual" +.TH "CHEF\-EXPANDER" "8" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" . .SH "NAME" \fBchef\-expander\fR \- fetches messages from RabbitMQ, processes, and loads into chef\-solr diff --git a/chef/distro/common/man/man8/chef-expanderctl.8 b/chef/distro/common/man/man8/chef-expanderctl.8 index 9802d7ae9d..f1f39bfe9d 100644 --- a/chef/distro/common/man/man8/chef-expanderctl.8 +++ b/chef/distro/common/man/man8/chef-expanderctl.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-EXPANDERCTL" "8" "October 2012" "Chef 10.16.0.rc.1" "Chef Manual" +.TH "CHEF\-EXPANDERCTL" "8" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" . .SH "NAME" \fBchef\-expanderctl\fR \- management program for chef\-expander diff --git a/chef/distro/common/man/man8/chef-server-webui.8 b/chef/distro/common/man/man8/chef-server-webui.8 index bd310d9bbb..69f62fed5f 100644 --- a/chef/distro/common/man/man8/chef-server-webui.8 +++ b/chef/distro/common/man/man8/chef-server-webui.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-SERVER\-WEBUI" "8" "October 2012" "Chef 10.16.0.rc.1" "Chef Manual" +.TH "CHEF\-SERVER\-WEBUI" "8" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" . .SH "NAME" \fBchef\-server\-webui\fR \- Start the Chef Server merb application slice providing Web User Interface (Management Console)\. diff --git a/chef/distro/common/man/man8/chef-server.8 b/chef/distro/common/man/man8/chef-server.8 index 382273ac30..f6fde93951 100644 --- a/chef/distro/common/man/man8/chef-server.8 +++ b/chef/distro/common/man/man8/chef-server.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-SERVER" "8" "October 2012" "Chef 10.16.0.rc.1" "Chef Manual" +.TH "CHEF\-SERVER" "8" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" . .SH "NAME" \fBchef\-server\fR \- Start the Chef Server merb application slice\. diff --git a/chef/distro/common/man/man8/chef-solo.8 b/chef/distro/common/man/man8/chef-solo.8 index 181991fc6a..d2d0965507 100644 --- a/chef/distro/common/man/man8/chef-solo.8 +++ b/chef/distro/common/man/man8/chef-solo.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-SOLO" "8" "October 2012" "Chef 10.16.0.rc.1" "Chef Manual" +.TH "CHEF\-SOLO" "8" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" . .SH "NAME" \fBchef\-solo\fR \- Runs chef in solo mode against a specified cookbook location\. diff --git a/chef/distro/common/man/man8/chef-solr.8 b/chef/distro/common/man/man8/chef-solr.8 index e188da7822..afdcb9552b 100644 --- a/chef/distro/common/man/man8/chef-solr.8 +++ b/chef/distro/common/man/man8/chef-solr.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-SOLR" "8" "October 2012" "Chef 10.16.0.rc.1" "Chef Manual" +.TH "CHEF\-SOLR" "8" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" . .SH "NAME" \fBchef\-solr\fR \- Runs as Chef\'s search server -- cgit v1.2.1 From 814d809b9b49f187e3eb24f793bfa7474e2bd33f Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Tue, 15 Jan 2013 09:07:00 -0800 Subject: Bump version to 10.18.0 (final), regen manpages --- chef-expander/lib/chef/expander/version.rb | 2 +- chef-server-api/lib/chef-server-api/version.rb | 2 +- chef-server-webui/lib/chef-server-webui/version.rb | 2 +- chef-server/lib/chef-server/version.rb | 2 +- chef-solr/lib/chef/solr/version.rb | 2 +- chef/distro/common/html/chef-client.8.html | 6 +++--- chef/distro/common/html/chef-expander.8.html | 6 +++--- chef/distro/common/html/chef-expanderctl.8.html | 6 +++--- chef/distro/common/html/chef-server-webui.8.html | 6 +++--- chef/distro/common/html/chef-server.8.html | 6 +++--- chef/distro/common/html/chef-solo.8.html | 6 +++--- chef/distro/common/html/chef-solr.8.html | 6 +++--- chef/distro/common/html/knife-bootstrap.1.html | 6 +++--- chef/distro/common/html/knife-client.1.html | 6 +++--- chef/distro/common/html/knife-configure.1.html | 6 +++--- chef/distro/common/html/knife-cookbook-site.1.html | 6 +++--- chef/distro/common/html/knife-cookbook.1.html | 6 +++--- chef/distro/common/html/knife-data-bag.1.html | 6 +++--- chef/distro/common/html/knife-environment.1.html | 6 +++--- chef/distro/common/html/knife-exec.1.html | 6 +++--- chef/distro/common/html/knife-index.1.html | 6 +++--- chef/distro/common/html/knife-node.1.html | 6 +++--- chef/distro/common/html/knife-role.1.html | 6 +++--- chef/distro/common/html/knife-search.1.html | 6 +++--- chef/distro/common/html/knife-ssh.1.html | 6 +++--- chef/distro/common/html/knife-status.1.html | 6 +++--- chef/distro/common/html/knife-tag.1.html | 6 +++--- chef/distro/common/html/knife.1.html | 6 +++--- chef/distro/common/html/shef.1.html | 6 +++--- chef/distro/common/man/man1/knife-bootstrap.1 | 2 +- chef/distro/common/man/man1/knife-client.1 | 2 +- chef/distro/common/man/man1/knife-configure.1 | 2 +- chef/distro/common/man/man1/knife-cookbook-site.1 | 2 +- chef/distro/common/man/man1/knife-cookbook.1 | 2 +- chef/distro/common/man/man1/knife-data-bag.1 | 2 +- chef/distro/common/man/man1/knife-environment.1 | 2 +- chef/distro/common/man/man1/knife-exec.1 | 2 +- chef/distro/common/man/man1/knife-index.1 | 2 +- chef/distro/common/man/man1/knife-node.1 | 2 +- chef/distro/common/man/man1/knife-role.1 | 2 +- chef/distro/common/man/man1/knife-search.1 | 2 +- chef/distro/common/man/man1/knife-ssh.1 | 2 +- chef/distro/common/man/man1/knife-status.1 | 2 +- chef/distro/common/man/man1/knife-tag.1 | 2 +- chef/distro/common/man/man1/knife.1 | 2 +- chef/distro/common/man/man1/shef.1 | 2 +- chef/distro/common/man/man8/chef-client.8 | 2 +- chef/distro/common/man/man8/chef-expander.8 | 2 +- chef/distro/common/man/man8/chef-expanderctl.8 | 2 +- chef/distro/common/man/man8/chef-server-webui.8 | 2 +- chef/distro/common/man/man8/chef-server.8 | 2 +- chef/distro/common/man/man8/chef-solo.8 | 2 +- chef/distro/common/man/man8/chef-solr.8 | 2 +- chef/lib/chef/version.rb | 2 +- 54 files changed, 102 insertions(+), 102 deletions(-) diff --git a/chef-expander/lib/chef/expander/version.rb b/chef-expander/lib/chef/expander/version.rb index ec3ed5fd44..200e502057 100644 --- a/chef-expander/lib/chef/expander/version.rb +++ b/chef-expander/lib/chef/expander/version.rb @@ -23,7 +23,7 @@ require 'open3' module Chef module Expander - VERSION = "10.18.0.rc.2" + VERSION = "10.18.0" def self.version @rev ||= begin diff --git a/chef-server-api/lib/chef-server-api/version.rb b/chef-server-api/lib/chef-server-api/version.rb index 61601d8fe1..d1b180ad1f 100644 --- a/chef-server-api/lib/chef-server-api/version.rb +++ b/chef-server-api/lib/chef-server-api/version.rb @@ -1,3 +1,3 @@ module ChefServerApi - VERSION = '10.18.0.rc.2' + VERSION = '10.18.0' end diff --git a/chef-server-webui/lib/chef-server-webui/version.rb b/chef-server-webui/lib/chef-server-webui/version.rb index a66dc9727c..22b5854eb5 100644 --- a/chef-server-webui/lib/chef-server-webui/version.rb +++ b/chef-server-webui/lib/chef-server-webui/version.rb @@ -1,3 +1,3 @@ module ChefServerWebui - VERSION = '10.18.0.rc.2' + VERSION = '10.18.0' end diff --git a/chef-server/lib/chef-server/version.rb b/chef-server/lib/chef-server/version.rb index 6afaa482ba..da07e663a6 100644 --- a/chef-server/lib/chef-server/version.rb +++ b/chef-server/lib/chef-server/version.rb @@ -17,5 +17,5 @@ # module ChefServer - VERSION = '10.18.0.rc.2' + VERSION = '10.18.0' end diff --git a/chef-solr/lib/chef/solr/version.rb b/chef-solr/lib/chef/solr/version.rb index defc04a396..cbdf757cc0 100644 --- a/chef-solr/lib/chef/solr/version.rb +++ b/chef-solr/lib/chef/solr/version.rb @@ -1,6 +1,6 @@ class Chef class Solr - VERSION = '10.18.0.rc.2' + VERSION = '10.18.0' # Solr Schema. Used to detect incompatibilities between installed solr and # chef-solr versions. diff --git a/chef/distro/common/html/chef-client.8.html b/chef/distro/common/html/chef-client.8.html index 1103e47196..a323923056 100644 --- a/chef/distro/common/html/chef-client.8.html +++ b/chef/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.

    -
  1. Chef 10.18.0.rc.2
  2. +
  3. Chef 10.18.0
  4. January 2013
  5. chef-client(8)
diff --git a/chef/distro/common/html/chef-expander.8.html b/chef/distro/common/html/chef-expander.8.html index 016e38c8c1..8f4658bd85 100644 --- a/chef/distro/common/html/chef-expander.8.html +++ b/chef/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.

    -
  1. Chef 10.18.0.rc.2
  2. +
  3. Chef 10.18.0
  4. January 2013
  5. chef-expander(8)
diff --git a/chef/distro/common/html/chef-expanderctl.8.html b/chef/distro/common/html/chef-expanderctl.8.html index f789172fdd..a130f22f72 100644 --- a/chef/distro/common/html/chef-expanderctl.8.html +++ b/chef/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.

    -
  1. Chef 10.18.0.rc.2
  2. +
  3. Chef 10.18.0
  4. January 2013
  5. chef-expanderctl(8)
diff --git a/chef/distro/common/html/chef-server-webui.8.html b/chef/distro/common/html/chef-server-webui.8.html index c45a5d66bc..45fdd6606d 100644 --- a/chef/distro/common/html/chef-server-webui.8.html +++ b/chef/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.

    -
  1. Chef 10.18.0.rc.2
  2. +
  3. Chef 10.18.0
  4. January 2013
  5. chef-server-webui(8)
diff --git a/chef/distro/common/html/chef-server.8.html b/chef/distro/common/html/chef-server.8.html index 5c91331d36..e9b99322dd 100644 --- a/chef/distro/common/html/chef-server.8.html +++ b/chef/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.

    -
  1. Chef 10.18.0.rc.2
  2. +
  3. Chef 10.18.0
  4. January 2013
  5. chef-server(8)
diff --git a/chef/distro/common/html/chef-solo.8.html b/chef/distro/common/html/chef-solo.8.html index 188218ab48..ef3c87f825 100644 --- a/chef/distro/common/html/chef-solo.8.html +++ b/chef/distro/common/html/chef-solo.8.html @@ -170,9 +170,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.

@@ -181,7 +181,7 @@ found in /usr/share/common-licenses/Apache-2.0.

    -
  1. Chef 10.18.0.rc.2
  2. +
  3. Chef 10.18.0
  4. January 2013
  5. chef-solo(8)
diff --git a/chef/distro/common/html/chef-solr.8.html b/chef/distro/common/html/chef-solr.8.html index 789dee5390..338c076d54 100644 --- a/chef/distro/common/html/chef-solr.8.html +++ b/chef/distro/common/html/chef-solr.8.html @@ -144,9 +144,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.

@@ -155,7 +155,7 @@ found in /usr/share/common-licenses/Apache-2.0.

    -
  1. Chef 10.18.0.rc.2
  2. +
  3. Chef 10.18.0
  4. January 2013
  5. chef-solr(8)
diff --git a/chef/distro/common/html/knife-bootstrap.1.html b/chef/distro/common/html/knife-bootstrap.1.html index 292de1d5bd..82b4f57c9e 100644 --- a/chef/distro/common/html/knife-bootstrap.1.html +++ b/chef/distro/common/html/knife-bootstrap.1.html @@ -218,11 +218,11 @@ to other users via the process list using tools such as ps

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -231,7 +231,7 @@ to other users via the process list using tools such as ps
    -
  1. Chef 10.18.0.rc.2
  2. +
  3. Chef 10.18.0
  4. January 2013
  5. knife-bootstrap(1)
diff --git a/chef/distro/common/html/knife-client.1.html b/chef/distro/common/html/knife-client.1.html index d41fbfb5d7..3c8e9e769a 100644 --- a/chef/distro/common/html/knife-client.1.html +++ b/chef/distro/common/html/knife-client.1.html @@ -196,11 +196,11 @@ setting up a host for management with Chef.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -209,7 +209,7 @@ setting up a host for management with Chef.

    -
  1. Chef 10.18.0.rc.2
  2. +
  3. Chef 10.18.0
  4. January 2013
  5. knife-client(1)
diff --git a/chef/distro/common/html/knife-configure.1.html b/chef/distro/common/html/knife-configure.1.html index 9461f2afd4..cca5b37ab4 100644 --- a/chef/distro/common/html/knife-configure.1.html +++ b/chef/distro/common/html/knife-configure.1.html @@ -147,11 +147,11 @@ may need to modify that setting after copying to a remote host.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -160,7 +160,7 @@ may need to modify that setting after copying to a remote host.

    -
  1. Chef 10.18.0.rc.2
  2. +
  3. Chef 10.18.0
  4. January 2013
  5. knife-configure(1)
diff --git a/chef/distro/common/html/knife-cookbook-site.1.html b/chef/distro/common/html/knife-cookbook-site.1.html index 6e7a0f6a76..fe51c5c981 100644 --- a/chef/distro/common/html/knife-cookbook-site.1.html +++ b/chef/distro/common/html/knife-cookbook-site.1.html @@ -218,11 +218,11 @@ configuration file.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -231,7 +231,7 @@ configuration file.

    -
  1. Chef 10.18.0.rc.2
  2. +
  3. Chef 10.18.0
  4. January 2013
  5. knife-cookbook-site(1)
diff --git a/chef/distro/common/html/knife-cookbook.1.html b/chef/distro/common/html/knife-cookbook.1.html index 19a8d11265..104c417e4d 100644 --- a/chef/distro/common/html/knife-cookbook.1.html +++ b/chef/distro/common/html/knife-cookbook.1.html @@ -361,11 +361,11 @@ cookbook.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -374,7 +374,7 @@ cookbook.

    -
  1. Chef 10.18.0.rc.2
  2. +
  3. Chef 10.18.0
  4. January 2013
  5. knife-cookbook(1)
diff --git a/chef/distro/common/html/knife-data-bag.1.html b/chef/distro/common/html/knife-data-bag.1.html index d2a3f37292..68c91b0ef8 100644 --- a/chef/distro/common/html/knife-data-bag.1.html +++ b/chef/distro/common/html/knife-data-bag.1.html @@ -215,11 +215,11 @@ encryption keys.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -228,7 +228,7 @@ encryption keys.

    -
  1. Chef 10.18.0.rc.2
  2. +
  3. Chef 10.18.0
  4. January 2013
  5. knife-data-bag(1)
diff --git a/chef/distro/common/html/knife-environment.1.html b/chef/distro/common/html/knife-environment.1.html index 015ef67c4e..dfd56e549e 100644 --- a/chef/distro/common/html/knife-environment.1.html +++ b/chef/distro/common/html/knife-environment.1.html @@ -244,11 +244,11 @@ override_attributes "aws_s3_bucket" => "production"

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

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.

CHEF

@@ -257,7 +257,7 @@ override_attributes "aws_s3_bucket" => "production"
    -
  1. Chef 10.18.0.rc.2
  2. +
  3. Chef 10.18.0
  4. January 2013
  5. knife-environment(1)
diff --git a/chef/distro/common/html/knife-exec.1.html b/chef/distro/common/html/knife-exec.1.html index 4833434690..58b1e7ef00 100644 --- a/chef/distro/common/html/knife-exec.1.html +++ b/chef/distro/common/html/knife-exec.1.html @@ -111,11 +111,11 @@ commands available.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -124,7 +124,7 @@ commands available.

    -
  1. Chef 10.18.0.rc.2
  2. +
  3. Chef 10.18.0
  4. January 2013
  5. knife-exec(1)
diff --git a/chef/distro/common/html/knife-index.1.html b/chef/distro/common/html/knife-index.1.html index 24debbb0c0..302f65381c 100644 --- a/chef/distro/common/html/knife-index.1.html +++ b/chef/distro/common/html/knife-index.1.html @@ -102,11 +102,11 @@ time for all objects to be indexed and available for search.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -115,7 +115,7 @@ time for all objects to be indexed and available for search.

    -
  1. Chef 10.18.0.rc.2
  2. +
  3. Chef 10.18.0
  4. January 2013
  5. knife-index(1)
diff --git a/chef/distro/common/html/knife-node.1.html b/chef/distro/common/html/knife-node.1.html index 0d51233de4..a54bee5e08 100644 --- a/chef/distro/common/html/knife-node.1.html +++ b/chef/distro/common/html/knife-node.1.html @@ -227,11 +227,11 @@ run list, the correct syntax is "role[ROLE_NAME]"

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -240,7 +240,7 @@ run list, the correct syntax is "role[ROLE_NAME]"

    -
  1. Chef 10.18.0.rc.2
  2. +
  3. Chef 10.18.0
  4. January 2013
  5. knife-node(1)
diff --git a/chef/distro/common/html/knife-role.1.html b/chef/distro/common/html/knife-role.1.html index 4ebc5d543d..2b7976b0c2 100644 --- a/chef/distro/common/html/knife-role.1.html +++ b/chef/distro/common/html/knife-role.1.html @@ -177,11 +177,11 @@ run_list.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -190,7 +190,7 @@ run_list.

    -
  1. Chef 10.18.0.rc.2
  2. +
  3. Chef 10.18.0
  4. January 2013
  5. knife-role(1)
diff --git a/chef/distro/common/html/knife-search.1.html b/chef/distro/common/html/knife-search.1.html index b171ea112a..b298a501ae 100644 --- a/chef/distro/common/html/knife-search.1.html +++ b/chef/distro/common/html/knife-search.1.html @@ -265,11 +265,11 @@ www.example.com:

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -278,7 +278,7 @@ www.example.com:

    -
  1. Chef 10.18.0.rc.2
  2. +
  3. Chef 10.18.0
  4. January 2013
  5. knife-search(1)
diff --git a/chef/distro/common/html/knife-ssh.1.html b/chef/distro/common/html/knife-ssh.1.html index bb3adca136..56af438e44 100644 --- a/chef/distro/common/html/knife-ssh.1.html +++ b/chef/distro/common/html/knife-ssh.1.html @@ -133,11 +133,11 @@ option.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -146,7 +146,7 @@ option.
    -
  1. Chef 10.18.0.rc.2
  2. +
  3. Chef 10.18.0
  4. January 2013
  5. knife-ssh(1)
diff --git a/chef/distro/common/html/knife-status.1.html b/chef/distro/common/html/knife-status.1.html index 4b58a6aa32..0b638dccbb 100644 --- a/chef/distro/common/html/knife-status.1.html +++ b/chef/distro/common/html/knife-status.1.html @@ -105,11 +105,11 @@ may not be publicly reachable.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -118,7 +118,7 @@ may not be publicly reachable.

    -
  1. Chef 10.18.0.rc.2
  2. +
  3. Chef 10.18.0
  4. January 2013
  5. knife-status(1)
diff --git a/chef/distro/common/html/knife-tag.1.html b/chef/distro/common/html/knife-tag.1.html index 915d2413bf..18e2843e37 100644 --- a/chef/distro/common/html/knife-tag.1.html +++ b/chef/distro/common/html/knife-tag.1.html @@ -114,11 +114,11 @@

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

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.

CHEF

@@ -127,7 +127,7 @@
    -
  1. Chef 10.18.0.rc.2
  2. +
  3. Chef 10.18.0
  4. January 2013
  5. knife-tag(1)
diff --git a/chef/distro/common/html/knife.1.html b/chef/distro/common/html/knife.1.html index 14ca516233..74285f9508 100644 --- a/chef/distro/common/html/knife.1.html +++ b/chef/distro/common/html/knife.1.html @@ -291,12 +291,12 @@ data editing entirely.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com of Opscode +

Chef was written by Adam Jacob adam@opscode.com of Opscode (http://www.opscode.com), with contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com.

+

This manual page was written by Joshua Timberman joshua@opscode.com.

LICENSE

@@ -310,7 +310,7 @@ data editing entirely.
    -
  1. Chef 10.18.0.rc.2
  2. +
  3. Chef 10.18.0
  4. January 2013
  5. knife(1)
diff --git a/chef/distro/common/html/shef.1.html b/chef/distro/common/html/shef.1.html index 1140532c0e..93bcbe1296 100644 --- a/chef/distro/common/html/shef.1.html +++ b/chef/distro/common/html/shef.1.html @@ -258,12 +258,12 @@ and may become out of sync with the behavior of those 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. Shef 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.

@@ -273,7 +273,7 @@ and may become out of sync with the behavior of those libraries.

    -
  1. Chef 10.18.0.rc.2
  2. +
  3. Chef 10.18.0
  4. January 2013
  5. shef(1)
diff --git a/chef/distro/common/man/man1/knife-bootstrap.1 b/chef/distro/common/man/man1/knife-bootstrap.1 index 0b417f411e..331f29ad04 100644 --- a/chef/distro/common/man/man1/knife-bootstrap.1 +++ b/chef/distro/common/man/man1/knife-bootstrap.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-BOOTSTRAP" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" +.TH "KNIFE\-BOOTSTRAP" "1" "January 2013" "Chef 10.18.0" "Chef Manual" . .SH "NAME" \fBknife\-bootstrap\fR \- Install Chef Client on a remote host diff --git a/chef/distro/common/man/man1/knife-client.1 b/chef/distro/common/man/man1/knife-client.1 index a6e492c466..e053569fd5 100644 --- a/chef/distro/common/man/man1/knife-client.1 +++ b/chef/distro/common/man/man1/knife-client.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-CLIENT" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" +.TH "KNIFE\-CLIENT" "1" "January 2013" "Chef 10.18.0" "Chef Manual" . .SH "NAME" \fBknife\-client\fR \- Manage Chef API Clients diff --git a/chef/distro/common/man/man1/knife-configure.1 b/chef/distro/common/man/man1/knife-configure.1 index ef3c5e7f75..1e89ac615a 100644 --- a/chef/distro/common/man/man1/knife-configure.1 +++ b/chef/distro/common/man/man1/knife-configure.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-CONFIGURE" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" +.TH "KNIFE\-CONFIGURE" "1" "January 2013" "Chef 10.18.0" "Chef Manual" . .SH "NAME" \fBknife\-configure\fR \- Generate configuration files for knife or Chef Client diff --git a/chef/distro/common/man/man1/knife-cookbook-site.1 b/chef/distro/common/man/man1/knife-cookbook-site.1 index 49e24ffb84..dc862165c1 100644 --- a/chef/distro/common/man/man1/knife-cookbook-site.1 +++ b/chef/distro/common/man/man1/knife-cookbook-site.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-COOKBOOK\-SITE" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" +.TH "KNIFE\-COOKBOOK\-SITE" "1" "January 2013" "Chef 10.18.0" "Chef Manual" . .SH "NAME" \fBknife\-cookbook\-site\fR \- Install and update open source cookbooks diff --git a/chef/distro/common/man/man1/knife-cookbook.1 b/chef/distro/common/man/man1/knife-cookbook.1 index 946c03c72b..4c28347624 100644 --- a/chef/distro/common/man/man1/knife-cookbook.1 +++ b/chef/distro/common/man/man1/knife-cookbook.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-COOKBOOK" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" +.TH "KNIFE\-COOKBOOK" "1" "January 2013" "Chef 10.18.0" "Chef Manual" . .SH "NAME" \fBknife\-cookbook\fR \- upload and manage chef cookbooks diff --git a/chef/distro/common/man/man1/knife-data-bag.1 b/chef/distro/common/man/man1/knife-data-bag.1 index 288e2cf8c3..08eb31a69e 100644 --- a/chef/distro/common/man/man1/knife-data-bag.1 +++ b/chef/distro/common/man/man1/knife-data-bag.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-DATA\-BAG" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" +.TH "KNIFE\-DATA\-BAG" "1" "January 2013" "Chef 10.18.0" "Chef Manual" . .SH "NAME" \fBknife\-data\-bag\fR \- Store arbitrary data on a Chef Server diff --git a/chef/distro/common/man/man1/knife-environment.1 b/chef/distro/common/man/man1/knife-environment.1 index 27a62a6a71..9371da4038 100644 --- a/chef/distro/common/man/man1/knife-environment.1 +++ b/chef/distro/common/man/man1/knife-environment.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-ENVIRONMENT" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" +.TH "KNIFE\-ENVIRONMENT" "1" "January 2013" "Chef 10.18.0" "Chef Manual" . .SH "NAME" \fBknife\-environment\fR \- Define cookbook policies for the environments in your infrastructure diff --git a/chef/distro/common/man/man1/knife-exec.1 b/chef/distro/common/man/man1/knife-exec.1 index b81b822c97..011b2e9bd2 100644 --- a/chef/distro/common/man/man1/knife-exec.1 +++ b/chef/distro/common/man/man1/knife-exec.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-EXEC" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" +.TH "KNIFE\-EXEC" "1" "January 2013" "Chef 10.18.0" "Chef Manual" . .SH "NAME" \fBknife\-exec\fR \- Run user scripts using the Chef API DSL diff --git a/chef/distro/common/man/man1/knife-index.1 b/chef/distro/common/man/man1/knife-index.1 index 740493bce9..ab6c92410c 100644 --- a/chef/distro/common/man/man1/knife-index.1 +++ b/chef/distro/common/man/man1/knife-index.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-INDEX" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" +.TH "KNIFE\-INDEX" "1" "January 2013" "Chef 10.18.0" "Chef Manual" . .SH "NAME" \fBknife\-index\fR \- Rebuild the search index on a Chef Server diff --git a/chef/distro/common/man/man1/knife-node.1 b/chef/distro/common/man/man1/knife-node.1 index dae638e709..858a3b82de 100644 --- a/chef/distro/common/man/man1/knife-node.1 +++ b/chef/distro/common/man/man1/knife-node.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-NODE" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" +.TH "KNIFE\-NODE" "1" "January 2013" "Chef 10.18.0" "Chef Manual" . .SH "NAME" \fBknife\-node\fR \- Manage the hosts in your infrastructure diff --git a/chef/distro/common/man/man1/knife-role.1 b/chef/distro/common/man/man1/knife-role.1 index 7458922f05..431be9a958 100644 --- a/chef/distro/common/man/man1/knife-role.1 +++ b/chef/distro/common/man/man1/knife-role.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-ROLE" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" +.TH "KNIFE\-ROLE" "1" "January 2013" "Chef 10.18.0" "Chef Manual" . .SH "NAME" \fBknife\-role\fR \- Group common configuration settings diff --git a/chef/distro/common/man/man1/knife-search.1 b/chef/distro/common/man/man1/knife-search.1 index 7288b2c345..8ba267449f 100644 --- a/chef/distro/common/man/man1/knife-search.1 +++ b/chef/distro/common/man/man1/knife-search.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-SEARCH" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" +.TH "KNIFE\-SEARCH" "1" "January 2013" "Chef 10.18.0" "Chef Manual" . .SH "NAME" \fBknife\-search\fR \- Find objects on a Chef Server by query diff --git a/chef/distro/common/man/man1/knife-ssh.1 b/chef/distro/common/man/man1/knife-ssh.1 index 682d72e075..bb655256c8 100644 --- a/chef/distro/common/man/man1/knife-ssh.1 +++ b/chef/distro/common/man/man1/knife-ssh.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-SSH" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" +.TH "KNIFE\-SSH" "1" "January 2013" "Chef 10.18.0" "Chef Manual" . .SH "NAME" \fBknife\-ssh\fR \- Run a command or interactive session on multiple remote hosts diff --git a/chef/distro/common/man/man1/knife-status.1 b/chef/distro/common/man/man1/knife-status.1 index a9721cd391..8c5baf3e8e 100644 --- a/chef/distro/common/man/man1/knife-status.1 +++ b/chef/distro/common/man/man1/knife-status.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-STATUS" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" +.TH "KNIFE\-STATUS" "1" "January 2013" "Chef 10.18.0" "Chef Manual" . .SH "NAME" \fBknife\-status\fR \- Display status information for the nodes in your infrastructure diff --git a/chef/distro/common/man/man1/knife-tag.1 b/chef/distro/common/man/man1/knife-tag.1 index 4b5e0e41e7..4a65195bb6 100644 --- a/chef/distro/common/man/man1/knife-tag.1 +++ b/chef/distro/common/man/man1/knife-tag.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-TAG" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" +.TH "KNIFE\-TAG" "1" "January 2013" "Chef 10.18.0" "Chef Manual" . .SH "NAME" \fBknife\-tag\fR \- Apply tags to nodes on a Chef Server diff --git a/chef/distro/common/man/man1/knife.1 b/chef/distro/common/man/man1/knife.1 index d8090332ce..a923d4ca71 100644 --- a/chef/distro/common/man/man1/knife.1 +++ b/chef/distro/common/man/man1/knife.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" +.TH "KNIFE" "1" "January 2013" "Chef 10.18.0" "Chef Manual" . .SH "NAME" \fBknife\fR \- Chef Server API client utility diff --git a/chef/distro/common/man/man1/shef.1 b/chef/distro/common/man/man1/shef.1 index 9e81fe62af..b8b8355e61 100644 --- a/chef/distro/common/man/man1/shef.1 +++ b/chef/distro/common/man/man1/shef.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "SHEF" "1" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" +.TH "SHEF" "1" "January 2013" "Chef 10.18.0" "Chef Manual" . .SH "NAME" \fBshef\fR \- Interactive Chef Console diff --git a/chef/distro/common/man/man8/chef-client.8 b/chef/distro/common/man/man8/chef-client.8 index e6cb280bd6..6091a518a7 100644 --- a/chef/distro/common/man/man8/chef-client.8 +++ b/chef/distro/common/man/man8/chef-client.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-CLIENT" "8" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" +.TH "CHEF\-CLIENT" "8" "January 2013" "Chef 10.18.0" "Chef Manual" . .SH "NAME" \fBchef\-client\fR \- Runs a client node connecting to a chef\-server\. diff --git a/chef/distro/common/man/man8/chef-expander.8 b/chef/distro/common/man/man8/chef-expander.8 index a1f5b25804..e14d850d93 100644 --- a/chef/distro/common/man/man8/chef-expander.8 +++ b/chef/distro/common/man/man8/chef-expander.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-EXPANDER" "8" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" +.TH "CHEF\-EXPANDER" "8" "January 2013" "Chef 10.18.0" "Chef Manual" . .SH "NAME" \fBchef\-expander\fR \- fetches messages from RabbitMQ, processes, and loads into chef\-solr diff --git a/chef/distro/common/man/man8/chef-expanderctl.8 b/chef/distro/common/man/man8/chef-expanderctl.8 index f1f39bfe9d..96f0846cb2 100644 --- a/chef/distro/common/man/man8/chef-expanderctl.8 +++ b/chef/distro/common/man/man8/chef-expanderctl.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-EXPANDERCTL" "8" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" +.TH "CHEF\-EXPANDERCTL" "8" "January 2013" "Chef 10.18.0" "Chef Manual" . .SH "NAME" \fBchef\-expanderctl\fR \- management program for chef\-expander diff --git a/chef/distro/common/man/man8/chef-server-webui.8 b/chef/distro/common/man/man8/chef-server-webui.8 index 69f62fed5f..c2663d71a8 100644 --- a/chef/distro/common/man/man8/chef-server-webui.8 +++ b/chef/distro/common/man/man8/chef-server-webui.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-SERVER\-WEBUI" "8" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" +.TH "CHEF\-SERVER\-WEBUI" "8" "January 2013" "Chef 10.18.0" "Chef Manual" . .SH "NAME" \fBchef\-server\-webui\fR \- Start the Chef Server merb application slice providing Web User Interface (Management Console)\. diff --git a/chef/distro/common/man/man8/chef-server.8 b/chef/distro/common/man/man8/chef-server.8 index f6fde93951..504c930334 100644 --- a/chef/distro/common/man/man8/chef-server.8 +++ b/chef/distro/common/man/man8/chef-server.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-SERVER" "8" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" +.TH "CHEF\-SERVER" "8" "January 2013" "Chef 10.18.0" "Chef Manual" . .SH "NAME" \fBchef\-server\fR \- Start the Chef Server merb application slice\. diff --git a/chef/distro/common/man/man8/chef-solo.8 b/chef/distro/common/man/man8/chef-solo.8 index d2d0965507..2b4c2d2360 100644 --- a/chef/distro/common/man/man8/chef-solo.8 +++ b/chef/distro/common/man/man8/chef-solo.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-SOLO" "8" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" +.TH "CHEF\-SOLO" "8" "January 2013" "Chef 10.18.0" "Chef Manual" . .SH "NAME" \fBchef\-solo\fR \- Runs chef in solo mode against a specified cookbook location\. diff --git a/chef/distro/common/man/man8/chef-solr.8 b/chef/distro/common/man/man8/chef-solr.8 index afdcb9552b..d7dac912a3 100644 --- a/chef/distro/common/man/man8/chef-solr.8 +++ b/chef/distro/common/man/man8/chef-solr.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-SOLR" "8" "January 2013" "Chef 10.18.0.rc.2" "Chef Manual" +.TH "CHEF\-SOLR" "8" "January 2013" "Chef 10.18.0" "Chef Manual" . .SH "NAME" \fBchef\-solr\fR \- Runs as Chef\'s search server diff --git a/chef/lib/chef/version.rb b/chef/lib/chef/version.rb index f775da1706..4c1b9c89eb 100644 --- a/chef/lib/chef/version.rb +++ b/chef/lib/chef/version.rb @@ -17,7 +17,7 @@ class Chef CHEF_ROOT = File.dirname(File.expand_path(File.dirname(__FILE__))) - VERSION = '10.18.0.rc.2' + VERSION = '10.18.0' end # NOTE: the Chef::Version class is defined in version_class.rb -- cgit v1.2.1 From 186eb9cacc54f73292b6c256cfae4866744a6c21 Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Thu, 17 Jan 2013 11:28:07 -0800 Subject: bump to 10.18.1 for development && regen manpages --- chef/distro/common/html/chef-client.8.html | 6 +++--- chef/distro/common/html/chef-expander.8.html | 6 +++--- chef/distro/common/html/chef-expanderctl.8.html | 6 +++--- chef/distro/common/html/chef-server-webui.8.html | 6 +++--- chef/distro/common/html/chef-server.8.html | 6 +++--- chef/distro/common/html/chef-solo.8.html | 6 +++--- chef/distro/common/html/chef-solr.8.html | 6 +++--- chef/distro/common/html/knife-bootstrap.1.html | 6 +++--- chef/distro/common/html/knife-client.1.html | 6 +++--- chef/distro/common/html/knife-configure.1.html | 6 +++--- chef/distro/common/html/knife-cookbook-site.1.html | 6 +++--- chef/distro/common/html/knife-cookbook.1.html | 6 +++--- chef/distro/common/html/knife-data-bag.1.html | 6 +++--- chef/distro/common/html/knife-environment.1.html | 6 +++--- chef/distro/common/html/knife-exec.1.html | 6 +++--- chef/distro/common/html/knife-index.1.html | 6 +++--- chef/distro/common/html/knife-node.1.html | 6 +++--- chef/distro/common/html/knife-role.1.html | 6 +++--- chef/distro/common/html/knife-search.1.html | 6 +++--- chef/distro/common/html/knife-ssh.1.html | 6 +++--- chef/distro/common/html/knife-status.1.html | 6 +++--- chef/distro/common/html/knife-tag.1.html | 6 +++--- chef/distro/common/html/knife.1.html | 6 +++--- chef/distro/common/html/shef.1.html | 6 +++--- chef/distro/common/man/man1/knife-bootstrap.1 | 2 +- chef/distro/common/man/man1/knife-client.1 | 2 +- chef/distro/common/man/man1/knife-configure.1 | 2 +- chef/distro/common/man/man1/knife-cookbook-site.1 | 2 +- chef/distro/common/man/man1/knife-cookbook.1 | 2 +- chef/distro/common/man/man1/knife-data-bag.1 | 2 +- chef/distro/common/man/man1/knife-environment.1 | 2 +- chef/distro/common/man/man1/knife-exec.1 | 2 +- chef/distro/common/man/man1/knife-index.1 | 2 +- chef/distro/common/man/man1/knife-node.1 | 2 +- chef/distro/common/man/man1/knife-role.1 | 2 +- chef/distro/common/man/man1/knife-search.1 | 2 +- chef/distro/common/man/man1/knife-ssh.1 | 2 +- chef/distro/common/man/man1/knife-status.1 | 2 +- chef/distro/common/man/man1/knife-tag.1 | 2 +- chef/distro/common/man/man1/knife.1 | 2 +- chef/distro/common/man/man1/shef.1 | 2 +- chef/distro/common/man/man8/chef-client.8 | 2 +- chef/distro/common/man/man8/chef-expander.8 | 2 +- chef/distro/common/man/man8/chef-expanderctl.8 | 2 +- chef/distro/common/man/man8/chef-server-webui.8 | 2 +- chef/distro/common/man/man8/chef-server.8 | 2 +- chef/distro/common/man/man8/chef-solo.8 | 2 +- chef/distro/common/man/man8/chef-solr.8 | 2 +- chef/lib/chef/version.rb | 2 +- 49 files changed, 97 insertions(+), 97 deletions(-) diff --git a/chef/distro/common/html/chef-client.8.html b/chef/distro/common/html/chef-client.8.html index a323923056..76400c1a22 100644 --- a/chef/distro/common/html/chef-client.8.html +++ b/chef/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.

    -
  1. Chef 10.18.0
  2. +
  3. Chef 10.18.1
  4. January 2013
  5. chef-client(8)
diff --git a/chef/distro/common/html/chef-expander.8.html b/chef/distro/common/html/chef-expander.8.html index 8f4658bd85..407ee9141d 100644 --- a/chef/distro/common/html/chef-expander.8.html +++ b/chef/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.

    -
  1. Chef 10.18.0
  2. +
  3. Chef 10.18.1
  4. January 2013
  5. chef-expander(8)
diff --git a/chef/distro/common/html/chef-expanderctl.8.html b/chef/distro/common/html/chef-expanderctl.8.html index a130f22f72..23d7e1bcdf 100644 --- a/chef/distro/common/html/chef-expanderctl.8.html +++ b/chef/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.

    -
  1. Chef 10.18.0
  2. +
  3. Chef 10.18.1
  4. January 2013
  5. chef-expanderctl(8)
diff --git a/chef/distro/common/html/chef-server-webui.8.html b/chef/distro/common/html/chef-server-webui.8.html index 45fdd6606d..c285284d04 100644 --- a/chef/distro/common/html/chef-server-webui.8.html +++ b/chef/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.

    -
  1. Chef 10.18.0
  2. +
  3. Chef 10.18.1
  4. January 2013
  5. chef-server-webui(8)
diff --git a/chef/distro/common/html/chef-server.8.html b/chef/distro/common/html/chef-server.8.html index e9b99322dd..6e2067d310 100644 --- a/chef/distro/common/html/chef-server.8.html +++ b/chef/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.

    -
  1. Chef 10.18.0
  2. +
  3. Chef 10.18.1
  4. January 2013
  5. chef-server(8)
diff --git a/chef/distro/common/html/chef-solo.8.html b/chef/distro/common/html/chef-solo.8.html index ef3c87f825..8c8d1afce1 100644 --- a/chef/distro/common/html/chef-solo.8.html +++ b/chef/distro/common/html/chef-solo.8.html @@ -170,9 +170,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.

@@ -181,7 +181,7 @@ found in /usr/share/common-licenses/Apache-2.0.

    -
  1. Chef 10.18.0
  2. +
  3. Chef 10.18.1
  4. January 2013
  5. chef-solo(8)
diff --git a/chef/distro/common/html/chef-solr.8.html b/chef/distro/common/html/chef-solr.8.html index 338c076d54..227da68a13 100644 --- a/chef/distro/common/html/chef-solr.8.html +++ b/chef/distro/common/html/chef-solr.8.html @@ -144,9 +144,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.

@@ -155,7 +155,7 @@ found in /usr/share/common-licenses/Apache-2.0.

    -
  1. Chef 10.18.0
  2. +
  3. Chef 10.18.1
  4. January 2013
  5. chef-solr(8)
diff --git a/chef/distro/common/html/knife-bootstrap.1.html b/chef/distro/common/html/knife-bootstrap.1.html index 82b4f57c9e..fc3efc080d 100644 --- a/chef/distro/common/html/knife-bootstrap.1.html +++ b/chef/distro/common/html/knife-bootstrap.1.html @@ -218,11 +218,11 @@ to other users via the process list using tools such as ps

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -231,7 +231,7 @@ to other users via the process list using tools such as ps
    -
  1. Chef 10.18.0
  2. +
  3. Chef 10.18.1
  4. January 2013
  5. knife-bootstrap(1)
diff --git a/chef/distro/common/html/knife-client.1.html b/chef/distro/common/html/knife-client.1.html index 3c8e9e769a..71190502dd 100644 --- a/chef/distro/common/html/knife-client.1.html +++ b/chef/distro/common/html/knife-client.1.html @@ -196,11 +196,11 @@ setting up a host for management with Chef.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -209,7 +209,7 @@ setting up a host for management with Chef.

    -
  1. Chef 10.18.0
  2. +
  3. Chef 10.18.1
  4. January 2013
  5. knife-client(1)
diff --git a/chef/distro/common/html/knife-configure.1.html b/chef/distro/common/html/knife-configure.1.html index cca5b37ab4..0591f3887f 100644 --- a/chef/distro/common/html/knife-configure.1.html +++ b/chef/distro/common/html/knife-configure.1.html @@ -147,11 +147,11 @@ may need to modify that setting after copying to a remote host.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -160,7 +160,7 @@ may need to modify that setting after copying to a remote host.

    -
  1. Chef 10.18.0
  2. +
  3. Chef 10.18.1
  4. January 2013
  5. knife-configure(1)
diff --git a/chef/distro/common/html/knife-cookbook-site.1.html b/chef/distro/common/html/knife-cookbook-site.1.html index fe51c5c981..9f8ce00180 100644 --- a/chef/distro/common/html/knife-cookbook-site.1.html +++ b/chef/distro/common/html/knife-cookbook-site.1.html @@ -218,11 +218,11 @@ configuration file.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -231,7 +231,7 @@ configuration file.

    -
  1. Chef 10.18.0
  2. +
  3. Chef 10.18.1
  4. January 2013
  5. knife-cookbook-site(1)
diff --git a/chef/distro/common/html/knife-cookbook.1.html b/chef/distro/common/html/knife-cookbook.1.html index 104c417e4d..19bde64b62 100644 --- a/chef/distro/common/html/knife-cookbook.1.html +++ b/chef/distro/common/html/knife-cookbook.1.html @@ -361,11 +361,11 @@ cookbook.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -374,7 +374,7 @@ cookbook.

    -
  1. Chef 10.18.0
  2. +
  3. Chef 10.18.1
  4. January 2013
  5. knife-cookbook(1)
diff --git a/chef/distro/common/html/knife-data-bag.1.html b/chef/distro/common/html/knife-data-bag.1.html index 68c91b0ef8..8c39acb0b2 100644 --- a/chef/distro/common/html/knife-data-bag.1.html +++ b/chef/distro/common/html/knife-data-bag.1.html @@ -215,11 +215,11 @@ encryption keys.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -228,7 +228,7 @@ encryption keys.

    -
  1. Chef 10.18.0
  2. +
  3. Chef 10.18.1
  4. January 2013
  5. knife-data-bag(1)
diff --git a/chef/distro/common/html/knife-environment.1.html b/chef/distro/common/html/knife-environment.1.html index dfd56e549e..812a0cb9b3 100644 --- a/chef/distro/common/html/knife-environment.1.html +++ b/chef/distro/common/html/knife-environment.1.html @@ -244,11 +244,11 @@ override_attributes "aws_s3_bucket" => "production"

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

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.

CHEF

@@ -257,7 +257,7 @@ override_attributes "aws_s3_bucket" => "production"
    -
  1. Chef 10.18.0
  2. +
  3. Chef 10.18.1
  4. January 2013
  5. knife-environment(1)
diff --git a/chef/distro/common/html/knife-exec.1.html b/chef/distro/common/html/knife-exec.1.html index 58b1e7ef00..88992edd2d 100644 --- a/chef/distro/common/html/knife-exec.1.html +++ b/chef/distro/common/html/knife-exec.1.html @@ -111,11 +111,11 @@ commands available.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -124,7 +124,7 @@ commands available.

    -
  1. Chef 10.18.0
  2. +
  3. Chef 10.18.1
  4. January 2013
  5. knife-exec(1)
diff --git a/chef/distro/common/html/knife-index.1.html b/chef/distro/common/html/knife-index.1.html index 302f65381c..72ec199163 100644 --- a/chef/distro/common/html/knife-index.1.html +++ b/chef/distro/common/html/knife-index.1.html @@ -102,11 +102,11 @@ time for all objects to be indexed and available for search.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -115,7 +115,7 @@ time for all objects to be indexed and available for search.

    -
  1. Chef 10.18.0
  2. +
  3. Chef 10.18.1
  4. January 2013
  5. knife-index(1)
diff --git a/chef/distro/common/html/knife-node.1.html b/chef/distro/common/html/knife-node.1.html index a54bee5e08..48cbe2aeb0 100644 --- a/chef/distro/common/html/knife-node.1.html +++ b/chef/distro/common/html/knife-node.1.html @@ -227,11 +227,11 @@ run list, the correct syntax is "role[ROLE_NAME]"

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -240,7 +240,7 @@ run list, the correct syntax is "role[ROLE_NAME]"

    -
  1. Chef 10.18.0
  2. +
  3. Chef 10.18.1
  4. January 2013
  5. knife-node(1)
diff --git a/chef/distro/common/html/knife-role.1.html b/chef/distro/common/html/knife-role.1.html index 2b7976b0c2..d1dba8c2c8 100644 --- a/chef/distro/common/html/knife-role.1.html +++ b/chef/distro/common/html/knife-role.1.html @@ -177,11 +177,11 @@ run_list.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -190,7 +190,7 @@ run_list.

    -
  1. Chef 10.18.0
  2. +
  3. Chef 10.18.1
  4. January 2013
  5. knife-role(1)
diff --git a/chef/distro/common/html/knife-search.1.html b/chef/distro/common/html/knife-search.1.html index b298a501ae..630ecce212 100644 --- a/chef/distro/common/html/knife-search.1.html +++ b/chef/distro/common/html/knife-search.1.html @@ -265,11 +265,11 @@ www.example.com:

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -278,7 +278,7 @@ www.example.com:

    -
  1. Chef 10.18.0
  2. +
  3. Chef 10.18.1
  4. January 2013
  5. knife-search(1)
diff --git a/chef/distro/common/html/knife-ssh.1.html b/chef/distro/common/html/knife-ssh.1.html index 56af438e44..9d8d088f20 100644 --- a/chef/distro/common/html/knife-ssh.1.html +++ b/chef/distro/common/html/knife-ssh.1.html @@ -133,11 +133,11 @@ option.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -146,7 +146,7 @@ option.
    -
  1. Chef 10.18.0
  2. +
  3. Chef 10.18.1
  4. January 2013
  5. knife-ssh(1)
diff --git a/chef/distro/common/html/knife-status.1.html b/chef/distro/common/html/knife-status.1.html index 0b638dccbb..28ba68fd4a 100644 --- a/chef/distro/common/html/knife-status.1.html +++ b/chef/distro/common/html/knife-status.1.html @@ -105,11 +105,11 @@ may not be publicly reachable.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com. +

This manual page was written by Joshua Timberman joshua@opscode.com. Permission is granted to copy, distribute and / or modify this document under the terms of the Apache 2.0 License.

CHEF

@@ -118,7 +118,7 @@ may not be publicly reachable.

    -
  1. Chef 10.18.0
  2. +
  3. Chef 10.18.1
  4. January 2013
  5. knife-status(1)
diff --git a/chef/distro/common/html/knife-tag.1.html b/chef/distro/common/html/knife-tag.1.html index 18e2843e37..b6915c2443 100644 --- a/chef/distro/common/html/knife-tag.1.html +++ b/chef/distro/common/html/knife-tag.1.html @@ -114,11 +114,11 @@

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

+

Chef was written by Adam Jacob adam@opscode.com with many contributions from the community.

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.

CHEF

@@ -127,7 +127,7 @@
    -
  1. Chef 10.18.0
  2. +
  3. Chef 10.18.1
  4. January 2013
  5. knife-tag(1)
diff --git a/chef/distro/common/html/knife.1.html b/chef/distro/common/html/knife.1.html index 74285f9508..35e6bf31be 100644 --- a/chef/distro/common/html/knife.1.html +++ b/chef/distro/common/html/knife.1.html @@ -291,12 +291,12 @@ data editing entirely.

AUTHOR

-

Chef was written by Adam Jacob adam@opscode.com of Opscode +

Chef was written by Adam Jacob adam@opscode.com of Opscode (http://www.opscode.com), with contributions from the community.

DOCUMENTATION

-

This manual page was written by Joshua Timberman joshua@opscode.com.

+

This manual page was written by Joshua Timberman joshua@opscode.com.

LICENSE

@@ -310,7 +310,7 @@ data editing entirely.
    -
  1. Chef 10.18.0
  2. +
  3. Chef 10.18.1
  4. January 2013
  5. knife(1)
diff --git a/chef/distro/common/html/shef.1.html b/chef/distro/common/html/shef.1.html index 93bcbe1296..72149f2153 100644 --- a/chef/distro/common/html/shef.1.html +++ b/chef/distro/common/html/shef.1.html @@ -258,12 +258,12 @@ and may become out of sync with the behavior of those 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. Shef 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.

@@ -273,7 +273,7 @@ and may become out of sync with the behavior of those libraries.

    -
  1. Chef 10.18.0
  2. +
  3. Chef 10.18.1
  4. January 2013
  5. shef(1)
diff --git a/chef/distro/common/man/man1/knife-bootstrap.1 b/chef/distro/common/man/man1/knife-bootstrap.1 index 331f29ad04..32d0410490 100644 --- a/chef/distro/common/man/man1/knife-bootstrap.1 +++ b/chef/distro/common/man/man1/knife-bootstrap.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-BOOTSTRAP" "1" "January 2013" "Chef 10.18.0" "Chef Manual" +.TH "KNIFE\-BOOTSTRAP" "1" "January 2013" "Chef 10.18.1" "Chef Manual" . .SH "NAME" \fBknife\-bootstrap\fR \- Install Chef Client on a remote host diff --git a/chef/distro/common/man/man1/knife-client.1 b/chef/distro/common/man/man1/knife-client.1 index e053569fd5..0eeed6acf2 100644 --- a/chef/distro/common/man/man1/knife-client.1 +++ b/chef/distro/common/man/man1/knife-client.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-CLIENT" "1" "January 2013" "Chef 10.18.0" "Chef Manual" +.TH "KNIFE\-CLIENT" "1" "January 2013" "Chef 10.18.1" "Chef Manual" . .SH "NAME" \fBknife\-client\fR \- Manage Chef API Clients diff --git a/chef/distro/common/man/man1/knife-configure.1 b/chef/distro/common/man/man1/knife-configure.1 index 1e89ac615a..cd15b4c9e2 100644 --- a/chef/distro/common/man/man1/knife-configure.1 +++ b/chef/distro/common/man/man1/knife-configure.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-CONFIGURE" "1" "January 2013" "Chef 10.18.0" "Chef Manual" +.TH "KNIFE\-CONFIGURE" "1" "January 2013" "Chef 10.18.1" "Chef Manual" . .SH "NAME" \fBknife\-configure\fR \- Generate configuration files for knife or Chef Client diff --git a/chef/distro/common/man/man1/knife-cookbook-site.1 b/chef/distro/common/man/man1/knife-cookbook-site.1 index dc862165c1..a134707d26 100644 --- a/chef/distro/common/man/man1/knife-cookbook-site.1 +++ b/chef/distro/common/man/man1/knife-cookbook-site.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-COOKBOOK\-SITE" "1" "January 2013" "Chef 10.18.0" "Chef Manual" +.TH "KNIFE\-COOKBOOK\-SITE" "1" "January 2013" "Chef 10.18.1" "Chef Manual" . .SH "NAME" \fBknife\-cookbook\-site\fR \- Install and update open source cookbooks diff --git a/chef/distro/common/man/man1/knife-cookbook.1 b/chef/distro/common/man/man1/knife-cookbook.1 index 4c28347624..93c6a3807f 100644 --- a/chef/distro/common/man/man1/knife-cookbook.1 +++ b/chef/distro/common/man/man1/knife-cookbook.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-COOKBOOK" "1" "January 2013" "Chef 10.18.0" "Chef Manual" +.TH "KNIFE\-COOKBOOK" "1" "January 2013" "Chef 10.18.1" "Chef Manual" . .SH "NAME" \fBknife\-cookbook\fR \- upload and manage chef cookbooks diff --git a/chef/distro/common/man/man1/knife-data-bag.1 b/chef/distro/common/man/man1/knife-data-bag.1 index 08eb31a69e..edff887490 100644 --- a/chef/distro/common/man/man1/knife-data-bag.1 +++ b/chef/distro/common/man/man1/knife-data-bag.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-DATA\-BAG" "1" "January 2013" "Chef 10.18.0" "Chef Manual" +.TH "KNIFE\-DATA\-BAG" "1" "January 2013" "Chef 10.18.1" "Chef Manual" . .SH "NAME" \fBknife\-data\-bag\fR \- Store arbitrary data on a Chef Server diff --git a/chef/distro/common/man/man1/knife-environment.1 b/chef/distro/common/man/man1/knife-environment.1 index 9371da4038..921d2d8d95 100644 --- a/chef/distro/common/man/man1/knife-environment.1 +++ b/chef/distro/common/man/man1/knife-environment.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-ENVIRONMENT" "1" "January 2013" "Chef 10.18.0" "Chef Manual" +.TH "KNIFE\-ENVIRONMENT" "1" "January 2013" "Chef 10.18.1" "Chef Manual" . .SH "NAME" \fBknife\-environment\fR \- Define cookbook policies for the environments in your infrastructure diff --git a/chef/distro/common/man/man1/knife-exec.1 b/chef/distro/common/man/man1/knife-exec.1 index 011b2e9bd2..166828b249 100644 --- a/chef/distro/common/man/man1/knife-exec.1 +++ b/chef/distro/common/man/man1/knife-exec.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-EXEC" "1" "January 2013" "Chef 10.18.0" "Chef Manual" +.TH "KNIFE\-EXEC" "1" "January 2013" "Chef 10.18.1" "Chef Manual" . .SH "NAME" \fBknife\-exec\fR \- Run user scripts using the Chef API DSL diff --git a/chef/distro/common/man/man1/knife-index.1 b/chef/distro/common/man/man1/knife-index.1 index ab6c92410c..656108bed1 100644 --- a/chef/distro/common/man/man1/knife-index.1 +++ b/chef/distro/common/man/man1/knife-index.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-INDEX" "1" "January 2013" "Chef 10.18.0" "Chef Manual" +.TH "KNIFE\-INDEX" "1" "January 2013" "Chef 10.18.1" "Chef Manual" . .SH "NAME" \fBknife\-index\fR \- Rebuild the search index on a Chef Server diff --git a/chef/distro/common/man/man1/knife-node.1 b/chef/distro/common/man/man1/knife-node.1 index 858a3b82de..1b684a1fc1 100644 --- a/chef/distro/common/man/man1/knife-node.1 +++ b/chef/distro/common/man/man1/knife-node.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-NODE" "1" "January 2013" "Chef 10.18.0" "Chef Manual" +.TH "KNIFE\-NODE" "1" "January 2013" "Chef 10.18.1" "Chef Manual" . .SH "NAME" \fBknife\-node\fR \- Manage the hosts in your infrastructure diff --git a/chef/distro/common/man/man1/knife-role.1 b/chef/distro/common/man/man1/knife-role.1 index 431be9a958..f63acdb3bc 100644 --- a/chef/distro/common/man/man1/knife-role.1 +++ b/chef/distro/common/man/man1/knife-role.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-ROLE" "1" "January 2013" "Chef 10.18.0" "Chef Manual" +.TH "KNIFE\-ROLE" "1" "January 2013" "Chef 10.18.1" "Chef Manual" . .SH "NAME" \fBknife\-role\fR \- Group common configuration settings diff --git a/chef/distro/common/man/man1/knife-search.1 b/chef/distro/common/man/man1/knife-search.1 index 8ba267449f..307aa79b84 100644 --- a/chef/distro/common/man/man1/knife-search.1 +++ b/chef/distro/common/man/man1/knife-search.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-SEARCH" "1" "January 2013" "Chef 10.18.0" "Chef Manual" +.TH "KNIFE\-SEARCH" "1" "January 2013" "Chef 10.18.1" "Chef Manual" . .SH "NAME" \fBknife\-search\fR \- Find objects on a Chef Server by query diff --git a/chef/distro/common/man/man1/knife-ssh.1 b/chef/distro/common/man/man1/knife-ssh.1 index bb655256c8..0df752e0ee 100644 --- a/chef/distro/common/man/man1/knife-ssh.1 +++ b/chef/distro/common/man/man1/knife-ssh.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-SSH" "1" "January 2013" "Chef 10.18.0" "Chef Manual" +.TH "KNIFE\-SSH" "1" "January 2013" "Chef 10.18.1" "Chef Manual" . .SH "NAME" \fBknife\-ssh\fR \- Run a command or interactive session on multiple remote hosts diff --git a/chef/distro/common/man/man1/knife-status.1 b/chef/distro/common/man/man1/knife-status.1 index 8c5baf3e8e..8ed6e951a5 100644 --- a/chef/distro/common/man/man1/knife-status.1 +++ b/chef/distro/common/man/man1/knife-status.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-STATUS" "1" "January 2013" "Chef 10.18.0" "Chef Manual" +.TH "KNIFE\-STATUS" "1" "January 2013" "Chef 10.18.1" "Chef Manual" . .SH "NAME" \fBknife\-status\fR \- Display status information for the nodes in your infrastructure diff --git a/chef/distro/common/man/man1/knife-tag.1 b/chef/distro/common/man/man1/knife-tag.1 index 4a65195bb6..049b721a67 100644 --- a/chef/distro/common/man/man1/knife-tag.1 +++ b/chef/distro/common/man/man1/knife-tag.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE\-TAG" "1" "January 2013" "Chef 10.18.0" "Chef Manual" +.TH "KNIFE\-TAG" "1" "January 2013" "Chef 10.18.1" "Chef Manual" . .SH "NAME" \fBknife\-tag\fR \- Apply tags to nodes on a Chef Server diff --git a/chef/distro/common/man/man1/knife.1 b/chef/distro/common/man/man1/knife.1 index a923d4ca71..4bde7bfc03 100644 --- a/chef/distro/common/man/man1/knife.1 +++ b/chef/distro/common/man/man1/knife.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "KNIFE" "1" "January 2013" "Chef 10.18.0" "Chef Manual" +.TH "KNIFE" "1" "January 2013" "Chef 10.18.1" "Chef Manual" . .SH "NAME" \fBknife\fR \- Chef Server API client utility diff --git a/chef/distro/common/man/man1/shef.1 b/chef/distro/common/man/man1/shef.1 index b8b8355e61..5201c25b94 100644 --- a/chef/distro/common/man/man1/shef.1 +++ b/chef/distro/common/man/man1/shef.1 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "SHEF" "1" "January 2013" "Chef 10.18.0" "Chef Manual" +.TH "SHEF" "1" "January 2013" "Chef 10.18.1" "Chef Manual" . .SH "NAME" \fBshef\fR \- Interactive Chef Console diff --git a/chef/distro/common/man/man8/chef-client.8 b/chef/distro/common/man/man8/chef-client.8 index 6091a518a7..1b931c250e 100644 --- a/chef/distro/common/man/man8/chef-client.8 +++ b/chef/distro/common/man/man8/chef-client.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-CLIENT" "8" "January 2013" "Chef 10.18.0" "Chef Manual" +.TH "CHEF\-CLIENT" "8" "January 2013" "Chef 10.18.1" "Chef Manual" . .SH "NAME" \fBchef\-client\fR \- Runs a client node connecting to a chef\-server\. diff --git a/chef/distro/common/man/man8/chef-expander.8 b/chef/distro/common/man/man8/chef-expander.8 index e14d850d93..c6349c3f24 100644 --- a/chef/distro/common/man/man8/chef-expander.8 +++ b/chef/distro/common/man/man8/chef-expander.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-EXPANDER" "8" "January 2013" "Chef 10.18.0" "Chef Manual" +.TH "CHEF\-EXPANDER" "8" "January 2013" "Chef 10.18.1" "Chef Manual" . .SH "NAME" \fBchef\-expander\fR \- fetches messages from RabbitMQ, processes, and loads into chef\-solr diff --git a/chef/distro/common/man/man8/chef-expanderctl.8 b/chef/distro/common/man/man8/chef-expanderctl.8 index 96f0846cb2..0b5ac51765 100644 --- a/chef/distro/common/man/man8/chef-expanderctl.8 +++ b/chef/distro/common/man/man8/chef-expanderctl.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-EXPANDERCTL" "8" "January 2013" "Chef 10.18.0" "Chef Manual" +.TH "CHEF\-EXPANDERCTL" "8" "January 2013" "Chef 10.18.1" "Chef Manual" . .SH "NAME" \fBchef\-expanderctl\fR \- management program for chef\-expander diff --git a/chef/distro/common/man/man8/chef-server-webui.8 b/chef/distro/common/man/man8/chef-server-webui.8 index c2663d71a8..571d94cd5b 100644 --- a/chef/distro/common/man/man8/chef-server-webui.8 +++ b/chef/distro/common/man/man8/chef-server-webui.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-SERVER\-WEBUI" "8" "January 2013" "Chef 10.18.0" "Chef Manual" +.TH "CHEF\-SERVER\-WEBUI" "8" "January 2013" "Chef 10.18.1" "Chef Manual" . .SH "NAME" \fBchef\-server\-webui\fR \- Start the Chef Server merb application slice providing Web User Interface (Management Console)\. diff --git a/chef/distro/common/man/man8/chef-server.8 b/chef/distro/common/man/man8/chef-server.8 index 504c930334..8758b65f90 100644 --- a/chef/distro/common/man/man8/chef-server.8 +++ b/chef/distro/common/man/man8/chef-server.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-SERVER" "8" "January 2013" "Chef 10.18.0" "Chef Manual" +.TH "CHEF\-SERVER" "8" "January 2013" "Chef 10.18.1" "Chef Manual" . .SH "NAME" \fBchef\-server\fR \- Start the Chef Server merb application slice\. diff --git a/chef/distro/common/man/man8/chef-solo.8 b/chef/distro/common/man/man8/chef-solo.8 index 2b4c2d2360..1e7036f0dd 100644 --- a/chef/distro/common/man/man8/chef-solo.8 +++ b/chef/distro/common/man/man8/chef-solo.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-SOLO" "8" "January 2013" "Chef 10.18.0" "Chef Manual" +.TH "CHEF\-SOLO" "8" "January 2013" "Chef 10.18.1" "Chef Manual" . .SH "NAME" \fBchef\-solo\fR \- Runs chef in solo mode against a specified cookbook location\. diff --git a/chef/distro/common/man/man8/chef-solr.8 b/chef/distro/common/man/man8/chef-solr.8 index d7dac912a3..720d27d949 100644 --- a/chef/distro/common/man/man8/chef-solr.8 +++ b/chef/distro/common/man/man8/chef-solr.8 @@ -1,7 +1,7 @@ .\" generated with Ronn/v0.7.3 .\" http://github.com/rtomayko/ronn/tree/0.7.3 . -.TH "CHEF\-SOLR" "8" "January 2013" "Chef 10.18.0" "Chef Manual" +.TH "CHEF\-SOLR" "8" "January 2013" "Chef 10.18.1" "Chef Manual" . .SH "NAME" \fBchef\-solr\fR \- Runs as Chef\'s search server diff --git a/chef/lib/chef/version.rb b/chef/lib/chef/version.rb index 4c1b9c89eb..4e7f94f82f 100644 --- a/chef/lib/chef/version.rb +++ b/chef/lib/chef/version.rb @@ -17,7 +17,7 @@ class Chef CHEF_ROOT = File.dirname(File.expand_path(File.dirname(__FILE__))) - VERSION = '10.18.0' + VERSION = '10.18.1' end # NOTE: the Chef::Version class is defined in version_class.rb -- cgit v1.2.1 From 04a8406213741d2e4606a188f36d85e4ad1b7ae6 Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Wed, 16 Jan 2013 17:01:44 -0800 Subject: [CHEF-3771] fix spurious warnings about resource cloning --- chef/lib/chef/resource.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chef/lib/chef/resource.rb b/chef/lib/chef/resource.rb index b5ed8b74bb..18dc3d222c 100644 --- a/chef/lib/chef/resource.rb +++ b/chef/lib/chef/resource.rb @@ -262,9 +262,11 @@ F def load_prior_resource begin + prior_resource = run_context.resource_collection.lookup(self.to_s) + # if we get here, there is a prior resource (otherwise we'd have jumped + # to the rescue clause). Chef::Log.warn("Cloning resource attributes for #{self.to_s} from prior resource (CHEF-3694)") Chef::Log.warn("From: #{self.source_line}") if self.source_line - prior_resource = run_context.resource_collection.lookup(self.to_s) prior_resource.instance_variables.each do |iv| unless iv.to_sym == :@source_line || iv.to_sym == :@action || iv.to_sym == :@not_if || iv.to_sym == :@only_if self.instance_variable_set(iv, prior_resource.instance_variable_get(iv)) -- cgit v1.2.1 From 3c43e6e5cfcfc4f3fe564329cdfb55804b3724a7 Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Thu, 17 Jan 2013 09:13:19 -0800 Subject: show location of old resource --- chef/lib/chef/resource.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/chef/lib/chef/resource.rb b/chef/lib/chef/resource.rb index 18dc3d222c..2ffc30823b 100644 --- a/chef/lib/chef/resource.rb +++ b/chef/lib/chef/resource.rb @@ -266,7 +266,8 @@ F # if we get here, there is a prior resource (otherwise we'd have jumped # to the rescue clause). Chef::Log.warn("Cloning resource attributes for #{self.to_s} from prior resource (CHEF-3694)") - Chef::Log.warn("From: #{self.source_line}") if self.source_line + Chef::Log.warn("Previous #{prior_resource}: #{prior_resource.source_line}") if prior_resource.source_line + Chef::Log.warn("Current: #{self.source_line}") if self.source_line prior_resource.instance_variables.each do |iv| unless iv.to_sym == :@source_line || iv.to_sym == :@action || iv.to_sym == :@not_if || iv.to_sym == :@only_if self.instance_variable_set(iv, prior_resource.instance_variable_get(iv)) -- cgit v1.2.1 From 909c147ce768bfed57325f4ef584c680fe807dd8 Mon Sep 17 00:00:00 2001 From: danielsdeleo Date: Thu, 17 Jan 2013 09:17:40 -0800 Subject: [CHEF-3771] align info in matched warnings --- chef/lib/chef/resource.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chef/lib/chef/resource.rb b/chef/lib/chef/resource.rb index 2ffc30823b..bebb3a1d82 100644 --- a/chef/lib/chef/resource.rb +++ b/chef/lib/chef/resource.rb @@ -267,7 +267,7 @@ F # to the rescue clause). Chef::Log.warn("Cloning resource attributes for #{self.to_s} from prior resource (CHEF-3694)") Chef::Log.warn("Previous #{prior_resource}: #{prior_resource.source_line}") if prior_resource.source_line - Chef::Log.warn("Current: #{self.source_line}") if self.source_line + Chef::Log.warn("Current #{self}: #{self.source_line}") if self.source_line prior_resource.instance_variables.each do |iv| unless iv.to_sym == :@source_line || iv.to_sym == :@action || iv.to_sym == :@not_if || iv.to_sym == :@only_if self.instance_variable_set(iv, prior_resource.instance_variable_get(iv)) -- cgit v1.2.1