Difference in binary file sizes after deploying package via yum/rpm

Hi Guys,

I have an issue whereby I package up an rpm and when I deploy it, the binary filesizes differ from what I packaged up from the SOURCE directory.

from source - -rwxrwxr-x 1 user group 685156 Sep 26 15:50 cybAgent.bin

after install - -rwxr-xr-x 1 user group 683388 Oct 16 11:10 cybAgent.bin

Other than the file sizes differing, I had no reason to believe there was an issue but it seems that all the binaries differ in size from what I packages up. Is tried deploying via yum and rpm and the sizes differ in both cases. Is this a known feature?

Thanks,
Gary.

is the smaller binary a stripped binary?

Thanks for such a quick response fpmurphy. I am not entirely sure how to find that out but I googled and seen that rpmbuild strips binaries. One forum advises to set the following at the top of the spec file -

# Turn off strip'ng of binaries
%global __strip /bin/true

Would that be your recommendation to ensure that the binary sizes match those that were in source?

Thanks again,
Gary

The file command will tell you about your binary.

file /usr/bin/ls

Tells you, among a lot of other stuff, about stripped.

Thanks Jim.

Both seem not be stripped which surprised me - I was expecting the smaller one to be stripped.

large file
cybAgent.bin: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped
small file
cybAgent.bin: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped

---------- Post updated at 05:23 PM ---------- Previous update was at 03:39 PM ----------

Hi Guys,

I put the following at the top of my spec file and the rpm deploys the binaries at the exact same size as they were at source.

%global __os_install_post %{nil}

Not entirely sure why this compressions occurs by default but this entry deployed the files at the exact same size.

Thanks,
Gary