user/gitaly: do not use system libgit2

This commit is contained in:
Antoine Martin 2023-04-11 18:36:44 -04:00
parent 4e5ed4ab52
commit 31d1b7cf81
Signed by: forge
GPG key ID: D62A472A4AA7D541
2 changed files with 9 additions and 7 deletions

View file

@ -23,7 +23,7 @@ makedepends="
go
icu-dev
libffi-dev
libgit2-dev=~1.5.2
libgit2-dev=~1.5
libssh2-dev
libxml2-dev
libxslt-dev
@ -39,7 +39,7 @@ subpackages="
"
source="https://gitlab.com/gitlab-org/gitaly/-/archive/v$pkgver/gitaly-v$pkgver.tar.gz
gemfile-use-local-grpc.patch
libgit-1.5.2-compat.patch
libgit-1.5-compat.patch
config.patch
$pkgname.initd
"
@ -59,7 +59,7 @@ prepare() {
# Some gems are broken, so we copy our fixed version
# instead of installing it from RubyGems using Bundler.
for i in rugged; do
for i in grpc; do
mkdir -p ruby/vendor/$i/src/ruby/lib/$i
cp -r "$sysgemdir"/gems/$i-*/* ruby/vendor/$i/
cp "$sysgemdir"/specifications/$i-*.gemspec \
@ -76,7 +76,9 @@ build() {
bundle config --local build.nokogiri --use-system-libraries \
--with-xml2-include=/usr/include/libxml2 \
--with-xslt-include=/usr/include/libxslt
bundle config --local build.rugged --use-system-libraries
# building using system libraries broken on 1.5 due to
# https://github.com/libgit2/rugged/commit/9f9bce7e3346dfcf2a4256561e37ba8c888a16b6
# bundle config --local build.rugged --use-system-libraries
# https://github.com/protocolbuffers/protobuf/issues/2335#issuecomment-579913357
bundle config --local build.google-protobuf --with-cflags=-D__va_copy=va_copy
bundle config --local path "vendor/bundle"
@ -145,7 +147,7 @@ package() {
./*/README*
# Remove bundled pg_query sources.
rm -R rugged-*/vendor/libgit2
#rm -R rugged-*/vendor/libgit2
rm -R pg_query-*/ext
# Remove assets, they are not used in gitaly-ruby.
@ -191,7 +193,7 @@ praefect() {
sha512sums="
a3d4f929014df6f3e7034f493be9b27dcc1e820e42198582171a43c7ddf1bc9087329f13878f139a7d6dc1e6a92a76dabf26214409abe839d8f9508429f91ba0 gitaly-v15.3.3.tar.gz
ebcb7296696b9c2b47b7770a37ae13663cb0343659d482ef45717ef5548ede69eedee707763c6dfd73c60ef303e03fbe5502967783c59c00475a1a6d0c5ee128 gemfile-use-local-grpc.patch
f767ef16fbe708e6ca873242a8a4f53bf2f924ec3a901bce24af3fde36321004555d6161c96bfad0dbdbae9c19b5e8564d41e3b2e980a40bb199480ef69144f8 gemfile-use-local-rugged.patch
c0c0fb03baefae34e117750c8b27ee67b18f8202161cbc202371d2f916ca419b82e5df0d5c3db23d9e2bb12d205e03dab51f61cd9e4ede2d0abe96de47c76e3f libgit-1.5-compat.patch
8779e34b2a468a74c590ee29155e7b197eabcd323157b1e27208fa2f3100b31e1fd1ff80d7067198e66cfb1be506caedeecbfeb4e9f32aa5b8422455e1718e1a config.patch
c32105d921be16eaf559cf21d6840bc346cd92b5e37974cedecdb5a2d2ca1eb5e8fbb144f5fc8a1289bf9415102b313cf2d61ee510c80f08ab33a799f5ac7122 gitaly.initd
"

View file

@ -2,4 +2,4 @@
+++ b/ruby/Gemfile.lock
@@ -196 +196 @@
- rugged (1.2.0)
+ rugged (1.5.2)
+ rugged (1.5.1)