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

Which man page describes the usage of the top-level RPM spec file macros that are defined in RPM source files directly? I mean, %setup, %buildroot and the like, which are not in /usr/lib/rpm. Looking up the %setup options in a tutorial at or searching through the source code isn't best of convenience.

share|improve this question

The Fedora Project hosts the best documentation on RPM out there in html format:

See also:

Prior to these resources, my go to guide was Maximum RPM (which you also found):

share|improve this answer
Yep, Fedora guide seems to be very well written! Should pay more attention to these 'drafts', as they seem better written than some 'normal' documentation. – badbishop Feb 2 '13 at 7:39
I never did find anything in the Fedora Draft Documentation to describe the parameters for %setup. The link to the coverage in "Maximum RPM" is: – Mark Edington Jul 7 at 21:35

There is no man page for that, but you can create a minimal spec file using rpmdev-newspec from rpmdevtools package.

share|improve this answer

As far as I am aware no such documentation exists within the man pages. Even if you review all the items available in the rpmbuild and rpm man pages it does not detail those directives.

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.