Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
32
tools/fakeroot/Makefile
Normal file
32
tools/fakeroot/Makefile
Normal file
@@ -0,0 +1,32 @@
|
||||
#
|
||||
# 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.36
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
|
||||
PKG_SOURCE_URL:=@DEBIAN/pool/main/f/fakeroot
|
||||
PKG_HASH:=7fe3cf3daf95ee93b47e568e85f4d341a1f9ae91766b4f9a9cdc29737dea4988
|
||||
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
|
||||
|
||||
define Host/Uninstall
|
||||
-$(call Host/Compile/Default,uninstall)
|
||||
endef
|
||||
|
||||
$(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
|
||||
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 libfakeroot_time64.la
|
||||
libcommunicate_la_SOURCES = communicate.c
|
||||
11
tools/fakeroot/patches/300-time64-hack.patch
Normal file
11
tools/fakeroot/patches/300-time64-hack.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -390,7 +390,7 @@ dnl Digital Unix: stat
|
||||
time64_hack=no
|
||||
AH_TEMPLATE([TIME64_HACK], [time64 shuffle])
|
||||
AC_MSG_CHECKING([if we need to cope with time64])
|
||||
-AC_EGREP_CPP([time64],[
|
||||
+AC_EGREP_CPP([_*[a-z0-9]+_time64[^_]],[
|
||||
#include <bits/wordsize.h>
|
||||
#if __WORDSIZE == 32
|
||||
#define __USE_TIME_BITS64 1
|
||||
23
tools/fakeroot/patches/400-alpine-libc.musl-fix.patch
Normal file
23
tools/fakeroot/patches/400-alpine-libc.musl-fix.patch
Normal file
@@ -0,0 +1,23 @@
|
||||
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
|
||||
@@ -86,12 +86,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
|
||||
|
||||
56
tools/fakeroot/patches/600-macOS.patch
Normal file
56
tools/fakeroot/patches/600-macOS.patch
Normal file
@@ -0,0 +1,56 @@
|
||||
--- a/communicate.c
|
||||
+++ b/communicate.c
|
||||
@@ -441,6 +441,10 @@ void semaphore_down(){
|
||||
|
||||
#else /* FAKEROOT_FAKENET */
|
||||
|
||||
+#ifndef SOL_TCP
|
||||
+# define SOL_TCP 6 /* this should probably be done with getprotoent */
|
||||
+#endif
|
||||
+
|
||||
static struct sockaddr *get_addr(void)
|
||||
{
|
||||
static struct sockaddr_in addr = { 0, 0, { 0 } };
|
||||
--- a/libfakeroot_inode64.c
|
||||
+++ b/libfakeroot_inode64.c
|
||||
@@ -25,7 +25,7 @@
|
||||
#include "config.h"
|
||||
#include "communicate.h"
|
||||
|
||||
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
|
||||
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 && !__DARWIN_ONLY_64_BIT_INO_T
|
||||
|
||||
#include <stdio.h>
|
||||
#include <spawn.h>
|
||||
--- a/wrapfunc.inp
|
||||
+++ b/wrapfunc.inp
|
||||
@@ -51,9 +51,11 @@ getattrlist$UNIX2003;int;(const char *pa
|
||||
#endif
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
|
||||
#include <spawn.h>
|
||||
+#if !__DARWIN_ONLY_64_BIT_INO_T
|
||||
lstat$INODE64;int;(const char *file_name, struct stat *buf);(file_name, buf)
|
||||
stat$INODE64;int;(const char *file_name, struct stat *buf);(file_name, buf)
|
||||
fstat$INODE64;int;(int fd, struct stat *buf);(fd, buf)
|
||||
+#endif
|
||||
posix_spawn;int;(pid_t * __restrict pid, const char * __restrict path, const posix_spawn_file_actions_t *file_actions, const posix_spawnattr_t * __restrict attrp, char *const argv[ __restrict], char *const envp[ __restrict]);(pid, path, file_actions, attrp, argv, envp)
|
||||
posix_spawnp;int;(pid_t * __restrict pid, const char * __restrict path, const posix_spawn_file_actions_t *file_actions, const posix_spawnattr_t * __restrict attrp, char *const argv[ __restrict], char *const envp[ __restrict]);(pid, path, file_actions, attrp, argv, envp)
|
||||
#endif
|
||||
@@ -235,7 +237,7 @@ facl;int;(int fd, int cmd, int cnt, void
|
||||
#ifdef HAVE_FTS_READ
|
||||
fts_read;FTSENT *;(FTS *ftsp);(ftsp)
|
||||
#ifdef __APPLE__
|
||||
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
|
||||
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 && !__DARWIN_ONLY_64_BIT_INO_T
|
||||
fts_read$INODE64;FTSENT *;(FTS *ftsp);(ftsp)
|
||||
#endif
|
||||
#endif /* ifdef __APPLE__ */
|
||||
@@ -243,7 +245,7 @@ fts_read$INODE64;FTSENT *;(FTS *ftsp);(f
|
||||
#ifdef HAVE_FTS_CHILDREN
|
||||
fts_children;FTSENT *;(FTS *ftsp, int options);(ftsp, options)
|
||||
#ifdef __APPLE__
|
||||
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
|
||||
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 && !__DARWIN_ONLY_64_BIT_INO_T
|
||||
fts_children$INODE64;FTSENT *;(FTS *ftsp, int options);(ftsp, options)
|
||||
#endif
|
||||
#endif /* ifdef __APPLE__ */
|
||||
Reference in New Issue
Block a user