[Bug 1555305] Re: resquashfs test fails if snap has symlinks
Tyler Hicks
tyhicks at canonical.com
Fri Dec 15 22:28:55 UTC 2017
* Failing Zesty and Artful snapd tests
- autopkgtest:ubuntu-16.04-amd64:tests/main/completion fails with and without the squashfs-tools in xenial-proposed
- autopkgtest:ubuntu-16.04-amd64:tests/main/searching is attempting to find the "cassandra" snap in the database section but I can confirm that it isn't listed in the database section of the store
- s390x: No tests are ever ran due to the tests requiring "machine-level isolation" but that not being available on s390x. However, snapd s390x test runs have been hitting an error for about the last month.
* Failing Zesty and Artful snapcraft tests
- These have all been failing recently
* Failed Zesty and Artful lxd tests on s390x
- These tests have only ever passed with "SKIP Test requires machine-level isolation but testbed does not provide that" but they've recently started running and failing every run
>From what I can tell, the snapd, snapcraft, and lxd test failures on
Zesty and Artful are not due to the squashfs-tools changes.
** Tags removed: verification-needed-artful verification-needed-zesty
** Tags added: verification-done-artful verification-done-zesty
** Tags removed: verification-needed
** Tags added: verification-done
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to squashfs-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1555305
Title:
resquashfs test fails if snap has symlinks
Status in click-reviewers-tools package in Ubuntu:
Invalid
Status in squashfs-tools package in Ubuntu:
Fix Released
Status in squashfs-tools source package in Trusty:
Fix Committed
Status in squashfs-tools source package in Xenial:
Fix Committed
Status in squashfs-tools source package in Zesty:
Fix Committed
Status in squashfs-tools source package in Artful:
Fix Committed
Status in squashfs-tools source package in Bionic:
Fix Released
Bug description:
[Impact]
* The unsquashfs utility does not preserve atime and mtime timestamps
of symlink inodes when unpacking squashfs images.
* This makes it impossible to use a combination of unsquashfs and
mksquashfs to sanity check snaps uploaded to the snap store since
the resulting snap will not match the original snap due to symlink
times being set to the current time when unsquashfs was executed.
[Test Case]
* Extract the test image:
$ unsquashfs -d lp1555305 lp1555305.squashfs
* Check the timestamp of the "link" file
$ ls -al lp1555305/link
* Incorrect output (timestamp will be current time):
lrwxrwxrwx 1 tyhicks tyhicks 4 Dec 11 22:05 link -> file
* Expected output:
lrwxrwxrwx 1 tyhicks tyhicks 4 Aug 25 1991 /tmp/lp1555305/link -> file
[Regression Potential]
* The regression potential is small as long as there is no software
out there that depends on the behavior of setting symlink timestamps
to the current time. I highly doubt that there is anything out there
that relies on that behavior but there's always a chance.
[Original Descipription]
Create the files:
$ mkdir test
$ cd test
$ touch foo
$ ln -s foo bar
$ mkdir meta
$ cat >meta/snap.yaml <<EOM
name: test
version: 1.0
architectures: [all]
EOM
Create the initial snap
$ cd ..
$ snapcraft snap ./test
...
Snapped test_1.0_all.snap
Unsquash the snap:
$ unsquashfs -d unsquashed test_1.0_all.snap
Parallel unsquashfs: Using 4 processors
3 inodes (2 blocks) to write
[=======================================================================|]
2/2 100%
created 2 files
created 2 directories
created 1 symlinks
created 0 devices
created 0 fifos
Resquash the snap (the sleep is to make sure the time changes on the symlink):
$ unsquashfs -fstime ./test_1.0_all.snap
1457551603
$ mksquashfs ./unsquashed ./test_1.0_all.snap.repacked -fstime 1457551603 -noappend -comp xz -all-root -no-xattrs
...
Compare:
$ sha512sum test_1.0_all.snap
40a15430503783541b362942491ee614b16941676d6c3edd86005af7b6b0782374e41c0c006dccb3a164d2c0270ace66639fcdee5ece3571db1c7544d59030e3 test_1.0_all.snap
$ sha512sum test_1.0_all.snap.repack
d8b9626337b8f09288f6aab675041dba639523437dd1d8f11b3f883cfa73ea434f2be06f5cd9cdec4ac9bdf2a40f8b484dc516ec851870c81be133cbdebf35a4 test_1.0_all.snap.repack
Removing the symlink makes the check work.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/click-reviewers-tools/+bug/1555305/+subscriptions
More information about the foundations-bugs
mailing list