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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8e292781fd46583f4195ce255dbec39378b8d992b3e631d252c5b910c0ddb39
|
4
|
+
data.tar.gz: aea8d5eadd707ea46c044b6daba1ccbfe0e8e773a11a6fe370f5a26889e37aab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7216812fbdc500947bbdc3f9c8143304937e6abbcc063b4afb404b2f1971018239fe3125327fbcd6622ca082736fe729f28f2fafbaf62d4d4e706f62259fcd91
|
7
|
+
data.tar.gz: f93962e1f2d9c90e67c4c549937573fb9812c19fddc5f2ad09219214892e2f0b3818d2d206d6eb5138962b2697679ff785a831a41f551f967084de9f1c9e7b81
|
data/Gemfile
CHANGED
@@ -11,9 +11,10 @@ end
|
|
11
11
|
group :debug do
|
12
12
|
gem "pry"
|
13
13
|
gem "pry-byebug"
|
14
|
-
gem "pry-stack_explorer"
|
14
|
+
gem "pry-stack_explorer", "~> 0.4.0" # 0.4 allows us to still test Ruby 2.5
|
15
15
|
end
|
16
16
|
|
17
17
|
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.5")
|
18
18
|
gem "ohai", "<15"
|
19
|
+
gem "activesupport", "~> 5.0"
|
19
20
|
end
|
data/README.md
CHANGED
@@ -4,6 +4,14 @@
|
|
4
4
|
[](https://buildkite.com/chef-oss/chef-omnibus-master-verify)
|
5
5
|
[][appveyor]
|
6
6
|
|
7
|
+
**Umbrella Project**: [Chef Foundation](https://github.com/chef/chef-oss-practices/blob/master/projects/chef-foundation.md)
|
8
|
+
|
9
|
+
**Project State**: [Active](https://github.com/chef/chef-oss-practices/blob/master/repo-management/repo-states.md#active)
|
10
|
+
|
11
|
+
**Issues [Response Time Maximum](https://github.com/chef/chef-oss-practices/blob/master/repo-management/repo-states.md)**: 14 days
|
12
|
+
|
13
|
+
**Pull Request [Response Time Maximum](https://github.com/chef/chef-oss-practices/blob/master/repo-management/repo-states.md)**: 14 days
|
14
|
+
|
7
15
|
Easily create full-stack installers for your project across a variety of platforms.
|
8
16
|
|
9
17
|
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**:
|
@@ -76,11 +84,19 @@ use_git_caching false
|
|
76
84
|
# Enable S3 asset caching
|
77
85
|
# ------------------------------
|
78
86
|
use_s3_caching true
|
87
|
+
s3_bucket ENV['S3_BUCKET']
|
88
|
+
|
89
|
+
# There are three ways to authenticate to the S3 bucket
|
90
|
+
|
91
|
+
# 1. set `s3_access_key` and `s3_secret_key`
|
79
92
|
s3_access_key ENV['S3_ACCESS_KEY']
|
80
93
|
s3_secret_key ENV['S3_SECRET_KEY']
|
81
|
-
|
94
|
+
|
95
|
+
# 2. set `s3_profile` to use an AWS profile in the Shared Credentials files
|
82
96
|
#s3_profile ENV['S3_PROFILE']
|
83
|
-
|
97
|
+
|
98
|
+
# 3. set `s3_iam_role_arn` to use an AWS IAM role
|
99
|
+
#s3_iam_role_arn ENV['S3_IAM_ROLE_ARN']
|
84
100
|
```
|
85
101
|
|
86
102
|
For more information, please see the [`Config` documentation](http://www.rubydoc.info/github/chef/omnibus/Omnibus/Config).
|
@@ -245,7 +261,7 @@ For all of these paths, **order matters**, so it is possible to depend on local
|
|
245
261
|
$PWD/config/software/foo.rb
|
246
262
|
/path/to/software/config/software/foo.rb
|
247
263
|
/other/path/to/software/config/software/foo.rb
|
248
|
-
/Users/sethvargo/.gems/.../my-
|
264
|
+
/Users/sethvargo/.gems/.../my-company-omnibus-software/config/software/foo.rb
|
249
265
|
/Users/sethvargo/.gems/.../omnibus-software/config/software/foo.rb
|
250
266
|
```
|
251
267
|
|
@@ -265,7 +281,7 @@ This will output a JSON-formatted manifest containing the resolved version of ev
|
|
265
281
|
|
266
282
|
Sometimes a platform has libraries that need to be whitelisted so the healthcheck can pass. The whitelist found in the [healthcheck](https://github.com/chef/omnibus/blob/master/lib/omnibus/health_check.rb) code comprises the minimal required for successful builds on supported platforms.
|
267
283
|
|
268
|
-
To add your own whitelisted library, simply add
|
284
|
+
To add your own whitelisted library, simply add a regex to your software definition in your omnibus project as follows:
|
269
285
|
|
270
286
|
```
|
271
287
|
whitelist_file /libpcrecpp\.so\..+/
|
@@ -281,11 +297,11 @@ STATUS: _EXPERIMENTAL_
|
|
281
297
|
|
282
298
|
`omnibus changelog generate` will generate a changelog for an omnibus project. This command currently assumes:
|
283
299
|
|
284
|
-
- version-manifest.json is checked into the project root
|
285
|
-
-
|
286
|
-
-
|
300
|
+
- A version-manifest.json file is checked into the project root
|
301
|
+
- The project is a git repository
|
302
|
+
- Each version is tagged with a SemVer compliant annotated tag
|
287
303
|
- Any git-based sources are checked out at ../COMPONENT_NAME
|
288
|
-
- Any commit message line prepended with ChangeLog-Entry: should be added to the changelog
|
304
|
+
- Any commit message line prepended with ChangeLog-Entry: should be added to the changelog
|
289
305
|
|
290
306
|
These assumptions _will_ change as we determine what works best for a number of our projects.
|
291
307
|
|
data/Rakefile
CHANGED
data/lib/omnibus/builder.rb
CHANGED
@@ -235,7 +235,8 @@ module Omnibus
|
|
235
235
|
clean_patch_path = patch_path
|
236
236
|
if windows?
|
237
237
|
clean_patch_path = Pathname.new(patch_path).relative_path_from(
|
238
|
-
Pathname.new(software.project_dir)
|
238
|
+
Pathname.new(software.project_dir)
|
239
|
+
).to_s
|
239
240
|
end
|
240
241
|
|
241
242
|
if target
|
@@ -385,6 +386,7 @@ module Omnibus
|
|
385
386
|
if app_software.nil?
|
386
387
|
raise "could not find software definition for #{software_name}, add a dependency to it, or pass a lockdir argument to appbundle command."
|
387
388
|
end
|
389
|
+
|
388
390
|
app_software.project_dir
|
389
391
|
end
|
390
392
|
|
@@ -500,8 +502,7 @@ module Omnibus
|
|
500
502
|
render_template(source_path,
|
501
503
|
destination: dest,
|
502
504
|
mode: mode,
|
503
|
-
variables: vars
|
504
|
-
)
|
505
|
+
variables: vars)
|
505
506
|
end
|
506
507
|
end
|
507
508
|
expose :erb
|
@@ -596,7 +597,7 @@ module Omnibus
|
|
596
597
|
#
|
597
598
|
def strip(path)
|
598
599
|
regexp_ends = ".*(" + IGNORED_ENDINGS.map { |e| e.gsub(/\./, '\.') }.join("|") + ")$"
|
599
|
-
regexp_patterns = IGNORED_PATTERNS.map { |e| ".*" + e.gsub(
|
600
|
+
regexp_patterns = IGNORED_PATTERNS.map { |e| ".*" + e.gsub(%r{/}, '\/') + ".*" }.join("|")
|
600
601
|
regexp = regexp_ends + "|" + regexp_patterns
|
601
602
|
|
602
603
|
# Do not actually care if strip runs on non-strippable file, as its a no-op. Hence the `|| true` appended.
|
@@ -727,7 +728,7 @@ module Omnibus
|
|
727
728
|
# config.guess.to. Default: "."
|
728
729
|
# install [Array<Symbol>] parts of config.guess to copy.
|
729
730
|
# Default: [:config_guess, :config_sub]
|
730
|
-
def update_config_guess(target: ".", install:
|
731
|
+
def update_config_guess(target: ".", install: %i{config_guess config_sub})
|
731
732
|
build_commands << BuildCommand.new("update_config_guess `target: #{target} install: #{install.inspect}'") do
|
732
733
|
config_guess_dir = "#{install_dir}/embedded/lib/config_guess"
|
733
734
|
%w{config.guess config.sub}.each do |c|
|
@@ -8,9 +8,9 @@ module Omnibus
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def print(new_version)
|
11
|
-
puts "## #{new_version} (#{Time.now.strftime(
|
11
|
+
puts "## #{new_version} (#{Time.now.strftime("%Y-%m-%d")})"
|
12
12
|
print_changelog
|
13
|
-
|
13
|
+
unless diff.empty?
|
14
14
|
print_components
|
15
15
|
puts ""
|
16
16
|
end
|
@@ -23,7 +23,7 @@ module Omnibus
|
|
23
23
|
|
24
24
|
def print_changelog(cl = changelog, indent = 0)
|
25
25
|
cl.changelog_entries.each do |entry|
|
26
|
-
puts "#{
|
26
|
+
puts "#{" " * indent}* #{entry.sub("\n", "\n #{" " * indent}")}\n"
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
@@ -36,6 +36,7 @@ module Omnibus
|
|
36
36
|
|
37
37
|
def print_new_components
|
38
38
|
return if diff.added.empty?
|
39
|
+
|
39
40
|
puts "New Components"
|
40
41
|
diff.added.each do |entry|
|
41
42
|
puts "* #{entry[:name]} (#{entry[:new_version]})"
|
@@ -45,10 +46,11 @@ module Omnibus
|
|
45
46
|
|
46
47
|
def print_updated_components
|
47
48
|
return if diff.updated.empty?
|
49
|
+
|
48
50
|
puts "Updated Components"
|
49
51
|
diff.updated.each do |entry|
|
50
52
|
puts sprintf("* %s (%.8s -> %.8s)",
|
51
|
-
|
53
|
+
entry[:name], entry[:old_version], entry[:new_version])
|
52
54
|
repo_path = ::File.join(source_path, entry[:name].to_s)
|
53
55
|
if entry[:source_type] == :git && ::File.directory?("#{repo_path}/.git")
|
54
56
|
cl = ChangeLog.new(entry[:old_version], entry[:new_version], GitRepository.new("#{repo_path}"))
|
@@ -60,6 +62,7 @@ module Omnibus
|
|
60
62
|
|
61
63
|
def print_removed_components
|
62
64
|
return if diff.removed.empty?
|
65
|
+
|
63
66
|
puts "Removed Components"
|
64
67
|
diff.removed.each do |entry|
|
65
68
|
puts "* #{entry[:name]} (#{entry[:old_version]})"
|
data/lib/omnibus/cleaner.rb
CHANGED
@@ -48,16 +48,19 @@ module Omnibus
|
|
48
48
|
|
49
49
|
def clean_package_dir
|
50
50
|
return unless purge?
|
51
|
+
|
51
52
|
FileSyncer.glob("#{Config.package_dir}/**/*").each(&method(:remove_file))
|
52
53
|
end
|
53
54
|
|
54
55
|
def clean_cache_dir
|
55
56
|
return unless purge?
|
57
|
+
|
56
58
|
FileSyncer.glob("#{Config.cache_dir}/**/*").each(&method(:remove_file))
|
57
59
|
end
|
58
60
|
|
59
61
|
def clean_install_dir
|
60
62
|
return unless purge?
|
63
|
+
|
61
64
|
remove_file(@project.install_dir)
|
62
65
|
end
|
63
66
|
|
data/lib/omnibus/cli.rb
CHANGED
@@ -91,7 +91,7 @@ module Omnibus
|
|
91
91
|
if @options[:output_manifest]
|
92
92
|
FileUtils.mkdir_p("pkg")
|
93
93
|
File.open(::File.join("pkg", "version-manifest.json"), "w") do |f|
|
94
|
-
f.write(FFI_Yajl::Encoder.encode(project.built_manifest.to_hash))
|
94
|
+
f.write(FFI_Yajl::Encoder.encode(project.built_manifest.to_hash, pretty: true))
|
95
95
|
end
|
96
96
|
end
|
97
97
|
end
|
@@ -30,42 +30,42 @@ module Omnibus
|
|
30
30
|
# $ omnibus changelog generate
|
31
31
|
#
|
32
32
|
method_option :source_path,
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
desc: "Path to local checkout of git dependencies",
|
34
|
+
type: :string,
|
35
|
+
default: "../"
|
36
36
|
|
37
37
|
method_option :starting_manifest,
|
38
|
-
|
39
|
-
|
38
|
+
desc: "Path to version-manifest from the last version (we attempt to pull it from the git history if not given)",
|
39
|
+
type: :string
|
40
40
|
|
41
41
|
method_option :ending_manifest,
|
42
|
-
|
43
|
-
|
44
|
-
|
42
|
+
desc: "Path to the version-manifest from the current version",
|
43
|
+
type: :string,
|
44
|
+
default: "version-manifest.json"
|
45
45
|
|
46
46
|
method_option :skip_components,
|
47
|
-
|
48
|
-
|
49
|
-
|
47
|
+
desc: "Don't include component changes in the changelog",
|
48
|
+
type: :boolean,
|
49
|
+
default: false
|
50
50
|
|
51
51
|
method_option :major,
|
52
|
-
|
53
|
-
|
54
|
-
|
52
|
+
desc: "Bump the major version",
|
53
|
+
type: :boolean,
|
54
|
+
default: false
|
55
55
|
|
56
56
|
method_option :minor,
|
57
|
-
|
58
|
-
|
59
|
-
|
57
|
+
desc: "Bump the minor version",
|
58
|
+
type: :boolean,
|
59
|
+
default: true
|
60
60
|
|
61
61
|
method_option :patch,
|
62
|
-
|
63
|
-
|
64
|
-
|
62
|
+
desc: "Bump the patch version",
|
63
|
+
type: :boolean,
|
64
|
+
default: false
|
65
65
|
|
66
66
|
method_option :version,
|
67
|
-
|
68
|
-
|
67
|
+
desc: "Explicit version for this changelog",
|
68
|
+
type: :string
|
69
69
|
|
70
70
|
desc "generate [START] [END]", "Generate a changelog for a new release"
|
71
71
|
def generate(start_ref = nil, end_ref = nil)
|
@@ -78,8 +78,8 @@ module Omnibus
|
|
78
78
|
end
|
79
79
|
|
80
80
|
Omnibus::ChangeLogPrinter.new(ChangeLog.new(starting_revision, ending_revision),
|
81
|
-
|
82
|
-
|
81
|
+
diff,
|
82
|
+
@options[:source_path]).print(new_version)
|
83
83
|
end
|
84
84
|
|
85
85
|
private
|
data/lib/omnibus/cli/publish.rb
CHANGED
@@ -26,10 +26,10 @@ module Omnibus
|
|
26
26
|
#
|
27
27
|
# @example JSON
|
28
28
|
# {
|
29
|
-
# "ubuntu-10.04": [
|
30
|
-
# "ubuntu-10.04",
|
31
|
-
# "ubuntu-12.04",
|
32
|
-
# "ubuntu-14.04"
|
29
|
+
# "ubuntu-10.04-x86_64": [
|
30
|
+
# "ubuntu-10.04-x86_64",
|
31
|
+
# "ubuntu-12.04-x86_64",
|
32
|
+
# "ubuntu-14.04-x86_64"
|
33
33
|
# ]
|
34
34
|
# }
|
35
35
|
#
|
@@ -99,7 +99,7 @@ module Omnibus
|
|
99
99
|
end
|
100
100
|
|
101
101
|
klass.publish(pattern, options) do |package|
|
102
|
-
say("Published '#{package.name}' for #{package.metadata[:platform]}-#{package.metadata[:platform_version]}", :green)
|
102
|
+
say("Published '#{package.name}' for #{package.metadata[:platform]}-#{package.metadata[:platform_version]}-#{package.metadata[:arch]}", :green)
|
103
103
|
end
|
104
104
|
end
|
105
105
|
end
|
data/lib/omnibus/compressor.rb
CHANGED
@@ -43,6 +43,8 @@ module Omnibus
|
|
43
43
|
prettify_dmg
|
44
44
|
compress_dmg
|
45
45
|
set_dmg_icon
|
46
|
+
verify_dmg
|
47
|
+
remove_writable_dmg
|
46
48
|
end
|
47
49
|
|
48
50
|
#
|
@@ -143,7 +145,8 @@ module Omnibus
|
|
143
145
|
-fs HFS+ \\
|
144
146
|
-fsargs "-c c=64,a=16,e=16" \\
|
145
147
|
-size 512000k \\
|
146
|
-
"#{writable_dmg}"
|
148
|
+
"#{writable_dmg}" \\
|
149
|
+
-puppetstrings
|
147
150
|
EOH
|
148
151
|
end
|
149
152
|
|
@@ -159,6 +162,7 @@ module Omnibus
|
|
159
162
|
|
160
163
|
cmd = shellout! <<-EOH.gsub(/^ {10}/, "")
|
161
164
|
hdiutil attach \\
|
165
|
+
-puppetstrings \\
|
162
166
|
-readwrite \\
|
163
167
|
-noverify \\
|
164
168
|
-noautoopen \\
|
@@ -230,8 +234,7 @@ module Omnibus
|
|
230
234
|
pkg_name: packager.package_name,
|
231
235
|
window_bounds: window_bounds,
|
232
236
|
pkg_position: pkg_position,
|
233
|
-
}
|
234
|
-
)
|
237
|
+
})
|
235
238
|
|
236
239
|
Dir.chdir(staging_dir) do
|
237
240
|
shellout! <<-EOH.gsub(/^ {10}/, "")
|
@@ -254,13 +257,48 @@ module Omnibus
|
|
254
257
|
shellout! <<-EOH.gsub(/^ {10}/, "")
|
255
258
|
chmod -Rf go-w "/Volumes/#{volume_name}"
|
256
259
|
sync
|
257
|
-
hdiutil
|
260
|
+
hdiutil unmount "#{@device}"
|
261
|
+
# Give some time to the system so unmount dmg
|
262
|
+
sleep 5
|
263
|
+
hdiutil detach "#{@device}" && \
|
258
264
|
hdiutil convert \\
|
259
265
|
"#{writable_dmg}" \\
|
260
266
|
-format UDZO \\
|
261
267
|
-imagekey \\
|
262
268
|
zlib-level=9 \\
|
263
|
-
-o "#{package_path}"
|
269
|
+
-o "#{package_path}" \\
|
270
|
+
-puppetstrings
|
271
|
+
EOH
|
272
|
+
end
|
273
|
+
end
|
274
|
+
|
275
|
+
#
|
276
|
+
# Verify checksum on created dmg.
|
277
|
+
#
|
278
|
+
# @return [void]
|
279
|
+
#
|
280
|
+
def verify_dmg
|
281
|
+
log.info(log_key) { "Verifying dmg" }
|
282
|
+
|
283
|
+
Dir.chdir(staging_dir) do
|
284
|
+
shellout! <<-EOH.gsub(/^ {10}/, "")
|
285
|
+
hdiutil verify \\
|
286
|
+
"#{package_path}" \\
|
287
|
+
-puppetstrings
|
288
|
+
EOH
|
289
|
+
end
|
290
|
+
end
|
291
|
+
|
292
|
+
#
|
293
|
+
# Remove writable dmg.
|
294
|
+
#
|
295
|
+
# @return [void]
|
296
|
+
#
|
297
|
+
def remove_writable_dmg
|
298
|
+
log.info(log_key) { "Removing writable dmg" }
|
299
|
+
|
300
|
+
Dir.chdir(staging_dir) do
|
301
|
+
shellout! <<-EOH.gsub(/^ {10}/, "")
|
264
302
|
rm -rf "#{writable_dmg}"
|
265
303
|
EOH
|
266
304
|
end
|
@@ -277,10 +315,10 @@ module Omnibus
|
|
277
315
|
Dir.chdir(staging_dir) do
|
278
316
|
shellout! <<-EOH.gsub(/^ {10}/, "")
|
279
317
|
# Convert the png to an icon
|
280
|
-
sips -i "#{resource_path(
|
318
|
+
sips -i "#{resource_path("icon.png")}"
|
281
319
|
|
282
320
|
# Extract the icon into its own resource
|
283
|
-
DeRez -only icns "#{resource_path(
|
321
|
+
DeRez -only icns "#{resource_path("icon.png")}" > tmp.rsrc
|
284
322
|
|
285
323
|
# Append the icon reosurce to the DMG
|
286
324
|
Rez -append tmp.rsrc -o "#{package_path}"
|