mkarchiso: create reproducible gzip archives

Use the gzip option -n/--no-name to prevent saving the original file name and timestamp.

Fixes #104.
This commit is contained in:
nl6720 2021-04-27 13:03:29 +03:00
parent a771297e12
commit 0406f9ca02
No known key found for this signature in database
GPG Key ID: 5CE88535E188D369

View File

@ -413,10 +413,10 @@ _make_bootmode_bios.syslinux.mbr() {
if [[ -e "${isofs_dir}/syslinux/hdt.c32" ]]; then if [[ -e "${isofs_dir}/syslinux/hdt.c32" ]]; then
install -d -m 0755 -- "${isofs_dir}/syslinux/hdt" install -d -m 0755 -- "${isofs_dir}/syslinux/hdt"
if [[ -e "${airootfs_dir}/usr/share/hwdata/pci.ids" ]]; then if [[ -e "${airootfs_dir}/usr/share/hwdata/pci.ids" ]]; then
gzip -c -9 "${airootfs_dir}/usr/share/hwdata/pci.ids" > \ gzip -cn9 "${airootfs_dir}/usr/share/hwdata/pci.ids" > \
"${isofs_dir}/syslinux/hdt/pciids.gz" "${isofs_dir}/syslinux/hdt/pciids.gz"
fi fi
find "${airootfs_dir}/usr/lib/modules" -name 'modules.alias' -print -exec gzip -c -9 '{}' ';' -quit > \ find "${airootfs_dir}/usr/lib/modules" -name 'modules.alias' -print -exec gzip -cn9 '{}' ';' -quit > \
"${isofs_dir}/syslinux/hdt/modalias.gz" "${isofs_dir}/syslinux/hdt/modalias.gz"
fi fi