Bug 111489

Summary: fix for #72641 is wrong
Product: [Retired] Red Hat Linux Reporter: neilus <neilus>
Component: grepAssignee: Tim Waugh <twaugh>
Status: CLOSED ERRATA QA Contact: Mike McLean <mikem>
Severity: medium Docs Contact:
Priority: medium    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-03-18 16:13:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch from Google cache of grep CVS archive (since Savannah is down - cracked) none

Description neilus 2003-12-04 14:29:58 UTC
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 14:32:50 UTC
Created attachment 96344 [details]
patch from Google cache of grep CVS archive (since Savannah is down - cracked)

Comment 2 Tim Waugh 2003-12-04 15:43:40 UTC
Patch doesn't work.  Case (2) gives no output.

Comment 3 neilus 2003-12-05 15:19:42 UTC
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 16:01:23 UTC
No, try with current fedora/development package.  Case (2) fails.

Comment 5 neilus 2003-12-05 18:13:24 UTC
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 18:15:14 UTC
What do you mean by 'comment out the body'?

Comment 7 neilus 2003-12-05 18:32:56 UTC
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 18:59:29 UTC
Oh, you mean just don't apply it?  Okay, I'll try that.


Comment 9 Tim Waugh 2003-12-08 10:19:12 UTC
Nope, patch fails.  Try it in a UTF-8 locale.

Comment 10 Tim Waugh 2003-12-08 11:15:25 UTC
I fixed it by only setting .translate when MB_CUR_MAX==1.

Comment 11 Tim Waugh 2003-12-08 12:52:44 UTC
Fixed package is grep-2.5.1-22.

Comment 12 neilus 2003-12-19 18:11:05 UTC
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 12:19:06 UTC
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 16:13:09 UTC
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-02 02:13:26 UTC
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