Commit fa9ad95e4ec236b58be5a26d78c04d7664dbd429

Authored by Jacob Vosmaer
2 parents 3ea0c67d 3d33a1cd
Exists in 7-1-stable-ee

Merge branch '7-1-stable' of gitlab.com:gitlab-org/omnibus-gitlab into 7-1-stable-ee

Conflicts:
	config/software/gitlab-rails.rb
Showing 1 changed file with 52 additions and 0 deletions   Show diff stats
config/software/cacerts.rb 0 → 100644
... ... @@ -0,0 +1,52 @@
  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.07.15" # date of the file is in a comment at the start, or in the changelog
  20 +
  21 +version "2014.07.15" do
  22 + source :md5 => "fd48275847fa10a8007008379ee902f1"
  23 +end
  24 +
  25 +version "2014.04.22" do
  26 + source :md5 => "9f92a0d9f605e227ae068e605f4c86fa"
  27 +end
  28 +
  29 +version "2014.01.28" do
  30 + source :md5 => "5d108f8ab86afacc6663aafca8604dd3"
  31 +end
  32 +
  33 +source :url => "http://curl.haxx.se/ca/cacert.pem"
  34 +relative_path "cacerts-#{version}"
  35 +
  36 +build do
  37 + block do
  38 + FileUtils.mkdir_p(File.expand_path("embedded/ssl/certs", install_dir))
  39 +
  40 + # There is a bug in omnibus-ruby that may or may not have been fixed. Since the source url
  41 + # does not point to an archive, omnibus-ruby tries to copy cacert.pem into the project working
  42 + # directory. However, it fails and copies to '/var/cache/omnibus/src/cacerts-2012.12.19\' instead
  43 + # There is supposed to be a fix in omnibus-ruby, but under further testing, it was unsure if the
  44 + # fix worked. Rather than trying to fix this now, we're filing a bug and copying the cacert.pem
  45 + # directly from the cache instead.
  46 +
  47 + FileUtils.cp(File.expand_path("cacert.pem", Config.cache_dir),
  48 + File.expand_path("embedded/ssl/certs/cacert.pem", install_dir))
  49 + end
  50 +
  51 + command "ln -sf #{install_dir}/embedded/ssl/certs/cacert.pem #{install_dir}/embedded/ssl/cert.pem"
  52 +end
... ...