linux RPM打包时出错,求助!!!
spec文件内容:
1 Summary: A test spec file for build rpm package 2 Name: php_rpm_test 3 Version: 1.0.1 4 Release: 1%{?dist} 5 License: Commercial 6 Group: Development/Languages 7 Source0: %{name}-%{version}.tar.gz 8 BuildRoot: %{_tmppath}/%{name}-root 9 Requires: php >= 5.2- 10 %define www /home/qianhaiqing/ 11 %define pear /usr/lib/php/pear 12 13 %description 14 php_rpm_test is a test package. It only show vistor's ip address. 15 16 %prep 17 %setup -q 18 19 %build 20 21 %install 22 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT 23 install -d $RPM_BUILD_ROOT%{www} 24 install -d $RPM_BUILD_ROOT%{pear} 25 cp -rf index.tar.gz $RPM_BUILD_ROOT%{www} 26 27 %files 28 %defattr(-, root, root) 29 %{www} 30 31 %changelog~
$ rpmbuild -bb test.specExecuting(%prep): /bin/sh -e /var/tmp/rpm-tmp.94011+ umask 022+ cd /usr/src/redhat/BUILD+ LANG=C+ export LANG+ unset DISPLAY+ cd /usr/src/redhat/BUILD+ rm -rf php_rpm_test-1.0.1+ /bin/gzip -dc /usr/src/redhat/SOURCES/php_rpm_test-1.0.1.tar.gz+ tar -xf -tar: index.php: Cannot open: File existstar: Error exit delayed from previous errorserror: Bad exit status from /var/tmp/rpm-tmp.94011 (%prep)RPM build errors: Bad exit status from /var/tmp/rpm-tmp.94011 (%prep)[qianhaiqing@nginx+tomcat SPECS]$ sudo rpmbuild -bb test.specExecuting(%prep): /bin/sh -e /var/tmp/rpm-tmp.53914+ umask 022+ cd /usr/src/redhat/BUILD+ LANG=C+ export LANG+ unset DISPLAY+ cd /usr/src/redhat/BUILD+ rm -rf php_rpm_test-1.0.1+ /bin/gzip -dc /usr/src/redhat/SOURCES/php_rpm_test-1.0.1.tar.gz+ tar -xf -+ STATUS=0+ '[' 0 -ne 0 ']'+ cd php_rpm_test-1.0.1/var/tmp/rpm-tmp.53914: line 36: cd: php_rpm_test-1.0.1: No such file or directoryerror: Bad exit status from /var/tmp/rpm-tmp.53914 (%prep)RPM build errors: Bad exit status from /var/tmp/rpm-tmp.53914 (%prep)