David Uhden Collado wrote:
Hello ports@,Please find attached a new port for Brush 0.4.0: shells/brush Brush (Bourne RUsty SHell) is a Bash- and POSIX-compatible shell implemented in Rust: https://github.com/reubeno/brush The port targets the upstream brush-shell-v0.4.0 release. Brush aims to run existing shell scripts and Bash configuration with as few changes as possible. It implements a large subset of Bash and POSIX shell behavior and also provides an interactive shell with syntax highlighting, history, auto-suggestions and programmable completion. Upstream validates it against Bash with a large compatibility test suite. The main purpose of this port is also to make Brush usable as an alternative to GNU Bash for ports that currently depend on shells/bash. The package installs the executable under both: bin/brush bin/bash with bin/bash being a symlink to brush. It conflicts with shells/bash and declares: @pkgpath shells/bash so the package tools can treat Brush as a provider of that package path. This means ports which invoke bash by name can be tested with Brush without modifying their scripts; only the package dependency needs to be changed from shells/bash to shells/brush. The port builds the brush-shell workspace package, which is upstream's default member and the package recommended for normal installation. The optional experimental feature set, including the embedded uutils coreutils builtins, is intentionally left disabled. There is one OpenBSD-specific source patch. brush-core normally uses nix::sys::wait::waitid(), but that API is not exposed by the nix crate on OpenBSD. The patch uses Brush's existing direct waitid() implementation, currently used for macOS, on OpenBSD as well. A similar portability problem has also been reported on NetBSD. The package registers both brush and bash in /etc/shells. Brush is not yet a complete replacement for Bash. Some functionality, including select, wait -n, disown and logout, is still missing, signal trap support remains incomplete, and there are known compatibility edge cases. The pkg description therefore explicitly warns against replacing shells/bash globally without first testing the affected scripts. The port uses the standard devel/cargo infrastructure and the complete Cargo.lock dependency set from upstream. Thank you for your time and consideration. Best regards, David.
Hello,
Please find attached a revised port for Brush 0.4.0.
The main change is that Brush no longer conflicts with shells/bash.
It now installs only:
bin/brush
I removed the bin/bash symlink, the package conflict and the
shells/bash @pkgpath entry. Only brush is registered in /etc/shells.
This allows both shells to be installed simultaneously, without
presenting Brush as a complete replacement for Bash.
I also improved OpenBSD compatibility and test support:
- Added an OpenBSD patch for ptyprocess 0.5.0, using ptsname(3) and
TIOCSCTTY for pseudoterminal handling.
- Added shells/bash as a TEST_DEPENDS only, since upstream's
compatibility tests compare Brush against Bash.
- Updated the test harness to recognize OpenBSD and exclude
incompatible platform-specific test cases.
- Retained the existing OpenBSD waitid() compatibility patch.
The patched ptyprocess source is fetched through DIST_TUPLE and
integrated as a local Cargo dependency.
The remaining packaging follows the previous proposal.
This revised tarball supersedes the one I sent earlier.
Thank you for your time and consideration.
Best regards,
David.
brush-v2.tar.gz
Description: application/gzip
