-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Problem description
When building a custom bootstrap with scripts/build-bootstraps.sh (aarch64), the process fails on step “Building dependency bzip2” with:
ERROR: No package bzip2 found in any of the enabled repositories. Are you trying to set up a custom repository?
In Termux, bzip2 is not a top-level package; it is a subpackage of libbz2. Putting bzip2 into the bootstrap PACKAGES=(...) list (or into TERMUX_PKG_DEPENDS) causes the builder to look for a non-existent “bzip2” top-level package.
Impact: Bootstrap builds (or package builds) fail if bzip2 is referenced directly instead of libbz2.
Minimal fix (works in practice):
- In bootstrap/package scripts, replace
bzip2withlibbz2. Building/depending onlibbz2produces thebzip2subpackage (command) alongside the library.
What steps will reproduce the bug?
-
Edit
scripts/build-bootstraps.shand includebzip2in:PACKAGES=( ... bzip2 )
-
Run:
./scripts/build-bootstraps.sh --architectures aarch64
-
Observe:
ERROR: No package bzip2 found in any of the enabled repositories.
What is the expected behavior?
- Bootstrap and package builds should succeed when referencing the correct package name.
- If
bzip2is needed, depending on/buildinglibbz2should provide both the library and thebzip2subpackage (CLI).
Actual behavior
- Builder aborts with “No package
bzip2found …” becausebzip2is not a top-level package in the Termux repo.
Proposed fix / suggestions
-
Documentation & examples: Clarify in bootstrap docs and relevant recipes that
bzip2is delivered via thelibbz2package (subpackagebzip2), so scripts should referencelibbz2. -
Optional UX improvements:
- In
scripts/list-packages.shor error messages, hint that "bzip2is a subpackage oflibbz2". - A lint check to warn when
bzip2appears inPACKAGESorTERMUX_PKG_DEPENDS(suggestlibbz2instead).
- In
Workaround used: Replace bzip2 with libbz2 in bootstrap PACKAGES=(...), then rebuild:
# Clean any old marks/artifacts
rm -rf ~/.termux-build/libbz2* ~/.termux-build/*bzip2*
rm -f /data/data/.built-packages/libbz2 /data/data/.built-packages/bzip2
# Build libbz2 (produces bzip2 subpackage)
./build-package.sh -a aarch64 libbz2
# Rebuild bootstrap
./scripts/build-bootstraps.sh --architectures aarch64System information
Not running on device; reproduced in Termux package-builder Docker container.
Builder image: ghcr.io/termux/package-builder
Host OS: Docker on Windows (PowerShell)
Arch: aarch64
Repo: termux/termux-packages (HEAD: 90304dd649)
Build command:
./scripts/build-bootstraps.sh --architectures aarch64