Commit a268de786abfa6d95ea92aff8a3ae6e0f0e5e048
Exists in
master
and in
4 other branches
Merge branch 'ruby2.1.2' into 'master'
Use Ruby 2.1.2
Showing
3 changed files
with
173 additions
and
1 deletions
Show diff stats
CHANGELOG
@@ -16,6 +16,7 @@ omnibus-gitlab repository. | @@ -16,6 +16,7 @@ omnibus-gitlab repository. | ||
16 | - Support changing the 'restricted_visibility_levels' option (Javier Palomo) | 16 | - Support changing the 'restricted_visibility_levels' option (Javier Palomo) |
17 | - Only start omnibus-gitlab services after a given filesystem is mounted | 17 | - Only start omnibus-gitlab services after a given filesystem is mounted |
18 | - Support the repository_downloads_path setting in gitlab.yml | 18 | - Support the repository_downloads_path setting in gitlab.yml |
19 | +- Use Ruby 2.1.2 | ||
19 | 20 | ||
20 | 7.0.0-ee.omnibus.1 | 21 | 7.0.0-ee.omnibus.1 |
21 | - Fix MySQL build for Ubuntu 14.04 | 22 | - Fix MySQL build for Ubuntu 14.04 |
config/projects/gitlab.rb
@@ -25,7 +25,7 @@ install_path "/opt/gitlab" | @@ -25,7 +25,7 @@ install_path "/opt/gitlab" | ||
25 | build_version Omnibus::BuildVersion.new.semver | 25 | build_version Omnibus::BuildVersion.new.semver |
26 | build_iteration 1 | 26 | build_iteration 1 |
27 | 27 | ||
28 | -override :ruby, version: '2.1.1' | 28 | +override :ruby, version: '2.1.2' |
29 | override :rubygems, version: '2.2.1' | 29 | override :rubygems, version: '2.2.1' |
30 | 30 | ||
31 | # creates required build directories | 31 | # creates required build directories |
@@ -0,0 +1,171 @@ | @@ -0,0 +1,171 @@ | ||
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 |