omnibus 5.6.8 → 6.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +10 -7
- data/README.md +1 -1
- data/lib/omnibus.rb +1 -1
- data/lib/omnibus/build_version.rb +1 -1
- data/lib/omnibus/build_version_dsl.rb +1 -1
- data/lib/omnibus/builder.rb +26 -7
- data/lib/omnibus/cleaner.rb +1 -1
- data/lib/omnibus/cli.rb +1 -1
- data/lib/omnibus/cli/changelog.rb +1 -1
- data/lib/omnibus/compressor.rb +1 -1
- data/lib/omnibus/compressors/base.rb +1 -1
- data/lib/omnibus/compressors/dmg.rb +1 -1
- data/lib/omnibus/compressors/null.rb +1 -1
- data/lib/omnibus/compressors/tgz.rb +1 -1
- data/lib/omnibus/config.rb +1 -1
- data/lib/omnibus/digestable.rb +1 -1
- data/lib/omnibus/download_helpers.rb +1 -1
- data/lib/omnibus/exceptions.rb +1 -1
- data/lib/omnibus/fetcher.rb +1 -1
- data/lib/omnibus/fetchers/file_fetcher.rb +1 -1
- data/lib/omnibus/fetchers/git_fetcher.rb +1 -1
- data/lib/omnibus/fetchers/net_fetcher.rb +1 -1
- data/lib/omnibus/fetchers/null_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 +1 -1
- data/lib/omnibus/generator_files/Berksfile.erb +1 -1
- data/lib/omnibus/generator_files/Gemfile.erb +1 -1
- data/lib/omnibus/generator_files/README.md.erb +3 -3
- data/lib/omnibus/git_cache.rb +1 -1
- data/lib/omnibus/health_check.rb +1 -1
- data/lib/omnibus/library.rb +1 -1
- data/lib/omnibus/licensing.rb +1 -1
- data/lib/omnibus/logger.rb +1 -1
- data/lib/omnibus/manifest.rb +1 -1
- data/lib/omnibus/manifest_entry.rb +1 -1
- data/lib/omnibus/metadata.rb +5 -5
- data/lib/omnibus/null_argumentable.rb +1 -1
- data/lib/omnibus/ohai.rb +1 -1
- data/lib/omnibus/package.rb +1 -1
- data/lib/omnibus/packager.rb +1 -1
- data/lib/omnibus/packagers/appx.rb +1 -1
- data/lib/omnibus/packagers/base.rb +1 -1
- data/lib/omnibus/packagers/bff.rb +1 -1
- data/lib/omnibus/packagers/deb.rb +1 -1
- data/lib/omnibus/packagers/ips.rb +1 -1
- data/lib/omnibus/packagers/makeself.rb +1 -1
- data/lib/omnibus/packagers/msi.rb +1 -1
- data/lib/omnibus/packagers/pkg.rb +1 -1
- data/lib/omnibus/packagers/pkgsrc.rb +1 -1
- data/lib/omnibus/packagers/rpm.rb +1 -1
- data/lib/omnibus/packagers/solaris.rb +1 -1
- data/lib/omnibus/packagers/windows_base.rb +1 -1
- data/lib/omnibus/project.rb +2 -2
- data/lib/omnibus/publisher.rb +1 -1
- data/lib/omnibus/publishers/artifactory_publisher.rb +1 -1
- data/lib/omnibus/publishers/null_publisher.rb +1 -1
- data/lib/omnibus/publishers/s3_publisher.rb +1 -1
- data/lib/omnibus/reports.rb +1 -1
- data/lib/omnibus/s3_cache.rb +1 -1
- data/lib/omnibus/s3_helpers.rb +1 -1
- data/lib/omnibus/semantic_version.rb +1 -1
- data/lib/omnibus/software.rb +7 -14
- data/lib/omnibus/sugarable.rb +1 -1
- data/lib/omnibus/templating.rb +1 -1
- data/lib/omnibus/thread_pool.rb +1 -1
- data/lib/omnibus/version.rb +2 -2
- data/lib/omnibus/whitelist.rb +1 -1
- data/omnibus.gemspec +5 -6
- data/spec/unit/compressors/dmg_spec.rb +2 -2
- data/spec/unit/metadata_spec.rb +3 -1
- data/spec/unit/packager_spec.rb +4 -4
- data/spec/unit/packagers/bff_spec.rb +2 -2
- data/spec/unit/packagers/rpm_spec.rb +2 -2
- data/spec/unit/project_spec.rb +3 -3
- data/spec/unit/publisher_spec.rb +1 -1
- data/spec/unit/publishers/artifactory_publisher_spec.rb +1 -1
- data/spec/unit/semantic_version_spec.rb +1 -1
- data/spec/unit/software_spec.rb +40 -18
- metadata +22 -30
data/lib/omnibus/project.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright 2012-
|
2
|
+
# Copyright 2012-2018 Chef Software, Inc.
|
3
3
|
# Copyright 2014 Noah Kantrowitz
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -794,7 +794,7 @@ module Omnibus
|
|
794
794
|
#
|
795
795
|
def text_manifest_path(path = NULL)
|
796
796
|
if null?(path)
|
797
|
-
@
|
797
|
+
@text_manifest_path || File.join(install_dir, "version-manifest.txt")
|
798
798
|
else
|
799
799
|
@text_manifest_path = path
|
800
800
|
end
|
data/lib/omnibus/publisher.rb
CHANGED
data/lib/omnibus/reports.rb
CHANGED
data/lib/omnibus/s3_cache.rb
CHANGED
data/lib/omnibus/s3_helpers.rb
CHANGED
data/lib/omnibus/software.rb
CHANGED
@@ -292,7 +292,7 @@ module Omnibus
|
|
292
292
|
val = canonicalize_source(val)
|
293
293
|
|
294
294
|
extra_keys = val.keys - [
|
295
|
-
:git, :path, :url, # fetcher types
|
295
|
+
:git, :file, :path, :url, # fetcher types
|
296
296
|
:md5, :sha1, :sha256, :sha512, # hash type - common to all fetchers
|
297
297
|
:cookie, :warning, :unsafe, :extract, # used by net_fetcher
|
298
298
|
:options, # used by path_fetcher
|
@@ -303,7 +303,7 @@ module Omnibus
|
|
303
303
|
"only include valid keys. Invalid keys: #{extra_keys.inspect}")
|
304
304
|
end
|
305
305
|
|
306
|
-
duplicate_keys = val.keys & [:git, :path, :url]
|
306
|
+
duplicate_keys = val.keys & [:git, :file, :path, :url]
|
307
307
|
unless duplicate_keys.size < 2
|
308
308
|
raise InvalidValue.new(:source,
|
309
309
|
"not include duplicate keys. Duplicate keys: #{duplicate_keys.inspect}")
|
@@ -688,21 +688,12 @@ module Omnibus
|
|
688
688
|
end
|
689
689
|
solaris_flags
|
690
690
|
when "freebsd"
|
691
|
-
|
691
|
+
{
|
692
|
+
"CC" => "clang",
|
693
|
+
"CXX" => "clang++",
|
692
694
|
"LDFLAGS" => "-L#{install_dir}/embedded/lib",
|
693
695
|
"CFLAGS" => "-I#{install_dir}/embedded/include -O2",
|
694
696
|
}
|
695
|
-
# Enable gcc version 4.9 if it is available
|
696
|
-
if (Ohai["os_version"].to_i <= 903000) && which("gcc49")
|
697
|
-
freebsd_flags["CC"] = "gcc49"
|
698
|
-
freebsd_flags["CXX"] = "g++49"
|
699
|
-
end
|
700
|
-
# Clang became the default compiler in FreeBSD 10+
|
701
|
-
if Ohai["os_version"].to_i >= 1000024
|
702
|
-
freebsd_flags["CC"] = "clang"
|
703
|
-
freebsd_flags["CXX"] = "clang++"
|
704
|
-
end
|
705
|
-
freebsd_flags
|
706
697
|
when "suse"
|
707
698
|
suse_flags = {
|
708
699
|
"LDFLAGS" => "-Wl,-rpath,#{install_dir}/embedded/lib -L#{install_dir}/embedded/lib",
|
@@ -1053,6 +1044,8 @@ module Omnibus
|
|
1053
1044
|
:url
|
1054
1045
|
elsif source[:git]
|
1055
1046
|
:git
|
1047
|
+
elsif source[:file]
|
1048
|
+
:file
|
1056
1049
|
elsif source[:path]
|
1057
1050
|
:path
|
1058
1051
|
end
|
data/lib/omnibus/sugarable.rb
CHANGED
data/lib/omnibus/templating.rb
CHANGED
data/lib/omnibus/thread_pool.rb
CHANGED
data/lib/omnibus/version.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright 2012-
|
2
|
+
# Copyright 2012-2018 Chef Software, Inc.
|
3
3
|
#
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
5
5
|
# you may not use this file except in compliance with the License.
|
@@ -15,5 +15,5 @@
|
|
15
15
|
#
|
16
16
|
|
17
17
|
module Omnibus
|
18
|
-
VERSION = "
|
18
|
+
VERSION = "6.0.1"
|
19
19
|
end
|
data/lib/omnibus/whitelist.rb
CHANGED
data/omnibus.gemspec
CHANGED
@@ -13,7 +13,7 @@ Gem::Specification.new do |gem|
|
|
13
13
|
gem.description = gem.summary
|
14
14
|
gem.homepage = "https://github.com/chef/omnibus"
|
15
15
|
|
16
|
-
gem.required_ruby_version = ">= 2.
|
16
|
+
gem.required_ruby_version = ">= 2.4"
|
17
17
|
|
18
18
|
gem.files = %w{ LICENSE README.md Rakefile Gemfile } + Dir.glob("*.gemspec") + Dir.glob("{bin,lib,resources,spec}/**/*")
|
19
19
|
gem.bindir = "bin"
|
@@ -22,11 +22,11 @@ Gem::Specification.new do |gem|
|
|
22
22
|
gem.require_paths = ["lib"]
|
23
23
|
|
24
24
|
gem.add_dependency "aws-sdk", "~> 2"
|
25
|
-
gem.add_dependency "chef-sugar", "
|
25
|
+
gem.add_dependency "chef-sugar", ">= 3.3"
|
26
26
|
gem.add_dependency "cleanroom", "~> 1.0"
|
27
27
|
gem.add_dependency "ffi-yajl", "~> 2.2"
|
28
28
|
gem.add_dependency "mixlib-shellout", "~> 2.0"
|
29
|
-
gem.add_dependency "ohai", "
|
29
|
+
gem.add_dependency "ohai", ">= 13", "< 15"
|
30
30
|
gem.add_dependency "ruby-progressbar", "~> 1.7"
|
31
31
|
gem.add_dependency "thor", "~> 0.18"
|
32
32
|
gem.add_dependency "license_scout", "~> 1.0"
|
@@ -37,13 +37,12 @@ Gem::Specification.new do |gem|
|
|
37
37
|
gem.add_development_dependency "bundler"
|
38
38
|
gem.add_development_dependency "artifactory", "~> 2.0"
|
39
39
|
gem.add_development_dependency "aruba", "~> 0.5"
|
40
|
-
gem.add_development_dependency "chefstyle"
|
41
|
-
gem.add_development_dependency "fauxhai", "
|
40
|
+
gem.add_development_dependency "chefstyle", "= 0.6"
|
41
|
+
gem.add_development_dependency "fauxhai", ">= 5.2"
|
42
42
|
gem.add_development_dependency "rspec", "~> 3.0"
|
43
43
|
gem.add_development_dependency "rspec-json_expectations"
|
44
44
|
gem.add_development_dependency "rspec-its"
|
45
45
|
gem.add_development_dependency "webmock"
|
46
46
|
gem.add_development_dependency "rake"
|
47
47
|
gem.add_development_dependency "appbundler"
|
48
|
-
gem.add_development_dependency "pry"
|
49
48
|
end
|
@@ -253,11 +253,11 @@ module Omnibus
|
|
253
253
|
end
|
254
254
|
|
255
255
|
describe "#package_name" do
|
256
|
-
it
|
256
|
+
it "reflects the packager's unmodified package_name" do
|
257
257
|
expect(subject.package_name).to eq("project-1.2.3-2.dmg")
|
258
258
|
end
|
259
259
|
|
260
|
-
it
|
260
|
+
it "reflects the packager's modified package_name" do
|
261
261
|
package_basename = "projectsub-1.2.3-3"
|
262
262
|
allow(project.packagers_for_system[0]).to receive(:package_name)
|
263
263
|
.and_return("#{package_basename}.pkg")
|
data/spec/unit/metadata_spec.rb
CHANGED
@@ -210,6 +210,7 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
210
210
|
end
|
211
211
|
|
212
212
|
it_behaves_like "a version manipulator", "aix", "7.1", "7.1"
|
213
|
+
it_behaves_like "a version manipulator", "amazon", "2018.03", "2018.03"
|
213
214
|
it_behaves_like "a version manipulator", "arch", "rolling", "rolling"
|
214
215
|
it_behaves_like "a version manipulator", "centos", "5.9.6", "5"
|
215
216
|
it_behaves_like "a version manipulator", "debian", "7.1", "7"
|
@@ -217,12 +218,13 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
217
218
|
it_behaves_like "a version manipulator", "el", "6.5", "6"
|
218
219
|
it_behaves_like "a version manipulator", "fedora", "11.5", "11"
|
219
220
|
it_behaves_like "a version manipulator", "freebsd", "10.0", "10"
|
220
|
-
it_behaves_like "a version manipulator", "gentoo", "
|
221
|
+
it_behaves_like "a version manipulator", "gentoo", "4.9.95-gentoo", "rolling"
|
221
222
|
it_behaves_like "a version manipulator", "ios_xr", "6.0.0.14I", "6"
|
222
223
|
it_behaves_like "a version manipulator", "mac_os_x", "10.9.1", "10.9"
|
223
224
|
it_behaves_like "a version manipulator", "nexus", "5.0", "5"
|
224
225
|
it_behaves_like "a version manipulator", "omnios", "r151010", "r151010"
|
225
226
|
it_behaves_like "a version manipulator", "openbsd", "5.4.4", "5.4"
|
227
|
+
it_behaves_like "a version manipulator", "opensuseleap", "42.3", "42.3"
|
226
228
|
it_behaves_like "a version manipulator", "opensuse", "5.9", "5.9"
|
227
229
|
it_behaves_like "a version manipulator", "pidora", "11.5", "11"
|
228
230
|
it_behaves_like "a version manipulator", "raspbian", "7.1", "7"
|
data/spec/unit/packager_spec.rb
CHANGED
@@ -4,7 +4,7 @@ module Omnibus
|
|
4
4
|
describe Packager do
|
5
5
|
describe ".for_current_system" do
|
6
6
|
context "on Mac OS X" do
|
7
|
-
before { stub_ohai(platform: "mac_os_x", version: "10.
|
7
|
+
before { stub_ohai(platform: "mac_os_x", version: "10.13") }
|
8
8
|
it "prefers PKG" do
|
9
9
|
expect(described_class.for_current_system).to eq([Packager::PKG])
|
10
10
|
end
|
@@ -46,21 +46,21 @@ module Omnibus
|
|
46
46
|
end
|
47
47
|
|
48
48
|
context "on Fedora" do
|
49
|
-
before { stub_ohai(platform: "fedora", version: "
|
49
|
+
before { stub_ohai(platform: "fedora", version: "28") }
|
50
50
|
it "prefers RPM" do
|
51
51
|
expect(described_class.for_current_system).to eq([Packager::RPM])
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
55
|
context "on Debian" do
|
56
|
-
before { stub_ohai(platform: "debian", version: "8.
|
56
|
+
before { stub_ohai(platform: "debian", version: "8.11") }
|
57
57
|
it "prefers RPM" do
|
58
58
|
expect(described_class.for_current_system).to eq([Packager::DEB])
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
62
62
|
context "on SLES" do
|
63
|
-
before { stub_ohai(platform: "suse", version: "12.
|
63
|
+
before { stub_ohai(platform: "suse", version: "12.3") }
|
64
64
|
it "prefers RPM" do
|
65
65
|
expect(described_class.for_current_system).to eq([Packager::RPM])
|
66
66
|
end
|
@@ -167,13 +167,13 @@ module Omnibus
|
|
167
167
|
end
|
168
168
|
|
169
169
|
context "creates a config script" do
|
170
|
-
it
|
170
|
+
it "when there wasn't one provided" do
|
171
171
|
FileUtils.rm_f("#{subject.scripts_staging_dir}/config")
|
172
172
|
subject.write_gen_template
|
173
173
|
expect(File).to exist("#{subject.scripts_staging_dir}/config")
|
174
174
|
end
|
175
175
|
|
176
|
-
it
|
176
|
+
it "when one is provided in the project's def" do
|
177
177
|
create_file("#{project_root}/package-scripts/project/config")
|
178
178
|
subject.write_gen_template
|
179
179
|
contents = File.read("#{subject.scripts_staging_dir}/config")
|
@@ -557,9 +557,9 @@ module Omnibus
|
|
557
557
|
context "on Pidora" do
|
558
558
|
before do
|
559
559
|
# There's no Pidora in Fauxhai :(
|
560
|
-
stub_ohai(platform: "fedora", version: "
|
560
|
+
stub_ohai(platform: "fedora", version: "27") do |data|
|
561
561
|
data["platform"] = "pidora"
|
562
|
-
data["platform_version"] = "
|
562
|
+
data["platform_version"] = "27"
|
563
563
|
data["kernel"]["machine"] = "armv6l"
|
564
564
|
end
|
565
565
|
end
|
data/spec/unit/project_spec.rb
CHANGED
@@ -214,14 +214,14 @@ module Omnibus
|
|
214
214
|
end
|
215
215
|
|
216
216
|
context "when on Debian" do
|
217
|
-
let(:fauxhai_options) { { platform: "debian", version: "8.
|
217
|
+
let(:fauxhai_options) { { platform: "debian", version: "8.11" } }
|
218
218
|
it "returns a Debian iteration" do
|
219
219
|
expect(subject.build_iteration).to eq(1)
|
220
220
|
end
|
221
221
|
end
|
222
222
|
|
223
223
|
context "when on FreeBSD" do
|
224
|
-
let(:fauxhai_options) { { platform: "freebsd", version: "
|
224
|
+
let(:fauxhai_options) { { platform: "freebsd", version: "10.4" } }
|
225
225
|
it "returns a FreeBSD iteration" do
|
226
226
|
expect(subject.build_iteration).to eq(1)
|
227
227
|
end
|
@@ -236,7 +236,7 @@ module Omnibus
|
|
236
236
|
end
|
237
237
|
|
238
238
|
context "when on OS X" do
|
239
|
-
let(:fauxhai_options) { { platform: "mac_os_x", version: "10.
|
239
|
+
let(:fauxhai_options) { { platform: "mac_os_x", version: "10.13" } }
|
240
240
|
it "returns a generic iteration" do
|
241
241
|
expect(subject.build_iteration).to eq(1)
|
242
242
|
end
|
data/spec/unit/publisher_spec.rb
CHANGED