Comment 7 for bug 1936871

Revision history for this message
Daniel Manrique (roadmr) wrote :

It's not review-tools related - instead, it looks like the first resquash of a freshly-unsquashed tree has the weird link/file, whereas the second resquash passes.

It would appear the mere act of reading or even stat'ing the wonky link/file (squashfs-root/snap/hooks/post-refresh) tickles it into being correct.

I wonder if the problem is filesystem-related at a lower level and affects only Focal?

Reproducer using bash only, to be run on a Focal system with squashfs-tools 4.4.

(adjust the /path/to/snap, get the snap from here, it's public: https://api.snapcraft.io/api/v1/snaps/download/jtpboSYvTCEyHoutkkRo1SI9ioSMOUb3_1588.snap)

mkdir -p /tmp/review-tools-test2oud6q5y
unsquashfs -no-progress -d /tmp/review-tools-test2oud6q5y/squashfs-root /path/to/jtpboSYvTCEyHoutkkRo1SI9ioSMOUb3_1588.snap
# Uncomment the following line to make things work / generate same checksum
# stat review-tools-test2oud6q5y/squashfs-root/snap/hooks/post-refresh
echo "squashing"
mksquashfs /tmp/review-tools-test2oud6q5y/squashfs-root /tmp/review-tools-test2oud6q5y/repack.snap -fstime 1626625683 -noappend -comp xz -all-root -no-xattrs -no-fragments
mksquashfs /tmp/review-tools-test2oud6q5y/squashfs-root /tmp/review-tools-test2oud6q5y/repack2.snap -fstime 1626625683 -noappend -comp xz -all-root -no-xattrs -no-fragments
echo "comparing"
sha512sum /tmp/review-tools-test2oud6q5y/*.snap
echo "good sum is b615b403f..."