Commit 4c60d47
committed
ash/hush: enable full shell feature set; fix missing builtins on old busybox
Both recipes start from `make allnoconfig` and enable a curated CONFIG list.
This fixes missing builtins, fills out the feature set, and fixes a
reproducibility bug.
Missing builtins on old versions: BusyBox renamed several symbols at 1.27.2
(ASH_BUILTIN_ECHO/PRINTF/TEST -> ASH_ECHO/PRINTF/TEST, SH_MATH_SUPPORT[_64] ->
FEATURE_SH_MATH[_64]). The lists used only the modern names, so the
append+oldconfig flow silently dropped them on <=1.26.2 and the 1.2.x island:
ash there shipped with no echo/printf/test builtin (and, being non-standalone,
no /bin/echo fallback) and no arithmetic; hush had no $(( )) on those versions.
Both legacy and modern names are now listed so each applies where it exists.
(Old hush echo/printf/test are unconditional, so they need no symbol.)
Completed the feature set: every CONFIG-gated builtin is enabled (getopts, help,
command, readonly, times, type, [[, source, let, ...), plus ASH/HUSH_BASH_COMPAT,
brace expansion, $LINENO, interactive line editing (history, tab completion,
reverse search, vi mode) and Unicode. hush previously had no arithmetic at all
(FEATURE_SH_MATH was unset) and no aliases.
Config/build fixes required by the new features, across all eras:
- Pin the NEW int symbols (FEATURE_EDITING_MAX_LEN/HISTORY, SUBST_WCHAR): make
oldconfig prompts for them and aborts on the build's closed stdin otherwise.
- Stop sed-forcing the SH_IS "sh alias" choice: setting a choice member leaves
two =y and makes oldconfig re-prompt the choice. Irrelevant for our
directly-invoked binary anyway.
- Drop FEATURE_USERNAME_COMPLETION: old busybox complete_username() uses
getpwent_r(), a glibc extension musl lacks, breaking the static link.
Reproducibility fix: ash and hush share build_srcdir (busybox/<version>), so
`rm -rf "${build_srcdir}"` is now done before extraction. Without it, building
both shells of one version in a single container (`shvr.sh build ash_X hush_X`,
as the Dockerfile does) leaves the first shell's build tree in place; on ancient
busybox `make` reuses stale objects and the second binary is non-reproducible
(observed as a hush_1.2.2.1 checksum mismatch vs CI's isolated build).
Verified by building real binaries across 1.37.0, 1.21.1 and 1.2.2 (echo
regression fixed, hush arithmetic fixed, builtins + line editing working), a
full 22-version matrix build on both arches (44 targets each, zero errors), and
regenerating checksums/build/{amd64,arm64} for all 44 ash/hush targets; both
arches verify clean. HUSH_ALIAS exists only in busybox 1.38.0+ (harmlessly
dropped on older).1 parent fc3eda8 commit 4c60d47
86 files changed
Lines changed: 203 additions & 97 deletions
File tree
- checksums/build
- amd64
- ash_1.19.4/bin
- ash_1.2.2.1/bin
- ash_1.2.2/bin
- ash_1.20.2/bin
- ash_1.21.1/bin
- ash_1.22.1/bin
- ash_1.23.2/bin
- ash_1.24.2/bin
- ash_1.25.1/bin
- ash_1.26.2/bin
- ash_1.27.2/bin
- ash_1.28.4/bin
- ash_1.29.3/bin
- ash_1.30.1/bin
- ash_1.31.1/bin
- ash_1.32.1/bin
- ash_1.33.2/bin
- ash_1.34.1/bin
- ash_1.35.0/bin
- ash_1.36.1/bin
- ash_1.37.0/bin
- ash_1.38.0/bin
- hush_1.19.4/bin
- hush_1.20.2/bin
- hush_1.21.1/bin
- hush_1.22.1/bin
- hush_1.23.2/bin
- hush_1.24.2/bin
- hush_1.25.1/bin
- hush_1.26.2/bin
- hush_1.27.2/bin
- hush_1.28.4/bin
- hush_1.29.3/bin
- hush_1.30.1/bin
- hush_1.31.1/bin
- hush_1.32.1/bin
- hush_1.33.2/bin
- hush_1.34.1/bin
- hush_1.35.0/bin
- hush_1.36.1/bin
- hush_1.37.0/bin
- hush_1.38.0/bin
- arm64
- ash_1.19.4/bin
- ash_1.2.2.1/bin
- ash_1.2.2/bin
- ash_1.20.2/bin
- ash_1.21.1/bin
- ash_1.22.1/bin
- ash_1.23.2/bin
- ash_1.24.2/bin
- ash_1.25.1/bin
- ash_1.26.2/bin
- ash_1.27.2/bin
- ash_1.28.4/bin
- ash_1.29.3/bin
- ash_1.30.1/bin
- ash_1.31.1/bin
- ash_1.32.1/bin
- ash_1.33.2/bin
- ash_1.34.1/bin
- ash_1.35.0/bin
- ash_1.36.1/bin
- ash_1.37.0/bin
- ash_1.38.0/bin
- hush_1.19.4/bin
- hush_1.20.2/bin
- hush_1.21.1/bin
- hush_1.22.1/bin
- hush_1.23.2/bin
- hush_1.24.2/bin
- hush_1.25.1/bin
- hush_1.26.2/bin
- hush_1.27.2/bin
- hush_1.28.4/bin
- hush_1.29.3/bin
- hush_1.30.1/bin
- hush_1.31.1/bin
- hush_1.32.1/bin
- hush_1.33.2/bin
- hush_1.34.1/bin
- hush_1.35.0/bin
- hush_1.36.1/bin
- hush_1.37.0/bin
- hush_1.38.0/bin
- variants
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
0 commit comments