Currently there is a problem building packages that use *-config
scripts (for example gnupg), we are creating a
/bin/sh->/data/data/com.termux/files/usr/bin/sh symlink so that the
shebang for the scripts can be interpreted, but after
ecd214881a ("build-package: add new arg -c for "continue build"") the
symlink was deleted in termux_step_get_dependencies.
This has already been done in termux_step_setup_build_folders. Doing
it here causes problems, after
ecd214881a
as BUILDDIR now might be SRCDIR, which should
not be created as it breaks zip extraction.
Do not fail immediately if signature is bad. This often happens when metadata
has been downloaded during repository update. Usually signature becomes fixed
in a few seconds, so we can rather wait than abort build immediately.
Release or Release.gpg files may be absent if a new .deb file was uploaded
to apt repository recently. We may need to do a multiple attempts in a loop
to retry downloading of these files.
Needed after 99e9ab67b634a89d0be9eca12c4f1cdc091ee6e8, where I have disabled
looping in termux_download but curl doesn't do retries on 404 error. We
want immediate failure only for 404's on source and build tool URLs.
As termux_download.sh retries only on transient errors now, we need a
loop when downloading Release{,.gpg} as they may be temporarily unavailable
when metadata is being rebuilt in repository.
Variables
TERMUX_PKG_PLATFORM_INDEPENDENT
TERMUX_DEBUG
TERMUX_PKG_HAS_DEBUG
TERMUX_PKG_ESSENTIAL
TERMUX_SUBPKG_ESSENTIAL
TERMUX_PKG_NO_STATICSPLIT
TERMUX_PKG_BUILD_IN_SRC
TERMUX_PKG_FORCE_CMAKE
TERMUX_PKG_HOSTBUILD
should not accept arbitrary values for marking them "enabled". Instead
they should accept boolean values which makes them easier to handle and
also makes their meaning clear.
build-package.sh should make decision based on variable's value but not on
whether it is set or empty.
%ci:no-build
Partial compatibility for on-device builds.
There is no guarantee that it will be possible to build all available
packages and built packages will have same reliability that cross-compiled
but should solve "self-hosting" problems as much as possible.
* Do not re=download release files.
* Efficiently handle dependencies: do not try to download \*.deb files when they already downloaded, do not try to extract them more than one time.
Addition for cada4be0d87bc4bf8559f08304d6051624d43737.
Release file may not exist too when metadata generation is in progress,
so we may need to do several tries to download file.
If previous build create metadata generation job, the repository will be left in
unsigned state for up to 5-20 seconds. We cannot do anything with this as how
Bintray works. When this case happens, signature checks will fail causing build
failure.
See https://gitlab.com/termux-mirror/termux-packages/-/jobs/175356747.
For now, gpg checks are permanently disabled. When a better solution will be
found, feel free to revert this commit.