omnibus 8.1.15 → 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 -0
- data/lib/omnibus/builder.rb +45 -10
- data/lib/omnibus/version.rb +1 -1
- data/omnibus.gemspec +1 -1
- data/spec/unit/builder_spec.rb +6 -0
- metadata +4 -4
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
@@ -194,6 +194,7 @@ DSL Method | Description
|
|
194
194
|
`patch` | Apply a patch from disk
|
195
195
|
`workers` | The maximum number of builders
|
196
196
|
`windows_safe_path` | Format the path to be safe for shelling out on Windows
|
197
|
+
`go` | Execute the code as the embedded Go
|
197
198
|
`ruby` | Execute the code as the embedded Ruby
|
198
199
|
`gem` | Execute the code as the embedded Rubygems
|
199
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
|
@@ -430,7 +465,7 @@ module Omnibus
|
|
430
465
|
def rake(command, options = {})
|
431
466
|
build_commands << BuildCommand.new("rake `#{command}'") do
|
432
467
|
bin = embedded_bin("rake")
|
433
|
-
shellout!("#{bin} #{command}", options)
|
468
|
+
shellout!("#{bin} #{command}", **options)
|
434
469
|
end
|
435
470
|
end
|
436
471
|
expose :rake
|
@@ -688,7 +723,7 @@ module Omnibus
|
|
688
723
|
build_commands << BuildCommand.new(command) do
|
689
724
|
Dir.chdir(software.project_dir) do
|
690
725
|
if options.delete(:unchecked)
|
691
|
-
FileUtils.ln_s(source, destination, options)
|
726
|
+
FileUtils.ln_s(source, destination, **options)
|
692
727
|
else
|
693
728
|
files = FileSyncer.glob(source)
|
694
729
|
if files.empty?
|
@@ -716,7 +751,7 @@ module Omnibus
|
|
716
751
|
def sync(source, destination, options = {})
|
717
752
|
build_commands << BuildCommand.new("sync `#{source}' to `#{destination}'") do
|
718
753
|
Dir.chdir(software.project_dir) do
|
719
|
-
FileSyncer.sync(source, destination, options)
|
754
|
+
FileSyncer.sync(source, destination, **options)
|
720
755
|
end
|
721
756
|
end
|
722
757
|
end
|
@@ -873,7 +908,7 @@ module Omnibus
|
|
873
908
|
options[:live_stream] ||= log.live_stream(:debug)
|
874
909
|
|
875
910
|
# Use Util's shellout
|
876
|
-
super(command_string, options)
|
911
|
+
super(command_string, **options)
|
877
912
|
end
|
878
913
|
|
879
914
|
#
|
data/lib/omnibus/version.rb
CHANGED
data/omnibus.gemspec
CHANGED
@@ -35,7 +35,7 @@ Gem::Specification.new do |gem|
|
|
35
35
|
gem.add_dependency "pedump"
|
36
36
|
|
37
37
|
gem.add_development_dependency "artifactory", "~> 3.0"
|
38
|
-
gem.add_development_dependency "aruba", "~>
|
38
|
+
gem.add_development_dependency "aruba", "~> 2.0"
|
39
39
|
gem.add_development_dependency "chefstyle", "= 1.7.5"
|
40
40
|
gem.add_development_dependency "fauxhai-ng", ">= 7.5"
|
41
41
|
gem.add_development_dependency "rspec", "~> 3.0"
|
data/spec/unit/builder_spec.rb
CHANGED
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: 8.
|
4
|
+
version: 8.2.2
|
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-
|
11
|
+
date: 2021-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-s3
|
@@ -222,14 +222,14 @@ dependencies:
|
|
222
222
|
requirements:
|
223
223
|
- - "~>"
|
224
224
|
- !ruby/object:Gem::Version
|
225
|
-
version: '
|
225
|
+
version: '2.0'
|
226
226
|
type: :development
|
227
227
|
prerelease: false
|
228
228
|
version_requirements: !ruby/object:Gem::Requirement
|
229
229
|
requirements:
|
230
230
|
- - "~>"
|
231
231
|
- !ruby/object:Gem::Version
|
232
|
-
version: '
|
232
|
+
version: '2.0'
|
233
233
|
- !ruby/object:Gem::Dependency
|
234
234
|
name: chefstyle
|
235
235
|
requirement: !ruby/object:Gem::Requirement
|