Repository navigation
v0.3.0
[0.3.0] - 2026-07-31
Multi-user module builds.
Fixed
shelley buildnow produces modules every user on the machine can load. shelley
never toldshpcwhere to install, so it inherited shpc's default of
module_base: $HOME/shpc/modules. Because the build re-execs undersudo -E, which
preservesHOME, root wrote the modules and wrapper scripts into the invoking user's
home directory — unreadable and untraversable by anyone else, leaving the modulefile
symlink under/apps/Modules/modulefilespointing into an inaccessible tree.
Artifacts now land under/apps/shpcand/apps/localas documented.- Build artifacts are readable and executable by all users: directories
0755, files
0644, wrapper scripts0755, never group- or other-writable. Enforced by a
umask 022set before anything forks, plus an explicitchmodpass over the subtrees
each build touched. A restrictive umask in the invoking shell no longer leaks into
/apps. /apps/shpcand/apps/localare created on first build. Previously nothing created
them, and the one line referencing/apps/shpctargeted a path that did not exist.- The sudo probe now covers all three build roots, not just
/apps/Modules/modulefiles, so a first run on a fresh machine escalates correctly. shelley findno longer reports a module as installed when its modulefile symlink does
not resolve to a readable file — which is the case for every module built by an earlier
version into a home directory.- The sudo re-exec now re-runs the shelley that is actually running, via
sys.executable -m shelley, instead of resolvingshelleyonPATH. A PATH lookup can
find a different installation: with a system-wide shelley present, running a checkout
handed the privileged half of the build to the system copy, so the process that actually
installs could be an older version. The symptom was baffling — the unprivileged half
printed the new version's output while the build behaved like the old one, writing to
$HOME/shpcanyway. Requires the newshelley/__main__.py.
Changed
- Every
shpcinvocation is pinned to a shelley-managed settings file at
/apps/shpc/settings.ymlvia--settings-file. This is the highest-precedence layer in
shpc's resolution chain, so a per-user~/.singularity-hpc/settings.ymlcan no longer
redirect a shared build. The file is partial — shpc still merges its own defaults
underneath — and is regenerated only when stale. /apps/localis declared in that settings file rather than registered with
shpc config add registry, which would have expanded the override file into a frozen
snapshot of every site default.
Added
SHELLEY_SHPC_BASE,SHELLEY_LOCAL_REGISTRYandSHELLEY_LMOD_MODULES_PATHoverride
the build roots (defaults/apps/shpc,/apps/local,
/apps/Modules/modulefiles). They are forwarded explicitly across the sudo re-exec, so
the elevated child agrees with the parent. Note thatSHELLEY_SHPC_BASEis effectively
write-once: a generatedmodule.luabakes in absolute paths, so changing it after
modules exist invalidates them.
Removed
- The
chown -R $SUDO_USER:$SUDO_USERover the shpc base. Handing the tree to a single
account is what made builds single-user, and it let one unprivileged user rewrite
modules everyone else executes.
Migration
Modules built with 0.2.0 or earlier live under the original builder's home directory and
cannot be salvaged — module.lua bakes in absolute wrapper and container paths, so they
cannot be moved or chmodded into working order. Find them with
find /apps/Modules/modulefiles -type l -lname '/home/*' and rebuild those tools.