Bug 73378 - change in /bin/file output causes fine-requires to generate invalid data
change in /bin/file output causes fine-requires to generate invalid data
Status: CLOSED UPSTREAM
Product: Red Hat Linux
Classification: Retired
Component: rpm-build (Show other bugs)
8.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-09-03 15:18 EDT by Phil D'Amore
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-29 17:41:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Phil D'Amore 2002-09-03 15:18:13 EDT
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 17:41:31 EDT
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.