omnibus 6.0.30 → 7.0.13
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 +2 -1
- data/README.md +24 -8
- data/Rakefile +1 -1
- data/lib/omnibus/build_version_dsl.rb +1 -0
- data/lib/omnibus/builder.rb +6 -5
- data/lib/omnibus/changelog_printer.rb +7 -4
- data/lib/omnibus/cleaner.rb +3 -0
- data/lib/omnibus/cli.rb +1 -1
- data/lib/omnibus/cli/changelog.rb +24 -24
- data/lib/omnibus/cli/publish.rb +5 -5
- data/lib/omnibus/compressor.rb +2 -2
- data/lib/omnibus/compressors/base.rb +1 -1
- data/lib/omnibus/compressors/dmg.rb +45 -7
- data/lib/omnibus/config.rb +12 -2
- data/lib/omnibus/fetchers/git_fetcher.rb +1 -0
- data/lib/omnibus/fetchers/net_fetcher.rb +2 -3
- data/lib/omnibus/file_syncer.rb +2 -2
- data/lib/omnibus/generator_files/README.md.erb +18 -15
- data/lib/omnibus/generator_files/config/software/preparation.rb.erb +1 -1
- data/lib/omnibus/generator_files/omnibus.rb.erb +5 -4
- data/lib/omnibus/health_check.rb +1 -1
- data/lib/omnibus/licensing.rb +3 -4
- data/lib/omnibus/logger.rb +2 -1
- data/lib/omnibus/manifest.rb +1 -1
- data/lib/omnibus/metadata.rb +2 -2
- data/lib/omnibus/packagers/appx.rb +1 -2
- data/lib/omnibus/packagers/base.rb +1 -0
- data/lib/omnibus/packagers/bff.rb +6 -8
- data/lib/omnibus/packagers/deb.rb +7 -10
- data/lib/omnibus/packagers/ips.rb +3 -6
- data/lib/omnibus/packagers/makeself.rb +1 -2
- data/lib/omnibus/packagers/msi.rb +12 -11
- data/lib/omnibus/packagers/pkg.rb +125 -9
- data/lib/omnibus/packagers/rpm.rb +11 -12
- data/lib/omnibus/packagers/solaris.rb +4 -4
- data/lib/omnibus/packagers/windows_base.rb +7 -6
- data/lib/omnibus/project.rb +1 -0
- data/lib/omnibus/publisher.rb +14 -12
- data/lib/omnibus/publishers/s3_publisher.rb +6 -4
- data/lib/omnibus/s3_cache.rb +3 -1
- data/lib/omnibus/s3_helpers.rb +6 -6
- data/lib/omnibus/software.rb +66 -30
- data/lib/omnibus/templating.rb +1 -1
- data/lib/omnibus/util.rb +3 -2
- data/lib/omnibus/version.rb +1 -1
- data/lib/omnibus/whitelist.rb +6 -1
- data/omnibus.gemspec +6 -6
- data/resources/rpm/signing.erb +7 -10
- data/spec/functional/builder_spec.rb +2 -1
- data/spec/functional/fetchers/file_fetcher_spec.rb +4 -4
- data/spec/functional/fetchers/git_fetcher_spec.rb +4 -4
- data/spec/functional/fetchers/net_fetcher_spec.rb +5 -6
- data/spec/functional/fetchers/path_fetcher_spec.rb +4 -4
- data/spec/functional/file_syncer_spec.rb +42 -0
- data/spec/functional/licensing_spec.rb +5 -5
- data/spec/support/examples.rb +3 -4
- data/spec/unit/builder_spec.rb +9 -9
- data/spec/unit/changelogprinter_spec.rb +8 -6
- data/spec/unit/compressor_spec.rb +3 -3
- data/spec/unit/compressors/dmg_spec.rb +43 -4
- data/spec/unit/fetchers/net_fetcher_spec.rb +16 -17
- data/spec/unit/health_check_spec.rb +2 -6
- data/spec/unit/library_spec.rb +2 -1
- data/spec/unit/manifest_diff_spec.rb +2 -2
- data/spec/unit/manifest_spec.rb +1 -1
- data/spec/unit/metadata_spec.rb +9 -11
- data/spec/unit/omnibus_spec.rb +1 -1
- data/spec/unit/packagers/bff_spec.rb +2 -2
- data/spec/unit/packagers/msi_spec.rb +2 -2
- data/spec/unit/packagers/pkg_spec.rb +354 -0
- data/spec/unit/packagers/pkgsrc_spec.rb +1 -1
- data/spec/unit/packagers/solaris_spec.rb +7 -7
- data/spec/unit/project_spec.rb +2 -2
- data/spec/unit/publisher_spec.rb +8 -9
- data/spec/unit/publishers/artifactory_publisher_spec.rb +2 -4
- data/spec/unit/publishers/s3_publisher_spec.rb +2 -4
- data/spec/unit/s3_cacher_spec.rb +19 -6
- data/spec/unit/s3_helpers_spec.rb +22 -3
- data/spec/unit/software_spec.rb +72 -42
- data/spec/unit/util_spec.rb +1 -2
- metadata +17 -11
data/lib/omnibus/config.rb
CHANGED
@@ -285,7 +285,7 @@ module Omnibus
|
|
285
285
|
#
|
286
286
|
# @return [String, nil]
|
287
287
|
default(:s3_access_key) do
|
288
|
-
if s3_profile
|
288
|
+
if s3_profile || s3_iam_role_arn
|
289
289
|
nil
|
290
290
|
else
|
291
291
|
raise MissingRequiredAttribute.new(self, :s3_access_key, "'ABCD1234'")
|
@@ -296,7 +296,7 @@ module Omnibus
|
|
296
296
|
#
|
297
297
|
# @return [String, nil]
|
298
298
|
default(:s3_secret_key) do
|
299
|
-
if s3_profile
|
299
|
+
if s3_profile || s3_iam_role_arn
|
300
300
|
nil
|
301
301
|
else
|
302
302
|
raise MissingRequiredAttribute.new(self, :s3_secret_key, "'EFGH5678'")
|
@@ -308,6 +308,11 @@ module Omnibus
|
|
308
308
|
# @return [String, nil]
|
309
309
|
default(:s3_profile, nil)
|
310
310
|
|
311
|
+
# The AWS IAM role arn to use with S3 caching.
|
312
|
+
#
|
313
|
+
# @return [String, nil]
|
314
|
+
default(:s3_iam_role_arn, nil)
|
315
|
+
|
311
316
|
# The region of the S3 bucket you want to cache software artifacts in.
|
312
317
|
# Defaults to 'us-east-1'
|
313
318
|
#
|
@@ -455,6 +460,11 @@ module Omnibus
|
|
455
460
|
# @return [String, nil]
|
456
461
|
default(:publish_s3_profile, nil)
|
457
462
|
|
463
|
+
# The AWS IAM role arn to use with S3 publisher.
|
464
|
+
#
|
465
|
+
# @return [String, nil]
|
466
|
+
default(:publish_s3_iam_role_arn, nil)
|
467
|
+
|
458
468
|
# Directory pattern for the S3 publisher.
|
459
469
|
# Interpolation of metadata keys is supported.
|
460
470
|
#
|
@@ -31,7 +31,7 @@ module Omnibus
|
|
31
31
|
ALL_EXTENSIONS = WIN_7Z_EXTENSIONS + TAR_EXTENSIONS
|
32
32
|
|
33
33
|
# Digest types used for verifying file checksums
|
34
|
-
DIGESTS =
|
34
|
+
DIGESTS = %i{sha512 sha256 sha1 md5}.freeze
|
35
35
|
|
36
36
|
#
|
37
37
|
# A fetch is required if the downloaded_file (such as a tarball) does not
|
@@ -314,8 +314,7 @@ module Omnibus
|
|
314
314
|
#
|
315
315
|
# @return [[String]]
|
316
316
|
#
|
317
|
-
def extract_command
|
318
|
-
end
|
317
|
+
def extract_command; end
|
319
318
|
|
320
319
|
#
|
321
320
|
# Primitively determine whether we should use gtar or tar to untar a file.
|
data/lib/omnibus/file_syncer.rb
CHANGED
@@ -56,13 +56,13 @@ module Omnibus
|
|
56
56
|
#
|
57
57
|
def all_files_under(source, options = {})
|
58
58
|
excludes = Array(options[:exclude]).map do |exclude|
|
59
|
-
[exclude, "#{exclude}
|
59
|
+
[exclude, "#{exclude}/**"]
|
60
60
|
end.flatten
|
61
61
|
|
62
62
|
source_files = glob(File.join(source, "**/*"))
|
63
63
|
source_files = source_files.reject do |source_file|
|
64
64
|
basename = relative_path_for(source_file, source)
|
65
|
-
excludes.any? { |exclude| File.fnmatch?(exclude, basename, File::FNM_DOTMATCH) }
|
65
|
+
excludes.any? { |exclude| File.fnmatch?(exclude, basename, File::FNM_DOTMATCH | File::FNM_PATHNAME) }
|
66
66
|
end
|
67
67
|
end
|
68
68
|
|
@@ -47,8 +47,8 @@ $ bin/omnibus clean <%= config[:name] %> --purge
|
|
47
47
|
### Publish
|
48
48
|
|
49
49
|
Omnibus has a built-in mechanism for releasing to a variety of "backends", such
|
50
|
-
as Amazon S3. You must set the proper credentials in your
|
51
|
-
file or specify them via the command line.
|
50
|
+
as Amazon S3. You must set the proper credentials in your
|
51
|
+
[`omnibus.rb`](omnibus.rb) config file or specify them via the command line.
|
52
52
|
|
53
53
|
```shell
|
54
54
|
$ bin/omnibus publish path/to/*.deb --backend s3
|
@@ -82,37 +82,40 @@ version of every software definition.
|
|
82
82
|
|
83
83
|
Kitchen-based Build Environment
|
84
84
|
-------------------------------
|
85
|
-
Every Omnibus project ships
|
86
|
-
[Berksfile](https://docs.chef.io/berkshelf.html) that will allow you to build
|
87
|
-
|
88
|
-
|
85
|
+
Every Omnibus project ships with a project-specific
|
86
|
+
[Berksfile](https://docs.chef.io/berkshelf.html) that will allow you to build
|
87
|
+
your omnibus projects on all of the platforms listed in the
|
88
|
+
[`.kitchen.yml`](.kitchen.yml). You can add/remove additional platforms as
|
89
|
+
needed by changing the list found in the [`.kitchen.yml`](.kitchen.yml)
|
90
|
+
`platforms` YAML stanza.
|
89
91
|
|
90
92
|
This build environment is designed to get you up-and-running quickly. However,
|
91
|
-
there is nothing that restricts you
|
92
|
-
the [omnibus cookbook](https://github.com/chef-cookbooks/omnibus) to setup
|
93
|
-
|
93
|
+
there is nothing that restricts you from building on other platforms. Simply use
|
94
|
+
the [omnibus cookbook](https://github.com/chef-cookbooks/omnibus) to setup your
|
95
|
+
desired platform and execute the build steps listed above.
|
94
96
|
|
95
97
|
The default build environment requires Test Kitchen and VirtualBox for local
|
96
98
|
development. Test Kitchen also exposes the ability to provision instances using
|
97
99
|
various cloud providers like AWS, DigitalOcean, or OpenStack. For more
|
98
100
|
information, please see the [Test Kitchen documentation](https://kitchen.ci/).
|
99
101
|
|
100
|
-
Once you have tweaked your `.kitchen.yml`
|
101
|
-
liking, you can bring up an
|
102
|
-
command.
|
102
|
+
Once you have tweaked your [`.kitchen.yml`](.kitchen.yml) (or
|
103
|
+
[`.kitchen.local.yml`](.kitchen.local.yml)) to your liking, you can bring up an
|
104
|
+
individual build environment using the `kitchen` command.
|
105
|
+
|
103
106
|
|
104
107
|
```shell
|
105
|
-
$ bin/kitchen converge ubuntu-
|
108
|
+
$ bin/kitchen converge ubuntu-1804
|
106
109
|
```
|
107
110
|
|
108
111
|
Then login to the instance and build the project as described in the Usage
|
109
112
|
section:
|
110
113
|
|
111
114
|
```shell
|
112
|
-
$
|
115
|
+
$ bin/kitchen login ubuntu-1804
|
116
|
+
[vagrant@ubuntu...] $ . load-omnibus-toolchain.sh
|
113
117
|
[vagrant@ubuntu...] $ cd <%= config[:name] %>
|
114
118
|
[vagrant@ubuntu...] $ bundle install
|
115
|
-
[vagrant@ubuntu...] $ ...
|
116
119
|
[vagrant@ubuntu...] $ bin/omnibus build <%= config[:name] %>
|
117
120
|
```
|
118
121
|
|
@@ -31,10 +31,11 @@
|
|
31
31
|
# Enable S3 asset caching
|
32
32
|
# ------------------------------
|
33
33
|
# use_s3_caching true
|
34
|
-
# s3_access_key
|
35
|
-
# s3_secret_key
|
36
|
-
# s3_profile
|
37
|
-
#
|
34
|
+
# s3_access_key ENV['AWS_ACCESS_KEY_ID']
|
35
|
+
# s3_secret_key ENV['AWS_SECRET_ACCESS_KEY']
|
36
|
+
# s3_profile ENV['AWS_S3_PROFILE']
|
37
|
+
# s3_iam_role_arn ENV['S3_IAM_ROLE_ARN']
|
38
|
+
# s3_bucket ENV['AWS_S3_BUCKET']
|
38
39
|
|
39
40
|
# Customize compiler bits
|
40
41
|
# ------------------------------
|
data/lib/omnibus/health_check.rb
CHANGED
@@ -331,7 +331,7 @@ module Omnibus
|
|
331
331
|
#
|
332
332
|
def health_check_ldd
|
333
333
|
regexp_ends = ".*(" + IGNORED_ENDINGS.map { |e| e.gsub(/\./, '\.') }.join("|") + ")$"
|
334
|
-
regexp_patterns = IGNORED_PATTERNS.map { |e| ".*" + e.gsub(
|
334
|
+
regexp_patterns = IGNORED_PATTERNS.map { |e| ".*" + e.gsub(%r{/}, '\/') + ".*" }.join("|")
|
335
335
|
regexp = regexp_ends + "|" + regexp_patterns
|
336
336
|
|
337
337
|
current_library = nil
|
data/lib/omnibus/licensing.rb
CHANGED
@@ -130,8 +130,7 @@ module Omnibus
|
|
130
130
|
#
|
131
131
|
# @return [void]
|
132
132
|
#
|
133
|
-
def execute_pre_build(software)
|
134
|
-
end
|
133
|
+
def execute_pre_build(software); end
|
135
134
|
|
136
135
|
# Callback that gets called by Software#build_me after the build is done.
|
137
136
|
# Invokes license copying for the given software. This ensures that
|
@@ -246,7 +245,7 @@ module Omnibus
|
|
246
245
|
|
247
246
|
out << "This product bundles #{name} #{version},\n"
|
248
247
|
out << "which is available under a \"#{license}\" License.\n"
|
249
|
-
|
248
|
+
unless license_files.empty?
|
250
249
|
out << "For details, see:\n"
|
251
250
|
license_files.each do |license_file|
|
252
251
|
out << "#{license_package_location(name, license_file)}\n"
|
@@ -440,7 +439,7 @@ module Omnibus
|
|
440
439
|
|
441
440
|
if Config.fatal_transitive_dependency_licensing_warnings && !transitive_dependency_licensing_warnings.empty?
|
442
441
|
warnings_to_raise << transitive_dependency_licensing_warnings
|
443
|
-
warnings_to_raise << "If you are encountering missing license or missing license file errors for **transitive** dependencies, you can provide overrides for the missing information at https://github.com/chef/license_scout/blob/
|
442
|
+
warnings_to_raise << "If you are encountering missing license or missing license file errors for **transitive** dependencies, you can provide overrides for the missing information at https://github.com/chef/license_scout/blob/1-stable/lib/license_scout/overrides.rb#L93. \n Promote license_scout to Rubygems with `/expeditor promote chef/license_scout:1-stable X.Y.Z` in slack."
|
444
443
|
end
|
445
444
|
|
446
445
|
warnings_to_raise.flatten!
|
data/lib/omnibus/logger.rb
CHANGED
@@ -102,6 +102,7 @@ module Omnibus
|
|
102
102
|
#
|
103
103
|
def add(severity, progname, &block)
|
104
104
|
return true if io.nil? || severity < level
|
105
|
+
|
105
106
|
message = format_message(severity, progname, yield)
|
106
107
|
MUTEX.synchronize { io.write(message) }
|
107
108
|
true
|
@@ -138,7 +139,7 @@ module Omnibus
|
|
138
139
|
else
|
139
140
|
left = "#{format_severity(severity)} | "
|
140
141
|
end
|
141
|
-
"#{left.rjust(LEFT)}#{Time.now.iso8601
|
142
|
+
"#{left.rjust(LEFT)}#{Time.now.iso8601} | #{message}\n"
|
142
143
|
end
|
143
144
|
|
144
145
|
#
|
data/lib/omnibus/manifest.rb
CHANGED
data/lib/omnibus/metadata.rb
CHANGED
@@ -83,7 +83,7 @@ module Omnibus
|
|
83
83
|
data = File.read(path_for(package))
|
84
84
|
hash = FFI_Yajl::Parser.parse(data, symbolize_names: true)
|
85
85
|
|
86
|
-
|
86
|
+
# Ensure Platform version has been truncated
|
87
87
|
if hash[:platform_version] && hash[:platform]
|
88
88
|
hash[:platform_version] = truncate_platform_version(hash[:platform_version], hash[:platform])
|
89
89
|
end
|
@@ -176,7 +176,7 @@ module Omnibus
|
|
176
176
|
when "aix", "alpine", "mac_os_x", "openbsd", "slackware", "solaris2", "opensuse", "opensuseleap", "ubuntu", "amazon"
|
177
177
|
# Only want MAJOR.MINOR (e.g. Mac OS X 10.9, Ubuntu 12.04)
|
178
178
|
platform_version.split(".")[0..1].join(".")
|
179
|
-
when "arch", "gentoo"
|
179
|
+
when "arch", "gentoo", "kali"
|
180
180
|
# Arch Linux / Gentoo do not have a platform_version ohai attribute, they are rolling release (lsb_release -r)
|
181
181
|
"rolling"
|
182
182
|
when "windows"
|
@@ -153,12 +153,11 @@ module Omnibus
|
|
153
153
|
destination: "#{scripts_staging_dir}/config",
|
154
154
|
variables: {
|
155
155
|
name: project.name,
|
156
|
-
}
|
157
|
-
)
|
156
|
+
})
|
158
157
|
end
|
159
158
|
|
160
159
|
File.open(File.join(scripts_staging_dir, "config"), "a") do |file|
|
161
|
-
file.puts "mv '#{alt.gsub(/^#{staging_dir}/,
|
160
|
+
file.puts "mv '#{alt.gsub(/^#{staging_dir}/, "")}' '#{path.gsub(/^#{staging_dir}/, "")}'"
|
162
161
|
end
|
163
162
|
|
164
163
|
path = alt
|
@@ -189,8 +188,7 @@ module Omnibus
|
|
189
188
|
description: project.description,
|
190
189
|
files: files,
|
191
190
|
scripts: scripts,
|
192
|
-
}
|
193
|
-
)
|
191
|
+
})
|
194
192
|
|
195
193
|
# Print the full contents of the rendered template file for mkinstallp's use
|
196
194
|
log.debug(log_key) { "Rendered Template:\n" + File.read(File.join(staging_dir, "gen.template")) }
|
@@ -214,19 +212,19 @@ module Omnibus
|
|
214
212
|
# we will chown from 'project' on, rather than 'project/dir', which leaves
|
215
213
|
# project owned by the build user (which is incorrect)
|
216
214
|
# First - let's find out who we are.
|
217
|
-
shellout!("sudo chown -Rh 0:0 #{File.join(staging_dir, project.install_dir.match(
|
215
|
+
shellout!("sudo chown -Rh 0:0 #{File.join(staging_dir, project.install_dir.match(%r{^/?(\w+)}).to_s)}")
|
218
216
|
log.info(log_key) { "Creating .bff file" }
|
219
217
|
|
220
218
|
# Since we want the owner to be root, we need to sudo the mkinstallp
|
221
219
|
# command, otherwise it will not have access to the previously chowned
|
222
220
|
# directory.
|
223
|
-
shellout!("sudo /usr/sbin/mkinstallp -d #{staging_dir} -T #{File.join(staging_dir,
|
221
|
+
shellout!("sudo /usr/sbin/mkinstallp -d #{staging_dir} -T #{File.join(staging_dir, "gen.template")}")
|
224
222
|
|
225
223
|
# Print the full contents of the inventory file generated by mkinstallp
|
226
224
|
# from within the staging_dir's .info folder (where control files for the
|
227
225
|
# packaging process are kept.)
|
228
226
|
log.debug(log_key) do
|
229
|
-
"With .inventory file of:\n" + File.read("#{File.join( staging_dir,
|
227
|
+
"With .inventory file of:\n" + File.read("#{File.join( staging_dir, ".info", "#{safe_base_package_name}.inventory" )}")
|
230
228
|
end
|
231
229
|
|
232
230
|
# Copy the resulting package up to the package_dir
|
@@ -207,7 +207,7 @@ module Omnibus
|
|
207
207
|
if null?(val)
|
208
208
|
@compression_type || :gzip
|
209
209
|
else
|
210
|
-
unless val.is_a?(Symbol) &&
|
210
|
+
unless val.is_a?(Symbol) && %i{gzip xz none}.member?(val)
|
211
211
|
raise InvalidValue.new(:compression_type, "be a Symbol (:gzip, :xz, or :none)")
|
212
212
|
end
|
213
213
|
|
@@ -261,7 +261,7 @@ module Omnibus
|
|
261
261
|
@compression_strategy
|
262
262
|
else
|
263
263
|
unless val.is_a?(Symbol) &&
|
264
|
-
|
264
|
+
%i{filtered huffman rle fixed extreme}.member?(val)
|
265
265
|
raise InvalidValue.new(:compression_strategy, "be a Symbol (:filtered, "\
|
266
266
|
":huffman, :rle, :fixed, or :extreme)")
|
267
267
|
end
|
@@ -320,8 +320,7 @@ module Omnibus
|
|
320
320
|
conflicts: project.conflicts,
|
321
321
|
replaces: project.replaces,
|
322
322
|
dependencies: project.runtime_dependencies,
|
323
|
-
}
|
324
|
-
)
|
323
|
+
})
|
325
324
|
end
|
326
325
|
|
327
326
|
#
|
@@ -336,8 +335,7 @@ module Omnibus
|
|
336
335
|
destination: File.join(debian_dir, "conffiles"),
|
337
336
|
variables: {
|
338
337
|
config_files: project.config_files,
|
339
|
-
}
|
340
|
-
)
|
338
|
+
})
|
341
339
|
end
|
342
340
|
|
343
341
|
#
|
@@ -380,8 +378,7 @@ module Omnibus
|
|
380
378
|
destination: File.join(debian_dir, "md5sums"),
|
381
379
|
variables: {
|
382
380
|
md5sums: hash,
|
383
|
-
}
|
384
|
-
)
|
381
|
+
})
|
385
382
|
end
|
386
383
|
|
387
384
|
#
|
@@ -421,7 +418,7 @@ module Omnibus
|
|
421
418
|
#
|
422
419
|
# @return [void]
|
423
420
|
def sign_deb_file
|
424
|
-
|
421
|
+
unless signing_passphrase
|
425
422
|
log.info(log_key) { "Signing not enabled for .deb file" }
|
426
423
|
return
|
427
424
|
end
|
@@ -447,7 +444,7 @@ module Omnibus
|
|
447
444
|
# Create signature (as +root+)
|
448
445
|
gpg_command = "#{gpg} --armor --sign --detach-sign"
|
449
446
|
gpg_command << " --local-user '#{project.maintainer}'"
|
450
|
-
gpg_command << " --homedir #{ENV[
|
447
|
+
gpg_command << " --homedir #{ENV["HOME"]}/.gnupg" # TODO: Make this configurable
|
451
448
|
## pass the +signing_passphrase+ via +STDIN+
|
452
449
|
gpg_command << " --batch --no-tty"
|
453
450
|
## Check `gpg` for the compatibility/need of pinentry-mode
|
@@ -209,8 +209,7 @@ module Omnibus
|
|
209
209
|
destination: transform_file,
|
210
210
|
variables: {
|
211
211
|
pathdir: project.install_dir.split("/")[1],
|
212
|
-
}
|
213
|
-
)
|
212
|
+
})
|
214
213
|
end
|
215
214
|
|
216
215
|
#
|
@@ -242,8 +241,7 @@ module Omnibus
|
|
242
241
|
render_template_content(resource_path(symlinks_file),
|
243
242
|
{
|
244
243
|
projectdir: project.install_dir,
|
245
|
-
}
|
246
|
-
)
|
244
|
+
})
|
247
245
|
end
|
248
246
|
|
249
247
|
#
|
@@ -262,8 +260,7 @@ module Omnibus
|
|
262
260
|
description: project.description,
|
263
261
|
summary: project.friendly_name,
|
264
262
|
arch: safe_architecture,
|
265
|
-
}
|
266
|
-
)
|
263
|
+
})
|
267
264
|
|
268
265
|
# Append the contents of symlinks_file if it exists
|
269
266
|
if symlinks_file
|
@@ -181,10 +181,12 @@ module Omnibus
|
|
181
181
|
unless val.is_a?(TrueClass) || val.is_a?(FalseClass)
|
182
182
|
raise InvalidValue.new(:iwix_light_delay_validation, "be TrueClass or FalseClass")
|
183
183
|
end
|
184
|
+
|
184
185
|
@delay_validation ||= val
|
185
186
|
unless @delay_validation
|
186
187
|
return ""
|
187
188
|
end
|
189
|
+
|
188
190
|
"-sval"
|
189
191
|
end
|
190
192
|
expose :wix_light_delay_validation
|
@@ -225,6 +227,7 @@ module Omnibus
|
|
225
227
|
unless val.is_a?(TrueClass) || val.is_a?(FalseClass)
|
226
228
|
raise InvalidValue.new(:bundle_msi, "be TrueClass or FalseClass")
|
227
229
|
end
|
230
|
+
|
228
231
|
@bundle_msi ||= val
|
229
232
|
end
|
230
233
|
expose :bundle_msi
|
@@ -244,6 +247,7 @@ module Omnibus
|
|
244
247
|
unless val.is_a?(TrueClass) || val.is_a?(FalseClass)
|
245
248
|
raise InvalidValue.new(:fast_msi, "be TrueClass or FalseClass")
|
246
249
|
end
|
250
|
+
|
247
251
|
@fast_msi ||= val
|
248
252
|
end
|
249
253
|
expose :fast_msi
|
@@ -298,6 +302,7 @@ module Omnibus
|
|
298
302
|
|
299
303
|
raise "Could not find `#{search_pattern}'!" if file_paths.none?
|
300
304
|
raise "Multiple possible matches of `#{search_pattern}'! : #{file_paths}" if file_paths.count > 1
|
305
|
+
|
301
306
|
file_paths.first.relative_path_from(install_path).to_s
|
302
307
|
end
|
303
308
|
expose :gem_path
|
@@ -340,8 +345,7 @@ module Omnibus
|
|
340
345
|
name: project.package_name,
|
341
346
|
friendly_name: project.friendly_name,
|
342
347
|
maintainer: project.maintainer,
|
343
|
-
}
|
344
|
-
)
|
348
|
+
})
|
345
349
|
end
|
346
350
|
|
347
351
|
#
|
@@ -360,8 +364,7 @@ module Omnibus
|
|
360
364
|
parameters: parameters,
|
361
365
|
version: windows_package_version,
|
362
366
|
display_version: msi_display_version,
|
363
|
-
}
|
364
|
-
)
|
367
|
+
})
|
365
368
|
end
|
366
369
|
|
367
370
|
#
|
@@ -408,8 +411,7 @@ module Omnibus
|
|
408
411
|
hierarchy: hierarchy,
|
409
412
|
fastmsi: fast_msi,
|
410
413
|
wix_install_dir: wix_install_dir,
|
411
|
-
}
|
412
|
-
)
|
414
|
+
})
|
413
415
|
end
|
414
416
|
|
415
417
|
#
|
@@ -429,8 +431,7 @@ module Omnibus
|
|
429
431
|
version: windows_package_version,
|
430
432
|
display_version: msi_display_version,
|
431
433
|
msi: windows_safe_path(Config.package_dir, msi_name),
|
432
|
-
}
|
433
|
-
)
|
434
|
+
})
|
434
435
|
end
|
435
436
|
|
436
437
|
#
|
@@ -487,7 +488,7 @@ module Omnibus
|
|
487
488
|
-ext WixBalExtension
|
488
489
|
#{wix_extension_switches(wix_candle_extensions)}
|
489
490
|
-dOmnibusCacheDir="#{windows_safe_path(File.expand_path(Config.cache_dir))}"
|
490
|
-
"#{windows_safe_path(staging_dir,
|
491
|
+
"#{windows_safe_path(staging_dir, "bundle.wxs")}"
|
491
492
|
EOH
|
492
493
|
else
|
493
494
|
<<-EOH.split.join(" ").squeeze(" ").strip
|
@@ -496,7 +497,7 @@ module Omnibus
|
|
496
497
|
#{wix_candle_flags}
|
497
498
|
#{wix_extension_switches(wix_candle_extensions)}
|
498
499
|
-dProjectSourceDir="#{windows_safe_path(project.install_dir)}" "project-files.wxs"
|
499
|
-
"#{windows_safe_path(staging_dir,
|
500
|
+
"#{windows_safe_path(staging_dir, "source.wxs")}"
|
500
501
|
EOH
|
501
502
|
end
|
502
503
|
end
|
@@ -588,7 +589,7 @@ module Omnibus
|
|
588
589
|
# @return [String]
|
589
590
|
#
|
590
591
|
def wix_extension_switches(arr)
|
591
|
-
"#{arr.map { |e| "-ext '#{e}'" }.join(
|
592
|
+
"#{arr.map { |e| "-ext '#{e}'" }.join(" ")}"
|
592
593
|
end
|
593
594
|
end
|
594
595
|
end
|