From c8e3e14e87f073e9f270dff4442c919c437eec02 Mon Sep 17 00:00:00 2001 From: Ivan Max Date: Sat, 9 Sep 2023 15:18:10 +0000 Subject: [PATCH] gpkg/glibc: fix syscall `setfsuid` and `setfsgid` (#92) --- gpkg/glibc/Makefile.patch | 11 +++++++++++ gpkg/glibc/aarch64-arch-syscall.h.patch | 14 +++++++++----- gpkg/glibc/arm-arch-syscall.h.patch | 13 ++++++++++--- gpkg/glibc/build.sh | 2 +- gpkg/glibc/i386-arch-syscall.h.patch | 13 ++++++++++--- gpkg/glibc/x86_64-arch-syscall.h.patch | 11 ++++++++--- 6 files changed, 49 insertions(+), 15 deletions(-) create mode 100644 gpkg/glibc/Makefile.patch diff --git a/gpkg/glibc/Makefile.patch b/gpkg/glibc/Makefile.patch new file mode 100644 index 000000000..8fead72b1 --- /dev/null +++ b/gpkg/glibc/Makefile.patch @@ -0,0 +1,11 @@ +--- glibc-2.38/sysdeps/unix/sysv/linux/Makefile 2023-07-31 20:54:16.000000000 +0300 ++++ glibc-2.38/sysdeps/unix/sysv/linux/Makefile.patch 2023-09-09 00:40:40.109180943 +0300 +@@ -94,8 +94,6 @@ + process_vm_writev \ + pselect32 \ + readahead \ +- setfsgid \ +- setfsuid \ + signalfd \ + splice \ + sysctl \ diff --git a/gpkg/glibc/aarch64-arch-syscall.h.patch b/gpkg/glibc/aarch64-arch-syscall.h.patch index ee3ae0a1d..158586e2c 100644 --- a/gpkg/glibc/aarch64-arch-syscall.h.patch +++ b/gpkg/glibc/aarch64-arch-syscall.h.patch @@ -1,5 +1,5 @@ ---- glibc-2.38/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h 2023-02-01 06:27:45.000000000 +0300 -+++ glibc-2.38/sysdeps/unix/sysv/linux/aarch64/arch-syscall.h.patch 2023-07-03 20:19:34.607208458 +0300 +--- 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 @@ -1,5 +1,4 @@ /* AUTOGENERATED by update-syscall-lists.py. */ -#define __NR_accept 202 @@ -30,15 +30,19 @@ #define __NR_rt_sigaction 134 #define __NR_rt_sigpending 136 #define __NR_rt_sigprocmask 135 -@@ -237,7 +233,6 @@ +@@ -237,11 +233,8 @@ #define __NR_sendto 206 #define __NR_set_mempolicy 237 #define __NR_set_mempolicy_home_node 450 -#define __NR_set_robust_list 99 #define __NR_set_tid_address 96 #define __NR_setdomainname 162 - #define __NR_setfsgid 152 -@@ -270,7 +265,6 @@ +-#define __NR_setfsgid 152 +-#define __NR_setfsuid 151 + #define __NR_setgid 144 + #define __NR_setgroups 159 + #define __NR_sethostname 161 +@@ -270,7 +263,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 610f8be14..e229b2263 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-08-03 18:02:02.376156803 +0300 ++++ glibc-2.38/sysdeps/unix/sysv/linux/arm/arch-syscall.h.patch 2023-09-09 00:41:03.659180934 +0300 @@ -2,7 +2,6 @@ #define __NR__llseek 140 #define __NR__newselect 142 @@ -71,7 +71,7 @@ #define __NR_sendfile 187 #define __NR_sendfile64 239 #define __NR_sendmmsg 374 -@@ -303,7 +293,6 @@ +@@ -303,14 +293,9 @@ #define __NR_sendto 290 #define __NR_set_mempolicy 321 #define __NR_set_mempolicy_home_node 450 @@ -79,7 +79,14 @@ #define __NR_set_tid_address 256 #define __NR_set_tls 983045 #define __NR_setdomainname 121 -@@ -355,7 +344,6 @@ +-#define __NR_setfsgid 139 +-#define __NR_setfsgid32 216 +-#define __NR_setfsuid 138 +-#define __NR_setfsuid32 215 + #define __NR_setgid 46 + #define __NR_setgid32 214 + #define __NR_setgroups 81 +@@ -355,7 +340,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 ec879b736..03eed1ece 100644 --- a/gpkg/glibc/build.sh +++ b/gpkg/glibc/build.sh @@ -3,7 +3,7 @@ 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=1 +TERMUX_PKG_REVISION=2 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" diff --git a/gpkg/glibc/i386-arch-syscall.h.patch b/gpkg/glibc/i386-arch-syscall.h.patch index df67cbe98..36539b4e4 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-08-03 18:01:46.346156809 +0300 ++++ glibc-2.38/sysdeps/unix/sysv/linux/i386/arch-syscall.h.patch 2023-09-09 00:41:39.579180920 +0300 @@ -18,7 +18,6 @@ #define __NR_capget 184 #define __NR_capset 185 @@ -47,7 +47,7 @@ #define __NR_rt_sigaction 174 #define __NR_rt_sigpending 176 #define __NR_rt_sigprocmask 175 -@@ -324,7 +317,6 @@ +@@ -324,14 +317,9 @@ #define __NR_sendto 369 #define __NR_set_mempolicy 276 #define __NR_set_mempolicy_home_node 450 @@ -55,7 +55,14 @@ #define __NR_set_thread_area 243 #define __NR_set_tid_address 258 #define __NR_setdomainname 121 -@@ -380,7 +372,6 @@ +-#define __NR_setfsgid 139 +-#define __NR_setfsgid32 216 +-#define __NR_setfsuid 138 +-#define __NR_setfsuid32 215 + #define __NR_setgid 46 + #define __NR_setgid32 214 + #define __NR_setgroups 81 +@@ -380,7 +368,6 @@ #define __NR_stat64 195 #define __NR_statfs 99 #define __NR_statfs64 268 diff --git a/gpkg/glibc/x86_64-arch-syscall.h.patch b/gpkg/glibc/x86_64-arch-syscall.h.patch index 4b1e82609..c3ce7b4fb 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-08-03 18:01:26.526156817 +0300 ++++ glibc-2.38/sysdeps/unix/sysv/linux/x86_64/64/arch-syscall.h.patch 2023-09-09 00:42:10.549180908 +0300 @@ -1,6 +1,5 @@ /* AUTOGENERATED by update-syscall-lists.py. */ #define __NR__sysctl 156 @@ -48,7 +48,7 @@ #define __NR_rt_sigaction 13 #define __NR_rt_sigpending 127 #define __NR_rt_sigprocmask 14 -@@ -279,7 +272,6 @@ +@@ -279,12 +272,9 @@ #define __NR_sendto 44 #define __NR_set_mempolicy 238 #define __NR_set_mempolicy_home_node 450 @@ -56,7 +56,12 @@ #define __NR_set_thread_area 205 #define __NR_set_tid_address 218 #define __NR_setdomainname 171 -@@ -315,7 +307,6 @@ +-#define __NR_setfsgid 123 +-#define __NR_setfsuid 122 + #define __NR_setgid 106 + #define __NR_setgroups 116 + #define __NR_sethostname 170 +@@ -315,7 +305,6 @@ #define __NR_splice 275 #define __NR_stat 4 #define __NR_statfs 137