1

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

http://sauron.jyu.fi/docs/manual/x191.html

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/
/root/rpmbuild/
├── BUILD
├── BUILDROOT
├── RPMS
├── SOURCES
│   └── sauron-0.7.3.tar.gz
├── SPECS
│   └── sauron.spec
└── SRPMS

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?

2

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.

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.