summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc A. Paradise <marc.paradise@gmail.com>2021-03-30 12:56:20 -0400
committerMarc A. Paradise <marc.paradise@gmail.com>2021-03-31 13:52:49 -0400
commited301ac33894e25ace697f446eaa7fa610f920e0 (patch)
treed9c0ceec32d2f4da1f8622981c4fa7a08eff99e1
parent511efdc684ba5029c6cb2226acbf2cc81748a25d (diff)
downloadchef-ed301ac33894e25ace697f446eaa7fa610f920e0.tar.gz
do not use nonexistant bin path as cwd
Signed-off-by: Marc A. Paradise <marc.paradise@gmail.com>
-rwxr-xr-xbin/knife2
-rw-r--r--knife/Gemfile.lock347
-rwxr-xr-xknife/bin/knife2
-rw-r--r--spec/integration/client/client_spec.rb2
-rw-r--r--spec/integration/client/exit_code_spec.rb2
-rw-r--r--spec/integration/client/ipv6_spec.rb2
-rw-r--r--spec/integration/compliance/compliance_spec.rb2
-rw-r--r--spec/integration/recipes/accumulator_spec.rb2
-rw-r--r--spec/integration/recipes/lwrp_inline_resources_spec.rb2
-rw-r--r--spec/integration/recipes/lwrp_spec.rb2
-rw-r--r--spec/integration/recipes/notifies_spec.rb2
-rw-r--r--spec/integration/recipes/notifying_block_spec.rb2
-rw-r--r--spec/integration/recipes/unified_mode_spec.rb2
-rw-r--r--spec/integration/recipes/use_partial_spec.rb2
14 files changed, 360 insertions, 13 deletions
diff --git a/bin/knife b/bin/knife
index 85ac3b91e9..aebc0f72d7 100755
--- a/bin/knife
+++ b/bin/knife
@@ -3,7 +3,7 @@
# ./knife - Chef CLI interface
#
# Author:: Adam Jacob (<adam@chef.io>)
-# Copyright:: Copyright 2009-2018, Chef Software Inc.
+# Copyright:: Copyright Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/knife/Gemfile.lock b/knife/Gemfile.lock
new file mode 100644
index 0000000000..bac30cbb98
--- /dev/null
+++ b/knife/Gemfile.lock
@@ -0,0 +1,347 @@
+GIT
+ remote: https://github.com/chef/chefstyle.git
+ revision: 6d136684438e8809e703feb84c46c69e90e042a7
+ branch: master
+ specs:
+ chefstyle (1.7.4)
+ rubocop (= 1.12.0)
+
+GIT
+ remote: https://github.com/chef/ohai.git
+ revision: 74bde1d4b0fafb6192d1e1b135c13a37a80b2fb6
+ branch: master
+ specs:
+ ohai (17.0.30)
+ chef-config (>= 12.8, < 18)
+ chef-utils (>= 16.0, < 18)
+ ffi (~> 1.9)
+ ffi-yajl (~> 2.2)
+ ipaddress
+ mixlib-cli (>= 1.7.0)
+ mixlib-config (>= 2.0, < 4.0)
+ mixlib-log (>= 2.0.1, < 4.0)
+ mixlib-shellout (>= 2.0, < 4.0)
+ plist (~> 3.1)
+ train-core
+ wmi-lite (~> 1.0)
+
+PATH
+ remote: ../chef-bin
+ specs:
+ chef-bin (17.0.173)
+ chef (= 17.0.173)
+
+PATH
+ remote: ..
+ specs:
+ chef (17.0.173)
+ addressable
+ bcrypt_pbkdf (~> 1.1)
+ chef-config (= 17.0.173)
+ chef-utils (= 17.0.173)
+ chef-vault
+ chef-zero (>= 14.0.11)
+ diff-lcs (>= 1.2.4, < 1.4.0)
+ ed25519 (~> 1.2)
+ erubis (~> 2.7)
+ ffi (>= 1.5.0)
+ ffi-libarchive (~> 1.0, >= 1.0.3)
+ ffi-yajl (~> 2.2)
+ highline (>= 1.6.9, < 3)
+ iniparse (~> 1.4)
+ inspec-core (~> 4.23)
+ license-acceptance (>= 1.0.5, < 3)
+ mixlib-archive (>= 0.4, < 2.0)
+ mixlib-authentication (>= 2.1, < 4)
+ mixlib-cli (>= 2.1.1, < 3.0)
+ mixlib-log (>= 2.0.3, < 4.0)
+ mixlib-shellout (>= 3.1.1, < 4.0)
+ net-sftp (>= 2.1.2, < 4.0)
+ net-ssh (>= 5.1, < 7)
+ net-ssh-multi (~> 1.2, >= 1.2.1)
+ ohai (~> 17.0)
+ pastel
+ plist (~> 3.2)
+ proxifier (~> 1.0)
+ syslog-logger (~> 1.6)
+ train-core (~> 3.2, >= 3.2.28)
+ train-winrm (>= 0.2.5)
+ tty-prompt (~> 0.21)
+ tty-screen (~> 0.6)
+ tty-table (~> 0.11)
+ uuidtools (>= 2.1.5, < 3.0)
+
+PATH
+ remote: /home/marc/projects/chef/chef-config
+ specs:
+ chef-config (17.0.173)
+ addressable
+ chef-utils (= 17.0.173)
+ fuzzyurl
+ mixlib-config (>= 2.2.12, < 4.0)
+ mixlib-shellout (>= 2.0, < 4.0)
+ tomlrb (~> 1.2)
+
+PATH
+ remote: /home/marc/projects/chef/chef-utils
+ specs:
+ chef-utils (17.0.173)
+
+GEM
+ remote: https://rubygems.org/
+ specs:
+ addressable (2.7.0)
+ public_suffix (>= 2.0.2, < 5.0)
+ ast (2.4.2)
+ bcrypt_pbkdf (1.1.0)
+ binding_of_caller (1.0.0)
+ debug_inspector (>= 0.0.1)
+ builder (3.2.4)
+ byebug (11.1.3)
+ chef-telemetry (1.0.29)
+ chef-config
+ concurrent-ruby (~> 1.0)
+ chef-vault (4.1.0)
+ chef-zero (15.0.4)
+ ffi-yajl (~> 2.2)
+ hashie (>= 2.0, < 5.0)
+ mixlib-log (>= 2.0, < 4.0)
+ rack (~> 2.0, >= 2.0.6)
+ uuidtools (~> 2.1)
+ webrick
+ cheffish (16.0.12)
+ chef-zero (>= 14.0)
+ net-ssh
+ coderay (1.1.3)
+ concurrent-ruby (1.1.8)
+ crack (0.4.5)
+ rexml
+ debug_inspector (1.1.0)
+ diff-lcs (1.3)
+ ed25519 (1.2.4)
+ erubi (1.10.0)
+ erubis (2.7.0)
+ faraday (1.3.0)
+ faraday-net_http (~> 1.0)
+ multipart-post (>= 1.2, < 3)
+ ruby2_keywords
+ faraday-net_http (1.0.1)
+ faraday_middleware (1.0.0)
+ faraday (~> 1.0)
+ ffi (1.15.0)
+ ffi-libarchive (1.0.17)
+ ffi (~> 1.0)
+ ffi-yajl (2.3.4)
+ libyajl2 (~> 1.2)
+ fuzzyurl (0.9.0)
+ gssapi (1.3.1)
+ ffi (>= 1.0.1)
+ gyoku (1.3.1)
+ builder (>= 2.1.2)
+ hashdiff (1.0.1)
+ hashie (4.1.0)
+ highline (2.0.3)
+ httpclient (2.8.3)
+ iniparse (1.5.0)
+ inspec-core (4.29.3)
+ addressable (~> 2.4)
+ chef-telemetry (~> 1.0)
+ faraday (>= 0.9.0, < 1.4)
+ faraday_middleware (~> 1.0)
+ hashie (>= 3.4, < 5.0)
+ license-acceptance (>= 0.2.13, < 3.0)
+ method_source (>= 0.8, < 2.0)
+ mixlib-log (~> 3.0)
+ multipart-post (~> 2.0)
+ parallel (~> 1.9)
+ parslet (>= 1.5, < 2.0)
+ pry (~> 0.13)
+ rspec (>= 3.9, < 3.11)
+ rspec-its (~> 1.2)
+ rubyzip (>= 1.2.2, < 3.0)
+ semverse (~> 3.0)
+ sslshake (~> 1.2)
+ thor (>= 0.20, < 2.0)
+ tomlrb (>= 1.2, < 2.1)
+ train-core (~> 3.0)
+ tty-prompt (~> 0.17)
+ tty-table (~> 0.10)
+ ipaddress (0.8.3)
+ json (2.5.1)
+ libyajl2 (1.2.0)
+ license-acceptance (2.1.13)
+ pastel (~> 0.7)
+ tomlrb (>= 1.2, < 3.0)
+ tty-box (~> 0.6)
+ tty-prompt (~> 0.20)
+ little-plugger (1.1.4)
+ logging (2.3.0)
+ little-plugger (~> 1.1)
+ multi_json (~> 1.14)
+ method_source (1.0.0)
+ mixlib-archive (1.1.7)
+ mixlib-log
+ mixlib-authentication (3.0.10)
+ mixlib-cli (2.1.8)
+ mixlib-config (3.0.9)
+ tomlrb
+ mixlib-log (3.0.9)
+ mixlib-shellout (3.2.5)
+ chef-utils
+ multi_json (1.15.0)
+ multipart-post (2.1.1)
+ net-scp (3.0.0)
+ net-ssh (>= 2.6.5, < 7.0.0)
+ net-sftp (3.0.0)
+ net-ssh (>= 5.0.0, < 7.0.0)
+ net-ssh (6.1.0)
+ net-ssh-gateway (2.0.0)
+ net-ssh (>= 4.0.0)
+ net-ssh-multi (1.2.1)
+ net-ssh (>= 2.6.5)
+ net-ssh-gateway (>= 1.2.0)
+ nori (2.6.0)
+ parallel (1.20.1)
+ parser (3.0.0.0)
+ ast (~> 2.4.1)
+ parslet (1.8.2)
+ pastel (0.8.0)
+ tty-color (~> 0.5)
+ plist (3.6.0)
+ proxifier (1.0.3)
+ pry (0.14.0)
+ coderay (~> 1.1)
+ method_source (~> 1.0)
+ pry-byebug (3.8.0)
+ byebug (~> 11.0)
+ pry (~> 0.10)
+ pry-stack_explorer (0.6.1)
+ binding_of_caller (~> 1.0)
+ pry (~> 0.13)
+ public_suffix (4.0.6)
+ rack (2.2.3)
+ rainbow (3.0.0)
+ rake (13.0.3)
+ regexp_parser (2.1.1)
+ rexml (3.2.4)
+ rspec (3.10.0)
+ rspec-core (~> 3.10.0)
+ rspec-expectations (~> 3.10.0)
+ rspec-mocks (~> 3.10.0)
+ rspec-core (3.10.1)
+ rspec-support (~> 3.10.0)
+ rspec-expectations (3.10.1)
+ diff-lcs (>= 1.2.0, < 2.0)
+ rspec-support (~> 3.10.0)
+ rspec-its (1.3.0)
+ rspec-core (>= 3.0.0)
+ rspec-expectations (>= 3.0.0)
+ rspec-mocks (3.10.2)
+ diff-lcs (>= 1.2.0, < 2.0)
+ rspec-support (~> 3.10.0)
+ rspec-support (3.10.2)
+ rubocop (1.12.0)
+ parallel (~> 1.10)
+ parser (>= 3.0.0.0)
+ rainbow (>= 2.2.2, < 4.0)
+ regexp_parser (>= 1.8, < 3.0)
+ rexml
+ rubocop-ast (>= 1.2.0, < 2.0)
+ ruby-progressbar (~> 1.7)
+ unicode-display_width (>= 1.4.0, < 3.0)
+ rubocop-ast (1.4.1)
+ parser (>= 2.7.1.5)
+ ruby-prof (1.2.0)
+ ruby-progressbar (1.11.0)
+ ruby2_keywords (0.0.4)
+ rubyntlm (0.6.3)
+ rubyzip (2.3.0)
+ semverse (3.0.0)
+ sslshake (1.3.1)
+ strings (0.2.1)
+ strings-ansi (~> 0.2)
+ unicode-display_width (>= 1.5, < 3.0)
+ unicode_utils (~> 1.4)
+ strings-ansi (0.2.0)
+ syslog-logger (1.6.8)
+ thor (1.1.0)
+ tomlrb (1.3.0)
+ train-core (3.5.5)
+ addressable (~> 2.5)
+ ffi (!= 1.13.0)
+ json (>= 1.8, < 3.0)
+ mixlib-shellout (>= 2.0, < 4.0)
+ net-scp (>= 1.2, < 4.0)
+ net-ssh (>= 2.9, < 7.0)
+ train-winrm (0.2.12)
+ winrm (>= 2.3.6, < 3.0)
+ winrm-elevated (~> 1.2.2)
+ winrm-fs (~> 1.0)
+ tty-box (0.7.0)
+ pastel (~> 0.8)
+ strings (~> 0.2.0)
+ tty-cursor (~> 0.7)
+ tty-color (0.6.0)
+ tty-cursor (0.7.1)
+ tty-prompt (0.23.0)
+ pastel (~> 0.8)
+ tty-reader (~> 0.8)
+ tty-reader (0.9.0)
+ tty-cursor (~> 0.7)
+ tty-screen (~> 0.8)
+ wisper (~> 2.0)
+ tty-screen (0.8.1)
+ tty-table (0.12.0)
+ pastel (~> 0.8)
+ strings (~> 0.2.0)
+ tty-screen (~> 0.8)
+ unicode-display_width (2.0.0)
+ unicode_utils (1.4.0)
+ uuidtools (2.2.0)
+ webmock (3.12.2)
+ addressable (>= 2.3.6)
+ crack (>= 0.3.2)
+ hashdiff (>= 0.4.0, < 2.0.0)
+ webrick (1.7.0)
+ winrm (2.3.6)
+ builder (>= 2.1.2)
+ erubi (~> 1.8)
+ gssapi (~> 1.2)
+ gyoku (~> 1.0)
+ httpclient (~> 2.2, >= 2.2.0.2)
+ logging (>= 1.6.1, < 3.0)
+ nori (~> 2.0)
+ rubyntlm (~> 0.6.0, >= 0.6.3)
+ winrm-elevated (1.2.3)
+ erubi (~> 1.8)
+ winrm (~> 2.0)
+ winrm-fs (~> 1.0)
+ winrm-fs (1.3.5)
+ erubi (~> 1.8)
+ logging (>= 1.6.1, < 3.0)
+ rubyzip (~> 2.0)
+ winrm (~> 2.0)
+ wisper (2.0.1)
+ wmi-lite (1.0.5)
+
+PLATFORMS
+ x86_64-linux
+
+DEPENDENCIES
+ chef!
+ chef-bin!
+ chef-config!
+ chef-utils!
+ cheffish (>= 14)
+ chefstyle!
+ ohai!
+ pry
+ pry-byebug
+ pry-stack_explorer
+ rake
+ rspec
+ ruby-prof (< 1.3.0)
+ webmock
+
+BUNDLED WITH
+ 2.2.3
diff --git a/knife/bin/knife b/knife/bin/knife
index 85ac3b91e9..aebc0f72d7 100755
--- a/knife/bin/knife
+++ b/knife/bin/knife
@@ -3,7 +3,7 @@
# ./knife - Chef CLI interface
#
# Author:: Adam Jacob (<adam@chef.io>)
-# Copyright:: Copyright 2009-2018, Chef Software Inc.
+# Copyright:: Copyright Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/spec/integration/client/client_spec.rb b/spec/integration/client/client_spec.rb
index ebde310eaf..a64271c8f2 100644
--- a/spec/integration/client/client_spec.rb
+++ b/spec/integration/client/client_spec.rb
@@ -34,7 +34,7 @@ describe "chef-client" do
include IntegrationSupport
include Chef::Mixin::ShellOut
- let(:chef_dir) { File.join(__dir__, "..", "..", "..", "bin") }
+ let(:chef_dir) { File.join(__dir__, "..", "..", "..") }
# Invoke `chef-client` as `ruby PATH/TO/chef-client`. This ensures the
# following constraints are satisfied:
diff --git a/spec/integration/client/exit_code_spec.rb b/spec/integration/client/exit_code_spec.rb
index 53a8f1f895..f552ae0fc1 100644
--- a/spec/integration/client/exit_code_spec.rb
+++ b/spec/integration/client/exit_code_spec.rb
@@ -12,7 +12,7 @@ describe "chef-client" do
include IntegrationSupport
include Chef::Mixin::ShellOut
- let(:chef_dir) { File.join(__dir__, "..", "..", "..", "bin") }
+ let(:chef_dir) { File.join(__dir__, "..", "..", "..") }
# Invoke `chef-client` as `ruby PATH/TO/chef-client`. This ensures the
# following constraints are satisfied:
diff --git a/spec/integration/client/ipv6_spec.rb b/spec/integration/client/ipv6_spec.rb
index 816e1c40e6..f575f9db95 100644
--- a/spec/integration/client/ipv6_spec.rb
+++ b/spec/integration/client/ipv6_spec.rb
@@ -74,7 +74,7 @@ describe "chef-client" do
basic_config_file
end
- let(:chef_dir) { File.join(__dir__, "..", "..", "..", "bin") }
+ let(:chef_dir) { File.join(__dir__, "..", "..", "..") }
let(:chef_client_cmd) { %Q{bundle exec chef-client --minimal-ohai -c "#{path_to("config/client.rb")}" -lwarn} }
diff --git a/spec/integration/compliance/compliance_spec.rb b/spec/integration/compliance/compliance_spec.rb
index effc9ab87d..70d048c7fc 100644
--- a/spec/integration/compliance/compliance_spec.rb
+++ b/spec/integration/compliance/compliance_spec.rb
@@ -9,7 +9,7 @@ describe "chef-client with compliance phase" do
include IntegrationSupport
include Chef::Mixin::ShellOut
- let(:chef_dir) { File.join(__dir__, "..", "..", "..", "bin") }
+ let(:chef_dir) { File.join(__dir__, "..", "..", "..") }
# Invoke `chef-client` as `ruby PATH/TO/chef-client`. This ensures the
# following constraints are satisfied:
diff --git a/spec/integration/recipes/accumulator_spec.rb b/spec/integration/recipes/accumulator_spec.rb
index 329137440c..ba81e82cdd 100644
--- a/spec/integration/recipes/accumulator_spec.rb
+++ b/spec/integration/recipes/accumulator_spec.rb
@@ -6,7 +6,7 @@ describe "Accumulators" do
include IntegrationSupport
include Chef::Mixin::ShellOut
- let(:chef_dir) { File.expand_path("../../../bin", __dir__) }
+ let(:chef_dir) { File.expand_path("../../..", __dir__) }
# Invoke `chef-client` as `ruby PATH/TO/chef-client`. This ensures the
# following constraints are satisfied:
diff --git a/spec/integration/recipes/lwrp_inline_resources_spec.rb b/spec/integration/recipes/lwrp_inline_resources_spec.rb
index 48f7952af0..e5cfb284aa 100644
--- a/spec/integration/recipes/lwrp_inline_resources_spec.rb
+++ b/spec/integration/recipes/lwrp_inline_resources_spec.rb
@@ -6,7 +6,7 @@ describe "LWRPs with inline resources" do
include IntegrationSupport
include Chef::Mixin::ShellOut
- let(:chef_dir) { File.expand_path("../../../bin", __dir__) }
+ let(:chef_dir) { File.expand_path("../../..", __dir__) }
# Invoke `chef-client` as `ruby PATH/TO/chef-client`. This ensures the
# following constraints are satisfied:
diff --git a/spec/integration/recipes/lwrp_spec.rb b/spec/integration/recipes/lwrp_spec.rb
index b7a0589675..060b08ec4a 100644
--- a/spec/integration/recipes/lwrp_spec.rb
+++ b/spec/integration/recipes/lwrp_spec.rb
@@ -6,7 +6,7 @@ describe "LWRPs" do
include IntegrationSupport
include Chef::Mixin::ShellOut
- let(:chef_dir) { File.expand_path("../../../bin", __dir__) }
+ let(:chef_dir) { File.expand_path("../../..", __dir__) }
# Invoke `chef-client` as `ruby PATH/TO/chef-client`. This ensures the
# following constraints are satisfied:
diff --git a/spec/integration/recipes/notifies_spec.rb b/spec/integration/recipes/notifies_spec.rb
index 7dfa70dfe5..725849b4a4 100644
--- a/spec/integration/recipes/notifies_spec.rb
+++ b/spec/integration/recipes/notifies_spec.rb
@@ -22,7 +22,7 @@ describe "notifications" do
include IntegrationSupport
include Chef::Mixin::ShellOut
- let(:chef_dir) { File.expand_path("../../../bin", __dir__) }
+ let(:chef_dir) { File.expand_path("../../..", __dir__) }
let(:chef_client) { "bundle exec chef-client --minimal-ohai" }
when_the_repository "notifies a nameless resource" do
diff --git a/spec/integration/recipes/notifying_block_spec.rb b/spec/integration/recipes/notifying_block_spec.rb
index 7a2c5631c1..4b76bc21d4 100644
--- a/spec/integration/recipes/notifying_block_spec.rb
+++ b/spec/integration/recipes/notifying_block_spec.rb
@@ -23,7 +23,7 @@ describe "notifying_block" do
include IntegrationSupport
include Chef::Mixin::ShellOut
- let(:chef_dir) { File.expand_path("../../../bin", __dir__) }
+ let(:chef_dir) { File.expand_path("../../..", __dir__) }
let(:chef_client) { "bundle exec chef-client --minimal-ohai" }
when_the_repository "notifying_block test one" do
diff --git a/spec/integration/recipes/unified_mode_spec.rb b/spec/integration/recipes/unified_mode_spec.rb
index b2c3620fdb..38ee52511d 100644
--- a/spec/integration/recipes/unified_mode_spec.rb
+++ b/spec/integration/recipes/unified_mode_spec.rb
@@ -6,7 +6,7 @@ describe "Unified Mode" do
include IntegrationSupport
include Chef::Mixin::ShellOut
- let(:chef_dir) { File.expand_path("../../../bin", __dir__) }
+ let(:chef_dir) { File.expand_path("../../..", __dir__) }
let(:chef_client) { "bundle exec chef-client --minimal-ohai" }
diff --git a/spec/integration/recipes/use_partial_spec.rb b/spec/integration/recipes/use_partial_spec.rb
index c9f1e8e509..3900c75944 100644
--- a/spec/integration/recipes/use_partial_spec.rb
+++ b/spec/integration/recipes/use_partial_spec.rb
@@ -22,7 +22,7 @@ describe "notifying_block" do
include IntegrationSupport
include Chef::Mixin::ShellOut
- let(:chef_dir) { File.expand_path("../../../bin", __dir__) }
+ let(:chef_dir) { File.expand_path("../../..", __dir__) }
let(:chef_client) { "bundle exec chef-client --minimal-ohai" }
when_the_repository "has a cookbook with partial resources" do