compress-man-pages: don't leak build timestamp into archive

without `-n`, gzip leaks the file timestamp into the compressed file,
which is likely to leak the build timestamp into the output.

This fixes #434930, a regression introduced in c5252e1 / #406922
This commit is contained in:
Arnout Engelen
2025-08-20 17:03:51 +02:00
parent fbcf476f79
commit 4108382f36
@@ -11,7 +11,7 @@ compressManPages() {
# Compress all uncompressed manpages. Don't follow symlinks, etc.
# gzip -f is needed to not error out on hard links.
find "$dir"/share/man/ -type f -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 \
| xargs -0 -n1 -P "$NIX_BUILD_CORES" gzip -f
| xargs -0 -n1 -P "$NIX_BUILD_CORES" gzip -n -f
# Point symlinks to compressed manpages.
find "$dir"/share/man/ -type l -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 \