I am taking a Red Hat exam that is offline. I am having issues remembering the syntax for an RPM SPEC file.

Can anyone suggest how to retrieve an example or some documentation that should already be in the system? Cannot seem to find anything like that.

(This is not cheating. We are allowed to use anything on the system.)

  • Yes, but you should already know how to find any documentation on the system. – Shawn J. Goff Oct 13 '11 at 22:53
  • @Shawn, I do but does not hurt to ask for tips. There has been a few times where I found nice examples by chance. Please, give your suggestion below. :-) – Belmin Fernandez Oct 14 '11 at 0:50

If you run emacs foo.spec that will create a spec file with the basic layout. That is part of the emacs-common package which will hopefully be installed. If you don't know emacs, just run that command, hit ctrl+x+s to save it then ctrl+x+c to exit then you can open the spec in your favorite editor.

CentOS 5 has /usr/share/doc/rpm- which contains some basic info. It comes with the rpm rpm which should be installed on any server. CentOS 6 will have something installed in a similar location.

If you poke around /usr/lib/rpm there might be useful stuff in there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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