omnibus 7.0.34 → 8.2.2
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 +4 -4
- data/README.md +1 -2
- data/lib/omnibus/builder.rb +57 -17
- data/lib/omnibus/compressors/dmg.rb +5 -2
- data/lib/omnibus/manifest_diff.rb +7 -13
- data/lib/omnibus/metadata.rb +7 -3
- data/lib/omnibus/packager.rb +5 -14
- data/lib/omnibus/packagers/pkg.rb +14 -4
- data/lib/omnibus/packagers/rpm.rb +23 -9
- data/lib/omnibus/software.rb +3 -14
- data/lib/omnibus/sugarable.rb +5 -14
- data/lib/omnibus/version.rb +1 -1
- data/lib/omnibus/whitelist.rb +1 -0
- data/omnibus.gemspec +6 -5
- 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/unit/builder_spec.rb +6 -0
- 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/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 +39 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af0b9ab4b9d9903d007df7fe7ef6400f29c440f6de01c3c76f2fb18690f04001
|
4
|
+
data.tar.gz: aa35f665517e110e781329b7e97ea9ff154633fb25c80d274bae96d4f46a6bde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8a052707df85029b1a29c3b55a24abd7f81d9b288707bc98512c1bc185c1f309c753d72e792dc68e814c67ccc06f059cddf1b16c593f913de68cfb356d8a903
|
7
|
+
data.tar.gz: 46626cb42cca8480b546bd4281b853bc2c5a51063350109cff57a2f51c766963be06737af5ff26f0610c9ac9b9d2cf53ba5ae6da5df5077901569baf2bd00bfb
|
data/README.md
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
[][gem]
|
4
4
|
[](https://buildkite.com/chef-oss/chef-omnibus-master-verify)
|
5
|
-
[][appveyor]
|
6
5
|
|
7
6
|
**Umbrella Project**: [Chef Foundation](https://github.com/chef/chef-oss-practices/blob/master/projects/chef-foundation.md)
|
8
7
|
|
@@ -16,7 +15,6 @@ Easily create full-stack installers for your project across a variety of platfor
|
|
16
15
|
|
17
16
|
Seth Chisamore and Christopher Maier of CHEF gave an introductory talk on Omnibus at ChefConf 2013, entitled **Eat the Whole Bowl: Building a Full-Stack Installer with Omnibus**:
|
18
17
|
|
19
|
-
- [Video](http://www.youtube.com/watch?v=q8iJAntXCNY)
|
20
18
|
- [Slides](https://speakerdeck.com/schisamo/eat-the-whole-bowl-building-a-full-stack-installer-with-omnibus)
|
21
19
|
|
22
20
|
This project is managed by the CHEF Release Engineering team. For more information on the Release Engineering team's contribution, triage, and release process, please consult the [CHEF Release Engineering OSS Management Guide](https://docs.google.com/a/opscode.com/document/d/1oJB0vZb_3bl7_ZU2YMDBkMFdL-EWplW1BJv_FXTUOzg/edit).
|
@@ -196,6 +194,7 @@ DSL Method | Description
|
|
196
194
|
`patch` | Apply a patch from disk
|
197
195
|
`workers` | The maximum number of builders
|
198
196
|
`windows_safe_path` | Format the path to be safe for shelling out on Windows
|
197
|
+
`go` | Execute the code as the embedded Go
|
199
198
|
`ruby` | Execute the code as the embedded Ruby
|
200
199
|
`gem` | Execute the code as the embedded Rubygems
|
201
200
|
`bundle` | Execute the code as the embedded Bundler
|
data/lib/omnibus/builder.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright
|
2
|
+
# Copyright:: Copyright (c) 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.
|
@@ -82,7 +82,7 @@ module Omnibus
|
|
82
82
|
warn_for_shell_commands(command)
|
83
83
|
|
84
84
|
build_commands << BuildCommand.new("Execute: `#{command}'") do
|
85
|
-
shellout!(command, options)
|
85
|
+
shellout!(command, **options)
|
86
86
|
end
|
87
87
|
end
|
88
88
|
expose :command
|
@@ -248,7 +248,7 @@ module Omnibus
|
|
248
248
|
patches << patch_path
|
249
249
|
options[:in_msys_bash] = true
|
250
250
|
build_commands << BuildCommand.new("Apply patch `#{source}'") do
|
251
|
-
shellout!(patch_cmd, options)
|
251
|
+
shellout!(patch_cmd, **options)
|
252
252
|
end
|
253
253
|
end
|
254
254
|
expose :patch
|
@@ -296,6 +296,41 @@ module Omnibus
|
|
296
296
|
# @!endgroup
|
297
297
|
# --------------------------------------------------
|
298
298
|
|
299
|
+
#
|
300
|
+
# @!group Go DSL methods
|
301
|
+
#
|
302
|
+
# The following DSL methods are available from within build blocks and
|
303
|
+
# expose Go DSL methods.
|
304
|
+
# --------------------------------------------------
|
305
|
+
|
306
|
+
#
|
307
|
+
# Execute the given Go command or script against the embedded Go.
|
308
|
+
#
|
309
|
+
# @example
|
310
|
+
# go 'build -o hello'
|
311
|
+
#
|
312
|
+
# @param (see #command)
|
313
|
+
# @return (see #command)
|
314
|
+
#
|
315
|
+
def go(command, options = {})
|
316
|
+
build_commands << BuildCommand.new("go `#{command}'") do
|
317
|
+
bin = windows? ? windows_safe_path("#{install_dir}/embedded/go/bin/go") : embedded_bin("go")
|
318
|
+
|
319
|
+
# Check if we are building a go binary and then check if we are on
|
320
|
+
# Red Hat or CentOS so we build the binary properly with a build-id
|
321
|
+
if command.start_with?("build", " build") && rhel?
|
322
|
+
command << " -ldflags=-linkmode=external"
|
323
|
+
end
|
324
|
+
|
325
|
+
shellout!("#{bin} #{command}", options)
|
326
|
+
end
|
327
|
+
end
|
328
|
+
expose :go
|
329
|
+
|
330
|
+
#
|
331
|
+
# @!endgroup
|
332
|
+
# --------------------------------------------------
|
333
|
+
|
299
334
|
#
|
300
335
|
# @!group Ruby DSL methods
|
301
336
|
#
|
@@ -315,7 +350,7 @@ module Omnibus
|
|
315
350
|
def ruby(command, options = {})
|
316
351
|
build_commands << BuildCommand.new("ruby `#{command}'") do
|
317
352
|
bin = embedded_bin("ruby")
|
318
|
-
shellout!("#{bin} #{command}", options)
|
353
|
+
shellout!("#{bin} #{command}", **options)
|
319
354
|
end
|
320
355
|
end
|
321
356
|
expose :ruby
|
@@ -332,7 +367,7 @@ module Omnibus
|
|
332
367
|
def gem(command, options = {})
|
333
368
|
build_commands << BuildCommand.new("gem `#{command}'") do
|
334
369
|
bin = embedded_bin("gem")
|
335
|
-
shellout!("#{bin} #{command}", options)
|
370
|
+
shellout!("#{bin} #{command}", **options)
|
336
371
|
end
|
337
372
|
end
|
338
373
|
expose :gem
|
@@ -352,7 +387,7 @@ module Omnibus
|
|
352
387
|
def bundle(command, options = {})
|
353
388
|
build_commands << BuildCommand.new("bundle `#{command}'") do
|
354
389
|
bin = embedded_bin("bundle")
|
355
|
-
shellout!("#{bin} #{command}", options)
|
390
|
+
shellout!("#{bin} #{command}", **options)
|
356
391
|
end
|
357
392
|
end
|
358
393
|
expose :bundle
|
@@ -373,11 +408,16 @@ module Omnibus
|
|
373
408
|
# @param (see #command)
|
374
409
|
# @return (see #command)
|
375
410
|
#
|
376
|
-
def appbundle(software_name,
|
411
|
+
def appbundle(software_name, options = {})
|
377
412
|
build_commands << BuildCommand.new("appbundle `#{software_name}'") do
|
378
413
|
bin_dir = "#{install_dir}/bin"
|
379
414
|
appbundler_bin = embedded_bin("appbundler")
|
380
415
|
|
416
|
+
lockdir = options.delete(:lockdir)
|
417
|
+
gem = options.delete(:gem)
|
418
|
+
without = options.delete(:without)
|
419
|
+
extra_bin_files = options.delete(:extra_bin_files)
|
420
|
+
|
381
421
|
lockdir ||=
|
382
422
|
begin
|
383
423
|
app_software = project.softwares.find do |p|
|
@@ -425,7 +465,7 @@ module Omnibus
|
|
425
465
|
def rake(command, options = {})
|
426
466
|
build_commands << BuildCommand.new("rake `#{command}'") do
|
427
467
|
bin = embedded_bin("rake")
|
428
|
-
shellout!("#{bin} #{command}", options)
|
468
|
+
shellout!("#{bin} #{command}", **options)
|
429
469
|
end
|
430
470
|
end
|
431
471
|
expose :rake
|
@@ -535,7 +575,7 @@ module Omnibus
|
|
535
575
|
def mkdir(directory, options = {})
|
536
576
|
build_commands << BuildCommand.new("mkdir `#{directory}'") do
|
537
577
|
Dir.chdir(software.project_dir) do
|
538
|
-
FileUtils.mkdir_p(directory, options)
|
578
|
+
FileUtils.mkdir_p(directory, **options)
|
539
579
|
end
|
540
580
|
end
|
541
581
|
end
|
@@ -557,7 +597,7 @@ module Omnibus
|
|
557
597
|
parent = File.dirname(file)
|
558
598
|
FileUtils.mkdir_p(parent) unless File.directory?(parent)
|
559
599
|
|
560
|
-
FileUtils.touch(file, options)
|
600
|
+
FileUtils.touch(file, **options)
|
561
601
|
end
|
562
602
|
end
|
563
603
|
end
|
@@ -578,7 +618,7 @@ module Omnibus
|
|
578
618
|
build_commands << BuildCommand.new("delete `#{path}'") do
|
579
619
|
Dir.chdir(software.project_dir) do
|
580
620
|
FileSyncer.glob(path).each do |file|
|
581
|
-
FileUtils.rm_rf(file, options)
|
621
|
+
FileUtils.rm_rf(file, **options)
|
582
622
|
end
|
583
623
|
end
|
584
624
|
end
|
@@ -629,7 +669,7 @@ module Omnibus
|
|
629
669
|
log.warn(log_key) { "no matched files for glob #{command}" }
|
630
670
|
else
|
631
671
|
files.each do |file|
|
632
|
-
FileUtils.cp_r(file, destination, options)
|
672
|
+
FileUtils.cp_r(file, destination, **options)
|
633
673
|
end
|
634
674
|
end
|
635
675
|
end
|
@@ -658,7 +698,7 @@ module Omnibus
|
|
658
698
|
log.warn(log_key) { "no matched files for glob #{command}" }
|
659
699
|
else
|
660
700
|
files.each do |file|
|
661
|
-
FileUtils.mv(file, destination, options)
|
701
|
+
FileUtils.mv(file, destination, **options)
|
662
702
|
end
|
663
703
|
end
|
664
704
|
end
|
@@ -683,14 +723,14 @@ module Omnibus
|
|
683
723
|
build_commands << BuildCommand.new(command) do
|
684
724
|
Dir.chdir(software.project_dir) do
|
685
725
|
if options.delete(:unchecked)
|
686
|
-
FileUtils.ln_s(source, destination, options)
|
726
|
+
FileUtils.ln_s(source, destination, **options)
|
687
727
|
else
|
688
728
|
files = FileSyncer.glob(source)
|
689
729
|
if files.empty?
|
690
730
|
log.warn(log_key) { "no matched files for glob #{command}" }
|
691
731
|
else
|
692
732
|
files.each do |file|
|
693
|
-
FileUtils.ln_s(file, destination, options)
|
733
|
+
FileUtils.ln_s(file, destination, **options)
|
694
734
|
end
|
695
735
|
end
|
696
736
|
end
|
@@ -711,7 +751,7 @@ module Omnibus
|
|
711
751
|
def sync(source, destination, options = {})
|
712
752
|
build_commands << BuildCommand.new("sync `#{source}' to `#{destination}'") do
|
713
753
|
Dir.chdir(software.project_dir) do
|
714
|
-
FileSyncer.sync(source, destination, options)
|
754
|
+
FileSyncer.sync(source, destination, **options)
|
715
755
|
end
|
716
756
|
end
|
717
757
|
end
|
@@ -868,7 +908,7 @@ module Omnibus
|
|
868
908
|
options[:live_stream] ||= log.live_stream(:debug)
|
869
909
|
|
870
910
|
# Use Util's shellout
|
871
|
-
super(command_string, options)
|
911
|
+
super(command_string, **options)
|
872
912
|
end
|
873
913
|
|
874
914
|
#
|
@@ -259,8 +259,11 @@ module Omnibus
|
|
259
259
|
sync
|
260
260
|
hdiutil unmount "#{@device}"
|
261
261
|
# Give some time to the system so unmount dmg
|
262
|
-
|
263
|
-
hdiutil detach "#{@device}"
|
262
|
+
ATTEMPTS=1
|
263
|
+
until [ $ATTEMPTS -eq 6 ] || hdiutil detach "#{@device}"; do
|
264
|
+
sleep 10
|
265
|
+
echo Attempt number $(( ATTEMPTS++ ))
|
266
|
+
done
|
264
267
|
hdiutil convert \\
|
265
268
|
"#{writable_dmg}" \\
|
266
269
|
-format UDZO \\
|
@@ -25,28 +25,22 @@ module Omnibus
|
|
25
25
|
|
26
26
|
def updated
|
27
27
|
@updated ||=
|
28
|
-
|
29
|
-
(first.
|
30
|
-
|
31
|
-
end.compact
|
32
|
-
end
|
28
|
+
(first.entry_names & second.entry_names).collect do |name|
|
29
|
+
diff(first.entry_for(name), second.entry_for(name))
|
30
|
+
end.compact
|
33
31
|
end
|
34
32
|
|
35
33
|
def removed
|
36
34
|
@removed ||=
|
37
|
-
|
38
|
-
(first.
|
39
|
-
removed_entry(first.entry_for(name))
|
40
|
-
end
|
35
|
+
(first.entry_names - second.entry_names).collect do |name|
|
36
|
+
removed_entry(first.entry_for(name))
|
41
37
|
end
|
42
38
|
end
|
43
39
|
|
44
40
|
def added
|
45
41
|
@added ||=
|
46
|
-
|
47
|
-
(second.
|
48
|
-
new_entry(second.entry_for(name))
|
49
|
-
end
|
42
|
+
(second.entry_names - first.entry_names).collect do |name|
|
43
|
+
new_entry(second.entry_for(name))
|
50
44
|
end
|
51
45
|
end
|
52
46
|
|
data/lib/omnibus/metadata.rb
CHANGED
@@ -170,12 +170,16 @@ module Omnibus
|
|
170
170
|
# rubocop:disable Lint/DuplicateCaseCondition
|
171
171
|
def truncate_platform_version(platform_version, platform)
|
172
172
|
case platform
|
173
|
-
when "centos", "debian", "el", "fedora", "freebsd", "omnios", "pidora", "raspbian", "rhel", "sles", "suse", "smartos"
|
173
|
+
when "centos", "cumulus", "debian", "el", "fedora", "freebsd", "omnios", "pidora", "raspbian", "rhel", "sles", "suse", "smartos"
|
174
174
|
# Only want MAJOR (e.g. Debian 7, OmniOS r151006, SmartOS 20120809T221258Z)
|
175
175
|
platform_version.split(".").first
|
176
|
-
when "aix", "alpine", "
|
177
|
-
# Only want MAJOR.MINOR (e.g.
|
176
|
+
when "aix", "alpine", "openbsd", "slackware", "solaris2", "opensuse", "opensuseleap", "ubuntu", "amazon"
|
177
|
+
# Only want MAJOR.MINOR (e.g. Ubuntu 12.04)
|
178
178
|
platform_version.split(".")[0..1].join(".")
|
179
|
+
when "mac_os_x", "darwin", "macos"
|
180
|
+
# If running macOS >= 11, use only MAJOR version. Otherwise, use MAJOR.MINOR
|
181
|
+
pv_bits = platform_version.split(".")
|
182
|
+
pv_bits[0].to_i >= 11 ? pv_bits[0] : pv_bits[0..1].join(".")
|
179
183
|
when "arch", "gentoo", "kali"
|
180
184
|
# Arch Linux / Gentoo do not have a platform_version ohai attribute, they are rolling release (lsb_release -r)
|
181
185
|
"rolling"
|
data/lib/omnibus/packager.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright 2014-
|
2
|
+
# Copyright 2014-2020, 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.
|
@@ -66,25 +66,16 @@ module Omnibus
|
|
66
66
|
family = Ohai["platform_family"]
|
67
67
|
version = Ohai["platform_version"]
|
68
68
|
|
69
|
-
if family == "solaris2" &&
|
69
|
+
if family == "solaris2" && ChefUtils::VersionString.new(version).satisfies?(">= 5.11")
|
70
70
|
family = "ips"
|
71
|
-
elsif family == "solaris2" &&
|
71
|
+
elsif family == "solaris2" && ChefUtils::VersionString.new(version).satisfies?(">= 5.10")
|
72
72
|
family = "solaris"
|
73
73
|
end
|
74
74
|
if klass = PLATFORM_PACKAGER_MAP[family]
|
75
|
-
|
76
|
-
|
77
|
-
if package_types.include?(APPX) &&
|
78
|
-
!Chef::Sugar::Constraints::Version.new(version).satisfies?(">= 6.2")
|
79
|
-
log.warn(log_key) { "APPX generation is only supported on Windows versions 2012 and above" }
|
80
|
-
package_types -= [APPX]
|
81
|
-
end
|
82
|
-
|
83
|
-
package_types
|
75
|
+
klass.is_a?(Array) ? klass : [ klass ]
|
84
76
|
else
|
85
77
|
log.warn(log_key) do
|
86
|
-
"Could not determine packager for `#{family}
|
87
|
-
"to `makeself'!"
|
78
|
+
"Could not determine packager for `#{family}`, defaulting to `makeself`!"
|
88
79
|
end
|
89
80
|
[Makeself]
|
90
81
|
end
|
@@ -125,7 +125,7 @@ module Omnibus
|
|
125
125
|
|
126
126
|
# @see Base#package_name
|
127
127
|
def package_name
|
128
|
-
"#{safe_base_package_name}-#{safe_version}-#{safe_build_iteration}.pkg"
|
128
|
+
"#{safe_base_package_name}-#{safe_version}-#{safe_build_iteration}.#{safe_architecture}.pkg"
|
129
129
|
end
|
130
130
|
|
131
131
|
#
|
@@ -286,6 +286,7 @@ module Omnibus
|
|
286
286
|
identifier: safe_identifier,
|
287
287
|
version: safe_version,
|
288
288
|
component_pkg: component_pkg,
|
289
|
+
host_architecture: safe_architecture,
|
289
290
|
})
|
290
291
|
end
|
291
292
|
|
@@ -320,6 +321,15 @@ module Omnibus
|
|
320
321
|
"#{safe_base_package_name}-core.pkg"
|
321
322
|
end
|
322
323
|
|
324
|
+
#
|
325
|
+
# Return the architecture
|
326
|
+
#
|
327
|
+
# @return [String]
|
328
|
+
#
|
329
|
+
def safe_architecture
|
330
|
+
@safe_architecture ||= Ohai["kernel"]["machine"]
|
331
|
+
end
|
332
|
+
|
323
333
|
#
|
324
334
|
# Return the PKG-ready base package name, removing any invalid characters.
|
325
335
|
#
|
@@ -424,7 +434,7 @@ module Omnibus
|
|
424
434
|
is_binary = File.file?(bin) &&
|
425
435
|
File.executable?(bin) &&
|
426
436
|
!File.symlink?(bin)
|
427
|
-
log.debug(log_key) { " removing from signing: #{bin}" } unless is_binary
|
437
|
+
log.debug(log_key) { " removing non-binary file from signing: #{bin}" } unless is_binary
|
428
438
|
is_binary
|
429
439
|
end
|
430
440
|
|
@@ -434,9 +444,9 @@ module Omnibus
|
|
434
444
|
command = "file #{lib}"
|
435
445
|
|
436
446
|
stdout = shellout!(command).stdout
|
437
|
-
is_macho = stdout.match?(/Mach-O.*library
|
447
|
+
is_macho = stdout.match?(/Mach-O.*(library|bundle)/)
|
438
448
|
end
|
439
|
-
log.debug(log_key) { " removing from signing: #{lib}" } unless is_macho
|
449
|
+
log.debug(log_key) { " removing non-Mach-O library file from signing: #{lib}" } unless is_macho
|
440
450
|
is_macho
|
441
451
|
end
|
442
452
|
end
|
@@ -417,6 +417,10 @@ module Omnibus
|
|
417
417
|
command << %{ -bb}
|
418
418
|
command << %{ --buildroot #{staging_dir}/BUILD}
|
419
419
|
command << %{ --define '_topdir #{staging_dir}'}
|
420
|
+
command << " #{spec_file}"
|
421
|
+
|
422
|
+
log.info(log_key) { "Creating .rpm file" }
|
423
|
+
shellout!("#{command}")
|
420
424
|
|
421
425
|
if signing_passphrase
|
422
426
|
log.info(log_key) { "Signing enabled for .rpm file" }
|
@@ -438,17 +442,18 @@ module Omnibus
|
|
438
442
|
})
|
439
443
|
end
|
440
444
|
|
441
|
-
|
442
|
-
command << " #{spec_file}"
|
443
|
-
|
445
|
+
sign_cmd = "rpmsign --addsign #{rpm_file}"
|
444
446
|
with_rpm_signing do |signing_script|
|
445
|
-
log.info(log_key) { "
|
446
|
-
|
447
|
+
log.info(log_key) { "Signing the built rpm file" }
|
448
|
+
|
449
|
+
# RHEL 8 has gpg-agent running so we can skip the expect script since the agent
|
450
|
+
# takes care of the passphrase entering on the signing
|
451
|
+
if dist_tag != ".el8"
|
452
|
+
sign_cmd.prepend("#{signing_script} \"").concat("\"")
|
453
|
+
end
|
454
|
+
|
455
|
+
shellout!("#{sign_cmd}", environment: { "HOME" => home })
|
447
456
|
end
|
448
|
-
else
|
449
|
-
log.info(log_key) { "Creating .rpm file" }
|
450
|
-
command << " #{spec_file}"
|
451
|
-
shellout!("#{command}")
|
452
457
|
end
|
453
458
|
|
454
459
|
FileSyncer.glob("#{staging_dir}/RPMS/**/*.rpm").each do |rpm|
|
@@ -483,6 +488,15 @@ module Omnibus
|
|
483
488
|
"#{staging_dir}/SPECS/#{package_name}.spec"
|
484
489
|
end
|
485
490
|
|
491
|
+
#
|
492
|
+
# The full path to the rpm file.
|
493
|
+
#
|
494
|
+
# @return [String]
|
495
|
+
#
|
496
|
+
def rpm_file
|
497
|
+
"#{staging_dir}/RPMS/#{safe_architecture}/#{package_name}"
|
498
|
+
end
|
499
|
+
|
486
500
|
#
|
487
501
|
# Render the rpm signing script with secure permissions, call the given
|
488
502
|
# block with the path to the script, and ensure deletion of the script from
|
data/lib/omnibus/software.rb
CHANGED
@@ -525,7 +525,7 @@ module Omnibus
|
|
525
525
|
return if final_version.nil?
|
526
526
|
|
527
527
|
begin
|
528
|
-
|
528
|
+
ChefUtils::VersionString.new(final_version)
|
529
529
|
rescue ArgumentError
|
530
530
|
log.warn(log_key) do
|
531
531
|
"Version #{final_version} for software #{name} was not parseable. " \
|
@@ -718,19 +718,8 @@ module Omnibus
|
|
718
718
|
"CC" => "clang",
|
719
719
|
"CXX" => "clang++",
|
720
720
|
"LDFLAGS" => "-L#{install_dir}/embedded/lib",
|
721
|
-
"CFLAGS" => "-I#{install_dir}/embedded/include -
|
721
|
+
"CFLAGS" => "-I#{install_dir}/embedded/include -O3 -D_FORTIFY_SOURCE=2 -fstack-protector",
|
722
722
|
}
|
723
|
-
when "suse"
|
724
|
-
suse_flags = {
|
725
|
-
"LDFLAGS" => "-Wl,-rpath,#{install_dir}/embedded/lib -L#{install_dir}/embedded/lib",
|
726
|
-
"CFLAGS" => "-I#{install_dir}/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
|
727
|
-
}
|
728
|
-
# Enable gcc version 4.8 if it is available
|
729
|
-
if which("gcc-4.8") && platform_version.satisfies?("< 12")
|
730
|
-
suse_flags["CC"] = "gcc-4.8"
|
731
|
-
suse_flags["CXX"] = "g++-4.8"
|
732
|
-
end
|
733
|
-
suse_flags
|
734
723
|
when "windows"
|
735
724
|
arch_flag = windows_arch_i386? ? "-m32" : "-m64"
|
736
725
|
opt_flag = windows_arch_i386? ? "-march=i686" : "-march=x86-64"
|
@@ -750,7 +739,7 @@ module Omnibus
|
|
750
739
|
else
|
751
740
|
{
|
752
741
|
"LDFLAGS" => "-Wl,-rpath,#{install_dir}/embedded/lib -L#{install_dir}/embedded/lib",
|
753
|
-
"CFLAGS" => "-I#{install_dir}/embedded/include -
|
742
|
+
"CFLAGS" => "-I#{install_dir}/embedded/include -O3 -D_FORTIFY_SOURCE=2 -fstack-protector",
|
754
743
|
}
|
755
744
|
end
|
756
745
|
|
data/lib/omnibus/sugarable.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright 2014-
|
2
|
+
# Copyright 2014-2020, 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.
|
@@ -14,31 +14,22 @@
|
|
14
14
|
# limitations under the License.
|
15
15
|
#
|
16
16
|
|
17
|
-
require "chef
|
18
|
-
require "chef/sugar/cloud"
|
19
|
-
require "chef/sugar/constraints"
|
20
|
-
require "chef/sugar/ip"
|
21
|
-
require "chef/sugar/init"
|
22
|
-
require "chef/sugar/platform"
|
23
|
-
require "chef/sugar/platform_family"
|
24
|
-
require "chef/sugar/ruby"
|
25
|
-
require "chef/sugar/shell"
|
26
|
-
require "chef/sugar/vagrant"
|
17
|
+
require "chef-utils" unless defined?(ChefUtils::CANARY)
|
27
18
|
|
28
19
|
module Omnibus
|
29
20
|
module Sugarable
|
30
21
|
def self.extended(base)
|
31
|
-
base.send(:extend,
|
22
|
+
base.send(:extend, ChefUtils)
|
32
23
|
base.send(:extend, Omnibus::Sugar)
|
33
24
|
end
|
34
25
|
|
35
26
|
def self.included(base)
|
36
|
-
base.send(:include,
|
27
|
+
base.send(:include, ChefUtils)
|
37
28
|
base.send(:include, Omnibus::Sugar)
|
38
29
|
|
39
30
|
if base < Cleanroom
|
40
31
|
# Make all the "sugars" available in the cleanroom (DSL)
|
41
|
-
|
32
|
+
ChefUtils.instance_methods.each do |instance_method|
|
42
33
|
base.send(:expose, instance_method)
|
43
34
|
end
|
44
35
|
|
data/lib/omnibus/version.rb
CHANGED
data/lib/omnibus/whitelist.rb
CHANGED
data/omnibus.gemspec
CHANGED
@@ -21,22 +21,23 @@ Gem::Specification.new do |gem|
|
|
21
21
|
gem.require_paths = ["lib"]
|
22
22
|
|
23
23
|
gem.add_dependency "aws-sdk-s3", "~> 1"
|
24
|
-
gem.add_dependency "chef-
|
24
|
+
gem.add_dependency "chef-utils", ">= 15.4"
|
25
25
|
gem.add_dependency "chef-cleanroom", "~> 1.0"
|
26
26
|
gem.add_dependency "ffi-yajl", "~> 2.2"
|
27
27
|
gem.add_dependency "mixlib-shellout", ">= 2.0", "< 4.0"
|
28
|
-
gem.add_dependency "ohai", ">= 15"
|
28
|
+
gem.add_dependency "ohai", ">= 15", "< 17"
|
29
29
|
gem.add_dependency "ruby-progressbar", "~> 1.7"
|
30
30
|
gem.add_dependency "thor", ">= 0.18", "< 2.0"
|
31
31
|
gem.add_dependency "license_scout", "~> 1.0"
|
32
|
+
gem.add_dependency "contracts", ">= 0.16.0", "< 0.17.0"
|
32
33
|
|
33
34
|
gem.add_dependency "mixlib-versioning"
|
34
35
|
gem.add_dependency "pedump"
|
35
36
|
|
36
37
|
gem.add_development_dependency "artifactory", "~> 3.0"
|
37
|
-
gem.add_development_dependency "aruba", "~> 0
|
38
|
-
gem.add_development_dependency "chefstyle", "= 1.5
|
39
|
-
gem.add_development_dependency "fauxhai",
|
38
|
+
gem.add_development_dependency "aruba", "~> 2.0"
|
39
|
+
gem.add_development_dependency "chefstyle", "= 1.7.5"
|
40
|
+
gem.add_development_dependency "fauxhai-ng", ">= 7.5"
|
40
41
|
gem.add_development_dependency "rspec", "~> 3.0"
|
41
42
|
gem.add_development_dependency "rspec-json_expectations"
|
42
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" }
|
data/spec/unit/builder_spec.rb
CHANGED