diff options
Diffstat (limited to 'system/fakeroot')
-rw-r--r-- | system/fakeroot/APKBUILD | 23 | ||||
-rw-r--r-- | system/fakeroot/fakeroot-hide-dlsym-errors.patch | 20 | ||||
-rw-r--r-- | system/fakeroot/fakeroot-no-ldlibrarypath.patch | 80 | ||||
-rw-r--r-- | system/fakeroot/fix-prototype-generation.patch | 59 |
4 files changed, 71 insertions, 111 deletions
diff --git a/system/fakeroot/APKBUILD b/system/fakeroot/APKBUILD index b0b3bc585..2cb86273f 100644 --- a/system/fakeroot/APKBUILD +++ b/system/fakeroot/APKBUILD @@ -1,8 +1,8 @@ -# Maintainer: +# Maintainer: Zach van Rijn <me@zv.io> pkgname=fakeroot -pkgver=1.23 +pkgver=1.28 pkgrel=0 -pkgdesc="Utility to provide a 'fake' root environment as a non-privileged user" +pkgdesc="Tool for simulating superuser privileges" arch="all" license="GPL-3.0+" url="https://wiki.debian.org/FakeRoot" @@ -12,18 +12,20 @@ makedepends_host="libcap-dev acl-dev linux-headers" makedepends="$makedepends_build $makedepends_host" checkdepends="bash sharutils" subpackages="$pkgname-doc" -source="http://ftp.debian.org/debian/pool/main/f/$pkgname/${pkgname}_${pkgver}.orig.tar.xz - fakeroot-hide-dlsym-errors.patch +# find timestamp here: https://snapshot.debian.org/package/fakeroot/ +source="https://snapshot.debian.org/archive/debian/20220304T204941Z/pool/main/f/$pkgname/${pkgname}_${pkgver}.orig.tar.gz fakeroot-no64.patch fakeroot-stdint.patch - fakeroot-no-ldlibrarypath.patch xstatjunk.patch + + fix-prototype-generation.patch " build() { # musl does not have _STAT_VER, it's really not used for # anything, so define it as zero - export CFLAGS="-D_STAT_VER=0 $CFLAGS" + # define _ID_T so libfakeroot knows headers define it + export CFLAGS="-D_STAT_VER=0 -D_ID_T $CFLAGS" ./bootstrap ./configure \ @@ -45,9 +47,8 @@ package() { make DESTDIR="$pkgdir" install } -sha512sums="0984679207e6e340abf715d4b26a213f85420cd8c58f21e65eb069337a3bd67436c6f80168412c10b28701689ec63290f122a5ff5d44a57b2b166aa72799d036 fakeroot_1.23.orig.tar.xz -666f41d6adc5e65eba419e08d5bbc4f561e40b0fc7bfa82090eb87962a7f3193bf319754e04aca289e865c66df2ecced1dbb45c9aa9f093657f22193dda25354 fakeroot-hide-dlsym-errors.patch +sha512sums="cd55007014da5741ff336d005a80633a2f1ed856e075162acb9a4a1edd5c6d17ec74457c8a1e31edb02ae70920904c53e69365d55bd9beb7e8c6211aa8cfca8b fakeroot_1.28.orig.tar.gz 7a832e6bed3838c7c488e0e12ba84b8d256e84bbb06d6020247452a991de505fa5c6bd7bcb84dce8753eb242e0fcab863b5461301cd56695f2b003fe8d6ff209 fakeroot-no64.patch ed7a58b0d201139545420f9e5429f503c00e00f36dea84473e77ea99b23bb8d421da1a8a8ce98ff90e72e378dff4cb9ea3c1a863a969899a5f50dfac3b9c5fac fakeroot-stdint.patch -acfc1e5efce132279adddf9e11c28d65602059d5cd723ad98b67cb9183e1de68445f3bba7ac54ee60265b85f25141fcc9b2156f551aa5c624a92631320f5b743 fakeroot-no-ldlibrarypath.patch -5efd33fd778bd94a529ed7e439fb8fea25ff865dda3f6f9e431264e942b37f3b5d7a0ad14107b55c5fa81b86efd5a82aedb3803cfab08ec57f27f5b229d2fe88 xstatjunk.patch" +5efd33fd778bd94a529ed7e439fb8fea25ff865dda3f6f9e431264e942b37f3b5d7a0ad14107b55c5fa81b86efd5a82aedb3803cfab08ec57f27f5b229d2fe88 xstatjunk.patch +63db66b0d883495151f817c4e57bdaaff992667416f2f5b03c9b66b65f1fba1762f709dd5153717aa4008d7be0fbc58bf1f41eb2b35dc61047b0cc0b762e145b fix-prototype-generation.patch" diff --git a/system/fakeroot/fakeroot-hide-dlsym-errors.patch b/system/fakeroot/fakeroot-hide-dlsym-errors.patch deleted file mode 100644 index aeeb347da..000000000 --- a/system/fakeroot/fakeroot-hide-dlsym-errors.patch +++ /dev/null @@ -1,20 +0,0 @@ -it's normal that the acl_* symbols are not found if the application -is not linked against -lacl. these errors harmless, but mighty -annoying. - ---- fakeroot-1.20/libfakeroot.c.orig 2014-03-07 11:20:26.120532847 +0200 -+++ fakeroot-1.20/libfakeroot.c 2014-03-07 11:21:26.486872482 +0200 -@@ -258,10 +258,12 @@ - /* clear dlerror() just in case dlsym() legitimately returns NULL */ - msg = dlerror(); - *(next_wrap[i].doit)=dlsym(get_libc(), next_wrap[i].name); -- if ( (msg = dlerror()) != NULL){ -+#ifdef LIBFAKEROOT_DEBUGGING -+ if ( fakeroot_debug && (msg = dlerror()) != NULL) { - fprintf (stderr, "dlsym(%s): %s\n", next_wrap[i].name, msg); - /* abort ();*/ - } -+#endif - } - } - diff --git a/system/fakeroot/fakeroot-no-ldlibrarypath.patch b/system/fakeroot/fakeroot-no-ldlibrarypath.patch deleted file mode 100644 index e7b9a037d..000000000 --- a/system/fakeroot/fakeroot-no-ldlibrarypath.patch +++ /dev/null @@ -1,80 +0,0 @@ -diff -ru fakeroot-1.20.2.orig/scripts/fakeroot.in fakeroot-1.20.2/scripts/fakeroot.in ---- fakeroot-1.20.2.orig/scripts/fakeroot.in 2015-11-12 10:51:23.241681379 +0200 -+++ fakeroot-1.20.2/scripts/fakeroot.in 2015-11-12 10:56:53.331985288 +0200 -@@ -34,8 +34,7 @@ - FAKEROOT_BINDIR=@bindir@ - - USEABSLIBPATH=@LDPRELOADABS@ --LIB=lib@fakeroot_transformed@@DLSUFFIX@ --PATHS=@libdir@:${FAKEROOT_PREFIX}/lib64/libfakeroot:${FAKEROOT_PREFIX}/lib32/libfakeroot -+LIB=@libdir@/lib@fakeroot_transformed@@DLSUFFIX@ - FAKED=${FAKEROOT_BINDIR}/@faked_transformed@ - - FAKED_MODE="unknown-is-root" -@@ -68,7 +67,6 @@ - -l|--lib) - shift - LIB=`eval echo "$1"` -- PATHS= - ;; - -f|--faked) - shift -@@ -111,23 +109,11 @@ - - # make sure the preload is available - ABSLIB="" --if [ -n "$PATHS" ] --then -- for dir in `echo $PATHS | sed 's/:/ /g'` -- do -- if test -r "$dir/$LIB" -- then -- libfound=yes -- ABSLIB="$dir/$LIB" -- fi -- done --else - if test -r "$LIB" - then - libfound=yes - ABSLIB="$LIB" - fi --fi - - if test $libfound = no - then -@@ -148,7 +134,7 @@ - if [ "$WAITINTRAP" -eq 0 ]; then - trap "kill -s @signal@ $PID" EXIT INT - else -- @MACOSX_FALSE@trap 'FAKEROOTKEY=$FAKEROOTKEY @LDLIBPATHVAR@="$PATHS" @LDPRELOADVAR@="$LIB" /bin/ls -l / >/dev/null 2>&1; while kill -s @signal@ $PID 2>/dev/null; do sleep 0.1; done' EXIT INT -+ @MACOSX_FALSE@trap 'FAKEROOTKEY=$FAKEROOTKEY @LDPRELOADVAR@="$LIB" /bin/ls -l / >/dev/null 2>&1; while kill -s @signal@ $PID 2>/dev/null; do sleep 0.1; done' EXIT INT - @MACOSX_TRUE@trap 'FAKEROOTKEY=$FAKEROOTKEY @LDPRELOADVAR@="$LIB" /bin/ls -l / >/dev/null 2>&1; while kill -s @signal@ $PID 2>/dev/null; do sleep 0.1; done' EXIT INT - fi - -@@ -159,10 +145,6 @@ - if test $USEABSLIBPATH -ne 0 ; then - LIB=$ABSLIB - fi --# Keep other library paths --if test -n "$@LDLIBPATHVAR@"; then -- PATHS="$PATHS:$@LDLIBPATHVAR@" --fi - # ...and preloaded libs - if test -n "$@LDPRELOADVAR@"; then - LIB="$LIB:$@LDPRELOADVAR@" -@@ -171,11 +153,11 @@ - export FAKEROOT_FD_BASE - - if test -z "$*"; then -- @MACOSX_FALSE@FAKEROOTKEY=$FAKEROOTKEY @LDLIBPATHVAR@="$PATHS" @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" ${SHELL:-/bin/sh} -+ @MACOSX_FALSE@FAKEROOTKEY=$FAKEROOTKEY @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" ${SHELL:-/bin/sh} - @MACOSX_TRUE@FAKEROOTKEY=$FAKEROOTKEY @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" ${SHELL:-/bin/sh} - RESULT=$? - else -- @MACOSX_FALSE@FAKEROOTKEY=$FAKEROOTKEY @LDLIBPATHVAR@="$PATHS" @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" "$@" -+ @MACOSX_FALSE@FAKEROOTKEY=$FAKEROOTKEY @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" "$@" - @MACOSX_TRUE@FAKEROOTKEY=$FAKEROOTKEY @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" "$@" - RESULT=$? - fi - diff --git a/system/fakeroot/fix-prototype-generation.patch b/system/fakeroot/fix-prototype-generation.patch new file mode 100644 index 000000000..38d32ff3b --- /dev/null +++ b/system/fakeroot/fix-prototype-generation.patch @@ -0,0 +1,59 @@ +Subject: Fix prototype generation for openat +Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de> +Date: 2021-12-30 +Bug-Debian: https://bugs.debian.org/995393 +Forwarded: Yes (implicitely) + + As jrtc27 pointed out in IRC, ppc64el is more strict than other + architectures when it comes to va_arg handling: + + it's that ppc64le uses the elfv2 abi, and for variadic calls you + must reserve space for a parameter save area + + So enhance wrapawk to create a proper prototype and argument + handling although it's specific to the openat call. Also add the + missing documentation for the sixth column to wrapfunc.inp. + +--- a/wrapawk ++++ b/wrapawk +@@ -37,7 +37,25 @@ + argtype=$3; + argname=$4; + MACRO=$5; +- if(MACRO){ ++ openat_extra=$6; ++ if(openat_extra){ ++ print " {(void(*))&next_" name ", \"" name "\"}," > structfile; ++ print "extern " ret " (*next_" name ")" openat_extra ";" > headerfile; ++ print ret " (*next_" name ")" openat_extra "=tmp_" name ";"> deffile; ++ ++ print ret " tmp_" name, openat_extra "{" > tmpffile; ++ print " mode_t mode = 0;" > tmpffile; ++ print " if (flags & O_CREAT) {" > tmpffile; ++ print " va_list args;" > tmpffile; ++ print " va_start(args, flags);" > tmpffile; ++ print " mode = va_arg(args, int);" > tmpffile; ++ print " va_end(args);" > tmpffile; ++ print " }" > tmpffile; ++ print " load_library_symbols();" > tmpffile; ++ print " return next_" name, argname ";" > tmpffile; ++ print "}" > tmpffile; ++ print "" > tmpffile; ++ } else if(MACRO){ + print " {(void(*))&NEXT_" MACRO "_NOARG, " name "_QUOTE}," > structfile; + print "extern " ret " (*NEXT_" MACRO "_NOARG)" argtype ";" > headerfile; + print ret " (*NEXT_" MACRO "_NOARG)" argtype "=TMP_" MACRO ";"> deffile; +--- a/wrapfunc.inp ++++ b/wrapfunc.inp +@@ -9,8 +9,10 @@ + /**/ */ + /* each line of this file lists 4 fields, seperated by a ";". */ + /* The first field is the name of the wrapped function, then it's return */ +-/* value. After that come the function arguments with types, and the last */ ++/* value. After that come the function arguments with types, and the fifth */ + /* field contains the function arguments without types. */ ++/* A sixth field is a special needed when wrapping the openat syscall. */ ++/* Otherwise it's like the third (function arguments with types). */ + /**/ + + /* __*xstat are used on glibc systems instead of just *xstat. */ |