I try to create my first RPM, but I get an error. My .rpmmarcos files look like this:
%packager Your Name %_topdir /home/snort/test %_tmppath /home/snort/test/tmp %_smp_mflags -j3 %__arch_install_post /usr/lib/rpm/check-rpaths /usr/lib/rpm/check-buildroot
When I run: "rpmbuild -v -bb SPECS / test.spec" I get this error:
+ STATUS = 0
+ '[' 0 -ne 0 ']'
+ cd test-1 / home / snort / test / tmp / rpm -tmp.55712: line 36: cd: test-1: there is no such file or directory
error: bad exit status from / home / snort / test / tmp / rpm -tmp.55712 (% prep)
The rpm-tmp.55712 file ends with this:
cd '/home/snort/test/BUILD' rm -rf 'test-1' /bin/gzip -dc '/home/snort/test/SOURCES/test-1.c55.tar.gz' | tar -xvvf - STATUS=$? if [ $STATUS -ne 0 ]; then exit $STATUS fi cd 'test-1'
I assume rpmbuild does "rm -rf" test-1 "to remove old / unnecessary directories, then it unpacks the file test-1.c55.tar.gz, then tries" cd test-1 ", but the untar command does not create the directory due to which there are no errors in the scripts, I'm not sure what to do now.
My spec file: more SPECS / test.spec
Name: test Version: 1 Release: .c55 Summary: Just a Test Group: MyJunk License: GPL URL: http://www.somesite.com Source0: test-1.c55.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) %description This is just a test <br> %prep %setup BUILD %build<br> %configure<br> make %{?_smp_mflags}<br> %install<br> rm -rf $RPM_BUILD_ROOT<br> make install DESTDIR=$RPM_BUILD_ROOT <br> %clean<br> rm -rf $RPM_BUILD_ROOT<br> %files %defattr(-,root,root,-) %doc %changelog
Any ideas? thanks for the help
Gary
source share