Building metapackages doesn't involve setup of compiler toolchain,
so certain variables are not set. In general, it was not expected
that package archive generation will use utilities that come with
cross-compiler as this functionality should rely on utilities
installed by host package manager.
/home/builder/termux-packages/scripts/build/termux_step_create_debian_package.sh: line 49: AR: unbound variable
This variable will disable shebang fixing during massage step. Normally
such fix shouldn't be disabled, but there are packages where it causes
a huge overhead and is not needed anyway.
Packages that are known to be affected by overhead and take long time
for building:
* papirus-icon-theme from x11-packages
Otherwise we run into problems when building arch-independent packages
that depend on arch-dependent packages, for example perl packages like
parallel. Before, when downloading the perl dependency it then
believed perl to be arch-independent.
r23b was suppose to fix so that -fno-integrated-as worked again (which
libx265 needs for example), but the symlinks added point towards an
absolute path in /buildbot/src/android/ndk-release-r23 instead of to
../../bin/. Re-create symlinks with correct destination.
From now, all configuration related to automatic updates should be done
in build.sh scripts.
It requires specifying at least
TERMUX_PKG_AUTO_UPDATE=true
which indicates that package is eligible for automatic updates, and
optionally
TERMUX_PKG_AUTO_UPDATE_TAG_REGEXP="$version_regexp"
which specifies a regular expression used to extract the version part
from Git tag.
After https://github.com/termux/termux-packages/commit/e34ae5da030d,
llvm-config was created before termux_step_get_dependencies, meaning
that it gets overwritten if libllvm is installed.
Fix this by creating llvm-config in a new function
termux_step_override_config_scripts, that is run right after
termux_step_get_dependencies.
All packages that have conffiles, and a gz compressed control.tar.gz,
currently fails to install on arm if the deb is built locally or
downloaded and then installed with `apt install
./foo_1.0_arm.deb`. The error looks like:
$ apt install ./tmp/foo.deb
Reading package lists... Error!
E: Tar checksum failed, archive corrupted
E: Could not read meta data from
/data/data/com.termux/files/home/tmp/foo.deb
E: The package lists or status file could not be parsed or opened.
If the package does not have conffiles, or if xz compression is used,
everything works. Let's change back to xz compression for all new and
updated packages for now to workaround this issue.
Even if `apt install ./foo.deb` fails the deb can still be installed
with `dpkg -i ./foo.deb` (seems dpkg does not do the same checksum
check?).
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.
Name a patch *.patch.ondevice for it to only be applied when building
on device.
This can be useful if for example a tool for building documentation is
missing on device, or if a tool needed during build (but not runtime)
uses something that triggers selinux, fdsan or some other android
security thing.
When adding this, we go from compiling with
/home/builder/.termux-build/_cache/android-r21d-api-24-v4/bin/clang++ [...] -mrelocation-model pic -pic-level 2 -pic-is-pie [...]
to
/home/builder/.termux-build/_cache/android-r21d-api-24-v5/bin/clang++ [...] -mrelocation-model pic -pic-level 2 [...]
Before, we got a warning when compiling libandroid-spawn:
/home/builder/.termux-build/_cache/android-r21d-api-24-v4/bin/../lib/gcc/i686-linux-android/4.9.x/../../../../i686-linux-android/bin/ld: warning: shared library text segment is not shareable
and trying to use a program linked against libandroid-spawn gave an
error, see
https://github.com/termux/termux-packages/issues/7215#issuecomment-906154438
the Without this, libraries might end up with text relocations. For
some reason it does not seem to be an issue on the other arches.
%ci:no-build
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.
As replacement for TERMUX_PKG_QUICK_REBUILD. Running
./build-package.sh -c <package> starts a build for <package>, but does
not extract and patch the source from scratch. Instead it sets up the
build variables and starts from termux_step_make.
When working on a big package that can take hours to build it is
convenient to be able to build until there is an error, then apply
some new patch (manually) to the source, and then continue from where
the build failed.