user/gitaly: fix bundler config issues

This commit is contained in:
Antoine Martin 2023-03-14 16:08:00 -04:00
parent 2e2b6cea68
commit 37d1ce98d5
Signed by: forge
GPG key ID: D62A472A4AA7D541

View file

@ -1,8 +1,9 @@
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
# Contributor: Antoine Martin (ayakael) <dev@ayakael.net>
# Contributor: Jakub Jirutka <jakub@jirutka.cz> # Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=gitaly pkgname=gitaly
pkgver=15.3.3 pkgver=15.3.3
pkgrel=0 pkgrel=1
pkgdesc="A Git RPC service for handling all the git calls made by GitLab" pkgdesc="A Git RPC service for handling all the git calls made by GitLab"
url="https://gitlab.com/gitlab-org/gitaly/" url="https://gitlab.com/gitlab-org/gitaly/"
arch="all" arch="all"
@ -35,8 +36,7 @@ subpackages="
$pkgname-blackbox $pkgname-blackbox
$pkgname-praefect $pkgname-praefect
" "
# FIXME: Makefile clones libgit2 and git repositories. source="https://gitlab.com/gitlab-org/gitaly/-/archive/v$pkgver/gitaly-v$pkgver.tar.gz
source="https://gitlab.com/gitlab-org/$pkgname/-/archive/v$pkgver/$pkgname-v$pkgver.tar.gz
gemfile-use-local-grpc.patch gemfile-use-local-grpc.patch
libgit-1.4-compat.patch libgit-1.4-compat.patch
config.patch config.patch
@ -56,14 +56,16 @@ prepare() {
default_prepare default_prepare
# This Google gem is totally messed, so we copy our fixed version # Some gems are broken, so we copy our fixed version
# instead of installing it from RubyGems using Bundler. # instead of installing it from RubyGems using Bundler.
mkdir -p ruby/vendor/grpc for i in grpc; do
cp -r "$sysgemdir"/gems/grpc-*/* ruby/vendor/grpc/ mkdir -p ruby/vendor/$i/src/ruby/lib/$i
cp "$sysgemdir"/specifications/grpc-*.gemspec \ cp -r "$sysgemdir"/gems/$i-*/* ruby/vendor/$i/
ruby/vendor/grpc/grpc.gemspec cp "$sysgemdir"/specifications/$i-*.gemspec \
cp "$sysgemdir"/extensions/*/*/grpc-*/grpc/*.so \ ruby/vendor/$i/$i.gemspec
ruby/vendor/grpc/src/ruby/lib/grpc/ cp "$sysgemdir"/extensions/*/*/$i-*/$i/*.so \
ruby/vendor/$i/src/ruby/lib/$i/
done
} }
build() { build() {
@ -76,6 +78,8 @@ build() {
bundle config --local build.rugged --use-system-libraries bundle config --local build.rugged --use-system-libraries
# https://github.com/protocolbuffers/protobuf/issues/2335#issuecomment-579913357 # 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 build.google-protobuf --with-cflags=-D__va_copy=va_copy
bundle config --local path "vendor/bundle"
bundle config --local without "$BUNDLE_WITHOUT"
bundle install --no-cache bundle install --no-cache
@ -123,20 +127,21 @@ package() {
cd "$rubydir"/vendor/bundle/ruby/*/gems cd "$rubydir"/vendor/bundle/ruby/*/gems
# Remove tests, docs and other unnecessary files. # Remove tests, docs and other unnecessary files.
rm -Rf */benchmark \ rm -Rf \
*/spec \ ./*/benchmark \
*/test \ ./*/spec \
*/tests \ ./*/test \
*/appveyor.yml \ ./*/tests \
*/*.md \ ./*/appveyor.yml \
*/*.rdoc \ ./*/*.md \
*/*.txt \ ./*/*.rdoc \
*/CHANGELOG* \ ./*/*.txt \
*/CHANGES* \ ./*/CHANGELOG* \
*/CONTRIBUT* \ ./*/CHANGES* \
*/*LICENSE* \ ./*/CONTRIBUT* \
*/Rakefile \ ./*/*LICENSE* \
*/README* ./*/Rakefile \
./*/README*
# Remove bundled libgit2 and pg_query sources. # Remove bundled libgit2 and pg_query sources.
rm -R rugged-*/vendor/libgit2 rm -R rugged-*/vendor/libgit2