Re: Q: foo.orig.tar.gz
>>>>> "NU" == Nefedov U <nefedov@nusun.jinr.ru> writes:
NU> Вопрос у меня.
NU> Скачал я себе исходники пакета в виде foo.orig.tar.gz и т.д. и зачем
NU> то разzipовал этот foo.orig.tar.gz (любопытство подвело). Как теперь я
NU> не бьюсь обратно заzipовать с той же длинной и md5sum у меня уже не
NU> выходит. Соответственно, dpkg-source ругается и работать не
NU> хочет. Может какие флажки и gzip надо особые выставить?
From: Hrvoje Niksic <hniksic@arsdigita.com>
Subject: Re: BAD: Handling of package-index by package release and install system
To: XEmacs Beta List <xemacs-beta@xemacs.org>
Date: 26 May 2001 21:41:54 +0200
Steve Youngs <youngs@xemacs.org> writes:
> Personally, I blame GNU/tar. Try doing this:
>
> tar cvzf test.tar.gz /some/directory/
> md5sum test.tar.gz > test.md5
> rm test.tar.gz
> tar cvzf test.tar.gz /some/directory/
> md5sum test.tar.gz >> test.md5
> cat test.md5
The first fault in the reasoning is that you're actually using two
programs: tar and gzip. If I try the test like this:
tar cf x.tar test-dir
tar cf y.tar test-dir
...the resulting files are the same. However, if I do this:
tar czf x.tar.gz test-dir
tar czf y.tar.gz test-dir
...they differ.
The problem is that `gzip' "helpfully" adds a timestamp to the file,
even it is completely unneeded for TAR files which keep their own
timestamp information. Hopefully, there is a flag that removes this.
So if I try:
tar cf - test-dir | gzip -cn > x.tar.gz
tar cf - test-dir | gzip -cn > y.tar.gz
...the files are the same.
Does this work for you?
--alexm
Reply to: