Repository Analysis

termux/termux-packages

A package build system for Termux.

1.3 Likely human-written View on GitHub
1.3
Adjusted Score
1.3
Raw Score
100%
Time Factor
2026-05-30
Last Push
16,316
Stars
Shell
Language
217,528
Lines of Code
4082
Files
297
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 0MEDIUM 12LOW 285

Pattern Findings

297 matches across 9 categories. Click a row to expand file-level details.

Over-Commented Block241 hits · 196 pts
SeverityFileLineSnippet
LOWroot-packages/v4l-utils/getsubopt.h1#ifndef _GETSUBOPT_H
LOWdisabled-packages/termux-x11/termux-x11.c1#include <unistd.h>
LOWdisabled-packages/qt5-qtquickcontrols/build.sh21 ##
LOWndk-patches/langinfo.h41#define _NL_ITEM_INDEX(nl) ((nl) & 0x3ff)
LOWndk-patches/langinfo.h61#define ABDAY_5 19
LOWndk-patches/langinfo.h81#define ABMON_6 39
LOWscripts/generate-apt-packages-list.sh1#!/usr/bin/env bash
LOWscripts/check-repository-health.js1#!/usr/bin/env node
LOWscripts/properties.sh1# shellcheck shell=bash
LOWscripts/properties.sh21# Additionally, the Termux packages build system is an unsafe mess of
LOWscripts/properties.sh41# - `invalid_termux_prefix_paths`: Path variable must not match
LOWscripts/properties.sh61##
LOWscripts/properties.sh121##
LOWscripts/properties.sh141# separators `/` are not allowed. The path component characters must
LOWscripts/properties.sh161# with a `/`). Duplicate or trailing path separators `/` are not
LOWscripts/properties.sh181# specific Filesystem Hierarchy Standard paths or paths used by Termux
LOWscripts/properties.sh201# Same reasoning as `TERMUX_REGEX__INVALID_TERMUX_ROOTFS_PATHS`,
LOWscripts/properties.sh221##
LOWscripts/properties.sh241# - https://cs.android.com/android/platform/superproject/+/android-14.0.0_r1:frameworks/base/core/java/android/content/p
LOWscripts/properties.sh341# Following is a list of `TERMUX_` variables that are safe to modify when forking.
LOWscripts/properties.sh361# - `TERMUX_API_APP__PACKAGE_NAME`.
LOWscripts/properties.sh381TERMUX__LNAME="${TERMUX__NAME,,}"
LOWscripts/properties.sh401# `TERMUX__NAME`, `TERMUX_APP__PACKAGE_NAME` and urls.**
LOWscripts/properties.sh421
LOWscripts/properties.sh441##
LOWscripts/properties.sh461# - `TERMUX_APP__NAMESPACE`.
LOWscripts/properties.sh481# The directory set will be deleted by `clean.sh` if `TERMUX__PREFIX`
LOWscripts/properties.sh501
LOWscripts/properties.sh521#
LOWscripts/properties.sh541
LOWscripts/properties.sh561__termux_build_props__add_variables_validator_actions "TERMUX__CORE_DIR" "safe_absolute_path"
LOWscripts/properties.sh581# - https://man7.org/linux/man-pages/man7/unix.7.html
LOWscripts/properties.sh601##
LOWscripts/properties.sh621##
LOWscripts/properties.sh641##
LOWscripts/properties.sh661# Termux subdirectory path for `TERMUX__APPS_DIR_BY_UID`.
LOWscripts/properties.sh681# numbers and must not start with a `0`.
LOWscripts/properties.sh701
LOWscripts/properties.sh721##
LOWscripts/properties.sh741##
LOWscripts/properties.sh761###########
LOWscripts/properties.sh781# the `TERMUX_APP__DATA_DIR` if compiling packages for the Android
LOWscripts/properties.sh801#
LOWscripts/properties.sh821
LOWscripts/properties.sh841TERMUX_ANDROID_HOME="$TERMUX__HOME" # Deprecated alternative variable for `TERMUX__HOME`
LOWscripts/properties.sh861# Default value: `usr`
LOWscripts/properties.sh881# are installed under the `usr` subdirectory under rootfs, like under
LOWscripts/properties.sh901# `TERMUX__PREFIX`, or a custom directory other than `usr`. In this
LOWscripts/properties.sh921# - `TERMUX__PREFIX` must not be equal to `TERMUX__HOME` and
LOWscripts/properties.sh961##
LOWscripts/properties.sh981# Termux `glibc` prefix directory path under `TERMUX__PREFIX`
LOWscripts/properties.sh1001#
LOWscripts/properties.sh1021# commands will fail with exit code 1 without any error on `stderr`,
LOWscripts/properties.sh1081##
LOWscripts/properties.sh1101#
LOWscripts/properties.sh1121
LOWscripts/properties.sh1141##
LOWscripts/properties.sh1161##
LOWscripts/properties.sh1181TERMUX__PREFIX__MULTI_LIB_SUBDIR="lib32"
LOWscripts/properties.sh1201# - https://github.com/termux/termux-packages/wiki/Termux-file-system-layout#termux-lib-directory
181 more matches not shown…
Redundant / Tautological Comments17 hits · 25 pts
SeverityFileLineSnippet
LOWbuild-all.sh23# Set TERMUX_INSTALL_DEPS to -s unless set to -i
LOWbuild-package.sh449# Check if the package is in the compiled list
LOWbuild-package.sh465# Check if the package is in the compiling list
LOWscripts/run-docker.sh214# Set traps to ensure that the process started with docker exec and all its children are killed.
LOWscripts/utils/termux_reuse_pr_build_artifacts.sh70 # Print output only in the case of error
LOWscripts/utils/termux_reuse_pr_build_artifacts.sh85 # Check if we can perform CI fast path.
LOWscripts/utils/termux/package/termux_package.sh9# Check if package on device builds are supported by checking
LOWscripts/utils/termux/package/termux_package.sh34# Check if a specific version of a package has been built by checking
LOWscripts/utils/termux/package/termux_package.sh59# Check if the package name has a prefix called `glibc` or `glibc32`.
LOWscripts/updates/internal/termux_github_graphql.sh108 | "GIT|\($pkgName)|\($tag)" # Print results
LOWscripts/updates/utils/termux_pkg_upgrade_version.sh30 # Check if it isn't the full version and add ':'.
LOWpackages/libheif/build.sh33 # Check if SONAME is properly set:
LOWpackages/liblzma/build.sh29 # Check if SONAME is properly set:
LOWpackages/libxml2/build.sh62 # Check if SONAME is properly set:
LOWpackages/libjpeg-turbo/build.sh21 # Check if SONAME is properly set:
LOWpackages/libexpat/build.sh36 # Check if SONAME is properly set:
LOWpackages/zstd/build.sh46 # Check if SONAME is properly set:
Hyper-Verbose Identifiers18 hits · 19 pts
SeverityFileLineSnippet
LOWscripts/buildorder.py40def parse_build_file_dependencies_with_vars(path, vars):
LOWscripts/buildorder.py64def parse_build_file_dependencies(path):
LOWscripts/buildorder.py68def parse_build_file_antidependencies(path):
LOWscripts/buildorder.py72def parse_build_file_excluded_arches(path):
LOWscripts/buildorder.py85def parse_build_file_variable(path, var):
LOWscripts/buildorder.py96def parse_build_file_variable_bool(path, var):
LOWscripts/buildorder.py99def add_prefix_glibc_to_pkgname(name):
LOWscripts/buildorder.py223def read_packages_from_directories(directories, fast_build_mode, full_buildmode):
LOWscripts/buildorder.py344def generate_target_buildorder(target_path, pkgs_map, fast_build_mode):
LOW…ckages/chromium-host-tools/scripts/rewrite_gn_jumbo.py75def find_leading_assignment_end(lines: list[str]) -> int:
LOW…ckages/chromium-host-tools/scripts/rewrite_gn_jumbo.py104def has_blacklisted_top_level_assignment(lines: list[str]) -> bool:
LOW…ckages/chromium-host-tools/scripts/rewrite_gn_jumbo.py116def starts_with_leading_assignment(lines: list[str]) -> bool:
LOW…ckages/chromium-host-tools/scripts/rewrite_gn_jumbo.py133def first_top_level_target_index(lines: list[str]) -> int | None:
LOW…ckages/chromium-host-tools/scripts/rewrite_gn_jumbo.py173def first_scope_target_index_with_scopes(
LOW…ckages/chromium-host-tools/scripts/rewrite_gn_jumbo.py186def find_scope_jumbo_import_index_with_scopes(
LOW…ckages/chromium-host-tools/scripts/rewrite_gn_jumbo.py211def scope_import_indent_with_scopes(
LOW…ckages/chromium-host-tools/scripts/rewrite_gn_jumbo.py223def find_scope_jumbo_import_index(lines: list[str], scope_depth: int) -> int | None:
LOW…ckages/chromium-host-tools/scripts/rewrite_gn_jumbo.py351def module_path_from_build_file(path: Path, root: Path) -> str:
Self-Referential Comments6 hits · 18 pts
SeverityFileLineSnippet
MEDIUMbuild-package.sh413# Create the build deb file. Not to be overridden by package scripts.
MEDIUMbuild-package.sh417# Create the build .pkg.tar.xz file. Not to be overridden by package scripts.
MEDIUMdisabled-packages/unnethack/build.sh22 # Create a host build for the makedefs binary
MEDIUMscripts/setup-cgct.sh28# Creating a directory for CGCT in tmp
MEDIUMpackages/aapt/build.sh233 # Create an android.jar with AndroidManifest.xml and resources.arsc:
MEDIUMpackages/zsh/build.sh107 # Create a symlink for zsh-$version instead of the hardlink:
Slop Phrases4 hits · 12 pts
SeverityFileLineSnippet
MEDIUMpackages/timidity++/timidity.cfg46# alternatively, you can use the fluid-soundfont:
MEDIUM.github/workflows/codeql.yml47 # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
MEDIUMx11-packages/openbox/configs/rc.xml706 # used by a shell. you can use * to match any characters and ? to match
MEDIUMx11-packages/openbox/configs/rc.xml746 # you can use fractions such as 1/2 or percentages such as 75% in which
Deep Nesting6 hits · 6 pts
SeverityFileLineSnippet
LOWscripts/buildorder.py40
LOWscripts/buildorder.py72
LOWscripts/buildorder.py223
LOWscripts/get_hash_from_file.py5
LOWx11-packages/movit/make_bundled_shaders.py16
LOW…ckages/chromium-host-tools/scripts/rewrite_gn_jumbo.py155
AI Slop Vocabulary2 hits · 4 pts
SeverityFileLineSnippet
MEDIUMpackages/delve/build.sh1TERMUX_PKG_HOMEPAGE=https://github.com/go-delve/delve
MEDIUMpackages/delve/build.sh7TERMUX_PKG_SRCURL=https://github.com/go-delve/delve/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
Example Usage Blocks2 hits · 3 pts
SeverityFileLineSnippet
LOWdisabled-packages/qt5-qmake/termux-build-qmake.sh6## Usage:
LOWscripts/generate-apt-packages-list.sh10# Usage:
Unused Imports1 hit · 1 pts
SeverityFileLineSnippet
LOW…ckages/chromium-host-tools/scripts/rewrite_gn_jumbo.py15