On Thu 17 Apr 2008 at 08:48AM, Trevor Watson wrote:
> Hi Dan,
>
> Dan Price wrote:
> >Stephen mentioned to today that we need a jar file hashing algorithm.
>
> Can you explain what the requirement/use-case is for jar file hashing?
Same as for elf hashing; building the same jar file twice in a row
tends to not hash to the same value, which is a problem when you're
trying to be efficient in upgrading.
> >I did a quick look at what our ON "wsdiff" tool does-- it breaks the
> >jar up using 'jar xf', removes the MANIFEST.MF file (for reasons not
> >clear to me), and then basically does a brute force comparison of the
> >directory
> >trees.
>
> How does it generate the hash though?
It doesn't, it's a diff tool.
> Depending on your answer for the use-case/requirements of this hash, I'd be
> inclined to include the date_time and external_attr too on the basis that
> it could be possible to generate a different file with the same size and
> CRC in a new JAR, and maybe only the date would differ. Unlikely, I admit,
> but theoretically possible.
You'd want to weed out the dates, then, not the other way around.
-dp
--
Daniel Price - Solaris Kernel Engineering - [EMAIL PROTECTED] - blogs.sun.com/dp
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss