Brian Stansberry [
https://community.jboss.org/people/brian.stansberry] commented on the
document
"Single Installation Patching"
To view all comments on this document, visit:
https://community.jboss.org/docs/DOC-47500#comment-11204
--------------------------------------------------
Jeff Mesnil wrote:
I have been working on the patch CLI command to patch an AS7 installation and add to
tweak the code related to module to be able to generate a correct patch generated by
diffing 2 AS7 installations.
When comparing modules to check whether they have been updated, computing the dir's
checksum is not correct:
* Jar files generated during AS7 build can not have the same checksum since the creation
date of the class files is store in the jar's zip entries.
=> this concerns AS7's own modules (org/jboss/as/...) and also jandex jars for 3rd
party libraries
To circumvent that, instead of computing the SHA-1 of the jar files, I compute the
checksum of the file's zip entries name/size/crc (ie I exclude the date metadata).
I also need to exclude some entries from the jar:
* Some java sources are generated at build time (logger and bundle classes) and embed
their generation date into the code => the .class files have different size and crc
* META-INF/MANIFEST.MF and pom.properties files also contains the jar creation date =>
these files have different size and crc
When I replied to this before, I fear I came off more negative about it than I intended.
I don't think it's the right thing to do when generating a cumulative patch.
I'm not sure if it's the right thing to do with no way to turn it off when
generating a one-off patch. But I can certainly imagine people preparing those would find
it very useful to have a configurable option to do a generate-by-diff patch instead of a
specified-content patch without having these kinds of date issues leading to irrelevant
stuff ending up in the patch.
--------------------------------------------------