On 03/23/2011 06:00 PM, Steve Blackwell wrote:
Specifically the install section. I'm not understanding how the %install section works with the %files section. I hope this is not considered OT.
Let's say I want my rpm to install the file "hello" in /tmp on a target system. The %prep and %build sections work OK and create my hello file in BUILD/hello-1. (Why BUILD/hello-1 and not just BUILD I don't know but for now it doesn't matter.)
The install and files sections of my spec file look like this: (Obviously %{name} is defined as hello)
%install cp %{name} $RPM_BUILD_ROOT/
%files %defattr(-,root,root,-) /tmp/hello
%BuildRoot is defined (by default) to be %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
What's with the XXXXX? The cp works as expected but then an error occurs saying:
Extracting debug info ... blah ... blah... ... error: File not found: /home/steve/rpmbuild/BUILDROOT/hello-1-1.fc12.i386/tmp/hello
I feel like I'm missing the big picture here. I'd appreciate any direct help or pointers to some good explanation. I've read a bunch of docs but they have not helped in this case.
Thanks, Steve
See these (long) URL's (sorry, my mail client broke each URL into 3 lines):
http://www.google.com/url?sa=t&source=web&cd=3&ved=0CCIQFjAC&...
http://www.google.com/url?sa=t&source=web&cd=1&ved=0CBgQFjAA&...
Centos (RHEL) rpmbuild tutorial- Part 1 http://www.google.com/url?sa=t&source=web&cd=1&ved=0CBgQFjAA&...
Centos (RHEL) rpmbuild tutorial- Part 2 http://www.google.com/url?sa=t&source=web&cd=2&ved=0CB0QFjAB&...