[ARVADOS] created: 2.1.0-809-g941b5806c

Git user git at public.arvados.org
Tue May 18 18:32:59 UTC 2021


        at  941b5806c2d25ec54a5ab8506a759aaec564fdaf (commit)


commit 941b5806c2d25ec54a5ab8506a759aaec564fdaf
Author: Javier Bértoli <jbertoli at curii.com>
Date:   Tue May 18 14:50:51 2021 -0300

    fix(provision): prevent bash globbing issues with empty dirs
    
    refs #17606
    Arvados-DCO-1.1-Signed-off-by: Javier Bértoli <jbertoli at curii.com>

diff --git a/tools/salt-install/provision.sh b/tools/salt-install/provision.sh
index 02da9933b..4a0bdaaff 100755
--- a/tools/salt-install/provision.sh
+++ b/tools/salt-install/provision.sh
@@ -242,7 +242,7 @@ if [ ! -d "${SOURCE_PILLARS_DIR}" ]; then
   echo "${SOURCE_PILLARS_DIR} does not exist or is not a directory. Exiting."
   exit 1
 fi
-for f in "${SOURCE_PILLARS_DIR}"/*; do
+for f in $(ls "${SOURCE_PILLARS_DIR}"/*); do
   sed "s#__ANONYMOUS_USER_TOKEN__#${ANONYMOUS_USER_TOKEN}#g;
        s#__BLOB_SIGNING_KEY__#${BLOB_SIGNING_KEY}#g;
        s#__CONTROLLER_EXT_SSL_PORT__#${CONTROLLER_EXT_SSL_PORT}#g;
@@ -285,7 +285,7 @@ if [ "x${TEST}" = "xyes" ] && [ ! -d "${SOURCE_TESTS_DIR}" ]; then
 fi
 mkdir -p /tmp/cluster_tests
 # Replace cluster and domain name in the test files
-for f in "${SOURCE_TESTS_DIR}"/*; do
+for f in $(ls "${SOURCE_TESTS_DIR}"/*); do
   sed "s#__CLUSTER__#${CLUSTER}#g;
        s#__CONTROLLER_EXT_SSL_PORT__#${CONTROLLER_EXT_SSL_PORT}#g;
        s#__DOMAIN__#${DOMAIN}#g;
@@ -303,7 +303,7 @@ chmod 755 /tmp/cluster_tests/run-test.sh
 if [ -d "${SOURCE_STATES_DIR}" ]; then
   mkdir -p "${F_DIR}"/extra/extra
 
-  for f in "${SOURCE_STATES_DIR}"/*; do
+  for f in $(ls "${SOURCE_STATES_DIR}"/*); do
     sed "s#__ANONYMOUS_USER_TOKEN__#${ANONYMOUS_USER_TOKEN}#g;
          s#__CLUSTER__#${CLUSTER}#g;
          s#__BLOB_SIGNING_KEY__#${BLOB_SIGNING_KEY}#g;
@@ -362,7 +362,7 @@ EOFPSLS
 
 # States, extra states
 if [ -d "${F_DIR}"/extra/extra ]; then
-  for f in "${F_DIR}"/extra/extra/*.sls; do
+  for f in $(ls "${F_DIR}"/extra/extra/*.sls); do
   echo "    - extra.$(basename ${f} | sed 's/.sls$//g')" >> ${S_DIR}/top.sls
   done
 fi

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list