omnibus 5.6.1 → 5.6.6

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.
Files changed (54) hide show
  1. checksums.yaml +5 -5
  2. data/.expeditor/config.yml +31 -0
  3. data/.expeditor/update_version.sh +12 -0
  4. data/.github/CODEOWNERS +3 -0
  5. data/.github/ISSUE_TEMPLATE.md +0 -2
  6. data/.github/PULL_REQUEST_TEMPLATE.md +0 -1
  7. data/.gitignore +1 -0
  8. data/.travis.yml +2 -2
  9. data/CHANGELOG.md +29 -3
  10. data/Gemfile +1 -1
  11. data/README.md +2 -2
  12. data/VERSION +1 -0
  13. data/appveyor.yml +3 -2
  14. data/docs/Building on Debian.md +6 -4
  15. data/docs/Building on OSX.md +2 -2
  16. data/docs/Building on RHEL.md +3 -3
  17. data/docs/Building on Windows.md +1 -1
  18. data/lib/omnibus.rb +1 -0
  19. data/lib/omnibus/build_version.rb +13 -4
  20. data/lib/omnibus/builder.rb +10 -5
  21. data/lib/omnibus/config.rb +40 -8
  22. data/lib/omnibus/fetcher.rb +2 -0
  23. data/lib/omnibus/fetchers/file_fetcher.rb +131 -0
  24. data/lib/omnibus/packagers/deb.rb +81 -0
  25. data/lib/omnibus/packagers/ips.rb +22 -7
  26. data/lib/omnibus/publishers/artifactory_publisher.rb +2 -6
  27. data/lib/omnibus/publishers/s3_publisher.rb +7 -5
  28. data/lib/omnibus/s3_cache.rb +1 -0
  29. data/lib/omnibus/s3_helpers.rb +2 -0
  30. data/lib/omnibus/sugarable.rb +1 -0
  31. data/lib/omnibus/version.rb +1 -1
  32. data/lib/omnibus/whitelist.rb +1 -0
  33. data/omnibus.gemspec +3 -3
  34. data/resources/msi/CustomActionFastMsi.CA.dll +0 -0
  35. data/resources/msi/source.wxs.erb +7 -0
  36. data/spec/functional/fetchers/file_fetcher_spec.rb +92 -0
  37. data/spec/spec_helper.rb +1 -1
  38. data/spec/unit/build_version_spec.rb +11 -1
  39. data/spec/unit/compressor_spec.rb +2 -2
  40. data/spec/unit/config_spec.rb +13 -3
  41. data/spec/unit/fetchers/file_fetcher_spec.rb +81 -0
  42. data/spec/unit/fetchers/net_fetcher_spec.rb +14 -3
  43. data/spec/unit/health_check_spec.rb +3 -3
  44. data/spec/unit/metadata_spec.rb +8 -8
  45. data/spec/unit/packager_spec.rb +10 -10
  46. data/spec/unit/packagers/bff_spec.rb +1 -1
  47. data/spec/unit/packagers/deb_spec.rb +40 -0
  48. data/spec/unit/packagers/ips_spec.rb +31 -5
  49. data/spec/unit/packagers/rpm_spec.rb +5 -5
  50. data/spec/unit/project_spec.rb +7 -7
  51. data/spec/unit/publishers/artifactory_publisher_spec.rb +16 -0
  52. data/spec/unit/publishers/s3_publisher_spec.rb +17 -0
  53. data/spec/unit/software_spec.rb +10 -8
  54. metadata +16 -7
@@ -35,7 +35,7 @@ module Omnibus
35
35
  create_directory("#{staging_dir}/SOURCES")
36
36
  create_directory("#{staging_dir}/SPECS")
37
37
 
38
- stub_ohai(platform: "redhat", version: "6.5") do |data|
38
+ stub_ohai(platform: "redhat", version: "6.9") do |data|
39
39
  data["kernel"]["machine"] = architecture
40
40
  end
41
41
  end
@@ -533,7 +533,7 @@ module Omnibus
533
533
 
534
534
  describe "#safe_architecture" do
535
535
  before do
536
- stub_ohai(platform: "redhat", version: "6.5") do |data|
536
+ stub_ohai(platform: "redhat", version: "6.9") do |data|
537
537
  data["kernel"]["machine"] = "i386"
538
538
  end
539
539
  end
@@ -544,7 +544,7 @@ module Omnibus
544
544
 
545
545
  context "when i686" do
546
546
  before do
547
- stub_ohai(platform: "redhat", version: "6.5") do |data|
547
+ stub_ohai(platform: "redhat", version: "6.9") do |data|
548
548
  data["kernel"]["machine"] = "i686"
549
549
  end
550
550
  end
@@ -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: "20") do |data|
560
+ stub_ohai(platform: "fedora", version: "25") do |data|
561
561
  data["platform"] = "pidora"
562
- data["platform_version"] = "20"
562
+ data["platform_version"] = "25"
563
563
  data["kernel"]["machine"] = "armv6l"
564
564
  end
565
565
  end
@@ -110,7 +110,7 @@ module Omnibus
110
110
 
111
111
  describe "#default_root" do
112
112
  context "on Windows" do
113
- before { stub_ohai(platform: "windows", version: "2012") }
113
+ before { stub_ohai(platform: "windows", version: "2012R2") }
114
114
 
115
115
  it "returns C:/" do
116
116
  expect(subject.default_root).to eq("C:")
@@ -118,7 +118,7 @@ module Omnibus
118
118
  end
119
119
 
120
120
  context "on non-Windows" do
121
- before { stub_ohai(platform: "ubuntu", version: "12.04") }
121
+ before { stub_ohai(platform: "ubuntu", version: "16.04") }
122
122
 
123
123
  it "returns /opt" do
124
124
  expect(subject.default_root).to eq("/opt")
@@ -207,21 +207,21 @@ module Omnibus
207
207
  before { stub_ohai(fauxhai_options) }
208
208
 
209
209
  context "when on RHEL" do
210
- let(:fauxhai_options) { { platform: "redhat", version: "6.4" } }
210
+ let(:fauxhai_options) { { platform: "redhat", version: "6.9" } }
211
211
  it "returns a RHEL iteration" do
212
212
  expect(subject.build_iteration).to eq(1)
213
213
  end
214
214
  end
215
215
 
216
216
  context "when on Debian" do
217
- let(:fauxhai_options) { { platform: "debian", version: "7.2" } }
217
+ let(:fauxhai_options) { { platform: "debian", version: "8.8" } }
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: "9.1" } }
224
+ let(:fauxhai_options) { { platform: "freebsd", version: "9.3" } }
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.8.2" } }
239
+ let(:fauxhai_options) { { platform: "mac_os_x", version: "10.12" } }
240
240
  it "returns a generic iteration" do
241
241
  expect(subject.build_iteration).to eq(1)
242
242
  end
@@ -266,7 +266,7 @@ module Omnibus
266
266
  end
267
267
 
268
268
  describe "#ohai" do
269
- before { stub_ohai(platform: "ubuntu", version: "12.04") }
269
+ before { stub_ohai(platform: "ubuntu", version: "16.04") }
270
270
 
271
271
  it "is a DSL method" do
272
272
  expect(subject).to have_exposed_method(:ohai)
@@ -248,6 +248,22 @@ module Omnibus
248
248
  subject.publish
249
249
  end
250
250
  end
251
+
252
+ context "custom artifactory_publish_pattern is set" do
253
+ before do
254
+ Config.artifactory_publish_pattern("%{platform}/%{platform_version}/%{arch}/%{basename}")
255
+ end
256
+
257
+ it "uploads the package to the provided path" do
258
+ expect(artifact).to receive(:upload).with(
259
+ repository,
260
+ "com/getchef/ubuntu/14.04/x86_64/chef.deb",
261
+ hash_including(metadata_json_properites)
262
+ ).once
263
+
264
+ subject.publish
265
+ end
266
+ end
251
267
  end
252
268
 
253
269
  describe "#metadata_properties_for" do
@@ -100,6 +100,23 @@ module Omnibus
100
100
  end
101
101
  end
102
102
 
103
+ context "when the custom s3_publish_pattern is set" do
104
+ before do
105
+ Config.s3_publish_pattern("custom_prefix/%{name}/%{version}/%{platform}/%{platform_version}")
106
+ end
107
+
108
+ it "uploads the package to the provided path" do
109
+ expect(subject).to receive(:store_object).with(
110
+ "custom_prefix/chef/11.0.6/ubuntu/14.04/chef.deb.metadata.json",
111
+ FFI_Yajl::Encoder.encode(package.metadata.to_hash, pretty: true),
112
+ nil,
113
+ "private"
114
+ ).once
115
+
116
+ subject.publish
117
+ end
118
+ end
119
+
103
120
  context "when a block is given" do
104
121
  it "yields the package to the block" do
105
122
  block = ->(package) { package.do_something! }
@@ -68,7 +68,7 @@ module Omnibus
68
68
 
69
69
  describe "with_standard_compiler_flags helper" do
70
70
  context "on ubuntu" do
71
- before { stub_ohai(platform: "ubuntu", version: "12.04") }
71
+ before { stub_ohai(platform: "ubuntu", version: "16.04") }
72
72
 
73
73
  it "sets the defaults" do
74
74
  expect(subject.with_standard_compiler_flags).to eq(
@@ -242,7 +242,7 @@ module Omnibus
242
242
  end
243
243
 
244
244
  context "on mac_os_x" do
245
- before { stub_ohai(platform: "mac_os_x", version: "10.9.2") }
245
+ before { stub_ohai(platform: "mac_os_x", version: "10.12") }
246
246
 
247
247
  it "sets the defaults" do
248
248
  expect(subject.with_standard_compiler_flags).to eq(
@@ -285,7 +285,7 @@ module Omnibus
285
285
 
286
286
  context "on freebsd 9" do
287
287
  before do
288
- stub_ohai(platform: "freebsd", version: "9.2")
288
+ stub_ohai(platform: "freebsd", version: "9.3")
289
289
  end
290
290
 
291
291
  it "sets the defaults" do
@@ -323,7 +323,7 @@ module Omnibus
323
323
 
324
324
  context "on freebsd 10" do
325
325
  before do
326
- stub_ohai(platform: "freebsd", version: "10.0")
326
+ stub_ohai(platform: "freebsd", version: "10.3")
327
327
  end
328
328
 
329
329
  it "Clang as the default compiler" do
@@ -345,6 +345,7 @@ module Omnibus
345
345
  before do
346
346
  # sles identifies as suse
347
347
  stub_ohai(platform: "suse", version: "11.4")
348
+ allow(subject).to receive(:which).with("gcc-4.8").and_return(false)
348
349
  end
349
350
  it "sets the defaults" do
350
351
  expect(subject.with_standard_compiler_flags).to eq(
@@ -383,7 +384,8 @@ module Omnibus
383
384
  context "on sles 12" do
384
385
  before do
385
386
  # sles identifies as suse
386
- stub_ohai(platform: "suse", version: "12.1")
387
+ stub_ohai(platform: "suse", version: "12.2")
388
+ allow(subject).to receive(:which).with("gcc-4.8").and_return(false)
387
389
  end
388
390
 
389
391
  it "sets the defaults" do
@@ -403,7 +405,7 @@ module Omnibus
403
405
  let(:win_arch_i386) { true }
404
406
 
405
407
  before do
406
- stub_ohai(platform: "windows", version: "2012")
408
+ stub_ohai(platform: "windows", version: "2012R2")
407
409
  allow(subject).to receive(:windows_arch_i386?).and_return(win_arch_i386)
408
410
  end
409
411
 
@@ -485,7 +487,7 @@ module Omnibus
485
487
 
486
488
  context "on Windows" do
487
489
  before do
488
- stub_ohai(platform: "windows", version: "2012")
490
+ stub_ohai(platform: "windows", version: "2012R2")
489
491
  end
490
492
 
491
493
  let(:separator) { ";" }
@@ -525,7 +527,7 @@ module Omnibus
525
527
  end
526
528
 
527
529
  describe "#ohai" do
528
- before { stub_ohai(platform: "ubuntu", version: "12.04") }
530
+ before { stub_ohai(platform: "ubuntu", version: "16.04") }
529
531
 
530
532
  it "is a DSL method" do
531
533
  expect(subject).to have_exposed_method(:ohai)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omnibus
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.6.1
4
+ version: 5.6.6
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: 2017-06-22 00:00:00.000000000 Z
11
+ date: 2018-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -226,14 +226,14 @@ dependencies:
226
226
  requirements:
227
227
  - - "~>"
228
228
  - !ruby/object:Gem::Version
229
- version: '3.2'
229
+ version: '5.2'
230
230
  type: :development
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
234
  - - "~>"
235
235
  - !ruby/object:Gem::Version
236
- version: '3.2'
236
+ version: '5.2'
237
237
  - !ruby/object:Gem::Dependency
238
238
  name: rspec
239
239
  requirement: !ruby/object:Gem::Requirement
@@ -334,12 +334,15 @@ dependencies:
334
334
  version: '0'
335
335
  description: Omnibus is a framework for building self-installing, full-stack software
336
336
  builds.
337
- email: releng@getchef.com
337
+ email: releng@chef.io
338
338
  executables:
339
339
  - omnibus
340
340
  extensions: []
341
341
  extra_rdoc_files: []
342
342
  files:
343
+ - ".expeditor/config.yml"
344
+ - ".expeditor/update_version.sh"
345
+ - ".github/CODEOWNERS"
343
346
  - ".github/ISSUE_TEMPLATE.md"
344
347
  - ".github/PULL_REQUEST_TEMPLATE.md"
345
348
  - ".gitignore"
@@ -351,6 +354,7 @@ files:
351
354
  - MAINTAINERS.md
352
355
  - README.md
353
356
  - Rakefile
357
+ - VERSION
354
358
  - appveyor.yml
355
359
  - bin/omnibus
356
360
  - docs/Build Cache.md
@@ -393,6 +397,7 @@ files:
393
397
  - lib/omnibus/download_helpers.rb
394
398
  - lib/omnibus/exceptions.rb
395
399
  - lib/omnibus/fetcher.rb
400
+ - lib/omnibus/fetchers/file_fetcher.rb
396
401
  - lib/omnibus/fetchers/git_fetcher.rb
397
402
  - lib/omnibus/fetchers/net_fetcher.rb
398
403
  - lib/omnibus/fetchers/null_fetcher.rb
@@ -500,6 +505,7 @@ files:
500
505
  - spec/fixtures/licensing/license_scout/zlib/zlib-dependency-licenses.json
501
506
  - spec/fixtures/sample/package-scripts/sample/postinstall
502
507
  - spec/functional/builder_spec.rb
508
+ - spec/functional/fetchers/file_fetcher_spec.rb
503
509
  - spec/functional/fetchers/git_fetcher_spec.rb
504
510
  - spec/functional/fetchers/net_fetcher_spec.rb
505
511
  - spec/functional/fetchers/path_fetcher_spec.rb
@@ -531,6 +537,7 @@ files:
531
537
  - spec/unit/config_spec.rb
532
538
  - spec/unit/digestable_spec.rb
533
539
  - spec/unit/fetcher_spec.rb
540
+ - spec/unit/fetchers/file_fetcher_spec.rb
534
541
  - spec/unit/fetchers/git_fetcher_spec.rb
535
542
  - spec/unit/fetchers/net_fetcher_spec.rb
536
543
  - spec/unit/fetchers/path_fetcher_spec.rb
@@ -568,7 +575,7 @@ files:
568
575
  - spec/unit/software_spec.rb
569
576
  - spec/unit/sugarable_spec.rb
570
577
  - spec/unit/util_spec.rb
571
- homepage: https://github.com/opscode/omnibus
578
+ homepage: https://github.com/chef/omnibus
572
579
  licenses:
573
580
  - Apache 2.0
574
581
  metadata: {}
@@ -588,7 +595,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
588
595
  version: '0'
589
596
  requirements: []
590
597
  rubyforge_project:
591
- rubygems_version: 2.6.10
598
+ rubygems_version: 2.7.4
592
599
  signing_key:
593
600
  specification_version: 4
594
601
  summary: Omnibus is a framework for building self-installing, full-stack software
@@ -612,6 +619,7 @@ test_files:
612
619
  - spec/fixtures/licensing/license_scout/zlib/zlib-dependency-licenses.json
613
620
  - spec/fixtures/sample/package-scripts/sample/postinstall
614
621
  - spec/functional/builder_spec.rb
622
+ - spec/functional/fetchers/file_fetcher_spec.rb
615
623
  - spec/functional/fetchers/git_fetcher_spec.rb
616
624
  - spec/functional/fetchers/net_fetcher_spec.rb
617
625
  - spec/functional/fetchers/path_fetcher_spec.rb
@@ -643,6 +651,7 @@ test_files:
643
651
  - spec/unit/config_spec.rb
644
652
  - spec/unit/digestable_spec.rb
645
653
  - spec/unit/fetcher_spec.rb
654
+ - spec/unit/fetchers/file_fetcher_spec.rb
646
655
  - spec/unit/fetchers/git_fetcher_spec.rb
647
656
  - spec/unit/fetchers/net_fetcher_spec.rb
648
657
  - spec/unit/fetchers/path_fetcher_spec.rb