13 Star 46 Fork 10

openEuler / wsl

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

openeuler WSL support

通过微软的launcher启动的openeuler发行版

build status

Build WSL

install

  1. 可以通过action里的artifacts下载,超过30天github会自动清理旧的artifacts,可以通过re-run重新生成
  2. 当前支持sideload 方式加载openeuler应用:
    1. sideload-xxx.zip解压后,进入DistroLaucher-xxx_Test目录
    2. 加载目录下的证书xxx.cer文件,参考,简单来说:
      1. 双击xxx.cer
      2. 选择local machine
      3. 选择trusted people
    3. 双击DistroLauncher-Appx_xxx_<arm64/x64>.appxbundle 安装openeuler WSL应用

roadmap

  • 支持其他launcher(wsldlwsl-distrod
  • 和openeuler 发布流程集成,持续发布LTS 版本的wsl rootfs,旁加载应用
  • 在openEuler的基础设施中构建APP和rootfs,github action用户开发者自定义
  • 20.03 LTS SP3上架windows商店
  • 22.03 LTS 上架windows商店
  • 22.09 上架windows商店
  • systemd 正常工作并开启namespace

contribution

You're wellcome

LICENSE

MIT

how to customize my own WSL

  1. fork本仓库
  2. 根据需要,修改本仓库代码(例如要增删包,可以修改docker/Dockerfile
  3. 根据该文档生成一个自签发的证书,后缀为pfx,例如下面是创建一个有效期5年的自签名证书
    New-SelfSignedCertificate -Type Custom -Subject "CN=openEuler Infra WSL" -TextExtension @("2.5.29.37={critical}{text}1.3.6.1.5.5.7.3.3", "2.5.29.19={text}") -KeyUsage DigitalSignature -FriendlyName "openEuler" -CertStoreLocation "Cert:\CurrentUser\My" -NotBefore (Get-Date) -NotAfter (Get-Date).AddYears(5)
  4. 导出证书:
    $password = ConvertTo-SecureString -String <Your Password> -Force -AsPlainText 
    Export-PfxCertificate -cert "Cert:\CurrentUser\My\<Certificate Thumbprint>" -FilePath <FilePath>.pfx -Password $password
  5. 注意,此时导出的证书包含了私钥并且私钥用密码进行了加密,可以参考这里将密码去掉
    openssl pkcs12 -in <pfx_with_passwd> -nodes -out temp.pem -password pass:<passwd>
    openssl pkcs12 -export -in temp.pem -out <pfx_without_passwd> -password pass:
  6. 可以使用下面的命令将证书转换为base64格式:
    certutil.exe -encode <pfx file> <base64 file>
  7. 修改DistroLauncher-Appx/MyDistro.appxmanifest中的Publisher=字段,将其改为与上面的证书CN字段一致
  8. 修改DistroLauncher-Appx/DistroLauncher-Appx.vcxproj中的<PackageCertificateThumbprint>字段,将其改为上面证书的指纹和证书CN字段,获取CN/PackageCertificateThumbprint的方法如下:
PS C:\> Get-PfxCertificate -FilePath .\DistroLauncher-Appx_TemporaryKey.pfx

Thumbprint                                Subject
----------                                -------
asdfsadfadfs9asdfasdfsadfE1FC8AC90C26DE1  CN=xxxadsfasdfsadf

没有微软开发者账号和azure AD

  1. 进入仓库setting->secrets->actions->new secrets,创建以下secrets
  • SIGN_CERT:内容为证书的base64编码,base64编码生成方式为:
$fileContentBytes = get-content 'YOURFILEPATH.pfx' -Encoding Byte
[System.Convert]::ToBase64String($fileContentBytes)

有微软开发者账号

  1. fork本仓库
  2. 进入仓库setting->secrets->actions->new secrets,创建以下secrets
  • AZURE_AD_APP_KEY
  • AZURE_AD_CLIENT_ID
  • AZURE_AD_TENANT_ID
  • SIGN_CERT

AZURE这几个变量,请参考这里的步骤生成 SIGN_CERT请参考上面的步骤

修改后,通过点击actioin中的run workflow就能生成对应的WSL软件包(如果没有开发者账号或不期望发布到应用商店,Should we upload the appxbundle to the store这个参数请输入no,否则输入yes),对应任务的summary页面中,可以下载所有生成的artifacts,其中rootfs-xxx是用于制作WSL的文件系统,siteload-xxx是可以直接通过双击安装的app软件包,storeupload-则是用于上传到微软商店的app软件包

注意:本仓库的脚本只能更新已有应用的提交,因此新创建的应用需要人工进行第一次提交,可以参考如何人工提交

MIT License Copyright (c) Microsoft Corporation. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE

简介

Port openEuler to WSL (Windows Subsystem for Linux) 展开 收起
C++ 等 5 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/openeuler/wsl.git
git@gitee.com:openeuler/wsl.git
openeuler
wsl
wsl
master

搜索帮助