I'm attempting to create an RPM from a spec file that was provided here:


Having not used rpm much, I assume that I execute the command rpmbuild and point it at the spec file.

rpmbuild sauron.spec
error: File /root/rpmbuild/SOURCES/sauron-0.7.3.tar.gz: No such file or directory

Since it appears that the rpmbulid utility expects files to be located in a certain location, I copy them there.

tree ~/rpmbuild/
├── RPMS
│   └── sauron-0.7.3.tar.gz
│   └── sauron.spec

I've tried executing the rpmbuild command from ~ , ~/rpmbuild/SPECS and other directories, yet I'm not able to create the RPM. There is no output or logging that would indicate what the problem might me.

This should be a simple task, yet even with google, I'm not able to figure it out. Can anyone offer guidance on how to build this RPM?

1 Answer 1


First, you really shouldn't do this as root, because badly made spec files can do bad things. But you've got it basically right.

Then, pretty much all you are missing is that you need one of the -b build options — probably -ba (for "build all"... see the rpmbuild man page for more... it's explained pretty reasonably, I think). That will generate both binary and source RPMs.

So: rpmbuild -ba sauron.spec should do it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .