From f558aafc781927f2656c1f8b1ba25053acf341df Mon Sep 17 00:00:00 2001 From: Leonid Plyushch Date: Sat, 10 Aug 2019 20:22:30 +0300 Subject: [PATCH] coreutils: disallow on-device build It can delete utility 'ln' in the process of installation: make install-exec-hook make[4]: Entering directory '/data/data/com.termux/files/home/.termux-build/coreutils/build' /bin/sh: 12: ln: not found --- packages/coreutils/build.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/coreutils/build.sh b/packages/coreutils/build.sh index 90ea0dcbe..04c54c293 100644 --- a/packages/coreutils/build.sh +++ b/packages/coreutils/build.sh @@ -27,4 +27,10 @@ ac_cv_func_getpass=yes termux_step_pre_configure() { CPPFLAGS+=" -DDEFAULT_TMPDIR=\\\"$TERMUX_PREFIX/tmp\\\"" CPPFLAGS+=" -D__USE_FORTIFY_LEVEL=0" + + # On device build is unsupported as it removes utility 'ln' (and maybe + # something else) in the installation process. + if [ -n "$TERMUX_ON_DEVICE_BUILD" ]; then + termux_error_exit "Package '$TERMUX_PKG_NAME' is not safe for on-device builds." + fi }