rpm-software-management / deltarpm

Other
21 stars 12 forks source link

Option to validate delta application against uncompressed data md5 #11

Open sydneykwok opened 2 years ago

sydneykwok commented 2 years ago

Hi,

We build rpms using the Nebula rpm plugin for Gradle, which is based on Redline. What we have found is that we are able to create delta rpms with our rpms, but face “md5 mismatch of result” errors upon trying to apply them.

After some investigation, it seems as though this is probably due to the fact that there are differences between how the cpio data is compressed in our original newrpm (built with the nebula plugin/redline) and the newrpmthat deltarpm reconstructs from the delta rpm. So although deltarpm does create the delta rpm correctly, these differences in compression between the original and recreated newrpmresult in md5 mismatches.

We have resolved this issue by computing copies of targetmd5(in makedeltarpm) and wrmd5(in applydeltarpm) that are based on uncompressed, rather than compressed, cpio data. We refer to this as uncompmd5. We are wondering if there would be any interest in adding a command-line option to makedeltarpm and applydeltarpm that would allow for our uncompmd5value to replace targetmd5and wrmd5, respectively. In this way, if the traditional validation fails, users have the option to validate the delta application against this md5 computed with the uncompressed cpio data.

Looking forward to hearing your thoughts. Please let me know if any more information is required, thanks!

AlbertoFernandez-devops commented 1 year ago

Exact same problem here. Can you share the code of the fix please?

Regards

oesolutions commented 1 year ago

@AlbertoFernandez-devops, @sydneykwok made changes in this branch https://github.com/pason-systems/deltarpm/tree/uncomp-md5

AlbertoFernandez-devops commented 1 year ago

Thanks a lot!!