rpm build error
error message:
/usr/lib/rpm/find-debuginfo.sh /usr/src/redhat/BUILD/RPMS
find: invalid predicate `' error: Bad exit status from /var/tmp/rpm-tmp.86590 (%install)
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 - -or -perm - -or -perm - \) \ -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.
Solutions:
1. Try defining the BuildRoot variable in the spec file.
The find-debuginfo script looks in to that directory several times, and will die without it.
This will usually look something like: BuildRoot: %{_tmpdir}/%{name}-%{version}-%{release}
2. %define debug_package %{nil}