From 375ec40557ad67245936b8663fbd5862352b408b Mon Sep 17 00:00:00 2001 From: Giulio Eulisse <10544+ktf@users.noreply.github.com> Date: Fri, 27 Jun 2025 20:42:43 +0200 Subject: [PATCH] CVMFS support: make it look like we are running from the local build (#939) By copying etc/profile.d/init.sh, rather than linking it, sourceing the environment behaves like a local package even if in reality things come from CVMFS via symlinks. Kudos to @smuzaffar for the idea. --- bits_helpers/sync.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bits_helpers/sync.py b/bits_helpers/sync.py index 1ab4231c..5de3a2f7 100644 --- a/bits_helpers/sync.py +++ b/bits_helpers/sync.py @@ -357,7 +357,8 @@ 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}" - ln -sf "{remote_store}/{cvmfs_architecture}/Packages/{package}/$full_version" "{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" . rm -rf "{workDir}/INSTALLROOT/$pkg_hash"