Initial commit
This commit is contained in:
28
tools/fakeroot/Makefile
Normal file
28
tools/fakeroot/Makefile
Normal file
@@ -0,0 +1,28 @@
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=fakeroot
|
||||
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:=480a578ffdc5592e73df4c086950d321b4adc78dbdaec56c82e4fe1fb68de8e9
|
||||
PKG_LICENSE:=GPL-3.0-or-later
|
||||
PKG_LICENSE_FILES:=COPYING
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
HOST_CONFIGURE_VARS += \
|
||||
ac_cv_header_sys_capability_h=no \
|
||||
ac_cv_func_capset=no \
|
||||
CPP="$(HOSTCC) -E"
|
||||
|
||||
HOST_CONFIGURE_ARGS += \
|
||||
--with-ipc=tcp
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
29
tools/fakeroot/patches/000-relocatable.patch
Normal file
29
tools/fakeroot/patches/000-relocatable.patch
Normal file
@@ -0,0 +1,29 @@
|
||||
--- a/scripts/fakeroot.in
|
||||
+++ b/scripts/fakeroot.in
|
||||
@@ -30,13 +30,20 @@ fatal ()
|
||||
}
|
||||
|
||||
# strip /bin/fakeroot to find install prefix
|
||||
-FAKEROOT_PREFIX=@prefix@
|
||||
-FAKEROOT_BINDIR=@bindir@
|
||||
+if [ -n "$STAGING_DIR_HOST" ]; then
|
||||
+ USEABSLIBPATH=1
|
||||
+ FAKEROOT_LIB=${STAGING_DIR_HOST}/lib/lib@fakeroot_transformed@@DLSUFFIX@
|
||||
+ FAKED=${STAGING_DIR_HOST}/bin/faked
|
||||
+ PATHS=
|
||||
+else
|
||||
+ FAKEROOT_PREFIX=@prefix@
|
||||
+ FAKEROOT_BINDIR=@bindir@
|
||||
|
||||
-USEABSLIBPATH=@LDPRELOADABS@
|
||||
-FAKEROOT_LIB=lib@fakeroot_transformed@@DLSUFFIX@
|
||||
-PATHS=@libdir@:${FAKEROOT_PREFIX}/lib64/libfakeroot:${FAKEROOT_PREFIX}/lib32/libfakeroot
|
||||
-FAKED=${FAKEROOT_BINDIR}/@faked_transformed@
|
||||
+ USEABSLIBPATH=@LDPRELOADABS@
|
||||
+ FAKEROOT_LIB=lib@fakeroot_transformed@@DLSUFFIX@
|
||||
+ PATHS=@libdir@:${FAKEROOT_PREFIX}/lib64/libfakeroot:${FAKEROOT_PREFIX}/lib32/libfakeroot
|
||||
+ FAKED=${FAKEROOT_BINDIR}/@faked_transformed@
|
||||
+fi
|
||||
|
||||
FAKED_MODE="unknown-is-root"
|
||||
export FAKED_MODE
|
||||
11
tools/fakeroot/patches/100-macos_compile_fix.patch
Normal file
11
tools/fakeroot/patches/100-macos_compile_fix.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/libfakeroot_inode64.c
|
||||
+++ b/libfakeroot_inode64.c
|
||||
@@ -36,6 +36,8 @@
|
||||
#include <fts.h>
|
||||
#endif /* HAVE_FTS_H */
|
||||
|
||||
+void load_library_symbols(void);
|
||||
+
|
||||
#include "wrapped.h"
|
||||
#include "wraptmpf.h"
|
||||
#include "wrapdef.h"
|
||||
10
tools/fakeroot/patches/200-disable-doc.patch
Normal file
10
tools/fakeroot/patches/200-disable-doc.patch
Normal file
@@ -0,0 +1,10 @@
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -1,6 +1,6 @@
|
||||
AUTOMAKE_OPTIONS=foreign
|
||||
ACLOCAL_AMFLAGS = -I build-aux
|
||||
-SUBDIRS=doc scripts test
|
||||
+SUBDIRS=scripts test
|
||||
|
||||
noinst_LTLIBRARIES = libcommunicate.la libmacosx.la
|
||||
libcommunicate_la_SOURCES = communicate.c
|
||||
34
tools/fakeroot/patches/400-alpine-libc.musl-fix.patch
Normal file
34
tools/fakeroot/patches/400-alpine-libc.musl-fix.patch
Normal file
@@ -0,0 +1,34 @@
|
||||
Alpine linux libc.musl build error fix
|
||||
|
||||
Prevent build error on Alpine Linux host:
|
||||
libfakeroot.c error: conflicting types for 'id_t'
|
||||
Error relocating openwrt/staging_dir/host/lib/libfakeroot.so: SEND_GET_XATTR: symbol not found
|
||||
|
||||
--- a/libfakeroot.c
|
||||
+++ b/libfakeroot.c
|
||||
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
-#ifndef _ID_T
|
||||
+#if !defined(_ID_T) && !defined(__DEFINED_id_t)
|
||||
#define _ID_T
|
||||
+#define __DEFINED_id_t
|
||||
typedef int id_t;
|
||||
#endif
|
||||
#endif
|
||||
Reference in New Issue
Block a user