Merge ~bryce/ubuntu/+source/coreutils:project-c2439-ignore-snaps-groovy into ubuntu/+source/coreutils:ubuntu/devel
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Approved by: | Bryce Harrington | ||||||||
Approved revision: | 410833f805dd31d02d9fd6e4709075ff4b51956f | ||||||||
Merge reported by: | Sergio Durigan Junior | ||||||||
Merged at revision: | 410833f805dd31d02d9fd6e4709075ff4b51956f | ||||||||
Proposed branch: | ~bryce/ubuntu/+source/coreutils:project-c2439-ignore-snaps-groovy | ||||||||
Merge into: | ubuntu/+source/coreutils:ubuntu/devel | ||||||||
Diff against target: |
62 lines (+40/-0) 3 files modified
debian/changelog (+12/-0) debian/patches/series (+1/-0) debian/patches/treat-devtmpfs-and-squashfs-as-dummy-filesystems.patch (+27/-0) |
||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sergio Durigan Junior (community) | Approve | ||
Ubuntu Core Development Team | Pending | ||
Review via email: mp+386911@code.staging.launchpad.net |
Description of the change
This excludes squashfs and devtmpfs filesystems. A better fix would distinguish between snap squashfs and other squashfs usages by filtering on the 'x-gdu.hide' tag, which can be seen via `mount`. This tag is visible via libmount, however unfortunately coreutils (and gnulib) avoid dependence on libmount because it depends on selinux which in turn depends on a lot of extraneous stuff.
I was not able to identify an alternate way to access this tag from within the gnulib codebase, however that would be a helpful refinement to the fix. I plan to continue investigation into that, but meanwhile this patch will improve df usability considerably. The patch is what upstream appears to be considering, and I suspect is close to what will be landed there.
PPA:
https:/
Test case:
$ multipass launch --name ubuntu-groovy daily:20.10
$ multipass exec ubuntu-groovy -- bash
Inside vm:
$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 474M 0 474M 0% /dev
tmpfs 99M 944K 98M 1% /run
/dev/sda1 4.7G 1.3G 3.5G 26% /
tmpfs 491M 0 491M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 491M 0 491M 0% /sys/fs/cgroup
/dev/sda15 105M 3.9M 101M 4% /boot/efi
tmpfs 99M 0 99M 0% /run/user/1000
/dev/loop0 30M 30M 0 100% /snap/snapd/8140
/dev/loop1 55M 55M 0 100% /snap/core18/1754
/dev/loop2 72M 72M 0 100% /snap/lxd/15913
Install fix
¢ sudo add-apt-repository ppa:bryce/
¢ apt-get install coreutils
...
Setting up coreutils (8.30-3ubuntu3~
...
¢ df
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 100480 948 99532 1% /run
/dev/sda1 4901996 1423260 3462352 30% /
tmpfs 502388 0 502388 0% /dev/shm
tmpfs 5120 0 5120 0% /run/lock
tmpfs 502388 0 502388 0% /sys/fs/cgroup
/dev/sda15 106858 3934 102924 4% /boot/efi
tmpfs 100476 0 100476 0% /run/user/1000
There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.
Thanks for the patch, Bryce!
After following the discussions on ubuntu-devel and the developments of the upstream bug, I decided I'd review it.
I ran some tests on a lxd VM (I had install snapd, and then "snap install" something inside the VM so that I could see the /snap/* mountpoints), and everything works as expected :-).
The patch itself is pretty simple; I just had two nits that I thought I'd point out. Otherwise, it looks OK to me! I'm marking the MP as "Approved" because I don't think it's worth doing another round just for the sake of these two nits.
Thanks again.