Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rpm build error

Tags:

build

rpm

I tried to build a rpm package which is giving me the following error

  • /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) what could be the reason .can any one help me in this...Thanks
like image 528
newsen Avatar asked Dec 10 '09 09:12

newsen


3 Answers

Try defining the BuildRoot variable in your 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}

As to your second question, I can't say without seeing spec file and sources directly, and I am by no means an RPM expert. I will recommend you to Chapter 13 of Maximum RPM(there are copies available free online), and the notes from Tom Callaway's presentation on How to make good RPM packages - I've found the spec examples here to be very helpful in the past.

like image 65
zerosquid Avatar answered Jan 04 '23 12:01

zerosquid


In your spec you can do this at the top:

%define debug_package %{nil}

This should bypass this problem

like image 45
Corey Henderson Avatar answered Jan 04 '23 10:01

Corey Henderson


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.

like image 39
Kris W Avatar answered Jan 04 '23 10:01

Kris W