All, or at least most, of our debs contain "./" as a folder. This
causes problems when extracting on some systems, as ./ then is the
system root directory /, and tar cannot change the permissions of this
folder. Trying to build on arch for example gives:
tar: .: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: Exiting with failure status due to previous errors
The issue appeared on arch somewhat recently, maybe with tar 1.33. To
avoid having to rebuild all packages we now handle both data.tar.xz
types, with prefixed ./, and without.
Also remove some indentation levels while we are at it.
This avoids "./" being part of the tar. "./" translates to the
systemroot / when we extract, and this is problematic since tar cannot
change permissions and ownerships of this folder. tar 1.34 gives an
error:
tar: .: Cannot change mode to rwxr-xr-x: Operation not permitted
tar: Exiting with failure status due to previous errors
when we try to extract the data.tar.xz.
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.
Cirrus CI has huge startup delays when using high CPU configuration, which
happen due to limited availability of the community cluster resources.
Unfortunately we can't use lower CPU configuration for termux-packages
because llvm/rust/swift may hit timeout.
Probably we will have more benefits with using Github Actions even without
-I option supplied to build-package.sh
By moving the checks we can make the function more general, and
thereby re-use it for creating subpackages and potentially hostbuild
tools packages.
tests: building libandroid-support and build-essential.
Aptly mixes the all debs into the folders for the other arches, unless
the all arch is explicitly added. This workaround tries to find the
package in the aarch64 Packages file if the all Packages file is not
found.
Most packages have subpackages that are the same arch or
arch-independent compared to the parent package. Emscripten and its
subpackages emscripten-{binaryen,llvm} are an exception, the main
package are arch independent while the subpackages are not. To handle
this correctly we need to modify termux_extract_dep_info as done here.
Use non-IPFS repositories for fetching dependencies when building packages.
This is required at least for CI as gateways seem to block requests due to
either rate limit or restriction for usage by cloud platforms.
Some packages installs binaries to sbin folder. Since termux doesn't use sbin, just map it to bin folder. This eliminates the need of using this flag with TERMUX_PKG_EXTRA_CONFIGURE_ARGS in the build.sh script.