Bug 73378 - change in /bin/file output causes fine-requires to generate invalid data
Summary: change in /bin/file output causes fine-requires to generate invalid data
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm-build
Version: 8.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-09-03 19:18 UTC by Phil D'Amore
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-09-29 21:41:31 UTC
Embargoed:


Attachments (Terms of Use)

Description Phil D'Amore 2002-09-03 19:18:13 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc3) Gecko/20020524

Description of problem:
In prior releases, a file like the following:

: # use -*- perl -*-
    eval 'exec perl -S $0 ${1+"$@"}'
        if $running_under_some_shell;

would cause /usr/bin/file to return:

/usr/sbin/cfdoc: English text

Which would of course cause find-requires to ignore the file since it did not
have the word script in the output.  Note that the cfdoc file is marked as
executable, so RPM does hand it off for evaluation.

In (null), /usr/bin/file returns:

./cfdoc: shell archive or script for antique kernel text

Which causes find-requires to evaluate the file, only it gets confused.  When I
run that file through find requires, I get:

[root@foo sbin]# /usr/lib/rpm/find-requires
./cfdoc

:
[root@foo sbin]# 

This causes RPM to emit the following when it runs find-requires during a build:

Finding  Provides: /usr/lib/rpm/find-provides
Finding  Requires: /usr/lib/rpm/find-requires
error: line 215: Dependency tokens must begin with alpha-numeric, '_' or '/': -
First build for internal RH IS use.

error: Failed to find Requires:
PreReq: /sbin/chkconfig /sbin/service /bin/sh /bin/sh
rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1
Requires(interp): /bin/sh /bin/sh
Requires(rpmlib): rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
Requires(post): /bin/sh
Requires(preun): /bin/sh

And no Requires: is generated.  RPM is having some problems with the (bad)
output from find-requires.

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


How reproducible:
Always

Steps to Reproduce:
1.  Create a RPM that includes a file with the perl hack of the form:

: # use -*- perl -*-
    eval 'exec perl -S $0 ${1+"$@"}'
        if $running_under_some_shell;

2.  build RPM on a (null) box
	

Expected Results:  The find-requires script either needs to ignore this file or
somehow parse it properly.  In my mind, this syntax is archaic enough and the
process of finding the interpreter inconsistant enough that ignoring it may be
acceptable.

Additional info:

Comment 1 Bill Nottingham 2005-09-29 21:41:31 UTC
Closing bugs on older, no longer supported, releases. Apologies for any lack of
response.

For RPM issues, please try a current release such as Fedora Core 4; if bugs
persist, please open a new issue.


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