A quick overview, what I'm doing is bundling a nodejs application using enclose.js into a single binary, then using rpmbuild to turn the whole project with config files into a single package. Everything is fine before packaging but there's a binary file that gets corrupted after the result rpm is installed. That file is a 40MB binary while the rpm is 52MB but after installation the binary extracted is only 15MB.This is my spec file: Name: PackagerVersion: 2.0Release: 0License: ProprietaryGroup: System/ExtrasDistribution: Linux CentOSPackager: Ammar Lakis <ammar.lakis@gmail.com>Requires: mongodb-serverSummary: A quick packager%descriptionPackage made for packaging%buildcd %{my_source}npm run build%installcp -r %{my_source}/pkg/ $RPM_BUILD_ROOT%postsystemctl enable packager%files/usr/bin/packager/usr/bin/packager-tools/etc/packagerand the building process is done with this commandrpmbuild -bb --define 'my_source /root/Packager/' packager.specIs there anything causing the truncating of the bundled files  ?
Binary file got corrupted after packaging
yum;rpm;rpmbuild
By default, rpmbuild strips binaries and libraries (using /usr/lib/rpm/brp-compress) after they have been placed in the rpm file.  You should be able to disable this by adding to the start of your spec file%global __os_install_post %{nil}