summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-07-02 01:30:25 +0000
committerMike Frysinger <vapier@gentoo.org>2009-07-02 01:30:25 +0000
commitb09426559611f65f395046b68c3d036342fc9279 (patch)
tree4b8e82d9bde4650195758147261a750049c338b6 /sys-apps
parentFixed elog message, bug #272902. (diff)
downloadgentoo-2-b09426559611f65f395046b68c3d036342fc9279.tar.gz
gentoo-2-b09426559611f65f395046b68c3d036342fc9279.tar.bz2
gentoo-2-b09426559611f65f395046b68c3d036342fc9279.zip
Add symlink fixes from upstream #265425 by Radek Podgorny.
(Portage version: 2.2_rc33/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/acl/ChangeLog12
-rw-r--r--sys-apps/acl/acl-2.2.47-r1.ebuild71
-rw-r--r--sys-apps/acl/files/0001-Introduce-new-WALK_TREE_DEREFERENCE_TOPLEVEL-flag.patch53
-rw-r--r--sys-apps/acl/files/0001-Make-sure-that-getfacl-R-only-calls-stat-2-on-symlin.patch47
4 files changed, 181 insertions, 2 deletions
diff --git a/sys-apps/acl/ChangeLog b/sys-apps/acl/ChangeLog
index 3b2ff8395092..560bc3ce139f 100644
--- a/sys-apps/acl/ChangeLog
+++ b/sys-apps/acl/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sys-apps/acl
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/acl/ChangeLog,v 1.99 2008/12/16 17:58:55 jer Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/acl/ChangeLog,v 1.100 2009/07/02 01:30:24 vapier Exp $
+
+*acl-2.2.47-r1 (02 Jul 2009)
+
+ 02 Jul 2009; Mike Frysinger <vapier@gentoo.org>
+ +files/0001-Introduce-new-WALK_TREE_DEREFERENCE_TOPLEVEL-flag.patch,
+ +acl-2.2.47-r1.ebuild,
+ +files/0001-Make-sure-that-getfacl-R-only-calls-stat-2-on-symlin.patch:
+ Add symlink fixes from upstream #265425 by Radek Podgorny.
16 Dec 2008; Jeroen Roovers <jer@gentoo.org> acl-2.2.47.ebuild:
Stable for HPPA (bug #235016).
diff --git a/sys-apps/acl/acl-2.2.47-r1.ebuild b/sys-apps/acl/acl-2.2.47-r1.ebuild
new file mode 100644
index 000000000000..66e779b5b059
--- /dev/null
+++ b/sys-apps/acl/acl-2.2.47-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/acl/acl-2.2.47-r1.ebuild,v 1.1 2009/07/02 01:30:24 vapier Exp $
+
+inherit eutils autotools toolchain-funcs
+
+MY_P="${PN}_${PV}-1"
+DESCRIPTION="Access control list utilities, libraries and headers"
+HOMEPAGE="http://oss.sgi.com/projects/xfs/"
+SRC_URI="ftp://oss.sgi.com/projects/xfs/download/cmd_tars/${MY_P}.tar.gz
+ ftp://xfs.org/mirror/SGI/cmd_tars/${MY_P}.tar.gz
+ nfs? ( http://www.citi.umich.edu/projects/nfsv4/linux/acl-patches/2.2.42-2/acl-2.2.42-CITI_NFS4_ALL-2.dif )"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="nfs nls"
+
+RDEPEND=">=sys-apps/attr-2.4
+ nfs? ( net-libs/libnfsidmap )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+src_unpack() {
+ unpack ${MY_P}.tar.gz
+ cd "${S}"
+ if use nfs ; then
+ cp "${DISTDIR}"/acl-2.2.42-CITI_NFS4_ALL-2.dif . || die
+ sed -i '/^diff --git a.debian.changelog b.debian.changelog/,/^diff --git/d' acl-2.2.42-CITI_NFS4_ALL-2.dif || die
+ epatch acl-2.2.42-CITI_NFS4_ALL-2.dif
+ fi
+ epatch \
+ "${FILESDIR}"/0001-Introduce-new-WALK_TREE_DEREFERENCE_TOPLEVEL-flag.patch \
+ "${FILESDIR}"/0001-Make-sure-that-getfacl-R-only-calls-stat-2-on-symlin.patch #265425
+ epatch "${FILESDIR}"/${PN}-2.2.45-libtool.patch #158068
+ epatch "${FILESDIR}"/${PN}-2.2.45-linguas.patch #205948
+ epatch "${FILESDIR}"/${PN}-2.2.32-only-symlink-when-needed.patch
+ sed -i \
+ -e "/^PKG_DOC_DIR/s:@pkg_name@:${PF}:" \
+ -e '/HAVE_ZIPPED_MANPAGES/s:=.*:=false:' \
+ include/builddefs.in \
+ || die "failed to update builddefs"
+ # libtool will clobber install-sh which is really a custom file
+ mv install-sh acl.install-sh || die
+ AT_M4DIR="m4" eautoreconf
+ mv acl.install-sh install-sh || die
+ strip-linguas po
+}
+
+src_compile() {
+ unset PLATFORM #184564
+ export OPTIMIZER=${CFLAGS}
+ export DEBUG=-DNDEBUG
+
+ econf \
+ $(use_enable nls gettext) \
+ --libexecdir=/usr/$(get_libdir) \
+ --bindir=/bin \
+ || die
+ emake || die
+}
+
+src_install() {
+ emake DIST_ROOT="${D}" install install-dev install-lib || die
+ prepalldocs
+
+ # move shared libs to /
+ dodir /$(get_libdir)
+ mv "${D}"/usr/$(get_libdir)/libacl.so* "${D}"/$(get_libdir)/ || die
+ gen_usr_ldscript libacl.so
+}
diff --git a/sys-apps/acl/files/0001-Introduce-new-WALK_TREE_DEREFERENCE_TOPLEVEL-flag.patch b/sys-apps/acl/files/0001-Introduce-new-WALK_TREE_DEREFERENCE_TOPLEVEL-flag.patch
new file mode 100644
index 000000000000..7f070a899d78
--- /dev/null
+++ b/sys-apps/acl/files/0001-Introduce-new-WALK_TREE_DEREFERENCE_TOPLEVEL-flag.patch
@@ -0,0 +1,53 @@
+http://bugs.gentoo.org/265425
+
+From 1a80c89ee88357137b598fa3357b576933c5746c Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruen@suse.de>
+Date: Tue, 23 Jun 2009 00:17:49 +0200
+Subject: [PATCH] Introduce new WALK_TREE_DEREFERENCE_TOPLEVEL flag
+
+This flag indicates to dereference top-level symlinks. (If non
+top-level symlinks should be stat()ed as well, the
+WALK_TREE_DEREFERENCE flag must be specified.)
+---
+ include/walk_tree.h | 9 +++++----
+ libmisc/walk_tree.c | 4 +++-
+ 2 files changed, 8 insertions(+), 5 deletions(-)
+
+diff --git a/include/walk_tree.h b/include/walk_tree.h
+index 53a8fc5..9f1ec34 100644
+--- a/include/walk_tree.h
++++ b/include/walk_tree.h
+@@ -20,10 +20,11 @@
+ #ifndef __WALK_TREE_H
+ #define __WALK_TREE_H
+
+-#define WALK_TREE_RECURSIVE 0x1
+-#define WALK_TREE_PHYSICAL 0x2
+-#define WALK_TREE_LOGICAL 0x4
+-#define WALK_TREE_DEREFERENCE 0x8
++#define WALK_TREE_RECURSIVE 0x01
++#define WALK_TREE_PHYSICAL 0x02
++#define WALK_TREE_LOGICAL 0x04
++#define WALK_TREE_DEREFERENCE 0x08
++#define WALK_TREE_DEREFERENCE_TOPLEVEL 0x10
+
+ #define WALK_TREE_TOPLEVEL 0x100
+ #define WALK_TREE_SYMLINK 0x200
+diff --git a/libmisc/walk_tree.c b/libmisc/walk_tree.c
+index 2777145..30ff92a 100644
+--- a/libmisc/walk_tree.c
++++ b/libmisc/walk_tree.c
+@@ -78,7 +78,9 @@ static int walk_tree_rec(const char *path, int walk_flags,
+ return func(path, NULL, flags | WALK_TREE_FAILED, arg);
+ if (S_ISLNK(st.st_mode)) {
+ flags |= WALK_TREE_SYMLINK;
+- if (flags & WALK_TREE_DEREFERENCE) {
++ if ((flags & WALK_TREE_DEREFERENCE) ||
++ ((flags & WALK_TREE_TOPLEVEL) &&
++ (flags & WALK_TREE_DEREFERENCE_TOPLEVEL))) {
+ if (stat(path, &st) != 0)
+ return func(path, NULL,
+ flags | WALK_TREE_FAILED, arg);
+--
+1.6.3.3
+
diff --git a/sys-apps/acl/files/0001-Make-sure-that-getfacl-R-only-calls-stat-2-on-symlin.patch b/sys-apps/acl/files/0001-Make-sure-that-getfacl-R-only-calls-stat-2-on-symlin.patch
new file mode 100644
index 000000000000..f3925c76003b
--- /dev/null
+++ b/sys-apps/acl/files/0001-Make-sure-that-getfacl-R-only-calls-stat-2-on-symlin.patch
@@ -0,0 +1,47 @@
+http://bugs.gentoo.org/265425
+
+From 63451a06b7484d220750ed8574d3ee84e156daf5 Mon Sep 17 00:00:00 2001
+From: Andreas Gruenbacher <agruen@suse.de>
+Date: Tue, 23 Jun 2009 00:29:45 +0200
+Subject: [PATCH] Make sure that getfacl -R only calls stat(2) on symlinks when it needs to
+
+This fixes http://oss.sgi.com/bugzilla/show_bug.cgi?id=790
+"getfacl follows symlinks, even without -L".
+---
+ getfacl/getfacl.c | 7 ++++---
+
+diff --git a/getfacl/getfacl.c b/getfacl/getfacl.c
+index fc650e3..b3e6200 100644
+--- a/getfacl/getfacl.c
++++ b/getfacl/getfacl.c
+@@ -70,7 +70,7 @@ struct option long_options[] = {
+ const char *progname;
+ const char *cmd_line_options;
+
+-int walk_flags = WALK_TREE_DEREFERENCE;
++int walk_flags = WALK_TREE_DEREFERENCE_TOPLEVEL;
+ int opt_print_acl;
+ int opt_print_default_acl;
+ int opt_strip_leading_slash = 1;
+@@ -642,7 +642,7 @@ int main(int argc, char *argv[])
+ case 'L': /* follow all symlinks */
+ if (posixly_correct)
+ goto synopsis;
+- walk_flags |= WALK_TREE_LOGICAL;
++ walk_flags |= WALK_TREE_LOGICAL | WALK_TREE_DEREFERENCE;
+ walk_flags &= ~WALK_TREE_PHYSICAL;
+ break;
+
+@@ -650,7 +650,8 @@ int main(int argc, char *argv[])
+ if (posixly_correct)
+ goto synopsis;
+ walk_flags |= WALK_TREE_PHYSICAL;
+- walk_flags &= ~WALK_TREE_LOGICAL;
++ walk_flags &= ~(WALK_TREE_LOGICAL | WALK_TREE_DEREFERENCE |
++ WALK_TREE_DEREFERENCE_TOPLEVEL);
+ break;
+
+ case 's': /* skip files with only base entries */
+--
+1.6.3.3
+