diff -Nru wsl-setup-0.1.2/debian/changelog wsl-setup-0.2/debian/changelog --- wsl-setup-0.1.2/debian/changelog 2021-11-03 14:59:02.000000000 +0100 +++ wsl-setup-0.2/debian/changelog 2022-03-01 10:04:54.000000000 +0100 @@ -1,3 +1,9 @@ +wsl-setup (0.2) jammy; urgency=medium + + * Install wsl-systemd for systemd WSL experimental support. + + -- Didier Roche Tue, 01 Mar 2022 10:04:54 +0100 + wsl-setup (0.1.2) jammy; urgency=medium [ Jean-Baptiste Lallement ] diff -Nru wsl-setup-0.1.2/debian/install wsl-setup-0.2/debian/install --- wsl-setup-0.1.2/debian/install 2021-10-28 11:22:29.000000000 +0200 +++ wsl-setup-0.2/debian/install 2022-03-01 10:04:33.000000000 +0100 @@ -1 +1,2 @@ wsl-setup /usr/libexec +wsl-systemd /usr/libexec diff -Nru wsl-setup-0.1.2/wsl-systemd wsl-setup-0.2/wsl-systemd --- wsl-setup-0.1.2/wsl-systemd 1970-01-01 01:00:00.000000000 +0100 +++ wsl-setup-0.2/wsl-systemd 2022-03-01 10:04:17.000000000 +0100 @@ -0,0 +1,15 @@ +#!/bin/sh +set -eu + +# Ensure that we don't clean up /tmp setup by the Microsoft init process. +mkdir -p /run/tmpfiles.d +ln -s /dev/null /run/tmpfiles.d/tmp.conf + +# https://githubmemory.com/repo/arkane-systems/genie/issues/142 +# We have to unmount binfmt so it's completely handled by systemd in its own namespace with its automount service. +umount /proc/sys/fs/binfmt_misc + +# Start systemd in its own namespace. +env -i /usr/bin/unshare --fork --mount-proc --pid --propagation unchanged -- sh -c " +exec /lib/systemd/systemd --unit=multi-user.target +" &