Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.)

share|improve this question
    
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. :-) –  Beaming Mel-Bin Oct 14 '11 at 0:50
add comment

1 Answer

up vote 2 down vote accepted

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-4.4.2.3/spec 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.

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.