[FEATURE] Add native basename and dirname utilities #3
Labels
No labels
alpha-1
bug
ci
docs
duplicate
enhancement
help wanted
invalid
performance
phase-6
question
refactor
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erix/coreutils#3
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem and motivation
EriX build scripts use
basenameanddirnameto locate helper scripts andname checksum outputs. Native Coreutils currently provides neither applet.
Both operations can run entirely on their argument bytes.
Proposed behavior and scope
Add authenticated native entries for both utilities and support their POSIX
pathname rules,
--, exact operand counts and basename's optional literal suffix.Preserve non-UTF-8 bytes. Document the choices for empty input and slash-only
input, including
//.Use the same borrowed parser in buffered and freestanding execution. Extend the
Coreutils packaging catalog and Integration image consumers so each command has
its own authenticated identity.
Authority, security and reliability
Both applets have an empty object-authority ceiling. They receive argument data
and the already selected output/error streams; pathname bytes grant no lookup,
current-directory or environment authority. Output failures retain the existing
stream cleanup and error rules. No allocator or fixed pathname-size ceiling is
needed.
Acceptance criteria
Alternatives and tradeoffs
Depending on an imported utility would leave these small lexical operations
unavailable in clean images. Keep path resolution in its existing mediated
owners; neither utility needs it.
Tracking and rollout
Part of native shell and build utilities.
Coordinate Coreutils PR 2 and
Integration PR 12.
e336cc59 adds
basenameanddirname. Both preserve raw argument bytes, share the same lexical parser and use empty object-authority tables. They support--, the documented empty/slash-only cases and basename’s literal suffix rule. Integration packaging and technical-manual updates are in progress.