From 0c336109bbc4668ffb22e7467fb98a6abf161938 Mon Sep 17 00:00:00 2001 From: Leonid Plyushch Date: Mon, 1 Oct 2018 17:25:26 +0300 Subject: [PATCH] new package: fakeroot Uses tcp ipc since SysV ipc is not available on most devices. Requested in: https://github.com/termux/termux-packages/issues/2915 --- packages/fakeroot/build.sh | 8 ++++++++ packages/fakeroot/fakeroot-1.23_faked.c.patch | 12 ++++++++++++ .../fakeroot/fakeroot-1.23_libfakeroot.c.patch | 18 ++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 packages/fakeroot/build.sh create mode 100644 packages/fakeroot/fakeroot-1.23_faked.c.patch create mode 100644 packages/fakeroot/fakeroot-1.23_libfakeroot.c.patch diff --git a/packages/fakeroot/build.sh b/packages/fakeroot/build.sh new file mode 100644 index 000000000..94edcd76c --- /dev/null +++ b/packages/fakeroot/build.sh @@ -0,0 +1,8 @@ +TERMUX_PKG_MAINTAINER="Leonid Plyushch @xeffyr" + +TERMUX_PKG_HOMEPAGE=http://packages.debian.org/fakeroot +TERMUX_PKG_DESCRIPTION="Tool for simulating superuser privileges (with tcp ipc)" +TERMUX_PKG_VERSION=1.23 +TERMUX_PKG_SRCURL=http://ftp.debian.org/debian/pool/main/f/fakeroot/fakeroot_${TERMUX_PKG_VERSION}.orig.tar.xz +TERMUX_PKG_SHA256=009cd6696a931562cf1c212bb57ca441a4a2d45cd32c3190a35c7ae98506f4f6 +TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--with-ipc=tcp" diff --git a/packages/fakeroot/fakeroot-1.23_faked.c.patch b/packages/fakeroot/fakeroot-1.23_faked.c.patch new file mode 100644 index 000000000..c23ad48ac --- /dev/null +++ b/packages/fakeroot/fakeroot-1.23_faked.c.patch @@ -0,0 +1,12 @@ +diff -uNr fakeroot-1.23/faked.c fakeroot-1.23.mod/faked.c +--- fakeroot-1.23/faked.c 2018-07-01 22:01:34.000000000 +0300 ++++ fakeroot-1.23.mod/faked.c 2018-10-01 17:11:53.263620010 +0300 +@@ -1487,7 +1487,7 @@ + /* literally copied from the linux klogd code, go to background */ + if ((pid=fork()) == 0){ + int fl; +- int num_fds = getdtablesize(); ++ int num_fds = sysconf(_SC_OPEN_MAX); + + fflush(stdout); + diff --git a/packages/fakeroot/fakeroot-1.23_libfakeroot.c.patch b/packages/fakeroot/fakeroot-1.23_libfakeroot.c.patch new file mode 100644 index 000000000..c6a927ddd --- /dev/null +++ b/packages/fakeroot/fakeroot-1.23_libfakeroot.c.patch @@ -0,0 +1,18 @@ +diff -uNr fakeroot-1.23/libfakeroot.c fakeroot-1.23.mod/libfakeroot.c +--- fakeroot-1.23/libfakeroot.c 2018-07-01 22:01:34.000000000 +0300 ++++ fakeroot-1.23.mod/libfakeroot.c 2018-10-01 17:09:21.633620119 +0300 +@@ -81,12 +81,14 @@ + #define SEND_STAT64(a,b,c) send_stat64(a,b,c) + #define SEND_GET_STAT(a,b) send_get_stat(a,b) + #define SEND_GET_STAT64(a,b) send_get_stat64(a,b) ++#define SEND_GET_XATTR(a,b,c) send_get_xattr(a,b,c) + #define SEND_GET_XATTR64(a,b,c) send_get_xattr64(a,b,c) + #else + #define SEND_STAT(a,b,c) send_stat(a,b) + #define SEND_STAT64(a,b,c) send_stat64(a,b) + #define SEND_GET_STAT(a,b) send_get_stat(a) + #define SEND_GET_STAT64(a,b) send_get_stat64(a) ++#define SEND_GET_XATTR(a,b,c) send_get_xattr(a,b) + #define SEND_GET_XATTR64(a,b,c) send_get_xattr64(a,b) + #endif +