Files
MX_Pmodule/ccp4/README.md
T
duan_jandClaude Fable 5 3bf22a4b7e ccp4: die-guard install steps, glob ccp4-* top dir
First Ra run "succeeded" while broken: modbuild has no errexit in hooks,
so a truncated cached tarball (gzip EOF) and a wrong hardcoded top dir
(tarball unpacks to ccp4-9, not ccp4-9.0) scrolled by and the modulefile
got installed anyway. Every critical step now ends the build via
std::die, the top dir is globbed, and install verifies ccp4.setup-sh
exists before finishing. README documents the recovery (rm partial
tarball from distfiles, --clean-install).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 20:07:19 +02:00

72 lines
2.6 KiB
Markdown

# ccp4
CCP4 suite (binary distribution, bundled with SHELX and ARP/wARP) for
macromolecular crystallography. https://www.ccp4.ac.uk/
- Vendor tarball install: default `prep` downloads the ~5 GB tarball
(cached in `$PMODULES_DISTFILESDIR`), `install` untars it into `$PREFIX`
and runs `BINARY.setup`.
- Non-interactive: the CCP4 licence is pre-agreed via `.agree2ccp4v6`
before `BINARY.setup` runs, so the build never prompts.
- No `shasums:`: the download link is session-gated (`sid=` expires), so
the checksum cannot be pinned ahead of the first fetch. After the first
successful build, `sha256sum` the cached tarball and add it if wanted.
- Module version is the series (`9.0`); minor updates (9.0.xxx) come via
the CCP4 update manager inside the installation.
## Build on Ra
One-time per user: put the Pmodules build tmp and download cache on
/das instead of /var/tmp and $HOME (the tarball alone would blow the
home quota):
```bash
mkdir -p /das/work/p21/p21515/.cache/Pmodules/distfiles ~/.Pmodules
cat > ~/.Pmodules/Pmodules.yaml <<'EOF'
tmp_dir: /das/work/p21/p21515/.cache/Pmodules
download_dir: /das/work/p21/p21515/.cache/Pmodules/distfiles
EOF
```
Then:
```bash
module use unstable && module load modbuild/2.1.3
cd ccp4
modbuild build --prep 9.0 # download/cache only; also verifies tmp_dir took effect
modbuild build 9.0
```
If the download fails (expired sid), fetch a fresh link from
https://www.ccp4.ac.uk/download/ and update `files/config.yaml`, or drop a
hand-downloaded tarball into the distfiles dir under the `name:` given in
`files/config.yaml`.
## Known failure modes
- **"done" but broken install**: modbuild has no errexit in hooks — errors in
`pbuild::install` used to scroll by and the build still reported done. The
build script now `std::die`s on every critical step.
- **Truncated download reused silently**: an interrupted `curl` leaves a
partial file in the distfiles dir, and prep reuses any file it finds there
(no integrity check without `shasums:`). Symptom:
`gzip: stdin: unexpected end of file`. Fix:
```bash
rm ~/.cache/Pmodules/distfiles/ccp4-9.0-shelx-arp-x86_64.tar.gz
modbuild build --clean-install 9.0
# or verify by hand before building:
gzip -t ~/.cache/Pmodules/distfiles/ccp4-9.0-shelx-arp-x86_64.tar.gz
```
- The tarball unpacks to `ccp4-9` (not `ccp4-9.0` as the CCP4 install doc
implies); the build globs `ccp4-*/` instead of assuming the name.
## Verify
```bash
module use MX unstable && module load ccp4/9.0
which refmac5 ccp4i2
echo $CCP4 # should point into /opt/psi/MX/ccp4/9.0/ccp4 (-> ccp4-9)
```
Bundled SHELX and ARP/wARP still need their own academic registrations.