summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2014-01-10 08:05:48 +0000
committerLars Wendler <polynomial-c@gentoo.org>2014-01-10 08:05:48 +0000
commitadb59357e45ace840ec45ca49cf84c9c6942eaa2 (patch)
treeb06b4ae19ce1687730a4783aad05e752b00fa7c2 /app-arch
parentMask +sys-kernel/aufs-sources:3.12.7 because aufs3 patches do not apply clean... (diff)
downloadgentoo-2-adb59357e45ace840ec45ca49cf84c9c6942eaa2.tar.gz
gentoo-2-adb59357e45ace840ec45ca49cf84c9c6942eaa2.tar.bz2
gentoo-2-adb59357e45ace840ec45ca49cf84c9c6942eaa2.zip
Fixed build with xattr (bug #489170). Added an upstream fix regarding recursion/norecursion
(Portage version: 2.2.8/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)
Diffstat (limited to 'app-arch')
-rw-r--r--app-arch/tar/ChangeLog12
-rw-r--r--app-arch/tar/files/tar-1.27.1-recursion_norecursion.patch25
-rw-r--r--app-arch/tar/files/tar-1.27.1-xattr_build_fix.patch239
-rw-r--r--app-arch/tar/tar-1.27.1-r1.ebuild79
4 files changed, 353 insertions, 2 deletions
diff --git a/app-arch/tar/ChangeLog b/app-arch/tar/ChangeLog
index a945da605454..f2c26c52e1b7 100644
--- a/app-arch/tar/ChangeLog
+++ b/app-arch/tar/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for app-arch/tar
-# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-arch/tar/ChangeLog,v 1.194 2013/11/25 12:20:59 polynomial-c Exp $
+# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-arch/tar/ChangeLog,v 1.195 2014/01/10 08:05:48 polynomial-c Exp $
+
+*tar-1.27.1-r1 (10 Jan 2014)
+
+ 10 Jan 2014; Lars Wendler <polynomial-c@gentoo.org> +tar-1.27.1-r1.ebuild,
+ +files/tar-1.27.1-recursion_norecursion.patch,
+ +files/tar-1.27.1-xattr_build_fix.patch:
+ Fixed build with xattr (bug #489170). Added an upstream fix regarding
+ recursion/norecursion.
*tar-1.27.1 (25 Nov 2013)
diff --git a/app-arch/tar/files/tar-1.27.1-recursion_norecursion.patch b/app-arch/tar/files/tar-1.27.1-recursion_norecursion.patch
new file mode 100644
index 000000000000..47973c394baf
--- /dev/null
+++ b/app-arch/tar/files/tar-1.27.1-recursion_norecursion.patch
@@ -0,0 +1,25 @@
+From 2bd9c15391b0bd6ef0bff76aebf09cfb53003199 Mon Sep 17 00:00:00 2001
+From: Sergey Poznyakoff <gray@gnu.org>
+Date: Thu, 09 Jan 2014 22:13:15 +0000
+Subject: Fix the use of --no-recursion and --recursion options.
+
+Each option remains in effect until cancelled by the next ocurrence
+of its counterpart, as stated in the documentation.
+
+* src/names.c (name_next_elt): Restore recursion_option from the
+value of matching_flags.
+---
+diff --git a/src/names.c b/src/names.c
+index fc9841e..7777dc1 100644
+--- a/src/names.c
++++ b/src/names.c
+@@ -570,6 +570,7 @@ name_next_elt (int change_dirs)
+
+ case NELT_FMASK:
+ matching_flags = ep->v.matching_flags;
++ recursion_option = matching_flags & FNM_LEADING_DIR;
+ name_list_advance ();
+ continue;
+
+--
+cgit v0.9.0.2
diff --git a/app-arch/tar/files/tar-1.27.1-xattr_build_fix.patch b/app-arch/tar/files/tar-1.27.1-xattr_build_fix.patch
new file mode 100644
index 000000000000..b3e39f30b17e
--- /dev/null
+++ b/app-arch/tar/files/tar-1.27.1-xattr_build_fix.patch
@@ -0,0 +1,239 @@
+http://lists.gnu.org/archive/html/bug-tar/2013-12/msg00023.html
+https://bugs.gentoo.org/489170
+
+--- tar-1.27.1/acinclude.m4 2013-03-14 21:18:09.000000000 +0100
++++ tar-1.27.1/acinclude.m4 2013-03-14 21:18:09.000000000 +0100
+@@ -37,18 +37,27 @@
+ [], [with_xattrs=maybe]
+ )
+
+- AC_CHECK_HEADERS([attr/xattr.h])
+- AM_CONDITIONAL([TAR_COND_XATTR_H],[test "$ac_cv_header_attr_xattr_h" = yes])
+- if test "$ac_cv_header_attr_xattr_h" = yes; then
+- AC_CHECK_FUNCS(getxattr fgetxattr lgetxattr \
+- setxattr fsetxattr lsetxattr \
+- listxattr flistxattr llistxattr,
+- # only when functions are present
+- AC_DEFINE([HAVE_ATTR_XATTR_H], [1],
+- [define to 1 if we have <attr/xattr.h> header])
+- if test "$with_xattrs" != no; then
+- AC_DEFINE([HAVE_XATTRS],,[Define when we have working linux xattrs.])
+- fi
+- )
++ AC_CHECK_HEADERS([sys/xattr.h attr/xattr.h])
++ AM_CONDITIONAL([TAR_COND_XATTR_H],
++ [test "$ac_cv_header_sys_xattr_h" = yes -o "$ac_cv_header_attr_xattr_h" = yes])
++
++ if test "$with_xattrs" != no; then
++ # If <sys/xattr.h> doesn't exist and <attr/xattr.h> does,
++ # then link against libattr.so and not libc
++ if test "$ac_cv_header_sys_xattr_h" = no -a "$ac_cv_header_attr_xattr_h" = yes; then
++ AC_CHECK_LIB([attr],[fgetxattr])
++ fi
++ have_functions=yes
++ for xattr_func in getxattr fgetxattr lgetxattr \
++ setxattr fsetxattr lsetxattr \
++ listxattr flistxattr llistxattr; do \
++ AC_SEARCH_LIBS([$xattr_func], [attr],, [have_functions=no])
++ test $have_functions = no && break
++ done
++ if test $have_functions = yes; then
++ AC_DEFINE([HAVE_XATTRS],[1],[Define when we have working linux xattrs.])
++ else
++ test "$with_xattrs" = yes && AC_MSG_ERROR([xattr support requested but not found.])
++ fi
+ fi
+ ])
+--- tar-1.27.1/configure 2013-11-17 17:18:39.000000000 +0100
++++ tar-1.27.1/configure 2013-11-17 17:18:39.000000000 +0100
+@@ -33619,19 +33619,20 @@
+ fi
+
+
+- for ac_header in attr/xattr.h
++ for ac_header in sys/xattr.h attr/xattr.h
+ do :
+- ac_fn_c_check_header_mongrel "$LINENO" "attr/xattr.h" "ac_cv_header_attr_xattr_h" "$ac_includes_default"
+-if test "x$ac_cv_header_attr_xattr_h" = xyes; then :
++ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
++ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
++if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+-#define HAVE_ATTR_XATTR_H 1
++#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+ _ACEOF
+
+ fi
+
+ done
+
+- if test "$ac_cv_header_attr_xattr_h" = yes; then
++ if test "$ac_cv_header_sys_xattr_h" = yes -o "$ac_cv_header_attr_xattr_h" = yes; then
+ TAR_COND_XATTR_H_TRUE=
+ TAR_COND_XATTR_H_FALSE='#'
+ else
+@@ -33639,30 +33640,130 @@
+ TAR_COND_XATTR_H_FALSE=
+ fi
+
+- if test "$ac_cv_header_attr_xattr_h" = yes; then
+- for ac_func in getxattr fgetxattr lgetxattr \
+- setxattr fsetxattr lsetxattr \
+- listxattr flistxattr llistxattr
+-do :
+- as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
++
++ if test "$with_xattrs" != no; then
++ # If <sys/xattr.h> doesn't exist and <attr/xattr.h> does,
++ # then link against libattr.so and not libc
++ if test "$ac_cv_header_sys_xattr_h" = no -a "$ac_cv_header_attr_xattr_h" = yes; then
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgetxattr in -lattr" >&5
++$as_echo_n "checking for fgetxattr in -lattr... " >&6; }
++if ${ac_cv_lib_attr_fgetxattr+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lattr $LIBS"
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char fgetxattr ();
++int
++main ()
++{
++return fgetxattr ();
++ ;
++ return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++ ac_cv_lib_attr_fgetxattr=yes
++else
++ ac_cv_lib_attr_fgetxattr=no
++fi
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext conftest.$ac_ext
++LIBS=$ac_check_lib_save_LIBS
++fi
++{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_attr_fgetxattr" >&5
++$as_echo "$ac_cv_lib_attr_fgetxattr" >&6; }
++if test "x$ac_cv_lib_attr_fgetxattr" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
++#define HAVE_LIBATTR 1
+ _ACEOF
+- # only when functions are present
+
+-$as_echo "#define HAVE_ATTR_XATTR_H 1" >>confdefs.h
++ LIBS="-lattr $LIBS"
+
+- if test "$with_xattrs" != no; then
++fi
+
+-$as_echo "#define HAVE_XATTRS /**/" >>confdefs.h
++ fi
++ have_functions=yes
++ for xattr_func in getxattr fgetxattr lgetxattr \
++ setxattr fsetxattr lsetxattr \
++ listxattr flistxattr llistxattr; do \
++ as_ac_Search=`$as_echo "ac_cv_search_$xattr_func" | $as_tr_sh`
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing $xattr_func" >&5
++$as_echo_n "checking for library containing $xattr_func... " >&6; }
++if eval \${$as_ac_Search+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ ac_func_search_save_LIBS=$LIBS
++cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h. */
++
++/* Override any GCC internal prototype to avoid an error.
++ Use char because int might match the return type of a GCC
++ builtin and then its argument prototype would still apply. */
++#ifdef __cplusplus
++extern "C"
++#endif
++char $xattr_func ();
++int
++main ()
++{
++return $xattr_func ();
++ ;
++ return 0;
++}
++_ACEOF
++for ac_lib in '' attr; do
++ if test -z "$ac_lib"; then
++ ac_res="none required"
++ else
++ ac_res=-l$ac_lib
++ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
++ fi
++ if ac_fn_c_try_link "$LINENO"; then :
++ eval "$as_ac_Search=\$ac_res"
++fi
++rm -f core conftest.err conftest.$ac_objext \
++ conftest$ac_exeext
++ if eval \${$as_ac_Search+:} false; then :
++ break
++fi
++done
++if eval \${$as_ac_Search+:} false; then :
+
+- fi
++else
++ eval "$as_ac_Search=no"
++fi
++rm conftest.$ac_ext
++LIBS=$ac_func_search_save_LIBS
++fi
++eval ac_res=\$$as_ac_Search
++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
++$as_echo "$ac_res" >&6; }
++eval ac_res=\$$as_ac_Search
++if test "$ac_res" != no; then :
++ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
++else
++ have_functions=no
+ fi
+-done
+
++ test $have_functions = no && break
++ done
++ if test $have_functions = yes; then
++
++$as_echo "#define HAVE_XATTRS 1" >>confdefs.h
++
++ else
++ test "$with_xattrs" = yes && as_fn_error $? "xattr support requested but not found." "$LINENO" 5
++ fi
+ fi
+
+
+--- tar-1.27.1/lib/xattr-at.h 2013-03-14 21:18:10.000000000 +0100
++++ tar-1.27.1/lib/xattr-at.h 2013-03-14 21:18:10.000000000 +0100
+@@ -20,7 +20,15 @@
+ #define XATTRS_AT_H
+
+ #include <sys/types.h>
+-#include <attr/xattr.h>
++#if defined(HAVE_SYS_XATTR_H)
++# include <sys/xattr.h>
++#elif defined(HAVE_ATTR_XATTR_H)
++# include <attr/xattr.h>
++#endif
++
++#ifndef ENOATTR
++# define ENOATTR ENODATA /* No such attribute */
++#endif
+
+ /* These are the dir-fd-relative variants of the functions without the
+ "at" suffix. For example, setxattrat (AT_FDCWD, path, name, value, size,
diff --git a/app-arch/tar/tar-1.27.1-r1.ebuild b/app-arch/tar/tar-1.27.1-r1.ebuild
new file mode 100644
index 000000000000..140f537c4538
--- /dev/null
+++ b/app-arch/tar/tar-1.27.1-r1.ebuild
@@ -0,0 +1,79 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-arch/tar/tar-1.27.1-r1.ebuild,v 1.1 2014/01/10 08:05:48 polynomial-c Exp $
+
+EAPI="3"
+
+inherit flag-o-matic eutils
+
+DESCRIPTION="Use this to make tarballs :)"
+HOMEPAGE="http://www.gnu.org/software/tar/"
+SRC_URI="mirror://gnu/tar/${P}.tar.bz2
+ mirror://gnu-alpha/tar/${P}.tar.bz2"
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="acl minimal nls selinux static userland_GNU xattr"
+
+RDEPEND="acl? ( virtual/acl )
+ selinux? ( sys-libs/libselinux )"
+DEPEND="${RDEPEND}
+ nls? ( >=sys-devel/gettext-0.10.35 )
+ xattr? ( sys-apps/attr )"
+
+src_prepare() {
+ EPATCH_OPTS="-Z" \
+ epatch "${FILESDIR}/${P}-xattr_build_fix.patch"
+ epatch "${FILESDIR}/${P}-recursion_norecursion.patch"
+ if ! use userland_GNU ; then
+ sed -i \
+ -e 's:/backup\.sh:/gbackup.sh:' \
+ scripts/{backup,dump-remind,restore}.in \
+ || die "sed non-GNU"
+ fi
+}
+
+src_configure() {
+ use static && append-ldflags -static
+ FORCE_UNSAFE_CONFIGURE=1 \
+ econf \
+ --enable-backup-scripts \
+ --bindir="${EPREFIX}"/bin \
+ --libexecdir="${EPREFIX}"/usr/sbin \
+ $(usex userland_GNU "" "--program-prefix=g") \
+ $(use_with acl posix-acls) \
+ $(use_enable nls) \
+ $(use_with selinux) \
+ $(use_with xattr xattrs)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+
+ local p=$(usex userland_GNU "" "g")
+ if [[ -z ${p} ]] ; then
+ # a nasty yet required piece of baggage
+ exeinto /etc
+ doexe "${FILESDIR}"/rmt || die
+ fi
+
+ # autoconf looks for gtar before tar (in configure scripts), hence
+ # in Prefix it is important that it is there, otherwise, a gtar from
+ # the host system (FreeBSD, Solaris, Darwin) will be found instead
+ # of the Prefix provided (GNU) tar
+ if use prefix ; then
+ dosym tar /bin/gtar
+ fi
+
+ dodoc AUTHORS ChangeLog* NEWS README* THANKS
+ newman "${FILESDIR}"/tar.1-1.27 ${p}tar.1
+ mv "${ED}"/usr/sbin/${p}backup{,-tar}
+ mv "${ED}"/usr/sbin/${p}restore{,-tar}
+
+ if use minimal ; then
+ find "${ED}"/etc "${ED}"/*bin/ "${ED}"/usr/*bin/ \
+ -type f -a '!' '(' -name tar -o -name ${p}tar ')' \
+ -delete
+ fi
+}