Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh releases and assets #509

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/actions/download-rootfs/action.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Download Ubuntu WSL Rootfs
description: Download the latest Rootfs for a particular release of Ubuntu WSL
description: Download the latest Rootfs for a particular release of Ubuntu WSL

inputs:
distros:
Expand Down Expand Up @@ -93,6 +93,8 @@ runs:

$file = ".\${name}.tar.gz"

Write-Output "Saving $($url[0..19] -join '')***$($url[-19..-1] -join '') to $file"

& ${{ github.action_path }}\download-rootfs.ps1 -Path "${file}" -URL "$url"
if ( ! $? ) {
$allSuccess = $false
Expand Down
9 changes: 7 additions & 2 deletions DistroLauncher/Ubuntu/InitTasks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,14 @@ bool CheckInitTasks(WslApiLoader& api, bool checkDefaultUser) {

namespace {
void waitForInitTasks(WslApiLoader& api) {
// Wait for cloud-init to finish if systemd and its service is enabled.
static constexpr wchar_t script[] = LR"(
if status=$(LANG=C systemctl is-system-running 2>/dev/null) || [ "${status}" != "offline" ] && systemctl is-enabled --quiet cloud-init.service 2>/dev/null; then
cloud-init status --wait > /dev/null 2>&1 || true
fi
)";
DWORD exitCode = -1;
// Try running cloud-init unconditionally, but avoid printing to console.
auto hr = api.WslLaunchInteractive(L"cloud-init status --wait >/dev/null 2>&1", FALSE, &exitCode);
auto hr = api.WslLaunchInteractive(script, FALSE, &exitCode);
if (FAILED(hr)) {
Helpers::PrintErrorMessage(hr);
return;
Expand Down
10 changes: 10 additions & 0 deletions e2e/launchertester/basic_setup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"context"
"fmt"
"os"
"os/exec"
"path/filepath"
"strconv"
"strings"
Expand Down Expand Up @@ -45,6 +46,7 @@ func TestSetupWithCloudInit(t *testing.T) {
testCases := map[string]struct {
install_root bool
withRegistryUser string
withWSL1 bool
wantUser string
wantFile string
}{
Expand All @@ -56,6 +58,7 @@ func TestSetupWithCloudInit(t *testing.T) {
"With only remote users": {wantUser: "testmail"},
"With broken passwd file": {wantUser: "testmail"},
"Without checking user": {install_root: true, wantUser: "root", wantFile: "/home/testuser/with_default_user.done"},
"Do not block on WSL1": {install_root: true, wantUser: "root"},
}

home, err := os.UserHomeDir()
Expand All @@ -77,6 +80,13 @@ func TestSetupWithCloudInit(t *testing.T) {

for name, tc := range testCases {
t.Run(name, func(t *testing.T) {
if tc.withWSL1 {
require.NoError(t, exec.Command("wsl.exe", "--set-default-version", "1").Run(), "Setup: Cannot set WSL1 as default version")
t.Cleanup(func() {
t.Log("Cleaning up: Setting WSL2 back as default version")
require.NoError(t, exec.Command("wsl.exe", "--set-default-version", "2").Run(), "Setup: Cannot set WSL2 back as default version")
})
}
wslSetup(t)

ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#cloud-config
users:
- name: nontestuser
groups: sudo
shell: /bin/bash
sudo: ALL=(ALL) NOPASSWD:ALL
- name: testuser
groups: sudo
shell: /bin/bash
sudo: ALL=(ALL) NOPASSWD:ALL

write_files:
- path: /etc/wsl.conf
append: true
content: |
[user]
default=testuser

runcmd:
- touch /home/testuser/with_default_user.done
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified meta/Ubuntu/generated/DistroLauncher/images/icon.ico
Binary file not shown.
Binary file modified meta/Ubuntu18.04LTS/generated/DistroLauncher/images/icon.ico
Binary file not shown.
Binary file modified meta/Ubuntu20.04LTS/generated/DistroLauncher/images/icon.ico
Binary file not shown.
Binary file modified meta/Ubuntu22.04LTS/generated/DistroLauncher/images/icon.ico
Binary file not shown.
Binary file modified meta/Ubuntu24.04LTS/generated/DistroLauncher/images/icon.ico
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap2="http://schemas.microsoft.com/appx/manifest/uap/windows10/2" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" IgnorableNamespaces="uap mp uap2 uap3 rescap desktop">
<Identity Name="CanonicalGroupLimited.UbuntuPreview" Version="2410.0.42.0" Publisher="CN=23596F84-C3EA-4CD8-A7DF-550DCE37BCD0" ProcessorArchitecture="x64" />
<Identity Name="CanonicalGroupLimited.UbuntuPreview" Version="2504.0.42.0" Publisher="CN=23596F84-C3EA-4CD8-A7DF-550DCE37BCD0" ProcessorArchitecture="x64" />
<mp:PhoneIdentity PhoneProductId="160867c6-4e75-4e36-85c6-1543de07d5f3" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>Ubuntu (Preview)</DisplayName>
Expand Down
Binary file modified meta/UbuntuPreview/generated/DistroLauncher/images/icon.ico
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ For more information about Ubuntu WSL and how Canonical supports developers plea

https://ubuntu.com/wsl
</Description>
<ReleaseNotes>http://www.ubuntu.com/getubuntu/releasenotes?os=ubuntu&amp;ver=24.10</ReleaseNotes>
<ReleaseNotes>http://www.ubuntu.com/getubuntu/releasenotes?os=ubuntu&amp;ver=25.04</ReleaseNotes>
<DevStudio>Canonical Ltd. and the OpenSource community</DevStudio>
<ScreenshotCaptions>
<!-- Valid length: 200 character limit, up to 9 elements per platform -->
Expand Down