From aec2218f2707b855c389d8ec056e16d47ecedeff Mon Sep 17 00:00:00 2001 From: mfolina Date: Tue, 21 Apr 2026 14:20:54 +0200 Subject: [PATCH 1/5] fix: add double brace fix to find --- bits_helpers/sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bits_helpers/sync.py b/bits_helpers/sync.py index 18d59f76..5ed0707d 100644 --- a/bits_helpers/sync.py +++ b/bits_helpers/sync.py @@ -695,7 +695,7 @@ def fetch_symlinks(self, spec) -> None: # Create the dummy tarball, if it does not exists test -f "{workDir}/{architecture}/store/${{pkg_hash:0:2}}/$pkg_hash/$tarball" && continue mkdir -p "{workDir}/INSTALLROOT/$pkg_hash/{architecture}/{package}" - find "{remote_store}/{cvmfs_architecture}/Packages/{package}/$full_version" ! -name etc -maxdepth 1 -mindepth 1 -exec ln -sf {} "{workDir}/INSTALLROOT/$pkg_hash/{architecture}/{package}/" \\; + find "{remote_store}/{cvmfs_architecture}/Packages/{package}/$full_version" ! -name etc -maxdepth 1 -mindepth 1 -exec ln -sf {{}} "{workDir}/INSTALLROOT/$pkg_hash/{architecture}/{package}/" \\; cp -fr "{remote_store}/{cvmfs_architecture}/Packages/{package}/$full_version/etc" "{workDir}/INSTALLROOT/$pkg_hash/{architecture}/{package}/etc" mkdir -p "{workDir}/TARS/{architecture}/store/${{pkg_hash:0:2}}/$pkg_hash" tar -C "{workDir}/INSTALLROOT/$pkg_hash" -czf "{workDir}/TARS/{architecture}/store/${{pkg_hash:0:2}}/$pkg_hash/$tarball" . From c4de543c51644d69d0092db25ef9b9693e9651f0 Mon Sep 17 00:00:00 2001 From: mfolina Date: Thu, 23 Apr 2026 11:22:36 +0200 Subject: [PATCH 2/5] fix: removed escaped slash in find (bash) --- bits_helpers/sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bits_helpers/sync.py b/bits_helpers/sync.py index 5ed0707d..6c464bc7 100644 --- a/bits_helpers/sync.py +++ b/bits_helpers/sync.py @@ -695,7 +695,7 @@ def fetch_symlinks(self, spec) -> None: # Create the dummy tarball, if it does not exists test -f "{workDir}/{architecture}/store/${{pkg_hash:0:2}}/$pkg_hash/$tarball" && continue mkdir -p "{workDir}/INSTALLROOT/$pkg_hash/{architecture}/{package}" - find "{remote_store}/{cvmfs_architecture}/Packages/{package}/$full_version" ! -name etc -maxdepth 1 -mindepth 1 -exec ln -sf {{}} "{workDir}/INSTALLROOT/$pkg_hash/{architecture}/{package}/" \\; + find "{remote_store}/{cvmfs_architecture}/Packages/{package}/$full_version" ! -name etc -maxdepth 1 -mindepth 1 -exec ln -sf {{}} "{workDir}/INSTALLROOT/$pkg_hash/{architecture}/{package}/" \; cp -fr "{remote_store}/{cvmfs_architecture}/Packages/{package}/$full_version/etc" "{workDir}/INSTALLROOT/$pkg_hash/{architecture}/{package}/etc" mkdir -p "{workDir}/TARS/{architecture}/store/${{pkg_hash:0:2}}/$pkg_hash" tar -C "{workDir}/INSTALLROOT/$pkg_hash" -czf "{workDir}/TARS/{architecture}/store/${{pkg_hash:0:2}}/$pkg_hash/$tarball" . From d8a8c1c2cc536e1b17d619bfad5bcceffee2f07c Mon Sep 17 00:00:00 2001 From: mfolina Date: Thu, 23 Apr 2026 11:25:01 +0200 Subject: [PATCH 3/5] misc: warning on find argument order (global options) --- bits_helpers/sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bits_helpers/sync.py b/bits_helpers/sync.py index 6c464bc7..376bd128 100644 --- a/bits_helpers/sync.py +++ b/bits_helpers/sync.py @@ -695,7 +695,7 @@ def fetch_symlinks(self, spec) -> None: # Create the dummy tarball, if it does not exists test -f "{workDir}/{architecture}/store/${{pkg_hash:0:2}}/$pkg_hash/$tarball" && continue mkdir -p "{workDir}/INSTALLROOT/$pkg_hash/{architecture}/{package}" - find "{remote_store}/{cvmfs_architecture}/Packages/{package}/$full_version" ! -name etc -maxdepth 1 -mindepth 1 -exec ln -sf {{}} "{workDir}/INSTALLROOT/$pkg_hash/{architecture}/{package}/" \; + find -maxdepth 1 -mindepth 1 "{remote_store}/{cvmfs_architecture}/Packages/{package}/$full_version" ! -name etc -exec ln -sf {{}} "{workDir}/INSTALLROOT/$pkg_hash/{architecture}/{package}/" \; cp -fr "{remote_store}/{cvmfs_architecture}/Packages/{package}/$full_version/etc" "{workDir}/INSTALLROOT/$pkg_hash/{architecture}/{package}/etc" mkdir -p "{workDir}/TARS/{architecture}/store/${{pkg_hash:0:2}}/$pkg_hash" tar -C "{workDir}/INSTALLROOT/$pkg_hash" -czf "{workDir}/TARS/{architecture}/store/${{pkg_hash:0:2}}/$pkg_hash/$tarball" . From a6ee5e6272eecfe733499059372b6c1d49be924a Mon Sep 17 00:00:00 2001 From: mfolina Date: Thu, 23 Apr 2026 16:07:43 +0200 Subject: [PATCH 4/5] misc: fix warning on other find cmd --- bits_helpers/sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bits_helpers/sync.py b/bits_helpers/sync.py index 376bd128..dc598932 100644 --- a/bits_helpers/sync.py +++ b/bits_helpers/sync.py @@ -684,7 +684,7 @@ def fetch_symlinks(self, spec) -> None: # Exit without error in case we do not have any package published test -d "{remote_store}/{cvmfs_architecture}/Packages/{package}" || exit 0 mkdir -p "{workDir}/{links_path}" - for install_path in $(find "{remote_store}/{cvmfs_architecture}/Packages/{package}" -type d -mindepth 1 -maxdepth 1); do + for install_path in $(find -mindepth 1 -maxdepth 1 "{remote_store}/{cvmfs_architecture}/Packages/{package}" -type d); do full_version="${{install_path##*/}}" tarball={package}-$full_version.{architecture}.tar.gz pkg_hash=$(cat "${{install_path}}/.build-hash" || jq -r '.package.hash' <${{install_path}}/.meta.json) From 6d968048c8fca9b13758119d669410ff9251f010 Mon Sep 17 00:00:00 2001 From: mfolina Date: Thu, 23 Apr 2026 16:32:44 +0200 Subject: [PATCH 5/5] misc: reorder arguments for find --- bits_helpers/sync.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bits_helpers/sync.py b/bits_helpers/sync.py index dc598932..2531f5ac 100644 --- a/bits_helpers/sync.py +++ b/bits_helpers/sync.py @@ -684,7 +684,7 @@ def fetch_symlinks(self, spec) -> None: # Exit without error in case we do not have any package published test -d "{remote_store}/{cvmfs_architecture}/Packages/{package}" || exit 0 mkdir -p "{workDir}/{links_path}" - for install_path in $(find -mindepth 1 -maxdepth 1 "{remote_store}/{cvmfs_architecture}/Packages/{package}" -type d); do + for install_path in $(find "{remote_store}/{cvmfs_architecture}/Packages/{package}" -mindepth 1 -maxdepth 1 -type d); do full_version="${{install_path##*/}}" tarball={package}-$full_version.{architecture}.tar.gz pkg_hash=$(cat "${{install_path}}/.build-hash" || jq -r '.package.hash' <${{install_path}}/.meta.json) @@ -695,7 +695,7 @@ def fetch_symlinks(self, spec) -> None: # Create the dummy tarball, if it does not exists test -f "{workDir}/{architecture}/store/${{pkg_hash:0:2}}/$pkg_hash/$tarball" && continue mkdir -p "{workDir}/INSTALLROOT/$pkg_hash/{architecture}/{package}" - find -maxdepth 1 -mindepth 1 "{remote_store}/{cvmfs_architecture}/Packages/{package}/$full_version" ! -name etc -exec ln -sf {{}} "{workDir}/INSTALLROOT/$pkg_hash/{architecture}/{package}/" \; + find "{remote_store}/{cvmfs_architecture}/Packages/{package}/$full_version" -mindepth 1 -maxdepth 1 ! -name etc -exec ln -sf {{}} "{workDir}/INSTALLROOT/$pkg_hash/{architecture}/{package}/" \; cp -fr "{remote_store}/{cvmfs_architecture}/Packages/{package}/$full_version/etc" "{workDir}/INSTALLROOT/$pkg_hash/{architecture}/{package}/etc" mkdir -p "{workDir}/TARS/{architecture}/store/${{pkg_hash:0:2}}/$pkg_hash" tar -C "{workDir}/INSTALLROOT/$pkg_hash" -czf "{workDir}/TARS/{architecture}/store/${{pkg_hash:0:2}}/$pkg_hash/$tarball" .