bash rpm-requires

Jeff Spaleta jspaleta at gmail.com
Wed Aug 4 18:44:22 UTC 2004


On Wed, 4 Aug 2004 10:43:23 -0700 (PDT), Steve G <linux_4ever at yahoo.com> wrote:
> >Now the question is do you really want rpmbuild to automatically pull in
> >requirements on executables that are used solely in if [ ]  shell logic?
> 
> The requirements should be augmented, not replaced by. Using your example on my
> RH9 machine:

Cough..err um... who cares about what the rh9 machine is giving.
Run it against the fc3test1 with develop tree updates or fc2 and you get the
netscape showing up, when it should not be. Is this a fault of the patch to bash
or the fault of sh2rpms incorrectly seeing netscape inside the if [ -x
] check as being a hard requirement, i've no idea, either way no so
good.

But lets take a look at those extra deps you say exist.
do they really exists as hard deps? Or are that executables buried inside
if statement logic. Once you are dealing with if statements can you
know algorithmicly if
executables called inside those statements are really required? and
non executable files whose existance is queried  really required?  And
your script didnt notice the call to sed at all resulting in a true
from the if that grep is used in. Script logic parsing gets
complicated pretty fast, im not sure how accurate this tool is.

I can see it giving a lot of false positive regarding any executable
used in an optional if clauses.  Netscape and xterm would be the
examples here for fc2 and fc3t1 systems i used. AND it seems it gives
false negatives regarding calls buried in complicated quoted arguments
or command pipes like sed in the xinitrc example in fc2 and fc3t1. 
The false positives arent so much of a problem, but i would be
concerned about people relying heavily on this tool assuming it
catches all actual requires without any false negatives.

The question is, if this tool gives both false positives and false
negatives, is this tool really worth using?  If i have to read through
xinitrc to catch the call to sed anyways, using a --rpm-requires
doesn't save me anytime. If anything if I use this tool, i will be
tempted to believe it and not do the full read-through, that's not
helpful.

Why doesnt exec fvwm2  or exec twm get seen but netscape's call does
on my fc2 and fc3t1 systems? That's disturbing. If its not rebust
enough to understand executables as arguments to builtin functions or
even  created functions like what we see in initscripts thats a huge
problem, its doing nothing more than finding the easiest requires to
find by reading.

-jef"is it worth actually filing a bug report about sed being a hard
requirement for xinitrc?"spaleta





More information about the fedora-devel-list mailing list