From 741b0601de60fdd53dd1bb97d5d6c96f79d306ce Mon Sep 17 00:00:00 2001 From: Piraty Date: Wed, 10 Feb 2021 08:39:31 +0100 Subject: [PATCH] fakeroot: update to 1.25.3. --- .../busybox_compat_force_abslibpath.patch | 14 ---- .../cross-dont-run-sysv-ipc-test.patch | 72 +++++++++++++++++++ .../patches/fakeroot-hide-dlsym-errors.patch | 20 ------ srcpkgs/fakeroot/template | 41 ++++++++--- 4 files changed, 103 insertions(+), 44 deletions(-) delete mode 100644 srcpkgs/fakeroot/patches/busybox_compat_force_abslibpath.patch create mode 100644 srcpkgs/fakeroot/patches/cross-dont-run-sysv-ipc-test.patch delete mode 100644 srcpkgs/fakeroot/patches/fakeroot-hide-dlsym-errors.patch diff --git a/srcpkgs/fakeroot/patches/busybox_compat_force_abslibpath.patch b/srcpkgs/fakeroot/patches/busybox_compat_force_abslibpath.patch deleted file mode 100644 index 2bd1b4129bd..00000000000 --- a/srcpkgs/fakeroot/patches/busybox_compat_force_abslibpath.patch +++ /dev/null @@ -1,14 +0,0 @@ -- Always force absolute path for LD_PRELOAD. -- Make getopt test work with busybox implementation. - ---- scripts/fakeroot.in.orig 2011-12-01 05:00:36.000000000 +0100 -+++ scripts/fakeroot.in 2012-02-01 16:04:04.707499043 +0100 -@@ -33,7 +33,7 @@ fatal () - FAKEROOT_PREFIX=@prefix@ - FAKEROOT_BINDIR=@bindir@ - --USEABSLIBPATH=@LDPRELOADABS@ -+USEABSLIBPATH=1 - LIB=lib@fakeroot_transformed@@DLSUFFIX@ - PATHS=@libdir@:${FAKEROOT_PREFIX}/lib64/libfakeroot:${FAKEROOT_PREFIX}/lib32/libfakeroot - FAKED=${FAKEROOT_BINDIR}/@faked_transformed@ diff --git a/srcpkgs/fakeroot/patches/cross-dont-run-sysv-ipc-test.patch b/srcpkgs/fakeroot/patches/cross-dont-run-sysv-ipc-test.patch new file mode 100644 index 00000000000..d878145e5fd --- /dev/null +++ b/srcpkgs/fakeroot/patches/cross-dont-run-sysv-ipc-test.patch @@ -0,0 +1,72 @@ +Revert "Select TCP when lack of SYSV IPC" + +This reverts commit 19d204548d4f141fcc8a5e494eea84282b17f4a2. + +From 19d204548d4f141fcc8a5e494eea84282b17f4a2 Mon Sep 17 00:00:00 2001 +From: Matt Weber +Date: Mon, 16 Sep 2019 22:00:29 -0500 +Subject: [PATCH] Select TCP when lack of SYSV IPC + +Update to add a configure test to build and install the TCP IPC version +when detecting SYSV IPC MsgQ support isn't available. + +The issue was initially discovered on Windows Services for Linux +(WSL1.0). WSL does have some SysV IPC, but no message Q's, which is +required by fakeroot/faked by default. + +Fixes: +https://github.com/Microsoft/WSL/issues/2465 + +Additional bug reports: +https://bugs.busybox.net/show_bug.cgi?id=11366 + +Signed-off-by: Jean-Francois Doyon +Signed-off-by: Matthew Weber + +diff --git a/configure.ac b/configure.ac +index 73415d2..ddde5c9 100644 +--- configure.ac ++++ configure.ac +@@ -25,42 +25,6 @@ AC_CACHE_CHECK([which IPC method to use], + [ac_cv_use_ipc], + [ac_cv_use_ipc=sysv]) + +-if test $ac_cv_use_ipc = "sysv"; then +- AC_MSG_CHECKING([whether SysV IPC message queues are actually working on the host]) +- +- AC_LANG_PUSH(C) +- AC_TRY_RUN([ +-#include +-#include +-#include +-#include +-#include +-#include +- +-int main() { +- +- srandom(time(NULL)+getpid()*33151); +- key_t msg_key = random(); +- int msg_get = msgget(msg_key, IPC_CREAT|0600); +- +- if (msg_get==-1) { +- return 1; +- } else { +- msgctl(msg_get, IPC_RMID, NULL); +- return 0; +- } +- +-}], [ac_cv_use_ipc=sysv], [ac_cv_use_ipc=tcp]) +- +- if test $ac_cv_use_ipc = "tcp"; then +- AC_MSG_RESULT([No, using TCP]) +- else +- AC_MSG_RESULT([Yes]) +- fi +- +- AC_LANG_POP(C) +-fi +- + AC_ARG_WITH([dbformat], + AS_HELP_STRING([--with-dbformat@<:@=DBFORMAT@:>@], + [database format to use: either inode (default) or path]), diff --git a/srcpkgs/fakeroot/patches/fakeroot-hide-dlsym-errors.patch b/srcpkgs/fakeroot/patches/fakeroot-hide-dlsym-errors.patch deleted file mode 100644 index 71c2d214e68..00000000000 --- a/srcpkgs/fakeroot/patches/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. - ---- libfakeroot.c.orig 2014-03-07 11:20:26.120532847 +0200 -+++ 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/srcpkgs/fakeroot/template b/srcpkgs/fakeroot/template index 053cbc1babf..b1ea59cac18 100644 --- a/srcpkgs/fakeroot/template +++ b/srcpkgs/fakeroot/template @@ -1,30 +1,51 @@ # Template file for 'fakeroot' pkgname=fakeroot -version=1.24 +version=1.25.3 revision=1 build_style=gnu-configure configure_args="--disable-static" hostmakedepends="automake libtool" makedepends="acl-devel libcap-devel" +#checkdepends="sharutils" short_desc="Gives a fake root environment" -maintainer="Orphaned " +maintainer="Piraty " license="GPL-3.0-or-later" homepage="http://packages.debian.org/fakeroot" distfiles="${DEBIAN_SITE}/main/f/fakeroot/${pkgname}_${version}.orig.tar.gz" -checksum=2e045b3160370b8ab4d44d1f8d267e5d1d555f1bb522d650e7167b09477266ed +checksum=8e903683357f7f5bcc31b879fd743391ad47691d4be33d24a76be3b6c21e956c lib32disabled=yes -case "$XBPS_TARGET_MACHINE" in - *-musl) CFLAGS="-D_STAT_VER=0" ;; -esac +if [ "$XBPS_TARGET_LIBC" = "musl" ]; then + CFLAGS="-D_STAT_VER=0" +fi + +post_patch() { + # always force absolute path for LD_PRELOAD + vsed -i scripts/fakeroot.in -e 's/@LDPRELOADABS@/1/' + + # don't build translated manpages + vsed -i doc/Makefile.am -e '/SUBDIRS/d' + + # disable failing tests + # + # depends on chown which dosn't work in chroot + vsed -i test/Makefile.am -e '/ t\.tar/d' + if [ "$XBPS_TARGET_LIBC" = "musl" ]; then + #mknod: Operation not permitted + vsed -i test/Makefile.am \ + -e '/ t\.chmod_dev/d' \ + -e '/ t\.mknod/d' + #ls doesn't report owner as root + vsed -i test/Makefile.am \ + -e '/ t\.touchinstall/d' + fi +} pre_configure() { - sed -i /SUBDIRS/d doc/Makefile.am sh ./bootstrap } -post_install() { - # Use /bin/sh shebang. - sed -i -e "s|^#!/bin/bash$|#!/bin/sh|" ${DESTDIR}/usr/bin/fakeroot +pre_check() { + export VERBOSE=x }