Skip to content

Commit

Permalink
Restore the old behavior when using gzip
Browse files Browse the repository at this point in the history
Commit b2f454b ("Add option to control keymaps compression") removed -n
option from gzip invocation, the absence of which makes gzip write file
timestamps into compressed .gz files. These timestamps vary from one
build to another, and so the resulting installed .gz files are
non-reproducible.

Since not all archivers understand this option it is impossible to add
it for all archivers by default.

But we can bring back the default behavior (the case where no configure
options were specified) by using “gzip -n” as the archiver.

Link: #124
Fixes: b2f454b ("Add option to control keymaps compression")
Signed-off-by: Alexey Gladkov <[email protected]>
  • Loading branch information
legionus committed Jan 3, 2025
1 parent f2c0d31 commit eebaa3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ AC_ARG_ENABLE(compress,
[enable_compress=$enableval], [enable_compress=auto])

AS_IF([test "x$enable_compress" = xno], [],
[test "x$enable_compress" = xyes], [AC_CHECK_PROGS([COMPRESS_PROG], [zstd xz bzip2 gzip])],
[test "x$enable_compress" = xauto], [AC_CHECK_PROGS([COMPRESS_PROG], [gzip])],
[test "x$enable_compress" = xyes], [AC_CHECK_PROGS([COMPRESS_PROG], [zstd xz bzip2 "gzip -n"])],
[test "x$enable_compress" = xauto], [AC_CHECK_PROGS([COMPRESS_PROG], ["gzip -n"])],
[AC_CHECK_PROGS([COMPRESS_PROG], ["$enable_compress"])])
AM_CONDITIONAL(ENABLE_COMPRESS, test "x$COMPRESS_PROG" != "x")

Expand Down

0 comments on commit eebaa3b

Please sign in to comment.