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

as described here the output not include the Wrote: /root/rpmbuild/SRPMS/test.sh-6.2-2.rpm please advice why?

remark under /usr/src/redhat/RPMS I not see the test.sh-6.2-2.rpm

 [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/test.sh
 Wrote: /root/rpmbuild/SRPMS/test.sh-6.2-2.src.rpm

my spec file

Summary: An example tool. To show a simple rpm build of the tool.
Name: test.sh
Version: 6.2
Release: 2
Source:/root/test.sh
Group: Development/Debuggers
BuildRoot:/var/tmp/test.sh
License: OtherLicense
%description
link|improve this question
feedback

2 Answers

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

link|improve this answer
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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