file added to rpm as zero bytes

Eran Ben Natan eranb at celltick.com
Wed May 1 05:15:54 UTC 2013


Strange indeed.

You can try to use install instead of %{__cp}. I don't know if it's
matter, but I think it's worth a try.

You can also try to remove the * in the %files.

 

From: rpm-list-bounces at lists.rpm.org
[mailto:rpm-list-bounces at lists.rpm.org] On Behalf Of Bohne, Andrew
Sent: Wednesday, May 01, 2013 12:00 AM
To: rpm-list at lists.rpm.org
Subject: file added to rpm as zero bytes

 

Hello,

 

I've been pulling my hair out of an issue with an RPM I'm trying to
build.

 

In my %install section I have the following lines consecutively:

 

    %{__cp} -a bin/%{name} ${RPM_BUILD_ROOT}%{_bindir}/%{name}

    %{__cp} -a bin/%{name} ${RPM_BUILD_ROOT}%{_bindir}/%{name}-2

 

And in the %files section I have

 

%attr(0755,root,root) %{_bindir}/*

 

The files are both added to the rpm in the correct spot, but
%{_bindir}/%{name} is added as a 0 byte file, while %{_bindir}/%{name}-2
is added as the correct size.  The source file is a shell script if that
has any bearing on the matter.

 

Andy Bohne

Sr. Linux Systems Administrator

Penn Mutual Life Insurance

Office: (215) 957-7413  Mobile: (215) 450-9561

 

This message, including any attachments, is intended only for the
recipient(s) named above. It may contain confidential and privileged
information. If you have received this communication in error, please
notify the sender immediately and destroy or delete the original
message. Also, please be aware that if you are not the intended
recipient, any review, disclosure, copying, distribution or any action
or reliance based on this message is prohibited by law.



This mail was received via Mail-SeCure System.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-list/attachments/20130501/91179a03/attachment-0001.html>


More information about the Rpm-list mailing list