Bug 111489 - fix for #72641 is wrong
fix for #72641 is wrong
Status: CLOSED ERRATA
Product: Red Hat Linux
Classification: Retired
Component: grep (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-12-04 09:29 EST by neilus
Modified: 2007-04-18 12:59 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-03-18 11:13:09 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch from Google cache of grep CVS archive (since Savannah is down - cracked) (1.09 KB, patch)
2003-12-04 09:32 EST, neilus
no flags Details | Diff

  None (edit)
Description neilus 2003-12-04 09:29:58 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.5)
Gecko/20031007

Description of problem:
Now, if the pattern contains uppercase chars the text is not matched;
if the text contains uppercase chars they are coerced to lowercase in
the output!


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. echo ab  | grep -i -o ab
2. echo AB  | grep -i -o ab
3. echo ab  | grep -i -o AB
4. echo AB  | grep -i -o AB

Actual Results:  1. ab
2. ab
3.
4.


Expected Results:  1. ab
2. AB
3. ab
4. AB


Additional info:

http://savannah.gnu.org/patch/?func=detailitem&item_id=1940
seems to have a correct fix (tested)
Comment 1 neilus 2003-12-04 09:32:50 EST
Created attachment 96344 [details]
patch from Google cache of grep CVS archive (since Savannah is down - cracked)
Comment 2 Tim Waugh 2003-12-04 10:43:40 EST
Patch doesn't work.  Case (2) gives no output.
Comment 3 neilus 2003-12-05 10:19:42 EST
Red Hat 8.0 glibc 2.3.2-4.80.6 kernel 2.4.20-20.8 i686:

patch -d src < 96344.patch
patch -p1 < grep-2.5-i18n.patch
./configure --without-included-regex && make

all cases pass
Comment 4 Tim Waugh 2003-12-05 11:01:23 EST
No, try with current fedora/development package.  Case (2) fails.
Comment 5 neilus 2003-12-05 13:13:24 EST
ok, if you apply the patches in the spec file; then apply the attached
patch; then comment out the body of your 2.5.1-oi patch - all cases
pass.  the gofast patch currently fails without your oi patch.
Comment 6 Tim Waugh 2003-12-05 13:15:14 EST
What do you mean by 'comment out the body'?
Comment 7 neilus 2003-12-05 13:32:56 EST
the -oi patch only adds lines to grep.c.  i mean comment out the lines
it adds (after applying all patches) - 543-574 in grep.c.
Comment 8 Tim Waugh 2003-12-05 13:59:29 EST
Oh, you mean just don't apply it?  Okay, I'll try that.
Comment 9 Tim Waugh 2003-12-08 05:19:12 EST
Nope, patch fails.  Try it in a UTF-8 locale.
Comment 10 Tim Waugh 2003-12-08 06:15:25 EST
I fixed it by only setting .translate when MB_CUR_MAX==1.
Comment 11 Tim Waugh 2003-12-08 07:52:44 EST
Fixed package is grep-2.5.1-22.
Comment 12 neilus 2003-12-19 13:11:05 EST
Tried -23.  The patched seemed to work in a UTF-8 locale without your
change.  Anyway, -23 works fine.
Comment 13 Tim Waugh 2004-01-05 07:19:06 EST
Fedora Core 1 update is grep-2.5.1-17.4.

However, this seems to tickle a glibc bug (bug #112869), so rawhide
will shortly have another version of this -o -i patch that makes use
of RE_ICASE instead.

Leaving open for the time being; this is something that would be nice
to fix for Red Hat Linux 9 too.
Comment 14 Tim Powers 2004-03-18 11:13:09 EST
An errata has been issued which should help the problem described in this bug report. 
This report is therefore being closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, please follow the link below. You may reopen 
this bug report if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2004-083.html
Comment 15 Jay Turner 2004-09-01 22:13:26 EDT
An errata has been issued which should help the problem 
described in this bug report. This report is therefore being 
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, 
please follow the link below. You may reopen this bug report 
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2004-079.html

Note You need to log in before you can comment on or make changes to this bug.