From fce4362e4b760afd4ff9126bce0cc157fd93fda8 Mon Sep 17 00:00:00 2001 From: yaturner Date: Tue, 13 Oct 2026 13:45:02 -0700 Subject: [PATCH 1/7] ADFA-6386: Build packages for org.appdevforall.codeonthego Code On The Go is moving its application id from com.itsaky.androidide to org.appdevforall.codeonthego (CodeOnTheGo ADR 0017, ADFA-174). The package name is baked into every package's prefix (/data/data//files/usr), so packages built for one id do not run under the other - this must ship together with the app's id flip. COTG_PACKAGE_NAME is the single source: build.sh rewrites com.termux to it across termux-packages and generates the termux-tools patch from it. New paths are within termux-packages' length limits (data dir 39/69, rootfs 45/86, prefix 49/90), which the build validates. Co-Authored-By: Claude Opus 5.5 --- common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.sh b/common.sh index b670572..41296b7 100644 --- a/common.sh +++ b/common.sh @@ -20,7 +20,7 @@ TERMUX_PACKAGE_NAME="com.termux" export TERMUX_PACKAGE_NAME # The package name of the intended application -COTG_PACKAGE_NAME="com.itsaky.androidide" +COTG_PACKAGE_NAME="org.appdevforall.codeonthego" export COTG_PACKAGE_NAME # Path to the public key From 35e30fba46b4e392709bd2ebc9d051988884341a Mon Sep 17 00:00:00 2001 From: yaturner Date: Wed, 14 Oct 2026 10:51:24 -0700 Subject: [PATCH 2/7] ADFA-6386: Update foot source checksum regenerated by Codeberg ncurses pulls foot's terminfo from the foot 1.25.0 source archive. Codeberg regenerated that archive, so its SHA-256 no longer matches the one pinned in termux-packages and every build fails at ncurses. Verified the new archive's extracted tree is identical to the foot 1.25.0 git tag (b44a62724cd5); only the archive packaging changed. Co-Authored-By: Claude Opus 5.5 --- build.sh | 5 +++++ patches/foot-update-source-checksum.patch | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 patches/foot-update-source-checksum.patch diff --git a/build.sh b/build.sh index 32917c4..293342d 100755 --- a/build.sh +++ b/build.sh @@ -100,6 +100,11 @@ declare -a PATCHES=( # these keyring files are used when we build packages with the -I flag # since we use a different signing key, we need to update the reference here "use-our-keys-to-install-deps.patch" + + # Codeberg regenerated foot's 1.25.0 source archive, changing its SHA-256 + # (ncurses pulls foot's terminfo from it). Contents are identical to the + # 1.25.0 git tag; only the archive packaging differs. + "foot-update-source-checksum.patch" ) # Script configuration diff --git a/patches/foot-update-source-checksum.patch b/patches/foot-update-source-checksum.patch new file mode 100644 index 0000000..c692d8c --- /dev/null +++ b/patches/foot-update-source-checksum.patch @@ -0,0 +1,13 @@ +diff --git a/x11-packages/foot/build.sh b/x11-packages/foot/build.sh +index 77969a23..d361311e 100644 +--- a/x11-packages/foot/build.sh ++++ b/x11-packages/foot/build.sh +@@ -4,7 +4,7 @@ TERMUX_PKG_LICENSE="MIT" + TERMUX_PKG_MAINTAINER="@termux" + TERMUX_PKG_VERSION="1.25.0" + TERMUX_PKG_SRCURL=https://codeberg.org/dnkl/foot/archive/${TERMUX_PKG_VERSION}.tar.gz +-TERMUX_PKG_SHA256=442a42d576ec72dd50f2d3faea8a664230a47bac79dc1eb6e7c9125ee76c130f ++TERMUX_PKG_SHA256=ee9d0e51295945157ecb33119cb2c79b276093d0fd342d959d78d772d505571c + TERMUX_PKG_AUTO_UPDATE=true + TERMUX_PKG_DEPENDS="libandroid-support, fontconfig, freetype, libfcft, libpixman, libwayland, libxkbcommon, utf8proc" + TERMUX_PKG_BUILD_DEPENDS="libtllist, libwayland-protocols, libwayland-cross-scanner, scdoc, xdg-utils" From 5aff85764699d91951f9028e3b6dca57518b081c Mon Sep 17 00:00:00 2001 From: yaturner Date: Wed, 14 Oct 2026 11:47:31 -0700 Subject: [PATCH 3/7] ADFA-6386: Fetch dos2unix from SourceForge dos2unix's upstream URL (waterlan.home.xs4all.nl) is dead: the XS4ALL homepage service shut down and returns an HTML not-found page, so every build fails the checksum at dos2unix. SourceForge hosts the same 7.5.2 release tarball; it matches the pinned SHA-256, so the checksum is unchanged. Co-Authored-By: Claude Opus 5.5 --- build.sh | 5 +++++ patches/dos2unix-use-sourceforge-mirror.patch | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 patches/dos2unix-use-sourceforge-mirror.patch diff --git a/build.sh b/build.sh index 293342d..b5d7dd2 100755 --- a/build.sh +++ b/build.sh @@ -105,6 +105,11 @@ declare -a PATCHES=( # (ncurses pulls foot's terminfo from it). Contents are identical to the # 1.25.0 git tag; only the archive packaging differs. "foot-update-source-checksum.patch" + + # dos2unix's upstream host (XS4ALL homepages) is gone and serves an HTML + # "not found" page. Fetch the identical release tarball from SourceForge; + # the pinned SHA-256 is unchanged. + "dos2unix-use-sourceforge-mirror.patch" ) # Script configuration diff --git a/patches/dos2unix-use-sourceforge-mirror.patch b/patches/dos2unix-use-sourceforge-mirror.patch new file mode 100644 index 0000000..d2d285b --- /dev/null +++ b/patches/dos2unix-use-sourceforge-mirror.patch @@ -0,0 +1,13 @@ +diff --git a/packages/dos2unix/build.sh b/packages/dos2unix/build.sh +index b4d2fa40..d30052a0 100644 +--- a/packages/dos2unix/build.sh ++++ b/packages/dos2unix/build.sh +@@ -5,7 +5,7 @@ TERMUX_PKG_LICENSE_FILE="COPYING.txt" + TERMUX_PKG_MAINTAINER="@termux" + TERMUX_PKG_VERSION=7.5.2 + TERMUX_PKG_REVISION=1 +-TERMUX_PKG_SRCURL=https://waterlan.home.xs4all.nl/dos2unix/dos2unix-${TERMUX_PKG_VERSION}.tar.gz ++TERMUX_PKG_SRCURL=https://downloads.sourceforge.net/project/dos2unix/dos2unix/${TERMUX_PKG_VERSION}/dos2unix-${TERMUX_PKG_VERSION}.tar.gz + TERMUX_PKG_SHA256=264742446608442eb48f96c20af6da303cb3a92b364e72cb7e24f88239c4bf3a + TERMUX_PKG_BUILD_IN_SRC=true + TERMUX_PKG_DEPENDS="libandroid-support" From b899e1d20031c6e813e836ca43c3bb8d95b3034d Mon Sep 17 00:00:00 2001 From: yaturner Date: Wed, 14 Oct 2026 11:54:43 -0700 Subject: [PATCH 4/7] ADFA-6386: Build the CI builder image from the pinned submodule ghcr.io/termux/package-builder only publishes :latest, which follows upstream termux-packages and drifts from our pinned submodule. Against the current image every build fails: NDK r29 is missing (image has r30) and recipes such as xcb-proto and vim call python3.12 (image has 3.14). Add an image stage that builds the builder from the submodule's own scripts/Dockerfile via docker-in-docker, cached in the project registry per submodule commit, and run build-packages in it. Co-Authored-By: Claude Opus 5.5 --- .gitlab-ci.yml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d9433f2..434e7fe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,10 +1,37 @@ stages: + - image - build - publish +# ghcr.io/termux/package-builder only publishes :latest, which tracks the newest +# termux-packages and drifts from our pinned submodule (e.g. NDK r30 vs r29, +# python3.14 vs python3.12). Build the builder image from the pinned +# submodule's own Dockerfile instead, cached per submodule commit. +builder-image: + image: docker:27 + stage: image + services: + - docker:27-dind + variables: + GIT_SUBMODULE_STRATEGY: recursive + GIT_SUBMODULE_DEPTH: 1 + script: + - SUBMODULE_TAG="$(git -C termux-packages rev-parse --short=12 HEAD)" + - echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin "$CI_REGISTRY" + - | + if ! docker pull "$CI_REGISTRY_IMAGE/package-builder:$SUBMODULE_TAG"; then + docker build -t "$CI_REGISTRY_IMAGE/package-builder:$SUBMODULE_TAG" termux-packages/scripts + docker push "$CI_REGISTRY_IMAGE/package-builder:$SUBMODULE_TAG" + fi + # job images can't use runtime variables, so also tag with the pipeline's commit + - docker tag "$CI_REGISTRY_IMAGE/package-builder:$SUBMODULE_TAG" "$CI_REGISTRY_IMAGE/package-builder:$CI_COMMIT_SHA" + - docker push "$CI_REGISTRY_IMAGE/package-builder:$CI_COMMIT_SHA" + build-packages: - image: ghcr.io/termux/package-builder:latest + image: $CI_REGISTRY_IMAGE/package-builder:$CI_COMMIT_SHA stage: build + needs: + - job: builder-image timeout: 6h tags: - saas-linux-xlarge-amd64 From 4932d9c7999dc657f3015f09535ec6eea09fcaaf Mon Sep 17 00:00:00 2001 From: yaturner Date: Thu, 22 Oct 2026 08:05:59 -0700 Subject: [PATCH 5/7] ADFA-6386: Point apr-util, nano and giflib at their moved sources Each pinned source URL now 404s: apr-util 1.6.3 left downloads.apache.org for archive.apache.org, nano 8.7 is no longer dist/latest, and giflib moved into a giflib-5.x folder on SourceForge. The files at the new URLs match the pinned SHA-256s, so checksums are unchanged. Checked every remaining source in the bootstrap build order the same way; these were the only dead URLs. Co-Authored-By: Claude Opus 5.5 --- build.sh | 5 +++++ patches/moved-source-urls.patch | 39 +++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 patches/moved-source-urls.patch diff --git a/build.sh b/build.sh index b5d7dd2..df9215b 100755 --- a/build.sh +++ b/build.sh @@ -110,6 +110,11 @@ declare -a PATCHES=( # "not found" page. Fetch the identical release tarball from SourceForge; # the pinned SHA-256 is unchanged. "dos2unix-use-sourceforge-mirror.patch" + + # Upstream moved these releases after termux-packages pinned them (old Apache + # releases go to archive.apache.org; nano's dist/latest and giflib's SF folder + # moved on). Same files - pinned SHA-256s unchanged. + "moved-source-urls.patch" ) # Script configuration diff --git a/patches/moved-source-urls.patch b/patches/moved-source-urls.patch new file mode 100644 index 0000000..bf02e39 --- /dev/null +++ b/patches/moved-source-urls.patch @@ -0,0 +1,39 @@ +diff --git a/packages/apr-util/build.sh b/packages/apr-util/build.sh +index d6fa52a5..0f3e8071 100644 +--- a/packages/apr-util/build.sh ++++ b/packages/apr-util/build.sh +@@ -4,7 +4,7 @@ TERMUX_PKG_LICENSE="Apache-2.0" + TERMUX_PKG_MAINTAINER="@termux" + TERMUX_PKG_VERSION=1.6.3 + TERMUX_PKG_REVISION=3 +-TERMUX_PKG_SRCURL=https://downloads.apache.org/apr/apr-util-${TERMUX_PKG_VERSION}.tar.gz ++TERMUX_PKG_SRCURL=https://archive.apache.org/dist/apr/apr-util-${TERMUX_PKG_VERSION}.tar.gz + TERMUX_PKG_SHA256=2b74d8932703826862ca305b094eef2983c27b39d5c9414442e9976a9acf1983 + TERMUX_PKG_DEPENDS="apr, libcrypt, libexpat, libiconv, libuuid" + TERMUX_PKG_BREAKS="apr-util-dev" +diff --git a/packages/giflib/build.sh b/packages/giflib/build.sh +index 99328807..e32835b5 100644 +--- a/packages/giflib/build.sh ++++ b/packages/giflib/build.sh +@@ -4,7 +4,7 @@ TERMUX_PKG_LICENSE="MIT" + TERMUX_PKG_MAINTAINER="@termux" + TERMUX_PKG_VERSION="5.2.2" + TERMUX_PKG_REVISION=1 +-TERMUX_PKG_SRCURL=https://downloads.sourceforge.net/project/giflib/giflib-${TERMUX_PKG_VERSION}.tar.gz ++TERMUX_PKG_SRCURL=https://downloads.sourceforge.net/project/giflib/giflib-${TERMUX_PKG_VERSION%%.*}.x/giflib-${TERMUX_PKG_VERSION}.tar.gz + TERMUX_PKG_SHA256=be7ffbd057cadebe2aa144542fd90c6838c6a083b5e8a9048b8ee3b66b29d5fb + TERMUX_PKG_BREAKS="giflib-dev" + TERMUX_PKG_REPLACES="giflib-dev" +diff --git a/packages/nano/build.sh b/packages/nano/build.sh +index 646e14b8..b1d3c13a 100644 +--- a/packages/nano/build.sh ++++ b/packages/nano/build.sh +@@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Small, free and friendly text editor" + TERMUX_PKG_LICENSE="GPL-3.0" + TERMUX_PKG_MAINTAINER="@termux" + TERMUX_PKG_VERSION="8.7" +-TERMUX_PKG_SRCURL=https://nano-editor.org/dist/latest/nano-$TERMUX_PKG_VERSION.tar.xz ++TERMUX_PKG_SRCURL=https://nano-editor.org/dist/v${TERMUX_PKG_VERSION%%.*}/nano-$TERMUX_PKG_VERSION.tar.xz + TERMUX_PKG_SHA256=afd287aa672c48b8e1a93fdb6c6588453d527510d966822b687f2835f0d986e9 + TERMUX_PKG_AUTO_UPDATE=true + TERMUX_PKG_DEPENDS="libandroid-support, ncurses" From 4ad2773c02cf595e4748e8514fabbc12599f00b6 Mon Sep 17 00:00:00 2001 From: yaturner Date: Thu, 22 Oct 2026 09:22:07 -0700 Subject: [PATCH 6/7] ADFA-6386: Require brotli before generating bootstraps generate-bootstraps.sh repacks the JDK's ct.sym with brotli without checking the result. With no brotli on the host it deletes ct.sym, prints "ct.sym repacked" and produces a bootstrap whose javac cannot use --release. brotli is not in the termux builder image. Check for it up front, and fix scribe_check_command, which called an undefined 'err' function and so reported "err: command not found" instead of naming the missing tool. Co-Authored-By: Claude Opus 5.5 --- generate-bootstrap-archive.sh | 4 ++++ utils.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/generate-bootstrap-archive.sh b/generate-bootstrap-archive.sh index f23d02b..3955d08 100755 --- a/generate-bootstrap-archive.sh +++ b/generate-bootstrap-archive.sh @@ -109,6 +109,10 @@ if [[ -z "${COTG_REPO}" ]]; then scribe_error_exit "A package repository URL must be specified." fi +# generate-bootstraps.sh repacks the JDK's ct.sym with brotli and does not +# check the result: without brotli it deletes ct.sym and still reports success. +scribe_check_command "brotli" + COTG_VARIANT="debug" declare -a COTG_EXTRA_PACKAGES diff --git a/utils.sh b/utils.sh index a273fbd..768bd83 100644 --- a/utils.sh +++ b/utils.sh @@ -48,7 +48,7 @@ scribe_check_command() { fi if ! [[ "$(command -v "$1")" ]]; then - err "'$1' command is not available in PATH. Please install $1." + scribe_error "'$1' command is not available in PATH. Please install $1." exit 1 fi } From 40b0ac6498cc846ff4c7558453c86d54e4f8e809 Mon Sep 17 00:00:00 2001 From: yaturner Date: Thu, 22 Oct 2026 12:16:26 -0700 Subject: [PATCH 7/7] ADFA-6386: Publish to a separate apt repo for the new application id Packages built for org.appdevforall.codeonthego do not run under the old com.itsaky.androidide install, so they must not land in termux-main, which existing installs keep using. Default COTG_REPO to apt/codeonthego-main. The URL is baked into termux-tools' sources.list at setup time: re-patch termux-packages and rebuild termux-tools before publishing. Co-Authored-By: Claude Opus 5.5 --- README.md | 2 +- common.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2539fda..53080c7 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ Where `` is the ID of the GPG secret key to be used for signing. After signing, the contents of the `output/repo` directory can be published to a web hosting service or a S3-compatible storage server. Ensure that the directory structure is same as the repository URL. -For example, if the repository URL is `https://packages.appdevforall.org/apt/termux-main`, then the contents of the `output/repo` directory must be stored in the `apt/termux-main` directory of `packages.appdevforall.org`'s content root (usually, it's something like `/www/public/html/packages.appdevforall.org` in web hosting environments). +For example, if the repository URL is `https://packages.appdevforall.org/apt/codeonthego-main`, then the contents of the `output/repo` directory must be stored in the `apt/codeonthego-main` directory of `packages.appdevforall.org`'s content root (usually, it's something like `/www/public/html/packages.appdevforall.org` in web hosting environments). If you have SSH access to the web hosting service, then you can use `rsync` for incremental updates : diff --git a/common.sh b/common.sh index 41296b7..66eac40 100644 --- a/common.sh +++ b/common.sh @@ -38,7 +38,7 @@ TERMUX_PKG_API_LEVEL=28 export TERMUX_PKG_API_LEVEL # The URL of the repository where the packages will be published -COTG_REPO="https://packages.appdevforall.org/apt/termux-main" +COTG_REPO="https://packages.appdevforall.org/apt/codeonthego-main" export COTG_REPO # All supported CPU ABIs