pack: Make bit-reproducible squashfs images.

Reported by Josh Marshall <Josh.Marshall@jax.org>.

* guix/scripts/pack.scm (squashfs-image)[build](mksquashfs): Always pass
"-all-time", "-mkfs-time", "-force-uid", and "-force-gid" to 'mksquashfs'.
This commit is contained in:
Ludovic Courtès 2020-03-13 13:02:01 +01:00 committed by Ludovic Courtès
parent b24ec85451
commit b829864d74
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 9 additions and 1 deletions

View File

@ -366,7 +366,15 @@ added to the pack."
(define entry-point #$entry-point)
(define (mksquashfs args)
(apply invoke "mksquashfs" args))
(apply invoke "mksquashfs"
`(,@args
;; Set file times and the file system creation time to
;; one second after the Epoch.
"-all-time" "1" "-mkfs-time" "1"
;; Reset all UIDs and GIDs.
"-force-uid" "0" "-force-gid" "0")))
(setenv "PATH" (string-append #$archiver "/bin"))