Merge branch 'omnibus-4-0' into 'master'
Update omnibus-ruby to 4.0.0 Dependency changes: - postgresql 9.2.8 -> 9.2.9 - libossp-uuid 1.6.2 is added See merge request !309
This commit is contained in:
commit
d8d6a20551
1
Gemfile
1
Gemfile
|
@ -3,3 +3,4 @@ source 'https://rubygems.org'
|
|||
gem 'omnibus'
|
||||
gem 'omnibus-software', :git => 'git://github.com/opscode/omnibus-software.git', :branch => 'master'
|
||||
gem 'ohai'
|
||||
gem 'json'
|
||||
|
|
52
Gemfile.lock
52
Gemfile.lock
|
@ -1,6 +1,6 @@
|
|||
GIT
|
||||
remote: git://github.com/opscode/omnibus-software.git
|
||||
revision: 7ac92daa6892e0898eb868679e578df530e38ee8
|
||||
revision: 023b7eed619b4ff72f43a1ea4edb430a35f848c2
|
||||
branch: master
|
||||
specs:
|
||||
omnibus-software (4.0.0)
|
||||
|
@ -8,44 +8,23 @@ GIT
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
addressable (2.3.6)
|
||||
arr-pm (0.0.9)
|
||||
cabin (> 0)
|
||||
backports (3.6.3)
|
||||
cabin (0.6.1)
|
||||
chef-sugar (1.3.0)
|
||||
childprocess (0.5.3)
|
||||
ffi (~> 1.0, >= 1.0.11)
|
||||
clamp (0.6.3)
|
||||
ffi (1.9.3)
|
||||
ffi-yajl (1.0.2)
|
||||
chef-sugar (2.5.0)
|
||||
cleanroom (1.0.0)
|
||||
ffi (1.9.8)
|
||||
ffi-yajl (1.4.0)
|
||||
ffi (~> 1.5)
|
||||
libyajl2 (~> 1.0)
|
||||
fpm (0.4.42)
|
||||
arr-pm (~> 0.0.8)
|
||||
backports (>= 2.6.2)
|
||||
cabin (>= 0.6.0)
|
||||
childprocess
|
||||
clamp (~> 0.6)
|
||||
ftw (~> 0.0.30)
|
||||
json (>= 1.7.7)
|
||||
ftw (0.0.39)
|
||||
addressable
|
||||
backports (>= 2.6.2)
|
||||
cabin (> 0)
|
||||
http_parser.rb (= 0.5.3)
|
||||
http_parser.rb (0.5.3)
|
||||
libyajl2 (~> 1.2)
|
||||
ipaddress (0.8.0)
|
||||
json (1.8.1)
|
||||
libyajl2 (1.0.1)
|
||||
json (1.8.2)
|
||||
libyajl2 (1.2.0)
|
||||
mime-types (1.25.1)
|
||||
mixlib-cli (1.5.0)
|
||||
mixlib-config (2.1.0)
|
||||
mixlib-log (1.6.0)
|
||||
mixlib-shellout (1.4.0)
|
||||
ohai (7.2.0)
|
||||
mixlib-shellout (1.6.1)
|
||||
ohai (7.4.1)
|
||||
ffi (~> 1.9)
|
||||
ffi-yajl (~> 1.0)
|
||||
ffi-yajl (~> 1.1)
|
||||
ipaddress
|
||||
mime-types (~> 1.16)
|
||||
mixlib-cli
|
||||
|
@ -54,14 +33,14 @@ GEM
|
|||
mixlib-shellout (~> 1.2)
|
||||
systemu (~> 2.6.4)
|
||||
wmi-lite (~> 1.0)
|
||||
omnibus (3.2.1)
|
||||
chef-sugar (~> 1.2)
|
||||
fpm (~> 0.4)
|
||||
omnibus (4.0.0)
|
||||
chef-sugar (~> 2.2)
|
||||
cleanroom (~> 1.0)
|
||||
mixlib-shellout (~> 1.4)
|
||||
ohai (~> 7.2)
|
||||
thor (~> 0.18)
|
||||
uber-s3
|
||||
systemu (2.6.4)
|
||||
systemu (2.6.5)
|
||||
thor (0.19.1)
|
||||
uber-s3 (0.2.4)
|
||||
mime-types (~> 1.17)
|
||||
|
@ -71,6 +50,7 @@ PLATFORMS
|
|||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
json
|
||||
ohai
|
||||
omnibus
|
||||
omnibus-software!
|
||||
|
|
10
Makefile
10
Makefile
|
@ -3,14 +3,20 @@ RELEASE_BUCKET=downloads-packages
|
|||
RELEASE_BUCKET_REGION=eu-west-1
|
||||
SECRET_DIR:=$(shell openssl rand -hex 20)
|
||||
PLATFORM_DIR:=$(shell ruby -rjson -e 'puts JSON.parse(`bin/ohai`).values_at("platform", "platform_version").join("-")')
|
||||
UUID_TARBALL=/var/cache/omnibus/cache/uuid-1.6.2.tar.gz
|
||||
|
||||
build:
|
||||
build: ${UUID_TARBALL}
|
||||
bin/omnibus build ${PROJECT} --override append_timestamp:false --log-level info
|
||||
|
||||
# No need to suppress timestamps on the test builds
|
||||
test_build:
|
||||
test_build: ${UUID_TARBALL}
|
||||
bin/omnibus build ${PROJECT} --log-level info
|
||||
|
||||
${UUID_TARBALL}:
|
||||
# Download libossp-uuid outside of omnibus, because FTP through firewalls sucks
|
||||
mkdir -p /var/cache/omnibus/cache
|
||||
curl ftp://ftp.ossp.org/pkg/lib/uuid/uuid-1.6.2.tar.gz > ${UUID_TARBALL}
|
||||
|
||||
# If this task were called 'release', running 'make release' would confuse Make
|
||||
# because there exists a file called 'release.sh' in this directory. Make has
|
||||
# built-in rules on how to build .sh files. By calling this task do_release, it
|
||||
|
|
|
@ -20,7 +20,6 @@ name "gitlab"
|
|||
maintainer "GitLab.com"
|
||||
homepage "https://about.gitlab.com/"
|
||||
|
||||
replaces "gitlab"
|
||||
install_dir "/opt/gitlab"
|
||||
build_version Omnibus::BuildVersion.new.semver
|
||||
build_iteration 1
|
||||
|
@ -40,7 +39,7 @@ dependency "git"
|
|||
dependency "redis"
|
||||
dependency "nginx"
|
||||
dependency "chef-gem"
|
||||
if system("#{Config.project_root}/support/is_gitlab_ee.sh") || system("#{Config.project_root}/support/is_gitlab_com.sh")
|
||||
if system("#{Omnibus::Config.project_root}/support/is_gitlab_ee.sh") || system("#{Omnibus::Config.project_root}/support/is_gitlab_com.sh")
|
||||
dependency "remote-syslog"
|
||||
end
|
||||
dependency "logrotate"
|
||||
|
|
|
@ -51,6 +51,6 @@ NO_PYTHON=YesPlease
|
|||
end
|
||||
end
|
||||
|
||||
command "make -j #{max_build_jobs}", :env => env
|
||||
command "make -j #{workers}", :env => env
|
||||
command "make install"
|
||||
end
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
name "gitlab-ci"
|
||||
default_version "8e29dee98e3ac0fa5c69708f78429a0d758a92cb" # CI 7.9.1
|
||||
|
||||
EE = system("#{Config.project_root}/support/is_gitlab_ee.sh")
|
||||
EE = system("#{Omnibus::Config.project_root}/support/is_gitlab_ee.sh")
|
||||
|
||||
dependency "ruby"
|
||||
dependency "bundler"
|
||||
|
@ -33,7 +33,7 @@ build do
|
|||
|
||||
bundle_without = %w{development test}
|
||||
bundle_without << "mysql" unless EE
|
||||
bundle "install --without #{bundle_without.join(" ")} --path=#{install_dir}/embedded/service/gem --jobs #{max_build_jobs}", :env => env
|
||||
bundle "install --without #{bundle_without.join(" ")} --path=#{install_dir}/embedded/service/gem --jobs #{workers}", :env => env
|
||||
|
||||
# Record the current Git revision to be displayed in the app
|
||||
command "git log --pretty=format:'%h' -n 1 > REVISION"
|
||||
|
|
|
@ -19,9 +19,13 @@ name "gitlab-config-template"
|
|||
|
||||
dependency "rsync"
|
||||
|
||||
always_build true
|
||||
# Help omnibus-ruby to cache the build product of this software. This is a
|
||||
# workaround for the deprecation of `always_build true`. What happens now is
|
||||
# that we build only if the contents of the specified directory have changed
|
||||
# according to git.
|
||||
version `git ls-tree HEAD -- files/gitlab-config-template | awk '{ print $3 }'`
|
||||
|
||||
source :path => File.expand_path("files/gitlab-config-template", Config.project_root)
|
||||
source :path => File.expand_path("files/gitlab-config-template", Omnibus::Config.project_root)
|
||||
|
||||
build do
|
||||
command "mkdir -p #{install_dir}/etc"
|
||||
|
|
|
@ -20,9 +20,13 @@ name "gitlab-cookbooks"
|
|||
|
||||
dependency "rsync"
|
||||
|
||||
always_build true
|
||||
# Help omnibus-ruby to cache the build product of this software. This is a
|
||||
# workaround for the deprecation of `always_build true`. What happens now is
|
||||
# that we build only if the contents of the specified directory have changed
|
||||
# according to git.
|
||||
version `git ls-tree HEAD -- files/gitlab-cookbooks | awk '{ print $3 }'`
|
||||
|
||||
source :path => File.expand_path("files/gitlab-cookbooks", Config.project_root)
|
||||
source :path => File.expand_path("files/gitlab-cookbooks", Omnibus::Config.project_root)
|
||||
|
||||
build do
|
||||
command "mkdir -p #{install_dir}/embedded/cookbooks"
|
||||
|
|
|
@ -21,7 +21,7 @@ name "gitlab-ctl"
|
|||
dependency "rsync"
|
||||
dependency "omnibus-ctl"
|
||||
|
||||
source :path => File.expand_path("files/gitlab-ctl-commands", Config.project_root)
|
||||
source :path => File.expand_path("files/gitlab-ctl-commands", Omnibus::Config.project_root)
|
||||
|
||||
build do
|
||||
block do
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
name "gitlab-rails"
|
||||
default_version "6f6c5f18a010eb96f9e6ff98cf91e6c8a8fb6d8d" # CE 7.9.1
|
||||
|
||||
EE = system("#{Config.project_root}/support/is_gitlab_ee.sh")
|
||||
EE = system("#{Omnibus::Config.project_root}/support/is_gitlab_ee.sh")
|
||||
|
||||
dependency "ruby"
|
||||
dependency "bundler"
|
||||
|
@ -48,7 +48,7 @@ build do
|
|||
|
||||
bundle_without = %w{development test}
|
||||
bundle_without << "mysql" unless EE
|
||||
bundle "install --without #{bundle_without.join(" ")} --path=#{install_dir}/embedded/service/gem --jobs #{max_build_jobs}", :env => env
|
||||
bundle "install --without #{bundle_without.join(" ")} --path=#{install_dir}/embedded/service/gem --jobs #{workers}", :env => env
|
||||
|
||||
# In order to precompile the assets, we need to get to a state where rake can
|
||||
# load the Rails environment.
|
||||
|
@ -60,7 +60,7 @@ build do
|
|||
# database at this point so that is a problem. This bug is fixed in
|
||||
# acts-as-taggable-on 3.0.0 by
|
||||
# https://github.com/mbleigh/acts-as-taggable-on/commit/ad02dc9bb24ec8e1e79e7e35e2d4bb5910a66d8e
|
||||
aato_patch = "#{Config.project_root}/config/patches/acts-as-taggable-on-ad02dc9bb24ec8e1e79e7e35e2d4bb5910a66d8e.diff"
|
||||
aato_patch = "#{Omnibus::Config.project_root}/config/patches/acts-as-taggable-on-ad02dc9bb24ec8e1e79e7e35e2d4bb5910a66d8e.diff"
|
||||
|
||||
# To make this idempotent, we apply the patch (in case this is a first run) or
|
||||
# we revert and re-apply the patch (if this is a second or later run).
|
||||
|
|
|
@ -19,9 +19,13 @@ name "gitlab-selinux"
|
|||
|
||||
dependency "rsync"
|
||||
|
||||
always_build true
|
||||
# Help omnibus-ruby to cache the build product of this software. This is a
|
||||
# workaround for the deprecation of `always_build true`. What happens now is
|
||||
# that we build only if the contents of the specified directory have changed
|
||||
# according to git.
|
||||
version `git ls-tree HEAD -- files/gitlab-selinux | awk '{ print $3 }'`
|
||||
|
||||
source :path => File.expand_path("files/gitlab-selinux", Config.project_root)
|
||||
source :path => File.expand_path("files/gitlab-selinux", Omnibus::Config.project_root)
|
||||
|
||||
build do
|
||||
command "mkdir -p #{install_dir}/embedded/selinux"
|
||||
|
|
|
@ -27,7 +27,7 @@ relative_path "krb5-#{version}"
|
|||
build do
|
||||
env = with_standard_compiler_flags(with_embedded_path)
|
||||
|
||||
command "tar xf krb5-#{version}.tar.gz", cwd: Config.source_dir
|
||||
command "tar xf krb5-#{version}.tar.gz", cwd: Omnibus::Config.source_dir
|
||||
|
||||
# 'configure' will detect libkeyutils and set up the krb5 build
|
||||
# to link against it. This gives us trouble during the Omnibus 'health
|
||||
|
@ -36,8 +36,8 @@ build do
|
|||
patch source: 'disable-keyutils.patch', target: 'src/configure'
|
||||
|
||||
command "./configure" \
|
||||
" --prefix=#{install_dir}/embedded --without-system-verto", env: env, cwd: "#{Config.source_dir}/krb5-#{version}/src"
|
||||
" --prefix=#{install_dir}/embedded --without-system-verto", env: env, cwd: "#{Omnibus::Config.source_dir}/krb5-#{version}/src"
|
||||
|
||||
command "make -j #{max_build_jobs}", env: env, cwd: "#{Config.source_dir}/krb5-#{version}/src"
|
||||
command "make install", cwd: "#{Config.source_dir}/krb5-#{version}/src"
|
||||
command "make -j #{workers}", env: env, cwd: "#{Omnibus::Config.source_dir}/krb5-#{version}/src"
|
||||
command "make install", cwd: "#{Omnibus::Config.source_dir}/krb5-#{version}/src"
|
||||
end
|
||||
|
|
|
@ -31,8 +31,8 @@ build do
|
|||
command "./configure" \
|
||||
" --prefix=#{install_dir}/embedded", env: env
|
||||
|
||||
command "make -j #{max_build_jobs}", env: env
|
||||
command "make -j #{max_build_jobs} install", env: env
|
||||
command "make -j #{workers}", env: env
|
||||
command "make -j #{workers} install", env: env
|
||||
|
||||
# libffi's default install location of header files is awful...
|
||||
copy "#{install_dir}/embedded/lib/libffi-#{version}/include/*", "#{install_dir}/embedded/include"
|
||||
|
|
|
@ -43,5 +43,5 @@ build do
|
|||
]
|
||||
mkdir build_dir
|
||||
command "cmake .. #{cmake_options.join(' ')}", env: env, cwd: build_dir
|
||||
command "make -j #{max_build_jobs} install", env: env, cwd: build_dir
|
||||
command "make -j #{workers} install", env: env, cwd: build_dir
|
||||
end
|
||||
|
|
|
@ -36,6 +36,6 @@ build do
|
|||
"--without-samples"
|
||||
].join(" "), :env => env
|
||||
|
||||
command "make -j #{max_build_jobs}", :env => env
|
||||
command "make -j #{workers}", :env => env
|
||||
command "make install"
|
||||
end
|
||||
|
|
|
@ -58,6 +58,6 @@ build do
|
|||
].join(" "), :env => env
|
||||
|
||||
%w{libmysql client include}.each do |target|
|
||||
command "make -j #{max_build_jobs} install", :env => env, :cwd => "#{project_dir}/#{target}"
|
||||
command "make -j #{workers} install", :env => env, :cwd => "#{project_dir}/#{target}"
|
||||
end
|
||||
end
|
||||
|
|
|
@ -37,6 +37,6 @@ build do
|
|||
"--with-debug",
|
||||
"--with-ld-opt=-L#{install_dir}/embedded/lib",
|
||||
"--with-cc-opt=\"-L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include\""].join(" ")
|
||||
command "make -j #{max_build_jobs}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
|
||||
command "make -j #{workers}", :env => {"LD_RUN_PATH" => "#{install_dir}/embedded/lib"}
|
||||
command "make install"
|
||||
end
|
||||
|
|
|
@ -1,159 +0,0 @@
|
|||
#
|
||||
# Copyright 2012-2014 Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
name "openssl"
|
||||
|
||||
dependency "zlib"
|
||||
dependency "cacerts"
|
||||
dependency "libgcc"
|
||||
dependency "makedepend"
|
||||
|
||||
|
||||
if Ohai["platform"] == "aix"
|
||||
# XXX: OpenSSL has an open bug on 1.0.1e where it fails to install on AIX
|
||||
# http://rt.openssl.org/Ticket/Display.html?id=2986&user=guest&pass=guest
|
||||
default_version "1.0.1c"
|
||||
source url: "http://www.openssl.org/source/openssl-1.0.1c.tar.gz",
|
||||
md5: "ae412727c8c15b67880aef7bd2999b2e"
|
||||
else
|
||||
default_version "1.0.1m"
|
||||
source url: "https://www.openssl.org/source/openssl-1.0.1m.tar.gz",
|
||||
md5: "d143d1555d842a069cb7cc34ba745a06"
|
||||
end
|
||||
|
||||
relative_path "openssl-#{version}"
|
||||
|
||||
build do
|
||||
patch :source => "openssl-1.0.1f-do-not-build-docs.patch"
|
||||
|
||||
env = case Ohai["platform"]
|
||||
when "mac_os_x"
|
||||
{
|
||||
"CFLAGS" => "-arch x86_64 -m64 -L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include -I#{install_dir}/embedded/include/ncurses",
|
||||
"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"
|
||||
}
|
||||
when "aix"
|
||||
{
|
||||
"CC" => "xlc -q64",
|
||||
"CXX" => "xlC -q64",
|
||||
"LD" => "ld -b64",
|
||||
"CFLAGS" => "-q64 -I#{install_dir}/embedded/include -O",
|
||||
"CXXFLAGS" => "-q64 -I#{install_dir}/embedded/include -O",
|
||||
"LDFLAGS" => "-q64 -L#{install_dir}/embedded/lib -Wl,-blibpath:#{install_dir}/embedded/lib:/usr/lib:/lib",
|
||||
"OBJECT_MODE" => "64",
|
||||
"AR" => "/usr/bin/ar",
|
||||
"ARFLAGS" => "-X64 cru",
|
||||
"M4" => "/opt/freeware/bin/m4",
|
||||
}
|
||||
when "solaris2"
|
||||
{
|
||||
"CFLAGS" => "-L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include",
|
||||
"LDFLAGS" => "-R#{install_dir}/embedded/lib -L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include -static-libgcc",
|
||||
"LD_OPTIONS" => "-R#{install_dir}/embedded/lib"
|
||||
}
|
||||
else
|
||||
{
|
||||
"CFLAGS" => "-I#{install_dir}/embedded/include",
|
||||
"LDFLAGS" => "-Wl,-rpath,#{install_dir}/embedded/lib -L#{install_dir}/embedded/lib"
|
||||
}
|
||||
end
|
||||
|
||||
common_args = [
|
||||
"--prefix=#{install_dir}/embedded",
|
||||
"--with-zlib-lib=#{install_dir}/embedded/lib",
|
||||
"--with-zlib-include=#{install_dir}/embedded/include",
|
||||
"no-idea",
|
||||
"no-mdc2",
|
||||
"no-rc5",
|
||||
"zlib",
|
||||
"shared",
|
||||
].join(" ")
|
||||
|
||||
configure_command = case Ohai["platform"]
|
||||
when "aix"
|
||||
["perl", "./Configure",
|
||||
"aix64-cc",
|
||||
common_args,
|
||||
"-L#{install_dir}/embedded/lib",
|
||||
"-I#{install_dir}/embedded/include",
|
||||
"-Wl,-blibpath:#{install_dir}/embedded/lib:/usr/lib:/lib"].join(" ")
|
||||
when "mac_os_x"
|
||||
["./Configure",
|
||||
"darwin64-x86_64-cc",
|
||||
common_args,
|
||||
].join(" ")
|
||||
when "smartos"
|
||||
["/bin/bash ./Configure",
|
||||
"solaris64-x86_64-gcc",
|
||||
common_args,
|
||||
"-L#{install_dir}/embedded/lib",
|
||||
"-I#{install_dir}/embedded/include",
|
||||
"-R#{install_dir}/embedded/lib",
|
||||
"-static-libgcc"].join(" ")
|
||||
when "solaris2"
|
||||
if Config.solaris_compiler == "gcc"
|
||||
if Ohai["kernel"]["machine"] =~ /sun/
|
||||
["/bin/sh ./Configure",
|
||||
"solaris-sparcv9-gcc",
|
||||
common_args,
|
||||
"-L#{install_dir}/embedded/lib",
|
||||
"-I#{install_dir}/embedded/include",
|
||||
"-R#{install_dir}/embedded/lib",
|
||||
"-static-libgcc"].join(" ")
|
||||
else
|
||||
# This should not require a /bin/sh, but without it we get
|
||||
# Errno::ENOEXEC: Exec format error
|
||||
["/bin/sh ./Configure",
|
||||
"solaris-x86-gcc",
|
||||
common_args,
|
||||
"-L#{install_dir}/embedded/lib",
|
||||
"-I#{install_dir}/embedded/include",
|
||||
"-R#{install_dir}/embedded/lib",
|
||||
"-static-libgcc"].join(" ")
|
||||
end
|
||||
else
|
||||
raise "sorry, we don't support building openssl on non-gcc solaris builds right now."
|
||||
end
|
||||
else
|
||||
["./config",
|
||||
common_args,
|
||||
"disable-gost", # fixes build on linux, but breaks solaris
|
||||
"-L#{install_dir}/embedded/lib",
|
||||
"-I#{install_dir}/embedded/include",
|
||||
"-Wl,-rpath,#{install_dir}/embedded/lib"].join(" ")
|
||||
end
|
||||
|
||||
# openssl build process uses a `makedepend` tool that we build inside the bundle.
|
||||
env["PATH"] = "#{install_dir}/embedded/bin" + File::PATH_SEPARATOR + ENV["PATH"]
|
||||
|
||||
# @todo: move into omnibus
|
||||
has_gmake = env['PATH'].split(File::PATH_SEPARATOR).any? do |path|
|
||||
File.executable?(File.join(path, 'gmake'))
|
||||
end
|
||||
|
||||
if has_gmake
|
||||
env.merge!("MAKE" => "gmake")
|
||||
make_binary = "gmake"
|
||||
else
|
||||
make_binary = "make"
|
||||
end
|
||||
|
||||
command configure_command, env: env
|
||||
command "#{make_binary} depend", env: env
|
||||
# make -j N on openssl is not reliable
|
||||
command "#{make_binary}", env: env
|
||||
command "#{make_binary} install", env: env
|
||||
end
|
|
@ -1,130 +0,0 @@
|
|||
#
|
||||
# Copyright 2012-2014 Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
name "ruby"
|
||||
default_version "1.9.3-p547"
|
||||
|
||||
dependency "zlib"
|
||||
dependency "ncurses"
|
||||
dependency "libedit"
|
||||
dependency "openssl"
|
||||
dependency "libyaml"
|
||||
dependency "libiconv"
|
||||
dependency "libffi"
|
||||
dependency "gdbm"
|
||||
dependency "libgcc" if Ohai['platform'] == "solaris2"
|
||||
|
||||
version("1.9.3-p484") { source md5: "8ac0dee72fe12d75c8b2d0ef5d0c2968" }
|
||||
version("1.9.3-p547") { source md5: "7531f9b1b35b16f3eb3d7bea786babfd" }
|
||||
version("2.1.1") { source md5: "e57fdbb8ed56e70c43f39c79da1654b2" }
|
||||
version("2.1.2") { source md5: "a5b5c83565f8bd954ee522bd287d2ca1" }
|
||||
version("2.1.4") { source md5: "89b2f4a197621346f6724a3c35535b19" }
|
||||
version("2.1.5") { source md5: "df4c1b23f624a50513c7a78cb51a13dc" }
|
||||
|
||||
source url: "http://cache.ruby-lang.org/pub/ruby/#{version.match(/^(\d+\.\d+)/)[0]}/ruby-#{version}.tar.gz"
|
||||
|
||||
relative_path "ruby-#{version}"
|
||||
|
||||
env = with_standard_compiler_flags(with_embedded_path)
|
||||
|
||||
case Ohai['platform']
|
||||
when "mac_os_x"
|
||||
# -Qunused-arguments suppresses "argument unused during compilation"
|
||||
# warnings. These can be produced if you compile a program that doesn't
|
||||
# link to anything in a path given with -Lextra-libs. Normally these
|
||||
# would be harmless, except that autoconf treats any output to stderr as
|
||||
# a failure when it makes a test program to check your CFLAGS (regardless
|
||||
# of the actual exit code from the compiler).
|
||||
env['CFLAGS'] << " -I#{install_dir}/embedded/include/ncurses -arch x86_64 -m64 -O3 -g -pipe -Qunused-arguments"
|
||||
env['LDFLAGS'] << " -arch x86_64"
|
||||
when "aix"
|
||||
# -O2/O3 optimized away some configure test which caused ext libs to fail, so aix only gets -O
|
||||
#
|
||||
# We also need prezl's M4 instead of picking up /usr/bin/m4 which
|
||||
# barfs on ruby.
|
||||
#
|
||||
# I believe -qhot was necessary to prevent segfaults in threaded libs
|
||||
#
|
||||
env['CFLAGS'] << " -q64 -qhot"
|
||||
env['M4'] = "/opt/freeware/bin/m4"
|
||||
env['warnflags'] = "-qinfo=por"
|
||||
else # including solaris, linux
|
||||
env['CFLAGS'] << " -O3 -g -pipe"
|
||||
end
|
||||
|
||||
build do
|
||||
configure_command = ["./configure",
|
||||
"--prefix=#{install_dir}/embedded",
|
||||
"--with-out-ext=dbm",
|
||||
"--enable-shared",
|
||||
"--enable-libedit",
|
||||
"--with-ext=psych",
|
||||
"--disable-install-doc",
|
||||
"--without-gmp"]
|
||||
|
||||
case Ohai['platform']
|
||||
when "aix"
|
||||
patch source: "ruby-aix-configure.patch", plevel: 1
|
||||
patch source: "ruby_aix_1_9_3_448_ssl_EAGAIN.patch", plevel: 1
|
||||
# our openssl-1.0.1h links against zlib and mkmf tests will fail due to zlib symbols not being
|
||||
# found if we do not include -lz. this later leads to openssl functions being detected as not
|
||||
# being available and then internally vendored versions that have signature mismatches are pulled in
|
||||
# and the compile explodes. this problem may not be unique to AIX, but is severe on AIX.
|
||||
patch source: "ruby_aix_openssl.patch", plevel: 1
|
||||
# --with-opt-dir causes ruby to send bogus commands to the AIX linker
|
||||
when "freebsd"
|
||||
configure_command << "--without-execinfo"
|
||||
configure_command << "--with-opt-dir=#{install_dir}/embedded"
|
||||
when "smartos"
|
||||
# Opscode patch - someara@opscode.com
|
||||
# GCC 4.7.0 chokes on mismatched function types between OpenSSL 1.0.1c and Ruby 1.9.3-p286
|
||||
patch source: "ruby-openssl-1.0.1c.patch", plevel: 1
|
||||
|
||||
# Patches taken from RVM.
|
||||
# http://bugs.ruby-lang.org/issues/5384
|
||||
# https://www.illumos.org/issues/1587
|
||||
# https://github.com/wayneeseguin/rvm/issues/719
|
||||
patch source: "rvm-cflags.patch", plevel: 1
|
||||
|
||||
# From RVM forum
|
||||
# https://github.com/wayneeseguin/rvm/commit/86766534fcc26f4582f23842a4d3789707ce6b96
|
||||
configure_command << "ac_cv_func_dl_iterate_phdr=no"
|
||||
configure_command << "--with-opt-dir=#{install_dir}/embedded"
|
||||
else
|
||||
configure_command << "--with-opt-dir=#{install_dir}/embedded"
|
||||
end
|
||||
|
||||
# @todo: move into omnibus
|
||||
has_gmake = env['PATH'].split(File::PATH_SEPARATOR).any? do |path|
|
||||
File.executable?(File.join(path, 'gmake'))
|
||||
end
|
||||
|
||||
if has_gmake
|
||||
env.merge!('MAKE' => 'gmake')
|
||||
make_binary = 'gmake'
|
||||
else
|
||||
make_binary = 'make'
|
||||
end
|
||||
|
||||
# FFS: works around a bug that infects AIX when it picks up our pkg-config
|
||||
# AFAIK, ruby does not need or use this pkg-config it just causes the build to fail.
|
||||
# The alternative would be to patch configure to remove all the pkg-config garbage entirely
|
||||
env.merge!("PKG_CONFIG" => "/bin/true") if Ohai['platform'] == "aix"
|
||||
|
||||
command configure_command.join(" "), env: env
|
||||
command "#{make_binary} -j #{max_build_jobs}", env: env
|
||||
command "#{make_binary} -j #{max_build_jobs} install", env: env
|
||||
end
|
Loading…
Reference in New Issue