Make squashfs-tools in Xenial in sync with Bionic and Cosmic
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
squashfs-tools (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
High
|
Stéphane Graber |
Bug Description
squashfs-tools upstream hasn't changed in a while but a number of bugfixes are applied through packaging in Debian and Ubuntu.
The bionic and cosmic versions right now are identical but xenial is missing a few fixes which is a problem for the LXD snap among other things.
Looking at debian/
- 0007-fix-
- 0008-preserve_
I'll attach test cases for both of those below and then will prepare an SRU that effectively makes the source package identical to what we have in bionic, minus the different changelog.
This should be pretty safe considering both Ubuntu and Debian have been shipping those two patches for a while and the fs caps one is going to be pretty important moving forward as we're discussing having Ubuntu ship with fscaps by default.
Changed in squashfs-tools (Ubuntu Xenial): | |
status: | New → Triaged |
Changed in squashfs-tools (Ubuntu): | |
status: | New → Fix Released |
Changed in squashfs-tools (Ubuntu Xenial): | |
importance: | Undecided → High |
assignee: | nobody → Stéphane Graber (stgraber) |
== preserve file capabilities ==
=== Rationale ===
Filesystem capabilities aren't properly restored during unsquashfs, this effectively prevents any LXD image from containing file capabilities and breaks basic tools like mtr in recent images.
=== Testcase === cloud-images. ubuntu. com/cosmic/ current/ cosmic- server- cloudimg- amd64.squashfs
For the fscaps part, easiest is to grab the latest cosmic cloud image from:
http://
Then unsquashfs as root and check if "/usr/bin/ mtr-packet" shows a capability when running "getcap".
=== Regression potential ===
Minimal, we're syncing to the exact same source and patches as we've got in bionic and cosmic, the patch is also trivial and "obviously right". The issue is that the kernel will strip capabilities during chown() and unsquashfs was restoring capabilities before calling chown. This patch simply re-orders it so that capabilities are applied after ownership.