Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to create an rpm of some code which doesn't need to be built. It will just need to run a script when it's installed on the destination system (i.e. I just need the %install portion of the spec file).

I've left both %build and %configure sections of my rpm spec file empty, yet rpmbuild continues to try and execute ./configure with a bunch of parameters.

Does anyone know how I can have rpmbuild create the rpm without trying to run ./configure?

Thanks.

share|improve this question
add comment

4 Answers

up vote 2 down vote accepted

The rpm specfile syntax is confusing. %configure isn't a section like %build is. It's a macro which expands to running ./configure with system-specific parameters. That's what you're seeing. And the solution is easy — remove it, and there you go.

share|improve this answer
    
That did the trick. Thanks. –  infra.user Dec 30 '10 at 23:19
add comment

rpmbuild -ba /path/to/specfile

share|improve this answer
    
Thanks for the response, but that's not what I'm looking for. The command you provided is what I've been running. When I execute that command, it tries to run ./configure (with a bunch of params). For this package, there is no configure script and there is no need to build anything. I need to create an rpm that will run a script when it's installed on the destination system. –  infra.user Dec 30 '10 at 22:11
add comment

If you do rpmbuild --short-circuit -bi /path/to/specfile, it will skip the %prep and %build stages and go straight to the %install stage. That should do what you want.

share|improve this answer
add comment

It's a kludge, but put a noop in %build and %configure ?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.