sys-apps/fakeroot: Backport patch for glibc-2.24
authorJustin Lecher <jlec@gentoo.org>
Sun, 12 Feb 2017 18:52:07 +0000 (18:52 +0000)
committerJustin Lecher <jlec@gentoo.org>
Sun, 12 Feb 2017 19:08:42 +0000 (19:08 +0000)
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Signed-off-by: Justin Lecher <jlec@gentoo.org>
sys-apps/fakeroot/fakeroot-1.20.2-r1.ebuild [new file with mode: 0644]
sys-apps/fakeroot/files/fakeroot-1.20.2-glibc-2.24.patch [new file with mode: 0644]
sys-apps/fakeroot/metadata.xml

diff --git a/sys-apps/fakeroot/fakeroot-1.20.2-r1.ebuild b/sys-apps/fakeroot/fakeroot-1.20.2-r1.ebuild
new file mode 100644 (file)
index 0000000..a2ccf48
--- /dev/null
@@ -0,0 +1,46 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit autotools eutils flag-o-matic
+
+DESCRIPTION="A fake root environment by means of LD_PRELOAD and SysV IPC (or TCP) trickery"
+HOMEPAGE="http://packages.qa.debian.org/f/fakeroot.html"
+SRC_URI="mirror://debian/pool/main/${PN:0:1}/${PN}/${P/-/_}.orig.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="acl debug static-libs test"
+
+DEPEND="
+       sys-libs/libcap
+       acl? ( sys-apps/acl )
+       test? ( app-arch/sharutils )"
+
+DOCS="AUTHORS BUGS DEBUG README doc/README.saving"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.19-no-acl_h.patch
+       "${FILESDIR}"/${P}-glibc-2.24.patch
+)
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_configure() {
+       export ac_cv_header_sys_acl_h=$(usex acl)
+
+       use debug && append-cppflags "-DLIBFAKEROOT_DEBUGGING"
+       econf \
+               $(use_enable static-libs static)
+}
+
+src_install() {
+       default
+       prune_libtool_files
+}
diff --git a/sys-apps/fakeroot/files/fakeroot-1.20.2-glibc-2.24.patch b/sys-apps/fakeroot/files/fakeroot-1.20.2-glibc-2.24.patch
new file mode 100644 (file)
index 0000000..3fd34c8
--- /dev/null
@@ -0,0 +1,32 @@
+Description: Hide error from dlsym()
+ dlsym(), starting in glibc 2.24 actually reports errors. In our case,
+ we try to get ACL functions which are not in the glibc. This causes
+ failures in test suites, so hide those messages for non-debugging
+ purposes for now. It also makes the build logs annoying to read.
+Author: Julian Andres Klode <juliank@ubuntu.com>
+Origin: vendor
+Bug-Debian: https://bugs.debian.org/830912
+Forwarded: no
+Last-Update: 2016-08-12
+
+--- a/libfakeroot.c
++++ b/libfakeroot.c
+@@ -256,10 +256,16 @@ void load_library_symbols(void){
+  /* 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){
+-      fprintf (stderr, "dlsym(%s): %s\n", next_wrap[i].name, msg);
+-/*    abort ();*/
++#ifdef LIBFAKEROOT_DEBUGGING
++      if (fakeroot_debug) {
++        fprintf (stderr, "dlsym(%s): %s\n", next_wrap[i].name, msg);
++/*      abort ();*/
++      }
++#endif
+     }
++
+   }
+ }
index 56c12441305763f03fbabf550cd183a254076708..4eb20a048df27a0e05126241a46f398bdfe0405a 100644 (file)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
 <pkgmetadata>
-<maintainer type="project">
-       <email>base-system@gentoo.org</email>
-       <name>Gentoo Base System</name>
-</maintainer>
+       <maintainer type="project">
+               <email>base-system@gentoo.org</email>
+               <name>Gentoo Base System</name>
+       </maintainer>
 </pkgmetadata>