Commit f343941407aba4c094ac3f3ab0411e4e5056b600
Exists in
master
and in
2 other branches
Merge branch 'update/omnibus' into 'master'
Update omnibus-ruby to 3.2.1 See merge request !177
Showing
14 changed files
with
86 additions
and
477 deletions
Show diff stats
Gemfile
Gemfile.lock
1 | 1 | GIT |
2 | 2 | remote: git://github.com/opscode/omnibus-software.git |
3 | - revision: 4309667e135644c0c49473ec16aa7dba9fa84f41 | |
3 | + revision: 7ac92daa6892e0898eb868679e578df530e38ee8 | |
4 | 4 | branch: master |
5 | 5 | specs: |
6 | - omnibus-software (0.0.1) | |
6 | + omnibus-software (4.0.0) | |
7 | 7 | |
8 | 8 | GEM |
9 | 9 | remote: https://rubygems.org/ |
... | ... | @@ -13,18 +13,20 @@ GEM |
13 | 13 | cabin (> 0) |
14 | 14 | backports (3.6.0) |
15 | 15 | cabin (0.6.1) |
16 | - chef-sugar (1.2.6) | |
17 | - childprocess (0.5.2) | |
16 | + chef-sugar (1.3.0) | |
17 | + childprocess (0.5.3) | |
18 | 18 | ffi (~> 1.0, >= 1.0.11) |
19 | 19 | clamp (0.6.3) |
20 | 20 | ffi (1.9.3) |
21 | - fpm (1.0.2) | |
21 | + ffi-yajl (1.0.2) | |
22 | + ffi (~> 1.5) | |
23 | + libyajl2 (~> 1.0) | |
24 | + fpm (0.4.42) | |
22 | 25 | arr-pm (~> 0.0.8) |
23 | 26 | backports (>= 2.6.2) |
24 | 27 | cabin (>= 0.6.0) |
25 | 28 | childprocess |
26 | 29 | clamp (~> 0.6) |
27 | - ffi | |
28 | 30 | ftw (~> 0.0.30) |
29 | 31 | json (>= 1.7.7) |
30 | 32 | ftw (0.0.39) |
... | ... | @@ -35,37 +37,40 @@ GEM |
35 | 37 | http_parser.rb (0.5.3) |
36 | 38 | ipaddress (0.8.0) |
37 | 39 | json (1.8.1) |
40 | + libyajl2 (1.0.1) | |
38 | 41 | mime-types (1.25.1) |
39 | - mixlib-cli (1.4.0) | |
42 | + mixlib-cli (1.5.0) | |
40 | 43 | mixlib-config (2.1.0) |
41 | 44 | mixlib-log (1.6.0) |
42 | - mixlib-shellout (1.3.0) | |
43 | - ohai (6.20.0) | |
45 | + mixlib-shellout (1.4.0) | |
46 | + ohai (7.2.0) | |
47 | + ffi (~> 1.9) | |
48 | + ffi-yajl (~> 1.0) | |
44 | 49 | ipaddress |
50 | + mime-types (~> 1.16) | |
45 | 51 | mixlib-cli |
46 | - mixlib-config | |
52 | + mixlib-config (~> 2.0) | |
47 | 53 | mixlib-log |
48 | - mixlib-shellout | |
49 | - systemu (~> 2.5.2) | |
50 | - yajl-ruby | |
51 | - omnibus (3.0.0) | |
54 | + mixlib-shellout (~> 1.2) | |
55 | + systemu (~> 2.6.4) | |
56 | + wmi-lite (~> 1.0) | |
57 | + omnibus (3.2.1) | |
52 | 58 | chef-sugar (~> 1.2) |
53 | - fpm (~> 1.0.0) | |
54 | - mixlib-config (~> 2.1) | |
55 | - mixlib-shellout (~> 1.3) | |
56 | - ohai (~> 6.12) | |
57 | - thor (>= 0.16.0) | |
59 | + fpm (~> 0.4) | |
60 | + mixlib-shellout (~> 1.4) | |
61 | + ohai (~> 7.2) | |
62 | + thor (~> 0.18) | |
58 | 63 | uber-s3 |
59 | - systemu (2.5.2) | |
64 | + systemu (2.6.4) | |
60 | 65 | thor (0.19.1) |
61 | 66 | uber-s3 (0.2.4) |
62 | 67 | mime-types (~> 1.17) |
63 | - yajl-ruby (1.2.0) | |
68 | + wmi-lite (1.0.0) | |
64 | 69 | |
65 | 70 | PLATFORMS |
66 | 71 | ruby |
67 | 72 | |
68 | 73 | DEPENDENCIES |
69 | 74 | ohai |
70 | - omnibus (~> 3.0.0) | |
75 | + omnibus | |
71 | 76 | omnibus-software! | ... | ... |
Makefile
... | ... | @@ -5,7 +5,7 @@ SECRET_DIR:=$(shell openssl rand -hex 20) |
5 | 5 | PLATFORM_DIR:=$(shell ruby -rjson -e 'puts JSON.parse(`bin/ohai`).values_at("platform", "platform_version").join("-")') |
6 | 6 | |
7 | 7 | build: |
8 | - OMNIBUS_APPEND_TIMESTAMP=0 bin/omnibus build project ${PROJECT} | |
8 | + bin/omnibus build ${PROJECT} --override append_timestamp:false --log-level info | |
9 | 9 | |
10 | 10 | do_release: no_changes on_tag purge build move_to_platform_dir sync |
11 | 11 | ... | ... |
config/projects/gitlab.rb
... | ... | @@ -21,7 +21,7 @@ maintainer "GitLab.com" |
21 | 21 | homepage "http://www.gitlab.com/" |
22 | 22 | |
23 | 23 | replaces "gitlab" |
24 | -install_path "/opt/gitlab" | |
24 | +install_dir "/opt/gitlab" | |
25 | 25 | build_version Omnibus::BuildVersion.new.semver |
26 | 26 | build_iteration 1 |
27 | 27 | |
... | ... | @@ -35,7 +35,7 @@ dependency "git" |
35 | 35 | dependency "redis" |
36 | 36 | dependency "nginx" |
37 | 37 | dependency "chef-gem" |
38 | -if system("#{Omnibus.project_root}/support/is_gitlab_ee.sh") || system("#{Omnibus.project_root}/support/is_gitlab_com.sh") | |
38 | +if system("#{Config.project_root}/support/is_gitlab_ee.sh") || system("#{Config.project_root}/support/is_gitlab_com.sh") | |
39 | 39 | dependency "remote-syslog" |
40 | 40 | end |
41 | 41 | dependency "runit" | ... | ... |
config/software/cacerts.rb
... | ... | @@ -1,52 +0,0 @@ |
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 |
config/software/chef-gem.rb
... | ... | @@ -1,28 +0,0 @@ |
1 | -# | |
2 | -# Copyright:: Copyright (c) 2012-2014 Chef Software, Inc. | |
3 | -# Copyright:: Copyright (c) 2014 GitLab B.V. | |
4 | -# License:: Apache License, Version 2.0 | |
5 | -# | |
6 | -# Licensed under the Apache License, Version 2.0 (the "License"); | |
7 | -# you may not use this file except in compliance with the License. | |
8 | -# You may obtain a copy of the License at | |
9 | -# | |
10 | -# http://www.apache.org/licenses/LICENSE-2.0 | |
11 | -# | |
12 | -# Unless required by applicable law or agreed to in writing, software | |
13 | -# distributed under the License is distributed on an "AS IS" BASIS, | |
14 | -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
15 | -# See the License for the specific language governing permissions and | |
16 | -# limitations under the License. | |
17 | -# | |
18 | - | |
19 | -name "chef-gem" | |
20 | -default_version "11.12.2" | |
21 | - | |
22 | -dependency "ruby" | |
23 | -dependency "rubygems" | |
24 | -dependency "ohai" | |
25 | - | |
26 | -build do | |
27 | - gem "install chef -n #{install_dir}/embedded/bin --no-rdoc --no-ri -v #{version}" | |
28 | -end |
config/software/gitlab-cookbooks.rb
... | ... | @@ -22,7 +22,7 @@ dependency "rsync" |
22 | 22 | |
23 | 23 | always_build true |
24 | 24 | |
25 | -source :path => File.expand_path("files/gitlab-cookbooks", Omnibus.project_root) | |
25 | +source :path => File.expand_path("files/gitlab-cookbooks", Config.project_root) | |
26 | 26 | |
27 | 27 | build do |
28 | 28 | command "mkdir -p #{install_dir}/embedded/cookbooks" | ... | ... |
config/software/gitlab-ctl.rb
... | ... | @@ -21,7 +21,7 @@ name "gitlab-ctl" |
21 | 21 | dependency "rsync" |
22 | 22 | dependency "omnibus-ctl" |
23 | 23 | |
24 | -source :path => File.expand_path("files/gitlab-ctl-commands", Omnibus.project_root) | |
24 | +source :path => File.expand_path("files/gitlab-ctl-commands", Config.project_root) | |
25 | 25 | |
26 | 26 | build do |
27 | 27 | block do | ... | ... |
config/software/gitlab-rails.rb
... | ... | @@ -19,7 +19,7 @@ |
19 | 19 | name "gitlab-rails" |
20 | 20 | default_version "70ed6ef2a6894042c9bbd92f273542bca2a2374f" # 7.0.0.rc1 |
21 | 21 | |
22 | -EE = system("#{Omnibus.project_root}/support/is_gitlab_ee.sh") | |
22 | +EE = system("#{Config.project_root}/support/is_gitlab_ee.sh") | |
23 | 23 | |
24 | 24 | dependency "ruby" |
25 | 25 | dependency "bundler" |
... | ... | @@ -62,7 +62,7 @@ build do |
62 | 62 | # database at this point so that is a problem. This bug is fixed in |
63 | 63 | # acts-as-taggable-on 3.0.0 by |
64 | 64 | # https://github.com/mbleigh/acts-as-taggable-on/commit/ad02dc9bb24ec8e1e79e7e35e2d4bb5910a66d8e |
65 | - aato_patch = "#{Omnibus.project_root}/config/patches/acts-as-taggable-on-ad02dc9bb24ec8e1e79e7e35e2d4bb5910a66d8e.diff" | |
65 | + aato_patch = "#{Config.project_root}/config/patches/acts-as-taggable-on-ad02dc9bb24ec8e1e79e7e35e2d4bb5910a66d8e.diff" | |
66 | 66 | |
67 | 67 | # To make this idempotent, we apply the patch (in case this is a first run) or |
68 | 68 | # we revert and re-apply the patch (if this is a second or later run). | ... | ... |
... | ... | @@ -0,0 +1,47 @@ |
1 | +# | |
2 | +# Copyright 2012-2014 Chef Software, Inc. | |
3 | +# | |
4 | +# Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | +# you may not use this file except in compliance with the License. | |
6 | +# You may obtain a copy of the License at | |
7 | +# | |
8 | +# http://www.apache.org/licenses/LICENSE-2.0 | |
9 | +# | |
10 | +# Unless required by applicable law or agreed to in writing, software | |
11 | +# distributed under the License is distributed on an "AS IS" BASIS, | |
12 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | +# See the License for the specific language governing permissions and | |
14 | +# limitations under the License. | |
15 | +# | |
16 | + | |
17 | +name "libffi" | |
18 | +default_version "3.0.13" | |
19 | + | |
20 | +dependency "libgcc" | |
21 | +dependency "libtool" | |
22 | + | |
23 | +source url: "ftp://sourceware.org/pub/libffi/libffi-3.0.13.tar.gz", | |
24 | + md5: '45f3b6dbc9ee7c7dfbbbc5feba571529' | |
25 | + | |
26 | +relative_path "libffi-3.0.13" | |
27 | + | |
28 | +build do | |
29 | + env = with_standard_compiler_flags(with_embedded_path) | |
30 | + | |
31 | + command "./configure" \ | |
32 | + " --prefix=#{install_dir}/embedded", env: env | |
33 | + | |
34 | + command "make -j #{max_build_jobs}", env: env | |
35 | + command "make -j #{max_build_jobs} install", env: env | |
36 | + | |
37 | + # libffi's default install location of header files is awful... | |
38 | + copy "#{install_dir}/embedded/lib/libffi-#{version}/include/*", "#{install_dir}/embedded/include" | |
39 | + | |
40 | + # On 64-bit centos, libffi libraries are places under /embedded/lib64 | |
41 | + # move them over to lib | |
42 | + if rhel? && _64_bit? | |
43 | + copy "#{install_dir}/embedded/lib64/*", "#{install_dir}/embedded/lib/" | |
44 | + delete "#{install_dir}/embedded/lib64" | |
45 | + end | |
46 | +end | |
47 | + | ... | ... |
config/software/mysql-client.rb
... | ... | @@ -18,11 +18,9 @@ |
18 | 18 | name "mysql-client" |
19 | 19 | default_version "5.5.37" |
20 | 20 | |
21 | -dependencies [ | |
22 | - "openssl", | |
23 | - "zlib", | |
24 | - "ncurses" | |
25 | - ] | |
21 | +dependency "openssl" | |
22 | +dependency "zlib" | |
23 | +dependency "ncurses" | |
26 | 24 | |
27 | 25 | source :url => "http://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.37.tar.gz", |
28 | 26 | :md5 => "bf1d80c66d4822ec6036300399a33c03" |
... | ... | @@ -38,14 +36,8 @@ env = { |
38 | 36 | "PATH" => "#{install_dir}/embedded/bin:#{ENV['PATH']}", |
39 | 37 | } |
40 | 38 | |
41 | -unless OHAI.platform =~ /ubuntu/ && OHAI.platform_version =~ /^14.04/ | |
42 | - # Perhaps we can drop LD_LIBRARY_PATH on all platforms? For now, all we know | |
43 | - # is that it breaks the build on Ubuntu 14.04. | |
44 | - env.merge!("LD_LIBRARY_PATH" => "#{install_dir}/embedded/lib") | |
45 | -end | |
46 | - | |
47 | 39 | # Force CentOS-5 to use gcc/g++ v4.4 |
48 | -if OHAI.platform =~ /centos/ and OHAI.platform_version =~ /^5/ | |
40 | +if Ohai['platform'] =~ /centos/ and Ohai['platform_version'] =~ /^5/ | |
49 | 41 | env.merge!( { |
50 | 42 | "CC" => "gcc44", |
51 | 43 | "CXX" => "g++44" | ... | ... |
config/software/ohai.rb
... | ... | @@ -1,26 +0,0 @@ |
1 | -# | |
2 | -# Copyright:: Copyright (c) 2014 GitLab B.V. | |
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 "ohai" | |
19 | -default_version "7.0.4" | |
20 | - | |
21 | -dependency "ruby" | |
22 | -dependency "rubygems" | |
23 | - | |
24 | -build do | |
25 | - gem "install ohai -n #{install_dir}/embedded/bin --no-rdoc --no-ri -v #{version}" | |
26 | -end |
config/software/openssl.rb
... | ... | @@ -1,158 +0,0 @@ |
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 "openssl" | |
19 | - | |
20 | -dependency "zlib" | |
21 | -dependency "cacerts" | |
22 | -dependency "libgcc" | |
23 | -dependency "makedepend" | |
24 | - | |
25 | - | |
26 | -if platform == "aix" | |
27 | - # XXX: OpenSSL has an open bug on 1.0.1e where it fails to install on AIX | |
28 | - # http://rt.openssl.org/Ticket/Display.html?id=2986&user=guest&pass=guest | |
29 | - default_version "1.0.1c" | |
30 | - source :url => "http://www.openssl.org/source/openssl-1.0.1c.tar.gz", | |
31 | - :md5 => "ae412727c8c15b67880aef7bd2999b2e" | |
32 | -else | |
33 | - default_version "1.0.1h" | |
34 | - source :url => "http://www.openssl.org/source/openssl-1.0.1h.tar.gz", | |
35 | - :md5 => "8d6d684a9430d5cc98a62a5d8fbda8cf" | |
36 | -end | |
37 | - | |
38 | -relative_path "openssl-#{version}" | |
39 | - | |
40 | -build do | |
41 | - patch :source => "openssl-1.0.1f-do-not-build-docs.patch" | |
42 | - | |
43 | - env = case platform | |
44 | - when "mac_os_x" | |
45 | - { | |
46 | - "CFLAGS" => "-arch x86_64 -m64 -L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include -I#{install_dir}/embedded/include/ncurses", | |
47 | - "LDFLAGS" => "-arch x86_64 -R#{install_dir}/embedded/lib -L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include -I#{install_dir}/embedded/include/ncurses" | |
48 | - } | |
49 | - when "aix" | |
50 | - { | |
51 | - "CC" => "xlc -q64", | |
52 | - "CXX" => "xlC -q64", | |
53 | - "LD" => "ld -b64", | |
54 | - "CFLAGS" => "-q64 -I#{install_dir}/embedded/include -O", | |
55 | - "CXXFLAGS" => "-q64 -I#{install_dir}/embedded/include -O", | |
56 | - "LDFLAGS" => "-q64 -L#{install_dir}/embedded/lib -Wl,-blibpath:#{install_dir}/embedded/lib:/usr/lib:/lib", | |
57 | - "OBJECT_MODE" => "64", | |
58 | - "AR" => "/usr/bin/ar", | |
59 | - "ARFLAGS" => "-X64 cru", | |
60 | - "M4" => "/opt/freeware/bin/m4", | |
61 | - } | |
62 | - when "solaris2" | |
63 | - { | |
64 | - "CFLAGS" => "-L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include", | |
65 | - "LDFLAGS" => "-R#{install_dir}/embedded/lib -L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include -static-libgcc", | |
66 | - "LD_OPTIONS" => "-R#{install_dir}/embedded/lib" | |
67 | - } | |
68 | - else | |
69 | - { | |
70 | - "CFLAGS" => "-I#{install_dir}/embedded/include", | |
71 | - "LDFLAGS" => "-Wl,-rpath,#{install_dir}/embedded/lib -L#{install_dir}/embedded/lib" | |
72 | - } | |
73 | - end | |
74 | - | |
75 | - common_args = [ | |
76 | - "--prefix=#{install_dir}/embedded", | |
77 | - "--with-zlib-lib=#{install_dir}/embedded/lib", | |
78 | - "--with-zlib-include=#{install_dir}/embedded/include", | |
79 | - "no-idea", | |
80 | - "no-mdc2", | |
81 | - "no-rc5", | |
82 | - "zlib", | |
83 | - "shared", | |
84 | - ].join(" ") | |
85 | - | |
86 | - configure_command = case platform | |
87 | - when "aix" | |
88 | - ["perl", "./Configure", | |
89 | - "aix64-cc", | |
90 | - common_args, | |
91 | - "-L#{install_dir}/embedded/lib", | |
92 | - "-I#{install_dir}/embedded/include", | |
93 | - "-Wl,-blibpath:#{install_dir}/embedded/lib:/usr/lib:/lib"].join(" ") | |
94 | - when "mac_os_x" | |
95 | - ["./Configure", | |
96 | - "darwin64-x86_64-cc", | |
97 | - common_args, | |
98 | - ].join(" ") | |
99 | - when "smartos" | |
100 | - ["/bin/bash ./Configure", | |
101 | - "solaris64-x86_64-gcc", | |
102 | - common_args, | |
103 | - "-L#{install_dir}/embedded/lib", | |
104 | - "-I#{install_dir}/embedded/include", | |
105 | - "-R#{install_dir}/embedded/lib", | |
106 | - "-static-libgcc"].join(" ") | |
107 | - when "solaris2" | |
108 | - if Omnibus.config.solaris_compiler == "gcc" | |
109 | - if architecture == "sparc" | |
110 | - ["/bin/sh ./Configure", | |
111 | - "solaris-sparcv9-gcc", | |
112 | - common_args, | |
113 | - "-L#{install_dir}/embedded/lib", | |
114 | - "-I#{install_dir}/embedded/include", | |
115 | - "-R#{install_dir}/embedded/lib", | |
116 | - "-static-libgcc"].join(" ") | |
117 | - else | |
118 | - # This should not require a /bin/sh, but without it we get | |
119 | - # Errno::ENOEXEC: Exec format error | |
120 | - ["/bin/sh ./Configure", | |
121 | - "solaris-x86-gcc", | |
122 | - common_args, | |
123 | - "-L#{install_dir}/embedded/lib", | |
124 | - "-I#{install_dir}/embedded/include", | |
125 | - "-R#{install_dir}/embedded/lib", | |
126 | - "-static-libgcc"].join(" ") | |
127 | - end | |
128 | - else | |
129 | - raise "sorry, we don't support building openssl on non-gcc solaris builds right now." | |
130 | - end | |
131 | - else | |
132 | - ["./config", | |
133 | - common_args, | |
134 | - "disable-gost", # fixes build on linux, but breaks solaris | |
135 | - "-L#{install_dir}/embedded/lib", | |
136 | - "-I#{install_dir}/embedded/include", | |
137 | - "-Wl,-rpath,#{install_dir}/embedded/lib"].join(" ") | |
138 | - end | |
139 | - | |
140 | - # openssl build process uses a `makedepend` tool that we build inside the bundle. | |
141 | - env["PATH"] = "#{install_dir}/embedded/bin" + File::PATH_SEPARATOR + ENV["PATH"] | |
142 | - | |
143 | - # @todo: move into omnibus-ruby | |
144 | - has_gmake = system("gmake --version") | |
145 | - | |
146 | - if has_gmake | |
147 | - env.merge!({'MAKE' => 'gmake'}) | |
148 | - make_binary = 'gmake' | |
149 | - else | |
150 | - make_binary = 'make' | |
151 | - end | |
152 | - | |
153 | - command configure_command, :env => env | |
154 | - command "#{make_binary} depend", :env => env | |
155 | - # make -j N on openssl is not reliable | |
156 | - command "#{make_binary}", :env => env | |
157 | - command "#{make_binary} install", :env => env | |
158 | -end |
config/software/ruby.rb
... | ... | @@ -1,171 +0,0 @@ |
1 | -# | |
2 | -# Copyright:: Copyright (c) 2012-2014 Chef Software, Inc. | |
3 | -# Copyright:: Copyright (c) 2014 GitLab B.V. | |
4 | -# License:: Apache License, Version 2.0 | |
5 | -# | |
6 | -# Licensed under the Apache License, Version 2.0 (the "License"); | |
7 | -# you may not use this file except in compliance with the License. | |
8 | -# You may obtain a copy of the License at | |
9 | -# | |
10 | -# http://www.apache.org/licenses/LICENSE-2.0 | |
11 | -# | |
12 | -# Unless required by applicable law or agreed to in writing, software | |
13 | -# distributed under the License is distributed on an "AS IS" BASIS, | |
14 | -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
15 | -# See the License for the specific language governing permissions and | |
16 | -# limitations under the License. | |
17 | -# | |
18 | - | |
19 | -name "ruby" | |
20 | -default_version "1.9.3-p484" | |
21 | - | |
22 | -dependency "zlib" | |
23 | -dependency "ncurses" | |
24 | -dependency "libedit" | |
25 | -dependency "openssl" | |
26 | -dependency "libyaml" | |
27 | -dependency "libiconv" | |
28 | -dependency "gdbm" | |
29 | -dependency "libgcc" if (platform == "solaris2" and Omnibus.config.solaris_compiler == "gcc") | |
30 | - | |
31 | -version "1.9.3-p484" do | |
32 | - source md5: '8ac0dee72fe12d75c8b2d0ef5d0c2968' | |
33 | -end | |
34 | - | |
35 | -version "2.0.0-p451" do | |
36 | - source md5: '9227787a9636551f1749ee8394b5ffe5' | |
37 | -end | |
38 | - | |
39 | -version "2.1.1" do | |
40 | - source md5: 'e57fdbb8ed56e70c43f39c79da1654b2' | |
41 | -end | |
42 | - | |
43 | -version "2.1.2" do | |
44 | - source md5: 'a5b5c83565f8bd954ee522bd287d2ca1' | |
45 | -end | |
46 | - | |
47 | -source url: "http://cache.ruby-lang.org/pub/ruby/#{version.match(/^(\d+\.\d+)/)[0]}/ruby-#{version}.tar.gz" | |
48 | - | |
49 | -relative_path "ruby-#{version}" | |
50 | - | |
51 | -env = | |
52 | - case platform | |
53 | - when "mac_os_x" | |
54 | - { | |
55 | - # -Qunused-arguments suppresses "argument unused during compilation" | |
56 | - # warnings. These can be produced if you compile a program that doesn't | |
57 | - # link to anything in a path given with -Lextra-libs. Normally these | |
58 | - # would be harmless, except that autoconf treats any output to stderr as | |
59 | - # a failure when it makes a test program to check your CFLAGS (regardless | |
60 | - # of the actual exit code from the compiler). | |
61 | - "CFLAGS" => "-arch x86_64 -m64 -L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include -I#{install_dir}/embedded/include/ncurses -O3 -g -pipe -Qunused-arguments", | |
62 | - "LDFLAGS" => "-arch x86_64 -L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include -I#{install_dir}/embedded/include/ncurses" | |
63 | - } | |
64 | - when "solaris2" | |
65 | - { | |
66 | - "CFLAGS" => "-L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include -O3 -g -pipe", | |
67 | - "LDFLAGS" => "-R#{install_dir}/embedded/lib -L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include -static-libgcc", | |
68 | - "LD_OPTIONS" => "-R#{install_dir}/embedded/lib" | |
69 | - } | |
70 | - when "aix" | |
71 | - { | |
72 | - # see http://www.ibm.com/developerworks/aix/library/au-gnu.html | |
73 | - # | |
74 | - # specifically: | |
75 | - # | |
76 | - # "To use AIX run-time linking, you should create the shared object | |
77 | - # using gcc -shared -Wl,-G and create executables using the library | |
78 | - # by adding the -Wl,-brtl option to the link line. Technically, you | |
79 | - # can leave off the -shared option, but it does no harm and reduces | |
80 | - # confusion." | |
81 | - # | |
82 | - # AIX also uses -Wl,-blibpath instead of -R or LD_RUN_PATH, but the | |
83 | - # option is not additive, so requires /usr/lib and /lib as well (there | |
84 | - # is a -bsvr4 option to allow ld to take an -R flag in addition | |
85 | - # to turning on -brtl, but it had other side effects I couldn't fix). | |
86 | - # | |
87 | - # If libraries linked with gcc -shared have symbol resolution failures | |
88 | - # then it may be useful to add -bexpfull to export all symbols. | |
89 | - # | |
90 | - # -O2 optimized away some configure test which caused ext libs to fail | |
91 | - # | |
92 | - # We also need prezl's M4 instead of picking up /usr/bin/m4 which | |
93 | - # barfs on ruby. | |
94 | - # | |
95 | - "CC" => "xlc -q64", | |
96 | - "CXX" => "xlC -q64", | |
97 | - "LD" => "ld -b64", | |
98 | - "CFLAGS" => "-q64 -O -qhot -I#{install_dir}/embedded/include", | |
99 | - "CXXFLAGS" => "-q64 -O -qhot -I#{install_dir}/embedded/include", | |
100 | - "LDFLAGS" => "-q64 -L#{install_dir}/embedded/lib -Wl,-brtl -Wl,-blibpath:#{install_dir}/embedded/lib:/usr/lib:/lib", | |
101 | - "OBJECT_MODE" => "64", | |
102 | - "ARFLAGS" => "-X64 cru", | |
103 | - "M4" => "/opt/freeware/bin/m4", | |
104 | - "warnflags" => "-qinfo=por" | |
105 | - } | |
106 | - else | |
107 | - { | |
108 | - "CFLAGS" => "-I#{install_dir}/embedded/include -O3 -g -pipe", | |
109 | - "LDFLAGS" => "-Wl,-rpath,#{install_dir}/embedded/lib -L#{install_dir}/embedded/lib" | |
110 | - } | |
111 | - end | |
112 | - | |
113 | -build do | |
114 | - configure_command = ["./configure", | |
115 | - "--prefix=#{install_dir}/embedded", | |
116 | - "--with-out-ext=fiddle,dbm", | |
117 | - "--enable-shared", | |
118 | - "--enable-libedit", | |
119 | - "--with-ext=psych", | |
120 | - "--disable-install-doc"] | |
121 | - | |
122 | - case platform | |
123 | - when "aix" | |
124 | - patch :source => "ruby-aix-configure.patch", :plevel => 1 | |
125 | - patch :source => "ruby_aix_1_9_3_448_ssl_EAGAIN.patch", :plevel => 1 | |
126 | - # --with-opt-dir causes ruby to send bogus commands to the AIX linker | |
127 | - when "freebsd" | |
128 | - configure_command << "--without-execinfo" | |
129 | - configure_command << "--with-opt-dir=#{install_dir}/embedded" | |
130 | - when "smartos" | |
131 | - # Opscode patch - someara@opscode.com | |
132 | - # GCC 4.7.0 chokes on mismatched function types between OpenSSL 1.0.1c and Ruby 1.9.3-p286 | |
133 | - patch :source => "ruby-openssl-1.0.1c.patch", :plevel => 1 | |
134 | - | |
135 | - # Patches taken from RVM. | |
136 | - # http://bugs.ruby-lang.org/issues/5384 | |
137 | - # https://www.illumos.org/issues/1587 | |
138 | - # https://github.com/wayneeseguin/rvm/issues/719 | |
139 | - patch :source => "rvm-cflags.patch", :plevel => 1 | |
140 | - | |
141 | - # From RVM forum | |
142 | - # https://github.com/wayneeseguin/rvm/commit/86766534fcc26f4582f23842a4d3789707ce6b96 | |
143 | - configure_command << "ac_cv_func_dl_iterate_phdr=no" | |
144 | - configure_command << "--with-opt-dir=#{install_dir}/embedded" | |
145 | - else | |
146 | - configure_command << "--with-opt-dir=#{install_dir}/embedded" | |
147 | - end | |
148 | - | |
149 | - # @todo expose bundle_bust() in the DSL | |
150 | - env.merge!({ | |
151 | - "RUBYOPT" => nil, | |
152 | - "BUNDLE_BIN_PATH" => nil, | |
153 | - "BUNDLE_GEMFILE" => nil, | |
154 | - "GEM_PATH" => nil, | |
155 | - "GEM_HOME" => nil | |
156 | - }) | |
157 | - | |
158 | - # @todo: move into omnibus-ruby | |
159 | - has_gmake = system("gmake --version") | |
160 | - | |
161 | - if has_gmake | |
162 | - env.merge!({'MAKE' => 'gmake'}) | |
163 | - make_binary = 'gmake' | |
164 | - else | |
165 | - make_binary = 'make' | |
166 | - end | |
167 | - | |
168 | - command configure_command.join(" "), :env => env | |
169 | - command "#{make_binary} -j #{max_build_jobs}", :env => env | |
170 | - command "#{make_binary} -j #{max_build_jobs} install", :env => env | |
171 | -end |