{"thread":{"id":"27180","subject":"[PATCH] gitweb: supply '-n' to gzip for identical output","startedAt":"2011-04-26T01:32:00Z","lastAt":"2011-04-26T01:32:00Z","messageCount":1,"participants":["Fraser Tweedale"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"166347","messageId":"1303781520-95861-1-git-send-email-frase@frase.id.au","threadId":"27180","inReplyTo":null,"subject":"[PATCH] gitweb: supply '-n' to gzip for identical output","fromName":"Fraser Tweedale","fromEmail":"frase@frase.id.au","sentAt":"2011-04-26T01:32:00Z","receivedAt":"2011-04-26T01:32:00Z","isPatch":true,"sender":{"key":"frase@frase.id.au","avatar":"https://avatars.githubusercontent.com/u/2331938?v=4"},"body":"Without the '-n' ('--no-name') argument, gzip includes a timestamp in\noutput which results in different files.  Important systems like FreeBSD\nports and perhaps several others hash/checksum downloaded files to ensure\nintegrity.  For projects that do not release official archives, gitweb's\nsnapshot feature would be an excellent alternative, except that the files\nit produces are not identical.\n\nWhilst '--no-name' is more descriptive, the long version of the flag is\nnot supported on all systems.  In particular, OpenBSD does not appear to\nsupport it.\n\nSupply '-n' to gzip to exclude timestamp from output and produce idential\noutput every time.\n\nSigned-off-by: Fraser Tweedale <frase@frase.id.au>\nAcked-by: Jakub Narebski <jnareb@gmail.com>\n---\n gitweb/gitweb.perl |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl\nindex ee69ea6..f8db40a 100755\n--- a/gitweb/gitweb.perl\n+++ b/gitweb/gitweb.perl\n@@ -186,7 +186,7 @@ our %known_snapshot_formats = (\n \t\t'type' => 'application/x-gzip',\n \t\t'suffix' => '.tar.gz',\n \t\t'format' => 'tar',\n-\t\t'compressor' => ['gzip']},\n+\t\t'compressor' => ['gzip', '-n']},\n \n \t'tbz2' => {\n \t\t'display' => 'tar.bz2',\n-- \n1.7.4.5\n"}]}