From 9ff6b45253324747b5af65d906f07bb24c6adabc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Blaisot?= Date: Sat, 25 May 2024 10:12:04 +0200 Subject: [PATCH] Fix git dependencies with salt 3005.5+ --- lib/kitchen/provisioner/formula-fetch.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/kitchen/provisioner/formula-fetch.sh b/lib/kitchen/provisioner/formula-fetch.sh index abefdd9..b8d2a35 100755 --- a/lib/kitchen/provisioner/formula-fetch.sh +++ b/lib/kitchen/provisioner/formula-fetch.sh @@ -74,7 +74,8 @@ function linkFormulas() { do name=$(basename "$formula") if [[ ! -L "$SALT_ROOT/$name" ]]; then - ln -fs "$formula/$name" "$SALT_ROOT/$name" + # Using plain copy instead of symlink because salt 3005.5+ refuse to serve files outside of files_root + cp -r "$formula/$name" "$SALT_ROOT/$name" fi find "$formula" -maxdepth 1 -mindepth 1 -type d |grep -E "_(modules|states|grains|renderers|returners)" | xargs -I{} \ basename {}| xargs -I{} cp -rs "$formula"/{} "$SALT_ROOT"/ @@ -83,7 +84,7 @@ function linkFormulas() { # form pkgs find "$SALT_ENV" -maxdepth 1 -mindepth 1 -path "*_formulas*" -prune -o -name "*" -type d -print0| xargs -I{} -0 -n1 --no-run-if-empty basename {} | xargs -I{} --no-run-if-empty \ - ln -fs "$SALT_ENV"/{} "$SALT_ROOT"/{}; + cp -r "$SALT_ENV"/{} "$SALT_ROOT"/{}; fi }