omnibus 1.3.0 → 2.0.0.rc1
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 +7 -0
- data/.gitignore +4 -1
- data/.rubocop.yml +30 -0
- data/.travis.yml +14 -3
- data/CHANGELOG.md +72 -49
- data/Gemfile +8 -5
- data/NOTICE +2 -2
- data/README.md +65 -7
- data/Rakefile +12 -3
- data/bin/makeself-header.sh +1 -1
- data/bin/makeself.sh +2 -2
- data/bin/omnibus +2 -2
- data/functional/fixtures/mac_pkg/files/mac_pkg/Resources/background.png +0 -0
- data/functional/fixtures/mac_pkg/files/mac_pkg/Resources/license.html +1 -0
- data/functional/fixtures/mac_pkg/files/mac_pkg/Resources/welcome.html +1 -0
- data/functional/fixtures/mac_pkg/package-scripts/functional-test-project/postinstall +4 -0
- data/functional/packagers/mac_pkg_spec.rb +72 -0
- data/lib/omnibus/artifact.rb +11 -13
- data/lib/omnibus/build_version.rb +18 -21
- data/lib/omnibus/builder.rb +37 -48
- data/lib/omnibus/clean_tasks.rb +3 -5
- data/lib/omnibus/cli/application.rb +46 -53
- data/lib/omnibus/cli/base.rb +16 -19
- data/lib/omnibus/cli/build.rb +13 -13
- data/lib/omnibus/cli/cache.rb +13 -15
- data/lib/omnibus/cli/release.rb +4 -9
- data/lib/omnibus/cli.rb +2 -4
- data/lib/omnibus/config.rb +43 -23
- data/lib/omnibus/exceptions.rb +35 -1
- data/lib/omnibus/fetcher.rb +9 -13
- data/lib/omnibus/fetchers/git_fetcher.rb +15 -19
- data/lib/omnibus/fetchers/net_fetcher.rb +34 -38
- data/lib/omnibus/fetchers/path_fetcher.rb +7 -9
- data/lib/omnibus/fetchers/s3_cache_fetcher.rb +3 -4
- data/lib/omnibus/fetchers.rb +3 -3
- data/lib/omnibus/health_check.rb +126 -127
- data/lib/omnibus/library.rb +11 -12
- data/lib/omnibus/overrides.rb +6 -8
- data/lib/omnibus/package_release.rb +20 -22
- data/lib/omnibus/packagers/mac_pkg.rb +285 -0
- data/lib/omnibus/project.rb +215 -110
- data/lib/omnibus/reports.rb +16 -24
- data/lib/omnibus/s3_cacher.rb +15 -21
- data/lib/omnibus/software.rb +178 -88
- data/lib/omnibus/util.rb +25 -13
- data/lib/omnibus/version.rb +2 -2
- data/lib/omnibus.rb +11 -13
- data/omnibus.gemspec +20 -18
- data/spec/artifact_spec.rb +55 -52
- data/spec/build_version_spec.rb +121 -129
- data/spec/config_spec.rb +40 -0
- data/spec/data/projects/chefdk.rb +41 -0
- data/spec/data/projects/sample.rb +10 -0
- data/spec/data/software/erchef.rb +12 -12
- data/spec/data/software/zlib.rb +67 -0
- data/spec/fetchers/git_fetcher_spec.rb +55 -48
- data/spec/fetchers/net_fetcher_spec.rb +72 -78
- data/spec/omnibus_spec.rb +59 -0
- data/spec/overrides_spec.rb +64 -64
- data/spec/package_release_spec.rb +65 -64
- data/spec/packagers/mac_pkg_spec.rb +261 -0
- data/spec/project_spec.rb +138 -0
- data/spec/s3_cacher_spec.rb +9 -10
- data/spec/software_spec.rb +71 -50
- data/spec/spec_helper.rb +14 -7
- metadata +68 -60
- data/.rspec +0 -1
- data/.yardopts +0 -6
- data/spec/software_dirs_spec.rb +0 -34
data/spec/build_version_spec.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright:: Copyright (c) 2012
|
2
|
+
# Copyright:: Copyright (c) 2012-2014 Chef Software, Inc.
|
3
3
|
# License:: Apache License, Version 2.0
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -20,246 +20,238 @@ require 'spec_helper'
|
|
20
20
|
|
21
21
|
describe Omnibus::BuildVersion do
|
22
22
|
|
23
|
-
let(:git_describe){
|
24
|
-
let(:valid_semver_regex){/^\d+\.\d+\.\d+(\-[\dA-Za-z\-\.]+)?(\+[\dA-Za-z\-\.]+)?$/}
|
25
|
-
let(:valid_git_describe_regex){/^\d+\.\d+\.\d+(\-[A-Za-z0-9\-\.]+)?(\-\d+\-g[0-9a-f]+)?$/}
|
23
|
+
let(:git_describe) { '11.0.0-alpha1-207-g694b062' }
|
24
|
+
let(:valid_semver_regex) { /^\d+\.\d+\.\d+(\-[\dA-Za-z\-\.]+)?(\+[\dA-Za-z\-\.]+)?$/ }
|
25
|
+
let(:valid_git_describe_regex) { /^\d+\.\d+\.\d+(\-[A-Za-z0-9\-\.]+)?(\-\d+\-g[0-9a-f]+)?$/ }
|
26
26
|
|
27
|
-
subject(:build_version){ Omnibus::BuildVersion.new }
|
27
|
+
subject(:build_version) { Omnibus::BuildVersion.new }
|
28
28
|
|
29
29
|
before :each do
|
30
30
|
ENV['BUILD_ID'] = nil
|
31
31
|
ENV['OMNIBUS_APPEND_TIMESTAMP'] = nil
|
32
32
|
Omnibus::BuildVersion.any_instance.stub(:shellout)
|
33
|
-
|
34
|
-
:stdout => git_describe,
|
35
|
-
:exitstatus => 0))
|
33
|
+
.and_return(double('ouput', stdout: git_describe, exitstatus: 0))
|
36
34
|
end
|
37
35
|
|
38
|
-
describe
|
36
|
+
describe 'git describe parsing' do
|
39
37
|
|
40
38
|
# we prefer our git tags to be SemVer compliant
|
41
39
|
|
42
40
|
# release version
|
43
|
-
context
|
44
|
-
let(:git_describe){
|
45
|
-
its(:version_tag){ should ==
|
46
|
-
its(:prerelease_tag){ should be_nil }
|
47
|
-
its(:git_sha_tag){ should be_nil }
|
48
|
-
its(:commits_since_tag){ should == 0 }
|
49
|
-
its(:development_version?){ should be_true }
|
50
|
-
its(:prerelease_version?){ should be_false }
|
41
|
+
context '11.0.1' do
|
42
|
+
let(:git_describe) { '11.0.1' }
|
43
|
+
its(:version_tag) { should == '11.0.1' }
|
44
|
+
its(:prerelease_tag) { should be_nil }
|
45
|
+
its(:git_sha_tag) { should be_nil }
|
46
|
+
its(:commits_since_tag) { should == 0 }
|
47
|
+
its(:development_version?) { should be_true }
|
48
|
+
its(:prerelease_version?) { should be_false }
|
51
49
|
end
|
52
50
|
|
53
51
|
# SemVer compliant prerelease version
|
54
|
-
context
|
55
|
-
let(:git_describe){
|
56
|
-
its(:version_tag){ should ==
|
57
|
-
its(:prerelease_tag){ should ==
|
58
|
-
its(:git_sha_tag){ should be_nil }
|
59
|
-
its(:commits_since_tag){ should == 0 }
|
60
|
-
its(:development_version?){ should be_false }
|
61
|
-
its(:prerelease_version?){ should be_true }
|
52
|
+
context '11.0.0-alpha.2' do
|
53
|
+
let(:git_describe) { '11.0.0-alpha.2' }
|
54
|
+
its(:version_tag) { should == '11.0.0' }
|
55
|
+
its(:prerelease_tag) { should == 'alpha.2' }
|
56
|
+
its(:git_sha_tag) { should be_nil }
|
57
|
+
its(:commits_since_tag) { should == 0 }
|
58
|
+
its(:development_version?) { should be_false }
|
59
|
+
its(:prerelease_version?) { should be_true }
|
62
60
|
end
|
63
61
|
|
64
62
|
# full git describe string
|
65
|
-
context
|
66
|
-
let(:git_describe){
|
67
|
-
its(:version_tag){ should ==
|
68
|
-
its(:prerelease_tag){ should ==
|
69
|
-
its(:git_sha_tag){ should ==
|
70
|
-
its(:commits_since_tag){ should == 59 }
|
71
|
-
its(:development_version?){ should be_false }
|
72
|
-
its(:prerelease_version?){ should be_true }
|
63
|
+
context '11.0.0-alpha.3-59-gf55b180' do
|
64
|
+
let(:git_describe) { '11.0.0-alpha.3-59-gf55b180' }
|
65
|
+
its(:version_tag) { should == '11.0.0' }
|
66
|
+
its(:prerelease_tag) { should == 'alpha.3' }
|
67
|
+
its(:git_sha_tag) { should == 'f55b180' }
|
68
|
+
its(:commits_since_tag) { should == 59 }
|
69
|
+
its(:development_version?) { should be_false }
|
70
|
+
its(:prerelease_version?) { should be_true }
|
73
71
|
end
|
74
72
|
|
75
73
|
# Degenerate git tag formats
|
76
74
|
|
77
75
|
# RubyGems compliant git tag
|
78
|
-
context
|
79
|
-
let(:git_describe){
|
80
|
-
its(:version_tag){ should ==
|
81
|
-
its(:prerelease_tag){ should ==
|
82
|
-
its(:git_sha_tag){ should be_nil }
|
83
|
-
its(:commits_since_tag){ should == 0 }
|
84
|
-
its(:development_version?){ should be_false }
|
85
|
-
its(:prerelease_version?){ should be_true }
|
76
|
+
context '10.16.0.rc.0' do
|
77
|
+
let(:git_describe) { '10.16.0.rc.0' }
|
78
|
+
its(:version_tag) { should == '10.16.0' }
|
79
|
+
its(:prerelease_tag) { should == 'rc.0' }
|
80
|
+
its(:git_sha_tag) { should be_nil }
|
81
|
+
its(:commits_since_tag) { should == 0 }
|
82
|
+
its(:development_version?) { should be_false }
|
83
|
+
its(:prerelease_version?) { should be_true }
|
86
84
|
end
|
87
85
|
|
88
86
|
# dash seperated prerelease
|
89
|
-
context
|
90
|
-
let(:git_describe){
|
91
|
-
its(:version_tag){ should ==
|
92
|
-
its(:prerelease_tag){ should ==
|
93
|
-
its(:git_sha_tag){ should be_nil }
|
94
|
-
its(:commits_since_tag){ should == 0 }
|
95
|
-
its(:development_version?){ should be_false }
|
96
|
-
its(:prerelease_version?){ should be_true }
|
87
|
+
context '11.0.0-alpha-2' do
|
88
|
+
let(:git_describe) { '11.0.0-alpha-2' }
|
89
|
+
its(:version_tag) { should == '11.0.0' }
|
90
|
+
its(:prerelease_tag) { should == 'alpha-2' }
|
91
|
+
its(:git_sha_tag) { should be_nil }
|
92
|
+
its(:commits_since_tag) { should == 0 }
|
93
|
+
its(:development_version?) { should be_false }
|
94
|
+
its(:prerelease_version?) { should be_true }
|
97
95
|
end
|
98
96
|
|
99
97
|
# dash seperated prerelease full git describe string
|
100
|
-
context
|
101
|
-
let(:git_describe){
|
102
|
-
its(:version_tag){ should ==
|
103
|
-
its(:prerelease_tag){ should ==
|
104
|
-
its(:git_sha_tag){ should ==
|
105
|
-
its(:commits_since_tag){ should == 59 }
|
106
|
-
its(:development_version?){ should be_false }
|
107
|
-
its(:prerelease_version?){ should be_true }
|
98
|
+
context '11.0.0-alpha-2-59-gf55b180' do
|
99
|
+
let(:git_describe) { '11.0.0-alpha-2-59-gf55b180' }
|
100
|
+
its(:version_tag) { should == '11.0.0' }
|
101
|
+
its(:prerelease_tag) { should == 'alpha-2' }
|
102
|
+
its(:git_sha_tag) { should == 'f55b180' }
|
103
|
+
its(:commits_since_tag) { should == 59 }
|
104
|
+
its(:development_version?) { should be_false }
|
105
|
+
its(:prerelease_version?) { should be_true }
|
108
106
|
end
|
109
107
|
|
110
108
|
# WTF git tag
|
111
|
-
context
|
112
|
-
let(:git_describe){
|
113
|
-
its(:version_tag){ should ==
|
114
|
-
its(:prerelease_tag){ should ==
|
115
|
-
its(:git_sha_tag){ should be_nil }
|
116
|
-
its(:commits_since_tag){ should == 0 }
|
117
|
-
its(:development_version?){ should be_false }
|
118
|
-
its(:prerelease_version?){ should be_true }
|
109
|
+
context '11.0.0-alpha2' do
|
110
|
+
let(:git_describe) { '11.0.0-alpha2' }
|
111
|
+
its(:version_tag) { should == '11.0.0' }
|
112
|
+
its(:prerelease_tag) { should == 'alpha2' }
|
113
|
+
its(:git_sha_tag) { should be_nil }
|
114
|
+
its(:commits_since_tag) { should == 0 }
|
115
|
+
its(:development_version?) { should be_false }
|
116
|
+
its(:prerelease_version?) { should be_true }
|
119
117
|
end
|
120
118
|
end
|
121
119
|
|
122
|
-
describe
|
123
|
-
let(:today_string){ Time.now.utc.strftime(
|
120
|
+
describe 'semver output' do
|
121
|
+
let(:today_string) { Time.now.utc.strftime('%Y%m%d') }
|
124
122
|
|
125
|
-
it
|
126
|
-
build_version.semver.
|
123
|
+
it 'generates a valid semver version' do
|
124
|
+
expect(build_version.semver).to match(valid_semver_regex)
|
127
125
|
end
|
128
126
|
|
129
127
|
it "generates a version matching format 'MAJOR.MINOR.PATCH-PRERELEASE+TIMESTAMP.git.COMMITS_SINCE.GIT_SHA'" do
|
130
|
-
build_version.semver.
|
128
|
+
expect(build_version.semver).to match(/11.0.0-alpha1\+#{today_string}[0-9]+.git.207.694b062/)
|
131
129
|
end
|
132
130
|
|
133
131
|
it "uses ENV['BUILD_ID'] to generate timestamp if set" do
|
134
|
-
ENV['BUILD_ID'] =
|
135
|
-
build_version.semver.
|
132
|
+
ENV['BUILD_ID'] = '2012-12-25_16-41-40'
|
133
|
+
expect(build_version.semver).to eq('11.0.0-alpha1+20121225164140.git.207.694b062')
|
136
134
|
end
|
137
135
|
|
138
136
|
it "fails on invalid ENV['BUILD_ID'] values" do
|
139
|
-
ENV['BUILD_ID'] =
|
137
|
+
ENV['BUILD_ID'] = 'AAAA'
|
140
138
|
expect { build_version.semver }.to raise_error(ArgumentError)
|
141
139
|
end
|
142
140
|
|
143
|
-
context
|
144
|
-
let(:git_describe){
|
141
|
+
context 'prerelease version with dashes' do
|
142
|
+
let(:git_describe) { '11.0.0-alpha-3-207-g694b062' }
|
145
143
|
|
146
|
-
it
|
147
|
-
build_version.semver.
|
144
|
+
it 'converts all dashes to dots' do
|
145
|
+
expect(build_version.semver).to match(/11.0.0-alpha.3\+#{today_string}[0-9]+.git.207.694b062/)
|
148
146
|
end
|
149
147
|
end
|
150
148
|
|
151
|
-
context
|
152
|
-
let(:git_describe){
|
149
|
+
context 'exact version' do
|
150
|
+
let(:git_describe) { '11.0.0-alpha2' }
|
153
151
|
|
154
|
-
it
|
155
|
-
build_version.semver.
|
152
|
+
it 'appends a timestamp with no git info' do
|
153
|
+
expect(build_version.semver).to match(/11.0.0-alpha2\+#{today_string}[0-9]+/)
|
156
154
|
end
|
157
155
|
end
|
158
156
|
|
159
|
-
describe
|
160
|
-
let(:git_describe){
|
157
|
+
describe 'appending a timestamp' do
|
158
|
+
let(:git_describe) { '11.0.0-alpha-3-207-g694b062' }
|
161
159
|
|
162
|
-
it
|
163
|
-
build_version.semver.
|
160
|
+
it 'appends a timestamp by default' do
|
161
|
+
expect(build_version.semver).to match(/11.0.0-alpha.3\+#{today_string}[0-9]+.git.207.694b062/)
|
164
162
|
end
|
165
163
|
|
166
164
|
describe "ENV['OMNIBUS_APPEND_TIMESTAMP'] is set" do
|
167
|
-
[
|
165
|
+
['true', 't', 'yes', 'y', 1].each do |truthy|
|
168
166
|
context "to #{truthy}" do
|
169
167
|
before { ENV['OMNIBUS_APPEND_TIMESTAMP'] = truthy.to_s }
|
170
|
-
it
|
171
|
-
build_version.semver.
|
168
|
+
it 'appends a timestamp' do
|
169
|
+
expect(build_version.semver).to match(/11.0.0-alpha.3\+#{today_string}[0-9]+.git.207.694b062/)
|
172
170
|
end
|
173
171
|
end
|
174
172
|
end
|
175
173
|
|
176
|
-
[
|
174
|
+
['false', 'f', 'no', 'n', 0].each do |falsey|
|
177
175
|
context "to #{falsey}" do
|
178
176
|
before { ENV['OMNIBUS_APPEND_TIMESTAMP'] = falsey.to_s }
|
179
|
-
it
|
180
|
-
build_version.semver.
|
177
|
+
it 'does not append a timestamp' do
|
178
|
+
expect(build_version.semver).to match(/11.0.0-alpha.3\+git.207.694b062/)
|
181
179
|
end
|
182
180
|
end
|
183
181
|
end
|
184
182
|
end
|
185
183
|
|
186
|
-
describe
|
187
|
-
context
|
184
|
+
describe 'Omnibus::Config.append_timestamp is set' do
|
185
|
+
context 'is true' do
|
188
186
|
before { Omnibus::Config.append_timestamp(true) }
|
189
|
-
it
|
190
|
-
build_version.semver.
|
187
|
+
it 'appends a timestamp' do
|
188
|
+
expect(build_version.semver).to match(/11.0.0-alpha.3\+#{today_string}[0-9]+.git.207.694b062/)
|
191
189
|
end
|
192
190
|
end
|
193
191
|
|
194
|
-
context
|
192
|
+
context 'is false' do
|
195
193
|
before { Omnibus::Config.append_timestamp(false) }
|
196
|
-
it
|
197
|
-
build_version.semver.
|
194
|
+
it 'does not append a timestamp' do
|
195
|
+
expect(build_version.semver).to match(/11.0.0-alpha.3\+git.207.694b062/)
|
198
196
|
end
|
199
197
|
end
|
200
198
|
end
|
201
199
|
|
202
|
-
describe
|
200
|
+
describe 'both are set' do
|
203
201
|
before do
|
204
|
-
ENV['OMNIBUS_APPEND_TIMESTAMP'] =
|
202
|
+
ENV['OMNIBUS_APPEND_TIMESTAMP'] = 'false'
|
205
203
|
Omnibus::Config.append_timestamp(true)
|
206
204
|
end
|
207
205
|
it "prefers the value from ENV['OMNIBUS_APPEND_TIMESTAMP']" do
|
208
|
-
build_version.semver.
|
206
|
+
expect(build_version.semver).to match(/11.0.0-alpha.3\+git.207.694b062/)
|
209
207
|
end
|
210
208
|
end
|
211
209
|
end
|
212
210
|
end
|
213
211
|
|
214
|
-
describe
|
215
|
-
it
|
216
|
-
build_version.git_describe.
|
212
|
+
describe 'git describe output' do
|
213
|
+
it 'generates a valid git describe version' do
|
214
|
+
expect(build_version.git_describe).to match(valid_git_describe_regex)
|
217
215
|
end
|
218
216
|
|
219
217
|
it "generates a version matching format 'MAJOR.MINOR.PATCH-PRELEASE.COMMITS_SINCE-gGIT_SHA'" do
|
220
|
-
build_version.git_describe.
|
218
|
+
expect(build_version.git_describe).to eq(git_describe)
|
221
219
|
end
|
222
220
|
end
|
223
221
|
|
224
|
-
describe
|
225
|
-
it
|
226
|
-
Omnibus::BuildVersion.full.
|
222
|
+
describe 'deprecated full output' do
|
223
|
+
it 'generates a valid git describe version' do
|
224
|
+
expect(Omnibus::BuildVersion.full).to match(valid_git_describe_regex)
|
227
225
|
end
|
228
226
|
|
229
|
-
it
|
230
|
-
Omnibus::BuildVersion.
|
227
|
+
it 'outputs a deprecation message' do
|
228
|
+
expect(Omnibus::BuildVersion).to receive(:puts).with(/is deprecated/)
|
231
229
|
Omnibus::BuildVersion.full
|
232
230
|
end
|
233
231
|
end
|
234
232
|
|
235
|
-
describe
|
233
|
+
describe '`git describe` command failure' do
|
236
234
|
before do
|
237
|
-
stderr
|
235
|
+
stderr = <<-STDERR
|
238
236
|
fatal: No tags can describe '809ea1afcce67e1148c1bf0822d40a7ef12c380e'.
|
239
237
|
Try --always, or create some tags.
|
240
238
|
STDERR
|
241
239
|
build_version.stub(:shellout)
|
242
|
-
|
243
|
-
:stderr => stderr,
|
244
|
-
:exitstatus => 128))
|
240
|
+
.and_return(double('ouput', stderr: stderr, exitstatus: 128))
|
245
241
|
end
|
246
|
-
it
|
247
|
-
build_version.git_describe.
|
242
|
+
it 'sets the version to 0.0.0' do
|
243
|
+
expect(build_version.git_describe).to eq('0.0.0')
|
248
244
|
end
|
249
245
|
end
|
250
246
|
|
251
|
-
describe
|
252
|
-
let(:path) {
|
253
|
-
subject(:build_version){ Omnibus::BuildVersion.new(path) }
|
254
|
-
|
255
|
-
it
|
256
|
-
build_version.
|
257
|
-
|
258
|
-
|
259
|
-
:cwd => path})
|
260
|
-
.and_return(double("ouput",
|
261
|
-
:stdout => git_describe,
|
262
|
-
:exitstatus => 0))
|
247
|
+
describe '#initialize `path` parameter' do
|
248
|
+
let(:path) { '/some/fake/path' }
|
249
|
+
subject(:build_version) { Omnibus::BuildVersion.new(path) }
|
250
|
+
|
251
|
+
it 'runs `git describe` at an alternate path' do
|
252
|
+
expect(build_version).to receive(:shellout)
|
253
|
+
.with('git describe', live_stream: nil, cwd: path)
|
254
|
+
.and_return(double('ouput', stdout: git_describe, exitstatus: 0))
|
263
255
|
build_version.git_describe
|
264
256
|
end
|
265
257
|
end
|
data/spec/config_spec.rb
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Omnibus
|
4
|
+
describe Config do
|
5
|
+
it 'extends Mixlib::Config' do
|
6
|
+
expect(described_class).to be_a(Mixlib::Config)
|
7
|
+
end
|
8
|
+
|
9
|
+
before { described_class.reset }
|
10
|
+
|
11
|
+
shared_examples 'a configurable' do |id, default|
|
12
|
+
it "responds to .#{id}" do
|
13
|
+
expect(described_class).to have_method_defined(id)
|
14
|
+
end
|
15
|
+
|
16
|
+
it ".#{id} defaults to #{default.inspect}" do
|
17
|
+
expect(described_class.send(id)).to eq(default)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
include_examples 'a configurable', :cache_dir, '/var/cache/omnibus/cache'
|
22
|
+
include_examples 'a configurable', :source_dir, '/var/cache/omnibus/src'
|
23
|
+
include_examples 'a configurable', :build_dir, '/var/cache/omnibus/build'
|
24
|
+
include_examples 'a configurable', :package_dir, '/var/cache/omnibus/pkg'
|
25
|
+
include_examples 'a configurable', :package_tmp, '/var/cache/omnibus/pkg-tmp'
|
26
|
+
include_examples 'a configurable', :project_root, Dir.pwd
|
27
|
+
include_examples 'a configurable', :install_dir, '/opt/chef'
|
28
|
+
include_examples 'a configurable', :use_s3_caching, false
|
29
|
+
include_examples 'a configurable', :s3_bucket, nil
|
30
|
+
include_examples 'a configurable', :s3_access_key, nil
|
31
|
+
include_examples 'a configurable', :release_s3_bucket, nil
|
32
|
+
include_examples 'a configurable', :release_s3_access_key, nil
|
33
|
+
include_examples 'a configurable', :release_s3_secret_key, nil
|
34
|
+
include_examples 'a configurable', :override_file, nil
|
35
|
+
include_examples 'a configurable', :software_gem, 'omnibus-software'
|
36
|
+
include_examples 'a configurable', :solaris_compiler, nil
|
37
|
+
include_examples 'a configurable', :append_timestamp, true
|
38
|
+
include_examples 'a configurable', :build_retries, 3
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
#
|
2
|
+
# Copyright:: Copyright (c) 2012-2014 Chef Software, 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
|
+
name 'chefdk'
|
19
|
+
maintainer 'Chef Software, Inc.'
|
20
|
+
homepage 'http://www.getchef.com'
|
21
|
+
|
22
|
+
install_path '/opt/chefdk'
|
23
|
+
build_version Omnibus::BuildVersion.full
|
24
|
+
build_iteration 4
|
25
|
+
|
26
|
+
override :berkshelf, version: '3.0.0.beta6'
|
27
|
+
override :bundler, version: '1.5.2'
|
28
|
+
override :libedit, version: '20130712-3.1'
|
29
|
+
override :libtool, version: '2.4.2'
|
30
|
+
override :libxml2, version: '2.9.1'
|
31
|
+
override :libxslt, version: '1.1.28'
|
32
|
+
override :nokogiri, version: '1.6.1'
|
33
|
+
override :ruby, version: '2.1.0'
|
34
|
+
override :rubygems, version: '2.2.1'
|
35
|
+
override :yajl, version: '1.2.0'
|
36
|
+
override :zlib, version: '1.2.8'
|
37
|
+
|
38
|
+
dependency 'preparation'
|
39
|
+
dependency 'chefdk'
|
40
|
+
dependency 'ohai'
|
41
|
+
dependency 'version-manifest'
|
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright:: Copyright (c) 2012
|
2
|
+
# Copyright:: Copyright (c) 2012-2014 Chef Software, Inc.
|
3
3
|
# License:: Apache License, Version 2.0
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -15,25 +15,25 @@
|
|
15
15
|
# limitations under the License.
|
16
16
|
#
|
17
17
|
|
18
|
-
name
|
19
|
-
version
|
18
|
+
name 'erchef'
|
19
|
+
version '4b19a96d57bff9bbf4764d7323b92a0944009b9e'
|
20
20
|
|
21
|
-
dependencies
|
21
|
+
dependencies %w(erlang rsync curl)
|
22
22
|
|
23
|
-
source :
|
23
|
+
source git: 'git://github.com/opscode/erchef'
|
24
24
|
|
25
|
-
relative_path
|
25
|
+
relative_path 'erchef'
|
26
26
|
|
27
27
|
env = {
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
28
|
+
'PATH' => "#{install_dir}/embedded/bin:#{ENV["PATH"]}",
|
29
|
+
'LDFLAGS' => "-L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include",
|
30
|
+
'CFLAGS' => "-L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include",
|
31
|
+
'LD_RUN_PATH' => "#{install_dir}/embedded/lib",
|
32
32
|
}
|
33
33
|
|
34
34
|
build do
|
35
|
-
command
|
36
|
-
command
|
35
|
+
command 'make distclean', env: env
|
36
|
+
command 'make rel', env: env
|
37
37
|
command "mkdir -p #{install_dir}/embedded/service/erchef"
|
38
38
|
command "#{install_dir}/embedded/bin/rsync -a --delete --exclude=.git/*** --exclude=.gitignore ./rel/erchef/ #{install_dir}/embedded/service/erchef/"
|
39
39
|
command "rm -rf #{install_dir}/embedded/service/erchef/log"
|
@@ -0,0 +1,67 @@
|
|
1
|
+
#
|
2
|
+
# Copyright:: Copyright (c) 2012-2014 Chef Software, 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
|
+
name 'zlib'
|
19
|
+
default_version '1.2.6'
|
20
|
+
|
21
|
+
dependency 'libgcc'
|
22
|
+
|
23
|
+
version '1.2.6' do
|
24
|
+
source md5: '618e944d7c7cd6521551e30b32322f4a'
|
25
|
+
end
|
26
|
+
|
27
|
+
version '1.2.8' do
|
28
|
+
source md5: '44d667c142d7cda120332623eab69f40'
|
29
|
+
end
|
30
|
+
|
31
|
+
source url: "http://downloads.sourceforge.net/project/libpng/zlib/#{version}/zlib-#{version}.tar.gz"
|
32
|
+
|
33
|
+
relative_path "zlib-#{version}"
|
34
|
+
configure_env =
|
35
|
+
case platform
|
36
|
+
when 'aix'
|
37
|
+
{
|
38
|
+
'CC' => 'xlc -q64',
|
39
|
+
'CXX' => 'xlC -q64',
|
40
|
+
'LD' => 'ld -b64',
|
41
|
+
'CFLAGS' => "-q64 -I#{install_dir}/embedded/include -O",
|
42
|
+
'OBJECT_MODE' => '64',
|
43
|
+
'ARFLAGS' => '-X64 cru',
|
44
|
+
'LDFLAGS' => "-q64 -L#{install_dir}/embedded/lib -Wl,-blibpath:#{install_dir}/embedded/lib:/usr/lib:/lib",
|
45
|
+
}
|
46
|
+
when 'mac_os_x'
|
47
|
+
{
|
48
|
+
'LDFLAGS' => "-R#{install_dir}/embedded/lib -L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include",
|
49
|
+
'CFLAGS' => "-I#{install_dir}/embedded/include -L#{install_dir}/embedded/lib",
|
50
|
+
}
|
51
|
+
when 'solaris2'
|
52
|
+
{
|
53
|
+
'LDFLAGS' => "-R#{install_dir}/embedded/lib -L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include -static-libgcc",
|
54
|
+
'CFLAGS' => "-L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include -DNO_VIZ",
|
55
|
+
}
|
56
|
+
else
|
57
|
+
{
|
58
|
+
'LDFLAGS' => "-Wl,-rpath #{install_dir}/embedded/lib -L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include",
|
59
|
+
'CFLAGS' => "-I#{install_dir}/embedded/include -L#{install_dir}/embedded/lib",
|
60
|
+
}
|
61
|
+
end
|
62
|
+
|
63
|
+
build do
|
64
|
+
command "./configure --prefix=#{install_dir}/embedded", env: configure_env
|
65
|
+
command "make -j #{max_build_jobs}"
|
66
|
+
command "make -j #{max_build_jobs} install"
|
67
|
+
end
|