[arvados] updated: 2.7.0-5609-g485488b8f9

git repository hosting git at public.arvados.org
Thu Dec 14 20:16:56 UTC 2023


Summary of changes:
 tools/arvbox/lib/arvbox/docker/common.sh           | 32 ++++++++++++++++------
 .../lib/arvbox/docker/service/sdk/run-service      |  6 ++--
 .../lib/arvbox/docker/service/vm/run-service       |  3 +-
 3 files changed, 29 insertions(+), 12 deletions(-)

       via  485488b8f975fb75daf77a4fad72d3d9d05cd611 (commit)
      from  e7ffa5492684992e4f08f793e6dbb526bcb6b6a1 (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 485488b8f975fb75daf77a4fad72d3d9d05cd611
Author: Peter Amstutz <peter.amstutz at curii.com>
Date:   Thu Dec 14 15:16:12 2023 -0500

    arvbox updates for ruby and bundler, refs #21301
    
    Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>

diff --git a/tools/arvbox/lib/arvbox/docker/common.sh b/tools/arvbox/lib/arvbox/docker/common.sh
index 9b27e90009..9c5df83c0e 100644
--- a/tools/arvbox/lib/arvbox/docker/common.sh
+++ b/tools/arvbox/lib/arvbox/docker/common.sh
@@ -2,8 +2,8 @@
 #
 # SPDX-License-Identifier: AGPL-3.0
 
-export RUBY_VERSION=2.7.0
-export BUNDLER_VERSION=2.2.19
+export RUBY_VERSION=3.2.2
+export BUNDLER_VERSION=2.4.22
 
 export DEBIAN_FRONTEND=noninteractive
 export PATH=${PATH}:/usr/local/go/bin:/var/lib/arvados/bin:/usr/src/arvados/sdk/cli/binstubs
@@ -67,24 +67,38 @@ fi
 
 run_bundler() {
     flock $GEMLOCK /var/lib/arvados/bin/gem install --no-document --user bundler:$BUNDLER_VERSION
-    if test -f Gemfile.lock ; then
-        frozen=--frozen
-    else
-        frozen=""
-    fi
+
     BUNDLER=bundle
     if test -x $PWD/bin/bundle ; then
 	# If present, use the one associated with rails API
 	BUNDLER=$PWD/bin/bundle
     fi
 
+    # Use Gemfile.lock only if it is git tracked.
+    if git ls-files --error-unmatch Gemfile.lock ; then
+	flock $GEMLOCK $BUNDLER config set --local frozen true
+    else
+	flock $GEMLOCK $BUNDLER config set --local frozen false
+    fi
+    flock $GEMLOCK $BUNDLER config set --local deployment false
+
     if test -z "$(flock $GEMLOCK /var/lib/arvados/bin/gem list | grep 'arvados[[:blank:]].*[0-9.]*dev')" ; then
         (cd /usr/src/arvados/sdk/ruby && \
         /var/lib/arvados/bin/gem build arvados.gemspec && flock $GEMLOCK /var/lib/arvados/bin/gem install $(ls -1 *.gem | sort -r | head -n1))
     fi
-    if ! flock $GEMLOCK $BUNDLER install --verbose --local --no-deployment $frozen "$@" ; then
-        flock $GEMLOCK $BUNDLER install --verbose --no-deployment $frozen "$@"
+
+    if ! flock $GEMLOCK $BUNDLER install --verbose --local "$@" ; then
+        flock $GEMLOCK $BUNDLER install --verbose "$@"
+    fi
+}
+
+bundler_binstubs() {
+    BUNDLER=bundle
+    if test -x $PWD/bin/bundle ; then
+	# If present, use the one associated with rails API
+	BUNDLER=$PWD/bin/bundle
     fi
+    flock $GEMLOCK $BUNDLER binstubs --all
 }
 
 PYCMD=""
diff --git a/tools/arvbox/lib/arvbox/docker/service/sdk/run-service b/tools/arvbox/lib/arvbox/docker/service/sdk/run-service
index d3ff7e8683..5bff561052 100755
--- a/tools/arvbox/lib/arvbox/docker/service/sdk/run-service
+++ b/tools/arvbox/lib/arvbox/docker/service/sdk/run-service
@@ -15,10 +15,12 @@ download_cache = /var/lib/pip
 EOF
 
 cd /usr/src/arvados/sdk/ruby
-run_bundler --binstubs=binstubs
+run_bundler
+bundler_binstubs
 
 cd /usr/src/arvados/sdk/cli
-run_bundler --binstubs=binstubs
+run_bundler
+bundler_binstubs
 
 export PYCMD=python3
 
diff --git a/tools/arvbox/lib/arvbox/docker/service/vm/run-service b/tools/arvbox/lib/arvbox/docker/service/vm/run-service
index 2079bb1d0b..5e952b8d5c 100755
--- a/tools/arvbox/lib/arvbox/docker/service/vm/run-service
+++ b/tools/arvbox/lib/arvbox/docker/service/vm/run-service
@@ -16,7 +16,8 @@ if test "$1" != "--only-deps" ; then
 fi
 
 cd /usr/src/arvados/services/login-sync
-run_bundler --binstubs=binstubs
+run_bundler
+bundler_binstubs
 
 if test "$1" = "--only-deps" ; then
     exit

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list