csh: new package - #6276
Open
tgamblin wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Spack csh package (distinct from existing tcsh) to enable testing of Spack’s setup-env.csh compatibility on systems with “real” csh, using Debian’s csh source package plus targeted portability patches for Linux and macOS.
Changes:
- Introduces
cshas aMakefilePackage, including Debian patch-series application and platform-specific patches. - Ships an in-repo
GNUmakefileto build with GNU make (upstream expects BSD make includes). - Adds local portability patches: Linux
closefromdeclaration fix, macOS libc shim layer, and removal ofpublibdependency in Debian’s glob code.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| repos/spack_repo/builtin/packages/csh/package.py | New csh package definition, applies Debian + local patches and provides a basic runtime test. |
| repos/spack_repo/builtin/packages/csh/no-publib.patch | Removes publib dependency and switches glob allocation/freeing to in-tree helpers / libc free. |
| repos/spack_repo/builtin/packages/csh/macos-compat.patch | Adds Darwin compatibility shims (e.g., reallocarray, strnvis arg order, closefrom). |
| repos/spack_repo/builtin/packages/csh/linux-closefrom.patch | Ensures closefrom(3) is declared via libbsd headers on Linux. |
| repos/spack_repo/builtin/packages/csh/GNUmakefile | GNU make build/install rules to replace upstream’s BSD-make-based build. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Spack has a `tcsh` package but not a `csh` package. There are systems
wtih real `csh` and we try to keep our `setup-env.csh` compatible with
them, so add `csh` for testing, even if most of the world has moved on.
This builds from Debian's csh source package, which is based on the original.
We use a lot of Debian's patches and add some for macOS.
- [x] Ship a short GNUmakefile, since upstream uses BSD Make.
On Linux:
- [x] Apply Debian's glibc portability patches.
On macOS:
- [x] Patch to use macOS libc shims, use in-tree allocators instead
of publib, various other portability.
This builds on macOS Tahoe and RHEL8.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Todd Gamblin <tgamblin@llnl.gov>
tgamblin
force-pushed
the
add-csh-package
branch
from
August 29, 2026 01:06
baa07c6 to
23643d2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Spack has a
tcshpackage but not acshpackage. There are systems wtih realcshand we try to keep oursetup-env.cshcompatible with them, so addcshfor testing, even if most of the world has moved on.This builds from Debian's csh source package, which is based on the original. We use a lot of Debian's patches and add some for macOS.
On Linux:
On macOS:
This builds on macOS Tahoe and RHEL8.
Assisted-By: Claude noreply@anthropic.com