On Tue, Jan 28, 2025 at 12:59:05AM +0100, Robin Candau wrote: > Hi everyone,
Hello Robin and others. I support this idea. And if you need any help, then I am ready to spend my time on WSL > > I'm writing this mail to collect thoughts and interests about providing an > official Arch Linux image for WSL (Windows Subsystem for Linux) [1]. > > Indeed, after a quick related discussion over on IRC, I started tinkering > with this and I personally would be eventually interested in proposing this > "officially", if that's of interest. > > This proposal is inspired by the related Fedora one [2] (which was accepted > and planned for Fedora 42). > > # Benefits > > An official Arch Linux image for WSL would provide an easy way for people to > give Arch Linux a try directly from their Windows system, making our distro > more "discoverable" and accessible. > > Additionally, some people may have no other choice but to use Windows in > specific situations (despite not necessarily being the best choice for their > needs / duties), e.g. on their company's workstation (like it's the case for > me). While WSL consists of an acceptable solution to get access to a Linux > environment in such situations, the lack of an official image for Arch Linux > either "suggests" the use of a different distribution or "forces" people to > rely on unofficial Arch Linux WSL images (which quality may vary). > > # Distribution / Installation > > WSL images can be distributed via tarballs, Appx packages, or via the > Windows Store. > > From what we know, distributing images from the Windows Store implies > agreeing to the store policies & developer agreement, and may imply > additional eventual concerns related to TOS/EULA. I unfortunately don't have > much details on that front currently but I think that distribution from the > Windows Store should be out of scope for now. > > Moreover, since version 2.4.4, WSL greatly improved the way to install > tarballs outside from the store by adding "click-to-install" support for > tarballs using the ".wsl" extension, as well as automatic first setup script > support. As such, I would personally advice for that distribution method for > the time being. Indeed, downloading such an Arch Linux ".wsl" tarball and > (double) clicking on it would be all that's needed to be able to use Arch > Linux with WSL. > Note that WSL 2.4.4 and greater are still qualified as pre-releases at the > time I'm writing those lines [3], but can still be installed with a single > command line from a PowerShell prompt (`wsl --update --pre-release` from a > system with WSL2 installed). > > If anything, installing such tarballs from WSL prior to 2.4.4 can still be > done "manually" via a single command line (`wsl --import <DistroName> > <InstallationPath> <TarballPath>`). With a proper documentation, using Arch > Linux with WSL prior to 2.4.4 would still be pretty straightforward. > > # Technical details > > WSL2 provides a single virtual machine managed by the Windows host which > runs guest Linux distributions as containers. As such, the Arch Linux base > container image [4] can already be used for basic WSL support. > > To define some default parameters and provide additional functionalities, > some specific WSL configuration files can be added to it. This, for > instance, allows to add `systemd` support out of the box [5], define default > parameters (e.g. default user, icon for the app shortcut or terminal > profile) and automatic first setup script (which can be used to create a > default non-root user and perform basic system setup interactively at first > run for instance) [6]. > > The archive just needs to be renamed from ".tar.zst" to ".wsl" to allow > "click-to-install" with WSL >= 2.4.4. > > For those interested, I actually "built" such a ".wsl" Arch Linux tarball > [7] based on our latest base container image which can be installed & uses > with WSL2 (made for test purposes). Make sure to read the README [8], which > contains important information such as how the tarball was generated and how > to use it. > > # Tarball maintenance / management > > Given that the WSL tarball would be based on our Docker / Container image, > it could eventually be maintained in the same repo [4], although I'm not > sure that mixing a WSL specific image with our "Docker" images is desirable. > > We also have the arch-boxes repo [9] which provides multiple kind of Arch > images (vagrant, qcow2, cloud...). I think a WSL image could fit well there. > > Alternatively, a new dedicated repo could be created. > > When it comes to actual maintenance / management, I think the image > generation and releasing should be fairly easy to automate via a scheduled > GitLab CI (as it is currently done for our Docker images for instance). The > process is fairly straightforward (grab latest base Docker image / tarball, > un-archive it, add a few WSL specific files, re-archive it, rename it from > ".tar.zst" to ".wsl"). I guess a monthly generation / release would be more > than enough. We would still need a few people to watch over and feel > responsible to maintain this. I'd happily be one of them, but please feel > free to express interest :) > > # Unresolved questions / issues > > From a purely technical stand point, there is one pending issue which, > fortunately, can be easily worked around. But the actual root cause and > proper fix are unknown yet. See the last section of the README [8] for more > details. > > On another level, I guess the important point here is to determine if we > actually want this and, if so, how? For instance, which level of support do > we want to provide (if we are to do this)? Since it would be pretty close in > terms of "design" and usage, I personally think we could provide a similar > level of support than the Docker images & Arch boxes images. > > Anyway, sorry for the long read 0:) > Just to clarify, the actual purpose of this mail is to collect thoughts, > concerns, questions, interests (both regarding using such an "official" Arch > Linux WSL image and / or helping maintaining it), ... > Please, share opinions if you have some :) > > [1] https://learn.microsoft.com/en-us/windows/wsl/about > [2] https://fedoraproject.org/wiki/Changes/FedoraWSL > [3] https://github.com/microsoft/WSL/releases > [4] https://gitlab.archlinux.org/archlinux/archlinux-docker > [5] > https://devblogs.microsoft.com/commandline/systemd-support-is-now-available-in-wsl/#set-the-systemd-flag-set-in-your-wsl-distro-settings > [6] > https://learn.microsoft.com/en-uisns/windows/wsl/build-custom-distro#add-the-wsl-distribution-configuration-file > [7] https://pkgbuild.com/~antiz/WSL/ > [8] https://pkgbuild.com/~antiz/WSL/README.md > [9] https://gitlab.archlinux.org/archlinux/arch-boxes > > -- > Regards, > Robin Candau / Antiz > -- Sincerely, Alexander | Package Maintainer
signature.asc
Description: PGP signature