diff --git a/0001-glibc-2.33-compatibility-fixes.patch b/0001-glibc-2.33-compatibility-fixes.patch deleted file mode 100644 index 8b786a9..0000000 --- a/0001-glibc-2.33-compatibility-fixes.patch +++ /dev/null @@ -1,250 +0,0 @@ -From f91abea8f685776a29d40382a35301f6980c953b Mon Sep 17 00:00:00 2001 -From: Christophe Giboudeaux -Date: Wed, 17 Mar 2021 15:53:12 +0100 -Subject: [PATCH] glibc 2.33 compatibility fixes - -Source: https://salsa.debian.org/clint/fakeroot/-/merge_requests/10 ---- - configure.ac | 17 +++++------ - libfakeroot.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++++-- - wrapawk_macosx | 10 +++++-- - wrapfunc.inp | 4 +-- - 4 files changed, 94 insertions(+), 15 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 73415d2..35f9ecf 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -146,6 +146,7 @@ for first in size_t int; do - #include - #endif - #include -+#include - #ifdef HAVE_GRP_H - #include - #endif -@@ -183,13 +184,13 @@ AC_MSG_CHECKING([for type of arg of __xmknod]) - ]], [[ - 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 *]) - - ]) - -@@ -210,13 +211,13 @@ AC_MSG_CHECKING([for type of arg of __xmknodat]) - 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/libfakeroot.c b/libfakeroot.c -index 7f13286..c7014aa 100644 ---- 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. -@@ -112,8 +122,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 - #include - #include - #include -@@ -125,7 +143,6 @@ - #include - #include - #include --#include - #ifdef HAVE_SYS_ACL_H - #include - #endif /* HAVE_SYS_ACL_H */ -@@ -188,6 +205,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 -@@ -1342,6 +1368,54 @@ int renameat(int olddir_fd, const char *oldpath, - #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) - { -@@ -1911,7 +1985,7 @@ ssize_t fremovexattr(int fd, const char *name) - } - #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); -diff --git a/wrapawk_macosx b/wrapawk_macosx -index 088a7f4..f783219 100644 ---- 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; -diff --git a/wrapfunc.inp b/wrapfunc.inp -index f7ad186..556af34 100644 ---- 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 *path, uid_t owner, gid_t group, int flags) - 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) --- -2.30.2 - diff --git a/also-wrap-stat-library-call.patch b/also-wrap-stat-library-call.patch new file mode 100644 index 0000000..ac42d90 --- /dev/null +++ b/also-wrap-stat-library-call.patch @@ -0,0 +1,63 @@ +Subject: Also wrap the "stat" library call +Author: Christoph Biedl +Date: 2021-12-20 +Bug-Debian: https://bugs.debian.org/1001961 +Forwarded: Yes + + Seems changes in glibc 2.33 caused the stat() function to be mapped + into a stat() library call instead of __xstat() as it used to be. + + However, fakeroot does not wrap this, causing files to be reported + with the real owner, not 0 as expected. + + The fix for this got a bit ugly as the abstraction in configure.ac + would not allow wrapping both "stat" and "__xstat". So enhance the + search list capabilities with an optional symbol how the wrapped + function is named internally. Also hack the parser so "stat" gets + actually probed and not mistaken for __xstat. + + Using "realstat" as a symbol is not the best choice as it might be + confusing, but "statstat" seemed even worse. + +--- a/configure.ac ++++ b/configure.ac +@@ -353,9 +353,13 @@ + + :>fakerootconfig.h.tmp + +-for SEARCH in %stat f%stat l%stat f%statat %stat64 f%stat64 l%stat64 f%statat64 %mknod %mknodat; do +- FUNC=`echo $SEARCH|sed -e 's/.*%//'` ++for SEARCH in %stat s%tat@realstat f%stat l%stat f%statat %stat64 f%stat64 l%stat64 f%statat64 %mknod %mknodat; do ++ FUNC=`echo $SEARCH|sed -e 's/.*%// ; s/@.*//'` + PRE=`echo $SEARCH|sed -e 's/%.*//'` ++ SYMBOL=`echo $SEARCH|sed -e 's/.*@//'` ++ if test "$SYMBOL" = "$SEARCH" ; then ++ SYMBOL="${PRE}${FUNC}" ++ fi + FOUND= + for WRAPPED in __${PRE}x${FUNC} _${PRE}x${FUNC} __${PRE}${FUNC}13 ${PRE}${FUNC}; do + AC_CHECK_FUNCS($WRAPPED,FOUND=$WRAPPED) +@@ -366,8 +370,8 @@ + dnl for WRAPPED in _${PRE}${FUNC}; do + dnl FOUND=$WRAPPED + if test -n "$FOUND"; then +- PF=[`echo ${PRE}${FUNC}| tr '[a-z]' '[A-Z]'`] +- DEFINE_WRAP=[`echo wrap_${PRE}${FUNC}| tr '[a-z]' '[A-Z]'`] ++ PF=[`echo $SYMBOL | tr '[a-z]' '[A-Z]'`] ++ DEFINE_WRAP=[`echo wrap_${SYMBOL}| tr '[a-z]' '[A-Z]'`] + DEFINE_NEXT=[`echo wrap_${FOUND}| tr '[a-z]' '[A-Z]'`] + DEFINE_ARG=[`echo wrap_${FOUND}| tr '[a-z]' '[A-Z]'`] + AC_DEFINE_UNQUOTED(WRAP_${PF}, $FOUND) +@@ -509,6 +513,12 @@ + #define TMP_STAT __astat + #define NEXT_STAT_NOARG next___astat + ++#define WRAP_REALSTAT __astat ++#define WRAP_REALSTAT_QUOTE __astat ++#define WRAP_REALSTAT_RAW __astat ++#define TMP_REALSTAT __astat ++#define NEXT_REALSTAT_NOARG next___astat ++ + #define WRAP_LSTAT_QUOTE __astat + #define WRAP_LSTAT __astat + #define WRAP_LSTAT_RAW __astat diff --git a/fakeroot-1.20-eglibc-fts-without-LFS.patch b/fakeroot-1.20-eglibc-fts-without-LFS.patch deleted file mode 100644 index e118c35..0000000 --- a/fakeroot-1.20-eglibc-fts-without-LFS.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Adam Mizerski -Date: 2013-10-26 18:45:32 +0200 -Subject: eglibc-fts-without-LFS -Upstream: no - -Patch copied from debian. - ---- a/libfakeroot.c -+++ b/libfakeroot.c -@@ -1949,11 +1949,7 @@ - || 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; -@@ -1972,11 +1968,7 @@ - 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 - } - } - diff --git a/fakeroot-1.20-lib32.patch b/fakeroot-1.20-lib32.patch deleted file mode 100644 index 55aa063..0000000 --- a/fakeroot-1.20-lib32.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- fakeroot-1.25.3/scripts/fakeroot.in.orig 2020-10-30 11:40:54.365410673 +0100 -+++ fakeroot-1.25.3/scripts/fakeroot.in 2020-10-30 11:40:59.913425822 +0100 -@@ -35,7 +35,7 @@ - - USEABSLIBPATH=@LDPRELOADABS@ - FAKEROOT_LIB=lib@fakeroot_transformed@@DLSUFFIX@ --PATHS=@libdir@:${FAKEROOT_PREFIX}/lib64/libfakeroot:${FAKEROOT_PREFIX}/lib32/libfakeroot -+PATHS=@libdir@:${FAKEROOT_PREFIX}/lib64/libfakeroot:${FAKEROOT_PREFIX}/lib/libfakeroot - FAKED=${FAKEROOT_BINDIR}/@faked_transformed@ - - FAKED_MODE="unknown-is-root" diff --git a/fakeroot-1.25.3.tar.gz b/fakeroot-1.25.3.tar.gz deleted file mode 100644 index fc84736..0000000 --- a/fakeroot-1.25.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8e903683357f7f5bcc31b879fd743391ad47691d4be33d24a76be3b6c21e956c -size 126884 diff --git a/fakeroot-drop-tartest.patch b/fakeroot-drop-tartest.patch deleted file mode 100644 index 7f3c355..0000000 --- a/fakeroot-drop-tartest.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: fakeroot-1.24/test/Makefile.am -=================================================================== ---- fakeroot-1.24.orig/test/Makefile.am -+++ fakeroot-1.24/test/Makefile.am -@@ -9,7 +9,6 @@ TESTS = \ - t.no_ld_preload \ - t.no_ld_preload_link \ - t.option \ -- t.tar \ - t.touchinstall \ - t.truereturn \ - t.xattr diff --git a/fakeroot.changes b/fakeroot.changes index 12c89cf..a6479fc 100644 --- a/fakeroot.changes +++ b/fakeroot.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Fri Mar 25 18:03:42 UTC 2022 - Sarah Kriesch + +- Update to 1.28 + * Revert commit "Use fixed-width members in fake_msg" + * Annotate sharutils dependency . (Closes: #982188) + * Wrap the "stat" library call. Closes: #1001961 + * Work around segfault on ppc64el. Closes: #995393 + * Includes patch from lemonsqueeze to improve fakeroot-tcp + performance by setting TCP_NODELAY. closes: #1003596. + * Includes patch from Samuel Thibault to handle _STAT_VER on + GNU/Hurd. closes: #1006151. + * autoconf 2.71 required + * Add also-wrap-stat-library-call.patch (deb#1001961) + * Remove fakeroot-1.20-eglibc-fts-without-LFS.patch + * Remove fakeroot-drop-tartest.patch + * Remove 0001-glibc-2.33-compatibility-fixes.patch + * Remove fakeroot-1.20-lib32.patch + * Remove stat-ver-riscv.patch + ------------------------------------------------------------------- Sun May 16 21:18:43 UTC 2021 - Andreas Schwab diff --git a/fakeroot.spec b/fakeroot.spec index 227aa59..4442565 100644 --- a/fakeroot.spec +++ b/fakeroot.spec @@ -1,7 +1,7 @@ # # spec file for package fakeroot # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,25 +17,23 @@ Name: fakeroot -Version: 1.25.3 +Version: 1.28 Release: 0 Summary: Wrapper that gives a fake root environment License: GPL-3.0-or-later Group: Development/Tools/Other URL: http://fakeroot.alioth.debian.org/ -Source0: http://ftp.debian.org/debian/pool/main/f/fakeroot/%{name}_%{version}.orig.tar.gz#/%{name}-%{version}.tar.gz +Source0: http://ftp.debian.org/debian/pool/main/f/fakeroot/%{name}_%{version}.orig.tar.gz#/%{name}_%{version}.orig.tar.gz Source99: baselibs.conf -Patch0: %{name}-1.20-lib32.patch -Patch1: %{name}-1.20-eglibc-fts-without-LFS.patch # PATCH-FIX-UPSTREAM fakeroot-1.21-fix-shell-in-fakeroot.patch (deb#828810) -Patch2: %{name}-1.21-fix-shell-in-fakeroot -Patch3: fakeroot-drop-tartest.patch -# PATCH-FIX-UPSTREAM -Patch4: 0001-glibc-2.33-compatibility-fixes.patch -Patch5: stat-ver-riscv.patch +Patch0: fakeroot-1.21-fix-shell-in-fakeroot +#PATCH-FIX-UPSTREAM also-wrap-stat-library-call.patch (deb#1001961) +Patch1: also-wrap-stat-library-call.patch BuildRequires: automake BuildRequires: fdupes # user(daemon)/group(sys) is required for t.tar testsuite +BuildRequires: intltool +BuildRequires: autoconf BuildRequires: libacl-devel BuildRequires: libcap-devel BuildRequires: libcap-progs @@ -58,7 +56,7 @@ had the user really been root. %autosetup -p1 %build -autoreconf -fi +./bootstrap pushd doc po4a -k 0 --rm-backups --variable "srcdir=../doc/" po4a/po4a.cfg popd diff --git a/fakeroot_1.28.orig.tar.gz b/fakeroot_1.28.orig.tar.gz new file mode 100644 index 0000000..37e5f46 --- /dev/null +++ b/fakeroot_1.28.orig.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:56d405e36ff685f83879be08fdd654255ab9aa38632b4605a98e896ad63990c2 +size 546234 diff --git a/stat-ver-riscv.patch b/stat-ver-riscv.patch deleted file mode 100644 index 5dbcfbc..0000000 --- a/stat-ver-riscv.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: fakeroot-1.25.3/libfakeroot.c -=================================================================== ---- fakeroot-1.25.3.orig/libfakeroot.c -+++ fakeroot-1.25.3/libfakeroot.c -@@ -91,7 +91,7 @@ - #endif - - #ifndef _STAT_VER -- #if defined (__aarch64__) -+ #if defined (__aarch64__) || defined (__riscv) - #define _STAT_VER 0 - #elif defined (__x86_64__) - #define _STAT_VER 1