Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to ndk-r23 #7339

Merged
merged 29 commits into from
Oct 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b582444
Update to use android-ndk r23
Grimler91 Sep 16, 2021
cae6eaf
ndk-patches: remove TCAFLUSH case from bits/termios_inlines.h
Grimler91 Aug 16, 2021
9e1e7d9
termux_step_setup_toolchain: print info about applied ndk-patch
Grimler91 Aug 16, 2021
d9fe2c0
ndk-{multilib,sysroot}: update for ndk r23
Grimler91 Aug 16, 2021
c2a309e
rust: update from 1.53.0 to 1.54.0
finagolfin Aug 5, 2021
38eebcb
busybox: regenerate config
Grimler91 Aug 19, 2021
340bc1d
busybox: fix build with ndk r23
Grimler91 Aug 19, 2021
e811e1d
dns2tcp: fix duplicate symbol debug
Grimler91 Aug 19, 2021
0466545
rust: update to 1.55.0
Grimler91 Sep 16, 2021
0671628
freeimage: remove swab patch
Grimler91 Sep 17, 2021
dba55c6
termux_setup_standalone_toolchain: remove one indentation level
Grimler91 Sep 22, 2021
f11a4ef
termux_step_setup_toolchain: do not add prefix to pkg-config
Grimler91 Sep 17, 2021
f8a22b9
libcap-ng: disable python2 as well
Grimler91 Sep 22, 2021
a54238e
libowfat: fix build with ndk-r23
Grimler91 Sep 22, 2021
d6dd9c6
heyu: fix errors about duplicate symbols with ndk >=r22
Grimler91 Sep 22, 2021
af09dec
libtirpc: fix build with ndk-r23
Grimler91 Sep 22, 2021
e740107
libwren: fix build with ndk-r23
Grimler91 Sep 22, 2021
fb198e0
openal-soft: fix build error when qt5 is found on host
Grimler91 Sep 22, 2021
203f95e
Fix lubicu package
thunder-coding Oct 2, 2021
d3f5e3c
libnl: fix build with ndk-r23
Grimler91 Oct 5, 2021
226a219
perl: specify AR to fix build with ndk-r23
Grimler91 Oct 10, 2021
af894cf
quickjs: fix build with ndk-r23
Grimler91 Oct 10, 2021
058c3b4
lua-language-server: fix hostbuild step
Grimler91 Oct 10, 2021
40af3c4
libandroid-spawn: NDK 23 actually checks the INTRODUCED_IN() macros, …
finagolfin Oct 22, 2021
279897e
aapt: fix build with ndk-r23
Grimler91 Oct 22, 2021
525161c
binutils: fix build with ndk-r23
Grimler91 Dec 25, 2020
f16993e
Bump all packages depending on libc++
Grimler91 Oct 22, 2021
ad86a34
libvpx: fix build with ndk-r23
Grimler91 Oct 22, 2021
20d8e40
ndk: update to r23b
Grimler91 Oct 22, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions ndk-patches/linux-fcntl.h.patch

This file was deleted.

6 changes: 3 additions & 3 deletions ndk-patches/paths.h.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- ./usr/include/paths.h.orig 2020-07-10 21:50:03.778299300 +0000
+++ ./usr/include/paths.h 2020-07-10 21:51:03.127602196 +0000
--- ./usr/include/paths.h.orig 2021-08-16 11:55:04.492150066 +0200
+++ ./usr/include/paths.h 2021-08-16 11:55:42.498804733 +0200
@@ -40,14 +40,14 @@

#ifndef _PATH_BSHELL
Expand All @@ -12,7 +12,7 @@
#define _PATH_CONSOLE "/dev/console"

/** Default shell search path. */
-#define _PATH_DEFPATH "/product/bin:/apex/com.android.runtime/bin:/apex/com.android.art/bin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin"
-#define _PATH_DEFPATH "/product/bin:/apex/com.android.runtime/bin:/apex/com.android.art/bin:/system_ext/bin:/system/bin:/system/xbin:/odm/bin:/vendor/bin:/vendor/xbin"
+#define _PATH_DEFPATH "@TERMUX_PREFIX@/bin"

/** Path to the directory containing device files. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,13 @@ diff -u -r /home/builder/lib/android-ndk/sysroot/usr/include/asm-generic/termbit
+/* TCSAFLUSH is patched to be TCSANOW in Termux to work around Android SELinux rule */
+#define TCSAFLUSH 0
#endif
--- ./usr/include/bits/termios_inlines.h.orig 2021-08-16 17:05:16.001067630 +0200
+++ ./usr/include/bits/termios_inlines.h 2021-08-16 17:05:05.851074187 +0200
@@ -117,7 +117,6 @@
switch (optional_actions) {
case TCSANOW: cmd = TCSETS; break;
case TCSADRAIN: cmd = TCSETSW; break;
- case TCSAFLUSH: cmd = TCSETSF; break;
default: errno = EINVAL; return -1;
}
return ioctl(fd, cmd, s);
16 changes: 5 additions & 11 deletions ndk-patches/stdio.h.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
diff -uNr ./usr.old/include/stdio.h ./usr/include/stdio.h
--- ./usr.old/include/stdio.h 2019-05-22 12:49:28.000000000 +0300
+++ ./usr/include/stdio.h 2019-12-13 21:50:02.765565736 +0200
@@ -44,11 +44,12 @@
--- ./usr/include/stdio.h.orig 2021-08-16 11:48:44.308954400 +0200
+++ ./usr/include/stdio.h 2021-08-16 11:50:00.438924014 +0200
@@ -44,6 +44,9 @@
#include <stdarg.h>
#include <stddef.h>

Expand All @@ -10,16 +9,11 @@ diff -uNr ./usr.old/include/stdio.h ./usr/include/stdio.h
+
#include <bits/seek_constants.h>

-#if __ANDROID_API__ < __ANDROID_API_N__
#include <bits/struct_file.h>
-#endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This header defines FILE, rather than keeping it an opaque struct, but we're not including this header anymore, following the NDK. This causes problems if some package tries to take sizeof(FILE), as I ran into with lldb:

/home/builder/.termux-build/libllvm/src/lldb/include/lldb/Utility/ReproducerInstrumentation.h:645:58: error: invalid application of 'sizeof' to an incomplete type '__sFILE'
m_stream.write(reinterpret_cast<const char *>(&t), sizeof(T));
                                                   ^~~~~~~~~

You can work around it by including <bits/struct_file.h> in any files that need FILE to be defined.


__BEGIN_DECLS

#if __ANDROID_API__ < 24
@@ -165,7 +166,7 @@
__printflike(2, 0) __warnattr_strict("vsprintf is often misused; please use vsnprintf");
char* tmpnam(char* __s)
__warnattr("tempnam is unsafe, use mkstemp or tmpfile instead");
__warnattr("tmpnam is unsafe, use mkstemp or tmpfile instead");
-#define P_tmpdir "/tmp/" /* deprecated */
+#define P_tmpdir "@TERMUX_PREFIX@/tmp/" /* deprecated */
char* tempnam(const char* __dir, const char* __prefix)
Expand Down
7 changes: 3 additions & 4 deletions ndk-patches/stdlib.h.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
diff -uNr sysroot.orig/usr/include/stdlib.h sysroot/usr/include/stdlib.h
--- sysroot.orig/usr/include/stdlib.h 2019-02-12 16:12:24.000000000 +0000
+++ sysroot/usr/include/stdlib.h 2019-03-20 13:23:48.870108924 +0000
--- ./usr/include/stdlib.h.orig 2021-08-16 11:50:47.432239182 +0200
+++ ./usr/include/stdlib.h 2021-08-16 11:51:31.102222894 +0200
@@ -33,6 +33,7 @@
#include <bits/wait.h>
#include <malloc.h>
Expand All @@ -12,7 +11,7 @@ diff -uNr sysroot.orig/usr/include/stdlib.h sysroot/usr/include/stdlib.h
@@ -224,8 +225,7 @@
size_t wcstombs(char* __dst, const wchar_t* __src, size_t __n);

#if __ANDROID_API__ >= __ANDROID_API_L__
#if __ANDROID_API__ >= 21
-size_t __ctype_get_mb_cur_max(void) __INTRODUCED_IN(21);
-#define MB_CUR_MAX __ctype_get_mb_cur_max()
+#define MB_CUR_MAX 4
Expand Down
6 changes: 3 additions & 3 deletions ndk-patches/sys-cdefs.h.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- ./usr/include/sys/cdefs.h.orig 2020-01-18 00:06:05.760188085 +0000
+++ ./usr/include/sys/cdefs.h 2020-01-18 00:09:52.363968728 +0000
@@ -358,3 +358,6 @@
--- ./usr/include/sys/cdefs.h.orig 2021-08-16 11:52:08.128876161 +0200
+++ ./usr/include/sys/cdefs.h 2021-08-16 11:52:08.555542676 +0200
@@ -372,3 +372,6 @@
#if __has_include(<android/ndk-version.h>)
#include <android/ndk-version.h>
#endif
Expand Down
8 changes: 5 additions & 3 deletions ndk-patches/unistd.h.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- sysroot/usr/include/unistd.h 2018-04-30 19:24:22.000000000 +0000
+++ usr/include/unistd.h 2018-08-16 10:42:51.158596753 +0000
@@ -377,4 +377,72 @@
--- ./usr/include/unistd.h.orig 2021-08-16 11:52:08.095542840 +0200
+++ ./usr/include/unistd.h 2021-08-16 11:52:08.565542673 +0200
@@ -375,6 +375,74 @@
#undef _UNISTD_H_
#endif

Expand Down Expand Up @@ -73,3 +73,5 @@
+#endif
+
__END_DECLS

#include <android/legacy_unistd_inlines.h>
6 changes: 3 additions & 3 deletions ndk-patches/utmp.h.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- sysroot/usr/include/utmp.h 2021-05-07 05:45:33.518467959 +0000
+++ usr/include/utmp.h 2021-05-07 05:46:25.195022662 +0000
@@ -32,9 +32,9 @@
--- ./usr/include/utmp.h.orig 2021-08-16 11:52:08.095542840 +0200
+++ ./usr/include/utmp.h 2021-08-16 11:52:08.565542673 +0200
@@ -37,9 +37,9 @@
#include <sys/types.h>
#include <time.h>

Expand Down
6 changes: 2 additions & 4 deletions packages/aapt/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ TERMUX_PKG_MAINTAINER="@termux"
_TAG_VERSION=7.1.2
_TAG_REVISION=33
TERMUX_PKG_VERSION=${_TAG_VERSION}.${_TAG_REVISION}
TERMUX_PKG_REVISION=13
TERMUX_PKG_REVISION=14
TERMUX_PKG_SKIP_SRC_EXTRACT=true
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_DEPENDS="libc++, libexpat, libpng, libzopfli, zlib"
Expand Down Expand Up @@ -102,7 +102,7 @@ termux_step_make_install() {
socket_network_client_unix.c \
sockets_unix.o \
str_parms.c"
$CC $LDFLAGS \
$CC $CPPFLAGS $LDFLAGS \
-Dchar16_t=uint16_t \
-std=c11 \
-isystem $AOSP_INCLUDE_DIR \
Expand All @@ -114,8 +114,6 @@ termux_step_make_install() {
-shared \
-o $TERMUX_PREFIX/lib/libandroid-cutils.so



# Build libutil:
local LIBUTILS_TARFILE=$TERMUX_PKG_CACHEDIR/libutils_${_TAGNAME}.tar.gz
test ! -f $LIBUTILS_TARFILE && termux_download \
Expand Down
1 change: 1 addition & 0 deletions packages/android-tools/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Android platform tools"
TERMUX_PKG_LICENSE="Apache-2.0, MIT"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=31.0.2
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/nmeum/android-tools/releases/download/$TERMUX_PKG_VERSION/android-tools-$TERMUX_PKG_VERSION.tar.xz
TERMUX_PKG_SHA256=61b3bf6c240cb0b4d0ccfef696c55986e06657843627df950fdcf6881af0f8d4
TERMUX_PKG_AUTO_UPDATE=true
Expand Down
1 change: 1 addition & 0 deletions packages/apt/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Front-end for the dpkg package manager"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2.3.11
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://deb.debian.org/debian/pool/main/a/apt/apt_${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=cc0c5b24240176e333b11bce1a7ac528ae263317d137ceeebad3ec2d8682cb91
# apt-key requires utilities from coreutils, findutils, gpgv, grep, sed.
Expand Down
2 changes: 1 addition & 1 deletion packages/aria2/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Download utility supporting HTTP/HTTPS, FTP, BitTorrent
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.36.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://github.com/aria2/aria2/releases/download/release-${TERMUX_PKG_VERSION}/aria2-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=58d1e7608c12404f0229a3d9a4953d0d00c18040504498b483305bcb3de907a5
TERMUX_PKG_AUTO_UPDATE=true
Expand Down
1 change: 1 addition & 0 deletions packages/atomicparsley/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Read, parse and set metadata of MPEG-4 and 3gp files"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1:20210715.151551.e7ad03a
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/wez/atomicparsley/archive/${TERMUX_PKG_VERSION:2}.tar.gz
TERMUX_PKG_SHA256=546dcb5f3b625aff4f6bf22d27a0a636d15854fd729402a6933d31f3d0417e0d
TERMUX_PKG_AUTO_UPDATE=true
Expand Down
2 changes: 1 addition & 1 deletion packages/binutils/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Collection of binary tools, the main ones being ld, the
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2.37
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=3
TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/binutils/binutils-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=820d9724f020a3e69cb337893a0b63c2db161dadcb0e06fc11dc29eb1e84a32c
TERMUX_PKG_DEPENDS="libc++, zlib"
Expand Down
23 changes: 23 additions & 0 deletions packages/binutils/gold-ffsll.c.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
--- ./gold/ffsll.c.orig 2020-12-25 18:14:59.949086305 +0000
+++ ./gold/ffsll.c 2020-12-25 19:16:32.733522188 +0000
@@ -29,20 +29,3 @@
/* This file implements ffsll for systems which don't have it. We use
ffsll if possible because gcc supports it as a builtin which will
use a machine instruction if there is one. */
-
-int
-ffsll (long long arg)
-{
- unsigned long long i;
- int ret;
-
- if (arg == 0)
- ret = 0;
- else
- {
- ret = 1;
- for (i = (unsigned long long) arg; (i & 1) == 0; i >>= 1)
- ++ret;
- }
- return ret;
-}
1 change: 1 addition & 0 deletions packages/boinc/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Open-source software for volunteer computing"
TERMUX_PKG_LICENSE="GPL-3.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=7.16.16
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://github.com/BOINC/boinc/archive/client_release/${TERMUX_PKG_VERSION:0:4}/${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=0d5656a9f8ed1048936a5764270848b892d63f27bdb863d0ace447f1eaae6002
TERMUX_PKG_DEPENDS="libandroid-shmem, libc++, libcurl, openssl, zlib"
Expand Down
1 change: 1 addition & 0 deletions packages/boost/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Free peer-reviewed portable C++ source libraries"
TERMUX_PKG_LICENSE="BSL-1.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.77.0
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=https://boostorg.jfrog.io/artifactory/main/release/$TERMUX_PKG_VERSION/source/boost_${TERMUX_PKG_VERSION//./_}.tar.bz2
TERMUX_PKG_SHA256=fc9f85fc030e233142908241af7a846e60630aa7388de9a5fafb1f3a26840854
TERMUX_PKG_DEPENDS="libc++, libbz2, libiconv, liblzma, zlib"
Expand Down
21 changes: 16 additions & 5 deletions packages/busybox/0000-use-clang.patch
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
diff -uNr busybox-1.31.1/Makefile busybox-1.31.1.mod/Makefile
--- busybox-1.31.1/Makefile 2019-10-25 11:44:52.000000000 +0300
+++ busybox-1.31.1.mod/Makefile 2019-11-11 22:19:06.004778909 +0200
@@ -289,7 +289,7 @@
--- ./Makefile.orig 2021-08-19 16:48:15.223628163 +0200
+++ ./Makefile 2021-08-19 16:47:29.456942514 +0200
@@ -289,14 +289,14 @@
# Make variables (CC, etc...)

AS = $(CROSS_COMPILE)as
-CC = $(CROSS_COMPILE)gcc
+CC = $(CROSS_COMPILE)clang
LD = $(CC) -nostdlib
CPP = $(CC) -E
AR = $(CROSS_COMPILE)ar
-AR = $(CROSS_COMPILE)ar
-NM = $(CROSS_COMPILE)nm
-STRIP = $(CROSS_COMPILE)strip
-OBJCOPY = $(CROSS_COMPILE)objcopy
-OBJDUMP = $(CROSS_COMPILE)objdump
+AR = llvm-ar
+NM = llvm-nm
+STRIP = llvm-strip
+OBJCOPY = llvm-objcopy
+OBJDUMP = llvm-objdump
PKG_CONFIG ?= $(CROSS_COMPILE)pkg-config
AWK = awk
GENKSYMS = scripts/genksyms/genksyms
6 changes: 3 additions & 3 deletions packages/busybox/0004-Makefile.flags.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- ../Makefile.flags.orig 2020-07-20 19:17:12.263392471 +0000
+++ ./Makefile.flags 2020-07-20 19:17:22.988106865 +0000
@@ -150,9 +150,9 @@
--- ./Makefile.flags.orig 2021-01-01 11:52:27.000000000 +0100
+++ ./Makefile.flags 2021-08-19 16:49:06.743647568 +0200
@@ -151,9 +151,9 @@
# fall back to using a temp file:
CRYPT_AVAILABLE := $(shell echo 'int main(void){return 0;}' >crypttest.c; $(CC) $(CFLAGS) -lcrypt -o /dev/null crypttest.c >/dev/null 2>&1 && echo "y"; rm crypttest.c)
ifeq ($(CRYPT_AVAILABLE),y)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
diff -uNr busybox-1.31.1/networking/ftpd.c busybox-1.31.1.mod/networking/ftpd.c
--- busybox-1.31.1/networking/ftpd.c 2019-06-10 13:50:53.000000000 +0300
+++ busybox-1.31.1.mod/networking/ftpd.c 2019-11-11 22:26:50.216912741 +0200
@@ -1301,8 +1301,11 @@
--- ./networking/ftpd.c.orig 2021-08-19 16:49:06.730314230 +0200
+++ ./networking/ftpd.c 2021-08-19 16:49:06.753647572 +0200
@@ -1302,8 +1302,11 @@
G.root_fd = xopen("/", O_RDONLY | O_DIRECTORY);
close_on_exec_on(G.root_fd);
#endif
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
diff -uNr busybox-1.31.1/networking/httpd.c busybox-1.31.1.mod/networking/httpd.c
--- busybox-1.31.1/networking/httpd.c 2019-11-11 21:31:58.406733857 +0200
+++ busybox-1.31.1.mod/networking/httpd.c 2019-11-11 22:29:16.534250966 +0200
@@ -232,7 +232,7 @@
--- ./networking/httpd.c.orig 2021-08-19 16:49:06.730314230 +0200
+++ ./networking/httpd.c 2021-08-19 16:49:06.756980906 +0200
@@ -270,7 +270,7 @@
//usage: "\n -i Inetd mode"
//usage: "\n -f Don't daemonize"
//usage: "\n -v[v] Verbose"
Expand All @@ -10,16 +9,16 @@ diff -uNr busybox-1.31.1/networking/httpd.c busybox-1.31.1.mod/networking/httpd.
//usage: IF_FEATURE_HTTPD_SETUID(
//usage: "\n -u USER[:GRP] Set uid/gid after binding to port")
//usage: IF_FEATURE_HTTPD_BASIC_AUTH(
@@ -488,7 +488,7 @@
asm volatile("":::"memory"); \
@@ -538,7 +538,7 @@
SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
IF_FEATURE_HTTPD_BASIC_AUTH(g_realm = "Web Server Authentication";) \
IF_FEATURE_HTTPD_RANGES(range_start = -1;) \
- bind_addr_or_port = "80"; \
+ bind_addr_or_port = "8080"; \
index_page = index_html; \
file_size = -1; \
} while (0)
@@ -1004,7 +1004,7 @@
@@ -1030,7 +1030,7 @@
if (!errno && n && n <= 0xffff)
n = create_and_bind_stream_or_die(NULL, n);
else
Expand All @@ -28,7 +27,7 @@ diff -uNr busybox-1.31.1/networking/httpd.c busybox-1.31.1.mod/networking/httpd.
xlisten(n, 9);
return n;
}
@@ -2209,7 +2209,7 @@
@@ -2279,7 +2279,7 @@
if (proxy_entry) {
if (verbose > 1)
bb_error_msg("proxy:%s", urlcopy);
Expand Down
15 changes: 15 additions & 0 deletions packages/busybox/0011-networking-tftp-no-chroot.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--- ./networking/tftp.c.orig 2021-01-01 11:52:27.000000000 +0100
+++ ./networking/tftp.c 2021-08-19 16:49:06.763647575 +0200
@@ -917,7 +917,12 @@
G.pw = xgetpwnam(user_opt);
}
if (argv[0]) {
+#ifdef __ANDROID__
+ // chroot may trigger seccomp and is allowed only for root anyway.
+ xchdir(argv[0]);
+#else
xchroot(argv[0]);
+#endif
}

result = recv_from_to(STDIN_FILENO,
16 changes: 0 additions & 16 deletions packages/busybox/0012-networking-tftp-no-chroot.patch

This file was deleted.

2 changes: 1 addition & 1 deletion packages/busybox/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Tiny versions of many common UNIX utilities into a singl
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.33.1
TERMUX_PKG_REVISION=4
TERMUX_PKG_REVISION=5
TERMUX_PKG_SRCURL=https://busybox.net/downloads/busybox-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=12cec6bd2b16d8a9446dd16130f2b92982f1819f6e1c5f5887b6db03f5660d28
TERMUX_PKG_BUILD_IN_SRC=true
Expand Down
Loading