Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 7 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

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

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

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

share|improve this answer

Your Answer


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.