In a project I am working on, I need to generate a signature from one of my output executable (elf) files using a private key (the signature forms one of the files in the rpm, the private key to do this never leaves the build machine). This is currently done within my makefile as part of the "make", "make install" process outside the rpm system.
However it seems when than making an rpm out of this using rpmbuild, at some point after %build and %install it is further modifying my executable (seems to be removing stuff from .strtab and .symtab for some reason). This means later after installing the rpm the other software I am integrating with rejects my signature data due to the change in the executable file...
Is there some way I can stop rpmbuild from modifying my files, or at least some way to move part of my %build and %install to be after it has made any such changes (so I can recreate signature file).