omnibus 7.0.13 → 8.1.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -6
- data/README.md +38 -6
- data/bin/omnibus +1 -1
- data/lib/omnibus.rb +2 -2
- data/lib/omnibus/build_version.rb +1 -1
- data/lib/omnibus/build_version_dsl.rb +5 -7
- data/lib/omnibus/builder.rb +16 -11
- data/lib/omnibus/cleaner.rb +1 -1
- data/lib/omnibus/cli.rb +2 -2
- data/lib/omnibus/cli/changelog.rb +1 -1
- data/lib/omnibus/compressors/base.rb +1 -1
- data/lib/omnibus/compressors/dmg.rb +5 -2
- data/lib/omnibus/compressors/tgz.rb +2 -2
- data/lib/omnibus/config.rb +1 -1
- data/lib/omnibus/core_extensions/open_uri.rb +1 -1
- data/lib/omnibus/digestable.rb +2 -2
- data/lib/omnibus/download_helpers.rb +6 -2
- data/lib/omnibus/fetchers/file_fetcher.rb +1 -1
- data/lib/omnibus/fetchers/net_fetcher.rb +1 -1
- data/lib/omnibus/fetchers/path_fetcher.rb +1 -1
- data/lib/omnibus/file_syncer.rb +1 -1
- data/lib/omnibus/generator.rb +2 -2
- data/lib/omnibus/generator_files/README.md.erb +2 -1
- data/lib/omnibus/git_cache.rb +2 -2
- data/lib/omnibus/health_check.rb +2 -0
- data/lib/omnibus/licensing.rb +2 -2
- data/lib/omnibus/logger.rb +1 -1
- data/lib/omnibus/manifest.rb +1 -1
- data/lib/omnibus/manifest_diff.rb +7 -13
- data/lib/omnibus/metadata.rb +8 -4
- data/lib/omnibus/ohai.rb +1 -1
- data/lib/omnibus/package.rb +1 -1
- data/lib/omnibus/packager.rb +6 -14
- data/lib/omnibus/packagers/base.rb +1 -1
- data/lib/omnibus/packagers/msi.rb +1 -1
- data/lib/omnibus/packagers/pkg.rb +14 -4
- data/lib/omnibus/packagers/rpm.rb +23 -9
- data/lib/omnibus/packagers/solaris.rb +1 -1
- data/lib/omnibus/project.rb +2 -2
- data/lib/omnibus/publishers/artifactory_publisher.rb +2 -2
- data/lib/omnibus/s3_cache.rb +1 -1
- data/lib/omnibus/s3_helpers.rb +1 -1
- data/lib/omnibus/software.rb +5 -16
- data/lib/omnibus/sugarable.rb +5 -14
- data/lib/omnibus/templating.rb +1 -1
- data/lib/omnibus/thread_pool.rb +0 -2
- data/lib/omnibus/util.rb +1 -1
- data/lib/omnibus/version.rb +1 -1
- data/lib/omnibus/whitelist.rb +22 -0
- data/omnibus.gemspec +8 -8
- data/resources/ips/doc-transform.erb +1 -0
- data/resources/msi/CustomActionFastMsi.CA.dll +0 -0
- data/resources/msi/source.wxs.erb +2 -10
- data/resources/pkg/distribution.xml.erb +1 -1
- data/resources/rpm/spec.erb +2 -2
- data/spec/functional/fetchers/net_fetcher_spec.rb +2 -11
- data/spec/support/path_helpers.rb +2 -2
- data/spec/unit/compressor_spec.rb +2 -2
- data/spec/unit/compressors/dmg_spec.rb +12 -9
- data/spec/unit/compressors/tgz_spec.rb +4 -4
- data/spec/unit/fetchers/net_fetcher_spec.rb +5 -1
- data/spec/unit/metadata_spec.rb +8 -6
- data/spec/unit/packager_spec.rb +7 -14
- data/spec/unit/packagers/ips_spec.rb +1 -0
- data/spec/unit/packagers/pkg_spec.rb +20 -4
- data/spec/unit/packagers/rpm_spec.rb +15 -5
- data/spec/unit/project_spec.rb +6 -6
- data/spec/unit/software_spec.rb +29 -120
- metadata +36 -16
data/lib/omnibus/templating.rb
CHANGED
data/lib/omnibus/thread_pool.rb
CHANGED
data/lib/omnibus/util.rb
CHANGED
data/lib/omnibus/version.rb
CHANGED
data/lib/omnibus/whitelist.rb
CHANGED
@@ -58,6 +58,27 @@ AIX_WHITELIST_LIBS = [
|
|
58
58
|
/unix$/,
|
59
59
|
].freeze
|
60
60
|
|
61
|
+
OMNIOS_WHITELIST_LIBS = [
|
62
|
+
/libc\.so\.1/,
|
63
|
+
/libcrypt\./,
|
64
|
+
/libcrypt\.so\.1/,
|
65
|
+
/libdl\.so\.1/,
|
66
|
+
/libgcc_s\.so\.1/,
|
67
|
+
/libgen\.so\.1/,
|
68
|
+
/libm\.so\.2/,
|
69
|
+
/libmd\.so\.1/,
|
70
|
+
/libmp\.so/,
|
71
|
+
/libmp\.so\.2/,
|
72
|
+
/libnsl\.so\.1/,
|
73
|
+
/libpthread\.so\.1/,
|
74
|
+
/librt\.so\.1/,
|
75
|
+
/libsocket\.so\.1/,
|
76
|
+
/libssp\.s/,
|
77
|
+
/libssp\.so./,
|
78
|
+
/libssp\.so\.0/,
|
79
|
+
/libgcc_s\.so\.1/,
|
80
|
+
].freeze
|
81
|
+
|
61
82
|
SOLARIS_WHITELIST_LIBS = [
|
62
83
|
/libaio\.so/,
|
63
84
|
/libavl\.so/,
|
@@ -141,6 +162,7 @@ MAC_WHITELIST_LIBS = [
|
|
141
162
|
/libc\+\+\.1\.dylib/,
|
142
163
|
/libzstd\.1\.dylib/,
|
143
164
|
/Security/,
|
165
|
+
/SystemConfiguration/,
|
144
166
|
].freeze
|
145
167
|
|
146
168
|
FREEBSD_WHITELIST_LIBS = [
|
data/omnibus.gemspec
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
|
2
|
-
lib = File.expand_path("../lib", __FILE__)
|
1
|
+
lib = File.expand_path("lib", __dir__)
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
3
|
require "omnibus/version"
|
5
4
|
|
@@ -13,7 +12,7 @@ Gem::Specification.new do |gem|
|
|
13
12
|
gem.description = gem.summary
|
14
13
|
gem.homepage = "https://github.com/chef/omnibus"
|
15
14
|
|
16
|
-
gem.required_ruby_version = ">= 2.
|
15
|
+
gem.required_ruby_version = ">= 2.6"
|
17
16
|
|
18
17
|
gem.files = %w{ LICENSE README.md Rakefile Gemfile } + Dir.glob("*.gemspec") + Dir.glob("{bin,lib,resources,spec}/**/{*,.kitchen*}")
|
19
18
|
gem.bindir = "bin"
|
@@ -22,22 +21,23 @@ Gem::Specification.new do |gem|
|
|
22
21
|
gem.require_paths = ["lib"]
|
23
22
|
|
24
23
|
gem.add_dependency "aws-sdk-s3", "~> 1"
|
25
|
-
gem.add_dependency "chef-
|
24
|
+
gem.add_dependency "chef-utils", ">= 15.4"
|
26
25
|
gem.add_dependency "chef-cleanroom", "~> 1.0"
|
27
26
|
gem.add_dependency "ffi-yajl", "~> 2.2"
|
28
27
|
gem.add_dependency "mixlib-shellout", ">= 2.0", "< 4.0"
|
29
|
-
gem.add_dependency "ohai", ">=
|
28
|
+
gem.add_dependency "ohai", ">= 15", "< 17"
|
30
29
|
gem.add_dependency "ruby-progressbar", "~> 1.7"
|
31
30
|
gem.add_dependency "thor", ">= 0.18", "< 2.0"
|
32
31
|
gem.add_dependency "license_scout", "~> 1.0"
|
32
|
+
gem.add_dependency "contracts", ">= 0.16.0", "< 0.17.0"
|
33
33
|
|
34
34
|
gem.add_dependency "mixlib-versioning"
|
35
35
|
gem.add_dependency "pedump"
|
36
36
|
|
37
37
|
gem.add_development_dependency "artifactory", "~> 3.0"
|
38
|
-
gem.add_development_dependency "aruba", "~>
|
39
|
-
gem.add_development_dependency "chefstyle", "= 1.
|
40
|
-
gem.add_development_dependency "fauxhai",
|
38
|
+
gem.add_development_dependency "aruba", "~> 1.1"
|
39
|
+
gem.add_development_dependency "chefstyle", "= 1.7.5"
|
40
|
+
gem.add_development_dependency "fauxhai-ng", ">= 7.5"
|
41
41
|
gem.add_development_dependency "rspec", "~> 3.0"
|
42
42
|
gem.add_development_dependency "rspec-json_expectations"
|
43
43
|
gem.add_development_dependency "rspec-its"
|
Binary file
|
@@ -21,20 +21,12 @@
|
|
21
21
|
<Media Id="1" Cabinet="Project.cab" EmbedCab="yes" CompressionLevel="high" />
|
22
22
|
|
23
23
|
<!--
|
24
|
-
Take advantage of Windows Installer 5.0 feature (if available) to disable
|
25
|
-
checkpointing and other costings that take significant amounts of time
|
24
|
+
Take advantage of Windows Installer 5.0 feature (if available) to disable
|
25
|
+
checkpointing and other costings that take significant amounts of time
|
26
26
|
ref: https://msdn.microsoft.com/en-us/library/windows/desktop/dd408005(v=vs.85).aspx
|
27
27
|
-->
|
28
28
|
<Property Id="MSIFASTINSTALL" Value="7" />
|
29
29
|
|
30
|
-
<!--
|
31
|
-
Uncomment launch condition below to check for minimum OS
|
32
|
-
601 = Windows 7/Server 2008R2.
|
33
|
-
-->
|
34
|
-
<!-- Condition Message="!(loc.MinimumOSVersionMessage)">
|
35
|
-
<![CDATA[Installed OR VersionNT >= 601]]>
|
36
|
-
</Condition -->
|
37
|
-
|
38
30
|
<!-- We always do Major upgrades -->
|
39
31
|
<MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeErrorMessage)" />
|
40
32
|
|
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
<!-- Generated by productbuild - - synthesize -->
|
9
9
|
<pkg-ref id="<%= identifier %>"/>
|
10
|
-
<options customize="never" require-scripts="false"/>
|
10
|
+
<options customize="never" require-scripts="false" hostArchitectures="<%= host_architecture %>" />
|
11
11
|
<choices-outline>
|
12
12
|
<line choice="default">
|
13
13
|
<line choice="<%= identifier %>"/>
|
data/resources/rpm/spec.erb
CHANGED
@@ -127,17 +127,8 @@ module Omnibus
|
|
127
127
|
end
|
128
128
|
end
|
129
129
|
|
130
|
-
|
131
|
-
|
132
|
-
let(:source_md5) { "577dbe528415c6f178a9431fd0554df4" }
|
133
|
-
|
134
|
-
it "extracts the asset without crashing" do
|
135
|
-
subject.clean
|
136
|
-
expect(extracted).to_not be_a_file
|
137
|
-
subject.clean
|
138
|
-
expect(extracted).to_not be_a_file
|
139
|
-
end
|
140
|
-
end
|
130
|
+
# we need to find a new test fixture because this one no longer exists
|
131
|
+
# context "when the source has read-only files"
|
141
132
|
|
142
133
|
context "when the source has broken symlinks" do
|
143
134
|
let(:source_url) { "http://www.openssl.org/source/openssl-1.0.1q.tar.gz" }
|
@@ -6,13 +6,13 @@ module Omnibus
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def tmp_path
|
9
|
-
File.expand_path("
|
9
|
+
File.expand_path("../tmp", __dir__)
|
10
10
|
end
|
11
11
|
|
12
12
|
private
|
13
13
|
|
14
14
|
def fixtures_path
|
15
|
-
File.expand_path("
|
15
|
+
File.expand_path("../fixtures", __dir__)
|
16
16
|
end
|
17
17
|
end
|
18
18
|
end
|
@@ -3,8 +3,8 @@ require "spec_helper"
|
|
3
3
|
module Omnibus
|
4
4
|
describe Compressor do
|
5
5
|
describe ".for_current_system" do
|
6
|
-
context "on
|
7
|
-
before { stub_ohai(platform: "mac_os_x"
|
6
|
+
context "on macOS" do
|
7
|
+
before { stub_ohai(platform: "mac_os_x") }
|
8
8
|
|
9
9
|
context "when :dmg is activated" do
|
10
10
|
it "prefers dmg" do
|
@@ -190,7 +190,7 @@ module Omnibus
|
|
190
190
|
|
191
191
|
expect(contents).to include('set found_disk to do shell script "ls /Volumes/ | grep \'Project One*\'"')
|
192
192
|
expect(contents).to include(" set the bounds of Finder window 1 to {100, 100, 750, 600}")
|
193
|
-
expect(contents).to include(' set position of item "project-1.2.3-2.pkg" of container window to {535, 50}')
|
193
|
+
expect(contents).to include(' set position of item "project-1.2.3-2.x86_64.pkg" of container window to {535, 50}')
|
194
194
|
end
|
195
195
|
|
196
196
|
it "runs the apple script" do
|
@@ -219,14 +219,17 @@ module Omnibus
|
|
219
219
|
sync
|
220
220
|
hdiutil unmount "#{device}"
|
221
221
|
# Give some time to the system so unmount dmg
|
222
|
-
|
223
|
-
hdiutil detach "
|
222
|
+
ATTEMPTS=1
|
223
|
+
until [ $ATTEMPTS -eq 6 ] || hdiutil detach "/dev/sda1"; do
|
224
|
+
sleep 10
|
225
|
+
echo Attempt number $(( ATTEMPTS++ ))
|
226
|
+
done
|
224
227
|
hdiutil convert \\
|
225
228
|
"#{staging_dir}/project-writable.dmg" \\
|
226
229
|
-format UDZO \\
|
227
230
|
-imagekey \\
|
228
231
|
zlib-level=9 \\
|
229
|
-
-o "#{package_dir}/project-1.2.3-2.dmg" \\
|
232
|
+
-o "#{package_dir}/project-1.2.3-2.x86_64.dmg" \\
|
230
233
|
-puppetstrings
|
231
234
|
EOH
|
232
235
|
|
@@ -244,7 +247,7 @@ module Omnibus
|
|
244
247
|
expect(subject).to receive(:shellout!)
|
245
248
|
.with <<-EOH.gsub(/^ {12}/, "")
|
246
249
|
hdiutil verify \\
|
247
|
-
"#{package_dir}/project-1.2.3-2.dmg" \\
|
250
|
+
"#{package_dir}/project-1.2.3-2.x86_64.dmg" \\
|
248
251
|
-puppetstrings
|
249
252
|
EOH
|
250
253
|
|
@@ -286,10 +289,10 @@ module Omnibus
|
|
286
289
|
DeRez -only icns "#{icon}" > tmp.rsrc
|
287
290
|
|
288
291
|
# Append the icon reosurce to the DMG
|
289
|
-
Rez -append tmp.rsrc -o "#{package_dir}/project-1.2.3-2.dmg"
|
292
|
+
Rez -append tmp.rsrc -o "#{package_dir}/project-1.2.3-2.x86_64.dmg"
|
290
293
|
|
291
294
|
# Source the icon
|
292
|
-
SetFile -a C "#{package_dir}/project-1.2.3-2.dmg"
|
295
|
+
SetFile -a C "#{package_dir}/project-1.2.3-2.x86_64.dmg"
|
293
296
|
EOH
|
294
297
|
|
295
298
|
subject.set_dmg_icon
|
@@ -298,11 +301,11 @@ module Omnibus
|
|
298
301
|
|
299
302
|
describe "#package_name" do
|
300
303
|
it "reflects the packager's unmodified package_name" do
|
301
|
-
expect(subject.package_name).to eq("project-1.2.3-2.dmg")
|
304
|
+
expect(subject.package_name).to eq("project-1.2.3-2.x86_64.dmg")
|
302
305
|
end
|
303
306
|
|
304
307
|
it "reflects the packager's modified package_name" do
|
305
|
-
package_basename = "projectsub-1.2.3-3"
|
308
|
+
package_basename = "projectsub-1.2.3-3.x86_64"
|
306
309
|
allow(project.packagers_for_system[0]).to receive(:package_name)
|
307
310
|
.and_return("#{package_basename}.pkg")
|
308
311
|
|
@@ -38,25 +38,25 @@ module Omnibus
|
|
38
38
|
|
39
39
|
describe "#package_name" do
|
40
40
|
it "returns the name of the packager" do
|
41
|
-
expect(subject.package_name).to eq("project-1.2.3-2.pkg.tar.gz")
|
41
|
+
expect(subject.package_name).to eq("project-1.2.3-2.x86_64.pkg.tar.gz")
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
45
|
describe "#write_tgz" do
|
46
46
|
before do
|
47
|
-
File.open("#{staging_dir}/project-1.2.3-2.pkg", "wb") do |f|
|
47
|
+
File.open("#{staging_dir}/project-1.2.3-2.x86_64.pkg", "wb") do |f|
|
48
48
|
f.write " " * 1_000_000
|
49
49
|
end
|
50
50
|
end
|
51
51
|
|
52
52
|
it "generates the file" do
|
53
53
|
subject.write_tgz
|
54
|
-
expect("#{staging_dir}/project-1.2.3-2.pkg.tar.gz").to be_a_file
|
54
|
+
expect("#{staging_dir}/project-1.2.3-2.x86_64.pkg.tar.gz").to be_a_file
|
55
55
|
end
|
56
56
|
|
57
57
|
it "has the correct content" do
|
58
58
|
subject.write_tgz
|
59
|
-
file = File.open("#{staging_dir}/project-1.2.3-2.pkg.tar.gz", "rb")
|
59
|
+
file = File.open("#{staging_dir}/project-1.2.3-2.x86_64.pkg.tar.gz", "rb")
|
60
60
|
contents = file.read
|
61
61
|
file.close
|
62
62
|
|
@@ -278,6 +278,10 @@ module Omnibus
|
|
278
278
|
|
279
279
|
let(:cumulative_downloaded_length) { 100 }
|
280
280
|
|
281
|
+
let(:uri_open_target) do
|
282
|
+
RUBY_VERSION.to_f < 2.7 ? subject : URI
|
283
|
+
end
|
284
|
+
|
281
285
|
def capturing_stdout
|
282
286
|
old_stdout, $stdout = $stdout, progress_bar_output
|
283
287
|
yield
|
@@ -286,7 +290,7 @@ module Omnibus
|
|
286
290
|
end
|
287
291
|
|
288
292
|
before do
|
289
|
-
expect(
|
293
|
+
expect(uri_open_target).to receive(:open).with(source[:url], expected_open_opts) do |_url, open_uri_opts|
|
290
294
|
open_uri_opts[:content_length_proc].call(reported_content_length)
|
291
295
|
open_uri_opts[:progress_proc].call(cumulative_downloaded_length)
|
292
296
|
|
data/spec/unit/metadata_spec.rb
CHANGED
@@ -177,17 +177,17 @@ module Omnibus
|
|
177
177
|
|
178
178
|
describe ".platform_shortname" do
|
179
179
|
it "returns el on rhel" do
|
180
|
-
stub_ohai(platform: "redhat", version: "6
|
180
|
+
stub_ohai(platform: "redhat", version: "6")
|
181
181
|
expect(described_class.platform_shortname).to eq("el")
|
182
182
|
end
|
183
183
|
|
184
184
|
it "returns sles on suse" do
|
185
|
-
stub_ohai(platform: "suse", version: "12
|
185
|
+
stub_ohai(platform: "suse", version: "12")
|
186
186
|
expect(described_class.platform_shortname).to eq("sles")
|
187
187
|
end
|
188
188
|
|
189
189
|
it "returns .platform on all other systems" do
|
190
|
-
stub_ohai(platform: "ubuntu", version: "
|
190
|
+
stub_ohai(platform: "ubuntu", version: "20.04")
|
191
191
|
expect(described_class.platform_shortname).to eq("ubuntu")
|
192
192
|
end
|
193
193
|
end
|
@@ -196,7 +196,7 @@ module Omnibus
|
|
196
196
|
shared_examples "a version manipulator" do |platform_shortname, version, expected|
|
197
197
|
context "on #{platform_shortname}-#{version}" do
|
198
198
|
it "returns the correct value" do
|
199
|
-
stub_ohai(platform: "ubuntu", version: "
|
199
|
+
stub_ohai(platform: "ubuntu", version: "20.04") do |data|
|
200
200
|
data["platform"] = platform_shortname
|
201
201
|
data["platform_version"] = version
|
202
202
|
end
|
@@ -218,6 +218,8 @@ module Omnibus
|
|
218
218
|
it_behaves_like "a version manipulator", "gentoo", "4.9.95-gentoo", "rolling"
|
219
219
|
it_behaves_like "a version manipulator", "kali", "rolling", "rolling"
|
220
220
|
it_behaves_like "a version manipulator", "mac_os_x", "10.9.1", "10.9"
|
221
|
+
it_behaves_like "a version manipulator", "mac_os_x", "10.15.7", "10.15"
|
222
|
+
it_behaves_like "a version manipulator", "mac_os_x", "11.2.1", "11"
|
221
223
|
it_behaves_like "a version manipulator", "omnios", "r151010", "r151010"
|
222
224
|
it_behaves_like "a version manipulator", "openbsd", "5.4.4", "5.4"
|
223
225
|
it_behaves_like "a version manipulator", "opensuseleap", "42.3", "42.3"
|
@@ -245,7 +247,7 @@ module Omnibus
|
|
245
247
|
|
246
248
|
context "given an unknown platform" do
|
247
249
|
before do
|
248
|
-
stub_ohai(platform: "ubuntu", version: "
|
250
|
+
stub_ohai(platform: "ubuntu", version: "20.04") do |data|
|
249
251
|
data["platform"] = "bacon"
|
250
252
|
data["platform_version"] = "1.crispy"
|
251
253
|
end
|
@@ -259,7 +261,7 @@ module Omnibus
|
|
259
261
|
|
260
262
|
context "given an unknown windows platform version" do
|
261
263
|
before do
|
262
|
-
stub_ohai(platform: "ubuntu", version: "
|
264
|
+
stub_ohai(platform: "ubuntu", version: "20.04") do |data|
|
263
265
|
data["platform"] = "windows"
|
264
266
|
data["platform_version"] = "1.2.3"
|
265
267
|
end
|
data/spec/unit/packager_spec.rb
CHANGED
@@ -3,27 +3,20 @@ require "spec_helper"
|
|
3
3
|
module Omnibus
|
4
4
|
describe Packager do
|
5
5
|
describe ".for_current_system" do
|
6
|
-
context "on
|
7
|
-
before { stub_ohai(platform: "mac_os_x"
|
6
|
+
context "on macOS" do
|
7
|
+
before { stub_ohai(platform: "mac_os_x") }
|
8
8
|
it "prefers PKG" do
|
9
9
|
expect(described_class.for_current_system).to eq([Packager::PKG])
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
-
context "on Windows
|
13
|
+
context "on Windows" do
|
14
14
|
before { stub_ohai(platform: "windows", version: "2012R2") }
|
15
15
|
it "prefers MSI and APPX" do
|
16
16
|
expect(described_class.for_current_system).to eq([Packager::MSI, Packager::APPX])
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
|
-
context "on Windows 2008 R2" do
|
21
|
-
before { stub_ohai(platform: "windows", version: "2008R2") }
|
22
|
-
it "prefers MSI only" do
|
23
|
-
expect(described_class.for_current_system).to eq([Packager::MSI])
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
20
|
context "on Solaris 11" do
|
28
21
|
before { stub_ohai(platform: "solaris2", version: "5.11") }
|
29
22
|
it "prefers IPS" do
|
@@ -32,14 +25,14 @@ module Omnibus
|
|
32
25
|
end
|
33
26
|
|
34
27
|
context "on AIX" do
|
35
|
-
before { stub_ohai(platform: "aix", version: "7
|
28
|
+
before { stub_ohai(platform: "aix", version: "7") }
|
36
29
|
it "prefers BFF" do
|
37
30
|
expect(described_class.for_current_system).to eq([Packager::BFF])
|
38
31
|
end
|
39
32
|
end
|
40
33
|
|
41
34
|
context "on Fedora" do
|
42
|
-
before { stub_ohai(platform: "fedora", version: "
|
35
|
+
before { stub_ohai(platform: "fedora", version: "31") }
|
43
36
|
it "prefers RPM" do
|
44
37
|
expect(described_class.for_current_system).to eq([Packager::RPM])
|
45
38
|
end
|
@@ -53,14 +46,14 @@ module Omnibus
|
|
53
46
|
end
|
54
47
|
|
55
48
|
context "on Debian" do
|
56
|
-
before { stub_ohai(platform: "debian", version: "
|
49
|
+
before { stub_ohai(platform: "debian", version: "10") }
|
57
50
|
it "prefers RPM" do
|
58
51
|
expect(described_class.for_current_system).to eq([Packager::DEB])
|
59
52
|
end
|
60
53
|
end
|
61
54
|
|
62
55
|
context "on SLES" do
|
63
|
-
before { stub_ohai(platform: "suse", version: "
|
56
|
+
before { stub_ohai(platform: "suse", version: "15") }
|
64
57
|
it "prefers RPM" do
|
65
58
|
expect(described_class.for_current_system).to eq([Packager::RPM])
|
66
59
|
end
|