omnibus 4.1.0 → 5.0.0

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 (39) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -0
  3. data/CHANGELOG.md +22 -0
  4. data/MAINTAINERS.md +2 -1
  5. data/README.md +1 -1
  6. data/lib/omnibus/builder.rb +2 -17
  7. data/lib/omnibus/cli/publish.rb +4 -0
  8. data/lib/omnibus/exceptions.rb +12 -0
  9. data/lib/omnibus/fetchers/net_fetcher.rb +4 -0
  10. data/lib/omnibus/manifest.rb +1 -1
  11. data/lib/omnibus/metadata.rb +13 -4
  12. data/lib/omnibus/packager.rb +1 -0
  13. data/lib/omnibus/packagers/base.rb +1 -0
  14. data/lib/omnibus/packagers/bff.rb +1 -1
  15. data/lib/omnibus/packagers/deb.rb +4 -0
  16. data/lib/omnibus/packagers/msi.rb +168 -55
  17. data/lib/omnibus/packagers/rpm.rb +41 -29
  18. data/lib/omnibus/packagers/solaris.rb +76 -25
  19. data/lib/omnibus/publisher.rb +4 -0
  20. data/lib/omnibus/publishers/artifactory_publisher.rb +19 -8
  21. data/lib/omnibus/sugarable.rb +5 -0
  22. data/lib/omnibus/version.rb +1 -1
  23. data/omnibus.gemspec +1 -1
  24. data/resources/msi/CustomActionFastMsi.CA.dll +0 -0
  25. data/resources/msi/localization-en-us.wxl.erb +4 -0
  26. data/resources/msi/source.wxs.erb +46 -9
  27. data/resources/rpm/spec.erb +0 -1
  28. data/spec/functional/builder_spec.rb +109 -113
  29. data/spec/functional/fetchers/net_fetcher_spec.rb +10 -0
  30. data/spec/unit/metadata_spec.rb +39 -4
  31. data/spec/unit/packagers/bff_spec.rb +9 -0
  32. data/spec/unit/packagers/deb_spec.rb +17 -5
  33. data/spec/unit/packagers/msi_spec.rb +175 -3
  34. data/spec/unit/packagers/rpm_spec.rb +50 -3
  35. data/spec/unit/packagers/solaris_spec.rb +234 -0
  36. data/spec/unit/publisher_spec.rb +14 -0
  37. data/spec/unit/publishers/artifactory_publisher_spec.rb +72 -3
  38. data/spec/unit/sugarable_spec.rb +16 -0
  39. metadata +7 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 163fba58e122c1c52362ace044e0c484ad1862ee
4
- data.tar.gz: 7964e3d739d4eaf3122f51e3e0a0127e74cb13d5
3
+ metadata.gz: 1471f1e4e874c7a6d1146332f02e3a2b01ce2b47
4
+ data.tar.gz: 15c244b4ee8b8814058f17eecec80ff44b08337f
5
5
  SHA512:
6
- metadata.gz: 8de529d87a1c80f38e530d63a4f94fe9e3e7e354e4d41b73ce328f7a37ad01dd9e813a5fa1c29e98e2c2154dc0be72ff57257a74b1a35ae23fcd179080081153
7
- data.tar.gz: 839e4f49104f111afcf88f4dc2d24a964bc0186d4c2dcb6b92c5857875b682c51ea4693ec0723d55dd17c7249eeed93dbce6da67bf505b831d685e04e4565200
6
+ metadata.gz: 186d0842eb7d493a482f3c661f9248d155db72c58dd8797a160c13900ba01fe7ce893c645bccfe981e922602f023f0e1261114405ddf9e303d169978bccd539f
7
+ data.tar.gz: 5be67f512343718da2c35bbbc6c18c1e7f0e67fff96a3d3a2b25a7ef5d67706a4b1f9398883e1d28be87529f6a544f63dc3b0ee8d567411135c7663efda38ca6
@@ -1,6 +1,7 @@
1
1
  rvm:
2
2
  - 2.0.0
3
3
  - 2.1
4
+ - 2.2
4
5
  bundler_args: "--jobs 7 --without docs local"
5
6
  branches:
6
7
  only:
@@ -1,5 +1,27 @@
1
1
  Omnibus CHANGELOG
2
2
  =================
3
+
4
+ v5.0.0 (November 10, 2015)
5
+ --------------------------
6
+ ### New Features
7
+ - Wind River Linux 5 support for Cisco Nexus devices (#539)
8
+ - [artifactory publisher] Support custom properties in Artifactory publishing (#568)
9
+ - [msi packager] New "fast" mode for MSI packager (#565)
10
+ - Change the `appbundler` DSL method to not make an apps dir
11
+ - Unit and functional tests now run on Windows (and are tested by Appveyor) (#556, #557)
12
+
13
+ ### Bug Fixes
14
+ - [msi packager] Fix missing package name in signature (#541)
15
+ - [rpm packager] Fix building RPMs on ARM platforms (#542)
16
+ - [bff packager] Fix regression with AIX package ownership in staging directory (#553)
17
+ - [solaris packager] Use the proper architecture value in Solaris packages (#554, #555)
18
+ - Add info message for publish cli corner case (#551)
19
+ - [net fetcher] missing checksum raises exception (#549)
20
+
21
+
22
+ ### Potentially Breaking Changes
23
+ - Dropped Ruby 1.9.x support (#567)
24
+
3
25
  v4.1.0 (September 1, 2015)
4
26
  -------------------------
5
27
  ### New Features
@@ -18,9 +18,10 @@ project lead.
18
18
  ## Maintainers
19
19
 
20
20
  * [Daniel DeLeo](https://github.com/danielsdeleo)
21
- * [Jay Mundrawala](https://github.com/jdmundrawala)
21
+ * [Jay Mundrawala](https://github.com/jaym)
22
22
  * [Lamont Granquist](https://github.com/lamont-granquist)
23
23
  * [Scott Hain](https://github.com/scotthain)
24
24
  * [Seth Vargo](http://github.com/sethvargo)
25
25
  * [Steven Danna](https://github.com/stevendanna)
26
26
  * [Yvonne Lam](http://github.com/yzl)
27
+ * [Thom May](https://github.com/thommay)
data/README.md CHANGED
@@ -199,7 +199,7 @@ Additionally, there are a number of DSL methods avaiable inside the `build` bloc
199
199
 
200
200
  For more DSL methods, please consult the [`Builder` documentation](http://rubydoc.info/github/opscode/omnibus/Omnibus/Builder).
201
201
 
202
- You can support building multiple verisons of the same software in the same software definition file using the `version` method and giving a block:
202
+ You can support building multiple versions of the same software in the same software definition file using the `version` method and giving a block:
203
203
 
204
204
  ```ruby
205
205
  name "ruby"
@@ -276,27 +276,12 @@ module Omnibus
276
276
  def appbundle(app_name, options = {})
277
277
  build_commands << BuildCommand.new("appbundle `#{app_name}'") do
278
278
  bin_dir = "#{install_dir}/bin"
279
- embedded_apps_root = "#{install_dir}/embedded/apps"
280
- embedded_app_dir = "#{embedded_apps_root}/#{app_name}"
281
- gemfile_lock = "#{embedded_app_dir}/Gemfile.lock"
282
279
  appbundler_bin = windows_safe_path("#{install_dir}/embedded/bin/appbundler")
283
280
 
284
281
  # Ensure the main bin dir exists
285
282
  FileUtils.mkdir_p(bin_dir)
286
- # Ensure the embedded app directory exists
287
- FileUtils.mkdir_p(embedded_apps_root)
288
- # Copy the application code into place
289
- FileUtils.cp_r("#{Omnibus::Config.source_dir}/#{app_name}", embedded_apps_root)
290
- # Delete any top-level `.git` directory
291
- FileUtils.rm_rf("#{embedded_app_dir}/.git")
292
-
293
- # Prepare the environment
294
- options[:env] ||= {}
295
- env = with_embedded_path || {}
296
- env["BUNDLE_GEMFILE"] = gemfile_lock
297
- options[:env].merge!(env)
298
-
299
- shellout!("#{appbundler_bin} '#{embedded_app_dir}' '#{bin_dir}'", options)
283
+
284
+ shellout!("#{appbundler_bin} '#{Omnibus::Config.source_dir}/#{app_name}' '#{bin_dir}'", options)
300
285
  end
301
286
  end
302
287
  expose :appbundle
@@ -70,6 +70,10 @@ module Omnibus
70
70
  type: :boolean,
71
71
  desc: 'Optionally create an Artifactory build record for the published artifacts',
72
72
  default: true
73
+ method_option :properties,
74
+ type: :hash,
75
+ desc: 'Properites to attach to published artifacts',
76
+ default: {}
73
77
  desc 'artifactory REPOSITORY PATTERN', 'Publish to an Artifactory instance'
74
78
  def artifactory(repository, pattern)
75
79
  options[:repository] = repository
@@ -214,6 +214,18 @@ EOH
214
214
  end
215
215
  end
216
216
 
217
+ class ChecksumMissing < Error
218
+ def initialize(software)
219
+ super <<-EOH
220
+ Verification for #{software.name} failed due to a missing checksum.
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
226
+ end
227
+ end
228
+
217
229
  class ChecksumMismatch < Error
218
230
  def initialize(software, expected, actual)
219
231
  super <<-EOH
@@ -229,12 +229,16 @@ module Omnibus
229
229
  #
230
230
  # The digest type defined in the software definition
231
231
  #
232
+ # @raise [ChecksumMissing]
233
+ # if the checksum does not exist
234
+ #
232
235
  # @return [Symbol]
233
236
  #
234
237
  def digest_type
235
238
  DIGESTS.each do |digest|
236
239
  return digest if source.key? digest
237
240
  end
241
+ raise ChecksumMissing.new(self)
238
242
  end
239
243
 
240
244
  #
@@ -96,7 +96,7 @@ module Omnibus
96
96
  when 1
97
97
  from_hash_v1(manifest_data)
98
98
  else
99
- raise InvalidManifestFormat, "Unknown manifest fromat version: #{manifest_data['manifest_format']}"
99
+ raise InvalidManifestFormat, "Unknown manifest format version: #{manifest_data['manifest_format']}"
100
100
  end
101
101
  end
102
102
 
@@ -18,6 +18,9 @@ require 'json'
18
18
 
19
19
  module Omnibus
20
20
  class Metadata
21
+ extend Sugarable
22
+ include Sugarable
23
+
21
24
  class << self
22
25
  #
23
26
  # Render the metadata for the package at the given path, generated by the
@@ -108,8 +111,14 @@ module Omnibus
108
111
  # @return [String]
109
112
  #
110
113
  def arch
111
- if (Ohai['platform'] == 'windows') && (Config.windows_arch.to_sym == :x86)
114
+ if windows? && windows_arch_i386?
112
115
  'i386'
116
+ elsif solaris?
117
+ if intel?
118
+ 'i386'
119
+ elsif sparc?
120
+ 'sparc'
121
+ end
113
122
  else
114
123
  Ohai['kernel']['machine']
115
124
  end
@@ -132,9 +141,9 @@ module Omnibus
132
141
  # the platform family short name
133
142
  #
134
143
  def platform_shortname
135
- if Ohai['platform_family'] == 'rhel'
144
+ if rhel?
136
145
  'el'
137
- elsif Ohai['platform'] == 'suse'
146
+ elsif suse?
138
147
  'sles'
139
148
  else
140
149
  Ohai['platform']
@@ -157,7 +166,7 @@ module Omnibus
157
166
  #
158
167
  def truncate_platform_version(platform_version, platform)
159
168
  case platform
160
- when 'centos', 'debian', 'el', 'fedora', 'freebsd', 'omnios', 'pidora', 'raspbian', 'rhel', 'sles', 'suse', 'smartos'
169
+ when 'centos', 'debian', 'el', 'fedora', 'freebsd', 'omnios', 'pidora', 'raspbian', 'rhel', 'sles', 'suse', 'smartos', 'nexus', 'ios_xr'
161
170
  # Only want MAJOR (e.g. Debian 7, OmniOS r151006, SmartOS 20120809T221258Z)
162
171
  platform_version.split('.').first
163
172
  when 'aix', 'gentoo', 'mac_os_x', 'openbsd', 'slackware', 'solaris2', 'opensuse', 'ubuntu'
@@ -37,6 +37,7 @@ module Omnibus
37
37
  'debian' => DEB,
38
38
  'fedora' => RPM,
39
39
  'rhel' => RPM,
40
+ 'wrlinux' => RPM,
40
41
  'aix' => BFF,
41
42
  'solaris2' => Solaris,
42
43
  'windows' => MSI,
@@ -22,6 +22,7 @@ module Omnibus
22
22
  include Digestable
23
23
  include Logging
24
24
  include NullArgumentable
25
+ include Sugarable
25
26
  include Templating
26
27
  include Util
27
28
 
@@ -173,7 +173,7 @@ module Omnibus
173
173
  # This implies that if we are in /tmp/staging/project/dir/things,
174
174
  # we will chown from 'project' on, rather than 'project/dir', which leaves
175
175
  # project owned by the build user (which is incorrect)
176
- shellout!("sudo chown -R 0:0 #{File.join(staging_dir, project.install_dir)}")
176
+ shellout!("sudo chown -R 0:0 #{File.join(staging_dir, project.install_dir.match(/^\/?(\w+)/).to_s)}")
177
177
  log.info(log_key) { "Creating .bff file" }
178
178
 
179
179
  # Since we want the owner to be root, we need to sudo the mkinstallp
@@ -408,6 +408,10 @@ module Omnibus
408
408
  else
409
409
  Ohai['kernel']['machine']
410
410
  end
411
+ when 'aarch64'
412
+ # Debian prefers amd64 on ARMv8/AArch64 (64bit ARM) platforms
413
+ # see https://wiki.debian.org/Arm64Port
414
+ 'arm64'
411
415
  when 'ppc64le'
412
416
  # Debian prefers to use ppc64el for little endian architecture name
413
417
  # where as others like gnutools/rhel use ppc64le( note the last 2 chars)
@@ -14,6 +14,8 @@
14
14
  # limitations under the License.
15
15
  #
16
16
 
17
+ require 'pathname'
18
+
17
19
  module Omnibus
18
20
  class Packager::MSI < Packager::Base
19
21
  DEFAULT_TIMESTAMP_SERVERS = ['http://timestamp.digicert.com',
@@ -45,48 +47,29 @@ module Omnibus
45
47
  FileSyncer.glob("#{resources_path}/assets/*").each do |file|
46
48
  copy_file(file, "#{resources_dir}/assets/#{File.basename(file)}")
47
49
  end
50
+
51
+ # Source for the custom action is at https://github.com/chef/fastmsi-custom-action
52
+ # The dll will be built separately as part of the custom action build process
53
+ # and made available as a binary for the Omnibus projects to use.
54
+ copy_file(resource_path('CustomActionFastMsi.CA.dll'), staging_dir) if fast_msi
48
55
  end
49
56
 
50
57
  build do
58
+ # If fastmsi, zip up the contents of the install directory
59
+ shellout!(zip_command) if fast_msi
60
+
51
61
  # Harvest the files with heat.exe, recursively generate fragment for
52
62
  # project directory
53
63
  Dir.chdir(staging_dir) do
54
- shellout! <<-EOH.split.join(' ').squeeze(' ').strip
55
- heat.exe dir "#{windows_safe_path(project.install_dir)}"
56
- -nologo -srd -gg -cg ProjectDir
57
- -dr PROJECTLOCATION
58
- -var "var.ProjectSourceDir"
59
- -out "project-files.wxs"
60
- EOH
64
+ shellout!(heat_command)
61
65
 
62
66
  # Compile with candle.exe
63
- log.debug(log_key) { "wix_candle_flags: #{wix_candle_flags}" }
64
-
65
- shellout! <<-EOH.split.join(' ').squeeze(' ').strip
66
- candle.exe
67
- -nologo
68
- #{wix_candle_flags}
69
- #{wix_extension_switches(wix_candle_extensions)}
70
- -dProjectSourceDir="#{windows_safe_path(project.install_dir)}" "project-files.wxs"
71
- "#{windows_safe_path(staging_dir, 'source.wxs')}"
72
- EOH
67
+ shellout!(candle_command)
73
68
 
74
69
  # Create the msi, ignoring the 204 return code from light.exe since it is
75
70
  # about some expected warnings
76
-
77
71
  msi_file = windows_safe_path(Config.package_dir, msi_name)
78
-
79
- light_command = <<-EOH.split.join(' ').squeeze(' ').strip
80
- light.exe
81
- -nologo
82
- -ext WixUIExtension
83
- #{wix_extension_switches(wix_light_extensions)}
84
- -cultures:en-us
85
- -loc "#{windows_safe_path(staging_dir, 'localization-en-us.wxl')}"
86
- project-files.wixobj source.wixobj
87
- -out "#{msi_file}"
88
- EOH
89
- shellout!(light_command, returns: [0, 204])
72
+ shellout!(light_command(msi_file), returns: [0, 204])
90
73
 
91
74
  if signing_identity
92
75
  sign_package(msi_file)
@@ -94,32 +77,11 @@ module Omnibus
94
77
 
95
78
  # This assumes, rightly or wrongly, that any installers we want to bundle
96
79
  # into our installer will be downloaded by omnibus and put in the cache dir
97
-
98
80
  if bundle_msi
99
- shellout! <<-EOH.split.join(' ').squeeze(' ').strip
100
- candle.exe
101
- -nologo
102
- #{wix_candle_flags}
103
- -ext WixBalExtension
104
- #{wix_extension_switches(wix_candle_extensions)}
105
- -dOmnibusCacheDir="#{windows_safe_path(File.expand_path(Config.cache_dir))}"
106
- "#{windows_safe_path(staging_dir, 'bundle.wxs')}"
107
- EOH
81
+ shellout!(candle_command(is_bundle: true))
108
82
 
109
83
  bundle_file = windows_safe_path(Config.package_dir, bundle_name)
110
-
111
- bundle_light_command = <<-EOH.split.join(' ').squeeze(' ').strip
112
- light.exe
113
- -nologo
114
- -ext WixUIExtension
115
- -ext WixBalExtension
116
- #{wix_extension_switches(wix_light_extensions)}
117
- -cultures:en-us
118
- -loc "#{windows_safe_path(staging_dir, 'localization-en-us.wxl')}"
119
- bundle.wixobj
120
- -out "#{bundle_file}"
121
- EOH
122
- shellout!(bundle_light_command, returns: [0, 204])
84
+ shellout!(light_command(bundle_file, is_bundle: true), returns: [0, 204])
123
85
 
124
86
  if signing_identity
125
87
  sign_package(bundle_file)
@@ -149,7 +111,7 @@ module Omnibus
149
111
  @upgrade_code || raise(MissingRequiredAttribute.new(self, :upgrade_code, '2CD7259C-776D-4DDB-A4C8-6E544E580AA1'))
150
112
  else
151
113
  unless val.is_a?(String)
152
- raise InvalidValue.new(:parameters, 'be a String')
114
+ raise InvalidValue.new(:upgrade_code, 'be a String')
153
115
  end
154
116
 
155
117
  @upgrade_code = val
@@ -245,6 +207,25 @@ module Omnibus
245
207
  end
246
208
  expose :bundle_msi
247
209
 
210
+ #
211
+ # Signal that we're building a zip-based MSI
212
+ #
213
+ # @example
214
+ # fast_msi true
215
+ #
216
+ # @param [TrueClass, FalseClass] value
217
+ # whether we're building a zip-based MSI or not
218
+ #
219
+ # @return [TrueClass, FalseClass]
220
+ # whether we're building a zip-based MSI or not
221
+ def fast_msi(val = false)
222
+ unless (val.is_a?(TrueClass) || val.is_a?(FalseClass))
223
+ raise InvalidValue.new(:fast_msi, 'be TrueClass or FalseClass')
224
+ end
225
+ @fast_msi ||= val
226
+ end
227
+ expose :fast_msi
228
+
248
229
  #
249
230
  # Set the signing certificate name
250
231
  #
@@ -311,6 +292,37 @@ module Omnibus
311
292
  end
312
293
  expose :signing_identity
313
294
 
295
+ #
296
+ # Discovers a path to a gem/file included in a gem under the install directory.
297
+ #
298
+ # @example
299
+ # gem_path 'chef-[0-9]*-mingw32' -> 'some/path/to/gems/chef-version-mingw32'
300
+ #
301
+ # @param [String] glob
302
+ # a ruby acceptable glob path such as with **, *, [] etc.
303
+ #
304
+ # @return [String] path relative to the project's install_dir
305
+ #
306
+ # Raises exception the glob matches 0 or more than 1 file/directory.
307
+ #
308
+ def gem_path(glob = NULL)
309
+ unless glob.is_a?(String) || null?(glob)
310
+ raise InvalidValue.new(:glob, 'be an String')
311
+ end
312
+
313
+ install_path = Pathname.new(project.install_dir)
314
+
315
+ # Find path in which the Chef gem is installed
316
+ search_pattern = install_path.join('**', 'gems')
317
+ search_pattern = search_pattern.join(glob) unless null?(glob)
318
+ file_paths = Pathname.glob(search_pattern).find
319
+
320
+ raise "Could not find `#{search_pattern}'!" if file_paths.none?
321
+ raise "Multiple possible matches of `#{search_pattern}'! : #{file_paths}" if file_paths.count > 1
322
+ file_paths.first.relative_path_from(install_path).to_s
323
+ end
324
+ expose :gem_path
325
+
314
326
  #
315
327
  # @!endgroup
316
328
  # --------------------------------------------------
@@ -415,7 +427,7 @@ module Omnibus
415
427
  friendly_name: project.friendly_name,
416
428
  maintainer: project.maintainer,
417
429
  hierarchy: hierarchy,
418
-
430
+ fastmsi: fast_msi,
419
431
  wix_install_dir: wix_install_dir,
420
432
  }
421
433
  )
@@ -462,6 +474,106 @@ module Omnibus
462
474
  "#{versions[0]}.#{versions[1]}.#{versions[2]}.#{project.build_iteration}"
463
475
  end
464
476
 
477
+ #
478
+ # Get the shell command to create a zip file that contains
479
+ # the contents of the project install directory
480
+ #
481
+ # @return [String]
482
+ #
483
+ def zip_command
484
+ <<-EOH.split.join(' ').squeeze(' ').strip
485
+ 7z a -r
486
+ #{windows_safe_path(staging_dir)}\\#{project.name}.zip
487
+ #{windows_safe_path(project.install_dir)}\\*
488
+ EOH
489
+ end
490
+
491
+ #
492
+ # Get the shell command to run heat in order to create a
493
+ # a WIX manifest of project files to be packaged into the MSI
494
+ #
495
+ # @return [String]
496
+ #
497
+ def heat_command
498
+ if fast_msi
499
+ <<-EOH.split.join(' ').squeeze(' ').strip
500
+ heat.exe file "#{project.name}.zip"
501
+ -cg ProjectDir
502
+ -dr INSTALLLOCATION
503
+ -nologo -sfrag -srd -sreg -gg
504
+ -out "project-files.wxs"
505
+ EOH
506
+ else
507
+ <<-EOH.split.join(' ').squeeze(' ').strip
508
+ heat.exe dir "#{windows_safe_path(project.install_dir)}"
509
+ -nologo -srd -sreg -gg -cg ProjectDir
510
+ -dr PROJECTLOCATION
511
+ -var "var.ProjectSourceDir"
512
+ -out "project-files.wxs"
513
+ EOH
514
+ end
515
+ end
516
+
517
+ #
518
+ # Get the shell command to complie the project WIX files
519
+ #
520
+ # @return [String]
521
+ #
522
+ def candle_command(is_bundle: false)
523
+ if is_bundle
524
+ <<-EOH.split.join(' ').squeeze(' ').strip
525
+ candle.exe
526
+ -nologo
527
+ #{wix_candle_flags}
528
+ -ext WixBalExtension
529
+ #{wix_extension_switches(wix_candle_extensions)}
530
+ -dOmnibusCacheDir="#{windows_safe_path(File.expand_path(Config.cache_dir))}"
531
+ "#{windows_safe_path(staging_dir, 'bundle.wxs')}"
532
+ EOH
533
+ else
534
+ <<-EOH.split.join(' ').squeeze(' ').strip
535
+ candle.exe
536
+ -nologo
537
+ #{wix_candle_flags}
538
+ #{wix_extension_switches(wix_candle_extensions)}
539
+ -dProjectSourceDir="#{windows_safe_path(project.install_dir)}" "project-files.wxs"
540
+ "#{windows_safe_path(staging_dir, 'source.wxs')}"
541
+ EOH
542
+ end
543
+ end
544
+
545
+ #
546
+ # Get the shell command to link the project WIX object files
547
+ #
548
+ # @return [String]
549
+ #
550
+ def light_command(out_file, is_bundle: false)
551
+ if is_bundle
552
+ <<-EOH.split.join(' ').squeeze(' ').strip
553
+ light.exe
554
+ -nologo
555
+ -ext WixUIExtension
556
+ -ext WixBalExtension
557
+ #{wix_extension_switches(wix_light_extensions)}
558
+ -cultures:en-us
559
+ -loc "#{windows_safe_path(staging_dir, 'localization-en-us.wxl')}"
560
+ bundle.wixobj
561
+ -out "#{out_file}"
562
+ EOH
563
+ else
564
+ <<-EOH.split.join(' ').squeeze(' ').strip
565
+ light.exe
566
+ -nologo
567
+ -ext WixUIExtension
568
+ #{wix_extension_switches(wix_light_extensions)}
569
+ -cultures:en-us
570
+ -loc "#{windows_safe_path(staging_dir, 'localization-en-us.wxl')}"
571
+ project-files.wixobj source.wixobj
572
+ -out "#{out_file}"
573
+ EOH
574
+ end
575
+ end
576
+
465
577
  #
466
578
  # The display version calculated from the {Project#build_version}.
467
579
  #
@@ -545,6 +657,7 @@ module Omnibus
545
657
  arr << '/sm' if machine_store?
546
658
  arr << "/s #{cert_store_name}"
547
659
  arr << "/sha1 #{thumbprint}"
660
+ arr << "/d #{project.package_name}"
548
661
  arr << "\"#{msi_file}\""
549
662
  end
550
663
  shellout!(cmd.join(" "))