summaryrefslogtreecommitdiff
path: root/repo/fakeroot
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2023-05-17 17:01:27 +0100
committerdavidovski <david@davidovski.xyz>2023-05-17 17:01:27 +0100
commit0d37a1ef234c38b27faba43bc3a22f985d311deb (patch)
treedde8df9f508e7323c3d7df599ceade7705c40acd /repo/fakeroot
parentf29d569cd33a73da5ad675f43a34ad53c5cc9bc6 (diff)
Remove all firmware
Diffstat (limited to 'repo/fakeroot')
-rw-r--r--repo/fakeroot/do-not-redefine-id_t.patch21
-rw-r--r--repo/fakeroot/fakeroot-no64.patch17
-rw-r--r--repo/fakeroot/fakeroot-skip-ipc-sanity-check.patch59
-rw-r--r--repo/fakeroot/fakeroot-stdint.patch34
-rw-r--r--repo/fakeroot/fakeroot.xibuild48
-rw-r--r--repo/fakeroot/fix-format.patch25
-rw-r--r--repo/fakeroot/fix-shell-in-fakeroot.patch13
-rw-r--r--repo/fakeroot/xstatjunk.patch11
8 files changed, 228 insertions, 0 deletions
diff --git a/repo/fakeroot/do-not-redefine-id_t.patch b/repo/fakeroot/do-not-redefine-id_t.patch
new file mode 100644
index 0000000..4d3bab1
--- /dev/null
+++ b/repo/fakeroot/do-not-redefine-id_t.patch
@@ -0,0 +1,21 @@
+musl defines id_t as unsigned but doesn't use the _ID_T to detect its
+definition. This causes the type to be redefined as an int by fakeroot
+which causes a compilation error.
+
+diff -upr fakeroot-1.27.orig/libfakeroot.c fakeroot-1.27/libfakeroot.c
+--- fakeroot-1.27.orig/libfakeroot.c 2022-01-30 11:30:25.198506844 +0100
++++ fakeroot-1.27/libfakeroot.c 2022-01-30 11:30:41.928524429 +0100
+@@ -133,13 +133,6 @@
+ #define INT_SEND_STAT(a,b) SEND_STAT(a,b,_STAT_VER)
+ #define INT_SEND_GET_XATTR(a,b) SEND_GET_XATTR(a,b,_STAT_VER)
+ #define INT_SEND_GET_STAT(a,b) SEND_GET_STAT(a,b)
+-
+-/* 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
+-#define _ID_T
+-typedef int id_t;
+-#endif
+ #endif
+
+ #include <sys/types.h>
diff --git a/repo/fakeroot/fakeroot-no64.patch b/repo/fakeroot/fakeroot-no64.patch
new file mode 100644
index 0000000..ff95f96
--- /dev/null
+++ b/repo/fakeroot/fakeroot-no64.patch
@@ -0,0 +1,17 @@
+--- 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
+
diff --git a/repo/fakeroot/fakeroot-skip-ipc-sanity-check.patch b/repo/fakeroot/fakeroot-skip-ipc-sanity-check.patch
new file mode 100644
index 0000000..9541973
--- /dev/null
+++ b/repo/fakeroot/fakeroot-skip-ipc-sanity-check.patch
@@ -0,0 +1,59 @@
+This patch was original added in aports commit
+439b449b68ebf3462a3f659804c41195e2d8d8ae. It
+seems to be needed since this sanity checks
+fails spuriously when cros compiling fakeroot.
+
+diff -upr fakeroot-1.27.orig/configure.ac fakeroot-1.27/configure.ac
+--- fakeroot-1.27.orig/configure.ac 2022-01-30 10:43:52.992260063 +0100
++++ fakeroot-1.27/configure.ac 2022-01-30 10:46:22.989526929 +0100
+@@ -25,50 +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_RUN_IFELSE([AC_LANG_SOURCE([[
+-#include <stdlib.h>
+-#include <sys/types.h>
+-#include <sys/ipc.h>
+-#include <sys/msg.h>
+-#include <time.h>
+-#include <unistd.h>
+-
+-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],[ac_cv_use_ipc=cross])
+-
+- if test $ac_cv_use_ipc = cross; then
+- if test "$host_os" = linux-gnu; then
+- ac_cv_use_ipc=sysv
+- AC_MSG_RESULT([cross, guessing yes])
+- else
+- (set -o posix; set)
+- AC_MSG_ERROR([cross compiling, unknown result for $host_os])
+- fi
+- elif 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/repo/fakeroot/fakeroot-stdint.patch b/repo/fakeroot/fakeroot-stdint.patch
new file mode 100644
index 0000000..bb4f67f
--- /dev/null
+++ b/repo/fakeroot/fakeroot-stdint.patch
@@ -0,0 +1,34 @@
+--- fakeroot-1.18.2.orig/faked.c
++++ fakeroot-1.18.2/faked.c
+@@ -514,11 +514,11 @@
+
+ #ifdef FAKEROOT_DB_PATH
+ if (find_path(i->buf.dev, i->buf.ino, roots, path))
+- fprintf(f,"mode=%llo,uid=%llu,gid=%llu,nlink=%llu,rdev=%llu %s\n",
++ fprintf(f,"mode=%"PRIo64",uid=%"PRIu64",gid=%"PRIu64",nlink=%"PRIu64",rdev=%"PRIu64" %s\n",
+ (uint64_t) i->buf.mode,(uint64_t) i->buf.uid,(uint64_t) i->buf.gid,
+ (uint64_t) i->buf.nlink,(uint64_t) i->buf.rdev,path);
+ #else
+- fprintf(f,"dev=%llx,ino=%llu,mode=%llo,uid=%llu,gid=%llu,nlink=%llu,rdev=%llu\n",
++ fprintf(f,"dev=%"PRIx64",ino=%"PRIu64",mode=%"PRIo64",uid=%"PRIu64",gid=%"PRIu64",nlink=%"PRIu64",rdev=%"PRIu64"\n",
+ (uint64_t) i->buf.dev,(uint64_t) i->buf.ino,(uint64_t) i->buf.mode,
+ (uint64_t) i->buf.uid,(uint64_t) i->buf.gid,(uint64_t) i->buf.nlink,
+ (uint64_t) i->buf.rdev);
+@@ -544,7 +544,7 @@
+
+ while(1){
+ #ifdef FAKEROOT_DB_PATH
+- r=scanf("mode=%llo,uid=%llu,gid=%llu,nlink=%llu,rdev=%llu "DB_PATH_SCAN"\n",
++ r=scanf("mode=%"PRIo64",uid=%"PRIu64",gid=%"PRIu64",nlink=%"PRIu64",rdev=%"PRIu64" "DB_PATH_SCAN"\n",
+ &stmode, &stuid, &stgid, &stnlink, &strdev, &path);
+ if (r != 6)
+ break;
+@@ -559,7 +559,7 @@
+ stdev = path_st.st_dev;
+ stino = path_st.st_ino;
+ #else
+- r=scanf("dev=%llx,ino=%llu,mode=%llo,uid=%llu,gid=%llu,nlink=%llu,rdev=%llu\n",
++ r=scanf("dev=%"PRIx64",ino=%"PRIu64",mode=%"PRIo64",uid=%"PRIu64",gid=%"PRIu64",nlink=%"PRIu64",rdev=%"PRIu64"\n",
+ &stdev, &stino, &stmode, &stuid, &stgid, &stnlink, &strdev);
+ if (r != 7)
+ break;
diff --git a/repo/fakeroot/fakeroot.xibuild b/repo/fakeroot/fakeroot.xibuild
new file mode 100644
index 0000000..46971af
--- /dev/null
+++ b/repo/fakeroot/fakeroot.xibuild
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+NAME="fakeroot"
+DESC="Gives a fake root environment, useful for building packages as a non-privileged user"
+
+MAKEDEPS=" libtool autoconf automake po4a libcap acl linux-headers"
+
+PKG_VER=1.29
+SOURCE="https://deb.debian.org/debian/pool/main/f/fakeroot/fakeroot_$PKG_VER.orig.tar.gz"
+
+ADDITIONAL="
+do-not-redefine-id_t.patch
+fakeroot-no64.patch
+fakeroot-skip-ipc-sanity-check.patch
+fakeroot-stdint.patch
+fix-format.patch
+fix-shell-in-fakeroot.patch
+xstatjunk.patch
+"
+
+prepare () {
+ apply_patches
+}
+
+build() {
+ if [ "$CLIBC" = "musl" ]; then
+ # musl does not have _STAT_VER, it's really not used for
+ # anything, so define it as zero (just like uclibc does)
+ export CFLAGS="-D_STAT_VER=0 $CFLAGS"
+ fi
+
+ CONFIG_SHELL=/bin/sh ./bootstrap
+ CONFIG_SHELL=/bin/sh ./configure \
+
+
+ --prefix=/usr \
+ --disable-static
+
+ make
+ cd doc
+ #po4a -k 0 --rm-backups --variable "srcdir=../doc/" po4a/po4a.cfg
+}
+
+package() {
+ cd ..
+ make DESTDIR="$PKG_DEST" install
+}
+
diff --git a/repo/fakeroot/fix-format.patch b/repo/fakeroot/fix-format.patch
new file mode 100644
index 0000000..8f86396
--- /dev/null
+++ b/repo/fakeroot/fix-format.patch
@@ -0,0 +1,25 @@
+Fakeroot defines custom fake_dev_t/fake_ino_t as uint64_t
+but doesn't use the PRIu64 format specifier from inttypes.h
+to print them thereby relying on a specific representation
+of these types.
+
+diff -upr fakeroot-1.27.orig/faked.c fakeroot-1.27/faked.c
+--- fakeroot-1.27.orig/faked.c 2022-01-17 21:37:21.000000000 +0100
++++ fakeroot-1.27/faked.c 2022-01-30 11:36:59.963019225 +0100
+@@ -121,6 +121,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <signal.h>
++#include <inttypes.h>
+ #ifdef HAVE_STDINT_H
+ # include <stdint.h>
+ #endif
+@@ -687,7 +688,7 @@ int load_database(const uint32_t remote)
+ /* */
+ /*********************************/
+ void debug_stat(const struct fakestat *st){
+- fprintf(stderr,"dev:ino=(%llx:%lli), mode=0%lo, own=(%li,%li), nlink=%li, rdev=%lli\n",
++ fprintf(stderr,"dev:ino=(%"PRIx64":%"PRIu64"), mode=0%lo, own=(%li,%li), nlink=%li, rdev=%"PRIu64"\n",
+ st->dev,
+ st->ino,
+ (long)st->mode,
diff --git a/repo/fakeroot/fix-shell-in-fakeroot.patch b/repo/fakeroot/fix-shell-in-fakeroot.patch
new file mode 100644
index 0000000..ce5d23f
--- /dev/null
+++ b/repo/fakeroot/fix-shell-in-fakeroot.patch
@@ -0,0 +1,13 @@
+Description: Fix shell in fakeroot.in
+ Use /bin/sh instead of @SHELL@ in fakeroot.in
+Author: Juan Picca <jumapico@gmail.com>
+Last-Update: 2016-06-27
+---
+--- a/scripts/fakeroot.in
++++ b/scripts/fakeroot.in
+@@ -1,4 +1,4 @@
+-#!@SHELL@
++#!/bin/sh
+
+ # This script first starts faked (the daemon), and then it will run
+ # the requested program with fake root privileges.
diff --git a/repo/fakeroot/xstatjunk.patch b/repo/fakeroot/xstatjunk.patch
new file mode 100644
index 0000000..12f2759
--- /dev/null
+++ b/repo/fakeroot/xstatjunk.patch
@@ -0,0 +1,11 @@
+--- fakeroot-1.18.4.orig/configure.ac 2012-06-02 18:23:41.000000000 +0000
++++ fakeroot-1.18.4configure.ac 2015-09-24 23:15:56.917470073 +0000
+@@ -301,7 +301,7 @@
+ FUNC=`echo $SEARCH|sed -e 's/.*%//'`
+ PRE=`echo $SEARCH|sed -e 's/%.*//'`
+ FOUND=
+- for WRAPPED in __${PRE}x${FUNC} _${PRE}x${FUNC} __${PRE}${FUNC}13 ${PRE}${FUNC}; do
++ for WRAPPED in ${PRE}${FUNC}; do
+ AC_CHECK_FUNCS($WRAPPED,FOUND=$WRAPPED)
+ dnl
+ dnl to unconditionally define only the _* functions, comment out the 2 lines above,