[arch-commits] Commit in gitlab-gitaly/trunk (PKGBUILD ruby2.5.patch)
Anatol Pomozov
anatolik at archlinux.org
Fri Dec 27 20:20:48 UTC 2019
Date: Friday, December 27, 2019 @ 20:20:47
Author: anatolik
Revision: 543285
upgpkg: gitlab-gitaly 1.78.0-1: Port package to ruby 2.6
Modified:
gitlab-gitaly/trunk/PKGBUILD
Deleted:
gitlab-gitaly/trunk/ruby2.5.patch
---------------+
PKGBUILD | 15 ++---
ruby2.5.patch | 144 --------------------------------------------------------
2 files changed, 6 insertions(+), 153 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-12-27 20:13:07 UTC (rev 543284)
+++ PKGBUILD 2019-12-27 20:20:47 UTC (rev 543285)
@@ -4,21 +4,19 @@
# commit log for an old fix on how to tell it to use older versions of Ruby. I'm afraid we'll
# need this again at some point in the future.
pkgname=gitlab-gitaly
-pkgver=1.67.0
-pkgrel=2
+pkgver=1.78.0
+pkgrel=1
pkgdesc="Speed up Git access using caching"
arch=('x86_64')
url="https://gitlab.com/gitlab-org/gitaly"
license=('MIT')
-depends=(glibc ruby2.5 libxml2 libxslt)
+depends=(glibc ruby libxml2 libxslt libssh2)
options=(!buildflags)
-makedepends=(go ruby2.5-bundler cmake)
+makedepends=(go ruby-bundler cmake)
backup=("etc/gitlab-gitaly/config.toml")
source=("${pkgname}-${pkgver}.tar.gz::https://gitlab.com/api/v4/projects/gitlab-org%2Fgitaly/repository/archive?sha=v${pkgver}"
- ruby2.5.patch
"gitlab-gitaly.service")
-sha512sums=('728b9449b5c2e2394d16e3001709022c148ada9c98a64a3d3108951fcfffaf0540d891e852d84a3f8e9ce6c7cad5b1b0815de855c8e181f55f63c8a9d0892e03'
- 'a82c15379900fde6f88a96bbdeb0029cab9b785ef7248f7f7f395af8aa812ba7fc94f933d07f560011e00c4853278b091660b3b0a1d852514c197ce0df205f61'
+sha512sums=('2b984a43f10f7189c5188b58a686bf3b60f7001582efaba69f4e9153cbf5562eb282f242b0dbd6e395bbf0e528d08786b308147e1c67b10616fdbbbc3ebd0df3'
'b330c0f42592322ad2131079ca554a13a364007182dded8c556198caff2c9ec642acf5bb7dfecb05de5a3d89bffec6588b6d05c8c7c5c771a46df3d296deed28')
_homedir="/var/lib/gitlab"
@@ -26,8 +24,6 @@
prepare() {
cd "gitaly-"*
- patch -Np1 -i "$srcdir"/ruby2.5.patch
-
sed -i "s|dir = \"/home/git/gitaly/ruby\"|dir = \"/usr/share/webapps/gitlab-gitaly/ruby\"|" config.toml.example
sed -i "s|dir = \"/home/git/gitlab-shell\"|dir = \"/usr/share/webapps/gitlab-shell\"|" config.toml.example
sed -i "s|bin_dir = \"/home/git/gitaly\"|bin_dir = \"/usr/bin\"|" config.toml.example
@@ -39,6 +35,7 @@
build() {
cd "gitaly-"*
+ bundle config force_ruby_platform true # build from sources as some prebuilt gems are not available for newer ruby
make BUILD_TAGS="tracer_static tracer_static_jaeger"
}
Deleted: ruby2.5.patch
===================================================================
--- ruby2.5.patch 2019-12-27 20:13:07 UTC (rev 543284)
+++ ruby2.5.patch 2019-12-27 20:20:47 UTC (rev 543285)
@@ -1,144 +0,0 @@
-diff --git a/_support/Makefile.template b/_support/Makefile.template
-index 592c1e7f..a1eef028 100644
---- a/_support/Makefile.template
-+++ b/_support/Makefile.template
-@@ -55,8 +55,8 @@ build: ../.ruby-bundle
- # step. Both Omnibus and CNG assume it is in the Gitaly root, not in
- # _build. Hence the '../' in front.
- ../.ruby-bundle: {{ .GitalyRubyDir }}/Gemfile.lock {{ .GitalyRubyDir }}/Gemfile
-- cd {{ .GitalyRubyDir }} && bundle config # for debugging
-- cd {{ .GitalyRubyDir }} && bundle install $(BUNDLE_FLAGS)
-+ cd {{ .GitalyRubyDir }} && bundle-2.5 config # for debugging
-+ cd {{ .GitalyRubyDir }} && bundle-2.5 install $(BUNDLE_FLAGS)
- touch $@
-
- .PHONY: install
-@@ -135,12 +135,12 @@ race-go: prepare-tests
-
- .PHONY: rspec
- rspec: assemble-go prepare-tests
-- cd {{ .GitalyRubyDir }} && bundle exec rspec
-+ cd {{ .GitalyRubyDir }} && bundle-2.5 exec rspec
-
- .PHONY: rspec-gitlab-shell
- rspec-gitlab-shell: {{ .GitlabShellDir }}/config.yml assemble-go prepare-tests
- # rspec in {{ .GitlabShellRelDir }}
-- @cd {{ .GitalyRubyDir }} && bundle exec bin/ruby-cd {{ .GitlabShellDir }} rspec
-+ @cd {{ .GitalyRubyDir }} && bundle-2.5 exec bin/ruby-cd {{ .GitlabShellDir }} rspec
-
- .PHONY: verify
- verify: check-mod-tidy lint check-formatting staticcheck notice-up-to-date check-proto rubocop
-@@ -217,7 +217,7 @@ check-proto: proto no-changes
-
- .PHONY: rubocop
- rubocop: ../.ruby-bundle
-- cd {{ .GitalyRubyDir }} && bundle exec rubocop --parallel
-+ cd {{ .GitalyRubyDir }} && bundle-2.5 exec rubocop --parallel
-
- .PHONY: cover
- cover: prepare-tests {{ .GoCovMerge }}
-diff --git a/go.mod b/go.mod
-index 3302cc02..86cabc19 100644
---- a/go.mod
-+++ b/go.mod
-@@ -23,3 +23,5 @@ require (
- google.golang.org/grpc v1.16.0
- gopkg.in/yaml.v2 v2.2.2
- )
-+
-+go 1.13
-diff --git a/internal/linguist/linguist.go b/internal/linguist/linguist.go
-index 419f2299..86cdb2ff 100644
---- a/internal/linguist/linguist.go
-+++ b/internal/linguist/linguist.go
-@@ -103,7 +103,7 @@ func LoadColors(cfg config.Cfg) error {
- }
-
- func startGitLinguist(ctx context.Context, repoPath string, commitID string, linguistCommand string) (io.Reader, error) {
-- cmd := exec.Command("bundle", "exec", "bin/ruby-cd", repoPath, "git-linguist", "--commit="+commitID, linguistCommand)
-+ cmd := exec.Command("bundle-2.5", "exec", "bin/ruby-cd", repoPath, "git-linguist", "--commit="+commitID, linguistCommand)
- cmd.Dir = config.Config.Ruby.Dir
-
- var env []string
-@@ -136,7 +136,7 @@ func openLanguagesJSON(cfg config.Cfg) (io.ReadCloser, error) {
- // We use a symlink because we cannot trust Bundler to not print garbage
- // on its stdout.
- rubyScript := `FileUtils.ln_sf(Bundler.rubygems.find_name('github-linguist').first.full_gem_path, ARGV.first)`
-- cmd := exec.Command("bundle", "exec", "ruby", "-rfileutils", "-e", rubyScript, linguistPathSymlink.Name())
-+ cmd := exec.Command("bundle-2.5", "exec", "ruby-2.5", "-rfileutils", "-e", rubyScript, linguistPathSymlink.Name())
- cmd.Dir = config.Config.Ruby.Dir
-
- // We have learned that in practice the command we are about to run is a
-diff --git a/internal/rubyserver/rubyserver.go b/internal/rubyserver/rubyserver.go
-index b9cc7d19..845060db 100644
---- a/internal/rubyserver/rubyserver.go
-+++ b/internal/rubyserver/rubyserver.go
-@@ -145,7 +145,7 @@ func (s *Server) start() error {
- // Use 'ruby-cd' to make sure gitaly-ruby has the same working directory
- // as the current process. This is a hack to sort-of support relative
- // Unix socket paths.
-- args := []string{"bundle", "exec", "bin/ruby-cd", wd, gitalyRuby, strconv.Itoa(os.Getpid()), socketPath}
-+ args := []string{"bundle-2.5", "exec", "bin/ruby-cd", wd, gitalyRuby, strconv.Itoa(os.Getpid()), socketPath}
-
- events := make(chan supervisor.Event)
- check := func() error { return ping(socketPath) }
-diff --git a/ruby/bin/gitaly-ruby b/ruby/bin/gitaly-ruby
-index 4e608739..8e725c66 100755
---- a/ruby/bin/gitaly-ruby
-+++ b/ruby/bin/gitaly-ruby
-@@ -1,4 +1,4 @@
--#!/usr/bin/env ruby
-+#!/usr/bin/env ruby-2.5
-
- require 'fileutils'
-
-diff --git a/ruby/bin/ruby-cd b/ruby/bin/ruby-cd
-index 9c60fcd4..c1b23f5c 100755
---- a/ruby/bin/ruby-cd
-+++ b/ruby/bin/ruby-cd
-@@ -1,4 +1,4 @@
--#!/usr/bin/env ruby
-+#!/usr/bin/env ruby-2.5
-
- # This script lets you run `bundle exec` in one directory, and then changes into another.
-
-diff --git a/ruby/gitlab-shell/bin/check b/ruby/gitlab-shell/bin/check
-index d2224a64..5de42e5b 100755
---- a/ruby/gitlab-shell/bin/check
-+++ b/ruby/gitlab-shell/bin/check
-@@ -1,4 +1,4 @@
--#!/usr/bin/env ruby
-+#!/usr/bin/env ruby-2.5
-
- require_relative '../lib/gitlab_init'
- require_relative '../lib/gitlab_net'
-diff --git a/ruby/gitlab-shell/hooks/post-receive b/ruby/gitlab-shell/hooks/post-receive
-index 2b6538f0..835e3065 100755
---- a/ruby/gitlab-shell/hooks/post-receive
-+++ b/ruby/gitlab-shell/hooks/post-receive
-@@ -1,4 +1,4 @@
--#!/usr/bin/env ruby
-+#!/usr/bin/env ruby-2.5
-
- # This file was placed here by GitLab. It makes sure that your pushed commits
- # will be processed properly.
-diff --git a/ruby/gitlab-shell/hooks/pre-receive b/ruby/gitlab-shell/hooks/pre-receive
-index 6ce58795..3f49689f 100755
---- a/ruby/gitlab-shell/hooks/pre-receive
-+++ b/ruby/gitlab-shell/hooks/pre-receive
-@@ -1,4 +1,4 @@
--#!/usr/bin/env ruby
-+#!/usr/bin/env ruby-2.5
-
- # This file was placed here by GitLab. It makes sure that your pushed commits
- # will be processed properly.
-diff --git a/ruby/gitlab-shell/hooks/update b/ruby/gitlab-shell/hooks/update
-index 4c2fc08b..0bc81ce7 100755
---- a/ruby/gitlab-shell/hooks/update
-+++ b/ruby/gitlab-shell/hooks/update
-@@ -1,4 +1,4 @@
--#!/usr/bin/env ruby
-+#!/usr/bin/env ruby-2.5
-
- # This file was placed here by GitLab. It makes sure that your pushed commits
- # will be processed properly.
More information about the arch-commits
mailing list