438e8d
auto-import grep-2.5.1-17 from grep-2.5.1-17.src.rpm
@@ -1,5 +1,5 @@
|
|
1
|
-
--- grep-2.5.1/doc/grep.1.manpage
|
2
|
-
+++ grep-2.5.1/doc/grep.1 2003-10
|
1
|
+
--- grep-2.5.1/doc/grep.1.manpage 2003-06-10 10:04:14.000000000 +0100
|
2
|
+
+++ grep-2.5.1/doc/grep.1 2003-06-10 10:05:16.000000000 +0100
|
3
3
|
|
4
4
|
.I PATTERN
|
5
5
|
as a list of fixed strings, separated by newlines,
|
@@ -8,12 +8,3 @@
|
|
8
8
|
.BR \-P ", " \-\^\-perl-regexp
|
9
9
|
Interpret
|
10
10
|
.I PATTERN
|
11
|
-
|
12
|
-
This is especially useful for tools like zgrep, e.g.
|
13
|
-
.B "gzip -cd foo.gz |grep --label=foo something"
|
14
|
-
.TP
|
15
|
-
-.BR \-\^\-line-buffering
|
16
|
-
+.BR \-\^\-line-buffered
|
17
|
-
Use line buffering, it can be a performance penality.
|
18
|
-
.TP
|
19
|
-
.BR \-q ", " \-\^\-quiet ", " \-\^\-silent
|
@@ -1,48 +1,42 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=72641 (sent upstream)
|
2
|
+
|
3
|
+
--- grep-2.5.1/src/grep.c.oi 2002-10-13 20:58:55.000000000 +0100
|
4
|
+
+++ grep-2.5.1/src/grep.c 2002-10-13 21:02:43.000000000 +0100
|
5
|
+
|
6
|
-
|
7
|
-
+/* If this bit is set, then ignore case when matching.
|
8
|
-
+ If not set, then case is significant. */
|
9
|
-
+#define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1)
|
10
|
-
+
|
11
|
-
/* If this bit is set, +, ? and | aren't recognized as operators.
|
12
|
-
If not set, they are. */
|
13
|
-
#define RE_LIMITED_OPS (RE_INTERVALS << 1)
|
14
|
-
--- grep-2.5.1/src/search.c.oi 2004-01-05 12:07:00.550199415 +0000
|
15
|
-
+++ grep-2.5.1/src/search.c 2004-01-05 12:07:00.566197505 +0000
|
16
|
-
|
17
|
-
|
18
|
-
#include "system.h"
|
19
|
-
#include "grep.h"
|
20
|
-
-#include "regex.h"
|
21
|
-
+#include <regex.h>
|
22
|
-
#include "dfa.h"
|
23
|
-
#include "kwset.h"
|
24
|
-
#include "error.h"
|
25
|
-
|
26
|
-
size_t total = size;
|
27
|
-
char const *motif = pattern;
|
28
|
-
|
29
|
-
- re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE);
|
30
|
-
+ re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE | (match_icase ? RE_ICASE : 0));
|
31
|
-
dfasyntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE, match_icase, eolbyte);
|
32
|
-
|
33
|
-
/* For GNU regex compiler we have to pass the patterns separately to detect
|
34
|
-
|
35
|
-
|
36
|
-
if (strcmp (matcher, "awk") == 0)
|
37
|
-
{
|
38
|
-
- re_set_syntax (RE_SYNTAX_AWK);
|
39
|
-
+ re_set_syntax (RE_SYNTAX_AWK | (match_icase ? RE_ICASE : 0));
|
40
|
-
dfasyntax (RE_SYNTAX_AWK, match_icase, eolbyte);
|
41
|
-
}
|
42
|
-
else
|
43
6
|
{
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
7
|
+
size_t match_size;
|
8
|
+
size_t match_offset;
|
9
|
+
+ if(match_icase)
|
10
|
+
+ {
|
11
|
+
+ char *buf = (char*) xmalloc (lim - beg);
|
12
|
+
+ char *ibeg = buf;
|
13
|
+
+ char *ilim = ibeg + (lim - beg);
|
14
|
+
+ int i;
|
15
|
+
+ for (i = 0; i < lim - beg; i++)
|
16
|
+
+ ibeg[i] = tolower (beg[i]);
|
17
|
+
+
|
18
|
+
+ while ((match_offset = (*execute) (ibeg, lim - beg, &match_size, 1))
|
19
|
+
+ != (size_t) -1)
|
20
|
+
+ {
|
21
|
+
+ char const *b = ibeg + match_offset;
|
22
|
+
+ if (b == lim)
|
23
|
+
+ break;
|
24
|
+
+ if (match_size == 0)
|
25
|
+
+ break;
|
26
|
+
+ if(color_option)
|
27
|
+
+ printf("\33[%sm", grep_color);
|
28
|
+
+ fwrite(b, sizeof (char), match_size, stdout);
|
29
|
+
+ if(color_option)
|
30
|
+
+ fputs("\33[00m", stdout);
|
31
|
+
+ fputs("\n", stdout);
|
32
|
+
+ ibeg = b + match_size;
|
33
|
+
+ }
|
34
|
+
+ free (buf);
|
35
|
+
+ lastout = lim;
|
36
|
+
+ if(line_buffered)
|
37
|
+
+ fflush(stdout);
|
38
|
+
+ return;
|
39
|
+
+ }
|
40
|
+
while ((match_offset = (*execute) (beg, lim - beg, &match_size, 1))
|
41
|
+
!= (size_t) -1)
|
42
|
+
{
|
@@ -1,20 +1,22 @@
|
|
1
1
|
%define beta %nil
|
2
|
-
%define rel
|
2
|
+
%define rel 17
|
3
3
|
Summary: The GNU versions of grep pattern matching utilities.
|
4
4
|
Name: grep
|
5
5
|
Version: 2.5.1
|
6
6
|
%if "%{beta}" != ""
|
7
|
-
Release:
|
7
|
+
Release: 4.%{beta}.%{rel}
|
8
8
|
%else
|
9
9
|
Release: %{rel}
|
10
10
|
%endif
|
11
11
|
License: GPL
|
12
12
|
Group: Applications/Text
|
13
13
|
Source: ftp://ftp.gnu.org/pub/gnu/grep/grep-%{version}%{beta}.tar.bz2
|
14
|
-
Patch0: grep-2.5-
|
15
|
-
Patch1: grep-2.5
|
16
|
-
Patch2: grep-2.5.1-
|
17
|
-
|
14
|
+
Patch0: grep-2.5.1-oi.patch
|
15
|
+
Patch1: grep-2.5-i18n.patch
|
16
|
+
Patch2: grep-2.5.1-manpage.patch
|
17
|
+
# This patch isn't applied; it doesn't work (but shows where the problem is.)
|
18
|
+
Patch3: grep-2.5.1-gofast.patch
|
19
|
+
Patch4: grep-2.5.1-efgrep.patch
|
18
20
|
Prefix: %{_prefix}
|
19
21
|
Prereq: /sbin/install-info
|
20
22
|
Buildroot: %{_tmppath}/%{name}-%{version}-root
|
@@ -32,10 +34,11 @@ utility for searching through text.
|
|
32
34
|
|
33
35
|
%prep
|
34
36
|
%setup -q -n %{name}-%{version}%{beta}
|
35
|
-
%patch0 -p1 -b .
|
36
|
-
%patch1 -p1 -b .
|
37
|
-
%patch2 -p1 -b .
|
38
|
-
|
37
|
+
%patch0 -p1 -b .oi
|
38
|
+
%patch1 -p1 -b .i18n
|
39
|
+
%patch2 -p1 -b .manpage
|
40
|
+
#%patch3 -p1 -b .gofast
|
41
|
+
%patch4 -p1 -b .efgrep
|
39
42
|
|
40
43
|
%build
|
41
44
|
[ ! -e configure ] && ./autogen.sh
|
@@ -79,37 +82,58 @@ fi
|
|
79
82
|
%{_mandir}/*/*
|
80
83
|
|
81
84
|
%changelog
|
82
|
-
*
|
83
|
-
-
|
85
|
+
* Thu Sep 18 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-17
|
86
|
+
- Use symlinks for egrep/fgrep, rather than shell script wrappers.
|
84
87
|
|
85
|
-
*
|
86
|
-
-
|
88
|
+
* Fri Jun 27 2003 Tim Waugh <twaugh@redhat.com>
|
89
|
+
- Fix debuginfo package.
|
87
90
|
|
88
|
-
*
|
89
|
-
-
|
91
|
+
* Fri Jun 27 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-16.1
|
92
|
+
- Rebuilt.
|
90
93
|
|
91
|
-
*
|
92
|
-
-
|
94
|
+
* Fri Jun 27 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-16
|
95
|
+
- Finally give up on making grep go fast. :-(
|
93
96
|
|
94
|
-
*
|
95
|
-
-
|
97
|
+
* Thu Jun 26 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-15.1
|
98
|
+
- Rebuilt.
|
96
|
-
- Fixed another three multibyte efficiency bugs.
|
97
|
-
- Fixed debuginfo package.
|
98
99
|
|
99
|
-
* Thu Jun 26 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-
|
100
|
+
* Thu Jun 26 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-15
|
100
101
|
- Fixed grep -i bug introduced by cache.
|
101
102
|
|
102
|
-
* Mon Jun 23 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-
|
103
|
+
* Mon Jun 23 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-14.1
|
104
|
+
- Rebuilt.
|
105
|
+
|
106
|
+
* Mon Jun 23 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-14
|
103
107
|
- Redo the gofast patch (bug #97785).
|
104
108
|
|
105
|
-
* Thu Jun 12 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-
|
106
|
-
-
|
109
|
+
* Thu Jun 12 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-13.1
|
110
|
+
- Rebuilt.
|
111
|
+
|
112
|
+
* Thu Jun 12 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-13
|
113
|
+
- Fixed a bug in the gofast patch (bug #97266).
|
107
114
|
|
108
|
-
* Tue Jun 10 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-
|
115
|
+
* Tue Jun 10 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-12.1
|
116
|
+
- Rebuilt.
|
117
|
+
|
118
|
+
* Tue Jun 10 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-12
|
109
119
|
- Go faster (bug #69900).
|
120
|
+
- Fix man page.
|
121
|
+
|
122
|
+
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
|
123
|
+
- rebuilt
|
124
|
+
|
125
|
+
* Thu May 29 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-10.1
|
126
|
+
- Rebuilt.
|
127
|
+
|
128
|
+
* Thu May 29 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-10
|
129
|
+
- Use system regex again.
|
130
|
+
|
131
|
+
* Thu May 29 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-9
|
132
|
+
- Fixed bug in go-fast patch.
|
110
133
|
|
111
|
-
*
|
134
|
+
* Wed May 28 2003 Tim Waugh <twaugh@redhat.com> 2.5.1-8
|
112
135
|
- Go fast (bug #69900).
|
136
|
+
- Run test suite.
|
113
137
|
|
114
138
|
* Wed Jan 22 2003 Tim Powers <timp@redhat.com> 2.5.1-7
|
115
139
|
- rebuilt
|