omnibus 6.0.30 → 7.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -1
  3. data/README.md +24 -8
  4. data/Rakefile +1 -1
  5. data/lib/omnibus/build_version_dsl.rb +1 -0
  6. data/lib/omnibus/builder.rb +6 -5
  7. data/lib/omnibus/changelog_printer.rb +7 -4
  8. data/lib/omnibus/cleaner.rb +3 -0
  9. data/lib/omnibus/cli.rb +1 -1
  10. data/lib/omnibus/cli/changelog.rb +24 -24
  11. data/lib/omnibus/cli/publish.rb +5 -5
  12. data/lib/omnibus/compressor.rb +2 -2
  13. data/lib/omnibus/compressors/base.rb +1 -1
  14. data/lib/omnibus/compressors/dmg.rb +45 -7
  15. data/lib/omnibus/config.rb +12 -2
  16. data/lib/omnibus/fetchers/git_fetcher.rb +1 -0
  17. data/lib/omnibus/fetchers/net_fetcher.rb +2 -3
  18. data/lib/omnibus/file_syncer.rb +2 -2
  19. data/lib/omnibus/generator_files/README.md.erb +18 -15
  20. data/lib/omnibus/generator_files/config/software/preparation.rb.erb +1 -1
  21. data/lib/omnibus/generator_files/omnibus.rb.erb +5 -4
  22. data/lib/omnibus/health_check.rb +1 -1
  23. data/lib/omnibus/licensing.rb +3 -4
  24. data/lib/omnibus/logger.rb +2 -1
  25. data/lib/omnibus/manifest.rb +1 -1
  26. data/lib/omnibus/metadata.rb +2 -2
  27. data/lib/omnibus/packagers/appx.rb +1 -2
  28. data/lib/omnibus/packagers/base.rb +1 -0
  29. data/lib/omnibus/packagers/bff.rb +6 -8
  30. data/lib/omnibus/packagers/deb.rb +7 -10
  31. data/lib/omnibus/packagers/ips.rb +3 -6
  32. data/lib/omnibus/packagers/makeself.rb +1 -2
  33. data/lib/omnibus/packagers/msi.rb +12 -11
  34. data/lib/omnibus/packagers/pkg.rb +125 -9
  35. data/lib/omnibus/packagers/rpm.rb +11 -12
  36. data/lib/omnibus/packagers/solaris.rb +4 -4
  37. data/lib/omnibus/packagers/windows_base.rb +7 -6
  38. data/lib/omnibus/project.rb +1 -0
  39. data/lib/omnibus/publisher.rb +14 -12
  40. data/lib/omnibus/publishers/s3_publisher.rb +6 -4
  41. data/lib/omnibus/s3_cache.rb +3 -1
  42. data/lib/omnibus/s3_helpers.rb +6 -6
  43. data/lib/omnibus/software.rb +66 -30
  44. data/lib/omnibus/templating.rb +1 -1
  45. data/lib/omnibus/util.rb +3 -2
  46. data/lib/omnibus/version.rb +1 -1
  47. data/lib/omnibus/whitelist.rb +6 -1
  48. data/omnibus.gemspec +6 -6
  49. data/resources/rpm/signing.erb +7 -10
  50. data/spec/functional/builder_spec.rb +2 -1
  51. data/spec/functional/fetchers/file_fetcher_spec.rb +4 -4
  52. data/spec/functional/fetchers/git_fetcher_spec.rb +4 -4
  53. data/spec/functional/fetchers/net_fetcher_spec.rb +5 -6
  54. data/spec/functional/fetchers/path_fetcher_spec.rb +4 -4
  55. data/spec/functional/file_syncer_spec.rb +42 -0
  56. data/spec/functional/licensing_spec.rb +5 -5
  57. data/spec/support/examples.rb +3 -4
  58. data/spec/unit/builder_spec.rb +9 -9
  59. data/spec/unit/changelogprinter_spec.rb +8 -6
  60. data/spec/unit/compressor_spec.rb +3 -3
  61. data/spec/unit/compressors/dmg_spec.rb +43 -4
  62. data/spec/unit/fetchers/net_fetcher_spec.rb +16 -17
  63. data/spec/unit/health_check_spec.rb +2 -6
  64. data/spec/unit/library_spec.rb +2 -1
  65. data/spec/unit/manifest_diff_spec.rb +2 -2
  66. data/spec/unit/manifest_spec.rb +1 -1
  67. data/spec/unit/metadata_spec.rb +9 -11
  68. data/spec/unit/omnibus_spec.rb +1 -1
  69. data/spec/unit/packagers/bff_spec.rb +2 -2
  70. data/spec/unit/packagers/msi_spec.rb +2 -2
  71. data/spec/unit/packagers/pkg_spec.rb +354 -0
  72. data/spec/unit/packagers/pkgsrc_spec.rb +1 -1
  73. data/spec/unit/packagers/solaris_spec.rb +7 -7
  74. data/spec/unit/project_spec.rb +2 -2
  75. data/spec/unit/publisher_spec.rb +8 -9
  76. data/spec/unit/publishers/artifactory_publisher_spec.rb +2 -4
  77. data/spec/unit/publishers/s3_publisher_spec.rb +2 -4
  78. data/spec/unit/s3_cacher_spec.rb +19 -6
  79. data/spec/unit/s3_helpers_spec.rb +22 -3
  80. data/spec/unit/software_spec.rb +72 -42
  81. data/spec/unit/util_spec.rb +1 -2
  82. metadata +17 -11
@@ -10,8 +10,7 @@ module Omnibus
10
10
  path: "/path/to/files/chef.deb",
11
11
  name: "chef.deb",
12
12
  content: "BINARY",
13
- validate!: true
14
- )
13
+ validate!: true)
15
14
  end
16
15
 
17
16
  let(:metadata) do
@@ -90,8 +89,7 @@ module Omnibus
90
89
  license: "Apache-2.0",
91
90
  },
92
91
  },
93
- }
94
- )
92
+ })
95
93
  end
96
94
 
97
95
  let(:packages) { [package] }
@@ -9,8 +9,7 @@ module Omnibus
9
9
  path: "/path/to/files/chef.deb",
10
10
  name: "chef.deb",
11
11
  content: "BINARY",
12
- validate!: true
13
- )
12
+ validate!: true)
14
13
  end
15
14
 
16
15
  let(:metadata) do
@@ -24,8 +23,7 @@ module Omnibus
24
23
  platform_version: "14.04",
25
24
  arch: "x86_64",
26
25
  sha1: "SHA1",
27
- md5: "ABCDEF123456"
28
- )
26
+ md5: "ABCDEF123456")
29
27
  end
30
28
 
31
29
  let(:packages) { [package] }
@@ -7,9 +7,7 @@ module Omnibus
7
7
  name: "ruby",
8
8
  version: "1.9.3",
9
9
  fetcher: double(Fetcher,
10
- checksum: "abcd1234"
11
- )
12
- )
10
+ checksum: "abcd1234"))
13
11
  end
14
12
 
15
13
  let(:python_27) do
@@ -17,9 +15,7 @@ module Omnibus
17
15
  name: "python",
18
16
  version: "2.7",
19
17
  fetcher: double(Fetcher,
20
- checksum: "defg5678"
21
- )
22
- )
18
+ checksum: "defg5678"))
23
19
  end
24
20
 
25
21
  describe ".list" do
@@ -113,10 +109,12 @@ module Omnibus
113
109
  let (:s3_access_key) { nil }
114
110
  let (:s3_secret_key) { nil }
115
111
  let (:s3_profile) { nil }
112
+ let (:s3_iam_role_arn) { nil }
116
113
 
117
114
  before do
118
115
  Config.s3_bucket s3_bucket
119
116
  Config.s3_region s3_region
117
+ Config.s3_iam_role_arn s3_iam_role_arn
120
118
  Config.s3_profile s3_profile
121
119
  Config.s3_access_key s3_access_key
122
120
  Config.s3_secret_key s3_secret_key
@@ -152,6 +150,21 @@ module Omnibus
152
150
  expect(config[:secret_access_key]).to eq(nil)
153
151
  end
154
152
  end
153
+
154
+ context "s3_iam_role_arn is configured" do
155
+ let(:s3_iam_role_arn) { "S3_IAM_ROLE_ARN" }
156
+ let(:s3_profile) { "SHAREDPROFILE" }
157
+ let(:s3_access_key) { "ACCESS_KEY_ID" }
158
+ let(:s3_secret_key) { "SECRET_ACCESS_KEY" }
159
+
160
+ it "sets s3_iam_role_arn only" do
161
+ config = S3Cache.send(:s3_configuration)
162
+ expect(config[:iam_role_arn]).to eq(s3_iam_role_arn)
163
+ expect(config[:profile]).to eq(nil)
164
+ expect(config[:access_key_id]).to eq(nil)
165
+ expect(config[:secret_access_key]).to eq(nil)
166
+ end
167
+ end
155
168
  end
156
169
  end
157
170
  end
@@ -9,12 +9,12 @@ module Omnibus
9
9
  describe "#client" do
10
10
  it "raises an error if it is not overridden" do
11
11
  expect { s3_configuration }.to raise_error(RuntimeError,
12
- "You must override s3_configuration")
12
+ "You must override s3_configuration")
13
13
  end
14
14
 
15
15
  it "raises an error stating that s3_configuration must be overriden" do
16
16
  expect { client }.to raise_error(RuntimeError,
17
- "You must override s3_configuration")
17
+ "You must override s3_configuration")
18
18
  end
19
19
  end
20
20
  end
@@ -40,6 +40,8 @@ module Omnibus
40
40
  let(:instance) { klass.new }
41
41
  let(:key_pair) { { access_key_id: "key_id", secret_access_key: "access_key" } }
42
42
  let(:profile) { "my-profile" }
43
+ let(:iam_role_arn) { "my-iam-role-arn" }
44
+ let(:role_session_name) { "omnibus-assume-role-s3-access" }
43
45
  let(:config) { { bucket_name: "foo", region: "us-east-1" } }
44
46
 
45
47
  it "uses configured key pairs" do
@@ -52,19 +54,36 @@ module Omnibus
52
54
  instance.send(:get_credentials)
53
55
  end
54
56
 
55
- it "preferrs shared credentials profiles over key pairs" do
57
+ it "prefers shared credentials profiles over key pairs" do
56
58
  allow_any_instance_of(klass).to receive(:s3_configuration).and_return(
57
59
  {
58
60
  **config,
59
61
  **key_pair,
62
+ iam_role_arn: nil,
60
63
  profile: profile,
61
64
  }
62
65
  )
63
66
  expect(Aws::Credentials).to_not receive(:new)
67
+ expect(Aws::AssumeRoleCredentials).to_not receive(:new)
64
68
  allow(Aws::SharedCredentials).to receive(:new).with(profile_name: profile)
65
69
  instance.send(:get_credentials)
66
70
  end
67
71
 
72
+ it "prefers AWS IAM role arn over profiles and key pairs" do
73
+ allow_any_instance_of(klass).to receive(:s3_configuration).and_return(
74
+ {
75
+ **config,
76
+ **key_pair,
77
+ profile: profile,
78
+ iam_role_arn: iam_role_arn,
79
+ }
80
+ )
81
+ expect(Aws::Credentials).to_not receive(:new)
82
+ expect(Aws::SharedCredentials).to_not receive(:new)
83
+ allow(Aws::AssumeRoleCredentials).to receive(:new).with(role_arn: iam_role_arn, role_session_name: role_session_name)
84
+ instance.send(:get_credentials)
85
+ end
86
+
68
87
  end
69
88
  end
70
89
  end
@@ -73,9 +73,9 @@ module Omnibus
73
73
  it "sets the defaults" do
74
74
  expect(subject.with_standard_compiler_flags).to eq(
75
75
  "LDFLAGS" => "-Wl,-rpath,/opt/project/embedded/lib -L/opt/project/embedded/lib",
76
- "CFLAGS" => "-I/opt/project/embedded/include -O2",
77
- "CXXFLAGS" => "-I/opt/project/embedded/include -O2",
78
- "CPPFLAGS" => "-I/opt/project/embedded/include -O2",
76
+ "CFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
77
+ "CXXFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
78
+ "CPPFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
79
79
  "LD_RUN_PATH" => "/opt/project/embedded/lib",
80
80
  "PKG_CONFIG_PATH" => "/opt/project/embedded/lib/pkgconfig",
81
81
  "OMNIBUS_INSTALL_DIR" => "/opt/project"
@@ -84,9 +84,9 @@ module Omnibus
84
84
  it "overrides LDFLAGS" do
85
85
  expect(subject.with_standard_compiler_flags("LDFLAGS" => "foo")).to eq(
86
86
  "LDFLAGS" => "-Wl,-rpath,/opt/project/embedded/lib -L/opt/project/embedded/lib",
87
- "CFLAGS" => "-I/opt/project/embedded/include -O2",
88
- "CXXFLAGS" => "-I/opt/project/embedded/include -O2",
89
- "CPPFLAGS" => "-I/opt/project/embedded/include -O2",
87
+ "CFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
88
+ "CXXFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
89
+ "CPPFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
90
90
  "LD_RUN_PATH" => "/opt/project/embedded/lib",
91
91
  "PKG_CONFIG_PATH" => "/opt/project/embedded/lib/pkgconfig",
92
92
  "OMNIBUS_INSTALL_DIR" => "/opt/project"
@@ -95,9 +95,9 @@ module Omnibus
95
95
  it "overrides CFLAGS" do
96
96
  expect(subject.with_standard_compiler_flags("CFLAGS" => "foo")).to eq(
97
97
  "LDFLAGS" => "-Wl,-rpath,/opt/project/embedded/lib -L/opt/project/embedded/lib",
98
- "CFLAGS" => "-I/opt/project/embedded/include -O2",
99
- "CXXFLAGS" => "-I/opt/project/embedded/include -O2",
100
- "CPPFLAGS" => "-I/opt/project/embedded/include -O2",
98
+ "CFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
99
+ "CXXFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
100
+ "CPPFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
101
101
  "LD_RUN_PATH" => "/opt/project/embedded/lib",
102
102
  "PKG_CONFIG_PATH" => "/opt/project/embedded/lib/pkgconfig",
103
103
  "OMNIBUS_INSTALL_DIR" => "/opt/project"
@@ -106,9 +106,9 @@ module Omnibus
106
106
  it "overrides CXXFLAGS" do
107
107
  expect(subject.with_standard_compiler_flags("CXXFLAGS" => "foo")).to eq(
108
108
  "LDFLAGS" => "-Wl,-rpath,/opt/project/embedded/lib -L/opt/project/embedded/lib",
109
- "CFLAGS" => "-I/opt/project/embedded/include -O2",
110
- "CXXFLAGS" => "-I/opt/project/embedded/include -O2",
111
- "CPPFLAGS" => "-I/opt/project/embedded/include -O2",
109
+ "CFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
110
+ "CXXFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
111
+ "CPPFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
112
112
  "LD_RUN_PATH" => "/opt/project/embedded/lib",
113
113
  "PKG_CONFIG_PATH" => "/opt/project/embedded/lib/pkgconfig",
114
114
  "OMNIBUS_INSTALL_DIR" => "/opt/project"
@@ -117,9 +117,9 @@ module Omnibus
117
117
  it "overrides CPPFLAGS" do
118
118
  expect(subject.with_standard_compiler_flags("CPPFLAGS" => "foo")).to eq(
119
119
  "LDFLAGS" => "-Wl,-rpath,/opt/project/embedded/lib -L/opt/project/embedded/lib",
120
- "CFLAGS" => "-I/opt/project/embedded/include -O2",
121
- "CXXFLAGS" => "-I/opt/project/embedded/include -O2",
122
- "CPPFLAGS" => "-I/opt/project/embedded/include -O2",
120
+ "CFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
121
+ "CXXFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
122
+ "CPPFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
123
123
  "LD_RUN_PATH" => "/opt/project/embedded/lib",
124
124
  "PKG_CONFIG_PATH" => "/opt/project/embedded/lib/pkgconfig",
125
125
  "OMNIBUS_INSTALL_DIR" => "/opt/project"
@@ -129,9 +129,9 @@ module Omnibus
129
129
  expect(subject.with_standard_compiler_flags("numberwang" => 4)).to eq(
130
130
  "numberwang" => 4,
131
131
  "LDFLAGS" => "-Wl,-rpath,/opt/project/embedded/lib -L/opt/project/embedded/lib",
132
- "CFLAGS" => "-I/opt/project/embedded/include -O2",
133
- "CXXFLAGS" => "-I/opt/project/embedded/include -O2",
134
- "CPPFLAGS" => "-I/opt/project/embedded/include -O2",
132
+ "CFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
133
+ "CXXFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
134
+ "CPPFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
135
135
  "LD_RUN_PATH" => "/opt/project/embedded/lib",
136
136
  "PKG_CONFIG_PATH" => "/opt/project/embedded/lib/pkgconfig",
137
137
  "OMNIBUS_INSTALL_DIR" => "/opt/project"
@@ -196,9 +196,9 @@ module Omnibus
196
196
  it "sets the defaults" do
197
197
  expect(subject.with_standard_compiler_flags).to eq(
198
198
  "LDFLAGS" => "-Wl,-rpath,/opt/project/embedded/lib -L/opt/project/embedded/lib",
199
- "CFLAGS" => "-I/opt/project/embedded/include -O2",
200
- "CXXFLAGS" => "-I/opt/project/embedded/include -O2",
201
- "CPPFLAGS" => "-I/opt/project/embedded/include -O2",
199
+ "CFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
200
+ "CXXFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
201
+ "CPPFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
202
202
  "LD_RUN_PATH" => "/opt/project/embedded/lib",
203
203
  "PKG_CONFIG_PATH" => "/opt/project/embedded/lib/pkgconfig",
204
204
  "OMNIBUS_INSTALL_DIR" => "/opt/project"
@@ -240,9 +240,9 @@ module Omnibus
240
240
  it "sets the defaults" do
241
241
  expect(subject.with_standard_compiler_flags).to eq(
242
242
  "CC" => "clang",
243
- "CFLAGS" => "-I/opt/project/embedded/include -O2",
244
- "CXXFLAGS" => "-I/opt/project/embedded/include -O2",
245
- "CPPFLAGS" => "-I/opt/project/embedded/include -O2",
243
+ "CFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
244
+ "CXXFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
245
+ "CPPFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
246
246
  "CXX" => "clang++",
247
247
  "LDFLAGS" => "-L/opt/project/embedded/lib",
248
248
  "LD_RUN_PATH" => "/opt/project/embedded/lib",
@@ -267,9 +267,9 @@ module Omnibus
267
267
  expect(subject.with_standard_compiler_flags).to eq(
268
268
  "CC" => "clang",
269
269
  "CXX" => "clang++",
270
- "CFLAGS" => "-I/opt/project/embedded/include -O2",
271
- "CXXFLAGS" => "-I/opt/project/embedded/include -O2",
272
- "CPPFLAGS" => "-I/opt/project/embedded/include -O2",
270
+ "CFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
271
+ "CXXFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
272
+ "CPPFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
273
273
  "LDFLAGS" => "-L/opt/project/embedded/lib",
274
274
  "LD_RUN_PATH" => "/opt/project/embedded/lib",
275
275
  "PKG_CONFIG_PATH" => "/opt/project/embedded/lib/pkgconfig",
@@ -286,13 +286,13 @@ module Omnibus
286
286
  end
287
287
  it "sets the defaults" do
288
288
  expect(subject.with_standard_compiler_flags).to eq(
289
- "LDFLAGS" => "-Wl,-rpath,/opt/project/embedded/lib -L/opt/project/embedded/lib",
290
- "CFLAGS" => "-I/opt/project/embedded/include -O2",
291
- "CXXFLAGS" => "-I/opt/project/embedded/include -O2",
292
- "CPPFLAGS" => "-I/opt/project/embedded/include -O2",
293
- "LD_RUN_PATH" => "/opt/project/embedded/lib",
294
- "PKG_CONFIG_PATH" => "/opt/project/embedded/lib/pkgconfig",
295
- "OMNIBUS_INSTALL_DIR" => "/opt/project"
289
+ "LDFLAGS" => "-Wl,-rpath,/opt/project/embedded/lib -L/opt/project/embedded/lib",
290
+ "CFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
291
+ "CXXFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
292
+ "CPPFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
293
+ "LD_RUN_PATH" => "/opt/project/embedded/lib",
294
+ "PKG_CONFIG_PATH" => "/opt/project/embedded/lib/pkgconfig",
295
+ "OMNIBUS_INSTALL_DIR" => "/opt/project"
296
296
  )
297
297
  end
298
298
 
@@ -307,13 +307,13 @@ module Omnibus
307
307
  "CC" => "gcc-4.8",
308
308
  "CXX" => "g++-4.8",
309
309
  "LDFLAGS" => "-Wl,-rpath,/opt/project/embedded/lib -L/opt/project/embedded/lib",
310
- "CFLAGS" => "-I/opt/project/embedded/include -O2",
311
- "CXXFLAGS" => "-I/opt/project/embedded/include -O2",
312
- "CPPFLAGS" => "-I/opt/project/embedded/include -O2",
310
+ "CFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
311
+ "CXXFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
312
+ "CPPFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
313
313
  "LD_RUN_PATH" => "/opt/project/embedded/lib",
314
314
  "PKG_CONFIG_PATH" => "/opt/project/embedded/lib/pkgconfig",
315
315
  "OMNIBUS_INSTALL_DIR" => "/opt/project"
316
- )
316
+ )
317
317
  end
318
318
  end
319
319
  end
@@ -328,9 +328,9 @@ module Omnibus
328
328
  it "sets the defaults" do
329
329
  expect(subject.with_standard_compiler_flags).to eq(
330
330
  "LDFLAGS" => "-Wl,-rpath,/opt/project/embedded/lib -L/opt/project/embedded/lib",
331
- "CFLAGS" => "-I/opt/project/embedded/include -O2",
332
- "CXXFLAGS" => "-I/opt/project/embedded/include -O2",
333
- "CPPFLAGS" => "-I/opt/project/embedded/include -O2",
331
+ "CFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
332
+ "CXXFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
333
+ "CPPFLAGS" => "-I/opt/project/embedded/include -O2 -D_FORTIFY_SOURCE=2 -fstack-protector",
334
334
  "LD_RUN_PATH" => "/opt/project/embedded/lib",
335
335
  "PKG_CONFIG_PATH" => "/opt/project/embedded/lib/pkgconfig",
336
336
  "OMNIBUS_INSTALL_DIR" => "/opt/project"
@@ -547,7 +547,7 @@ module Omnibus
547
547
  describe "#whitelist_file" do
548
548
  it "appends to the whitelist_files array" do
549
549
  expect(subject.whitelist_files.size).to eq(0)
550
- subject.whitelist_file(/foo\/bar/)
550
+ subject.whitelist_file(%r{foo/bar})
551
551
  expect(subject.whitelist_files.size).to eq(1)
552
552
  end
553
553
 
@@ -558,6 +558,36 @@ module Omnibus
558
558
  end
559
559
  end
560
560
 
561
+ describe "#bin_dirs" do
562
+ it "sets bin_dirs" do
563
+ subject.bin_dirs ["my_bin_dir"]
564
+ expect(subject.bin_dirs).to eq(["my_bin_dir"])
565
+ expect(subject.bin_dirs).to be_kind_of(Array)
566
+ end
567
+
568
+ context "bin_dirs is not set" do
569
+ it "returns default values" do
570
+ expect(subject.bin_dirs).to eq(["/opt/project/bin", "/opt/project/embedded/bin"])
571
+ expect(subject.bin_dirs).to be_kind_of(Array)
572
+ end
573
+ end
574
+ end
575
+
576
+ describe "#lib_dirs" do
577
+ it "sets lib_dirs" do
578
+ subject.lib_dirs ["my_lib_dir"]
579
+ expect(subject.lib_dirs).to eq(["my_lib_dir"])
580
+ expect(subject.lib_dirs).to be_kind_of(Array)
581
+ end
582
+
583
+ context "lib_dirs is not set" do
584
+ it "returns default values" do
585
+ expect(subject.lib_dirs).to eq(["/opt/project/embedded/lib"])
586
+ expect(subject.lib_dirs).to be_kind_of(Array)
587
+ end
588
+ end
589
+ end
590
+
561
591
  context "testing repo-level version overrides" do
562
592
  context "without overrides" do
563
593
  it "returns the original values" do
@@ -46,8 +46,7 @@ module Omnibus
46
46
  environment: {
47
47
  "TICKLE_ME" => "elmo",
48
48
  "I_LOVE_YOU" => "barney",
49
- }
50
- )
49
+ })
51
50
  end
52
51
 
53
52
  context "when the command fails" do
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: 6.0.30
4
+ version: 7.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chef Software, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-13 00:00:00.000000000 Z
11
+ date: 2020-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '3.3'
41
41
  - !ruby/object:Gem::Dependency
42
- name: cleanroom
42
+ name: chef-cleanroom
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
@@ -95,7 +95,7 @@ dependencies:
95
95
  version: '13'
96
96
  - - "<"
97
97
  - !ruby/object:Gem::Version
98
- version: '16'
98
+ version: '17'
99
99
  type: :runtime
100
100
  prerelease: false
101
101
  version_requirements: !ruby/object:Gem::Requirement
@@ -105,7 +105,7 @@ dependencies:
105
105
  version: '13'
106
106
  - - "<"
107
107
  - !ruby/object:Gem::Version
108
- version: '16'
108
+ version: '17'
109
109
  - !ruby/object:Gem::Dependency
110
110
  name: ruby-progressbar
111
111
  requirement: !ruby/object:Gem::Requirement
@@ -124,16 +124,22 @@ dependencies:
124
124
  name: thor
125
125
  requirement: !ruby/object:Gem::Requirement
126
126
  requirements:
127
- - - "~>"
127
+ - - ">="
128
128
  - !ruby/object:Gem::Version
129
129
  version: '0.18'
130
+ - - "<"
131
+ - !ruby/object:Gem::Version
132
+ version: '2.0'
130
133
  type: :runtime
131
134
  prerelease: false
132
135
  version_requirements: !ruby/object:Gem::Requirement
133
136
  requirements:
134
- - - "~>"
137
+ - - ">="
135
138
  - !ruby/object:Gem::Version
136
139
  version: '0.18'
140
+ - - "<"
141
+ - !ruby/object:Gem::Version
142
+ version: '2.0'
137
143
  - !ruby/object:Gem::Dependency
138
144
  name: license_scout
139
145
  requirement: !ruby/object:Gem::Requirement
@@ -182,14 +188,14 @@ dependencies:
182
188
  requirements:
183
189
  - - "~>"
184
190
  - !ruby/object:Gem::Version
185
- version: '2.0'
191
+ version: '3.0'
186
192
  type: :development
187
193
  prerelease: false
188
194
  version_requirements: !ruby/object:Gem::Requirement
189
195
  requirements:
190
196
  - - "~>"
191
197
  - !ruby/object:Gem::Version
192
- version: '2.0'
198
+ version: '3.0'
193
199
  - !ruby/object:Gem::Dependency
194
200
  name: aruba
195
201
  requirement: !ruby/object:Gem::Requirement
@@ -210,14 +216,14 @@ dependencies:
210
216
  requirements:
211
217
  - - '='
212
218
  - !ruby/object:Gem::Version
213
- version: '0.12'
219
+ version: 1.1.0
214
220
  type: :development
215
221
  prerelease: false
216
222
  version_requirements: !ruby/object:Gem::Requirement
217
223
  requirements:
218
224
  - - '='
219
225
  - !ruby/object:Gem::Version
220
- version: '0.12'
226
+ version: 1.1.0
221
227
  - !ruby/object:Gem::Dependency
222
228
  name: fauxhai
223
229
  requirement: !ruby/object:Gem::Requirement