omnibus 6.1.7 → 6.1.9
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/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/changelog.rb +24 -24
- data/lib/omnibus/compressors/dmg.rb +3 -4
- data/lib/omnibus/fetchers/git_fetcher.rb +1 -0
- data/lib/omnibus/fetchers/net_fetcher.rb +2 -3
- data/lib/omnibus/health_check.rb +1 -1
- data/lib/omnibus/licensing.rb +2 -3
- data/lib/omnibus/logger.rb +2 -1
- data/lib/omnibus/manifest.rb +1 -1
- 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 +3 -6
- 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 +2 -2
- data/lib/omnibus/software.rb +18 -11
- data/lib/omnibus/templating.rb +1 -1
- data/lib/omnibus/util.rb +3 -2
- data/lib/omnibus/version.rb +1 -1
- data/omnibus.gemspec +2 -2
- 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/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/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 +8 -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/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 +1 -2
- 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 +2 -6
- data/spec/unit/s3_helpers_spec.rb +2 -2
- data/spec/unit/software_spec.rb +9 -9
- data/spec/unit/util_spec.rb +1 -2
- 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: 13c799a70980298bd1b9a949570129950948678e848013b5cc45e9c16163eed4
|
4
|
+
data.tar.gz: f674f27153dd215d6718e988b6d4bc7b8c30e3b3b00e3b89aaffbab1c14a7bdd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bd5732c6df36ef63dff1bf783117fe40eb49934209e41fe4f5b9f03e64998a3f69e30d86183b4b70d9f9780682a8641bb1bde8c229213be53b69f30d6267259
|
7
|
+
data.tar.gz: 74bbdef1a133d657e75853a0a44ee3eea4dc461bc8fda2a52c5623656e0a289f1c40ba9906da8179686e3998354a088d5e2410dfe6b2519c41f45823613317c6
|
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
|
|
@@ -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
|
@@ -234,8 +234,7 @@ module Omnibus
|
|
234
234
|
pkg_name: packager.package_name,
|
235
235
|
window_bounds: window_bounds,
|
236
236
|
pkg_position: pkg_position,
|
237
|
-
}
|
238
|
-
)
|
237
|
+
})
|
239
238
|
|
240
239
|
Dir.chdir(staging_dir) do
|
241
240
|
shellout! <<-EOH.gsub(/^ {10}/, "")
|
@@ -316,10 +315,10 @@ module Omnibus
|
|
316
315
|
Dir.chdir(staging_dir) do
|
317
316
|
shellout! <<-EOH.gsub(/^ {10}/, "")
|
318
317
|
# Convert the png to an icon
|
319
|
-
sips -i "#{resource_path(
|
318
|
+
sips -i "#{resource_path("icon.png")}"
|
320
319
|
|
321
320
|
# Extract the icon into its own resource
|
322
|
-
DeRez -only icns "#{resource_path(
|
321
|
+
DeRez -only icns "#{resource_path("icon.png")}" > tmp.rsrc
|
323
322
|
|
324
323
|
# Append the icon reosurce to the DMG
|
325
324
|
Rez -append tmp.rsrc -o "#{package_path}"
|
@@ -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/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"
|
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
@@ -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
|