Commit 957bc89c1c33ccf7d8d5d3f3e7af018c17bd9ff5
1 parent
827a24d6
Exists in
master
and in
13 other branches
Vendor config/software/cacerts.rb
Source: https://github.com/opscode/omnibus-software/blob/a08918d84cb4ae31d4c749167def662350aa6235/config/software/cacerts.rb
Showing
1 changed file
with
44 additions
and
0 deletions
Show diff stats
... | ... | @@ -0,0 +1,44 @@ |
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 "cacerts" | |
19 | +default_version "2014.01.28" # date of the file is in a comment at the start, or in the changelog | |
20 | + | |
21 | +source :url => "http://curl.haxx.se/ca/cacert.pem", | |
22 | + :md5 => '5d108f8ab86afacc6663aafca8604dd3' | |
23 | + | |
24 | +relative_path "cacerts-#{version}" | |
25 | + | |
26 | +build do | |
27 | + block do | |
28 | + FileUtils.mkdir_p(File.expand_path("embedded/ssl/certs", install_dir)) | |
29 | + | |
30 | + # There is a bug in omnibus-ruby that may or may not have been fixed. Since the source url | |
31 | + # does not point to an archive, omnibus-ruby tries to copy cacert.pem into the project working | |
32 | + # directory. However, it fails and copies to '/var/cache/omnibus/src/cacerts-2012.12.19\' instead | |
33 | + # There is supposed to be a fix in omnibus-ruby, but under further testing, it was unsure if the | |
34 | + # fix worked. Rather than trying to fix this now, we're filing a bug and copying the cacert.pem | |
35 | + # directly from the cache instead. | |
36 | + | |
37 | + FileUtils.cp(File.expand_path("cacert.pem", Omnibus.config.cache_dir), | |
38 | + File.expand_path("embedded/ssl/certs/cacert.pem", install_dir)) | |
39 | + end | |
40 | + | |
41 | + unless platform == 'windows' | |
42 | + command "ln -sf #{install_dir}/embedded/ssl/certs/cacert.pem #{install_dir}/embedded/ssl/cert.pem" | |
43 | + end | |
44 | +end | ... | ... |