I just hit this same problem when attempting to build on a RedHat 5.3 server. Here is what I found. The error appears to be caused by an empty RPM_BUILD_ROOT
variable. Below is one offending line:
find "$RPM_BUILD_ROOT" ! -path "${debugdir}/*.debug" -type f
( -perm -0100 -or -perm -0010 -or -perm -0001 )
-print |
If RPM_BUILD_ROOT
hasn t been defined, then the first argument to find is an empty string "", which causes this error. Interestingly enough, if you remove the quotes from around $RPM_BUILD_ROOT
, then command works fine since the first argument would become the "!". Since it s not required to define a "BuildRoot
:" in the spec file, this certainly looks like a bug to me.