Gate SELinux functionality to Linux-only and provide stub implementations
for chcon/runcon on non-Linux platforms to maintain cross-platform builds.
Changes:
- Gate all SELinux code with target_os = "linux" checks
- Add stub main() for chcon/runcon on non-Linux with user-friendly errors
- Add CI job to verify stubs build correctly on macOS and Windows
- Update ls to check both selinux feature AND target_os
Benefits:
- Fixes build failures on macOS/Windows (#8581, #7996, #7695, #6491)
- Maintains workspace buildability across all platforms
- Provides clear error messages instead of silent failures
- Prevents accidental SELinux usage on unsupported platforms
CI Testing:
- New 'Build/SELinux-Stubs (Non-Linux)' job tests macOS and Windows
- Verifies stub binaries are created and compilation succeeds
- Validates full workspace builds with stubs present
Addresses maintainer feedback in PR #8795
* basenc: implement --base58 encoding option
Add support for Base58 encoding to basenc as per GNU coreutils 9.8.
Base58 uses the alphabet '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
which excludes visually ambiguous characters (0, O, I, l).
Resolves issue #8744.
* basenc: fix clippy warnings and spelling issues
Fix explicit iteration clippy warnings. Add Base58 alphabet to spell-checker ignore list to resolve cspell errors.
Add comprehensive test coverage for tee --output-error and broken pipe behavior:
- test_output_error_flag_without_value_defaults_warn_nopipe: Verify default behavior
- test_output_error_presence_only_broken_pipe_unix: Non-crash on SIGPIPE
- test_broken_pipe_early_termination_stdout_only: Early termination robustness
- test_write_failure_reports_error_and_nonzero_exit: Error reporting validation
These tests address remaining gaps from GNU test suite tests/misc/tee.sh and
tests/misc/write-errors.sh highlighted in #4627. Platform-specific guards
(#[cfg(unix)], FreeBSD exclusion) ensure cross-platform compatibility.
* feat: optimize directory copy by caching file checks and refactoring calls
- Add `target_is_file` field to Context to avoid repeated `stat` calls on target
- Refactor `copy_direntry` to accept `&Entry` and additional bool params for symlink/directory handling
- Use cached value and local variables for cleaner access to entry properties
- Pass `created_parent_dirs` to `copy_file` for improved directory creation tracking
This reduces filesystem overhead in cp operations when copying directories.