diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-03-28 05:39:47 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-03-28 05:39:47 +0000 |
commit | e811e5f1bdcef200c8676b0175120491e72aacd4 (patch) | |
tree | 660b62dac533e95ef0060b42b9403cd3b942a5db /sys-apps/attr | |
parent | old (diff) | |
download | gentoo-2-e811e5f1bdcef200c8676b0175120491e72aacd4.tar.gz gentoo-2-e811e5f1bdcef200c8676b0175120491e72aacd4.tar.bz2 gentoo-2-e811e5f1bdcef200c8676b0175120491e72aacd4.zip |
Grab fix from upstream #127547 by TGL.
(Portage version: 2.1_pre7-r2)
Diffstat (limited to 'sys-apps/attr')
-rw-r--r-- | sys-apps/attr/ChangeLog | 8 | ||||
-rw-r--r-- | sys-apps/attr/attr-2.4.28-r1.ebuild | 55 | ||||
-rw-r--r-- | sys-apps/attr/files/attr-2.4.28-list-compat-segv.patch | 74 | ||||
-rw-r--r-- | sys-apps/attr/files/digest-attr-2.4.28-r1 | 1 |
4 files changed, 137 insertions, 1 deletions
diff --git a/sys-apps/attr/ChangeLog b/sys-apps/attr/ChangeLog index 4f1c5c51fa4e..058b4aa4888f 100644 --- a/sys-apps/attr/ChangeLog +++ b/sys-apps/attr/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-apps/attr # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/attr/ChangeLog,v 1.59 2006/02/19 21:52:01 kumba Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/attr/ChangeLog,v 1.60 2006/03/28 05:39:47 vapier Exp $ + +*attr-2.4.28-r1 (28 Mar 2006) + + 28 Mar 2006; Mike Frysinger <vapier@gentoo.org> + +files/attr-2.4.28-list-compat-segv.patch, +attr-2.4.28-r1.ebuild: + Grab fix from upstream #127547 by TGL. 19 Feb 2006; Joshua Kinard <kumba@gentoo.org> attr-2.4.24.ebuild: Marked stable on mips. diff --git a/sys-apps/attr/attr-2.4.28-r1.ebuild b/sys-apps/attr/attr-2.4.28-r1.ebuild new file mode 100644 index 000000000000..f93c86e5d94e --- /dev/null +++ b/sys-apps/attr/attr-2.4.28-r1.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/attr/attr-2.4.28-r1.ebuild,v 1.1 2006/03/28 05:39:47 vapier Exp $ + +inherit eutils + +DESCRIPTION="Extended attributes tools" +HOMEPAGE="http://oss.sgi.com/projects/xfs/" +SRC_URI="ftp://oss.sgi.com/projects/xfs/download/cmd_tars/${P}.src.tar.gz + ftp://xfs.org/mirror/SGI/cmd_tars/${P}.src.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="nls" + +DEPEND=">=sys-apps/portage-2.0.47-r10 + nls? ( sys-devel/gettext ) + sys-devel/libtool" +RDEPEND="" + +src_unpack() { + unpack ${A} + cd "${S}" + epatch "${FILESDIR}"/${PN}-2.4.24-only-symlink-when-needed.patch + epatch "${FILESDIR}"/${P}-list-compat-segv.patch #127547 + sed -i \ + -e "/^PKG_DOC_DIR/s:=.*:= /usr/share/doc/${PF}:" \ + include/builddefs.in \ + || die "failed to update builddefs" +} + +src_compile() { + export OPTIMIZER=${CFLAGS} + export DEBUG=-DNDEBUG + + econf \ + $(use_enable nls gettext) \ + --libexecdir=/usr/$(get_libdir) \ + --bindir=/bin \ + || die + emake || die +} + +src_install() { + make DIST_ROOT="${D}" install install-lib install-dev || die + # the man-pages packages provides the man2 files + rm -r "${D}"/usr/share/man/man2 + prepalldocs + + # move shared libs to / + dodir /$(get_libdir) + mv "${D}"/usr/$(get_libdir)/libattr.so* "${D}"/$(get_libdir)/ || die + gen_usr_ldscript libattr.so +} diff --git a/sys-apps/attr/files/attr-2.4.28-list-compat-segv.patch b/sys-apps/attr/files/attr-2.4.28-list-compat-segv.patch new file mode 100644 index 000000000000..b73d7797899b --- /dev/null +++ b/sys-apps/attr/files/attr-2.4.28-list-compat-segv.patch @@ -0,0 +1,74 @@ +Fix a possible segfault from the attr list compat interfaces, +thanks to Simon Munton. + +http://bugs.gentoo.org/127547 + +--- attr/libattr/libattr.c 2006/01/12 23:53:25 1.12 ++++ attr/libattr/libattr.c 2006/02/22 02:54:28 1.13 +@@ -268,7 +268,7 @@ attr_list(const char *path, char *buffer + attrlist_cursor_t *cursor) + { + const char *l; +- int length, count = 0; ++ int length, vlength, count = 0; + char lbuf[MAXLISTLEN]; + char name[MAXNAMELEN+16]; + unsigned int start_offset, end_offset; +@@ -293,14 +293,14 @@ attr_list(const char *path, char *buffer + if (api_unconvert(name, l, flags)) + continue; + if (flags & ATTR_DONTFOLLOW) +- length = lgetxattr(path, l, NULL, 0); ++ vlength = lgetxattr(path, l, NULL, 0); + else +- length = getxattr(path, l, NULL, 0); +- if (length < 0 && (errno == ENOATTR || errno == ENOTSUP)) ++ vlength = getxattr(path, l, NULL, 0); ++ if (vlength < 0 && (errno == ENOATTR || errno == ENOTSUP)) + continue; + if (count++ < cursor->opaque[0]) + continue; +- if (attr_list_pack(name, length, buffer, buffersize, ++ if (attr_list_pack(name, vlength, buffer, buffersize, + &start_offset, &end_offset)) { + cursor->opaque[0] = count; + break; +@@ -314,7 +314,7 @@ attr_listf(int fd, char *buffer, const i + attrlist_cursor_t *cursor) + { + const char *l; +- int c, count = 0; ++ int length, vlength, count = 0; + char lbuf[MAXLISTLEN]; + char name[MAXNAMELEN+16]; + unsigned int start_offset, end_offset; +@@ -325,22 +325,22 @@ attr_listf(int fd, char *buffer, const i + } + bzero(buffer, sizeof(attrlist_t)); + +- c = flistxattr(fd, lbuf, sizeof(lbuf)); +- if (c < 0) +- return c; ++ length = flistxattr(fd, lbuf, sizeof(lbuf)); ++ if (length < 0) ++ return length; + + start_offset = sizeof(attrlist_t); + end_offset = buffersize & ~(8-1); /* 8 byte align */ + +- for (l = lbuf; l != lbuf + c; l = strchr(l, '\0') + 1) { ++ for (l = lbuf; l != lbuf + length; l = strchr(l, '\0') + 1) { + if (api_unconvert(name, l, flags)) + continue; +- c = fgetxattr(fd, l, NULL, 0); +- if (c < 0 && (errno == ENOATTR || errno == ENOTSUP)) ++ vlength = fgetxattr(fd, l, NULL, 0); ++ if (vlength < 0 && (errno == ENOATTR || errno == ENOTSUP)) + continue; + if (count++ < cursor->opaque[0]) + continue; +- if (attr_list_pack(name, c, buffer, buffersize, ++ if (attr_list_pack(name, vlength, buffer, buffersize, + &start_offset, &end_offset)) { + cursor->opaque[0] = count; + break; diff --git a/sys-apps/attr/files/digest-attr-2.4.28-r1 b/sys-apps/attr/files/digest-attr-2.4.28-r1 new file mode 100644 index 000000000000..1ae412814bd0 --- /dev/null +++ b/sys-apps/attr/files/digest-attr-2.4.28-r1 @@ -0,0 +1 @@ +MD5 4fe11d4221199e51f6eeeee37d5dd84c attr-2.4.28.src.tar.gz 106506 |