omnibus 4.0.0 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +8 -0
- data/.travis.yml +3 -11
- data/CHANGELOG.md +50 -0
- data/MAINTAINERS.md +26 -0
- data/README.md +61 -4
- data/appveyor.yml +35 -0
- data/docs/Build Cache.md +28 -3
- data/docs/Building on RHEL.md +1 -1
- data/features/commands/publish.feature +4 -9
- data/features/step_definitions/generator_steps.rb +14 -1
- data/features/support/env.rb +5 -3
- data/lib/omnibus.rb +10 -0
- data/lib/omnibus/build_version.rb +34 -25
- data/lib/omnibus/build_version_dsl.rb +43 -4
- data/lib/omnibus/builder.rb +30 -11
- data/lib/omnibus/changelog.rb +52 -0
- data/lib/omnibus/changelog_printer.rb +77 -0
- data/lib/omnibus/cli.rb +37 -2
- data/lib/omnibus/cli/changelog.rb +149 -0
- data/lib/omnibus/cli/publish.rb +30 -10
- data/lib/omnibus/config.rb +41 -2
- data/lib/omnibus/digestable.rb +6 -1
- data/lib/omnibus/exceptions.rb +15 -1
- data/lib/omnibus/fetcher.rb +78 -34
- data/lib/omnibus/fetchers/git_fetcher.rb +84 -42
- data/lib/omnibus/fetchers/net_fetcher.rb +64 -13
- data/lib/omnibus/fetchers/null_fetcher.rb +8 -1
- data/lib/omnibus/fetchers/path_fetcher.rb +24 -1
- data/lib/omnibus/file_syncer.rb +52 -1
- data/lib/omnibus/generator.rb +22 -21
- data/lib/omnibus/generator_files/.kitchen.yml.erb +8 -12
- data/lib/omnibus/generator_files/Berksfile.erb +4 -4
- data/lib/omnibus/generator_files/Gemfile.erb +3 -3
- data/lib/omnibus/generator_files/README.md.erb +17 -0
- data/lib/omnibus/generator_files/omnibus.rb.erb +6 -0
- data/lib/omnibus/git_repository.rb +43 -0
- data/lib/omnibus/health_check.rb +5 -1
- data/lib/omnibus/manifest.rb +134 -0
- data/lib/omnibus/manifest_diff.rb +88 -0
- data/lib/omnibus/manifest_entry.rb +43 -0
- data/lib/omnibus/metadata.rb +19 -1
- data/lib/omnibus/package.rb +9 -0
- data/lib/omnibus/packagers/base.rb +1 -1
- data/lib/omnibus/packagers/bff.rb +5 -5
- data/lib/omnibus/packagers/deb.rb +11 -4
- data/lib/omnibus/packagers/msi.rb +243 -2
- data/lib/omnibus/packagers/rpm.rb +68 -14
- data/lib/omnibus/packagers/solaris.rb +17 -23
- data/lib/omnibus/project.rb +129 -16
- data/lib/omnibus/publisher.rb +62 -49
- data/lib/omnibus/publishers/artifactory_publisher.rb +96 -5
- data/lib/omnibus/publishers/s3_publisher.rb +20 -25
- data/lib/omnibus/s3_cache.rb +13 -34
- data/lib/omnibus/s3_helpers.rb +119 -0
- data/lib/omnibus/semantic_version.rb +57 -0
- data/lib/omnibus/software.rb +87 -28
- data/lib/omnibus/sugarable.rb +18 -0
- data/lib/omnibus/templating.rb +8 -1
- data/lib/omnibus/version.rb +1 -1
- data/omnibus.gemspec +10 -7
- data/resources/bff/gen.template.erb +1 -1
- data/resources/msi/bundle.wxs.erb +17 -0
- data/resources/msi/localization-en-us.wxl.erb +1 -1
- data/resources/rpm/spec.erb +1 -1
- data/spec/functional/builder_spec.rb +15 -7
- data/spec/functional/fetchers/git_fetcher_spec.rb +44 -12
- data/spec/functional/fetchers/net_fetcher_spec.rb +171 -20
- data/spec/functional/fetchers/path_fetcher_spec.rb +16 -1
- data/spec/functional/file_syncer_spec.rb +58 -5
- data/spec/functional/templating_spec.rb +17 -6
- data/spec/spec_helper.rb +17 -0
- data/spec/support/file_helpers.rb +12 -2
- data/spec/support/git_helpers.rb +23 -18
- data/spec/support/matchers.rb +22 -0
- data/spec/support/output_helpers.rb +29 -0
- data/spec/unit/build_version_dsl_spec.rb +31 -4
- data/spec/unit/build_version_spec.rb +11 -4
- data/spec/unit/builder_spec.rb +33 -0
- data/spec/unit/changelog_spec.rb +55 -0
- data/spec/unit/cleanroom_spec.rb +1 -1
- data/spec/unit/compressors/dmg_spec.rb +3 -3
- data/spec/unit/compressors/tgz_spec.rb +3 -3
- data/spec/unit/config_spec.rb +3 -1
- data/spec/unit/fetcher_spec.rb +35 -0
- data/spec/unit/fetchers/git_fetcher_spec.rb +28 -14
- data/spec/unit/fetchers/net_fetcher_spec.rb +178 -24
- data/spec/unit/fetchers/path_fetcher_spec.rb +8 -7
- data/spec/unit/generator_spec.rb +22 -21
- data/spec/unit/git_repository_spec.rb +60 -0
- data/spec/unit/manifest_diff_spec.rb +75 -0
- data/spec/unit/manifest_spec.rb +116 -0
- data/spec/unit/metadata_spec.rb +11 -0
- data/spec/unit/omnibus_spec.rb +9 -6
- data/spec/unit/package_spec.rb +1 -1
- data/spec/unit/packagers/base_spec.rb +8 -18
- data/spec/unit/packagers/bff_spec.rb +9 -5
- data/spec/unit/packagers/deb_spec.rb +44 -12
- data/spec/unit/packagers/makeself_spec.rb +4 -4
- data/spec/unit/packagers/msi_spec.rb +122 -6
- data/spec/unit/packagers/pkg_spec.rb +3 -3
- data/spec/unit/packagers/rpm_spec.rb +37 -12
- data/spec/unit/project_spec.rb +18 -1
- data/spec/unit/publisher_spec.rb +65 -0
- data/spec/unit/publishers/artifactory_publisher_spec.rb +26 -20
- data/spec/unit/publishers/s3_publisher_spec.rb +14 -30
- data/spec/unit/s3_cacher_spec.rb +1 -1
- data/spec/unit/s3_helpers_spec.rb +32 -0
- data/spec/unit/semantic_version_spec.rb +55 -0
- data/spec/unit/software_spec.rb +112 -4
- metadata +86 -16
@@ -16,6 +16,7 @@
|
|
16
16
|
|
17
17
|
require 'fileutils'
|
18
18
|
require 'open-uri'
|
19
|
+
require 'ruby-progressbar'
|
19
20
|
|
20
21
|
module Omnibus
|
21
22
|
class NetFetcher < Fetcher
|
@@ -25,6 +26,9 @@ module Omnibus
|
|
25
26
|
# tar probably has compression scheme linked in, otherwise for tarballs
|
26
27
|
TAR_EXTENSIONS = %w(.tar .tar.gz .tgz .bz2 .tar.xz .txz)
|
27
28
|
|
29
|
+
# Digest types used for verifying file checksums
|
30
|
+
DIGESTS = [:sha512, :sha256, :sha1, :md5]
|
31
|
+
|
28
32
|
#
|
29
33
|
# A fetch is required if the downloaded_file (such as a tarball) does not
|
30
34
|
# exist on disk, or if the checksum of the downloaded file is different
|
@@ -33,7 +37,7 @@ module Omnibus
|
|
33
37
|
# @return [true, false]
|
34
38
|
#
|
35
39
|
def fetch_required?
|
36
|
-
!(File.exist?(downloaded_file) && digest(downloaded_file,
|
40
|
+
!(File.exist?(downloaded_file) && digest(downloaded_file, digest_type) == checksum)
|
37
41
|
end
|
38
42
|
|
39
43
|
#
|
@@ -43,7 +47,7 @@ module Omnibus
|
|
43
47
|
# @return [String]
|
44
48
|
#
|
45
49
|
def version_guid
|
46
|
-
"
|
50
|
+
"#{digest_type}:#{checksum}"
|
47
51
|
end
|
48
52
|
|
49
53
|
#
|
@@ -81,13 +85,24 @@ module Omnibus
|
|
81
85
|
end
|
82
86
|
|
83
87
|
#
|
84
|
-
# The version for this item in the cache.
|
85
|
-
# and the URL where it was downloaded from.
|
88
|
+
# The version for this item in the cache. This is the digest of downloaded
|
89
|
+
# file and the URL where it was downloaded from.
|
86
90
|
#
|
87
91
|
# @return [String]
|
88
92
|
#
|
89
93
|
def version_for_cache
|
90
|
-
"download_url:#{source[:url]}
|
94
|
+
"download_url:#{source[:url]}|#{digest_type}:#{checksum}"
|
95
|
+
end
|
96
|
+
|
97
|
+
#
|
98
|
+
# Returned the resolved version for the manifest. Since this is a
|
99
|
+
# remote URL, there is no resolution, the version is what we said
|
100
|
+
# it is.
|
101
|
+
#
|
102
|
+
# @return [String]
|
103
|
+
#
|
104
|
+
def self.resolve_version(version, source)
|
105
|
+
version
|
91
106
|
end
|
92
107
|
|
93
108
|
#
|
@@ -102,12 +117,12 @@ module Omnibus
|
|
102
117
|
end
|
103
118
|
|
104
119
|
#
|
105
|
-
# The checksum
|
120
|
+
# The checksum as defined by the user in the software definition.
|
106
121
|
#
|
107
122
|
# @return [String]
|
108
123
|
#
|
109
124
|
def checksum
|
110
|
-
source[
|
125
|
+
source[digest_type]
|
111
126
|
end
|
112
127
|
|
113
128
|
private
|
@@ -123,7 +138,7 @@ module Omnibus
|
|
123
138
|
#
|
124
139
|
def download_url
|
125
140
|
if Config.use_s3_caching
|
126
|
-
"http://#{Config.s3_bucket}.s3.amazonaws.com/#{S3Cache.key_for(
|
141
|
+
"http://#{Config.s3_bucket}.s3.amazonaws.com/#{S3Cache.key_for(self)}"
|
127
142
|
else
|
128
143
|
source[:url]
|
129
144
|
end
|
@@ -147,6 +162,24 @@ module Omnibus
|
|
147
162
|
end
|
148
163
|
|
149
164
|
options[:read_timeout] = Omnibus::Config.fetcher_read_timeout
|
165
|
+
fetcher_retries ||= Omnibus::Config.fetcher_retries
|
166
|
+
|
167
|
+
progress_bar = ProgressBar.create(
|
168
|
+
output: $stdout,
|
169
|
+
format: '%e %B %p%% (%r KB/sec)',
|
170
|
+
rate_scale: ->(rate) { rate / 1024 },
|
171
|
+
)
|
172
|
+
|
173
|
+
reported_total = 0
|
174
|
+
|
175
|
+
options[:content_length_proc] = ->(total) {
|
176
|
+
reported_total = total
|
177
|
+
progress_bar.total = total
|
178
|
+
}
|
179
|
+
options[:progress_proc] = ->(step) {
|
180
|
+
downloaded_amount = [step, reported_total].min
|
181
|
+
progress_bar.progress = downloaded_amount
|
182
|
+
}
|
150
183
|
|
151
184
|
file = open(download_url, options)
|
152
185
|
FileUtils.cp(file.path, downloaded_file)
|
@@ -155,9 +188,16 @@ module Omnibus
|
|
155
188
|
Errno::ECONNREFUSED,
|
156
189
|
Errno::ECONNRESET,
|
157
190
|
Errno::ENETUNREACH,
|
191
|
+
Timeout::Error,
|
158
192
|
OpenURI::HTTPError => e
|
159
|
-
|
160
|
-
|
193
|
+
if fetcher_retries != 0
|
194
|
+
log.debug(log_key) { "Retrying failed download (#{fetcher_retries})..." }
|
195
|
+
fetcher_retries -= 1
|
196
|
+
retry
|
197
|
+
else
|
198
|
+
log.error(log_key) { "Download failed - #{e.class}!" }
|
199
|
+
raise
|
200
|
+
end
|
161
201
|
end
|
162
202
|
|
163
203
|
#
|
@@ -168,7 +208,7 @@ module Omnibus
|
|
168
208
|
def extract
|
169
209
|
if command = extract_command
|
170
210
|
log.info(log_key) { "Extracting `#{downloaded_file}' to `#{Config.source_dir}'" }
|
171
|
-
shellout!(
|
211
|
+
shellout!(command)
|
172
212
|
else
|
173
213
|
log.info(log_key) { "`#{downloaded_file}' is not an archive - copying to `#{project_dir}'" }
|
174
214
|
|
@@ -186,6 +226,17 @@ module Omnibus
|
|
186
226
|
end
|
187
227
|
end
|
188
228
|
|
229
|
+
#
|
230
|
+
# The digest type defined in the software definition
|
231
|
+
#
|
232
|
+
# @return [Symbol]
|
233
|
+
#
|
234
|
+
def digest_type
|
235
|
+
DIGESTS.each do |digest|
|
236
|
+
return digest if source.key? digest
|
237
|
+
end
|
238
|
+
end
|
239
|
+
|
189
240
|
#
|
190
241
|
# Verify the downloaded file has the correct checksum.#
|
191
242
|
#
|
@@ -196,10 +247,10 @@ module Omnibus
|
|
196
247
|
log.info(log_key) { 'Verifying checksum' }
|
197
248
|
|
198
249
|
expected = checksum
|
199
|
-
actual = digest(downloaded_file,
|
250
|
+
actual = digest(downloaded_file, digest_type)
|
200
251
|
|
201
252
|
if expected != actual
|
202
|
-
raise ChecksumMismatch.new(
|
253
|
+
raise ChecksumMismatch.new(self, expected, actual)
|
203
254
|
end
|
204
255
|
end
|
205
256
|
|
@@ -30,6 +30,13 @@ module Omnibus
|
|
30
30
|
nil
|
31
31
|
end
|
32
32
|
|
33
|
+
#
|
34
|
+
# @return [String, nil]
|
35
|
+
#
|
36
|
+
def self.resolve_version(version, source)
|
37
|
+
version
|
38
|
+
end
|
39
|
+
|
33
40
|
#
|
34
41
|
# @return [false]
|
35
42
|
#
|
@@ -41,7 +48,7 @@ module Omnibus
|
|
41
48
|
# @return [void]
|
42
49
|
#
|
43
50
|
def fetch
|
44
|
-
log.info(log_key) { "Fetching `#{
|
51
|
+
log.info(log_key) { "Fetching `#{name}' (nothing to fetch)" }
|
45
52
|
|
46
53
|
create_required_directories
|
47
54
|
nil
|
@@ -64,7 +64,10 @@ module Omnibus
|
|
64
64
|
log.info(log_key) { "Copying from `#{source_path}'" }
|
65
65
|
|
66
66
|
create_required_directories
|
67
|
-
FileSyncer.sync(source_path, project_dir)
|
67
|
+
FileSyncer.sync(source_path, project_dir, source_options)
|
68
|
+
# Reset target shasum on every fetch
|
69
|
+
@target_shasum = nil
|
70
|
+
target_shasum
|
68
71
|
end
|
69
72
|
|
70
73
|
#
|
@@ -77,6 +80,13 @@ module Omnibus
|
|
77
80
|
"path:#{source_path}|shasum:#{target_shasum}"
|
78
81
|
end
|
79
82
|
|
83
|
+
#
|
84
|
+
# @return [String, nil]
|
85
|
+
#
|
86
|
+
def self.resolve_version(version, source)
|
87
|
+
version
|
88
|
+
end
|
89
|
+
|
80
90
|
private
|
81
91
|
|
82
92
|
#
|
@@ -88,6 +98,19 @@ module Omnibus
|
|
88
98
|
source[:path]
|
89
99
|
end
|
90
100
|
|
101
|
+
#
|
102
|
+
# Options to pass to the underlying FileSyncer
|
103
|
+
#
|
104
|
+
# @return [Hash]
|
105
|
+
#
|
106
|
+
def source_options
|
107
|
+
if source[:options] && source[:options].is_a?(Hash)
|
108
|
+
source[:options]
|
109
|
+
else
|
110
|
+
{}
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
91
114
|
#
|
92
115
|
# The shasum of the directory **inside** the project.
|
93
116
|
#
|
data/lib/omnibus/file_syncer.rb
CHANGED
@@ -101,7 +101,29 @@ module Omnibus
|
|
101
101
|
FileUtils.ln_sf(target, "#{destination}/#{relative_path}")
|
102
102
|
end
|
103
103
|
when :file
|
104
|
-
|
104
|
+
source_stat = File.stat(source_file)
|
105
|
+
# Detect 'files' which are hard links and use ln instead of cp to
|
106
|
+
# duplicate them, provided their source is in place already
|
107
|
+
if hardlink? source_stat
|
108
|
+
if existing = hardlink_sources[[source_stat.dev, source_stat.ino]]
|
109
|
+
FileUtils.ln(existing, "#{destination}/#{relative_path}")
|
110
|
+
else
|
111
|
+
FileUtils.cp(source_file, "#{destination}/#{relative_path}")
|
112
|
+
hardlink_sources.store([source_stat.dev, source_stat.ino], "#{destination}/#{relative_path}")
|
113
|
+
end
|
114
|
+
else
|
115
|
+
# First attempt a regular copy. If we don't have write
|
116
|
+
# permission on the File, open will probably fail with
|
117
|
+
# EACCES (making it hard to sync files with permission
|
118
|
+
# r--r--r--). Rescue this error and use cp_r's
|
119
|
+
# :remove_destination option.
|
120
|
+
begin
|
121
|
+
FileUtils.cp(source_file, "#{destination}/#{relative_path}")
|
122
|
+
rescue Errno::EACCES
|
123
|
+
FileUtils.cp_r(source_file, "#{destination}/#{relative_path}",
|
124
|
+
:remove_destination => true)
|
125
|
+
end
|
126
|
+
end
|
105
127
|
else
|
106
128
|
raise RuntimeError,
|
107
129
|
"Unknown file type: `File.ftype(source_file)' at `#{source_file}'!"
|
@@ -145,5 +167,34 @@ module Omnibus
|
|
145
167
|
def relative_path_for(path, parent)
|
146
168
|
Pathname.new(path).relative_path_from(Pathname.new(parent)).to_s
|
147
169
|
end
|
170
|
+
|
171
|
+
#
|
172
|
+
# A list of hard link file(s) sources which have already been copied,
|
173
|
+
# indexed by device and inode number.
|
174
|
+
#
|
175
|
+
# @api private
|
176
|
+
#
|
177
|
+
# @return [Hash{Array<FixNum, FixNum> => String}]
|
178
|
+
#
|
179
|
+
def hardlink_sources
|
180
|
+
@hardlink_sources ||= {}
|
181
|
+
end
|
182
|
+
|
183
|
+
#
|
184
|
+
# Determines whether or not a file is a hardlink.
|
185
|
+
#
|
186
|
+
# @param [File::Stat] stat
|
187
|
+
# the File::Stat object for a file you wand to test
|
188
|
+
#
|
189
|
+
# @return [true, false]
|
190
|
+
#
|
191
|
+
def hardlink?(stat)
|
192
|
+
case stat.ftype.to_sym
|
193
|
+
when :file
|
194
|
+
stat.nlink > 1
|
195
|
+
else
|
196
|
+
false
|
197
|
+
end
|
198
|
+
end
|
148
199
|
end
|
149
200
|
end
|
data/lib/omnibus/generator.rb
CHANGED
@@ -106,53 +106,54 @@ module Omnibus
|
|
106
106
|
def create_bff_assets
|
107
107
|
return unless options[:bff_assets]
|
108
108
|
|
109
|
-
copy_file(resource_path('bff/gen.template.erb'), "#{target}/resources/bff/gen.template.erb")
|
109
|
+
copy_file(resource_path('bff/gen.template.erb'), "#{target}/resources/#{name}/bff/gen.template.erb")
|
110
110
|
end
|
111
111
|
|
112
112
|
def create_deb_assets
|
113
113
|
return unless options[:deb_assets]
|
114
114
|
|
115
|
-
copy_file(resource_path('deb/conffiles.erb'), "#{target}/resources/deb/conffiles.erb")
|
116
|
-
copy_file(resource_path('deb/control.erb'), "#{target}/resources/deb/control.erb")
|
117
|
-
copy_file(resource_path('deb/md5sums.erb'), "#{target}/resources/deb/md5sums.erb")
|
115
|
+
copy_file(resource_path('deb/conffiles.erb'), "#{target}/resources/#{name}/deb/conffiles.erb")
|
116
|
+
copy_file(resource_path('deb/control.erb'), "#{target}/resources/#{name}/deb/control.erb")
|
117
|
+
copy_file(resource_path('deb/md5sums.erb'), "#{target}/resources/#{name}/deb/md5sums.erb")
|
118
118
|
end
|
119
119
|
|
120
120
|
def create_dmg_assets
|
121
121
|
return unless options[:dmg_assets]
|
122
122
|
|
123
|
-
copy_file(resource_path('dmg/background.png'), "#{target}/resources/dmg/background.png")
|
124
|
-
copy_file(resource_path('dmg/icon.png'), "#{target}/resources/dmg/icon.png")
|
123
|
+
copy_file(resource_path('dmg/background.png'), "#{target}/resources/#{name}/dmg/background.png")
|
124
|
+
copy_file(resource_path('dmg/icon.png'), "#{target}/resources/#{name}/dmg/icon.png")
|
125
125
|
end
|
126
126
|
|
127
127
|
def create_msi_assets
|
128
128
|
return unless options[:msi_assets]
|
129
129
|
|
130
|
-
copy_file(resource_path('msi/localization-en-us.wxl.erb'), "#{target}/resources/msi/localization-en-us.wxl.erb")
|
131
|
-
copy_file(resource_path('msi/parameters.wxi.erb'), "#{target}/resources/msi/parameters.wxi.erb")
|
132
|
-
copy_file(resource_path('msi/source.wxs.erb'), "#{target}/resources/msi/source.wxs.erb")
|
130
|
+
copy_file(resource_path('msi/localization-en-us.wxl.erb'), "#{target}/resources/#{name}/msi/localization-en-us.wxl.erb")
|
131
|
+
copy_file(resource_path('msi/parameters.wxi.erb'), "#{target}/resources/#{name}/msi/parameters.wxi.erb")
|
132
|
+
copy_file(resource_path('msi/source.wxs.erb'), "#{target}/resources/#{name}/msi/source.wxs.erb")
|
133
133
|
|
134
|
-
copy_file(resource_path('msi/assets/LICENSE.rtf'), "#{target}/resources/msi/assets/LICENSE.rtf")
|
135
|
-
copy_file(resource_path('msi/assets/banner_background.bmp'), "#{target}/resources/msi/assets/banner_background.bmp")
|
136
|
-
copy_file(resource_path('msi/assets/dialog_background.bmp'), "#{target}/resources/msi/assets/dialog_background.bmp")
|
137
|
-
copy_file(resource_path('msi/assets/project.ico'), "#{target}/resources/msi/assets/project.ico")
|
138
|
-
copy_file(resource_path('msi/assets/project_16x16.ico'), "#{target}/resources/msi/assets/project_16x16.ico")
|
139
|
-
copy_file(resource_path('msi/assets/project_32x32.ico'), "#{target}/resources/msi/assets/project_32x32.ico")
|
134
|
+
copy_file(resource_path('msi/assets/LICENSE.rtf'), "#{target}/resources/#{name}/msi/assets/LICENSE.rtf")
|
135
|
+
copy_file(resource_path('msi/assets/banner_background.bmp'), "#{target}/resources/#{name}/msi/assets/banner_background.bmp")
|
136
|
+
copy_file(resource_path('msi/assets/dialog_background.bmp'), "#{target}/resources/#{name}/msi/assets/dialog_background.bmp")
|
137
|
+
copy_file(resource_path('msi/assets/project.ico'), "#{target}/resources/#{name}/msi/assets/project.ico")
|
138
|
+
copy_file(resource_path('msi/assets/project_16x16.ico'), "#{target}/resources/#{name}/msi/assets/project_16x16.ico")
|
139
|
+
copy_file(resource_path('msi/assets/project_32x32.ico'), "#{target}/resources/#{name}/msi/assets/project_32x32.ico")
|
140
140
|
end
|
141
141
|
|
142
142
|
def create_pkg_assets
|
143
143
|
return unless options[:pkg_assets]
|
144
144
|
|
145
|
-
copy_file(resource_path('pkg/background.png'), "#{target}/resources/pkg/background.png")
|
146
|
-
copy_file(resource_path('pkg/license.html.erb'), "#{target}/resources/pkg/license.html.erb")
|
147
|
-
copy_file(resource_path('pkg/welcome.html.erb'), "#{target}/resources/pkg/welcome.html.erb")
|
145
|
+
copy_file(resource_path('pkg/background.png'), "#{target}/resources/#{name}/pkg/background.png")
|
146
|
+
copy_file(resource_path('pkg/license.html.erb'), "#{target}/resources/#{name}/pkg/license.html.erb")
|
147
|
+
copy_file(resource_path('pkg/welcome.html.erb'), "#{target}/resources/#{name}/pkg/welcome.html.erb")
|
148
|
+
copy_file(resource_path('pkg/distribution.xml.erb'), "#{target}/resources/#{name}/pkg/distribution.xml.erb")
|
148
149
|
end
|
149
150
|
|
150
151
|
def create_rpm_assets
|
151
152
|
return unless options[:rpm_assets]
|
152
153
|
|
153
|
-
copy_file(resource_path('rpm/rpmmacros.erb'), "#{target}/resources/rpm/rpmmacros.erb")
|
154
|
-
copy_file(resource_path('rpm/signing.erb'), "#{target}/resources/rpm/signing.erb")
|
155
|
-
copy_file(resource_path('rpm/spec.erb'), "#{target}/resources/rpm/spec.erb")
|
154
|
+
copy_file(resource_path('rpm/rpmmacros.erb'), "#{target}/resources/#{name}/rpm/rpmmacros.erb")
|
155
|
+
copy_file(resource_path('rpm/signing.erb'), "#{target}/resources/#{name}/rpm/signing.erb")
|
156
|
+
copy_file(resource_path('rpm/spec.erb'), "#{target}/resources/#{name}/rpm/spec.erb")
|
156
157
|
end
|
157
158
|
private
|
158
159
|
|
@@ -9,22 +9,22 @@ driver:
|
|
9
9
|
|
10
10
|
provisioner:
|
11
11
|
name: chef_zero
|
12
|
-
require_chef_omnibus:
|
12
|
+
require_chef_omnibus: 12.4.1
|
13
13
|
|
14
14
|
platforms:
|
15
|
-
- name: centos-7.
|
15
|
+
- name: centos-7.1
|
16
16
|
run_list: yum-epel::default
|
17
|
-
- name: centos-6.
|
17
|
+
- name: centos-6.6
|
18
18
|
run_list: yum-epel::default
|
19
|
-
- name: centos-5.
|
19
|
+
- name: centos-5.11
|
20
20
|
run_list: yum-epel::default
|
21
|
-
- name: debian-7.
|
21
|
+
- name: debian-7.8
|
22
22
|
run_list: apt::default
|
23
|
-
- name: debian-6.0.
|
23
|
+
- name: debian-6.0.10
|
24
24
|
run_list: apt::default
|
25
|
-
- name: freebsd-10.
|
25
|
+
- name: freebsd-10.1
|
26
26
|
run_list: freebsd::portsnap
|
27
|
-
- name: freebsd-9.
|
27
|
+
- name: freebsd-9.3
|
28
28
|
run_list:
|
29
29
|
- freebsd::portsnap
|
30
30
|
- freebsd::pkgng
|
@@ -32,10 +32,6 @@ platforms:
|
|
32
32
|
run_list: apt::default
|
33
33
|
- name: ubuntu-12.04
|
34
34
|
run_list: apt::default
|
35
|
-
- name: ubuntu-11.04
|
36
|
-
run_list: apt::default
|
37
|
-
- name: ubuntu-10.04
|
38
|
-
run_list: apt::default
|
39
35
|
|
40
36
|
suites:
|
41
37
|
- name: default
|
@@ -1,4 +1,4 @@
|
|
1
|
-
source 'https://
|
1
|
+
source 'https://supermarket.chef.io'
|
2
2
|
|
3
3
|
cookbook 'omnibus'
|
4
4
|
|
@@ -6,7 +6,7 @@ cookbook 'omnibus'
|
|
6
6
|
# cookbook 'omnibus', github: 'opscode-cookbooks/omnibus'
|
7
7
|
|
8
8
|
group :integration do
|
9
|
-
cookbook 'apt', '~> 2.
|
10
|
-
cookbook 'freebsd', '~> 0.
|
11
|
-
cookbook 'yum-epel', '~> 0.
|
9
|
+
cookbook 'apt', '~> 2.8'
|
10
|
+
cookbook 'freebsd', '~> 0.3'
|
11
|
+
cookbook 'yum-epel', '~> 0.6'
|
12
12
|
end
|
@@ -13,9 +13,9 @@ gem 'omnibus', '~> <%= Omnibus::VERSION.split('.')[0...-1].join('.') %>'
|
|
13
13
|
# by running `bundle install --without development` to speed up build times.
|
14
14
|
group :development do
|
15
15
|
# Use Berkshelf for resolving cookbook dependencies
|
16
|
-
gem 'berkshelf', '~> 3.
|
16
|
+
gem 'berkshelf', '~> 3.3'
|
17
17
|
|
18
18
|
# Use Test Kitchen with Vagrant for converging the build environment
|
19
|
-
gem 'test-kitchen', '~> 1.
|
20
|
-
gem 'kitchen-vagrant', '~> 0.
|
19
|
+
gem 'test-kitchen', '~> 1.4'
|
20
|
+
gem 'kitchen-vagrant', '~> 0.18'
|
21
21
|
end
|