Conversation
Replace the stale aka.ms shortlink for Debian (which still served Debian 11 bullseye with broken backports repositories) with the Debian 13 trixie .wsl file from Salsa. Replace the Microsoft Store download for Alpine (which relied on a third-party API that now blocks automated usage) with the official Alpine minirootfs tarball. Both distributions are now installed via wsl --import instead of the AppxBundle installer. Fixes Vampire#76, fixes Vampire#82
Use a staging directory on the same drive as the download before calling cacheDir(), which handles cross-device moves properly. The direct mv() from D: (RUNNER_TEMP) to C: (tool cache) failed with EXDEV on Windows runners.
Debian 13 (trixie) ships with a default /etc/wsl.conf, similar to Ubuntu-24.04.
Alpine minirootfs lacks shadow utilities (useradd), so fall back to BusyBox adduser when useradd is not available.
The third-party API at store.rg-adguard.net, which was used to resolve Microsoft Store download URLs, has permanently blocked automated usage. Remove all related code: productId constructors, dynamic URL resolution via HTTP client, echo endpoint debug logic, and Ktor imports. All distributions now use direct download URLs.
Replace the useWslImport boolean with an InstallMethod enum derived from the installer file extension: .exe for AppxBundle, .wsl for wsl --install --from-file (with --import fallback on older WSL), and .tar.gz for wsl --import.
Add open createUser() method to Distribution with useradd as default. Override in ApkBasedDistribution to use BusyBox adduser instead. This replaces the try-useradd-then-fallback-to-adduser approach with a direct call to the correct command for each distribution.
Keep "Debian" pointing to the old bullseye AppxBundle for backward compatibility but emit a deprecation warning. Register "Debian-11" as an alias. Add "Debian-12" (bookworm) and "Debian-13" (trixie) using .wsl files from Salsa, installed via wsl --install --from-file with --import fallback.
Remove the old "Alpine" distribution which relied on a third-party Microsoft Store API that has permanently blocked automated usage. Add versioned distributions (Alpine-3.20, Alpine-3.21, Alpine-3.22, Alpine-3.23) using official minirootfs tarballs installed via wsl --import.
Some distributions (Debian-13, Ubuntu-24.04) ship with a default /etc/wsl.conf. Log existing contents in debug mode before overwriting, document the overwrite behavior in action.yml, and update the test to accept known default content instead of suppressing per-distribution.
Use useradd-or-adduser fallback in test user creation for Alpine compatibility. Install bash dynamically for Alpine distributions in the wsl-bash scripts test instead of using a hardcoded index.
The old Debian distribution (bullseye) is deprecated and its apt-get update fails due to removed backports repositories. Debian-13 (trixie) is the appropriate new default.
Remove deprecated Debian (bullseye) from the distributions test matrix since its apt-get update fails due to removed backports. Debian-12 and Debian-13 provide full Debian test coverage. Update test_multiple_usage_with_same_distribution to use Debian-13 as the secondary distribution.
wsl --install --from-file prompts for interactive UNIX user creation which hangs in CI environments. Use wsl --import for both .wsl and .tar.gz files since it imports directly as root without prompts.
installerFile is only needed for AppxBundle distributions to locate the .exe inside the extracted archive. For .wsl and .tar.gz distributions the filename is derived from the download URL via downloadFileName, removing redundant configuration.
Debian-11 is now its own object with a separate wslId ("Debian-11") rather than an alias for the unversioned "Debian".
Use --no-launch to skip the OOBE script that prompts for interactive user creation, keeping root as the default user. This properly uses the intended installation command for .wsl files while remaining compatible with CI environments.
The last Alpine version that worked via the Microsoft Store was 3.17. Restore "Alpine" as a deprecated distribution pointing to 3.17 (same pattern as "Debian"). Add Alpine-3.17, Alpine-3.18, and Alpine-3.19 using official minirootfs tarballs.
The adduser override was on ApkBasedDistribution, but other future apk-based distributions may have the shadow package and support useradd. Introduce AlpineDistribution as an intermediate subclass that overrides createUser to use BusyBox adduser, keeping ApkBasedDistribution generic.
The wsl.conf tests now use diff to verify the file content matches what the action wrote, instead of only checking that the file exists.
Ktor was only used for the rg-adguard API calls which have been removed. The distribution downloads use @actions/tool-cache downloadTool() instead. Remove the Ktor client dependencies, version catalog entries, and the build script workaround that patched abort-controller and node-fetch requires.
Older WSL versions (e.g. on windows-2022) do not support --from-file. Check wslHelp() and fall back to wsl --import for .wsl files on those environments.
Debian-11 is the same bullseye image as the old "Debian" default, preserving compatibility for users who rely on the default without specifying a distribution explicitly.
The AppxBundle installer registers the distribution as "Debian", not "Debian-11". The wslId must match the registered name for wsl --set-default and other WSL commands to work.
The default distribution test uses update=true, which fails on Debian-11 due to the broken bullseye-backports repository. Use Debian-13 for this test since it exercises the update flow with a working distribution.
The cached filename changed from installerFile to downloadFileName, so stale caches from previous runs contain files under the old name. Bump the cache key prefix from 2 to 3 to force re-download.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
run CI at my own repo, so the original owner don't approve every time I push something