omnibus 1.0.4 → 1.1.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.
- checksums.yaml +8 -8
- data/CHANGELOG.md +16 -1
- data/lib/omnibus/build_version.rb +6 -3
- data/lib/omnibus/health_check.rb +55 -1
- data/lib/omnibus/project.rb +39 -0
- data/lib/omnibus/s3_cacher.rb +3 -1
- data/lib/omnibus/version.rb +1 -1
- data/spec/build_version_spec.rb +16 -0
- data/spec/s3_cacher_spec.rb +47 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NmUyOTcwNzFiYmJmNDE5YmM5Y2RhMDBkNzE2ZjVlOTEwNzMzOTFhMg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDU0ZjEwNDhiZjJkYjliYzY1NzM3NzI2ZjE3YjQxNzYxMGRhZDBhZQ==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODY2MDNhOTQ1YzAzYWJjZTI2OTQwZDBkZjIwMWYyMmRhNTZkOTFjN2Q2MmE4
|
10
|
+
ZjMxZDY5NGZkZmJmMjkzZWNiNjQxZDU4MGExYjRkNmI0ZmFhNjYwYjM3NDlh
|
11
|
+
NjJhMjVkZmU1YmU5NTA0OGNmY2NlOWMzYTg2OGM0NjNkMzkwMTQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTUxMmFiM2M0ZGNiNjMxODkwNGE2OTBlOGQ3MjYzMDE3NTA5NTIzOWExZWI3
|
14
|
+
MzA4NmVhZTAzNDY1MGI4MTE1MTdiMTdkOWQ1MTViNzBiZmY1YWZjZjMyMjRm
|
15
|
+
YWE4NzcwNTdiZTRiNWI3MTlmYjA1Yjg4ZTFiNTY0MjQ5MWEyZGI=
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
## 1.1.0 (June 12, 2013)
|
2
|
+
|
3
|
+
FEATURES:
|
4
|
+
|
5
|
+
* AIX health check whitelist support
|
6
|
+
* AIX Backup-File Format (BFF) package support
|
7
|
+
|
8
|
+
IMPROVEMENTS:
|
9
|
+
|
10
|
+
* Add libstdc++ to SmartOS whitelist libs - this allows the health check pass when
|
11
|
+
depending on C++ libs.
|
12
|
+
|
13
|
+
BUG FIXES:
|
14
|
+
|
15
|
+
* [CHEF-4246] - omnibus cache populate failing
|
16
|
+
|
1
17
|
## 1.0.4 (May 23, 2013)
|
2
18
|
|
3
19
|
FEATURES:
|
@@ -16,7 +32,6 @@ BUG FIXES:
|
|
16
32
|
|
17
33
|
* [CHEF-4214] - projects in multi-project omnibus repositories share dependency scope
|
18
34
|
|
19
|
-
|
20
35
|
## 1.0.3 (May 2, 2013)
|
21
36
|
|
22
37
|
FEATURES:
|
@@ -45,8 +45,11 @@ module Omnibus
|
|
45
45
|
Omnibus::BuildVersion.new.git_describe
|
46
46
|
end
|
47
47
|
|
48
|
-
#
|
49
|
-
|
48
|
+
# Create a new BuildVersion
|
49
|
+
#
|
50
|
+
# @param [String] path Path from which to read git version information
|
51
|
+
def initialize(path=Omnibus.root)
|
52
|
+
@path = path
|
50
53
|
end
|
51
54
|
|
52
55
|
# @!group Version Generator Methods
|
@@ -130,7 +133,7 @@ module Omnibus
|
|
130
133
|
git_cmd = "git describe"
|
131
134
|
cmd = shellout(git_cmd,
|
132
135
|
:live_stream => nil,
|
133
|
-
:cwd =>
|
136
|
+
:cwd => @path)
|
134
137
|
if cmd.exitstatus == 0
|
135
138
|
cmd.stdout.chomp
|
136
139
|
else
|
data/lib/omnibus/health_check.rb
CHANGED
@@ -49,6 +49,16 @@ module Omnibus
|
|
49
49
|
/libutil\.so/
|
50
50
|
]
|
51
51
|
|
52
|
+
AIX_WHITELIST_LIBS = [
|
53
|
+
/libpthread\.a/,
|
54
|
+
/libpthreads\.a/,
|
55
|
+
/libdl.a/,
|
56
|
+
/librtl\.a/,
|
57
|
+
/libc\.a/,
|
58
|
+
/libcrypt\.a/,
|
59
|
+
/unix$/,
|
60
|
+
]
|
61
|
+
|
52
62
|
SOLARIS_WHITELIST_LIBS = [
|
53
63
|
/libaio\.so/,
|
54
64
|
/libavl\.so/,
|
@@ -94,6 +104,7 @@ module Omnibus
|
|
94
104
|
/libmd.so/,
|
95
105
|
/libc.so/,
|
96
106
|
/libgcc_s.so/,
|
107
|
+
/libstdc\+\+\.so/,
|
97
108
|
/libcrypt.so/
|
98
109
|
]
|
99
110
|
|
@@ -134,8 +145,11 @@ module Omnibus
|
|
134
145
|
end
|
135
146
|
|
136
147
|
def self.run(install_dir)
|
137
|
-
|
148
|
+
case OHAI.platform
|
149
|
+
when "mac_os_x"
|
138
150
|
bad_libs = health_check_otool(install_dir)
|
151
|
+
when "aix"
|
152
|
+
bad_libs = health_check_aix(install_dir)
|
139
153
|
else
|
140
154
|
bad_libs = health_check_ldd(install_dir)
|
141
155
|
end
|
@@ -226,6 +240,8 @@ module Omnibus
|
|
226
240
|
SMARTOS_WHITELIST_LIBS
|
227
241
|
when 'freebsd'
|
228
242
|
FREEBSD_WHITELIST_LIBS
|
243
|
+
when 'aix'
|
244
|
+
AIX_WHITELIST_LIBS
|
229
245
|
else
|
230
246
|
WHITELIST_LIBS
|
231
247
|
end
|
@@ -255,6 +271,43 @@ module Omnibus
|
|
255
271
|
bad_libs
|
256
272
|
end
|
257
273
|
|
274
|
+
def self.health_check_aix(install_dir)
|
275
|
+
#
|
276
|
+
# ShellOut has GC turned off during execution, so when we're
|
277
|
+
# executing extremely long commands with lots of output, we
|
278
|
+
# should be mindful that the string concatentation for building
|
279
|
+
# #stdout will hurt memory usage drastically
|
280
|
+
#
|
281
|
+
ldd_cmd = "find #{install_dir}/ -type f | xargs file | grep \"RISC System\" | awk -F: '{print $1}' | xargs -n 1 ldd > ldd.out 2>/dev/null"
|
282
|
+
|
283
|
+
log "Executing `#{ldd_cmd}`"
|
284
|
+
shell = Mixlib::ShellOut.new(ldd_cmd, :timeout => 3600)
|
285
|
+
shell.run_command
|
286
|
+
|
287
|
+
ldd_output = File.read('ldd.out')
|
288
|
+
|
289
|
+
current_library = nil
|
290
|
+
bad_libs = {}
|
291
|
+
|
292
|
+
ldd_output.each_line do |line|
|
293
|
+
case line
|
294
|
+
when /^(.+) needs:$/
|
295
|
+
current_library = $1
|
296
|
+
log "*** Analysing dependencies for #{current_library}" if ARGV[0] == "verbose"
|
297
|
+
when /^\s+(.+)$/
|
298
|
+
name = $1
|
299
|
+
linked = $1
|
300
|
+
bad_libs = check_for_bad_library(install_dir, bad_libs, current_library, name, linked)
|
301
|
+
when /File is not an executable XCOFF file/ # ignore non-executable files
|
302
|
+
else
|
303
|
+
log "*** Line did not match for #{current_library}\n#{line}"
|
304
|
+
end
|
305
|
+
end
|
306
|
+
|
307
|
+
File.delete('ldd.out')
|
308
|
+
bad_libs
|
309
|
+
end
|
310
|
+
|
258
311
|
def self.health_check_ldd(install_dir)
|
259
312
|
#
|
260
313
|
# ShellOut has GC turned off during execution, so when we're
|
@@ -263,6 +316,7 @@ module Omnibus
|
|
263
316
|
# #stdout will hurt memory usage drastically
|
264
317
|
#
|
265
318
|
ldd_cmd = "find #{install_dir}/ -type f | xargs ldd > ldd.out 2>/dev/null"
|
319
|
+
|
266
320
|
log "Executing `#{ldd_cmd}`"
|
267
321
|
shell = Mixlib::ShellOut.new(ldd_cmd, :timeout => 3600)
|
268
322
|
shell.run_command
|
data/lib/omnibus/project.rb
CHANGED
@@ -168,6 +168,8 @@ module Omnibus
|
|
168
168
|
"#{build_iteration}.#{platform}.#{maj}.#{machine}"
|
169
169
|
when 'windows'
|
170
170
|
"#{build_iteration}.windows"
|
171
|
+
when 'aix'
|
172
|
+
"#{build_iteration}"
|
171
173
|
else
|
172
174
|
"#{build_iteration}.#{platform}.#{platform_version}"
|
173
175
|
end
|
@@ -376,6 +378,8 @@ module Omnibus
|
|
376
378
|
[ "deb" ]
|
377
379
|
when 'fedora', 'rhel'
|
378
380
|
[ "rpm" ]
|
381
|
+
when 'aix'
|
382
|
+
[ "bff" ]
|
379
383
|
when 'solaris2'
|
380
384
|
[ "solaris" ]
|
381
385
|
when 'windows'
|
@@ -455,6 +459,8 @@ module Omnibus
|
|
455
459
|
"#{package_name}-#{build_version}_#{iteration}.sh"
|
456
460
|
when "msi"
|
457
461
|
"#{package_name}-#{build_version}-#{iteration}.msi"
|
462
|
+
when "bff"
|
463
|
+
"#{package_name}.#{bff_version}.bff"
|
458
464
|
else # fpm
|
459
465
|
require "fpm/package/#{pkg_type}"
|
460
466
|
pkg = FPM::Package.types[pkg_type].new
|
@@ -492,6 +498,11 @@ module Omnibus
|
|
492
498
|
[msi_command.join(" "), {:returns => [0, 204]}]
|
493
499
|
end
|
494
500
|
|
501
|
+
def bff_command
|
502
|
+
bff_command = ["mkinstallp -d / -T /tmp/bff/gen.template"]
|
503
|
+
[bff_command.join(" "), {:returns => [0]}]
|
504
|
+
end
|
505
|
+
|
495
506
|
# The {https://github.com/jordansissel/fpm fpm} command to
|
496
507
|
# generate a package for RedHat, Ubuntu, Solaris, etc. platforms.
|
497
508
|
#
|
@@ -582,6 +593,30 @@ module Omnibus
|
|
582
593
|
run_package_command(msi_command)
|
583
594
|
end
|
584
595
|
|
596
|
+
def bff_version
|
597
|
+
build_version.split(/[^\d]/)[0..2].join(".") + ".#{iteration}"
|
598
|
+
end
|
599
|
+
|
600
|
+
def run_bff
|
601
|
+
FileUtils.rm_rf "/.info"
|
602
|
+
FileUtils.rm_rf "/tmp/bff"
|
603
|
+
FileUtils.mkdir "/tmp/bff"
|
604
|
+
|
605
|
+
system "find #{install_path} -print > /tmp/bff/file.list"
|
606
|
+
|
607
|
+
system "cat #{package_scripts_path}/aix/opscode.chef.client.template | sed -e 's/TBS/#{bff_version}/' > /tmp/bff/gen.preamble"
|
608
|
+
|
609
|
+
# @todo can we just use an erb template here?
|
610
|
+
system "cat /tmp/bff/gen.preamble /tmp/bff/file.list #{package_scripts_path}/aix/opscode.chef.client.template.last > /tmp/bff/gen.template"
|
611
|
+
|
612
|
+
FileUtils.cp "#{package_scripts_path}/aix/unpostinstall.sh", "#{install_path}/bin"
|
613
|
+
FileUtils.cp "#{package_scripts_path}/aix/postinstall.sh", "#{install_path}/bin"
|
614
|
+
|
615
|
+
run_package_command(bff_command)
|
616
|
+
|
617
|
+
FileUtils.cp "/tmp/chef.#{bff_version}.bff", "/var/cache/omnibus/pkg/chef.#{bff_version}.bff"
|
618
|
+
end
|
619
|
+
|
585
620
|
# Runs the necessary command to make a package with fpm. As a side-effect,
|
586
621
|
# sets `output_package`
|
587
622
|
# @return void
|
@@ -631,6 +666,8 @@ module Omnibus
|
|
631
666
|
run_makeself
|
632
667
|
elsif pkg_type == "msi"
|
633
668
|
run_msi
|
669
|
+
elsif pkg_type == "bff"
|
670
|
+
run_bff
|
634
671
|
else # pkg_type == "fpm"
|
635
672
|
run_fpm(pkg_type)
|
636
673
|
end
|
@@ -643,6 +680,8 @@ module Omnibus
|
|
643
680
|
task "copy" => package_types do
|
644
681
|
if OHAI.platform == "windows"
|
645
682
|
cp_cmd = "xcopy #{config.package_dir}\\*.msi pkg\\ /Y"
|
683
|
+
elsif OHAI.platform == "aix"
|
684
|
+
cp_cmd = "cp #{config.package_dir}/*.bff pkg/"
|
646
685
|
else
|
647
686
|
cp_cmd = "cp #{config.package_dir}/* pkg/"
|
648
687
|
end
|
data/lib/omnibus/s3_cacher.rb
CHANGED
data/lib/omnibus/version.rb
CHANGED
data/spec/build_version_spec.rb
CHANGED
@@ -247,4 +247,20 @@ Try --always, or create some tags.
|
|
247
247
|
build_version.git_describe.should eq("0.0.0")
|
248
248
|
end
|
249
249
|
end
|
250
|
+
|
251
|
+
describe "#initialize `path` parameter" do
|
252
|
+
let(:path) { "/some/fake/path" }
|
253
|
+
subject(:build_version){ Omnibus::BuildVersion.new(path) }
|
254
|
+
|
255
|
+
it "runs `git describe` at an alternate path" do
|
256
|
+
build_version.should_receive(:shellout)
|
257
|
+
.with("git describe",
|
258
|
+
{:live_stream => nil,
|
259
|
+
:cwd => path})
|
260
|
+
.and_return(mock("ouput",
|
261
|
+
:stdout => git_describe,
|
262
|
+
:exitstatus => 0))
|
263
|
+
build_version.git_describe
|
264
|
+
end
|
265
|
+
end
|
250
266
|
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
#
|
2
|
+
# Copyright:: Copyright (c) 2013 Opscode, Inc.
|
3
|
+
# License:: Apache License, Version 2.0
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
#
|
17
|
+
|
18
|
+
require 'spec_helper'
|
19
|
+
require 'omnibus/s3_cacher'
|
20
|
+
|
21
|
+
describe Omnibus::S3Cache do
|
22
|
+
|
23
|
+
describe '#tarball_software' do
|
24
|
+
subject(:tarball_software) { described_class.new.tarball_software }
|
25
|
+
|
26
|
+
let(:source_a) { stub(source: { url: 'a' }) }
|
27
|
+
let(:source_b) { stub(source: { url: 'b' }) }
|
28
|
+
let(:source_c) { stub(source: {}) }
|
29
|
+
let(:projects) { [
|
30
|
+
stub({ library: [source_a, source_c] }),
|
31
|
+
stub({ library: [source_c, source_b] })
|
32
|
+
] }
|
33
|
+
let(:software_with_urls) { [source_a, source_b] }
|
34
|
+
|
35
|
+
before do
|
36
|
+
Omnibus.stub(config: stub({
|
37
|
+
s3_bucket: 'test', s3_access_key: 'test', s3_secret_key: 'test'
|
38
|
+
}))
|
39
|
+
|
40
|
+
Omnibus.stub(projects: projects)
|
41
|
+
end
|
42
|
+
|
43
|
+
it 'lists all software with urls' do
|
44
|
+
tarball_software.should == software_with_urls
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omnibus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Opscode
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-shellout
|
@@ -208,6 +208,7 @@ files:
|
|
208
208
|
- spec/fetchers/net_fetcher_spec.rb
|
209
209
|
- spec/overrides_spec.rb
|
210
210
|
- spec/package_release_spec.rb
|
211
|
+
- spec/s3_cacher_spec.rb
|
211
212
|
- spec/software_spec.rb
|
212
213
|
- spec/spec_helper.rb
|
213
214
|
homepage: https://github.com/opscode/omnibus-ruby
|
@@ -244,6 +245,7 @@ test_files:
|
|
244
245
|
- spec/fetchers/net_fetcher_spec.rb
|
245
246
|
- spec/overrides_spec.rb
|
246
247
|
- spec/package_release_spec.rb
|
248
|
+
- spec/s3_cacher_spec.rb
|
247
249
|
- spec/software_spec.rb
|
248
250
|
- spec/spec_helper.rb
|
249
251
|
has_rdoc:
|