« Return to Thread: github port group

Re: github port group

by Joshua Root-8 :: Rate this Message:

| View in Thread

On 2012-4-23 07:27 , Ryan Schmidt wrote:

>
> On Apr 22, 2012, at 16:21, Joshua Root wrote:
>
>> On 2012-4-23 06:51 , Ryan Schmidt wrote:
>>> No, I'm trying to protect against the gzip compression of the tar archive varying from generation to generation. gzip compression uses entropy -- random numbers. If you have two identical tar archives, and gzip compress them with the same settings, the resulting gzip files will not be byte for byte identical, and thus they'll have different checksums:
>>>
>>> $ sha1sum *.tar
>>> 92bfe8b02b49b977a18c9f8e8d301a0ef159fe51  1.tar
>>> 92bfe8b02b49b977a18c9f8e8d301a0ef159fe51  2.tar
>>> $ gzip 1.tar
>>> $ gzip 2.tar
>>> $ sha1sum *.tar.gz
>>> 39c6beda6851d98295f770a11b8ea122647ae4c8  1.tar.gz
>>> 7a95ea746e698d367ec155e4387972051e1a2e38  2.tar.gz
>>> $
>>
>> Nonsense. The gzip files in the above example differ because they
>> contain files with different names.
>
> Oh. Well, here's a test with the same file names:
>
> $ sha1sum */file.tar
> 92bfe8b02b49b977a18c9f8e8d301a0ef159fe51  1/file.tar
> 92bfe8b02b49b977a18c9f8e8d301a0ef159fe51  2/file.tar
> $ gzip 1/file.tar
> $ gzip 2/file.tar
> $ sha1sum */file.tar.gz
> 238d08d9c64af0622abdd6a074b5c3c0b784a238  1/file.tar.gz
> e398dbc43e65f5bb165876bcb1819b302fe251fd  2/file.tar.gz
> $

WFM:

% openssl sha1 1/file.tar 2/file.tar
SHA1(1/file.tar)= 7937656d0860ca9286a24246a199cf2fddeb6e49
SHA1(2/file.tar)= 7937656d0860ca9286a24246a199cf2fddeb6e49
% gzip 1/file.tar
% gzip 2/file.tar
% openssl sha1 1/file.tar.gz 2/file.tar.gz
SHA1(1/file.tar.gz)= 78020f5e126da22be27ac9eda2633db59b725480
SHA1(2/file.tar.gz)= 78020f5e126da22be27ac9eda2633db59b725480

Do your two input files also have identical timestamps?
_______________________________________________
macports-dev mailing list
macports-dev@...
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev

 « Return to Thread: github port group