mirror of
https://github.com/token2/snapd.git
synced 2026-03-13 11:15:47 -07:00
Context On Sept 21st, Microsoft anounced systemd support for WSL 2 ([see anouncement](https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/)), and Ubuntu-Preview already ships with systemd enabled by default. Changes Snap now works on WSL 2. Hence some of the current system checks in snapd have to be updated in response. Bugfixes This PR fixes: - [#1991823](https://bugs.launchpad.net/snapd/+bug/1991823) WSL detection is now incorrect / inappropriate - [#1991826](https://bugs.launchpad.net/snapd/+bug/1991826) snapd is intentionally broken under WSL and shouldn't be * release: Implemented WLS 1/2 distinction * syscheck: enabled snapd on WSL 2 * snapd-apparmor: Applied distiction, split tests * Made WSL1 check more robust * release: Removed redundant isWSL * snapd-apparmor: WSL2 has internal policy * release: Strenghtened detection of WSL1 vs. WSL2 * cmd/snap: Allowed snap on WSL2 * release: getting filesystem type with syscal * release: added unit test for filesystemRootType * release: use Assert to check errors as we usually do Co-authored-by: Samuele Pedroni <pedronis@lucediurna.net>