From 445968234fa8d3946855601bd2ce69f523f4dbe6 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Wed, 9 Sep 2015 15:03:25 +0200 Subject: [PATCH] fakeroot: fix musl. --- .../patches/fakeroot-hide-dlsym-errors.patch | 20 +++++++++++ srcpkgs/fakeroot/patches/fakeroot-no64.patch | 17 ++++++++++ .../fakeroot/patches/fakeroot-stdint.patch | 34 +++++++++++++++++++ srcpkgs/fakeroot/template | 5 ++- 4 files changed, 75 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/fakeroot/patches/fakeroot-hide-dlsym-errors.patch create mode 100644 srcpkgs/fakeroot/patches/fakeroot-no64.patch create mode 100644 srcpkgs/fakeroot/patches/fakeroot-stdint.patch diff --git a/srcpkgs/fakeroot/patches/fakeroot-hide-dlsym-errors.patch b/srcpkgs/fakeroot/patches/fakeroot-hide-dlsym-errors.patch new file mode 100644 index 00000000000..71c2d214e68 --- /dev/null +++ b/srcpkgs/fakeroot/patches/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. + +--- libfakeroot.c.orig 2014-03-07 11:20:26.120532847 +0200 ++++ 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/srcpkgs/fakeroot/patches/fakeroot-no64.patch b/srcpkgs/fakeroot/patches/fakeroot-no64.patch new file mode 100644 index 00000000000..03f70ef4509 --- /dev/null +++ b/srcpkgs/fakeroot/patches/fakeroot-no64.patch @@ -0,0 +1,17 @@ +--- libfakeroot.c.orig ++++ 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/srcpkgs/fakeroot/patches/fakeroot-stdint.patch b/srcpkgs/fakeroot/patches/fakeroot-stdint.patch new file mode 100644 index 00000000000..fa4abbd35a0 --- /dev/null +++ b/srcpkgs/fakeroot/patches/fakeroot-stdint.patch @@ -0,0 +1,34 @@ +--- faked.c.orig ++++ 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/srcpkgs/fakeroot/template b/srcpkgs/fakeroot/template index e941b4919a1..9d4f8eb3002 100644 --- a/srcpkgs/fakeroot/template +++ b/srcpkgs/fakeroot/template @@ -1,7 +1,7 @@ # Template file for 'fakeroot' pkgname=fakeroot version=1.20.2 -revision=2 +revision=3 lib32disabled=yes build_style=gnu-configure makedepends="acl-devel libcap-devel" @@ -12,6 +12,9 @@ homepage="http://packages.debian.org/fakeroot" license="GPL-3" distfiles="${DEBIAN_SITE}/main/f/fakeroot/${pkgname}_${version}.orig.tar.bz2" checksum=7c0a164d19db3efa9e802e0fc7cdfeff70ec6d26cdbdc4338c9c2823c5ea230c +case "$XBPS_TARGET_MACHINE" in + *-musl) CFLAGS="-D_STAT_VER=0" ;; +esac post_install() { # Use /bin/sh shebang.