LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Problem with rpmbuild and template.spec file (https://www.linuxquestions.org/questions/linux-software-2/problem-with-rpmbuild-and-template-spec-file-386882/)

abefroman 11-27-2005 12:18 AM

Problem with rpmbuild and template.spec file
 
What could be wrong with my template.spec file?

I've been working on this about 12 hours and I am at a loss, any help/ideas on this would be greatly appreciated!


I get the errors:
root@serv1/# rpmbuild -bb /VZSNAP/template.spec
Processing files: test-template-20051127-1-1
error: Two files on one line: /vz/template/test/test1-1-1.package
error: File must begin with "/": rpm
error: Two files on one line: /vz/template/test/test1-1-1.package
error: File must begin with "/": is
error: Two files on one line: /vz/template/test/test1-1-1.package
error: File must begin with "/": not
error: Two files on one line: /vz/template/test/test1-1-1.package
error: File must begin with "/": installed
error: File must begin with "/": .vz.rpm
error: Two files on one line: /vz/template/test/test2-1-1.package
error: File must begin with "/": rpm
error: Two files on one line: /vz/template/test/test2-1-1.package
error: File must begin with "/": is
error: Two files on one line: /vz/template/test/test2-1-1.package
error: File must begin with "/": not
error: Two files on one line: /vz/template/test/test2-1-1.package
error: File must begin with "/": installed
error: File must begin with "/": .vz.rpm


RPM build errors:
Two files on one line: /vz/template/test/test1-1-1.package
File must begin with "/": rpm
Two files on one line: /vz/template/test/test1-1-1.package
File must begin with "/": is
Two files on one line: /vz/template/test/test1-1-1.package
File must begin with "/": not
Two files on one line: /vz/template/test/test1-1-1.package
File must begin with "/": installed
File must begin with "/": .vz.rpm
Two files on one line: /vz/template/test/test2-1-1.package
File must begin with "/": rpm
Two files on one line: /vz/template/test/test2-1-1.package
File must begin with "/": is
Two files on one line: /vz/template/test/test2-1-1.package
File must begin with "/": not
Two files on one line: /vz/template/test/test2-1-1.package
File must begin with "/": installed
File must begin with "/": .vz.rpm
root@serv1:/#

My template.spec file looks like:
root@serv1:/# cat VZSNAP/template.spec

# we do not need neither compress nor strip nor rpm's intellegence
# in auto finding provides/requires
%define __spec_install_post :
%define __find_provides %{nil}
%define __find_requires %{nil}

%define _rpmdir /
%define _rpmfilename /VZSNAP/test-template-20051127-1-1.%%{ARCH}.rpm

Name: test-template-20051127
Summary: test template
License: Commercial
Version: 1
Release: 1
Group: Virtuozzo/Templates
BuildRoot: /VZSNAP/work
AutoReq: 0
AutoProv: 0

%description
test Virtuozzo Template

%files -f /VZSNAP/files.lst.4rpm.

%post
cd /vz/template/test/test1-1-1 && cpio --extract --file=/vz/template/test/test1-1-1.cpio --make-directories --owner=apache:apache --preserve-modification-time --no-absolute-filenames && chmod -R ugo+r . && (find . -type d | xargs chmod ugo+x) && rm -f /vz/template/test/test1-1-1.cpio
cd /vz/template/test/test2-1-1 && cpio --extract --file=/vz/template/test/test2-1-1.cpio --make-directories --owner=apache:apache --preserve-modification-time --no-absolute-filenames && chmod -R ugo+r . && (find . -type d | xargs chmod ugo+x) && rm -f /vz/template/test/test2-1-1.cpio

%preun
rm -rf /vz/template/test/test1-1-1
rm -rf /vz/template/test/test2-1-1



%changelog
* Sun Nov 27 2005 <root@serv1.nikolaicom>
- built

Which would me the line it is choking on is:
cd /vz/template/test/test1-1-1 && cpio --extract --file=/vz/template/test/test1-1-1.cpio --make-directories --owner=apache:apache --preserve-modification-time --no-absolute-filenames && chmod -R ugo+r . && (find . -type d | xargs chmod ugo+x) && rm -f /vz/template/test/test1-1-1.cpio

Where is it reading the erroneous 2 file names from? From the error message it almost looks like it trying to read the file:
rpm is not installed .vz.rpm

Which rpm might it be looking for thats not installed?


All times are GMT -5. The time now is 04:06 PM.