summaryrefslogtreecommitdiff
path: root/system/fakeroot
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-14 02:22:19 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-06-14 02:22:56 -0500
commitb1eb50599e4db7eb4501af75cbbfa22007081ea5 (patch)
treec94a34c882cc17adedd781e8c5f34349b2a62416 /system/fakeroot
parentb9e85bbdcf38547ef2ca4e5c2a6e6293bbcd2752 (diff)
downloadpackages-b1eb50599e4db7eb4501af75cbbfa22007081ea5.tar.gz
packages-b1eb50599e4db7eb4501af75cbbfa22007081ea5.tar.bz2
packages-b1eb50599e4db7eb4501af75cbbfa22007081ea5.tar.xz
packages-b1eb50599e4db7eb4501af75cbbfa22007081ea5.zip
The New Plan
all pkgs needed to bootstrap -> system others -> user
Diffstat (limited to 'system/fakeroot')
-rw-r--r--system/fakeroot/APKBUILD62
-rw-r--r--system/fakeroot/busybox-getopt.patch14
-rw-r--r--system/fakeroot/fakeroot-hide-dlsym-errors.patch20
-rw-r--r--system/fakeroot/fakeroot-no-ldlibrarypath.patch80
-rw-r--r--system/fakeroot/fakeroot-no64.patch17
-rw-r--r--system/fakeroot/fakeroot-stdint.patch34
-rw-r--r--system/fakeroot/fakeroot-uclibc.patch20
-rw-r--r--system/fakeroot/xstatjunk.patch11
8 files changed, 258 insertions, 0 deletions
diff --git a/system/fakeroot/APKBUILD b/system/fakeroot/APKBUILD
new file mode 100644
index 000000000..ab7e64af7
--- /dev/null
+++ b/system/fakeroot/APKBUILD
@@ -0,0 +1,62 @@
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=fakeroot
+pkgver=1.22
+pkgrel=0
+pkgdesc="Gives a fake root environment, useful for building packages as a non-privileged user"
+arch="all"
+license='GPL'
+url="http://fakeroot.alioth.debian.org/"
+depends=
+options="!checkroot"
+checkdepends="bash"
+makedepends_build="libtool autoconf automake po4a"
+makedepends_host="libcap-dev acl-dev linux-headers"
+makedepends="$makedepends_build $makedepends_host"
+subpackages="$pkgname-doc"
+source="http://ftp.debian.org/debian/pool/main/f/$pkgname/${pkgname}_${pkgver}.orig.tar.bz2
+ busybox-getopt.patch
+ fakeroot-hide-dlsym-errors.patch
+ fakeroot-no64.patch
+ fakeroot-stdint.patch
+ fakeroot-no-ldlibrarypath.patch
+ xstatjunk.patch
+ "
+
+check() {
+ cd $startdir/src/$pkgname-$pkgver
+ /bin/bash -c 'make check'
+}
+
+build() {
+ cd $startdir/src/$pkgname-$pkgver
+
+ 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 \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --disable-static
+
+ make
+ cd doc
+ po4a -k 0 --rm-backups --variable "srcdir=../doc/" po4a/po4a.cfg
+}
+
+package() {
+ cd "$startdir/src/$pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="193478d9ff88ca2ae69fe47b73b6c61aeb2ba3f2a9e7ed5d455022705857c6f34cdcbe2d3f614c4c4c9509368dc78b9a7b7aa56fb3b50bb3309448140abd796a fakeroot_1.22.orig.tar.bz2
+9024263f4452bcb46c9670f8b8106e67c2d9b4cf45215def7ff4e78d2c908e4f98d494dd6f514fb3325165b0f61571fa031632b4642163cf9b1b3386d0867c5f busybox-getopt.patch
+666f41d6adc5e65eba419e08d5bbc4f561e40b0fc7bfa82090eb87962a7f3193bf319754e04aca289e865c66df2ecced1dbb45c9aa9f093657f22193dda25354 fakeroot-hide-dlsym-errors.patch
+7a832e6bed3838c7c488e0e12ba84b8d256e84bbb06d6020247452a991de505fa5c6bd7bcb84dce8753eb242e0fcab863b5461301cd56695f2b003fe8d6ff209 fakeroot-no64.patch
+ed7a58b0d201139545420f9e5429f503c00e00f36dea84473e77ea99b23bb8d421da1a8a8ce98ff90e72e378dff4cb9ea3c1a863a969899a5f50dfac3b9c5fac fakeroot-stdint.patch
+acfc1e5efce132279adddf9e11c28d65602059d5cd723ad98b67cb9183e1de68445f3bba7ac54ee60265b85f25141fcc9b2156f551aa5c624a92631320f5b743 fakeroot-no-ldlibrarypath.patch
+5efd33fd778bd94a529ed7e439fb8fea25ff865dda3f6f9e431264e942b37f3b5d7a0ad14107b55c5fa81b86efd5a82aedb3803cfab08ec57f27f5b229d2fe88 xstatjunk.patch"
diff --git a/system/fakeroot/busybox-getopt.patch b/system/fakeroot/busybox-getopt.patch
new file mode 100644
index 000000000..e8172e8f1
--- /dev/null
+++ b/system/fakeroot/busybox-getopt.patch
@@ -0,0 +1,14 @@
+--- ./scripts/fakeroot.in.orig
++++ ./scripts/fakeroot.in
+@@ -43,9 +43,9 @@
+
+ libfound=no
+
+-GETOPTEST=`getopt --version`
++GETOPTEST=`getopt --version 2>&1 | head -n2`
+ case $GETOPTEST in
+-getopt*) # GNU getopt
++getopt*|*BusyBox*) # GNU getopt
+ FAKE_TEMP=`getopt -l lib: -l faked: -l unknown-is-real -l fd-base: -l version -l help -- +l:f:i:s:ub:vh "$@"`
+ ;;
+ *) # POSIX getopt ?
diff --git a/system/fakeroot/fakeroot-hide-dlsym-errors.patch b/system/fakeroot/fakeroot-hide-dlsym-errors.patch
new file mode 100644
index 000000000..aeeb347da
--- /dev/null
+++ b/system/fakeroot/fakeroot-hide-dlsym-errors.patch
@@ -0,0 +1,20 @@
+it's normal that the acl_* symbols are not found if the application
+is not linked against -lacl. these errors harmless, but mighty
+annoying.
+
+--- fakeroot-1.20/libfakeroot.c.orig 2014-03-07 11:20:26.120532847 +0200
++++ fakeroot-1.20/libfakeroot.c 2014-03-07 11:21:26.486872482 +0200
+@@ -258,10 +258,12 @@
+ /* clear dlerror() just in case dlsym() legitimately returns NULL */
+ msg = dlerror();
+ *(next_wrap[i].doit)=dlsym(get_libc(), next_wrap[i].name);
+- if ( (msg = dlerror()) != NULL){
++#ifdef LIBFAKEROOT_DEBUGGING
++ if ( fakeroot_debug && (msg = dlerror()) != NULL) {
+ fprintf (stderr, "dlsym(%s): %s\n", next_wrap[i].name, msg);
+ /* abort ();*/
+ }
++#endif
+ }
+ }
+
diff --git a/system/fakeroot/fakeroot-no-ldlibrarypath.patch b/system/fakeroot/fakeroot-no-ldlibrarypath.patch
new file mode 100644
index 000000000..e7b9a037d
--- /dev/null
+++ b/system/fakeroot/fakeroot-no-ldlibrarypath.patch
@@ -0,0 +1,80 @@
+diff -ru fakeroot-1.20.2.orig/scripts/fakeroot.in fakeroot-1.20.2/scripts/fakeroot.in
+--- fakeroot-1.20.2.orig/scripts/fakeroot.in 2015-11-12 10:51:23.241681379 +0200
++++ fakeroot-1.20.2/scripts/fakeroot.in 2015-11-12 10:56:53.331985288 +0200
+@@ -34,8 +34,7 @@
+ FAKEROOT_BINDIR=@bindir@
+
+ USEABSLIBPATH=@LDPRELOADABS@
+-LIB=lib@fakeroot_transformed@@DLSUFFIX@
+-PATHS=@libdir@:${FAKEROOT_PREFIX}/lib64/libfakeroot:${FAKEROOT_PREFIX}/lib32/libfakeroot
++LIB=@libdir@/lib@fakeroot_transformed@@DLSUFFIX@
+ FAKED=${FAKEROOT_BINDIR}/@faked_transformed@
+
+ FAKED_MODE="unknown-is-root"
+@@ -68,7 +67,6 @@
+ -l|--lib)
+ shift
+ LIB=`eval echo "$1"`
+- PATHS=
+ ;;
+ -f|--faked)
+ shift
+@@ -111,23 +109,11 @@
+
+ # make sure the preload is available
+ ABSLIB=""
+-if [ -n "$PATHS" ]
+-then
+- for dir in `echo $PATHS | sed 's/:/ /g'`
+- do
+- if test -r "$dir/$LIB"
+- then
+- libfound=yes
+- ABSLIB="$dir/$LIB"
+- fi
+- done
+-else
+ if test -r "$LIB"
+ then
+ libfound=yes
+ ABSLIB="$LIB"
+ fi
+-fi
+
+ if test $libfound = no
+ then
+@@ -148,7 +134,7 @@
+ if [ "$WAITINTRAP" -eq 0 ]; then
+ trap "kill -s @signal@ $PID" EXIT INT
+ else
+- @MACOSX_FALSE@trap 'FAKEROOTKEY=$FAKEROOTKEY @LDLIBPATHVAR@="$PATHS" @LDPRELOADVAR@="$LIB" /bin/ls -l / >/dev/null 2>&1; while kill -s @signal@ $PID 2>/dev/null; do sleep 0.1; done' EXIT INT
++ @MACOSX_FALSE@trap 'FAKEROOTKEY=$FAKEROOTKEY @LDPRELOADVAR@="$LIB" /bin/ls -l / >/dev/null 2>&1; while kill -s @signal@ $PID 2>/dev/null; do sleep 0.1; done' EXIT INT
+ @MACOSX_TRUE@trap 'FAKEROOTKEY=$FAKEROOTKEY @LDPRELOADVAR@="$LIB" /bin/ls -l / >/dev/null 2>&1; while kill -s @signal@ $PID 2>/dev/null; do sleep 0.1; done' EXIT INT
+ fi
+
+@@ -159,10 +145,6 @@
+ if test $USEABSLIBPATH -ne 0 ; then
+ LIB=$ABSLIB
+ fi
+-# Keep other library paths
+-if test -n "$@LDLIBPATHVAR@"; then
+- PATHS="$PATHS:$@LDLIBPATHVAR@"
+-fi
+ # ...and preloaded libs
+ if test -n "$@LDPRELOADVAR@"; then
+ LIB="$LIB:$@LDPRELOADVAR@"
+@@ -171,11 +153,11 @@
+ export FAKEROOT_FD_BASE
+
+ if test -z "$*"; then
+- @MACOSX_FALSE@FAKEROOTKEY=$FAKEROOTKEY @LDLIBPATHVAR@="$PATHS" @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" ${SHELL:-/bin/sh}
++ @MACOSX_FALSE@FAKEROOTKEY=$FAKEROOTKEY @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" ${SHELL:-/bin/sh}
+ @MACOSX_TRUE@FAKEROOTKEY=$FAKEROOTKEY @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" ${SHELL:-/bin/sh}
+ RESULT=$?
+ else
+- @MACOSX_FALSE@FAKEROOTKEY=$FAKEROOTKEY @LDLIBPATHVAR@="$PATHS" @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" "$@"
++ @MACOSX_FALSE@FAKEROOTKEY=$FAKEROOTKEY @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" "$@"
+ @MACOSX_TRUE@FAKEROOTKEY=$FAKEROOTKEY @LDEXTRAVAR@ @LDPRELOADVAR@="$LIB" "$@"
+ RESULT=$?
+ fi
+
diff --git a/system/fakeroot/fakeroot-no64.patch b/system/fakeroot/fakeroot-no64.patch
new file mode 100644
index 000000000..ff95f96a9
--- /dev/null
+++ b/system/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/system/fakeroot/fakeroot-stdint.patch b/system/fakeroot/fakeroot-stdint.patch
new file mode 100644
index 000000000..bb4f67f0d
--- /dev/null
+++ b/system/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/system/fakeroot/fakeroot-uclibc.patch b/system/fakeroot/fakeroot-uclibc.patch
new file mode 100644
index 000000000..63708092d
--- /dev/null
+++ b/system/fakeroot/fakeroot-uclibc.patch
@@ -0,0 +1,20 @@
+--- fakeroot-1.18.2.orig/libfakeroot.c
++++ fakeroot-1.18.2/libfakeroot.c
+@@ -1551,7 +1551,7 @@
+ #endif /* LIBFAKEROOT_DEBUGGING */
+ r=next_fts_read(ftsp);
+ if(r && r->fts_statp) { /* Should we bother checking fts_info here? */
+-# if defined(STAT64_SUPPORT) && !defined(__APPLE__)
++# if defined(STAT64_SUPPORT) && !defined(__APPLE__) && !defined(__UCLIBC__)
+ SEND_GET_STAT64(r->fts_statp, _STAT_VER);
+ # else
+ SEND_GET_STAT(r->fts_statp, _STAT_VER);
+@@ -1574,7 +1574,7 @@
+ first=next_fts_children(ftsp, options);
+ for(r = first; r; r = r->fts_link) {
+ if(r && r->fts_statp) { /* Should we bother checking fts_info here? */
+-# if defined(STAT64_SUPPORT) && !defined(__APPLE__)
++# if defined(STAT64_SUPPORT) && !defined(__APPLE__) && !defined(__UCLIBC__)
+ SEND_GET_STAT64(r->fts_statp, _STAT_VER);
+ # else
+ SEND_GET_STAT(r->fts_statp, _STAT_VER);
diff --git a/system/fakeroot/xstatjunk.patch b/system/fakeroot/xstatjunk.patch
new file mode 100644
index 000000000..12f2759b4
--- /dev/null
+++ b/system/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,