Commit 17df71d546b5b6c731c32a16488cb6384a018cf5

Authored by Jacob Vosmaer
1 parent 4c7bd25b

Use Ruby 2.1.1

config/projects/gitlab.rb
... ... @@ -25,7 +25,7 @@ install_path "/opt/gitlab"
25 25 build_version Omnibus::BuildVersion.new.semver
26 26 build_iteration 1
27 27  
28   -override :ruby, version: '2.0.0-p451'
  28 +override :ruby, version: '2.1.1'
29 29 override :rubygems, version: '2.2.1'
30 30  
31 31 # creates required build directories
... ...
config/software/gitlab-rails.rb
... ... @@ -67,7 +67,7 @@ build do
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).
69 69 command "git apply #{aato_patch} || (git apply -R #{aato_patch} && git apply #{aato_patch})",
70   - :cwd => "#{install_dir}/embedded/service/gem/ruby/2.0.0/gems/acts-as-taggable-on-2.4.1"
  70 + :cwd => "#{install_dir}/embedded/service/gem/ruby/2.1.0/gems/acts-as-taggable-on-2.4.1"
71 71  
72 72 assets_precompile_env = {
73 73 "RAILS_ENV" => "production",
... ...
config/software/ruby.rb
... ... @@ -1,167 +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   -source url: "http://cache.ruby-lang.org/pub/ruby/#{version.match(/^(\d+\.\d+)/)[0]}/ruby-#{version}.tar.gz"
44   -
45   -relative_path "ruby-#{version}"
46   -
47   -env =
48   - case platform
49   - when "mac_os_x"
50   - {
51   - # -Qunused-arguments suppresses "argument unused during compilation"
52   - # warnings. These can be produced if you compile a program that doesn't
53   - # link to anything in a path given with -Lextra-libs. Normally these
54   - # would be harmless, except that autoconf treats any output to stderr as
55   - # a failure when it makes a test program to check your CFLAGS (regardless
56   - # of the actual exit code from the compiler).
57   - "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",
58   - "LDFLAGS" => "-arch x86_64 -L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include -I#{install_dir}/embedded/include/ncurses"
59   - }
60   - when "solaris2"
61   - {
62   - "CFLAGS" => "-L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include -O3 -g -pipe",
63   - "LDFLAGS" => "-R#{install_dir}/embedded/lib -L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include -static-libgcc",
64   - "LD_OPTIONS" => "-R#{install_dir}/embedded/lib"
65   - }
66   - when "aix"
67   - {
68   - # see http://www.ibm.com/developerworks/aix/library/au-gnu.html
69   - #
70   - # specifically:
71   - #
72   - # "To use AIX run-time linking, you should create the shared object
73   - # using gcc -shared -Wl,-G and create executables using the library
74   - # by adding the -Wl,-brtl option to the link line. Technically, you
75   - # can leave off the -shared option, but it does no harm and reduces
76   - # confusion."
77   - #
78   - # AIX also uses -Wl,-blibpath instead of -R or LD_RUN_PATH, but the
79   - # option is not additive, so requires /usr/lib and /lib as well (there
80   - # is a -bsvr4 option to allow ld to take an -R flag in addition
81   - # to turning on -brtl, but it had other side effects I couldn't fix).
82   - #
83   - # If libraries linked with gcc -shared have symbol resolution failures
84   - # then it may be useful to add -bexpfull to export all symbols.
85   - #
86   - # -O2 optimized away some configure test which caused ext libs to fail
87   - #
88   - # We also need prezl's M4 instead of picking up /usr/bin/m4 which
89   - # barfs on ruby.
90   - #
91   - "CC" => "xlc -q64",
92   - "CXX" => "xlC -q64",
93   - "LD" => "ld -b64",
94   - "CFLAGS" => "-q64 -O -qhot -I#{install_dir}/embedded/include",
95   - "CXXFLAGS" => "-q64 -O -qhot -I#{install_dir}/embedded/include",
96   - "LDFLAGS" => "-q64 -L#{install_dir}/embedded/lib -Wl,-brtl -Wl,-blibpath:#{install_dir}/embedded/lib:/usr/lib:/lib",
97   - "OBJECT_MODE" => "64",
98   - "ARFLAGS" => "-X64 cru",
99   - "M4" => "/opt/freeware/bin/m4",
100   - "warnflags" => "-qinfo=por"
101   - }
102   - else
103   - {
104   - "CFLAGS" => "-I#{install_dir}/embedded/include -O3 -g -pipe",
105   - "LDFLAGS" => "-Wl,-rpath,#{install_dir}/embedded/lib -L#{install_dir}/embedded/lib"
106   - }
107   - end
108   -
109   -build do
110   - configure_command = ["./configure",
111   - "--prefix=#{install_dir}/embedded",
112   - "--with-out-ext=fiddle,dbm",
113   - "--enable-shared",
114   - "--enable-libedit",
115   - "--with-ext=psych",
116   - "--disable-install-doc"]
117   -
118   - case platform
119   - when "aix"
120   - patch :source => "ruby-aix-configure.patch", :plevel => 1
121   - patch :source => "ruby_aix_1_9_3_448_ssl_EAGAIN.patch", :plevel => 1
122   - # --with-opt-dir causes ruby to send bogus commands to the AIX linker
123   - when "freebsd"
124   - configure_command << "--without-execinfo"
125   - configure_command << "--with-opt-dir=#{install_dir}/embedded"
126   - when "smartos"
127   - # Opscode patch - someara@opscode.com
128   - # GCC 4.7.0 chokes on mismatched function types between OpenSSL 1.0.1c and Ruby 1.9.3-p286
129   - patch :source => "ruby-openssl-1.0.1c.patch", :plevel => 1
130   -
131   - # Patches taken from RVM.
132   - # http://bugs.ruby-lang.org/issues/5384
133   - # https://www.illumos.org/issues/1587
134   - # https://github.com/wayneeseguin/rvm/issues/719
135   - patch :source => "rvm-cflags.patch", :plevel => 1
136   -
137   - # From RVM forum
138   - # https://github.com/wayneeseguin/rvm/commit/86766534fcc26f4582f23842a4d3789707ce6b96
139   - configure_command << "ac_cv_func_dl_iterate_phdr=no"
140   - configure_command << "--with-opt-dir=#{install_dir}/embedded"
141   - else
142   - configure_command << "--with-opt-dir=#{install_dir}/embedded"
143   - end
144   -
145   - # @todo expose bundle_bust() in the DSL
146   - env.merge!({
147   - "RUBYOPT" => nil,
148   - "BUNDLE_BIN_PATH" => nil,
149   - "BUNDLE_GEMFILE" => nil,
150   - "GEM_PATH" => nil,
151   - "GEM_HOME" => nil
152   - })
153   -
154   - # @todo: move into omnibus-ruby
155   - has_gmake = system("gmake --version")
156   -
157   - if has_gmake
158   - env.merge!({'MAKE' => 'gmake'})
159   - make_binary = 'gmake'
160   - else
161   - make_binary = 'make'
162   - end
163   -
164   - command configure_command.join(" "), :env => env
165   - command "#{make_binary} -j #{max_build_jobs}", :env => env
166   - command "#{make_binary} -j #{max_build_jobs} install", :env => env
167   -end