[Bug 1555305] Re: resquashfs test fails if snap has symlinks
Brian Murray
brian at ubuntu.com
Thu Dec 14 21:34:15 UTC 2017
Hello Jamie, or anyone else affected,
Accepted squashfs-tools into xenial-proposed. The package will build now
and be available at https://launchpad.net/ubuntu/+source/squashfs-
tools/1:4.3-3ubuntu2.16.04.1 in a few hours, and then in the -proposed
repository.
Please help us by testing this new package. See
https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how
to enable and use -proposed.Your feedback will aid us getting this
update out to other Ubuntu users.
If this package fixes the bug for you, please add a comment to this bug,
mentioning the version of the package you tested and change the tag from
verification-needed-xenial to verification-done-xenial. If it does not
fix the bug for you, please add a comment stating that, and change the
tag to verification-failed-xenial. In either case, without details of
your testing we will not be able to proceed.
Further information regarding the verification process can be found at
https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in
advance!
** Changed in: squashfs-tools (Ubuntu Xenial)
Status: In Progress => Fix Committed
** Tags added: verification-needed-xenial
--
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:
In Progress
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