omnibus 6.0.1 → 6.0.24
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/Gemfile +3 -0
- data/lib/omnibus/build_version.rb +1 -1
- data/lib/omnibus/builder.rb +1 -1
- data/lib/omnibus/changelog.rb +1 -1
- data/lib/omnibus/compressors/dmg.rb +18 -6
- data/lib/omnibus/core_extensions/open_uri.rb +1 -1
- data/lib/omnibus/exceptions.rb +103 -103
- data/lib/omnibus/fetchers/net_fetcher.rb +8 -6
- data/lib/omnibus/generator_files/.kitchen.local.yml.erb +10 -0
- data/lib/omnibus/generator_files/.kitchen.yml.erb +41 -0
- data/lib/omnibus/generator_files/Gemfile.erb +3 -3
- data/lib/omnibus/git_repository.rb +1 -1
- data/lib/omnibus/licensing.rb +1 -0
- data/lib/omnibus/metadata.rb +15 -15
- data/lib/omnibus/packager.rb +11 -10
- data/lib/omnibus/packagers/appx.rb +4 -4
- data/lib/omnibus/packagers/base.rb +19 -0
- data/lib/omnibus/packagers/bff.rb +13 -13
- data/lib/omnibus/packagers/deb.rb +14 -14
- data/lib/omnibus/packagers/ips.rb +7 -7
- data/lib/omnibus/packagers/msi.rb +73 -25
- data/lib/omnibus/packagers/pkg.rb +10 -10
- data/lib/omnibus/packagers/pkgsrc.rb +5 -5
- data/lib/omnibus/packagers/rpm.rb +31 -31
- data/lib/omnibus/packagers/solaris.rb +2 -2
- data/lib/omnibus/packagers/windows_base.rb +2 -2
- data/lib/omnibus/project.rb +4 -0
- data/lib/omnibus/publishers/artifactory_publisher.rb +17 -17
- data/lib/omnibus/publishers/s3_publisher.rb +20 -6
- data/lib/omnibus/s3_cache.rb +5 -5
- data/lib/omnibus/s3_helpers.rb +6 -4
- data/lib/omnibus/software.rb +7 -12
- data/lib/omnibus/version.rb +1 -1
- data/lib/omnibus/whitelist.rb +1 -0
- data/omnibus.gemspec +6 -7
- data/spec/functional/builder_spec.rb +1 -1
- data/spec/functional/licensing_spec.rb +49 -49
- data/spec/functional/templating_spec.rb +3 -3
- data/spec/support/git_helpers.rb +5 -5
- data/spec/unit/changelog_spec.rb +7 -7
- data/spec/unit/changelogprinter_spec.rb +5 -5
- data/spec/unit/compressors/dmg_spec.rb +7 -2
- data/spec/unit/generator_spec.rb +6 -34
- data/spec/unit/manifest_diff_spec.rb +18 -18
- data/spec/unit/metadata_spec.rb +10 -19
- data/spec/unit/packager_spec.rb +7 -7
- data/spec/unit/packagers/base_spec.rb +17 -0
- data/spec/unit/packagers/deb_spec.rb +1 -1
- data/spec/unit/packagers/ips_spec.rb +1 -1
- data/spec/unit/packagers/msi_spec.rb +45 -0
- data/spec/unit/packagers/pkg_spec.rb +1 -1
- data/spec/unit/packagers/rpm_spec.rb +1 -46
- data/spec/unit/packagers/solaris_spec.rb +3 -3
- data/spec/unit/software_spec.rb +2 -53
- data/spec/unit/util_spec.rb +1 -1
- metadata +21 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62046c09cd3865088ef63927b5ce3bd565c0ad8d7553358a8537f459f1163356
|
4
|
+
data.tar.gz: 472d2ba5eeffd0e997c9d787d4b507a18483ceebdc8061043b3e2da38fbf6204
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb009f95b399d7514d80cda4db6032dca69b9eec31715e3d15fa4a7396c20e72b9387eec06b817356b91d56ec2eaead7fca67185a98f88cf069e1177e15e6c00
|
7
|
+
data.tar.gz: 7333413a6c610a29d8f1d6a0ebd787010f8b58c65e086aad9c8710e0062eb4d0cbcd98f9ee449cb4ea502537c325387043393f4799f2bb2297e6fc7c0c30083d
|
data/Gemfile
CHANGED
data/lib/omnibus/builder.rb
CHANGED
@@ -765,7 +765,7 @@ module Omnibus
|
|
765
765
|
log.internal(log_key) { "Cached builder checksum before build: #{shasum}" }
|
766
766
|
if software.overridden?
|
767
767
|
log.info(log_key) do
|
768
|
-
"Version overridden from #{software.default_version} to "\
|
768
|
+
"Version overridden from #{software.default_version || "n/a"} to "\
|
769
769
|
"#{software.version}"
|
770
770
|
end
|
771
771
|
end
|
data/lib/omnibus/changelog.rb
CHANGED
@@ -36,6 +36,7 @@ module Omnibus
|
|
36
36
|
build do
|
37
37
|
create_writable_dmg
|
38
38
|
attach_dmg
|
39
|
+
copy_assets_to_dmg
|
39
40
|
# Give some time to the system so attached dmg shows up in Finder
|
40
41
|
sleep 5
|
41
42
|
set_volume_icon
|
@@ -138,11 +139,9 @@ module Omnibus
|
|
138
139
|
|
139
140
|
shellout! <<-EOH.gsub(/^ {8}/, "")
|
140
141
|
hdiutil create \\
|
141
|
-
-srcfolder "#{resources_dir}" \\
|
142
142
|
-volname "#{volume_name}" \\
|
143
143
|
-fs HFS+ \\
|
144
144
|
-fsargs "-c c=64,a=16,e=16" \\
|
145
|
-
-format UDRW \\
|
146
145
|
-size 512000k \\
|
147
146
|
"#{writable_dmg}"
|
148
147
|
EOH
|
@@ -170,6 +169,17 @@ module Omnibus
|
|
170
169
|
end
|
171
170
|
end
|
172
171
|
|
172
|
+
#
|
173
|
+
# Copy assets to dmg
|
174
|
+
#
|
175
|
+
def copy_assets_to_dmg
|
176
|
+
log.info(log_key) { "Copying assets into dmg" }
|
177
|
+
|
178
|
+
FileSyncer.glob("#{resources_dir}/*").each do |file|
|
179
|
+
FileUtils.cp_r(file, "/Volumes/#{volume_name}")
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
173
183
|
#
|
174
184
|
# Create the icon for the volume using sips.
|
175
185
|
#
|
@@ -216,10 +226,10 @@ module Omnibus
|
|
216
226
|
render_template(resource_path("create_dmg.osascript.erb"),
|
217
227
|
destination: "#{staging_dir}/create_dmg.osascript",
|
218
228
|
variables: {
|
219
|
-
volume_name:
|
220
|
-
pkg_name:
|
229
|
+
volume_name: volume_name,
|
230
|
+
pkg_name: packager.package_name,
|
221
231
|
window_bounds: window_bounds,
|
222
|
-
pkg_position:
|
232
|
+
pkg_position: pkg_position,
|
223
233
|
}
|
224
234
|
)
|
225
235
|
|
@@ -231,7 +241,9 @@ module Omnibus
|
|
231
241
|
end
|
232
242
|
|
233
243
|
#
|
234
|
-
# Compress the dmg using hdiutil and zlib.
|
244
|
+
# Compress the dmg using hdiutil and zlib. zlib offers better compression
|
245
|
+
# levels than bzip2 (10.4+) or LZFSE (10.11+), but takes longer to compress.
|
246
|
+
# We're willing to trade slightly longer build times for smaller package sizes.
|
235
247
|
#
|
236
248
|
# @return [void]
|
237
249
|
#
|
data/lib/omnibus/exceptions.rb
CHANGED
@@ -23,11 +23,11 @@ module Omnibus
|
|
23
23
|
end
|
24
24
|
|
25
25
|
def to_s
|
26
|
-
|
27
|
-
Could not locate or access the package at the given path:
|
26
|
+
<<~EOH
|
27
|
+
Could not locate or access the package at the given path:
|
28
28
|
|
29
|
-
|
30
|
-
EOH
|
29
|
+
#{@path}
|
30
|
+
EOH
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
@@ -37,11 +37,11 @@ EOH
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def to_s
|
40
|
-
|
41
|
-
Could not locate or access the package metadata file at the given path:
|
40
|
+
<<~EOH
|
41
|
+
Could not locate or access the package metadata file at the given path:
|
42
42
|
|
43
|
-
|
44
|
-
EOH
|
43
|
+
#{@path}
|
44
|
+
EOH
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
@@ -52,16 +52,16 @@ EOH
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def to_s
|
55
|
-
|
56
|
-
Missing required attribute `#{@name}' for #{@class}. You must
|
57
|
-
specify a value for `#{@name}' in your DSL file:
|
55
|
+
<<~EOH
|
56
|
+
Missing required attribute `#{@name}' for #{@class}. You must
|
57
|
+
specify a value for `#{@name}' in your DSL file:
|
58
58
|
|
59
|
-
|
59
|
+
#{@name} #{@sample.inspect}
|
60
60
|
|
61
|
-
Or set the value on the object:
|
61
|
+
Or set the value on the object:
|
62
62
|
|
63
|
-
|
64
|
-
EOH
|
63
|
+
#{@class.downcase}.#{@name}(#{@sample.inspect})
|
64
|
+
EOH
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
@@ -71,12 +71,12 @@ EOH
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def to_s
|
74
|
-
|
75
|
-
Attempting to apply the patch `#{@name}', but it was not found at any of the
|
76
|
-
following locations:
|
74
|
+
<<~EOH
|
75
|
+
Attempting to apply the patch `#{@name}', but it was not found at any of the
|
76
|
+
following locations:
|
77
77
|
|
78
|
-
#{@search_paths.map { |path| " #{path}" }.join("\n")}
|
79
|
-
EOH
|
78
|
+
#{@search_paths.map { |path| " #{path}" }.join("\n")}
|
79
|
+
EOH
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
@@ -86,12 +86,12 @@ EOH
|
|
86
86
|
end
|
87
87
|
|
88
88
|
def to_s
|
89
|
-
|
90
|
-
Attempting to evaluate the template `#{@template}', but it was not found at any of
|
91
|
-
the following locations:
|
89
|
+
<<~EOH
|
90
|
+
Attempting to evaluate the template `#{@template}', but it was not found at any of
|
91
|
+
the following locations:
|
92
92
|
|
93
|
-
#{@search_paths.map { |path| " #{path}" }.join("\n")}
|
94
|
-
EOH
|
93
|
+
#{@search_paths.map { |path| " #{path}" }.join("\n")}
|
94
|
+
EOH
|
95
95
|
end
|
96
96
|
end
|
97
97
|
|
@@ -102,11 +102,11 @@ EOH
|
|
102
102
|
end
|
103
103
|
|
104
104
|
def to_s
|
105
|
-
|
106
|
-
I could not find a project named `#{@name}' in any of the project locations:"
|
105
|
+
<<~EOH
|
106
|
+
I could not find a project named `#{@name}' in any of the project locations:"
|
107
107
|
|
108
|
-
#{@possible_paths.map { |path| " #{path}" }.join("\n")}
|
109
|
-
EOH
|
108
|
+
#{@possible_paths.map { |path| " #{path}" }.join("\n")}
|
109
|
+
EOH
|
110
110
|
end
|
111
111
|
end
|
112
112
|
|
@@ -117,11 +117,11 @@ EOH
|
|
117
117
|
end
|
118
118
|
|
119
119
|
def to_s
|
120
|
-
|
121
|
-
I could not find a software named `#{@name}' in any of the software locations:"
|
120
|
+
<<~EOH
|
121
|
+
I could not find a software named `#{@name}' in any of the software locations:"
|
122
122
|
|
123
|
-
#{@possible_paths.map { |path| " #{path}" }.join("\n")}
|
124
|
-
EOH
|
123
|
+
#{@possible_paths.map { |path| " #{path}" }.join("\n")}
|
124
|
+
EOH
|
125
125
|
end
|
126
126
|
end
|
127
127
|
|
@@ -131,13 +131,13 @@ EOH
|
|
131
131
|
end
|
132
132
|
|
133
133
|
def to_s
|
134
|
-
|
135
|
-
I could not load the `#{@name}' gem. Please make sure the gem is installed on
|
136
|
-
your local system by running `gem install #{@name}`, or by adding the following
|
137
|
-
to your Gemfile:
|
134
|
+
<<~EOH
|
135
|
+
I could not load the `#{@name}' gem. Please make sure the gem is installed on
|
136
|
+
your local system by running `gem install #{@name}`, or by adding the following
|
137
|
+
to your Gemfile:
|
138
138
|
|
139
|
-
|
140
|
-
EOH
|
139
|
+
gem '#{@name}'
|
140
|
+
EOH
|
141
141
|
end
|
142
142
|
end
|
143
143
|
|
@@ -147,9 +147,9 @@ EOH
|
|
147
147
|
end
|
148
148
|
|
149
149
|
def to_s
|
150
|
-
|
151
|
-
Software must specify a `#{@key}; to cache it in S3 (#{@package})!
|
152
|
-
EOH
|
150
|
+
<<~EOH
|
151
|
+
Software must specify a `#{@key}; to cache it in S3 (#{@package})!
|
152
|
+
EOH
|
153
153
|
end
|
154
154
|
end
|
155
155
|
|
@@ -166,9 +166,9 @@ EOH
|
|
166
166
|
end
|
167
167
|
|
168
168
|
def to_s
|
169
|
-
|
170
|
-
Invalid value for `#{@source}'. Expected #{@source} to #{@message}!
|
171
|
-
EOH
|
169
|
+
<<~EOH
|
170
|
+
Invalid value for `#{@source}'. Expected #{@source} to #{@message}!
|
171
|
+
EOH
|
172
172
|
end
|
173
173
|
end
|
174
174
|
|
@@ -182,10 +182,10 @@ EOH
|
|
182
182
|
end
|
183
183
|
|
184
184
|
def to_s
|
185
|
-
|
186
|
-
Unknown platform `#{@platform}'!
|
187
|
-
I do not know how to proceed!"
|
188
|
-
EOH
|
185
|
+
<<~EOH
|
186
|
+
Unknown platform `#{@platform}'!
|
187
|
+
I do not know how to proceed!"
|
188
|
+
EOH
|
189
189
|
end
|
190
190
|
end
|
191
191
|
|
@@ -199,46 +199,46 @@ EOH
|
|
199
199
|
end
|
200
200
|
|
201
201
|
def to_s
|
202
|
-
|
203
|
-
Unknown platform version `#{@version}' for #{@platform}!
|
204
|
-
I do not know how to proceed!"
|
205
|
-
EOH
|
202
|
+
<<~EOH
|
203
|
+
Unknown platform version `#{@version}' for #{@platform}!
|
204
|
+
I do not know how to proceed!"
|
205
|
+
EOH
|
206
206
|
end
|
207
207
|
end
|
208
208
|
|
209
209
|
class HealthCheckFailed < Error
|
210
210
|
def to_s
|
211
|
-
|
212
|
-
The health check failed! Please see above for important information.
|
213
|
-
EOH
|
211
|
+
<<~EOH
|
212
|
+
The health check failed! Please see above for important information.
|
213
|
+
EOH
|
214
214
|
end
|
215
215
|
end
|
216
216
|
|
217
217
|
class ChecksumMissing < Error
|
218
218
|
def initialize(software)
|
219
|
-
super
|
220
|
-
Verification for #{software.name} failed due to a missing checksum.
|
219
|
+
super <<~EOH
|
220
|
+
Verification for #{software.name} failed due to a missing checksum.
|
221
221
|
|
222
|
-
This added security check is used to prevent MITM attacks when downloading the
|
223
|
-
remote file. You must specify a checksum for each version of software downloaded
|
224
|
-
from a remote location.
|
225
|
-
EOH
|
222
|
+
This added security check is used to prevent MITM attacks when downloading the
|
223
|
+
remote file. You must specify a checksum for each version of software downloaded
|
224
|
+
from a remote location.
|
225
|
+
EOH
|
226
226
|
end
|
227
227
|
end
|
228
228
|
|
229
229
|
class ChecksumMismatch < Error
|
230
230
|
def initialize(software, expected, actual)
|
231
|
-
super
|
232
|
-
Verification for #{software.name} failed due to a checksum mismatch:
|
231
|
+
super <<~EOH
|
232
|
+
Verification for #{software.name} failed due to a checksum mismatch:
|
233
233
|
|
234
|
-
|
235
|
-
|
234
|
+
expected: #{expected}
|
235
|
+
actual: #{actual}
|
236
236
|
|
237
|
-
This added security check is used to prevent MITM attacks when downloading the
|
238
|
-
remote file. If you have updated the version or URL for the download, you will
|
239
|
-
also need to update the checksum value. You can find the checksum value on the
|
240
|
-
software publisher's website.
|
241
|
-
EOH
|
237
|
+
This added security check is used to prevent MITM attacks when downloading the
|
238
|
+
remote file. If you have updated the version or URL for the download, you will
|
239
|
+
also need to update the checksum value. You can find the checksum value on the
|
240
|
+
software publisher's website.
|
241
|
+
EOH
|
242
242
|
end
|
243
243
|
end
|
244
244
|
|
@@ -258,19 +258,19 @@ EOH
|
|
258
258
|
stdout = cmd.stdout.empty? ? "(nothing)" : cmd.stdout.strip
|
259
259
|
stderr = cmd.stderr.empty? ? "(nothing)" : cmd.stderr.strip
|
260
260
|
|
261
|
-
super
|
262
|
-
The following shell command exited with status #{status}:
|
261
|
+
super <<~EOH
|
262
|
+
The following shell command exited with status #{status}:
|
263
263
|
|
264
|
-
|
264
|
+
$ #{command_with_env}
|
265
265
|
|
266
|
-
Output:
|
266
|
+
Output:
|
267
267
|
|
268
|
-
|
268
|
+
#{stdout}
|
269
269
|
|
270
|
-
Error:
|
270
|
+
Error:
|
271
271
|
|
272
|
-
|
273
|
-
EOH
|
272
|
+
#{stderr}
|
273
|
+
EOH
|
274
274
|
end
|
275
275
|
end
|
276
276
|
|
@@ -289,15 +289,15 @@ EOH
|
|
289
289
|
|
290
290
|
timeout = cmd.timeout.to_s.reverse.gsub(/...(?=.)/, '\&,').reverse
|
291
291
|
|
292
|
-
super
|
293
|
-
The following shell command timed out at #{timeout} seconds:
|
292
|
+
super <<~EOH
|
293
|
+
The following shell command timed out at #{timeout} seconds:
|
294
294
|
|
295
|
-
|
295
|
+
$ #{command_with_env}
|
296
296
|
|
297
|
-
Please increase the `:timeout' value or run the command manually to make sure it
|
298
|
-
is completing successfully. Sometimes it is common for a command to wait for
|
299
|
-
user input.
|
300
|
-
EOH
|
297
|
+
Please increase the `:timeout' value or run the command manually to make sure it
|
298
|
+
is completing successfully. Sometimes it is common for a command to wait for
|
299
|
+
user input.
|
300
|
+
EOH
|
301
301
|
end
|
302
302
|
end
|
303
303
|
|
@@ -306,27 +306,27 @@ EOH
|
|
306
306
|
name = project.name
|
307
307
|
culprit = project.culprit.name
|
308
308
|
|
309
|
-
super
|
310
|
-
The project `#{name}' was already marked as dirty by `#{culprit}'. You cannot
|
311
|
-
mark a project as dirty twice. This is probably a bug in Omnibus and should be
|
312
|
-
reported.
|
313
|
-
EOH
|
309
|
+
super <<~EOH
|
310
|
+
The project `#{name}' was already marked as dirty by `#{culprit}'. You cannot
|
311
|
+
mark a project as dirty twice. This is probably a bug in Omnibus and should be
|
312
|
+
reported.
|
313
|
+
EOH
|
314
314
|
end
|
315
315
|
end
|
316
316
|
|
317
317
|
class UnresolvableGitReference < Error
|
318
318
|
def initialize(ref)
|
319
|
-
super
|
320
|
-
Could not resolve `#{ref}' to a valid git SHA-1.
|
321
|
-
EOH
|
319
|
+
super <<~EOH
|
320
|
+
Could not resolve `#{ref}' to a valid git SHA-1.
|
321
|
+
EOH
|
322
322
|
end
|
323
323
|
end
|
324
324
|
|
325
325
|
class InvalidVersion < Error
|
326
326
|
def initialize(version)
|
327
|
-
super
|
328
|
-
'#{version}' could not be parsed as a valid version.
|
329
|
-
EOF
|
327
|
+
super <<~EOF
|
328
|
+
'#{version}' could not be parsed as a valid version.
|
329
|
+
EOF
|
330
330
|
end
|
331
331
|
end
|
332
332
|
|
@@ -342,13 +342,13 @@ EOF
|
|
342
342
|
end
|
343
343
|
|
344
344
|
def to_s
|
345
|
-
|
346
|
-
Encountered error(s) with project's licensing information.
|
347
|
-
Failing the build because :fatal_licensing_warnings is set in the configuration.
|
348
|
-
Error(s):
|
345
|
+
<<~EOH
|
346
|
+
Encountered error(s) with project's licensing information.
|
347
|
+
Failing the build because :fatal_licensing_warnings is set in the configuration.
|
348
|
+
Error(s):
|
349
349
|
|
350
|
-
|
351
|
-
EOH
|
350
|
+
#{@errors.join("\n ")}
|
351
|
+
EOH
|
352
352
|
end
|
353
353
|
end
|
354
354
|
end
|