Просмотр исходного кода

libdpkg: Do not store timestamps in gzip headers when using the command

The zlib library by default does not initialize the gzip header with
information like OS, filename or timestamp. Try to do the same when
using the gzip command, although there's no way to tell the command
not to store the OS.

Closes: #719844
Guillem Jover лет назад: 13
Родитель
Сommit
bd58cab620
2 измененных файлов с 4 добавлено и 1 удалено
  1. 3 0
      debian/changelog
  2. 1 1
      lib/dpkg/compress.c

+ 3 - 0
debian/changelog

@@ -54,6 +54,9 @@ dpkg (1.17.2) UNRELEASED; urgency=low
   * Improve dpkg “Preparing to replace” and “Unpacking” progress messages.
     Closes: #32427, #71106
   * Print the package version on main dpkg progress messages.
+  * Do not store timestamps in gzip headers when using the command, to try to
+    mimic the zlib behavior. This does not affect Debian as it's been using
+    zlib for a very long time. Closes: #719844
 
   [ Updated programs translations ]
   * German (Sven Joachim).

+ 1 - 1
lib/dpkg/compress.c

@@ -244,7 +244,7 @@ compress_gzip(int fd_in, int fd_out, struct compress_params *params, const char
 	char combuf[6];
 
 	snprintf(combuf, sizeof(combuf), "-c%d", params->level);
-	fd_fd_filter(fd_in, fd_out, desc, GZIP, combuf, NULL);
+	fd_fd_filter(fd_in, fd_out, desc, GZIP, "-n", combuf, NULL);
 }
 #endif