Bug 57470 - find-requires uses bad awk constructs
Summary: find-requires uses bad awk constructs
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: rpm
Version: 1.0
Hardware: i386
OS: Linux
high
high
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-12-13 14:03 UTC by Bernhard Rosenkraenzer
Modified: 2008-05-01 15:38 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-12-17 06:26:19 UTC
Embargoed:


Attachments (Terms of Use)

Description Bernhard Rosenkraenzer 2001-12-13 14:03:58 UTC
Description of Problem:
I'm getting this after building any rpm with 4.0.4-0.2:
Finding  Requires: (using /usr/lib/rpm/find-requires)...
awk: cmd. line:8:       (START==1) && (LIBNAME!="") && ($4!="") && 
(($4~/^GLIBC_*/) || ($4~/^GCC_)) {
awk: cmd. line:8:
            ^ unterminated regexp
awk: cmd. line:9:       (START==1) && (LIBNAME!="") && ($4!="") && 
(($4~/^GLIBC_*/) || ($4~/^GCC_)) {
awk: cmd. line:9:
                     ^ unexpected newline
awk: cmd. line:9:           print LIBNAME "(" $4 ")";
awk: cmd. line:9:                                   ^ parse error
awk: cmd. line:11:      /^$/ { START=0; }
awk: cmd. line:11:           ^ parse error
awk: cmd. line:11:      /^$/ { START=0; }
awk: cmd. line:11:                    ^ parse error
awk: cmd. line:8:       (START==1) && (LIBNAME!="") && ($4!="") && 
(($4~/^GLIBC_*/) || ($4~/^GCC_)) {
awk: cmd. line:8:
            ^ unterminated regexp
awk: cmd. line:9:       (START==1) && (LIBNAME!="") && ($4!="") && 
(($4~/^GLIBC_*/) || ($4~/^GCC_)) {
awk: cmd. line:9:
                     ^ unexpected newline
awk: cmd. line:9:           print LIBNAME "(" $4 ")";
awk: cmd. line:9:                                   ^ parse error
awk: cmd. line:11:      /^$/ { START=0; }
awk: cmd. line:11:           ^ parse error
awk: cmd. line:11:      /^$/ { START=0; }
awk: cmd. line:11:                    ^ parse error
awk: cmd. line:8:       (START==1) && (LIBNAME!="") && ($4!="") && 
(($4~/^GLIBC_*/) || ($4~/^GCC_)) {
awk: cmd. line:8:
            ^ unterminated regexp
awk: cmd. line:9:       (START==1) && (LIBNAME!="") && ($4!="") && 
(($4~/^GLIBC_*/) || ($4~/^GCC_)) {
awk: cmd. line:9:
                     ^ unexpected newline
awk: cmd. line:9:           print LIBNAME "(" $4 ")";
awk: cmd. line:9:                                   ^ parse error
awk: cmd. line:11:      /^$/ { START=0; }
awk: cmd. line:11:           ^ parse error
awk: cmd. line:11:      /^$/ { START=0; }
awk: cmd. line:11:                    ^ parse error
awk: cmd. line:8:       (START==1) && (LIBNAME!="") && ($4!="") && 
(($4~/^GLIBC_*/) || ($4~/^GCC_)) {
awk: cmd. line:8:
            ^ unterminated regexp
awk: cmd. line:9:       (START==1) && (LIBNAME!="") && ($4!="") && 
(($4~/^GLIBC_*/) || ($4~/^GCC_)) {
awk: cmd. line:9:
                     ^ unexpected newline
awk: cmd. line:9:           print LIBNAME "(" $4 ")";
awk: cmd. line:9:                                   ^ parse error
awk: cmd. line:11:      /^$/ { START=0; }
awk: cmd. line:11:           ^ parse error
awk: cmd. line:11:      /^$/ { START=0; }
awk: cmd. line:11:                    ^ parse error
awk: cmd. line:8:       (START==1) && (LIBNAME!="") && ($4!="") && 
(($4~/^GLIBC_*/) || ($4~/^GCC_)) {
awk: cmd. line:8:
            ^ unterminated regexp
awk: cmd. line:9:       (START==1) && (LIBNAME!="") && ($4!="") && 
(($4~/^GLIBC_*/) || ($4~/^GCC_)) {
awk: cmd. line:9:
                     ^ unexpected newline
awk: cmd. line:9: print LIBNAME "(" $4 ")";
awk: cmd. line:9:                                   ^ parse error
awk: cmd. line:11:      /^$/ { START=0; }
awk: cmd. line:11:           ^ parse error
awk: cmd. line:11:      /^$/ { START=0; }
awk: cmd. line:11:                    ^ parse error
awk: cmd. line:8:       (START==1) && (LIBNAME!="") && ($4!="") && 
(($4~/^GLIBC_*/) || ($4~/^GCC_)) {
awk: cmd. line:8:
            ^ unterminated regexp
awk: cmd. line:9:       (START==1) && (LIBNAME!="") && ($4!="") && 
(($4~/^GLIBC_*/) || ($4~/^GCC_)) {
awk: cmd. line:9:
                     ^ unexpected newline
awk: cmd. line:9:           print LIBNAME "(" $4 ")";
awk: cmd. line:9:                                   ^ parse error
awk: cmd. line:11:      /^$/ { START=0; }
awk: cmd. line:11:           ^ parse error
awk: cmd. line:11:      /^$/ { START=0; }
awk: cmd. line:11:                    ^ parse error
awk: cmd. line:8:       (START==1) && (LIBNAME!="") && ($4!="") && 
(($4~/^GLIBC_*/) || ($4~/^GCC_)) {
awk: cmd. line:8:
            ^ unterminated regexp
awk: cmd. line:9:       (START==1) && (LIBNAME!="") && ($4!="") && 
(($4~/^GLIBC_*/) || ($4~/^GCC_)) {
awk: cmd. line:9:
                     ^ unexpected newline
awk: cmd. line:9:           print LIBNAME "(" $4 ")";
awk: cmd. line:9:                                   ^ parse error
awk: cmd. line:11:      /^$/ { START=0; }
awk: cmd. line:11:           ^ parse error
awk: cmd. line:11:      /^$/ { START=0; }
awk: cmd. line:11:                    ^ parse error


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

How Reproducible:
100%

Steps to Reproduce:
1. Update to the current rawhide tree
2. rpm -ba anything.spec
3. Watch the errors

Actual Results:
see above

Expected Results:
builds as expected, and lists the correct requirements.

Marked as priority high because it may cause binary packages to list bad 
dependencies.

Comment 1 sean 2001-12-16 19:20:19 UTC
The problem is about line 85 of find-requires:

(START==1) && (LIBNAME!="") && ($4!="") && (($4~/^GLIBC_*/) || ($4~/^GCC_)) {

The regular expression /GCC_   isn't terminated.  But how?  Just a /  or */  ??

Comment 2 Bill Crawford 2001-12-17 06:26:14 UTC
This is a duplicate of
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=57291 ...

I think it should just be / not */ as we'd otherwise match "GCC.INTERNAL" which
I'm guessing isn't relevant ... Jeff?

Comment 3 Jeff Johnson 2001-12-19 19:11:10 UTC
Fixed in rpm-4.0.4-0.3


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