Add ccp4 module: vendor tarball, non-interactive BINARY.setup
Pre-agrees the CCP4 licence via .agree2ccp4v6 so BINARY.setup never prompts. Download via urls: with unpacker: none (untar once into PREFIX, BINARY.setup patches paths at final location). Build tmp and download cache go to /das/work/p21/p21515/.cache/Pmodules through ~/.Pmodules/Pmodules.yaml (see README) since /var/tmp and the home quota are too small for the ~5 GB tarball. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
# 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.2
|
||||
cd ccp4
|
||||
modbuild build --check-mode 9.0 # yamllint the config first
|
||||
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`.
|
||||
|
||||
## 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
|
||||
```
|
||||
|
||||
Bundled SHELX and ARP/wARP still need their own academic registrations.
|
||||
|
||||
Executable
+27
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env modbuild
|
||||
|
||||
# Download happens in the default prep via urls: in files/config.yaml.
|
||||
# unpacker: none because BINARY.setup patches paths relative to its final
|
||||
# location — we untar once, directly into $PREFIX, instead of unpacking
|
||||
# ~20 GB into the build tmp and copying it over.
|
||||
|
||||
pbuild::configure() {
|
||||
:
|
||||
}
|
||||
|
||||
pbuild::compile() {
|
||||
:
|
||||
}
|
||||
|
||||
pbuild::install() {
|
||||
cd "${PREFIX}"
|
||||
tar -xzf "${SRC_DIR}/ccp4-${V}-shelx-arp-x86_64.tar.gz"
|
||||
# Pre-agree the CCP4 licence so BINARY.setup skips its interactive prompt
|
||||
# (downloading from ccp4.ac.uk already required accepting it). The printf
|
||||
# answers any prompt a newer BINARY.setup might still ask; printf instead
|
||||
# of `yes` because modbuild runs with pipefail and yes dies by SIGPIPE.
|
||||
touch "${PREFIX}/.agree2ccp4v6" "${HOME}/.agree2ccp4v6"
|
||||
printf 'y\ny\ny\n' | "./ccp4-${V_MAJOR}.${V_MINOR}/BINARY.setup"
|
||||
# version-independent symlink so the modulefile survives 9.0.xxx updates
|
||||
ln -sfn "ccp4-${V_MAJOR}.${V_MINOR}" ccp4
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
---
|
||||
format: 1
|
||||
ccp4:
|
||||
defaults:
|
||||
group: MX
|
||||
overlay: base
|
||||
relstage: unstable
|
||||
urls:
|
||||
# sid= is session-generated on ccp4.ac.uk and expires; if the download
|
||||
# fails, get a fresh link from https://www.ccp4.ac.uk/download/
|
||||
# (package "CCP4 + SHELX + ARP/wARP", Linux x86_64) or pre-stage the
|
||||
# tarball as $PMODULES_DISTFILESDIR/ccp4-<version>-shelx-arp-x86_64.tar.gz
|
||||
- url: "https://www.ccp4.ac.uk/download/download_file.php?os=linux&pkg=ccp4-shelx-arp-x86_64&sid=09b78d1369f605f517efa393f88d2bae713ad0b6"
|
||||
name: ccp4-${V}-shelx-arp-x86_64.tar.gz
|
||||
unpacker: none
|
||||
versions:
|
||||
9.0:
|
||||
config:
|
||||
relstage: unstable
|
||||
@@ -0,0 +1,19 @@
|
||||
#%Module1.0
|
||||
|
||||
module-whatis "CCP4: software suite for macromolecular X-ray crystallography"
|
||||
module-url "https://www.ccp4.ac.uk/"
|
||||
module-license "CCP4 licence; bundled SHELX and ARP/wARP need their own academic registration"
|
||||
module-maintainer "Jiaxin Duan <jiaxin.duan@psi.ch>"
|
||||
|
||||
module-help "
|
||||
CCP4 suite (binary distribution bundled with SHELX and ARP/wARP) for
|
||||
macromolecular crystallography: data processing, phasing, model building
|
||||
and refinement (refmac5, ccp4i2, coot, shelx, arp/warp, ...).
|
||||
|
||||
Loading this module sources ccp4.setup-sh, which sets CCP4, CBIN,
|
||||
CCP4_SCR and PATH.
|
||||
"
|
||||
|
||||
# build's install() leaves a version-independent 'ccp4' symlink next to
|
||||
# ccp4-<major.minor>, so this line survives 9.0.xxx updates
|
||||
puts stdout "source $PREFIX/ccp4/bin/ccp4.setup-sh;"
|
||||
Reference in New Issue
Block a user