Skip to content

Relocatable code

John Freeman edited this page Feb 20, 2025 · 1 revision

Status, Feb-20-2025

johnfreeman/issue426_relocatable_installation branch, commit af39c21707a916d4c3df7abf5cd17079b4ac6cc7

Currently, you can create a Spack buildcache file containing fddaq and its dependencies by source-ing ./scripts/spack/packages_in_mirror.sh. However, there are a couple of boundary conditions:

  1. You need to be in a work area set up with the -s option having been passed to dbt-create
  2. With the environment set up (source ./env.sh)
  3. And with Spack knowing about a GPG key.

(3) is used as a way to ensure that when you spack install using binaries from a mirror, that checking is done to ensure you're downloading what you think you're downloading. To set this up in your work area, you'd do something like:

spack gpg init
spack gpg create <username> <user email>

Unfortunately, while this works in containers based on ghcr.io/dune-daq/alma9-slim-externals:v2.2 and this works on protodune-daq01.fnal.gov, if you try it on daq.fnal.gov, you'll get this:

gpg: agent_genkey failed: No such file or directory
gpg: key generation failed: No such file or directory
==> Error: Command exited with status 2:
'/usr/bin/gpg2' '--gen-key' '--batch'

It's not clear why.