Super User is a question and answer site for computer enthusiasts and power users. 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

when I perfrom rpm -ba /usr/src/redhat/SPECS/my_spec.spec

as described here the output not include the Wrote: /root/rpmbuild/SRPMS/ please advice why?

remark under /usr/src/redhat/RPMS I not see the

 [root@linux /usr/src/redhat/SOURCES]#  rpm -ba   /usr/src/redhat/SPECS/my_spec.spec
 Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/
 Wrote: /root/rpmbuild/SRPMS/

my spec file

Summary: An example tool. To show a simple rpm build of the tool.
Version: 6.2
Release: 2
Group: Development/Debuggers
License: OtherLicense
share|improve this question

Try with rpmbuild command. I dont think rpm has an "-ba" option.

share|improve this answer

You did not specify the version of RedHat or CentOS linux that you're using. rpm -ba option was removed from rpm many years ago. So, presuming you're using RHEL 5.x or CentOS 5.x or later, you need to use rpmbuild command to build your RPMs

However: It appears you're following some kind of a book or manual in your rpm study. This source of information is very outdated if it suggests using rpm -ba to build RPMs. I think you'd better find a more recent book or manual, since RPM has evolved considerably in the recent years. You can start with rpmbuild man page or see the list of available documentation on RPM web site.

share|improve this answer

The spec file seems broken, the build_root should be a directory. The source is a bare file name, not a full path. And so on.

Install rpm-build, that package provides a lot of infrastructure for creating RPMs. If you open xyz.spec in {x,}emacs, it opens a template (dunno for vim or such). The Fedora RM guide is mandatory reading. It helps to get a source package (select something simple, stand-aloneish like bison or even git; hopefully something you already know how to build) and dissect its source RPM.

share|improve this answer

You must log in to answer this question.

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