Set timestamps in SquashFS images
A request to support stripping non-determinism from SquashFS files (for a long story see https://github.com/yakshaveinc/linux/issues/39). In my case these images are snap packages.
-- v2.snap
+++ v3.snap
├── unsquashfs -s {}
│ @@ -1,9 +1,9 @@
│ Found a valid SQUASHFS 4:0 superblock
│ -Creation or last append time Sat Aug 1 18:36:27 2020
│ +Creation or last append time Sat Aug 1 20:03:23 2020
│ Filesystem size 576 bytes (0.56 Kbytes / 0.00 Mbytes)
│ Compression xz
│ Block size 131072
│ Filesystem is exportable via NFS
│ Inodes are compressed
│ Data is compressed
│ Uids/Gids (Id table) are compressed
├── unsquashfs -d -lls {}
│ @@ -1,6 +1,6 @@
│ Parallel unsquashfs: Using 4 processors
│ 1 inodes (1 blocks) to write
│
│ drwxr-xr-x root/root 27 2020-05-26 13:34
│ drwxr-xr-x root/root 32 2020-05-26 13:34 /meta
│ --rw-r--r-- root/root 275 2020-08-01 18:36 /meta/snap.yaml
│ +-rw-r--r-- root/root 275 2020-08-01 20:03 /meta/snap.yaml
podman run --rm -t -w $(pwd) -v $(pwd):$(pwd):Z,ro v2.snap v3.snap 219.04s user 42.56s system 46% cpu 9:18.56 total
Edited by Anatoli Babenia