Skip to content

csh: new package - #6276

Open
tgamblin wants to merge 1 commit into
developfrom
add-csh-package
Open

csh: new package#6276
tgamblin wants to merge 1 commit into
developfrom
add-csh-package

Conversation

@tgamblin

@tgamblin tgamblin commented Aug 29, 2026

Copy link
Copy Markdown
Member

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.

  • Ship a short GNUmakefile, since upstream uses BSD Make.

On Linux:

  • Apply Debian's glibc portability patches.

On macOS:

  • 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

@spackbot-triage spackbot-triage Bot added new-package Additions of new packages to the Spack ecosystem new-version Modifications to packages' `depends_on()` directives dependencies Modifications with a `depends_on()` directive patch Modifications to packages' sets of defined patches maintainers Modifications to a package's `maintainers()` directive licenses Modifications to a package's `license()` directive stand-alone-tests Stand-alone (or smoke) tests for installed packages labels Aug 29, 2026
@tgamblin
tgamblin requested a lite review from Copilot August 29, 2026 00:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 csh as a MakefilePackage, including Debian patch-series application and platform-specific patches.
  • Ships an in-repo GNUmakefile to build with GNU make (upstream expects BSD make includes).
  • Adds local portability patches: Linux closefrom declaration fix, macOS libc shim layer, and removal of publib dependency 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.

Comment thread repos/spack_repo/builtin/packages/csh/macos-compat.patch Outdated
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Modifications with a `depends_on()` directive licenses Modifications to a package's `license()` directive maintainers Modifications to a package's `maintainers()` directive new-package Additions of new packages to the Spack ecosystem new-version Modifications to packages' `depends_on()` directives patch Modifications to packages' sets of defined patches stand-alone-tests Stand-alone (or smoke) tests for installed packages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants