Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 21450 - find-requires breaks on makefiles
find-requires breaks on makefiles
Product: Red Hat Linux
Classification: Retired
Component: rpm-build (Show other bugs)
i386 Linux
low Severity low
: ---
: ---
Assigned To: Jeff Johnson
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2000-11-28 17:30 EST by Need Real Name
Modified: 2005-10-31 17:00 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-02-21 14:08:59 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2000-11-28 17:30:08 EST
I built an RPM and tried to install it but got the error message

"error: failed dependancies
     all: is needed by pkg"

Upon investigation, I discovered that a makefile was included in the RPM
with "all" as the target on the first line.  The makefile also had execute
permissions set.  The output from "file makefile" is "make commands text",
so it was being treated as a script in find-requires.

Anyway, here is a patch if you want it, compared against RedHat 6.2.  The
problem was still there on 7 though.

--- find-requires.old  Wed Mar  1 15:24:58 2000
+++ find-requires       Tue Nov 28 17:23:20 2000
@@ -22,7 +22,9 @@

 for f in $scriptlist; do
     if [ -x $f ]; then
-       head -1 $f | sed -e 's/^\#\![   ]*//' | cut -d" " -f1
+       if `head -1 $f | grep '^\#\!' > /dev/null`; then
+           head -1 $f | sed -e 's/^\#\![       ]*//' | cut -d" " -f1
+       fi
 done | sort -u
Comment 1 Bill Nottingham 2000-11-29 16:17:31 EST
Why are your Makefiles marked executable?
(They won't get picked up by find-requires if they aren't...)
Comment 2 Need Real Name 2000-11-29 16:56:08 EST
It is there with exec permissions because we copy a whole directory, and then we
do a global chmod on the contents.  Essentially we are to lazy to specify the
files individually.

Just because we are careless in that regard doesn't mean that the script
shouldn't do the right thing however.

This patch is better and much less annoying.

--- find-requires.old  Wed Mar  1 15:24:58 2000
+++ find-requires       Wed Nov 29 09:31:37 2000
@@ -22,7 +22,7 @@

 for f in $scriptlist; do
     if [ -x $f ]; then
-       head -1 $f | sed -e 's/^\#\![   ]*//' | cut -d" " -f1
+        head -1 $f | grep '^\#\!' | sed -e 's/^\#\![   ]*//' | cut -d" " -f1
 done | sort -u
Comment 3 Jeff Johnson 2001-02-21 14:08:55 EST
Changing component.
Comment 4 Jeff Johnson 2001-05-24 09:37:27 EDT
This isn't important enogh to fix in rpm.

However, if you wish to configure your own find-requires, then do
	mkdir -p /etc/rpm
	cp /usr/lib/rpm/find-requires /etc/rpm/find-requires
	<... apply your patch ...>
	echo "%_find_requires /etc/rpm/find-requires" >> /etc/rpm/macros

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