[arvados] created: 2.7.0-5326-gd6e41e6884

git repository hosting git at public.arvados.org
Thu Nov 9 19:12:34 UTC 2023


        at  d6e41e6884090f5ff42e9fa5bb53852c7bcc47c4 (commit)


commit d6e41e6884090f5ff42e9fa5bb53852c7bcc47c4
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Thu Nov 9 16:10:19 2023 -0300

    21031: Fixes post installation script for rails applications.
    
    Set up schema files ownership in the same way without regards on the
    rake task used: db:schema:load or db:structure:load (deprecated).
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/build/rails-package-scripts/postinst.sh b/build/rails-package-scripts/postinst.sh
index f6ae48c0fc..e317f85aaf 100644
--- a/build/rails-package-scripts/postinst.sh
+++ b/build/rails-package-scripts/postinst.sh
@@ -218,8 +218,11 @@ configure_version() {
   # Make sure postgres doesn't try to use a pager.
   export PAGER=
   case "$RAILSPKG_DATABASE_LOAD_TASK" in
-      db:schema:load) chown "$WWW_OWNER:" $RELEASE_PATH/db/schema.rb ;;
-      db:structure:load) chown "$WWW_OWNER:" $RELEASE_PATH/db/structure.sql ;;
+      # db:structure:load was deprecated in Rails 6.1 and shouldn't be used.
+      db:schema:load | db:structure:load)
+          chown "$WWW_OWNER:" $RELEASE_PATH/db/schema.rb || true
+          chown "$WWW_OWNER:" $RELEASE_PATH/db/structure.sql || true
+          ;;
   esac
   chmod 644 $SHARED_PATH/log/*
   chmod -R 2775 $RELEASE_PATH/tmp || true

commit 03caa5fccf60f32c4fe1d6aac297c64ade6a69b9
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date:   Thu Nov 9 12:54:37 2023 -0300

    21031: Replaces deprecated db:structure:load command with db:schema:load
    
    Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>

diff --git a/build/rails-package-scripts/arvados-api-server.sh b/build/rails-package-scripts/arvados-api-server.sh
index a513c3ad09..a0e356ce32 100644
--- a/build/rails-package-scripts/arvados-api-server.sh
+++ b/build/rails-package-scripts/arvados-api-server.sh
@@ -10,7 +10,7 @@ INSTALL_PATH=/var/www/arvados-api
 CONFIG_PATH=/etc/arvados/api
 DOC_URL="http://doc.arvados.org/install/install-api-server.html#configure"
 
-RAILSPKG_DATABASE_LOAD_TASK=db:structure:load
+RAILSPKG_DATABASE_LOAD_TASK=db:schema:load
 setup_extra_conffiles() {
   # Rails 5.2 does not tolerate dangling symlinks in the initializers directory, and this one
   # can still be there, left over from a previous version of the API server package.

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list