diff options
author | Roy Marples <uberlord@gentoo.org> | 2006-09-27 16:02:05 +0000 |
---|---|---|
committer | Roy Marples <uberlord@gentoo.org> | 2006-09-27 16:02:05 +0000 |
commit | 82ed48424928656e7d94f89045407d0baf7da7c7 (patch) | |
tree | ca03b8c8beed608a9377b81dbee0d629e15ba3bd /sys-apps | |
parent | new upstream release. (diff) | |
download | gentoo-2-82ed48424928656e7d94f89045407d0baf7da7c7.tar.gz gentoo-2-82ed48424928656e7d94f89045407d0baf7da7c7.tar.bz2 gentoo-2-82ed48424928656e7d94f89045407d0baf7da7c7.zip |
Fix segfaults when -regex foo is the last argument, #149309.
(Portage version: 2.1.2_pre1-r3)
Diffstat (limited to 'sys-apps')
-rw-r--r-- | sys-apps/findutils/ChangeLog | 9 | ||||
-rw-r--r-- | sys-apps/findutils/files/digest-findutils-4.3.1-r1 | 3 | ||||
-rw-r--r-- | sys-apps/findutils/files/findutils-4.3.1-sv-bug-17490.patch | 44 | ||||
-rw-r--r-- | sys-apps/findutils/findutils-4.3.1-r1.ebuild | 67 |
4 files changed, 122 insertions, 1 deletions
diff --git a/sys-apps/findutils/ChangeLog b/sys-apps/findutils/ChangeLog index 3edecad0ade3..1fecaad16eed 100644 --- a/sys-apps/findutils/ChangeLog +++ b/sys-apps/findutils/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-apps/findutils # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/findutils/ChangeLog,v 1.82 2006/09/19 01:06:19 pebenito Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/findutils/ChangeLog,v 1.83 2006/09/27 16:02:05 uberlord Exp $ + +*findutils-4.3.1-r1 (27 Sep 2006) + + 27 Sep 2006; Roy Marples <uberlord@gentoo.org> + +files/findutils-4.3.1-sv-bug-17490.patch, +findutils-4.3.1-r1.ebuild: + Fix segfaults when -regex foo is the last argument, #149309. + Thanks to Michal Januszewski. 19 Sep 2006; Chris PeBenito <pebenito@gentoo.org> +files/findutils-4.3.1-selinux.diff, findutils-4.3.1.ebuild: diff --git a/sys-apps/findutils/files/digest-findutils-4.3.1-r1 b/sys-apps/findutils/files/digest-findutils-4.3.1-r1 new file mode 100644 index 000000000000..6ce1baffc903 --- /dev/null +++ b/sys-apps/findutils/files/digest-findutils-4.3.1-r1 @@ -0,0 +1,3 @@ +MD5 1be385bde801d7bc8e02101f96b8a4ee findutils-4.3.1.tar.gz 1191565 +RMD160 aea3de4834ba7ac501a9af38e2ec3e4bc8663656 findutils-4.3.1.tar.gz 1191565 +SHA256 c298b3afa7c5e6a15aa5015454b106461c8079d6a0bba62bc8a8c2057d0c6612 findutils-4.3.1.tar.gz 1191565 diff --git a/sys-apps/findutils/files/findutils-4.3.1-sv-bug-17490.patch b/sys-apps/findutils/files/findutils-4.3.1-sv-bug-17490.patch new file mode 100644 index 000000000000..5af56836a6f0 --- /dev/null +++ b/sys-apps/findutils/files/findutils-4.3.1-sv-bug-17490.patch @@ -0,0 +1,44 @@ +Index: find/parser.c +=================================================================== +RCS file: /cvsroot/findutils/findutils/find/parser.c,v +retrieving revision 1.92 +diff -u -r1.92 parser.c +--- find/parser.c 20 Aug 2006 20:45:09 -0000 1.92 ++++ find/parser.c 21 Aug 2006 22:33:21 -0000 +@@ -1642,8 +1642,8 @@ + re); + if (error_message) + error (1, 0, "%s", error_message); +- (*arg_ptr)++; + our_pred->est_success_rate = estimate_pattern_match_rate(argv[*arg_ptr], 1); ++ (*arg_ptr)++; + return true; + } + +Index: find/testsuite/Makefile.am +=================================================================== +RCS file: /cvsroot/findutils/findutils/find/testsuite/Makefile.am,v +retrieving revision 1.32 +diff -u -r1.32 Makefile.am +--- find/testsuite/Makefile.am 20 Aug 2006 20:39:48 -0000 1.32 ++++ find/testsuite/Makefile.am 21 Aug 2006 22:33:21 -0000 +@@ -137,6 +137,7 @@ + find.gnu/wholename.exp \ + find.gnu/xtype-symlink.exp \ + find.gnu/sv-bug-12230.exp \ ++find.gnu/sv-bug-17490.exp \ + find.gnu/quit.exp \ + find.gnu/xtype.exp \ + find.posix/and.exp \ +Index: find/testsuite/find.gnu/sv-bug-17490.exp +=================================================================== +RCS file: find/testsuite/find.gnu/sv-bug-17490.exp +diff -N find/testsuite/find.gnu/sv-bug-17490.exp +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ find/testsuite/find.gnu/sv-bug-17490.exp 21 Aug 2006 22:33:21 -0000 +@@ -0,0 +1,5 @@ ++# test for Savannah bug #17490 ++# ++# That bug was a coredump if the argument to -regex was the final argument. ++find_start p {. -maxdepth 0 -regex x } ++ diff --git a/sys-apps/findutils/findutils-4.3.1-r1.ebuild b/sys-apps/findutils/findutils-4.3.1-r1.ebuild new file mode 100644 index 000000000000..c2ecd0695a2f --- /dev/null +++ b/sys-apps/findutils/findutils-4.3.1-r1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/findutils/findutils-4.3.1-r1.ebuild,v 1.1 2006/09/27 16:02:05 uberlord Exp $ + +inherit eutils flag-o-matic toolchain-funcs multilib + +SELINUX_PATCH="findutils-4.3.1-selinux.diff" + +DESCRIPTION="GNU utilities for finding files" +HOMEPAGE="http://www.gnu.org/software/findutils/findutils.html" +# SRC_URI="mirror://gnu/${PN}/${P}.tar.gz mirror://gentoo/${P}.tar.gz" +SRC_URI="ftp://alpha.gnu.org/gnu/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc-macos ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="nls selinux static" + +RDEPEND="selinux? ( sys-libs/libselinux ) + nls? ( virtual/libintl )" +DEPEND="${RDEPEND} + nls? ( sys-devel/gettext )" + +src_unpack() { + unpack ${A} + cd "${S}" + + # Fix segfaults where regex was the last parameter + epatch "${FILESDIR}/${P}-sv-bug-17490.patch" + + # Don't build or install locate because it conflicts with slocate, + # which is a secure version of locate. See bug 18729 + sed -i '/^SUBDIRS/s/locate//' Makefile.in + + # Patches for selinux + use selinux && epatch "${FILESDIR}/${SELINUX_PATCH}" + + if ! has userpriv ${FEATURES} ; then + sed -i '/access.exp/d' find/testsuite/Makefile.in + rm -f find/testsuite/find.gnu/access.{exp,xo} + fi +} + +src_compile() { + use static && append-ldflags -static + + local myconf + use userland_GNU || myconf=" --program-prefix=g" + + if ([[ ${ELIBC} == "glibc" ]] && has_version '>=sys-libs/glibc-2.3') \ + || [[ ${ELIBC} == "uclibc" ]] + then + myconf="${myconf} --without-included-regex" + fi + + econf \ + $(use_enable nls) \ + --libexecdir=/usr/$(get_libdir)/find \ + ${myconf} \ + || die "configure failed" + emake AR="$(tc-getAR)" || die "make failed" +} + +src_install() { + emake DESTDIR="${D}" install || die + dodoc NEWS README TODO ChangeLog +} |