ayaports/user/gitaly/gemfile-use-local-grpc.patch

54 lines
1.5 KiB
Diff
Raw Normal View History

2023-01-11 13:38:29 +00:00
From: Jakub Jirutka <jakub@jirutka.cz>
Date: Wed, 07 Mar 2018 17:24:00 +0200
Subject: Don't fetch grpc gem from RubyGems
Grpc gem is total shit, doesn't build from source without patching,
embeds three third-party libs including Google's very own fork of
OpenSSL and root CAs, contains a lot of bloat etc.
Therefore I install this shit from my Alpine package and
copy it into vendor/ before running bundler.
This patch also downgrades grpc and google-protobuf (reverts
https://gitlab.com/gitlab-org/gitaly/-/commit/7fbf17ddbd385b014d284b78dbaf832310e41add)
to the same version gitlab-foss uses. It's just to avoid dealing with
ruby-grpc upgrade.
--- a/ruby/Gemfile
+++ b/ruby/Gemfile
@@ -10 +10,2 @@
-gem 'grpc', '~> 1.42.0' # keep in lock-step with grpc-tools
+# This Google gem is totally messed, we handle it specially.
+gem 'grpc', path: 'vendor/grpc', require: false
--- a/ruby/Gemfile.lock
+++ b/ruby/Gemfile.lock
@@ -1,3 +1,9 @@
+PATH
+ remote: vendor/grpc
+ specs:
+ grpc (1.42.0)
+ google-protobuf (~> 3.18)
+
GEM
remote: https://rubygems.org/
specs:
@@ -84,9 +90,6 @@
google-protobuf (3.21.3)
googleapis-common-protos-types (1.3.0)
google-protobuf (~> 3.14)
- grpc (1.42.0)
- google-protobuf (~> 3.18)
- googleapis-common-protos-types (~> 1.0)
grpc-tools (1.42.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
@@ -235,7 +238,7 @@
gitlab-license_finder
gitlab-markup (~> 1.7.1)
google-protobuf (~> 3.21.0)
- grpc (~> 1.42.0)
+ grpc!
grpc-tools (~> 1.42.0)
licensee (~> 9.14.1)
pry (~> 0.12.2)