Skip to content

Adding an feature that help us create symlink of packages that are already deployed on cvmfs. #131

Closed

Description

@akritkbehera
No description provided.

Activity

  1. pbuncic commented on Oct 17, 2026

    @pbuncic
    Contributor

    Could you add a few details? Which deployment should be reused (e.g. /cvmfs/cms.cern.ch//external), whether builds on top must be publishable or are for local development, and whether those packages have modulefiles or only etc/profile.d/init.sh. Today --reuse-from only reads bits-published trees. One option that could be considered is “adopted” packages: tiny bits packages that link to the deployed directories and go through the normal publish pipeline, so the existing deployment looks bits-published ones. The devils is in detail ad this needs full understanding of your use case before anything can be done.

  2. akritkbehera commented on Oct 20, 2026

    @akritkbehera
    CollaboratorAuthor

    export DEPLOYED_PATH=/cvmfs/cms.cern.ch/sw/x86_64/
    Thanks. I want to a reuse package at another deployed $DEPLOYED_PATH if i point --symlink-packages $DEPLOYED_PATH it does not change the deployed packages. It selects them by version and revision, in strict mode it also matches .build-hash inside the package and we want them to uploaded. We will symlink the package bin/lib/include from $DEPLOYED_PATH but relocate the etc folder so it points to the $WORK_DIR. If someone wants this package and do not have access to cvmfs for them it will downloaded from S3 or will be built locally.

  3. akritkbehera commented on Oct 20, 2026

    @akritkbehera
    CollaboratorAuthor

    @pbuncic I have the changes here and been working with it and seems to work as expected
    https://github.com/akritkbehera/bits-org/tree/package-symlinks

  4. pbuncic commented on Oct 27, 2026

    @pbuncic
    Contributor

    I've added fix to bits that follows your implementation:

    New option. --symlink-packages-from ROOT, with a --symlink-policy choice:

    • strict, the default, requires the package’s .build-hash to match the hash bits computes, and the result is publishable;
    • relaxed matches by version only, and is refused with --write-store.

    Staging.
    Each matching package gets a directory in the work dir. Its bin/, lib/, include/ are symlinks into the deployment, and its etc/profile.d is copied and relocated, plus the SCRAM files for CMS projects.

    What gets uploaded.
    The linked packages themselves are never uploaded. Packages built on top of them are, after paths into the deployment in their text files are rewritten to the work dir, so other users get the dependencies from S3 or build them.

    Also in the branch: bits status and --dry-run report the new “symlinked” state, and there are docs.

    You will need to apply this patch to cms.bits to make it work:

    0001-Stage-symlinked-SCRAM-packages-with-a-SYMLINK_STAGE-.patch

    cd cms.bits
    git pull --ff-only
    git am 0001-Stage-symlinked-SCRAM-packages-with-a-SYMLINK_STAGE-.patch

  5. pbuncic commented on Nov 5, 2026

    @pbuncic
    Contributor

    The fix is merged. Re-open if this does not work for your.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions