Bug 14227

Summary: bash2 range pattern match error and SRPM errors
Product: [Retired] Red Hat Linux Reporter: Karl Hakimian <hakimian>
Component: bashAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-07-27 18:39:41 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
Fix for reported bug none

Description Karl Hakimian 2000-07-18 16:43:03 UTC
There are a couple of problems with bash2 on redhat 6.2. The included
patch to the bash2.spec file in the SRPM fixes them all for me.

1) bash2 does not correctly do pattern matching with a range. For
   example, in a directory containing the following files

A a B b C c

The command

echo [A-Z]*

should return

A B C

but instead returns

A a B b C c

By setting the variable STRCOLL_BROKEN in the config.h the problem goes
away.

2) The SRPM cannot be rebuild with rpm -ba bash2.spec. There are a
   couple of errors in the SRPM.

 a) README does not exist, so the %doc line containing README needs to
    be edited.

 b) The man pages are not compressed, while the man files listed in the
    %files section are.

 c) The man page file list includes ..1.gz which does not exist.


**** CUT HERE ****
*** bash2.spec.orig     Wed Feb  2 12:00:31 2000
--- bash2.spec  Tue Jul 18 09:17:12 2000
***************
*** 1,7 ****
  Summary: The GNU Bourne Again shell (bash) version 2.03.
  Name: bash2
  Version: 2.03
! Release: 8
  Group: System Environment/Shells
  Copyright: GPL
  Source0: ftp://ftp.gnu.org/pub/gnu/bash-%{version}.tar.gz
--- 1,7 ----
  Summary: The GNU Bourne Again shell (bash) version 2.03.
  Name: bash2
  Version: 2.03
! Release: 9
  Group: System Environment/Shells
  Copyright: GPL
  Source0: ftp://ftp.gnu.org/pub/gnu/bash-%{version}.tar.gz
***************
*** 54,59 ****
--- 54,66 ----
  #    ./configure --prefix=$RPM_BUILD_ROOT/usr $RPM_ARCH-redhat-linux
  
  %configure
+ 
+ # Stop the use of strcoll
+ sed 's/.*STRCOLL_BROKEN.*/#define STRCOLL_BROKEN 1/' config.h
>config.h.new
+ chmod 644 config.h.new
+ mv config.h config.h.old
+ mv config.h.new config.h
+ 
  make
  
  %install
***************
*** 91,96 ****
--- 98,105 ----
  1i\
  %defattr(0644,root,man,0755)
  s:^:%{_prefix}/man/man1/:
+ /\/\.$/ d
+ /\/\.\.$/ d
  s/$/.1.gz/
  ' > ../man.pages
  
***************
*** 103,108 ****
--- 112,118 ----
    mv .%{_prefix}/man/man1/bash.1 .%{_prefix}/man/man1/bash2.1
    strip ./bin/* || :
    gzip -9nf .%{_prefix}/info/bash2.info
+   gzip -9nf .%{_prefix}/man/man1/*
    rm -f .%{_prefix}/info/dir
  }
  
***************
*** 129,135 ****
  
  %files -f man.pages
  %defattr(-,root,root)
! %doc CHANGES COMPAT NEWS NOTES README CWRU/POSIX.NOTES
  %doc doc/FAQ doc/INTRO doc/article.ms
  %doc examples/bashdb/ examples/functions/ examples/misc/
  %doc examples/scripts.noah/ examples/scripts.v2/ examples/scripts/
--- 139,145 ----
  
  %files -f man.pages
  %defattr(-,root,root)
! %doc CHANGES COMPAT NEWS NOTES CWRU/POSIX.NOTES
  %doc doc/FAQ doc/INTRO doc/article.ms
  %doc examples/bashdb/ examples/functions/ examples/misc/
  %doc examples/scripts.noah/ examples/scripts.v2/ examples/scripts/
***************
*** 146,151 ****
--- 156,164 ----
  %doc doc/*.ps doc/*.0 doc/*.html doc/article.txt
  
  %changelog
+ * Tue Jul 18 2000 Karl Hakimian <hakimian>
+ - Set STRCOLL_BROKEN flag in config.h so that range pattern match works
again.
+ 
  * Wed Feb 02 2000 Cristian Gafton <gafton>
  - man pages are compressed
  - fix description
**** CUT HERE ****

Comment 1 Karl Hakimian 2000-07-18 16:43:55 UTC
Created attachment 1287 [details]
Fix for reported bug

Comment 2 Bernhard Rosenkraenzer 2000-08-03 09:05:14 UTC
Fixed.