Need help with rpmbuild

Steve Blackwell zephod at cfl.rr.com
Thu Mar 24 01:00:17 UTC 2011


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

-- 
Changing lives one card at a time

http://www.send1cardnow.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 230 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20110323/2f2bb9ad/attachment.bin 


More information about the users mailing list