-
Notifications
You must be signed in to change notification settings - Fork 21
Spack recipes & maintenance
All NCEPLIBS codes are available through the Spack package manager, which is generally the preferred means of installing them. Most are available on RDHPCS platforms (Ursa, Hercules, Orion, etc.) through spack-stack.
We therefore maintain three copies of each package's Spack recipe:
- one in the authoritative Spack package repository;
- one in the JCSDA Spack fork used by spack-stack; and
- one in each package's repository under the spack/ directory, used for development and CI testing.
Certain changes may be present only in one or two repositories but not the other one or two. For example, some packages have unit test-related logic found only in the JCSDA Spack fork and the repo-level recipes that is not suitable for inclusion in the official Spack package repository. These are noted with comments.
Generally, the easiest way to keep the three copies of a given package's recipe in sync is to use a three-way diffing tool (e.g., Vim, Meld) to make updates, then put in a pull request to each copy's respective repository. Frequently only one or two of the copies will need to be updated at a given time. Assuming MyUser-NOAA already has forks of each repository:
# Update NCEPLIBS repo
git clone [email protected]:MyUser-NOAA/NCEPLIBS-w3emc
cd NCEPLIBS-w3emc
git switch -c recipe_updates_july25
# modify spack/package.py
git commit -m "some new variants" spack/package.py
git push # then submit PR
# Update authoritative Spack packages repo
git clone [email protected]:MyUser-NOAA/spack-packages
cd spack-packages
git switch -c w3emc_updates_july25-spack
# modify repos/spack_repo/builtin/packages/w3emc/package.py
git commit -m "w3emc: add two latest versions" repos/spack_repo/builtin/packages/w3emc/package.py
git push # then submit PR to spack/spack-packages repo
# Update JCSDA repo
git clone [email protected]:MyUser-NOAA/spack
cd spack
git switch -c w3emc_updates_july25-jcsda
# modify var/spack/repos/builtin/packages/w3emc/package.py
git commit -m "w3emc: fix variant logic" var/spack/repos/builtin/packages/w3emc/package.py
git push # then submit PR to JCSDA/spack repo