diff --git a/PKGBUILD b/PKGBUILD
index ec34cd1..80c43e0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -17,10 +17,12 @@ backup=("etc/gitlab-gitaly/config.toml")
 _tag=v${pkgver}
 source=("https://gitlab.com/gitlab-org/gitaly/-/archive/${_tag}/gitaly-${_tag}.tar.gz"
         "configs.patch"
+        "gitlab-gitaly-15.11.0-ruby-grpc-1.54.0.patch"
         "gitlab-gitaly.service"
 	"ruby27.patch")
 sha512sums=('49b04cfdb3eed5cdaaa02228233a383cec12b9d716fdd3a742168714e784653579538bb40742f7db09e9ca9e9b7c23a073a116ebb86c84de46f107e1274487da'
             '9b824a791c7f563857e99a7faad013d50eb1ca93d49089742dd7ccdfbb325c1c4a48db4dc83820fda5dfedfbd3e2b03c786c8fa0f2eb3c4b78ce3bbeefb97584'
+            '7ef9cba040c0013dbc7a30a48e8b6b18036e260c495e71922ed305b660f4d92b08e0fb066fbe51bbd0dc79e38c85d29c02085a71a7e5c3c13ddadbb2489cdd9a'
             '7f5cd528c873a5e43e18aa6a88bd7298422c047e0e61cf3208be7d9fcfdfdc8a844b5c439ab6afc2098c5c4c60ed9c3d167c2f87517f1e93b34f39be3d3dad09'
             '2e4171e42cf7d5be91ef58e720b53159c1cdc4cb6932e9044094a99e9ee21ee8792067c0f539e11336c59748ea03291c069ff265cdaf5b4aea4b14f6d0929bd8')
 
@@ -29,6 +31,9 @@ prepare() {
 
   patch -p1 < ../ruby27.patch
 
+  # Update grpc gem to v1.54.0 needed to build with gcc 13
+  patch -p1 < ../gitlab-gitaly-15.11.0-ruby-grpc-1.54.0.patch
+
   patch -p1 < ../configs.patch
   # At this point the config file should not contain any references to '/home/git'
 
diff --git a/gitlab-gitaly-15.11.0-ruby-grpc-1.54.0.patch b/gitlab-gitaly-15.11.0-ruby-grpc-1.54.0.patch
new file mode 100644
index 0000000..aa7f726
--- /dev/null
+++ b/gitlab-gitaly-15.11.0-ruby-grpc-1.54.0.patch
@@ -0,0 +1,66 @@
+diff --git a/ruby/Gemfile b/ruby/Gemfile
+index f247c46..f15e40b 100644
+--- a/ruby/Gemfile
++++ b/ruby/Gemfile
+@@ -3,7 +3,7 @@ source 'https://rubygems.org'
+ gem 'rugged', '~> 1.5.1'
+ gem 'gitlab-markup', '~> 1.8.0'
+ gem 'activesupport', '~> 6.1.7.2'
+-gem 'grpc', '~> 1.42.0' # keep in lock-step with grpc-tools in ../tools/protogem
++gem 'grpc', '~> 1.54.0' # keep in lock-step with grpc-tools in ../tools/protogem
+ gem 'sentry-raven', '~> 3.1', require: false
+ gem 'rbtrace', require: false
+ 
+diff --git a/ruby/Gemfile.lock b/ruby/Gemfile.lock
+index bd66bc2..87bd95e 100644
+--- a/ruby/Gemfile.lock
++++ b/ruby/Gemfile.lock
+@@ -59,8 +59,8 @@ GEM
+     google-protobuf (3.22.3)
+     googleapis-common-protos-types (1.4.0)
+       google-protobuf (~> 3.14)
+-    grpc (1.42.0)
+-      google-protobuf (~> 3.18)
++    grpc (1.54.0)
++      google-protobuf (~> 3.21)
+       googleapis-common-protos-types (~> 1.0)
+     i18n (1.12.0)
+       concurrent-ruby (~> 1.0)
+@@ -191,7 +191,7 @@ DEPENDENCIES
+   gitlab-license_finder
+   gitlab-markup (~> 1.8.0)
+   google-protobuf (~> 3.22.3)
+-  grpc (~> 1.42.0)
++  grpc (~> 1.54.0)
+   licensee (~> 9.15)
+   nokogiri (~> 1.14)
+   pry (~> 0.13.1)
+diff --git a/tools/protogem/Gemfile b/tools/protogem/Gemfile
+index 9cafb75..adf2465 100644
+--- a/tools/protogem/Gemfile
++++ b/tools/protogem/Gemfile
+@@ -1,3 +1,3 @@
+ source 'https://rubygems.org'
+ 
+-gem 'grpc-tools', '~> 1.42.0'
++gem 'grpc-tools', '~> 1.54.0'
+diff --git a/tools/protogem/Gemfile.lock b/tools/protogem/Gemfile.lock
+index 57b2bf6..ee20cd7 100644
+--- a/tools/protogem/Gemfile.lock
++++ b/tools/protogem/Gemfile.lock
+@@ -1,13 +1,13 @@
+ GEM
+   remote: https://rubygems.org/
+   specs:
+-    grpc-tools (1.42.0)
++    grpc-tools (1.54.0)
+ 
+ PLATFORMS
+   ruby
+ 
+ DEPENDENCIES
+-  grpc-tools (~> 1.42.0)
++  grpc-tools (~> 1.54.0)
+ 
+ BUNDLED WITH
+    2.3.24