Skip to content

Fix#1

Open
exoego wants to merge 27 commits intomasterfrom
fix
Open

Fix#1
exoego wants to merge 27 commits intomasterfrom
fix

Conversation

@exoego
Copy link
Copy Markdown
Owner

@exoego exoego commented Apr 4, 2026

run CI at my own repo, so the original owner don't approve every time I push something

exoego added 9 commits April 4, 2026 09:15
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.
@exoego exoego marked this pull request as ready for review April 4, 2026 22:58
@exoego exoego closed this Apr 4, 2026
@exoego exoego reopened this Apr 4, 2026
@exoego exoego closed this Apr 4, 2026
@exoego exoego reopened this Apr 4, 2026
exoego added 4 commits April 5, 2026 09:03
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.
exoego added 2 commits April 5, 2026 10:11
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.
exoego added 7 commits April 6, 2026 08:50
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.
exoego added 4 commits April 6, 2026 13:35
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant