karnel-termux 4.18.0 → 4.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/docs/CHANGELOG.md +6 -0
- package/karnel/RELEASE_COMMIT +1 -1
- package/karnel/utils/compat.sh +7 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<a href="https://github.com/karnel-termuxOFC/karnel-termux">
|
|
11
|
-
<img src="https://img.shields.io/badge/version-4.18.
|
|
11
|
+
<img src="https://img.shields.io/badge/version-4.18.1-0078D4?style=for-the-badge" alt="Version">
|
|
12
12
|
</a>
|
|
13
13
|
<a href="https://www.npmjs.com/package/karnel-termux">
|
|
14
14
|
<img src="https://img.shields.io/npm/v/karnel-termux?style=for-the-badge&logo=npm&color=cb3837" alt="npm">
|
|
@@ -78,7 +78,7 @@ Why it's great:
|
|
|
78
78
|
### Via checksummed GitHub release (recommended)
|
|
79
79
|
|
|
80
80
|
```bash
|
|
81
|
-
version=4.18.
|
|
81
|
+
version=4.18.1
|
|
82
82
|
tmpdir=$(mktemp -d) && trap 'rm -rf "$tmpdir"' EXIT
|
|
83
83
|
base="https://github.com/karnel-termuxOFC/karnel-termux/releases/download/v$version"
|
|
84
84
|
curl -fsSL "$base/karnel-termux-install.sh" -o "$tmpdir/karnel-termux-install.sh"
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,12 @@ layout: base
|
|
|
6
6
|
|
|
7
7
|
# Documentation Changelog
|
|
8
8
|
|
|
9
|
+
## 4.18.1
|
|
10
|
+
|
|
11
|
+
- **The ladder is reachable from every installer, not just Freebuff:** `compat_adapt_installed()` is the single entry point behind `_tool_compat_adapt` (utils/tools.sh), `_ai_tool_compat_adapt` (tools/ai/all.sh) and the post-install loop in `cli/commands/install.sh`, so it already covered all 16 categories — but it only ever called `compat_wrap()`, which stops at the loader tier. Tiers 3 (glibc userland) and 4 (proot FHS root) were reachable solely from Freebuff's `compat_adapt()` call, which is why no other tool could ever climb above tier 2. It now escalates after wrapping, and re-probes wrappers already on disk so a tool that stops starting at its current tier climbs on the next install or update instead of staying broken behind a launcher nobody re-examines.
|
|
12
|
+
- **No cost for what already runs:** native binaries, scripts and plain files still return before any probe, so the added `--version` probe applies only to tools that actually needed a wrapper — the hundreds of native entries in a Termux prefix are untouched.
|
|
13
|
+
- **Tests:** three new cases pin the behaviour (ladder reachable from the installer path, existing wrappers re-evaluated, natives never probed — the last with a positive control so its zero cannot pass vacuously). Each was proven to fail first: dropping the escalation fails 3 cases, probing natives fails the efficiency case alone, removing tier 3's `PATH` export fails the 3 ladder cases, and letting tier 4 write a wrapper without a root fails the refusal case alone. The suite runs 20 cases in 7 seconds.
|
|
14
|
+
|
|
9
15
|
## 4.18.0
|
|
10
16
|
|
|
11
17
|
- **Three-tier compatibility layer:** a foreign glibc binary is no longer handled by one fixed trick. `compat_adapt` wraps, probes and climbs to the cheapest tier that actually starts the tool — the glibc loader alone (free, installs nothing), the glibc userland (`$PREFIX/glibc/bin`, 383 glibc tools, prepended to `PATH` together with the glibc exec shim so child processes resolve the same way), or proot over a synthetic `/lib`, `/usr` and `/etc` assembled from the sysroot already on the device. That last tier replaces `proot-distro install ubuntu` for binaries that merely hardcode an absolute path, and it downloads nothing. A tier that cannot be reached is refused before the wrapper is written, so `proot -r ''` can never ship, and every step unwraps back to `<path>.karnel-real`.
|
package/karnel/RELEASE_COMMIT
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
a046270feccbad261fd440a040fb960250c8e699
|
package/karnel/utils/compat.sh
CHANGED
|
@@ -507,10 +507,17 @@ compat_adapt_installed() {
|
|
|
507
507
|
real="$(readlink -f -- "$path" 2>/dev/null || printf '%s' "$path")"
|
|
508
508
|
[[ -f "$real" && -x "$real" ]] || return 0
|
|
509
509
|
if _compat_is_wrapper "$real"; then
|
|
510
|
+
# Already wrapped: re-probe it, so a binary that later stops starting at
|
|
511
|
+
# this tier climbs instead of being handed to the user as-is. Escalation
|
|
512
|
+
# is what every installer reaches through this function; only freebuff
|
|
513
|
+
# calls compat_adapt() directly, so without this the glibc userland and
|
|
514
|
+
# proot tiers would stay unreachable for the rest of the catalog.
|
|
515
|
+
compat_escalate "$real" || true
|
|
510
516
|
return 0
|
|
511
517
|
fi
|
|
512
518
|
if compat_is_glibc_elf "$real"; then
|
|
513
519
|
compat_wrap "$real" || true
|
|
520
|
+
compat_escalate "$real" || true
|
|
514
521
|
fi
|
|
515
522
|
return 0
|
|
516
523
|
}
|
package/package.json
CHANGED