aboutsummaryrefslogtreecommitdiffstats
path: root/tools/fakeroot
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2021-09-18 00:20:45 -0700
committerHauke Mehrtens <hauke@hauke-m.de>2021-09-20 15:21:17 +0200
commit22c30ed958296b756cef60b42200d668b145bf6b (patch)
treecd26acfeb9796ef924a6b45d53ef60f892e6de56 /tools/fakeroot
parentaf1853af602cbdd85d8efdbf7f6ab56efc2e0b71 (diff)
downloadupstream-22c30ed958296b756cef60b42200d668b145bf6b.tar.gz
upstream-22c30ed958296b756cef60b42200d668b145bf6b.tar.bz2
upstream-22c30ed958296b756cef60b42200d668b145bf6b.zip
tools/fakeroot: update to 1.26
Remove upstreamed patches. Refresh other. Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'tools/fakeroot')
-rw-r--r--tools/fakeroot/Makefile4
-rw-r--r--tools/fakeroot/patches/100-portability.patch138
-rw-r--r--tools/fakeroot/patches/300-glibc-2.33-compatibility.patch145
-rw-r--r--tools/fakeroot/patches/301-glibc-2.33-compat-fixes.patch42
-rw-r--r--tools/fakeroot/patches/400-alpine-libc.musl-fix.patch2
5 files changed, 3 insertions, 328 deletions
diff --git a/tools/fakeroot/Makefile b/tools/fakeroot/Makefile
index 61bc27b90e..5c5f25e226 100644
--- a/tools/fakeroot/Makefile
+++ b/tools/fakeroot/Makefile
@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=fakeroot
-PKG_VERSION:=1.25.3
+PKG_VERSION:=1.26
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
PKG_SOURCE_URL:=@DEBIAN/pool/main/f/fakeroot
-PKG_HASH:=8e903683357f7f5bcc31b879fd743391ad47691d4be33d24a76be3b6c21e956c
+PKG_HASH:=480a578ffdc5592e73df4c086950d321b4adc78dbdaec56c82e4fe1fb68de8e9
PKG_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=COPYING
PKG_FIXUP:=autoreconf
diff --git a/tools/fakeroot/patches/100-portability.patch b/tools/fakeroot/patches/100-portability.patch
deleted file mode 100644
index 7ba12996be..0000000000
--- a/tools/fakeroot/patches/100-portability.patch
+++ /dev/null
@@ -1,138 +0,0 @@
---- a/libfakeroot.c
-+++ b/libfakeroot.c
-@@ -112,8 +112,16 @@
- #define INT_SEND_STAT(a,b) SEND_STAT(a,b,_STAT_VER)
- #define INT_SEND_GET_XATTR(a,b) SEND_GET_XATTR(a,b,_STAT_VER)
- #define INT_SEND_GET_STAT(a,b) SEND_GET_STAT(a,b)
-+
-+/* 10.10 uses id_t in getpriority/setpriority calls, so pretend
-+ id_t is used everywhere, just happens to be int on some OSes */
-+#ifndef _ID_T
-+#define _ID_T
-+typedef int id_t;
-+#endif
- #endif
-
-+#include <sys/types.h>
- #include <stdlib.h>
- #include <sys/ipc.h>
- #include <sys/msg.h>
-@@ -125,7 +133,6 @@
- #include <unistd.h>
- #include <dirent.h>
- #include <errno.h>
--#include <sys/types.h>
- #ifdef HAVE_SYS_ACL_H
- #include <sys/acl.h>
- #endif /* HAVE_SYS_ACL_H */
-@@ -188,6 +195,15 @@ extern int unsetenv (const char *name);
- #undef __lxstat64
- #undef _FILE_OFFSET_BITS
-
-+
-+#ifndef AT_EMPTY_PATH
-+#define AT_EMPTY_PATH 0
-+#endif
-+
-+#ifndef AT_NO_AUTOMOUNT
-+#define AT_NO_AUTOMOUNT 0
-+#endif
-+
- /*
- // next_wrap_st:
- // this structure is used in next_wrap, which is defined in
-@@ -1911,7 +1927,7 @@ ssize_t fremovexattr(int fd, const char
- }
- #endif /* HAVE_FREMOVEXATTR */
-
--int setpriority(int which, int who, int prio){
-+int setpriority(int which, id_t who, int prio){
- if (fakeroot_disabled)
- return next_setpriority(which, who, prio);
- next_setpriority(which, who, prio);
-@@ -2520,3 +2536,19 @@ int sysinfo(int command, char *buf, long
- }
- }
- #endif
-+
-+#ifdef HAVE_OPENAT
-+int openat(int dir_fd, const char *pathname, int flags, ...)
-+{
-+ mode_t mode;
-+
-+ if (flags & O_CREAT) {
-+ va_list args;
-+ va_start(args, flags);
-+ mode = va_arg(args, int);
-+ va_end(args);
-+ }
-+
-+ return next_openat(dir_fd, pathname, flags, mode);
-+}
-+#endif
---- a/wrapfunc.inp
-+++ b/wrapfunc.inp
-@@ -146,7 +146,7 @@ setfsgid;gid_t;(gid_t fsgid);(fsgid)
- initgroups;int;(const char *user, INITGROUPS_SECOND_ARG group);(user, group)
- getgroups;int;(int size, gid_t list[]);(size, list)
- setgroups;int;(SETGROUPS_SIZE_TYPE size, const gid_t *list);(size, list)
--setpriority;int;(int which, int who, int prio);(which, who, prio)
-+setpriority;int;(int which, id_t who, int prio);(which, who, prio)
- #ifdef HAVE_CAPSET
- capset;int;(cap_user_header_t hdrp, const cap_user_data_t datap);(hdrp, datap)
- #endif /* HAVE_CAPSET */
-@@ -198,7 +198,7 @@ fchownat;int;(int dir_fd, const char *pa
- mkdirat;int;(int dir_fd, const char *pathname, mode_t mode);(dir_fd, pathname, mode)
- #endif /* HAVE_MKDIRAT */
- #ifdef HAVE_OPENAT
--openat;int;(int dir_fd, const char *pathname, int flags);(dir_fd, pathname, flags)
-+openat;int;(int dir_fd, const char *pathname, int flags, mode_t mode);(dir_fd, pathname, flags, mode);;(int dir_fd, const char *pathname, int flags, ...)
- #endif /* HAVE_OPENAT */
- #ifdef HAVE_RENAMEAT
- renameat;int;(int olddir_fd, const char *oldpath, int newdir_fd, const char *newpath);(olddir_fd, oldpath, newdir_fd, newpath)
---- a/wrapawk_macosx
-+++ b/wrapawk_macosx
-@@ -46,26 +46,30 @@ BEGIN{
- argtype=$3;
- argname=$4;
- MACRO=$5;
-+ argtype_def=$6
-+ if(!argtype_def) {
-+ argtype_def = argtype
-+ }
- if(MACRO){
- print "extern " ret " MY_DEF(" name ")" argtype " __attribute__((visibility(\"hidden\")));" > headerfile;
- print "INTERPOSE(MY_DEF(" name "_RAW)," name "_RAW);" > structfile;
- print "#undef " name > deffile
- print "#define " name " MY_DEF(" name "_RAW)" > deffile
-
-- print "extern " ret, name, argtype ";" > tmpffile;
-+ print "extern " ret, name, argtype_def ";" > tmpffile;
- print "static __inline__ " ret " NEXT_" MACRO "_NOARG " argtype " __attribute__((always_inline));" > tmpffile;
- print "static __inline__ " ret " NEXT_" MACRO "_NOARG " argtype " {" > tmpffile;
- print " return " name, argname ";" > tmpffile;
- print "}" > tmpffile;
- print "" > tmpffile;
- } else {
-- print "extern " ret " my_" name, argtype " __attribute__((visibility(\"hidden\")));" > headerfile;
-+ print "extern " ret " my_" name, argtype_def " __attribute__((visibility(\"hidden\")));" > headerfile;
- print "#undef " name > structfile;
- print "INTERPOSE(my_" name "," name ");" > structfile;
- print "#define " name " my_" name > structfile
- print "#define " name " my_" name > deffile
-
-- print "extern " ret, name, argtype ";" > tmpffile;
-+ print "extern " ret, name, argtype_def ";" > tmpffile;
- if(argname){
- print "static __inline__ " ret " next_" name, argtype " __attribute__((always_inline));" > tmpffile;
- print "static __inline__ " ret " next_" name, argtype " {" > tmpffile;
---- a/configure.ac
-+++ b/configure.ac
-@@ -146,6 +146,7 @@ for first in size_t int; do
- #include <sys/types.h>
- #endif
- #include <unistd.h>
-+#include <stdio.h>
- #ifdef HAVE_GRP_H
- #include <grp.h>
- #endif
diff --git a/tools/fakeroot/patches/300-glibc-2.33-compatibility.patch b/tools/fakeroot/patches/300-glibc-2.33-compatibility.patch
deleted file mode 100644
index a460cace0c..0000000000
--- a/tools/fakeroot/patches/300-glibc-2.33-compatibility.patch
+++ /dev/null
@@ -1,145 +0,0 @@
---- a/libfakeroot.c
-+++ b/libfakeroot.c
-@@ -90,6 +90,16 @@
- #define SEND_GET_XATTR64(a,b,c) send_get_xattr64(a,b)
- #endif
-
-+#ifndef _STAT_VER
-+ #if defined (__aarch64__)
-+ #define _STAT_VER 0
-+ #elif defined (__x86_64__)
-+ #define _STAT_VER 1
-+ #else
-+ #define _STAT_VER 3
-+ #endif
-+#endif
-+
- /*
- These INT_* (which stands for internal) macros should always be used when
- the fakeroot library owns the storage of the stat variable.
-@@ -1358,6 +1368,54 @@ int renameat(int olddir_fd, const char *
- #endif /* HAVE_FSTATAT */
-
-
-+#if defined(__GLIBC__) && __GLIBC_PREREQ(2,33)
-+/* Glibc 2.33 exports symbols for these functions in the shared lib */
-+ int lstat(const char *file_name, struct stat *statbuf) {
-+ return WRAP_LSTAT LSTAT_ARG(_STAT_VER, file_name, statbuf);
-+ }
-+ int stat(const char *file_name, struct stat *st) {
-+ return WRAP_STAT STAT_ARG(_STAT_VER, file_name, st);
-+ }
-+ int fstat(int fd, struct stat *st) {
-+ return WRAP_FSTAT FSTAT_ARG(_STAT_VER, fd, st);
-+ }
-+
-+ #ifdef HAVE_FSTATAT
-+ int fstatat(int dir_fd, const char *path, struct stat *st, int flags) {
-+ return WRAP_FSTATAT FSTATAT_ARG(_STAT_VER, dir_fd, path, st, flags);
-+ }
-+ #endif
-+
-+ #ifdef STAT64_SUPPORT
-+ int lstat64(const char *file_name, struct stat64 *st) {
-+ return WRAP_LSTAT64 LSTAT64_ARG(_STAT_VER, file_name, st);
-+ }
-+ int stat64(const char *file_name, struct stat64 *st) {
-+ return WRAP_STAT64 STAT64_ARG(_STAT_VER, file_name, st);
-+ }
-+ int fstat64(int fd, struct stat64 *st) {
-+ return WRAP_FSTAT64 FSTAT64_ARG(_STAT_VER, fd, st);
-+ }
-+
-+ #ifdef HAVE_FSTATAT
-+ int fstatat64(int dir_fd, const char *path, struct stat64 *st, int flags) {
-+ return WRAP_FSTATAT64 FSTATAT64_ARG(_STAT_VER, dir_fd, path, st, flags);
-+ }
-+ #endif
-+ #endif
-+
-+ int mknod(const char *pathname, mode_t mode, dev_t dev) {
-+ return WRAP_MKNOD MKNOD_ARG(_STAT_VER, pathname, mode, &dev);
-+ }
-+
-+ #if defined(HAVE_FSTATAT) && defined(HAVE_MKNODAT)
-+ int mknodat(int dir_fd, const char *pathname, mode_t mode, dev_t dev) {
-+ return WRAP_MKNODAT MKNODAT_ARG(_STAT_VER, dir_fd, pathname, mode, &dev);
-+ }
-+ #endif
-+#endif /* GLIBC_PREREQ */
-+
-+
- #ifdef FAKEROOT_FAKENET
- pid_t fork(void)
- {
-@@ -2024,11 +2082,7 @@ FTSENT *fts_read(FTS *ftsp) {
- || r->fts_info == FTS_NS || r->fts_info == FTS_NSOK))
- r->fts_statp = NULL; /* Otherwise fts_statp may be a random pointer */
- if(r && r->fts_statp) { /* Should we bother checking fts_info here? */
--# if defined(STAT64_SUPPORT) && !defined(__APPLE__)
-- SEND_GET_STAT64(r->fts_statp, _STAT_VER);
--# else
- SEND_GET_STAT(r->fts_statp, _STAT_VER);
--# endif
- }
-
- return r;
-@@ -2047,11 +2101,7 @@ FTSENT *fts_children(FTS *ftsp, int opti
- first=next_fts_children(ftsp, options);
- for(r = first; r; r = r->fts_link) {
- if(r && r->fts_statp) { /* Should we bother checking fts_info here? */
--# if defined(STAT64_SUPPORT) && !defined(__APPLE__)
-- SEND_GET_STAT64(r->fts_statp, _STAT_VER);
--# else
- SEND_GET_STAT(r->fts_statp, _STAT_VER);
--# endif
- }
- }
-
-@@ -2483,7 +2533,7 @@ int statx (int dirfd, const char *path,
-
- #ifdef LIBFAKEROOT_DEBUGGING
- if (fakeroot_debug) {
-- fprintf(stderr, "statx fd %d\n", fd);
-+ fprintf(stderr, "statx fd %d\n", dirfd);
- }
- #endif /* LIBFAKEROOT_DEBUGGING */
- r=INT_NEXT_FSTATAT(dirfd, path, &st, flags);
---- a/configure.ac
-+++ b/configure.ac
-@@ -184,13 +184,13 @@ AC_MSG_CHECKING([for type of arg of __xm
- ]], [[
- int __xmknod ( int ver,
- const char *pathname ,
-- mode_t mode , dev_t dev);
-+ mode_t mode , dev_t *dev);
- ]])],[
-- AC_DEFINE(XMKNOD_FRTH_ARG,)
-- AC_MSG_RESULT([no extra *])
-- ],[
- AC_DEFINE(XMKNOD_FRTH_ARG,[*])
- AC_MSG_RESULT([needs *])
-+ ],[
-+ AC_DEFINE(XMKNOD_FRTH_ARG,)
-+ AC_MSG_RESULT([no extra *])
-
- ])
-
-@@ -211,13 +211,13 @@ AC_MSG_CHECKING([for type of arg of __xm
- int __xmknodat ( int ver,
- int dirfd,
- const char *pathname ,
-- mode_t mode , dev_t dev);
-+ mode_t mode , dev_t *dev);
- ]])],[
-- AC_DEFINE(XMKNODAT_FIFTH_ARG,)
-- AC_MSG_RESULT([no extra *])
-- ],[
- AC_DEFINE(XMKNODAT_FIFTH_ARG,[*])
- AC_MSG_RESULT([needs *])
-+ ],[
-+ AC_DEFINE(XMKNODAT_FIFTH_ARG,)
-+ AC_MSG_RESULT([no extra *])
-
- ])
-
diff --git a/tools/fakeroot/patches/301-glibc-2.33-compat-fixes.patch b/tools/fakeroot/patches/301-glibc-2.33-compat-fixes.patch
deleted file mode 100644
index 0b91d65edb..0000000000
--- a/tools/fakeroot/patches/301-glibc-2.33-compat-fixes.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- a/libfakeroot.c
-+++ b/libfakeroot.c
-@@ -1368,7 +1368,8 @@ int renameat(int olddir_fd, const char *
- #endif /* HAVE_FSTATAT */
-
-
--#if defined(__GLIBC__) && __GLIBC_PREREQ(2,33)
-+#if defined(__GLIBC__)
-+#if __GLIBC_PREREQ(2,33)
- /* Glibc 2.33 exports symbols for these functions in the shared lib */
- int lstat(const char *file_name, struct stat *statbuf) {
- return WRAP_LSTAT LSTAT_ARG(_STAT_VER, file_name, statbuf);
-@@ -1413,6 +1414,7 @@ int renameat(int olddir_fd, const char *
- return WRAP_MKNODAT MKNODAT_ARG(_STAT_VER, dir_fd, pathname, mode, &dev);
- }
- #endif
-+#endif /* __GLIBC__ */
- #endif /* GLIBC_PREREQ */
-
-
---- a/configure.ac
-+++ b/configure.ac
-@@ -182,6 +182,9 @@ AC_MSG_CHECKING([for type of arg of __xm
- #include <fcntl.h>
- #include <unistd.h>
- ]], [[
-+#ifndef __GLIBC__
-+#error no extra *
-+#endif
- int __xmknod ( int ver,
- const char *pathname ,
- mode_t mode , dev_t *dev);
-@@ -208,6 +211,9 @@ AC_MSG_CHECKING([for type of arg of __xm
- #include <fcntl.h>
- #include <unistd.h>
- ]], [[
-+#ifndef __GLIBC__
-+#error no extra *
-+#endif
- int __xmknodat ( int ver,
- int dirfd,
- const char *pathname ,
diff --git a/tools/fakeroot/patches/400-alpine-libc.musl-fix.patch b/tools/fakeroot/patches/400-alpine-libc.musl-fix.patch
index 619b092ca9..c37282af5d 100644
--- a/tools/fakeroot/patches/400-alpine-libc.musl-fix.patch
+++ b/tools/fakeroot/patches/400-alpine-libc.musl-fix.patch
@@ -21,7 +21,7 @@ Error relocating openwrt/staging_dir/host/lib/libfakeroot.so: SEND_GET_XATTR: sy
#define SEND_GET_XATTR64(a,b,c) send_get_xattr64(a,b)
#endif
-@@ -125,8 +127,9 @@
+@@ -131,8 +133,9 @@
/* 10.10 uses id_t in getpriority/setpriority calls, so pretend
id_t is used everywhere, just happens to be int on some OSes */