[ARVADOS] updated: 2.1.0-338-gd515c8eb9
Git user
git at public.arvados.org
Mon Feb 1 19:40:35 UTC 2021
Summary of changes:
cmd/arvados-package/fpm.go | 15 ++++++++++++---
lib/boot/supervisor.go | 2 +-
lib/install/deps.go | 10 +++++-----
3 files changed, 18 insertions(+), 9 deletions(-)
via d515c8eb95b39065f74ea6d0b368d8ca3705fd4a (commit)
via e28e5002e502a5c238e6c0ae5daede811af9aa55 (commit)
from 4865911a605128adb454b3280b1cf9dcd38f499e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit d515c8eb95b39065f74ea6d0b368d8ca3705fd4a
Author: Tom Clegg <tom at curii.com>
Date: Mon Feb 1 14:32:56 2021 -0500
16306: Exclude {rails}/config/environments from package.
In developer work trees, that directory is likely to have extra files
(already skipped by .gitignore) that will break the application if
included in the package.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/lib/install/deps.go b/lib/install/deps.go
index bb9949de7..8a182bcb9 100644
--- a/lib/install/deps.go
+++ b/lib/install/deps.go
@@ -449,6 +449,7 @@ rm ${zip}
"--exclude", "/log",
"--exclude", "/tmp",
"--exclude", "/vendor",
+ "--exclude", "/config/environments",
"./", "/var/lib/arvados/"+dstdir+"/")
cmd.Dir = filepath.Join(inst.SourcePath, srcdir)
cmd.Stdout = stdout
commit e28e5002e502a5c238e6c0ae5daede811af9aa55
Author: Tom Clegg <tom at curii.com>
Date: Mon Feb 1 10:02:12 2021 -0500
16306: Update to Ruby 2.7.2.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>
diff --git a/cmd/arvados-package/fpm.go b/cmd/arvados-package/fpm.go
index a86232036..c143e46ef 100644
--- a/cmd/arvados-package/fpm.go
+++ b/cmd/arvados-package/fpm.go
@@ -5,6 +5,7 @@
package main
import (
+ "bytes"
"context"
"fmt"
"io"
@@ -41,9 +42,17 @@ func fpm(ctx context.Context, opts opts, stdin io.Reader, stdout, stderr io.Writ
return fmt.Errorf("gem install fpm: %w", err)
}
- if _, err := os.Stat("/root/.gem/ruby/2.5.0/gems/fpm-1.11.0/lib/fpm/package/deb.rb"); err == nil {
+ cmd = exec.Command("/var/lib/arvados/bin/gem", "env", "gempath")
+ cmd.Stderr = stderr
+ buf, err := cmd.Output() // /root/.gem/ruby/2.7.0:...
+ if err != nil || len(buf) == 0 {
+ return fmt.Errorf("gem env gempath: %w", err)
+ }
+ gempath := string(bytes.TrimRight(bytes.Split(buf, []byte{':'})[0], "\n"))
+
+ if _, err := os.Stat(gempath + "/gems/fpm-1.11.0/lib/fpm/package/deb.rb"); err == nil {
// Workaround for fpm bug https://github.com/jordansissel/fpm/issues/1739
- cmd = exec.Command("sed", "-i", `/require "digest"/a require "zlib"`, "/root/.gem/ruby/2.5.0/gems/fpm-1.11.0/lib/fpm/package/deb.rb")
+ cmd = exec.Command("sed", "-i", `/require "digest"/a require "zlib"`, gempath+"/gems/fpm-1.11.0/lib/fpm/package/deb.rb")
cmd.Stdout = stdout
cmd.Stderr = stderr
err = cmd.Run()
@@ -66,7 +75,7 @@ func fpm(ctx context.Context, opts opts, stdin io.Reader, stdout, stderr io.Writ
format := "deb" // TODO: rpm
pkgfile := filepath.Join(opts.PackageDir, "arvados-server-easy_"+opts.PackageVersion+"_amd64."+format)
- cmd = exec.Command("/root/.gem/ruby/2.5.0/bin/fpm",
+ cmd = exec.Command(gempath+"/bin/fpm",
"--package", pkgfile,
"--name", "arvados-server-easy",
"--version", opts.PackageVersion,
diff --git a/lib/boot/supervisor.go b/lib/boot/supervisor.go
index c75e7f146..77504deb0 100644
--- a/lib/boot/supervisor.go
+++ b/lib/boot/supervisor.go
@@ -443,7 +443,7 @@ func (super *Supervisor) setupRubyEnv() error {
cmd.Env = super.environ
buf, err := cmd.Output() // /var/lib/arvados/.gem/ruby/2.5.0/bin:...
if err != nil || len(buf) == 0 {
- return fmt.Errorf("gem env gempath: %v", err)
+ return fmt.Errorf("gem env gempath: %w", err)
}
gempath := string(bytes.Split(buf, []byte{':'})[0])
super.prependEnv("PATH", gempath+"/bin:")
diff --git a/lib/install/deps.go b/lib/install/deps.go
index 504cdff8f..bb9949de7 100644
--- a/lib/install/deps.go
+++ b/lib/install/deps.go
@@ -218,21 +218,20 @@ func (inst *installCommand) RunCommand(prog string, args []string, stdin io.Read
return 1
}
}
- rubyversion := "2.5.7"
+ rubyversion := "2.7.2"
+ rubymajorversion := rubyversion[:strings.LastIndex(rubyversion, ".")]
if haverubyversion, err := exec.Command("/var/lib/arvados/bin/ruby", "-v").CombinedOutput(); err == nil && bytes.HasPrefix(haverubyversion, []byte("ruby "+rubyversion)) {
logger.Print("ruby " + rubyversion + " already installed")
} else {
err = inst.runBash(`
tmp="$(mktemp -d)"
trap 'rm -r "${tmp}"' ERR EXIT
-wget --progress=dot:giga -O- https://cache.ruby-lang.org/pub/ruby/2.5/ruby-`+rubyversion+`.tar.gz | tar -C "${tmp}" -xzf -
+wget --progress=dot:giga -O- https://cache.ruby-lang.org/pub/ruby/`+rubymajorversion+`/ruby-`+rubyversion+`.tar.gz | tar -C "${tmp}" -xzf -
cd "${tmp}/ruby-`+rubyversion+`"
./configure --disable-install-static-library --enable-shared --disable-install-doc --prefix /var/lib/arvados
make -j8
make install
-/var/lib/arvados/bin/gem install bundler --no-ri --no-rdoc
-# "gem update --system" can be removed when we use ruby ≥2.6.3: https://bundler.io/blog/2019/05/14/solutions-for-cant-find-gem-bundler-with-executable-bundle.html
-/var/lib/arvados/bin/gem update --system --no-ri --no-rdoc
+/var/lib/arvados/bin/gem install bundler --no-document
`, stdout, stderr)
if err != nil {
return 1
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list