]> mj.ucw.cz Git - pciutils.git/commitdiff
file timestamp not needed in pci.ids.gz
authorGilles Espinasse <g.esp@free.fr>
Fri, 26 Jun 2009 09:37:47 +0000 (11:37 +0200)
committerMartin Mares <mj@ucw.cz>
Sat, 4 Jul 2009 13:48:09 +0000 (15:48 +0200)
File timestamp (and file name) have no use for pci.ids.gz
This allow to produce the exact same file even when compiled at different times.
That make paranoid happy.

Even gzip-1.2.4 from 1993 support -n option

Concerning the fact that -n did not include file name, that does not matter
unless the compressed file is moved under a different name and later -N option
 is used to open the file.

[chroot-i486] root:/$ gzip -9 /usr/share/pci.ids
[chroot-i486] root:/$ gzip -l /usr/share/pci.ids.gz
         compressed        uncompressed  ratio uncompressed_name
             161106              590309  72.7% /usr/share/pci.ids
[chroot-i486] root:/$ mv /usr/share/pci.ids.gz /usr/share/pci.foo.gz
[chroot-i486] root:/$ gzip -lN /usr/share/pci.foo.gz
         compressed        uncompressed  ratio uncompressed_name
             161106              590309  72.7% /usr/share/pci.ids
[chroot-i486] root:/$ gzip -dN /usr/share/pci.foo.gz
[chroot-i486] root:/$ ls -l /usr/share/pci.ids
-rw-r--r-- 1 root root 590309 Jun 26 07:59 /usr/share/pci.ids

[chroot-i486] root:/$ gzip -9n /usr/share/pci.ids
[chroot-i486] root:/$ mv /usr/share/pci.ids.gz /usr/share/pci.foo.gz
[chroot-i486] root:/$ gzip -lN /usr/share/pci.foo.gz
         compressed        uncompressed  ratio uncompressed_name
             161098              590309  72.7% /usr/share/pci.foo

Signed-off-by: Gilles Espinasse <g.esp@free.fr>
Makefile

index 140c87ac0033f3b1c63dc5d5ea389b589bab0a4b..0169f7636329c9c5d3a1e33d0a7c2fd45924471f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -131,6 +131,6 @@ ifeq ($(SHARED),yes)
 endif
 
 pci.ids.gz: pci.ids
-       gzip -9 <$< >$@
+       gzip -9n <$< >$@
 
 .PHONY: all clean distclean install install-lib uninstall force