Skip to content

cli: identify shadow-rs as part of uutils (#161)#162

Merged
pierre-warnier merged 3 commits into
mainfrom
feat/161-uutils-identity
Jun 8, 2026
Merged

cli: identify shadow-rs as part of uutils (#161)#162
pierre-warnier merged 3 commits into
mainfrom
feat/161-uutils-identity

Conversation

@pierre-warnier

Copy link
Copy Markdown
Collaborator

Summary

  • Every tool now reports <name> (uutils shadow-rs) <version> for --version, and --help ends with a project link. Implemented as a shared shadow_core::cli module so future tools added to the workspace get the identification for free.
  • The multicall front-end (shadow-rs --help / --version / -h / -V) carries the same identification, which it didn't before.
  • While auditing the same uu_app() blocks for residual similarity to GNU shadow-utils' man-page wording, 118 clap .help() and .about() strings were rewritten in the same pass. New phrasing derives only from each flag's in-tree behavior. Output strings that scripts grep for (chage -l column headings, pwck/grpck diagnostic format) were retained intentionally — drop-in compatibility is part of the project's contract.
  • Audit protocol and findings are recorded in `docs/CLEAN-ROOM-AUDIT-2026-05-04.md`. Headline: 0 verbatim matches in 486 strings examined.

Closes #161.

Test plan

  • `cargo fmt --all --check` (debian)
  • `cargo clippy --workspace --all-targets -- -D warnings` (debian)
  • `cargo test --workspace` — 574 passed, 0 failed on debian, alpine, fedora
  • Visually inspected `--help` and `--version` output for passwd, useradd, chage, and the multicall front-end

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 shared uutils/shadow-rs identification to CLI help/version output, rewrites many help/about strings across the tool suite, and records the clean-room wording audit that motivated the string changes.

Changes:

  • Introduces a shared shadow_core::cli module with common version/help footer strings.
  • Updates the multicall frontend and 14 utility uu_app() definitions to use the new branding and refreshed help/about text.
  • Adds a dated clean-room audit document describing the review methodology and results for user-facing strings.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 18 comments.

Show a summary per file
File Description
src/uu/usermod/src/usermod.rs Updates usermod help/about wording and shared version/footer wiring.
src/uu/userdel/src/userdel.rs Updates userdel help/about wording and shared version/footer wiring.
src/uu/useradd/src/useradd.rs Updates useradd help/about wording and shared version/footer wiring.
src/uu/pwck/src/pwck.rs Updates pwck help/about wording and shared version/footer wiring.
src/uu/passwd/src/passwd.rs Updates passwd help/about wording and enables shared version/footer output.
src/uu/newgrp/src/newgrp.rs Updates newgrp help/about wording and enables shared version/footer output.
src/uu/grpck/src/grpck.rs Updates grpck help/about wording and shared version/footer wiring.
src/uu/groupmod/src/groupmod.rs Updates groupmod help/about wording and shared version/footer wiring.
src/uu/groupdel/src/groupdel.rs Updates groupdel help/about wording and shared version/footer wiring.
src/uu/groupadd/src/groupadd.rs Updates groupadd help/about wording and shared version/footer wiring.
src/uu/chsh/src/chsh.rs Updates chsh help/about wording and enables shared version/footer output.
src/uu/chpasswd/src/chpasswd.rs Updates chpasswd help/about wording and enables shared version/footer output.
src/uu/chfn/src/chfn.rs Updates chfn help/about wording and enables shared version/footer output.
src/uu/chage/src/chage.rs Updates chage help/about wording and enables shared version/footer output.
src/shadow-core/src/lib.rs Exposes the new shared CLI module from shadow-core.
src/shadow-core/src/cli.rs Adds shared version/help footer constants for workspace CLIs.
src/bin/shadow-rs.rs Adds multicall frontend --help/--version branding and help text.
docs/CLEAN-ROOM-AUDIT-2026-05-04.md Adds the clean-room audit record for user-facing strings.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/bin/shadow-rs.rs Outdated
Comment thread src/bin/shadow-rs.rs Outdated
Comment thread src/bin/shadow-rs.rs Outdated
Comment thread src/uu/userdel/src/userdel.rs Outdated
Comment thread src/uu/userdel/src/userdel.rs Outdated
Comment thread src/uu/chpasswd/src/chpasswd.rs Outdated
Comment thread src/uu/usermod/src/usermod.rs Outdated
Comment thread docs/CLEAN-ROOM-AUDIT-2026-05-04.md Outdated
Comment thread docs/CLEAN-ROOM-AUDIT-2026-05-04.md Outdated
Comment thread src/uu/passwd/src/passwd.rs Outdated
Per #161, every tool now reports `(uutils shadow-rs) <ver>` in its
--version output and links to the project in --help via a shared
shadow_core::cli module.

While auditing the same uu_app() blocks for residual similarity to
GNU shadow-utils man-page phrasing, the medium-confidence findings
from a clean-room similarity check were also rewritten: 118 clap
.help() and .about() strings across all 14 tools now use phrasing
derived from the in-tree behavior of each flag, not from upstream
documentation.

Output strings that scripts grep for (chage -l column headings,
pwck/grpck diagnostic lines) were left intentionally untouched, since
drop-in compatibility is part of the project's contract.

- shadow-core: new cli module with VERSION and AFTER_HELP constants
- 14 tools: wire .version() and .after_help() in every uu_app()
- 14 tools: rewrite 118 flag-help and .about() strings
- shadow-rs multicall: handle --help/--version/-h/-V with project ID
- fmt + clippy + tests pass on debian, alpine, fedora (574 passed, 0 failed)

Closes #161
Adds an evidence document for the clean-room similarity audit that
prompted the flag-help rewrite in the previous commit. Headline:
0 verbatim matches in 486 user-facing strings.

The audit protocol is reproducible and described in the doc, including
the schema-constrained output and post-run command-log scan that ensure
no upstream string crosses back into the workspace.
- multicall --version/--help now use the shared (uutils shadow-rs)
  identifier instead of (uutils), matching the tool crates; clarify the
  symlink invocation line in the help banner.
- --root help for the SysRoot tools (userdel, useradd, usermod, groupadd,
  groupdel, groupmod, pwck, grpck) no longer claims a chroot(2): these
  only resolve system files under a path prefix. Reword to match, and
  rename the metavar CHROOT_DIR -> ROOT_DIR.
- userdel --force: documented as accepted-for-compatibility (no effect)
  rather than promising behavior the code does not implement.
- groupadd -K: scope the help to the GID-range keys actually honored.
- passwd --repository: note only the local files backend is supported.
- passwd --stdin: reads password input generally (auth may consume the
  current password too), not just the new password.
- chpasswd -m: state that MD5 is rejected, not supported.
- usermod --append: restore the note that -a is only effective with -G.
- clean-room audit doc: cite CONTRIBUTING.md (the in-tree policy) instead
  of the gitignored CLAUDE.md.

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

Copilot reviewed 18 out of 18 changed files in this pull request and generated no new comments.

@pierre-warnier pierre-warnier merged commit d31c689 into main Jun 8, 2026
9 checks passed
@pierre-warnier pierre-warnier deleted the feat/161-uutils-identity branch June 8, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Let utilities identify themselves as being part of uutils in --help and --version

2 participants