tools/fakeroot: update to 1.27
authorRosen Penev <rosenp@gmail.com>
Fri, 25 Feb 2022 04:50:36 +0000 (20:50 -0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Mon, 28 Feb 2022 23:08:08 +0000 (00:08 +0100)
Remove macOS stuff. Upstream has fixed it in the same way.

Add SOL_TCP define. Taken from elsewhere in the code.

Refreshed patches.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
tools/fakeroot/Makefile
tools/fakeroot/patches/100-macos_compile_fix.patch [deleted file]
tools/fakeroot/patches/400-alpine-libc.musl-fix.patch
tools/fakeroot/patches/500-macos_arm64_compile_fix.patch [deleted file]
tools/fakeroot/patches/600-macOS.patch [new file with mode: 0644]

index f4333fbfb36cd1514322ffd2ebb790efe6e1be31..adae33209935c9163a6f0b43b0ce83b37f4ddd1d 100644 (file)
@@ -5,12 +5,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fakeroot
-PKG_VERSION:=1.26
+PKG_VERSION:=1.27
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).orig.tar.gz
 PKG_SOURCE_URL:=@DEBIAN/pool/main/f/fakeroot
-PKG_HASH:=480a578ffdc5592e73df4c086950d321b4adc78dbdaec56c82e4fe1fb68de8e9
+PKG_HASH:=3c45eb2d1802a2762069e2e9d21bdd6fb533592bc0cda74c9aff066ab01caddc
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING
 PKG_FIXUP:=autoreconf
diff --git a/tools/fakeroot/patches/100-macos_compile_fix.patch b/tools/fakeroot/patches/100-macos_compile_fix.patch
deleted file mode 100644 (file)
index 64c0b47..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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"
index c37282af5d08c2117157c88fde95e4e1ce57d71c..730732db2e76b5ea4b25d93361c362068bcdfb48 100644 (file)
@@ -6,7 +6,7 @@ Error relocating openwrt/staging_dir/host/lib/libfakeroot.so: SEND_GET_XATTR: sy
 
 --- a/libfakeroot.c
 +++ b/libfakeroot.c
-@@ -81,12 +81,14 @@
+@@ -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)
@@ -21,7 +21,7 @@ Error relocating openwrt/staging_dir/host/lib/libfakeroot.so: SEND_GET_XATTR: sy
  #define SEND_GET_XATTR64(a,b,c) send_get_xattr64(a,b)
  #endif
  
-@@ -131,8 +133,9 @@
+@@ -136,8 +138,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 */
diff --git a/tools/fakeroot/patches/500-macos_arm64_compile_fix.patch b/tools/fakeroot/patches/500-macos_arm64_compile_fix.patch
deleted file mode 100644 (file)
index 271dcee..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
---- a/communicate.c
-+++ b/communicate.c
-@@ -24,7 +24,12 @@
-    In this file, we want 'struct stat' to have a 32-bit 'ino_t'.
-    We use 'struct stat64' when we need a 64-bit 'ino_t'.
- */
--#define _DARWIN_NO_64_BIT_INODE
-+# include <sys/types.h>
-+# if __DARWIN_ONLY_64_BIT_INO_T
-+#  define _DARWIN_USE_64_BIT_INODE
-+# else
-+#  define _DARWIN_NO_64_BIT_INODE
-+# endif
- #endif
- #include "communicate.h"
---- a/communicate.h
-+++ b/communicate.h
-@@ -91,6 +91,10 @@
- # include <inttypes.h>
- #endif
-+#if __DARWIN_ONLY_64_BIT_INO_T
-+struct stat64 __DARWIN_STRUCT_STAT64;
-+#endif
-+
- #ifndef FAKEROOT_FAKENET
- # define FAKEROOTKEY_ENV          "FAKEROOTKEY"
- #endif /* ! FAKEROOT_FAKENET */
---- a/faked.c
-+++ b/faked.c
-@@ -84,7 +84,12 @@
-    In this file, we want 'struct stat' to have a 32-bit 'ino_t'.
-    We use 'struct stat64' when we need a 64-bit 'ino_t'.
- */
--#define _DARWIN_NO_64_BIT_INODE
-+# include <sys/types.h>
-+# if __DARWIN_ONLY_64_BIT_INO_T
-+#  define _DARWIN_USE_64_BIT_INODE
-+# else
-+#  define _DARWIN_NO_64_BIT_INODE
-+# endif
- #endif
- #include "config.h"
---- a/libfakeroot.c
-+++ b/libfakeroot.c
-@@ -38,7 +38,12 @@
-    In this file, we want 'struct stat' to have a 32-bit 'ino_t'.
-    We use 'struct stat64' when we need a 64-bit 'ino_t'.
- */
--#define _DARWIN_NO_64_BIT_INODE
-+# include <sys/types.h>
-+# if __DARWIN_ONLY_64_BIT_INO_T
-+#  define _DARWIN_USE_64_BIT_INODE
-+# else
-+#  define _DARWIN_NO_64_BIT_INODE
-+# endif
- /* The helper _unix2003 version of this file calls a few functions in this file
-    that are marked with static_nonapple so that needs to become private instead
---- a/libfakeroot_unix2003.c
-+++ b/libfakeroot_unix2003.c
-@@ -18,7 +18,11 @@
-    In this file, we want 'struct stat' to have a 32-bit 'ino_t'.
-    We use 'struct stat64' when we need a 64-bit 'ino_t'.
- */
--#define _DARWIN_NO_64_BIT_INODE
-+# if __DARWIN_ONLY_64_BIT_INO_T
-+#  define _DARWIN_USE_64_BIT_INODE
-+# else
-+#  define _DARWIN_NO_64_BIT_INODE
-+# endif
- /*
-    This file is for 32-bit symbols which have the "$UNIX2003" version, i.e.
---- 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
-@@ -48,9 +48,11 @@ getattrlist$UNIX2003;int;(const char *pa
- #endif
- #endif
- #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
-+#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
-@@ -232,7 +234,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__ */
-@@ -240,7 +242,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__ */
diff --git a/tools/fakeroot/patches/600-macOS.patch b/tools/fakeroot/patches/600-macOS.patch
new file mode 100644 (file)
index 0000000..59e668e
--- /dev/null
@@ -0,0 +1,13 @@
+--- 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 } };