diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bd064c552..1d6f19673 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -77,7 +77,7 @@ jobs: # Useful for pull requests submitting changes for both build environment and packages. if grep -qP '^scripts/(Dockerfile|properties\.sh|setup-android-sdk\.sh|setup-cgct\.sh|setup-ubuntu\.sh)$' <<< "$CHANGED_FILES"; then echo "Detected changes for environment setup scripts. Building custom Docker image now." - docker build -t ghcr.io/termux/package-builder:latest . + docker build -t ghcr.io/termux/package-builder-cgct:latest . fi for repo_path in $(jq --raw-output 'del(.pkg_format) | keys | .[]' repo.json); do @@ -150,16 +150,16 @@ jobs: fi done - - name: Free additional disk space (if necessary) - run: | - if grep -q '^clvk$\|^dart$\|^rust$\|^rustc-nightly$' ./built_termux-main_packages.txt || \ - grep -q '^firefox$' ./built_termux-x11_packages.txt; then - echo "Free additional disk space on host" - sudo apt purge -yq $(dpkg -l | grep '^ii' | awk '{ print $2 }' | grep -P '(cabal-|dotnet-|ghc-|libmono|php|aspnetcore)') \ - mono-runtime-common monodoc-manual ruby - sudo apt autoremove -yq - sudo rm -rf /opt/hostedtoolcache /usr/local /usr/share/dotnet /usr/share/swift - fi + #- name: Free additional disk space (if necessary) + # run: | + # if grep -q '^clvk$\|^dart$\|^rust$\|^rustc-nightly$' ./built_gpkg_packages.txt || \ + # grep -q '^firefox$' ./built_termux-x11_packages.txt; then + # echo "Free additional disk space on host" + # sudo apt purge -yq $(dpkg -l | grep '^ii' | awk '{ print $2 }' | grep -P '(cabal-|dotnet-|ghc-|libmono|php|aspnetcore)') \ + # mono-runtime-common monodoc-manual ruby + # sudo apt autoremove -yq + # sudo rm -rf /opt/hostedtoolcache /usr/local /usr/share/dotnet /usr/share/swift + # fi - name: Lint packages run: | @@ -187,7 +187,7 @@ jobs: done if [ ! -z "$packages" ]; then - ./scripts/run-docker.sh ./build-package.sh -I -a ${{ matrix.target_arch }} --format pacman --library glibc $packages + TERMUX_BUILDER_IMAGE_NAME="ghcr.io/termux/package-builder-cgct" ./scripts/run-docker.sh ./build-package.sh -I -a ${{ matrix.target_arch }} --format pacman --library glibc $packages fi - name: Generate build artifacts diff --git a/gpkg/glibc/aarch64-arch-syscall.h.patch b/gpkg/glibc/aarch64-arch-syscall.h.patch index 158586e2c..99ded8609 100644 --- a/gpkg/glibc/aarch64-arch-syscall.h.patch +++ b/gpkg/glibc/aarch64-arch-syscall.h.patch @@ -1,20 +1,22 @@ --- glibc-2.38/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h 2023-07-31 20:54:16.000000000 +0300 -+++ glibc-2.38/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h.patch 2023-09-09 00:41:22.799180926 +0300 ++++ glibc-2.38/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h.patch 2023-10-07 00:00:59.225088205 +0300 @@ -1,5 +1,4 @@ /* AUTOGENERATED by update-syscall-lists.py. */ -#define __NR_accept 202 #define __NR_accept4 242 #define __NR_acct 89 #define __NR_add_key 217 -@@ -17,7 +16,6 @@ +@@ -17,9 +16,7 @@ #define __NR_clock_nanosleep 115 #define __NR_clock_settime 112 #define __NR_clone 220 -#define __NR_clone3 435 #define __NR_close 57 - #define __NR_close_range 436 +-#define __NR_close_range 436 #define __NR_connect 203 -@@ -35,7 +33,6 @@ + #define __NR_copy_file_range 285 + #define __NR_delete_module 106 +@@ -35,7 +32,6 @@ #define __NR_exit 93 #define __NR_exit_group 94 #define __NR_faccessat 48 @@ -22,7 +24,15 @@ #define __NR_fadvise64 223 #define __NR_fallocate 47 #define __NR_fanotify_init 262 -@@ -205,7 +202,6 @@ +@@ -168,7 +164,6 @@ + #define __NR_personality 92 + #define __NR_pidfd_getfd 438 + #define __NR_pidfd_open 434 +-#define __NR_pidfd_send_signal 424 + #define __NR_pipe2 59 + #define __NR_pivot_root 41 + #define __NR_pkey_alloc 289 +@@ -205,7 +200,6 @@ #define __NR_renameat2 276 #define __NR_request_key 218 #define __NR_restart_syscall 128 @@ -30,7 +40,7 @@ #define __NR_rt_sigaction 134 #define __NR_rt_sigpending 136 #define __NR_rt_sigprocmask 135 -@@ -237,11 +233,8 @@ +@@ -237,11 +231,8 @@ #define __NR_sendto 206 #define __NR_set_mempolicy 237 #define __NR_set_mempolicy_home_node 450 @@ -42,7 +52,7 @@ #define __NR_setgid 144 #define __NR_setgroups 159 #define __NR_sethostname 161 -@@ -270,7 +263,6 @@ +@@ -270,7 +261,6 @@ #define __NR_socketpair 199 #define __NR_splice 76 #define __NR_statfs 43 diff --git a/gpkg/glibc/arm-arch-syscall.h.patch b/gpkg/glibc/arm-arch-syscall.h.patch index e229b2263..83ab61bee 100644 --- a/gpkg/glibc/arm-arch-syscall.h.patch +++ b/gpkg/glibc/arm-arch-syscall.h.patch @@ -1,5 +1,5 @@ --- glibc-2.38/sysdeps/unix/sysv/linux/arm/arch-syscall.h 2023-07-31 20:54:16.000000000 +0300 -+++ glibc-2.38/sysdeps/unix/sysv/linux/arm/arch-syscall.h.patch 2023-09-09 00:41:03.659180934 +0300 ++++ glibc-2.38/sysdeps/unix/sysv/linux/arm/arch-syscall.h.patch 2023-10-07 00:01:12.685088200 +0300 @@ -2,7 +2,6 @@ #define __NR__llseek 140 #define __NR__newselect 142 @@ -16,7 +16,7 @@ #define __NR_chown 182 #define __NR_chown32 212 #define __NR_chroot 61 -@@ -27,13 +25,11 @@ +@@ -27,15 +25,12 @@ #define __NR_clock_getres 264 #define __NR_clock_getres_time64 406 #define __NR_clock_gettime 263 @@ -28,9 +28,11 @@ #define __NR_clone 120 -#define __NR_clone3 435 #define __NR_close 6 - #define __NR_close_range 436 +-#define __NR_close_range 436 #define __NR_connect 283 -@@ -56,7 +52,6 @@ + #define __NR_copy_file_range 391 + #define __NR_creat 8 +@@ -56,7 +51,6 @@ #define __NR_exit 1 #define __NR_exit_group 248 #define __NR_faccessat 334 @@ -38,7 +40,7 @@ #define __NR_fallocate 352 #define __NR_fanotify_init 367 #define __NR_fanotify_mark 368 -@@ -109,7 +104,6 @@ +@@ -109,7 +103,6 @@ #define __NR_getitimer 105 #define __NR_getpeername 287 #define __NR_getpgid 132 @@ -46,7 +48,15 @@ #define __NR_getpid 20 #define __NR_getppid 64 #define __NR_getpriority 96 -@@ -253,7 +247,6 @@ +@@ -220,7 +213,6 @@ + #define __NR_personality 136 + #define __NR_pidfd_getfd 438 + #define __NR_pidfd_open 434 +-#define __NR_pidfd_send_signal 424 + #define __NR_pipe 42 + #define __NR_pipe2 359 + #define __NR_pivot_root 218 +@@ -253,7 +245,6 @@ #define __NR_readlinkat 332 #define __NR_readv 145 #define __NR_reboot 88 @@ -54,7 +64,7 @@ #define __NR_recvfrom 292 #define __NR_recvmmsg 365 #define __NR_recvmmsg_time64 417 -@@ -265,8 +258,6 @@ +@@ -265,8 +256,6 @@ #define __NR_renameat2 382 #define __NR_request_key 310 #define __NR_restart_syscall 0 @@ -63,7 +73,7 @@ #define __NR_rt_sigaction 174 #define __NR_rt_sigpending 176 #define __NR_rt_sigprocmask 175 -@@ -295,7 +286,6 @@ +@@ -295,7 +284,6 @@ #define __NR_semop 298 #define __NR_semtimedop 312 #define __NR_semtimedop_time64 420 @@ -71,7 +81,7 @@ #define __NR_sendfile 187 #define __NR_sendfile64 239 #define __NR_sendmmsg 374 -@@ -303,14 +293,9 @@ +@@ -303,14 +291,9 @@ #define __NR_sendto 290 #define __NR_set_mempolicy 321 #define __NR_set_mempolicy_home_node 450 @@ -86,7 +96,7 @@ #define __NR_setgid 46 #define __NR_setgid32 214 #define __NR_setgroups 81 -@@ -355,7 +340,6 @@ +@@ -355,7 +338,6 @@ #define __NR_stat64 195 #define __NR_statfs 99 #define __NR_statfs64 266 diff --git a/gpkg/glibc/build.sh b/gpkg/glibc/build.sh index 3ca2ee602..f124e74d9 100644 --- a/gpkg/glibc/build.sh +++ b/gpkg/glibc/build.sh @@ -3,12 +3,13 @@ TERMUX_PKG_DESCRIPTION="GNU C Library" TERMUX_PKG_LICENSE="GPL-3.0, LGPL-3.0" TERMUX_PKG_MAINTAINER="@termux-pacman" TERMUX_PKG_VERSION=2.38 -TERMUX_PKG_REVISION=3 +TERMUX_PKG_REVISION=4 TERMUX_PKG_SRCURL=https://ftp.gnu.org/gnu/libc/glibc-$TERMUX_PKG_VERSION.tar.xz TERMUX_PKG_SHA256=fb82998998b2b29965467bc1b69d152e9c307d2cf301c9eafb4555b770ef3fd2 TERMUX_PKG_DEPENDS="linux-api-headers-glibc" TERMUX_PKG_RECOMMENDS="glibc-runner" TERMUX_PKG_NO_STATICSPLIT=true +TERMUX_PKG_CONFFILES="glibc/etc/gai.conf, glibc/etc/locale.gen" termux_step_pre_configure() { if [ "$TERMUX_PACKAGE_LIBRARY" != "glibc" ]; then diff --git a/gpkg/glibc/i386-arch-syscall.h.patch b/gpkg/glibc/i386-arch-syscall.h.patch index 36539b4e4..f0398ab2e 100644 --- a/gpkg/glibc/i386-arch-syscall.h.patch +++ b/gpkg/glibc/i386-arch-syscall.h.patch @@ -1,5 +1,5 @@ --- glibc-2.38/sysdeps/unix/sysv/linux/i386/arch-syscall.h 2023-07-31 20:54:16.000000000 +0300 -+++ glibc-2.38/sysdeps/unix/sysv/linux/i386/arch-syscall.h.patch 2023-09-09 00:41:39.579180920 +0300 ++++ glibc-2.38/sysdeps/unix/sysv/linux/i386/arch-syscall.h.patch 2023-10-07 00:01:30.315088193 +0300 @@ -18,7 +18,6 @@ #define __NR_capget 184 #define __NR_capset 185 @@ -8,7 +8,7 @@ #define __NR_chown 182 #define __NR_chown32 212 #define __NR_chroot 61 -@@ -27,13 +26,11 @@ +@@ -27,15 +26,12 @@ #define __NR_clock_getres 266 #define __NR_clock_getres_time64 406 #define __NR_clock_gettime 265 @@ -20,9 +20,11 @@ #define __NR_clone 120 -#define __NR_clone3 435 #define __NR_close 6 - #define __NR_close_range 436 +-#define __NR_close_range 436 #define __NR_connect 362 -@@ -57,7 +54,6 @@ + #define __NR_copy_file_range 377 + #define __NR_creat 8 +@@ -57,7 +53,6 @@ #define __NR_exit 1 #define __NR_exit_group 252 #define __NR_faccessat 307 @@ -30,7 +32,7 @@ #define __NR_fadvise64 250 #define __NR_fadvise64_64 272 #define __NR_fallocate 324 -@@ -115,7 +111,6 @@ +@@ -115,7 +110,6 @@ #define __NR_getitimer 105 #define __NR_getpeername 368 #define __NR_getpgid 132 @@ -38,7 +40,15 @@ #define __NR_getpid 20 #define __NR_getpmsg 188 #define __NR_getppid 64 -@@ -288,8 +283,6 @@ +@@ -239,7 +233,6 @@ + #define __NR_personality 136 + #define __NR_pidfd_getfd 438 + #define __NR_pidfd_open 434 +-#define __NR_pidfd_send_signal 424 + #define __NR_pipe 42 + #define __NR_pipe2 331 + #define __NR_pivot_root 217 +@@ -288,8 +281,6 @@ #define __NR_renameat2 353 #define __NR_request_key 287 #define __NR_restart_syscall 0 @@ -47,7 +57,7 @@ #define __NR_rt_sigaction 174 #define __NR_rt_sigpending 176 #define __NR_rt_sigprocmask 175 -@@ -324,14 +317,9 @@ +@@ -324,14 +315,9 @@ #define __NR_sendto 369 #define __NR_set_mempolicy 276 #define __NR_set_mempolicy_home_node 450 @@ -62,7 +72,7 @@ #define __NR_setgid 46 #define __NR_setgid32 214 #define __NR_setgroups 81 -@@ -380,7 +368,6 @@ +@@ -380,7 +366,6 @@ #define __NR_stat64 195 #define __NR_statfs 99 #define __NR_statfs64 268 diff --git a/gpkg/glibc/pidfd.h.patch b/gpkg/glibc/pidfd.h.patch new file mode 100644 index 000000000..ac024f438 --- /dev/null +++ b/gpkg/glibc/pidfd.h.patch @@ -0,0 +1,15 @@ +--- src/sysdeps/unix/sysv/linux/sys/pidfd.h 2023-07-31 20:54:16.000000000 +0300 ++++ src/sysdeps/unix/sysv/linux/sys/pidfd.h.patch 2023-10-06 17:40:14.819331237 +0300 +@@ -38,12 +38,4 @@ + extern int pidfd_getfd (int __pidfd, int __targetfd, + unsigned int __flags) __THROW; + +-/* Sends the signal SIG to the target process referred by the PIDFD. If +- INFO points to a siginfo_t buffer, it will be populated. +- +- The FLAGS argument is reserved for future use, it must be specified +- as 0. */ +-extern int pidfd_send_signal (int __pidfd, int __sig, siginfo_t *__info, +- unsigned int __flags) __THROW; +- + #endif /* _PIDFD_H */ diff --git a/gpkg/glibc/spawni.c.patch b/gpkg/glibc/spawni.c.patch new file mode 100644 index 000000000..bdd083d8e --- /dev/null +++ b/gpkg/glibc/spawni.c.patch @@ -0,0 +1,11 @@ +--- glibc-2.38/sysdeps/unix/sysv/linux/spawni.c 2023-07-31 20:54:16.000000000 +0300 ++++ glibc-2.38/sysdeps/unix/sysv/linux/spawni.c.patch 2023-10-07 00:31:27.595087508 +0300 +@@ -264,7 +264,7 @@ + case spawn_do_closefrom: + { + int lowfd = action->action.closefrom_action.from; +- int r = INLINE_SYSCALL_CALL (close_range, lowfd, ~0U, 0); ++ int r = close_range (lowfd, ~0U, 0); + if (r != 0 && !__closefrom_fallback (lowfd, false)) + goto fail; + } break; diff --git a/gpkg/glibc/x86_64-arch-syscall.h.patch b/gpkg/glibc/x86_64-arch-syscall.h.patch index c3ce7b4fb..723e2aadb 100644 --- a/gpkg/glibc/x86_64-arch-syscall.h.patch +++ b/gpkg/glibc/x86_64-arch-syscall.h.patch @@ -1,5 +1,5 @@ --- glibc-2.38/sysdeps/unix/sysv/linux/x86_64/64/arch-syscall.h 2023-07-31 20:54:16.000000000 +0300 -+++ glibc-2.38/sysdeps/unix/sysv/linux/x86_64/64/arch-syscall.h.patch 2023-09-09 00:42:10.549180908 +0300 ++++ glibc-2.38/sysdeps/unix/sysv/linux/x86_64/64/arch-syscall.h.patch 2023-10-07 00:01:45.715088187 +0300 @@ -1,6 +1,5 @@ /* AUTOGENERATED by update-syscall-lists.py. */ #define __NR__sysctl 156 @@ -15,15 +15,17 @@ #define __NR_chown 92 #define __NR_chroot 161 #define __NR_clock_adjtime 305 -@@ -24,7 +22,6 @@ +@@ -24,9 +22,7 @@ #define __NR_clock_nanosleep 230 #define __NR_clock_settime 227 #define __NR_clone 56 -#define __NR_clone3 435 #define __NR_close 3 - #define __NR_close_range 436 +-#define __NR_close_range 436 #define __NR_connect 42 -@@ -50,7 +47,6 @@ + #define __NR_copy_file_range 326 + #define __NR_creat 85 +@@ -50,7 +46,6 @@ #define __NR_exit 60 #define __NR_exit_group 231 #define __NR_faccessat 269 @@ -31,7 +33,7 @@ #define __NR_fadvise64 221 #define __NR_fallocate 285 #define __NR_fanotify_init 300 -@@ -95,7 +91,6 @@ +@@ -95,7 +90,6 @@ #define __NR_getitimer 36 #define __NR_getpeername 52 #define __NR_getpgid 121 @@ -39,7 +41,15 @@ #define __NR_getpid 39 #define __NR_getpmsg 181 #define __NR_getppid 110 -@@ -244,8 +239,6 @@ +@@ -201,7 +195,6 @@ + #define __NR_personality 135 + #define __NR_pidfd_getfd 438 + #define __NR_pidfd_open 434 +-#define __NR_pidfd_send_signal 424 + #define __NR_pipe 22 + #define __NR_pipe2 293 + #define __NR_pivot_root 155 +@@ -244,8 +237,6 @@ #define __NR_renameat2 316 #define __NR_request_key 249 #define __NR_restart_syscall 219 @@ -48,7 +58,7 @@ #define __NR_rt_sigaction 13 #define __NR_rt_sigpending 127 #define __NR_rt_sigprocmask 14 -@@ -279,12 +272,9 @@ +@@ -279,12 +270,9 @@ #define __NR_sendto 44 #define __NR_set_mempolicy 238 #define __NR_set_mempolicy_home_node 450 @@ -61,7 +71,7 @@ #define __NR_setgid 106 #define __NR_setgroups 116 #define __NR_sethostname 170 -@@ -315,7 +305,6 @@ +@@ -315,7 +303,6 @@ #define __NR_splice 275 #define __NR_stat 4 #define __NR_statfs 137