Solve a consistent stack lock

Use stack solve for a multi-root EasyBuild generation lock. This is separate from per-profile stack-policy TOML used by package plan and package bump.

Write a whole-stack policy

{
  "toolchain": {"name": "foss", "version": "2025b"},
  "roots": ["GROMACS"],
  "root_priority": ["GROMACS"],
  "pins": [],
  "forbid": [],
  "objective": "prefer_newer",
  "require_upgrade": {"name": "GROMACS", "relative_to_baseline": true}
}

Roots and all declared runtime/build requirements are co-selected. Explicit root_priority makes multi-root optimization stable under root-list order.

Solve with overlays and reports

eb-stack stack solve \
  --easyconfigs fixtures/gromacs_2025_to_next/easyconfigs \
  --stack-policy fixtures/gromacs_2025_to_next/policies/prefer_newer.json \
  --baseline-easyconfigs fixtures/gromacs_2025_to_next/easyconfigs \
  --lock-out /tmp/solve-lock.lock.json \
  --sbom-out /tmp/solve-lock.cdx.json \
  --build-list-out /tmp/solve-build.list \
  --stack-diff-out /tmp/solve-stack.diff.md

--easyconfigs is repeatable. Later paths override earlier paths for the same name, version, toolchain, and versionsuffix identity. A site-only package is added to the universe normally.

When the baseline tree includes several generations, use --baseline-toolchain-version to select one explicitly. A relative require_upgrade fails if the baseline package is absent or no newer candidate is jointly feasible.

Pin or forbid candidates

Policy pins use EasyBuild-shaped requirements such as ==0.3.24, >=1.14, or a compound range. forbid accepts a package name or full easyconfig path. An unsatisfiable solve reports package names and versions from the actual candidate graph.

Emit an SBOM from an existing lock

eb-stack stack sbom --lock /tmp/solve-lock.lock.json --out /tmp/solve-lock.cdx.json

stack sbom, the Software Bill of Materials (SBOM) command, reads runtime and build edges, checksums, and source URLs back from the easyconfigs the lock names. A dependency counts only when that name is also in the lock. A path that cannot be read contributes nothing for that component. --sbom-out during stack solve writes the same document while the candidate graph is still in memory.

--backport-list writes the locked modules whose reach class justifies a backport. Pass --cve or --osv-cache. --osv-cache reads recorded Open Source Vulnerabilities (OSV) responses and does not query the network when --cve is omitted. --reachability adds or replaces a class. Blast radius is the module and every locked module that depends on it through a runtime or build edge. cross-user and network-facing are the list. local-only, not-reachable, and unclassified are recorded and left off it. See the CLI reference.

Order every pinned build

stack solve picks one version of each name. stack order sequences the builds the recipes pin. A name stays twice when EasyBuild installs the two builds side by side. That is the same package key stack solve uses: another toolchain (Perl at GCCcore and at SYSTEM), a system bootstrap pair (binutils 2.40 and 2.42), or a build-only tool (CMake 3.31.11 and 4.2.1, loaded only while the recipe that names it builds).

A runtime dependency has to agree on one version per toolchain. When no version satisfies every such requirement, stack order exits 1 and names each requester and the version it resolved. It writes no order file. It does not repin a recipe. Choosing which exact pin to keep is the decision stack solve already rejects, and rewriting the pin would describe a build the easyconfig does not ask for. An unpinned requirement that still admits the pinned version is not this refusal: each recipe keeps the module its own resolution selected.

Eigen 3.4.1 required by LAMMPS and Eigen 5.0.0 required by SciPy-bundle, both at foss/2026.1, is that refusal. The fixture is fixtures/stack_order_version_conflict.

eb-stack stack order \
  --easyconfigs fixtures/stack_order_version_conflict/easyconfigs \
  --root LAMMPS --root SciPy-bundle \
  --out /tmp/build-order.txt

Standard error names both requesters. stack solve of the same roots with --toolchain foss/2026.1 reports the same conflict.

stack order writes a successful closure in dependency order:

eb-stack stack order \
  --easyconfigs fixtures/gromacs_2025_to_next/easyconfigs \
  --root GROMACS --root 'OpenBLAS==0.3.27' \
  --out /tmp/build-order.txt \
  --easystack-out /tmp/order.yml \
  --hashes-out /tmp/hashes.txt

--oldest selects the oldest admissible version of an unpinned requirement. The hash file is one <sha256> <module> line per build. See the CLI reference.

--installed stops the walk at modules the site already has, the way the robot does. --filter-deps still drops dependencies before that walk. The two compose: a filtered dependency is gone, and a listed module is a leaf whose own dependencies are not ordered.

eb-stack stack order \
  --easyconfigs fixtures/gromacs_2025_to_next/easyconfigs \
  --root GROMACS \
  --installed fixtures/stack_order_installed/installed.txt \
  --filter-deps FFTW \
  --out /tmp/build-order.txt

The order file has no OpenBLAS path and no FFTW path. GROMACS is still in it. Standard output ends with installed=1 and then order=/tmp/build-order.txt builds=. installed=1 is OpenBLAS. FFTW was filtered, so it is not a leaf the walk stopped at.

One lock per toolchain family

A foss solve only sees the foss hierarchy. The LLVM family is lfoss, lompi, lfbf, and llvm-compilers. OpenMPI under llvm-compilers-21.1.8 is in that family. data/eessi-generations.toml lists llvm-compilers-20.1.8 for generation 2025b and llvm-compilers-21.1.8 for generation 2026.1, because an LLVM release is not a generation name.

An easystack entry such as GROMACS-2025.0-lfoss-2025b.eb is absent from a foss baseline. The foss solve then selects the foss build of the same name, and the stack diff marks that row added. Added is the site layer. Keep one lock per toolchain family: solve lfoss on its own. Passing --baseline-also-toolchain lfoss/2025b keeps that family’s hierarchy in the foss baseline, and the warning stays quiet for lfoss.

eb-stack stack solve \
  --easyconfigs fixtures/gromacs_2025_to_next/easyconfigs \
  --toolchain foss/2025b \
  --root GROMACS \
  --baseline-easystack /tmp/lfoss.yml \
  --lock-out /tmp/foss.lock.json \
  --stack-diff-out /tmp/foss.diff.md

/tmp/lfoss.yml has one entry:

easyconfigs:
  - GROMACS-2025.0-lfoss-2025b.eb

The solve still exits 0. Standard error names the unresolved entry. It also prints a warning that the added GROMACS row is the LLVM family:

warning: GROMACS (GROMACS-2025.0-lfoss-2025b.eb) is the LLVM family (lfoss). A foss solve cannot reach it, so the site layer includes GROMACS (fixtures/gromacs_2025_to_next/easyconfigs/foss-2025b/GROMACS-2025.0-foss-2025b.eb). Keep one lock per toolchain family: solve lfoss on its own, or pass --baseline-also-toolchain lfoss/2025b.

The path in that warning is the foss easyconfig the solve selected. A package the foss closure only version-bumps stays off this warning.

See the policy reference and the format reference.