Running things through rpmbuild seemed to be the ticket. I was originally running everything through mock, which was apparently swallowing a flawed sed statement later on in the spec file. When I ran the spec in rpmbuild -bi I saw that this sed statement was failing and basically truncating $RPM_BUILD_ROOT{%_bindir}/%{name}. Thanks for the help! -----Original Message----- From: rpm-list-bounces@xxxxxxxxxxxxx [mailto:rpm-list-bounces@xxxxxxxxxxxxx] On Behalf Of Alice Wonder Sent: Tuesday, April 30, 2013 7:29 PM To: General discussion about the RPM package manager Subject: Re: file added to rpm as zero bytes On Tue, 2013-04-30 at 20:59 +0000, Bohne, Andrew wrote: > 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. That is odd. Have you tried doing a rpmbuild -bi and inspecting the files in the buildroot? Also, minor nitpick, when two files are identical I usually prefer to make one a symlink to the other. Maybe there's a valid reason why you are not but that seems to be the norm. e.g. cp -a bin/%{name} %{buildroot}%{_bindir}/%{name} ln -sf %{name} %{buildroot}%{_bindir}/%{name}-2 Minor nitpick 2 - I prefer not to use %{name} in a filelist because if you change the name of the package, it breaks the filelist. e.g. you come out with foo v3 but you want foo v2 to be installable as well side by side, so you change the name of foo v2 package from foo to foo2 and rebuild. _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxxxxx https://urldefense.proofpoint.com/v1/url?u=http://lists.rpm.org/mailman/listinfo/rpm-list&k=KVUtgpoSG44yv0fnThBWMQ%3D%3D%0A&r=wji7GPKkU2Lozj5vnYRqWIiFX6dnc78hNVnyBXMrnZo%3D%0A&m=X1uZ3EqL4TsM8c%2ByTtSXJ4IiUcxVzEl%2BiyAlFGkey8U%3D%0A&s=bf749c2f62f5ca792df12f9d288f9ea1fcd47031cbdb45e46146c407d0caf04f 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. _______________________________________________ Rpm-list mailing list Rpm-list@xxxxxxxxxxxxx http://lists.rpm.org/mailman/listinfo/rpm-list