git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] gitweb: supply '-n' to gzip for identical output

From
Fraser Tweedale <frase@frase.id.au>
Date
Apr 26, 2011, 01:32 UTC
Message-ID
<1303781520-95861-1-git-send-email-frase@frase.id.au>

Without the '-n' ('--no-name') argument, gzip includes a timestamp in output which results in different files. Important systems like FreeBSD ports and perhaps several others hash/checksum downloaded files to ensure integrity. For projects that do not release official archives, gitweb's snapshot feature would be an excellent alternative, except that the files it produces are not identical.

Whilst '--no-name' is more descriptive, the long version of the flag is not supported on all systems. In particular, OpenBSD does not appear to support it.

Supply '-n' to gzip to exclude timestamp from output and produce idential output every time.

Signed-off-by: Fraser Tweedale <frase@frase.id.au>
Acked-by: Jakub Narebski <jnareb@gmail.com>
---
 gitweb/gitweb.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index ee69ea6..f8db40a 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -186,7 +186,7 @@ our %known_snapshot_formats = (
 		'type' => 'application/x-gzip',
 		'suffix' => '.tar.gz',
 		'format' => 'tar',
-		'compressor' => ['gzip']},
+		'compressor' => ['gzip', '-n']},
 
 	'tbz2' => {
 		'display' => 'tar.bz2',
-- 
1.7.4.5
Message 1 of 1 in “gitweb: supply '-n' to gzip for identical output”
  1. gitweb: supply '-n' to gzip for identical outputFraser Tweedale, Apr 26, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.