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>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=gitaly
pkgver=15.3.3
pkgrel=0
pkgrel=1
pkgdesc="A Git RPC service for handling all the git calls made by GitLab"
url="https://gitlab.com/gitlab-org/gitaly/"
arch="all"
@ -35,8 +36,7 @@ subpackages="
$pkgname-blackbox
$pkgname-praefect
"
# FIXME: Makefile clones libgit2 and git repositories.
source="https://gitlab.com/gitlab-org/$pkgname/-/archive/v$pkgver/$pkgname-v$pkgver.tar.gz
source="https://gitlab.com/gitlab-org/gitaly/-/archive/v$pkgver/gitaly-v$pkgver.tar.gz
gemfile-use-local-grpc.patch
libgit-1.4-compat.patch
config.patch
@ -56,14 +56,16 @@ 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.
mkdir -p ruby/vendor/grpc
cp -r "$sysgemdir"/gems/grpc-*/* ruby/vendor/grpc/
cp "$sysgemdir"/specifications/grpc-*.gemspec \
ruby/vendor/grpc/grpc.gemspec
cp "$sysgemdir"/extensions/*/*/grpc-*/grpc/*.so \
ruby/vendor/grpc/src/ruby/lib/grpc/
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 \
ruby/vendor/$i/$i.gemspec
cp "$sysgemdir"/extensions/*/*/$i-*/$i/*.so \
ruby/vendor/$i/src/ruby/lib/$i/
done
}
build() {
@ -76,6 +78,8 @@ build() {
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"
bundle config --local without "$BUNDLE_WITHOUT"
bundle install --no-cache
@ -123,20 +127,21 @@ package() {
cd "$rubydir"/vendor/bundle/ruby/*/gems
# Remove tests, docs and other unnecessary files.
rm -Rf */benchmark \
*/spec \
*/test \
*/tests \
*/appveyor.yml \
*/*.md \
*/*.rdoc \
*/*.txt \
*/CHANGELOG* \
*/CHANGES* \
*/CONTRIBUT* \
*/*LICENSE* \
*/Rakefile \
*/README*
rm -Rf \
./*/benchmark \
./*/spec \
./*/test \
./*/tests \
./*/appveyor.yml \
./*/*.md \
./*/*.rdoc \
./*/*.txt \
./*/CHANGELOG* \
./*/CHANGES* \
./*/CONTRIBUT* \
./*/*LICENSE* \
./*/Rakefile \
./*/README*
# Remove bundled libgit2 and pg_query sources.
rm -R rugged-*/vendor/libgit2