I would like to generate a rpm package using cpack.
I’m using install(DIRECTORY … DESTINATION …) to also install a bunch of prebuild jar files.
But after rpm generation the packed jar files got modified and don’t have the same checksum as the original prebuild ones.
This is a problem, because later on I’m checking the checksums of the jar files.
Changing the files from .jar to e.g. .jar.bak and installing them will prevent the modification.
install(FILES … DESTINATION …) has the same behaviour.
Am I missing something?
Tested with latest version cmake-3.29.6-linux-x86_64
Edit:
I tested it with a lot of other file extensions and only jar seems to be affected.
CPack RPM may not be the culprit here.
CPack RPM is using rpmbuild command to build RPM, rpmbuild may do some “jar repacking” which implies the checksum change.
Thank you very much, this was the part I was missing. Now I don’t have a checksum missmatch anymore.
Excuse my lack of knowlege here, was relativly new to rpm packaging.