Repository navigation
docs: record what the HarmonyOS bash actually is - #227
Merged
Merged
Conversation
Follow-up to #226. That change established that HarmonyOS PC ships bash rather than mksh; this pins down what that bash is, and folds in two caveats from existing ports. Identity of the shell It is stock GNU bash, not a reimplementation: - bash --version prints "GNU bash, version 5.1.16(1)-release". - The public HNP build recipe (Termony, build-hnp/bash/Makefile) fetches $(GNU_MIRROR)/gnu/bash/bash-5.3.tar.gz and configures with --host aarch64-unknown-linux-musl --without-bash-malloc --disable-nls. - The build produces libsh.a, libhistory.a and the loadables (recho, printf, basename), which are specific to the GNU bash source tree. No Huawei-specific shell patches. It is an ordinary musl-linked GNU bash, which is why niubash's target_os = "linux" cfgs all hit. Versions are recorded with their provenance rather than as "the" version: the measured machine ran 5.1.16, the build recipe fetches 5.3. Two caveats from existing ports - Termony bundles 42 packages and its list has bash but not coreutils; it vendors busybox instead. So even with 454 commands present system- wide, an independent porter still found the stock surface insufficient. That is direct evidence for the distinction this page already draws: "the tools exist" and "the tools are dependable" are different claims. - Prefix mismatch: inside the built-in Terminal, /data/service/hnp paths can resolve wrong because the prefix is /data/app/base.org/base_1.0; Termony's README documents LD_LIBRARY_PATH / TERMINFO overrides. This does not contradict the PATH finding -- PATH resolution and runtime prefix resolution are separate -- but it means the first device run should check prefix resolution too, not just PATH. HarmonyOS 6.0+ has sudo and editable system environment variables, per the same README. Docs only; no code change.
This was referenced Oct 10, 2026
caomengxuan666
added a commit
that referenced
this pull request
Oct 13, 2026
…1.4.0 section (#326) - The [Unreleased] entries (#284/#287, #293-#304, #313) move into [1.4.0]; [Unreleased] is empty again. - Newly recorded (today's wave): Git Bash compatible factory default prompt (#292, headline), WT-form shortcuts (#290/#211), the paste burst trailing-Enter fix (#308/#291), self-update SHA256 + release pinning (#311/#312), managed-block convergence (#324), completion tables/NIU_COMPDEFS/NIU_ENV probe (#305-#307), -s on-demand stdin (rubash#586 host half), bash/rbash invocation faces (#321/#322). - Older gaps recorded: closed-stdout pipe contract (#245/#286), history session-end write-back (#265), sh POSIX contract (#262), PWD persona alignment (#283), one-shot fast path (#270), --cwd-state (#272), --encoded-command (#271), REPL-command highlighting (#281), docs passes (#255/#225/#226/#227), MSRV (#267), easter-egg prune (#264). CHANGELOG-only change; no version claims.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #226.
#226 established that HarmonyOS PC ships bash, not
mksh. This pins down what that bash is, because "it has bash" could have meant a reimplementation.It is stock GNU bash
bash --versionon a HarmonyOS PC printsGNU bash, version 5.1.16(1)-release— the GPL banner is GNU's own.build-hnp/bash/Makefile):--without-bash-mallocdrops bash's bundled allocator so musl's is used.libsh.a,libhistory.aand theloadables(recho,printf,basename, …) — artifacts unique to the GNU bash source tree.No Huawei-specific shell patches. It is an ordinary musl-linked GNU bash. That matters for us: it confirms HarmonyOS's userland is a musl + Linux-ABI stack, not a bespoke one — which is why niubash's
target_os = "linux"cfgs all hit and the port was two lines.Versions are recorded with provenance, not as "the" version: the measured machine ran 5.1.16, the build recipe fetches 5.3.
Two caveats from existing ports
1. Termony still bundled its own toolset. Its 42-package list is
aria2 bash binutils *busybox* … gcc gdb gettext git …— bash yes, coreutils no, busybox instead. So even with 454 commands present system-wide, an independent porter concluded the stock surface was insufficient and vendoredbusybox. Not proof the 93% number is wrong — it is direct evidence that "the tools exist" and "the tools are dependable" are different claims, which is the distinction this page already draws.2. Prefix mismatch in the built-in Terminal. Termony's README:
This does not contradict #226's PATH finding —
PATHresolution and runtime prefix resolution are separate mechanisms — but it means the first device run should check prefix resolution too, not just PATH. On HarmonyOS 6.0+ the README adds thatsudois available and system environment variables are editable, which is how the overrides persist.Diff
docs/src/platform-support.md— 331 → 391 lines. Docs only, no code.