auto-import grep-2.5.1-17 from grep-2.5.1-17.src.rpm

This commit is contained in:
cvsdist 2004-09-09 05:53:23 +00:00
parent 45a556bf99
commit 438e8dfad3
3 changed files with 95 additions and 86 deletions

View File

@ -1,5 +1,5 @@
--- grep-2.5.1/doc/grep.1.manpage 2002-01-22 13:20:04.000000000 +0000 --- grep-2.5.1/doc/grep.1.manpage 2003-06-10 10:04:14.000000000 +0100
+++ grep-2.5.1/doc/grep.1 2003-10-08 09:37:32.000000000 +0100 +++ grep-2.5.1/doc/grep.1 2003-06-10 10:05:16.000000000 +0100
@@ -191,6 +191,7 @@ @@ -191,6 +191,7 @@
.I PATTERN .I PATTERN
as a list of fixed strings, separated by newlines, as a list of fixed strings, separated by newlines,
@ -8,12 +8,3 @@
.BR \-P ", " \-\^\-perl-regexp .BR \-P ", " \-\^\-perl-regexp
Interpret Interpret
.I PATTERN .I PATTERN
@@ -302,7 +303,7 @@
This is especially useful for tools like zgrep, e.g.
.B "gzip -cd foo.gz |grep --label=foo something"
.TP
-.BR \-\^\-line-buffering
+.BR \-\^\-line-buffered
Use line buffering, it can be a performance penality.
.TP
.BR \-q ", " \-\^\-quiet ", " \-\^\-silent

View File

@ -1,48 +1,42 @@
--- grep-2.5.1/lib/posix/regex.h.oi 2004-01-05 12:09:12.984391131 +0000 https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=72641 (sent upstream)
+++ grep-2.5.1/lib/posix/regex.h 2004-01-05 12:09:24.717990622 +0000
@@ -109,6 +109,10 @@ --- grep-2.5.1/src/grep.c.oi 2002-10-13 20:58:55.000000000 +0100
If not set, \{, \}, {, and } are literals. */ +++ grep-2.5.1/src/grep.c 2002-10-13 21:02:43.000000000 +0100
#define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1) @@ -533,6 +533,37 @@
{
+/* If this bit is set, then ignore case when matching. size_t match_size;
+ If not set, then case is significant. */ size_t match_offset;
+#define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1) + if(match_icase)
+ {
+ char *buf = (char*) xmalloc (lim - beg);
+ char *ibeg = buf;
+ char *ilim = ibeg + (lim - beg);
+ int i;
+ for (i = 0; i < lim - beg; i++)
+ ibeg[i] = tolower (beg[i]);
+ +
/* If this bit is set, +, ? and | aren't recognized as operators. + while ((match_offset = (*execute) (ibeg, lim - beg, &match_size, 1))
If not set, they are. */ + != (size_t) -1)
#define RE_LIMITED_OPS (RE_INTERVALS << 1) + {
--- grep-2.5.1/src/search.c.oi 2004-01-05 12:07:00.550199415 +0000 + char const *b = ibeg + match_offset;
+++ grep-2.5.1/src/search.c 2004-01-05 12:07:00.566197505 +0000 + if (b == lim)
@@ -31,7 +31,7 @@ + break;
+ if (match_size == 0)
#include "system.h" + break;
#include "grep.h" + if(color_option)
-#include "regex.h" + printf("\33[%sm", grep_color);
+#include <regex.h> + fwrite(b, sizeof (char), match_size, stdout);
#include "dfa.h" + if(color_option)
#include "kwset.h" + fputs("\33[00m", stdout);
#include "error.h" + fputs("\n", stdout);
@@ -190,7 +190,7 @@ + ibeg = b + match_size;
size_t total = size; + }
char const *motif = pattern; + free (buf);
+ lastout = lim;
- re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE); + if(line_buffered)
+ re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE | (match_icase ? RE_ICASE : 0)); + fflush(stdout);
dfasyntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE, match_icase, eolbyte); + return;
+ }
/* For GNU regex compiler we have to pass the patterns separately to detect while ((match_offset = (*execute) (beg, lim - beg, &match_size, 1))
@@ -268,12 +268,12 @@ != (size_t) -1)
{
if (strcmp (matcher, "awk") == 0)
{
- re_set_syntax (RE_SYNTAX_AWK);
+ re_set_syntax (RE_SYNTAX_AWK | (match_icase ? RE_ICASE : 0));
dfasyntax (RE_SYNTAX_AWK, match_icase, eolbyte);
}
else
{
- re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+ re_set_syntax (RE_SYNTAX_POSIX_EGREP | (match_icase ? RE_ICASE : 0));
dfasyntax (RE_SYNTAX_POSIX_EGREP, match_icase, eolbyte);
}

View File

@ -1,20 +1,22 @@
%define beta %nil %define beta %nil
%define rel 7.8 %define rel 17
Summary: The GNU versions of grep pattern matching utilities. Summary: The GNU versions of grep pattern matching utilities.
Name: grep Name: grep
Version: 2.5.1 Version: 2.5.1
%if "%{beta}" != "" %if "%{beta}" != ""
Release: 3.%{beta}.%{rel} Release: 4.%{beta}.%{rel}
%else %else
Release: %{rel} Release: %{rel}
%endif %endif
License: GPL License: GPL
Group: Applications/Text Group: Applications/Text
Source: ftp://ftp.gnu.org/pub/gnu/grep/grep-%{version}%{beta}.tar.bz2 Source: ftp://ftp.gnu.org/pub/gnu/grep/grep-%{version}%{beta}.tar.bz2
Patch0: grep-2.5-i18n.patch Patch0: grep-2.5.1-oi.patch
Patch1: grep-2.5.1-oi.patch Patch1: grep-2.5-i18n.patch
Patch2: grep-2.5.1-gofast.patch Patch2: grep-2.5.1-manpage.patch
Patch3: grep-2.5.1-manpage.patch # This patch isn't applied; it doesn't work (but shows where the problem is.)
Patch3: grep-2.5.1-gofast.patch
Patch4: grep-2.5.1-efgrep.patch
Prefix: %{_prefix} Prefix: %{_prefix}
Prereq: /sbin/install-info Prereq: /sbin/install-info
Buildroot: %{_tmppath}/%{name}-%{version}-root Buildroot: %{_tmppath}/%{name}-%{version}-root
@ -32,10 +34,11 @@ utility for searching through text.
%prep %prep
%setup -q -n %{name}-%{version}%{beta} %setup -q -n %{name}-%{version}%{beta}
%patch0 -p1 -b .i18n %patch0 -p1 -b .oi
%patch1 -p1 -b .oi %patch1 -p1 -b .i18n
%patch2 -p1 -b .gofast %patch2 -p1 -b .manpage
%patch3 -p1 -b .manpage #%patch3 -p1 -b .gofast
%patch4 -p1 -b .efgrep
%build %build
[ ! -e configure ] && ./autogen.sh [ ! -e configure ] && ./autogen.sh
@ -79,37 +82,58 @@ fi
%{_mandir}/*/* %{_mandir}/*/*
%changelog %changelog
* Mon Jan 5 2004 Tim Waugh <twaugh@redhat.com> 2.5.1-7.8 * Thu Sep 18 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-17
- Fixed -o -i properly in a way that avoids glibc bug #112869. - Use symlinks for egrep/fgrep, rather than shell script wrappers.
* Wed Dec 10 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-7.7 * Fri Jun 27 2003 Tim Waugh <twaugh@redhat.com>
- Another multibyte efficiency bug-fix (bug #111800). - Fix debuginfo package.
* Mon Dec 8 2003 Tim Waugh <twaugh@redhat.com> * Fri Jun 27 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-16.1
- Fixed -o -i properly (bug #111489). - Rebuilt.
* Sat Dec 6 2003 Tim Waugh <twaugh@redhat.com> * Fri Jun 27 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-16
- Another bug-fix for UTF-8 speed-up patch (bug #111614). - Finally give up on making grep go fast. :-(
* Fri Nov 21 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-7.6 * Thu Jun 26 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-15.1
- Fixed man page (bug #106267). - Rebuilt.
- Fixed another three multibyte efficiency bugs.
- Fixed debuginfo package.
* Thu Jun 26 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-7.5 * Thu Jun 26 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-15
- Fixed grep -i bug introduced by cache. - Fixed grep -i bug introduced by cache.
* Mon Jun 23 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-7.4 * Mon Jun 23 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-14.1
- Rebuilt.
* Mon Jun 23 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-14
- Redo the gofast patch (bug #97785). - Redo the gofast patch (bug #97785).
* Thu Jun 12 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-7.3 * Thu Jun 12 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-13.1
- Fixed a bug in the gofast patch (bug #97226). - Rebuilt.
* Tue Jun 10 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-7.2 * Thu Jun 12 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-13
- Fixed a bug in the gofast patch (bug #97266).
* Tue Jun 10 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-12.1
- Rebuilt.
* Tue Jun 10 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-12
- Go faster (bug #69900). - Go faster (bug #69900).
- Fix man page.
* Thu May 29 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-7.1 * Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Thu May 29 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-10.1
- Rebuilt.
* Thu May 29 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-10
- Use system regex again.
* Thu May 29 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-9
- Fixed bug in go-fast patch.
* Wed May 28 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-8
- Go fast (bug #69900). - Go fast (bug #69900).
- Run test suite.
* Wed Jan 22 2003 Tim Powers <timp@redhat.com> 2.5.1-7 * Wed Jan 22 2003 Tim Powers <timp@redhat.com> 2.5.1-7
- rebuilt - rebuilt