Skip to content
Snippets Groups Projects
Commit 4ff068a3 authored by Stan Hu's avatar Stan Hu
Browse files

Drop reinstall of google-protobuf and use precompiled gems

https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/1372
reinstalled the google-protobuf gem because as shown in
https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/2042, the
precompiled gem of google-protobuf didn't work on CentOS 6 due to
glibc compatibility issues.

However, since then we've dropped support for CentOS 6. The
precompiled gem is built with `manylinux2014_x86_64`, which is CentOS
7. We already use precompiled gems for `grpc` (which also compiles
google-protobuf), `prometheus-client-mmap`, and `nokogiri`, so there's
no reason `google-protobuf` should be an exception.

Using the precompiled gem speeds build times and avoids build issues
with CentOS 7 and SLES 12.5.

Relates to https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/7818

Changelog: changed
parent 3f7dd9d4
No related branches found
No related tags found
1 merge request!100Upstream Merge of 16.1 CE branching point
......@@ -132,21 +132,8 @@
end
end
# One of our gems, google-protobuf is known to have issues with older gcc versions
# when using the pre-built extensions. We will remove it and rebuild it here.
block 'reinstall google-protobuf gem' do
require 'fileutils'
unless OhaiHelper.ruby_native_gems_unsupported?
current_gem = shellout!("#{embedded_bin('bundle')} show | grep google-protobuf", env: env).stdout
protobuf_version = current_gem[/google-protobuf \((.*)\)/, 1]
shellout!("#{embedded_bin('gem')} uninstall --force google-protobuf", env: env)
shellout!("#{embedded_bin('gem')} install google-protobuf --version #{protobuf_version} --platform=ruby", env: env)
end
end
block 'delete unneeded precompiled shared libraries' do
next if OhaiHelper.ruby_native_gems_unsupported?
ruby_ver = shellout!("#{embedded_bin('ruby')} -e 'puts RUBY_VERSION.match(/\\d+\\.\\d+/)[0]'", env: env).stdout.chomp
gem_paths = {
......@@ -148,8 +135,9 @@
block 'delete unneeded precompiled shared libraries' do
next if OhaiHelper.ruby_native_gems_unsupported?
ruby_ver = shellout!("#{embedded_bin('ruby')} -e 'puts RUBY_VERSION.match(/\\d+\\.\\d+/)[0]'", env: env).stdout.chomp
gem_paths = {
'google-protobuf' => 'lib/google',
'grpc' => 'src/ruby/lib/grpc',
'prometheus-client-mmap' => 'lib',
'nokogiri' => 'lib'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment