chef-apply 0.7.1 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f30291abd4af8458afefb7462bce10d03a063fe81b97eebd51d531cb3f143b9
4
- data.tar.gz: 999fe608ed0c409c242079e43de8f19a9498b5310a262b632de2594175803c63
3
+ metadata.gz: dcf42f06fe2a7733f4c9755f5cd02b965f45b31e7666db57345b48f0e9692d54
4
+ data.tar.gz: f667eca9ca4afb06480ba754c3de012eb7435c3d1552142e7dbd491c124bf441
5
5
  SHA512:
6
- metadata.gz: 35be39538674afbaa34893e1231e34c5ddedc6b5ca13c251a2cb3e75790ed41a332d3ca04f130bc9c18cdf563f45d12aa003f290bb88f1cd555d228cabd3e987
7
- data.tar.gz: 5438e35ec7367378afcc841bcca6e3e57f35b98cc0153ab67d9d8515321d4c65a69c5214fcbacaa8a8d89dfe13d2fcce4fb40f3acdfb6ddcfa6ff8f1de01cc9f
6
+ metadata.gz: 47f31dfb20d1562308d4b2735f8f3f225bf7de794e2fcbb47c7d6cff362d763df7681bf4ed005aec0d74816570e7caa39f164aabdaadca1172db25ab0b8fc7e4
7
+ data.tar.gz: 7b4d37d955d6faa57c8314e6d9fd116b850ca76e78bbbdca506a4b51942fa5daed30d5b0cd310c6e89e34047583d5ab23f813c9775065da035c215095e7462f7
data/Gemfile CHANGED
@@ -19,7 +19,7 @@ source "https://rubygems.org"
19
19
  gemspec
20
20
 
21
21
  group :development do
22
- gem "chefstyle", "2.0.7"
22
+ gem "chefstyle", "2.0.8"
23
23
  gem "rake", ">= 10.1.0"
24
24
  gem "rspec", "~> 3.0"
25
25
  gem "simplecov"
@@ -14,7 +14,6 @@
14
14
  # See the License for the specific language governing permissions and
15
15
  # limitations under the License.
16
16
  #
17
-
18
17
  require_relative "base"
19
18
  require_relative "install_chef/minimum_chef_version"
20
19
  require "fileutils" unless defined?(FileUtils)
@@ -98,6 +97,8 @@ module ChefApply
98
97
  opts[:platform] = "el"
99
98
  when "suse"
100
99
  opts[:platform] = "sles"
100
+ when "solaris"
101
+ opts[:platform] = "solaris2"
101
102
  when "amazon"
102
103
  opts[:platform] = "el"
103
104
  if platform.release.to_i > 2010 # legacy Amazon version 1
@@ -36,6 +36,10 @@ module ChefApply
36
36
  13 => Gem::Version.new("13.10.4"),
37
37
  14 => Gem::Version.new("14.1.1"),
38
38
  },
39
+ solaris: {
40
+ 13 => Gem::Version.new("13.10.4"),
41
+ 14 => Gem::Version.new("14.1.1"),
42
+ },
39
43
  }.freeze
40
44
 
41
45
  def self.check!(target, check_only)
@@ -18,7 +18,6 @@
18
18
  require_relative "log"
19
19
  require_relative "error"
20
20
  require "train"
21
-
22
21
  module ChefApply
23
22
  class TargetHost
24
23
  attr_reader :config, :reporter, :backend, :transport_type
@@ -142,6 +141,9 @@ module ChefApply
142
141
  when :macos
143
142
  require_relative "target_host/macos"
144
143
  class << self; include ChefApply::TargetHost::MacOS; end
144
+ when :solaris
145
+ require_relative "target_host/solaris"
146
+ class << self; include ChefApply::TargetHost::Solaris; end
145
147
  when :other
146
148
  raise ChefApply::TargetHost::UnsupportedTargetOS.new(platform.name)
147
149
  end
@@ -174,6 +176,8 @@ module ChefApply
174
176
  :linux
175
177
  elsif platform.darwin?
176
178
  :macos
179
+ elsif platform.solaris?
180
+ :solaris
177
181
  else
178
182
  :other
179
183
  end
@@ -312,7 +316,7 @@ module ChefApply
312
316
  case original_exception.message # original_exception.reason
313
317
  when /Sudo requires a password/ # :sudo_password_required
314
318
  "CHEFTRN003"
315
- when /Wrong sudo password/ #:bad_sudo_password
319
+ when /Wrong sudo password/ # :bad_sudo_password
316
320
  "CHEFTRN004"
317
321
  when /Can't find sudo command/, /No such file/, /command not found/ # :sudo_command_not_found
318
322
  # NOTE: In the /No such file/ case, reason will be nil - we still have
@@ -0,0 +1,55 @@
1
+ module ChefApply
2
+ class TargetHost
3
+ module Solaris
4
+
5
+ def omnibus_manifest_path
6
+ # Note that we can't use File::Join, because that will render for the
7
+ # CURRENT platform - not the platform of the target.
8
+ "/opt/chef/version-manifest.json"
9
+ end
10
+
11
+ def mkdir(path)
12
+ run_command!("mkdir -p #{path}")
13
+ end
14
+
15
+ def chown(path, owner)
16
+ owner ||= user
17
+ run_command!("chown #{owner} '#{path}'")
18
+ nil
19
+ end
20
+
21
+ def make_temp_dir
22
+ # We will cache this so that we only run this once
23
+ @tempdir ||= begin
24
+ res = run_command!("bash -c '#{MKTEMP_COMMAND}'")
25
+ res.stdout.chomp.strip
26
+ end
27
+ end
28
+
29
+ def install_package(target_package_path)
30
+ command = "pkg install -g #{target_package_path} chef"
31
+ run_command!(command)
32
+ end
33
+
34
+ def del_file(path)
35
+ run_command!("rm -rf #{path}")
36
+ end
37
+
38
+ def del_dir(path)
39
+ del_file(path)
40
+ end
41
+
42
+ def ws_cache_path
43
+ "/var/chef-workstation"
44
+ end
45
+
46
+ # Nothing to escape in a unix-based path
47
+ def normalize_path(path)
48
+ path
49
+ end
50
+
51
+ MKTEMP_COMMAND = "d=$(mktemp -d -p${TMPDIR:-/tmp} chef_XXXXXX); echo $d".freeze
52
+
53
+ end
54
+ end
55
+ end
@@ -22,7 +22,6 @@ require_relative "../config"
22
22
  require_relative "../log"
23
23
  require_relative "plain_text_element"
24
24
  require_relative "plain_text_header"
25
-
26
25
  module ChefApply
27
26
  module UI
28
27
  class Terminal
@@ -16,5 +16,5 @@
16
16
  #
17
17
 
18
18
  module ChefApply
19
- VERSION = "0.7.1".freeze
19
+ VERSION = "0.8.1".freeze
20
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-apply
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chef Software, Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-26 00:00:00.000000000 Z
11
+ date: 2021-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mixlib-cli
@@ -252,6 +252,7 @@ files:
252
252
  - lib/chef_apply/target_host.rb
253
253
  - lib/chef_apply/target_host/linux.rb
254
254
  - lib/chef_apply/target_host/macos.rb
255
+ - lib/chef_apply/target_host/solaris.rb
255
256
  - lib/chef_apply/target_host/windows.rb
256
257
  - lib/chef_apply/target_resolver.rb
257
258
  - lib/chef_apply/telemeter.rb