diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-11-26 20:09:20 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-11-26 20:09:20 +0000 |
commit | 501f4d96532c23066b705acd2640f2f269797dc6 (patch) | |
tree | 02c22fc773fd1164ecb1d4bc48bb44e4e2d29175 /sys-apps/grep | |
parent | rename oi patch (diff) | |
download | gentoo-2-501f4d96532c23066b705acd2640f2f269797dc6.tar.gz gentoo-2-501f4d96532c23066b705acd2640f2f269797dc6.tar.bz2 gentoo-2-501f4d96532c23066b705acd2640f2f269797dc6.zip |
Add patch upstream to fix handling of --devices and fifos #113640 by Ingo van Lil.
(Portage version: 2.0.53_rc7)
Diffstat (limited to 'sys-apps/grep')
-rw-r--r-- | sys-apps/grep/ChangeLog | 9 | ||||
-rw-r--r-- | sys-apps/grep/files/digest-grep-2.5.1-r9 | 1 | ||||
-rw-r--r-- | sys-apps/grep/files/grep-2.5.1-fix-devices-skip.patch | 55 | ||||
-rw-r--r-- | sys-apps/grep/grep-2.5.1-r9.ebuild | 78 |
4 files changed, 142 insertions, 1 deletions
diff --git a/sys-apps/grep/ChangeLog b/sys-apps/grep/ChangeLog index ff533ad01fb5..2e92a5b446b9 100644 --- a/sys-apps/grep/ChangeLog +++ b/sys-apps/grep/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-apps/grep # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/grep/ChangeLog,v 1.53 2005/09/17 00:29:20 ciaranm Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/grep/ChangeLog,v 1.54 2005/11/26 20:09:20 vapier Exp $ + +*grep-2.5.1-r9 (26 Nov 2005) + + 26 Nov 2005; Mike Frysinger <vapier@gentoo.org> + +files/grep-2.5.1-fix-devices-skip.patch, +grep-2.5.1-r9.ebuild: + Add patch upstream to fix handling of --devices and fifos #113640 by Ingo + van Lil. 17 Sep 2005; Ciaran McCreesh <ciaranm@gentoo.org> ChangeLog: Converted to UTF-8, fixed encoding screwups diff --git a/sys-apps/grep/files/digest-grep-2.5.1-r9 b/sys-apps/grep/files/digest-grep-2.5.1-r9 new file mode 100644 index 000000000000..ef03a032aa20 --- /dev/null +++ b/sys-apps/grep/files/digest-grep-2.5.1-r9 @@ -0,0 +1 @@ +MD5 85df024edc9f9689035f6b3de28c7731 grep-2.5.1.tar.gz 683093 diff --git a/sys-apps/grep/files/grep-2.5.1-fix-devices-skip.patch b/sys-apps/grep/files/grep-2.5.1-fix-devices-skip.patch new file mode 100644 index 000000000000..aff800c32d85 --- /dev/null +++ b/sys-apps/grep/files/grep-2.5.1-fix-devices-skip.patch @@ -0,0 +1,55 @@ +http://bugs.gentoo.org/113640 + +2004-11-20 Benno Schulenberg <benno@nietvergeten.nl> (tiny change) + + * src/grep.c (reset): Move the stat check ... + (grepfile): ... here, and also check for a fifo. + +Index: src/grep.c +=================================================================== +RCS file: /cvsroot/grep/grep/src/grep.c,v +retrieving revision 1.83 +retrieving revision 1.84 +diff -u -p -r1.83 -r1.84 +--- src/grep.c 20 Nov 2004 16:15:57 -0000 1.83 ++++ src/grep.c 20 Nov 2004 16:20:38 -0000 1.84 +@@ -255,19 +255,6 @@ reset (int fd, char const *file, struct + bufbeg[-1] = eolbyte; + bufdesc = fd; + +- if (fstat (fd, &stats->stat) != 0) +- { +- error (0, errno, "fstat"); +- return 0; +- } +- if (directories == SKIP_DIRECTORIES && S_ISDIR (stats->stat.st_mode)) +- return 0; +-#ifndef DJGPP +- if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode) || S_ISSOCK(stats->stat.st_mode))) +-#else +- if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode))) +-#endif +- return 0; + if (S_ISREG (stats->stat.st_mode)) + { + if (file) +@@ -928,6 +915,19 @@ grepfile (char const *file, struct stats + } + else + { ++ if (stat (file, &stats->stat) != 0) ++ { ++ suppressible_error (file, errno); ++ return 1; ++ } ++ if (directories == SKIP_DIRECTORIES && S_ISDIR (stats->stat.st_mode)) ++ return 1; ++#ifndef DJGPP ++ if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode) || S_ISSOCK(stats->stat.st_mode) || S_ISFIFO(stats->stat.st_mode))) ++#else ++ if (devices == SKIP_DEVICES && (S_ISCHR(stats->stat.st_mode) || S_ISBLK(stats->stat.st_mode))) ++#endif ++ return 1; + while ((desc = open (file, O_RDONLY)) < 0 && errno == EINTR) + continue; + diff --git a/sys-apps/grep/grep-2.5.1-r9.ebuild b/sys-apps/grep/grep-2.5.1-r9.ebuild new file mode 100644 index 000000000000..65aebe4c7a2e --- /dev/null +++ b/sys-apps/grep/grep-2.5.1-r9.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/grep/grep-2.5.1-r9.ebuild,v 1.1 2005/11/26 20:09:20 vapier Exp $ + +inherit flag-o-matic eutils + +DESCRIPTION="GNU regular expression matcher" +HOMEPAGE="http://www.gnu.org/software/grep/grep.html" +SRC_URI="mirror://gnu/${PN}/${P}.tar.gz + mirror://gentoo/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="build nls pcre static" + +RDEPEND="" +DEPEND="${RDEPEND} + pcre? ( dev-libs/libpcre ) + nls? ( sys-devel/gettext )" + +src_unpack() { + unpack ${A} + cd "${S}" + + # Fix a weird sparc32 compiler bug + echo "" >> src/dfa.h + + epatch "${FILESDIR}"/${PV}-manpage.patch + epatch "${FILESDIR}"/${PV}-manpage-line-buffering.patch + epatch "${FILESDIR}"/${P}-fgrep.patch.bz2 + epatch "${FILESDIR}"/${P}-i18n.patch.bz2 + epatch "${FILESDIR}"/${P}-gofast.patch.bz2 + epatch "${FILESDIR}"/${P}-oi.patch + epatch "${FILESDIR}"/${P}-restrict_arr.patch + epatch "${FILESDIR}"/${PV}-utf8-case.patch + epatch "${FILESDIR}"/${P}-perl-segv.patch #95495 + epatch "${FILESDIR}"/${P}-libintl.patch #92586 + epatch "${FILESDIR}"/${P}-fix-devices-skip.patch #113640 + + # uclibc does not suffer from this glibc bug. + use elibc_uclibc || epatch "${FILESDIR}"/${PV}-tests.patch +} + +src_compile() { + if use static ; then + append-flags -static + append-ldflags -static + fi + + econf \ + --bindir=/bin \ + $(use_enable nls) \ + $(use_enable pcre perl-regexp) \ + || die "econf failed" + + # force static linking so we dont have to move it into / + sed -i \ + -e 's:-lpcre:-Wl,-Bstatic -lpcre -Wl,-Bdynamic:g' \ + src/Makefile || die "sed static pcre failed" + + emake || die "emake failed" +} + +src_install() { + make DESTDIR="${D}" install || die "make install failed" + + # Override the default shell scripts... grep knows how to act + # based on how it's called + ln -sfn grep "${D}"/bin/egrep || die "ln egrep failed" + ln -sfn grep "${D}"/bin/fgrep || die "ln fgrep failed" + + if use build ; then + rm -r "${D}"/usr/share + else + dodoc AUTHORS ChangeLog NEWS README THANKS TODO + fi +} |