Skip to content

Commit 34b517e

Browse files
committed
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
1 parent d40cc26 commit 34b517e

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

config/software/gitlab-rails.rb

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -132,24 +132,12 @@
132132
end
133133
end
134134

135-
# One of our gems, google-protobuf is known to have issues with older gcc versions
136-
# when using the pre-built extensions. We will remove it and rebuild it here.
137-
block 'reinstall google-protobuf gem' do
138-
require 'fileutils'
139-
140-
unless OhaiHelper.ruby_native_gems_unsupported?
141-
current_gem = shellout!("#{embedded_bin('bundle')} show | grep google-protobuf", env: env).stdout
142-
protobuf_version = current_gem[/google-protobuf \((.*)\)/, 1]
143-
shellout!("#{embedded_bin('gem')} uninstall --force google-protobuf", env: env)
144-
shellout!("#{embedded_bin('gem')} install google-protobuf --version #{protobuf_version} --platform=ruby", env: env)
145-
end
146-
end
147-
148135
block 'delete unneeded precompiled shared libraries' do
149136
next if OhaiHelper.ruby_native_gems_unsupported?
150137

151138
ruby_ver = shellout!("#{embedded_bin('ruby')} -e 'puts RUBY_VERSION.match(/\\d+\\.\\d+/)[0]'", env: env).stdout.chomp
152139
gem_paths = {
140+
'google-protobuf' => 'lib/google',
153141
'grpc' => 'src/ruby/lib/grpc',
154142
'prometheus-client-mmap' => 'lib',
155143
'nokogiri' => 'lib'

0 commit comments

Comments
 (0)