diff --git a/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj b/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj index 02eb80faa9f944034b8c1cc8dfe6664c40e6a4d1..e5bbfb3e5b7e442e103c6a653388c977be4d7086 100644 --- a/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj +++ b/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj @@ -76,7 +76,7 @@ False Always - DFB44C1372719889CD90289BEE1FC8AC90C26DE1 + 3F03B484C7EA61BBACE5C74A3610FE102DF06005 False x64|arm64 0 diff --git a/DistroLauncher-Appx/MyDistro.appxmanifest b/DistroLauncher-Appx/MyDistro.appxmanifest index c1a98736d469c40fd16e56d696baaf8762f9300e..a269e4d4591b389d4f038764a4649fb4273c2edf 100644 --- a/DistroLauncher-Appx/MyDistro.appxmanifest +++ b/DistroLauncher-Appx/MyDistro.appxmanifest @@ -1,6 +1,6 @@  - + openEuler 22.03 diff --git a/README.md b/README.md index 31b01744c4e974d0cbc01d78cd97a94e78fd3548..b065379dfcf13522fb22101f4b20b3f17079b4dc 100644 --- a/README.md +++ b/README.md @@ -16,12 +16,12 @@ ## roadmap - [ ] 支持其他launcher([wsldl](https://github.com/yuk7/wsldl),[wsl-distrod](https://github.com/nullpo-head/wsl-distrod)) -- [ ] 和openeuler 发布流程集成,持续发布LTS 版本的wsl rootfs,旁加载应用 -- [ ] 在openEuler的基础设施中构建APP和rootfs,`github action`用户开发者自定义 +- [x] 和openeuler 发布流程集成,持续发布LTS 版本的wsl rootfs,旁加载应用 +- [x] 在openEuler的基础设施中构建APP和rootfs,`github action`用户开发者自定义 - [x] 20.03 LTS SP3上架windows商店 - [x] 22.03 LTS 上架windows商店 -- [ ] 22.09 上架windows商店 -- [ ] systemd 正常工作并开启namespace +- [x] 22.09 上架windows商店 +- [x] systemd 正常工作并开启namespace ## contribution You're wellcome @@ -31,10 +31,27 @@ MIT # how to customize my own WSL 1. fork本仓库 -2. 根据需要,修改本仓库代码(例如要增删包,可以修改`docker/Dockerfile`) -3. 根据[该文档](https://learn.microsoft.com/en-us/azure/active-directory/develop/howto-create-self-signed-certificate)生成一个自签发的证书,后缀为pfx -4. 修改`DistroLauncher-Appx/MyDistro.appxmanifest`中的`Publisher=`字段,将其改为与上面的证书CN字段一致 -5. 修改`DistroLauncher-Appx/DistroLauncher-Appx.vcxproj`中的``字段,将其改为上面证书的指纹和证书`CN`字段,获取`CN`/`PackageCertificateThumbprint`的方法如下: +1. 根据需要,修改本仓库代码(例如要增删包,可以修改`docker/Dockerfile`) +1. 根据[该文档](https://learn.microsoft.com/zh-cn/windows/msix/package/create-certificate-package-signing)生成一个自签发的证书,后缀为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) + ``` +1. 导出证书: + ``` + $password = ConvertTo-SecureString -String -Force -AsPlainText + Export-PfxCertificate -cert "Cert:\CurrentUser\My\" -FilePath .pfx -Password $password + ``` +1. 注意,此时导出的证书包含了私钥并且私钥用密码进行了加密,可以参考[这里](https://github.com/fsprojects/Paket/blob/master/tools/SignTool/remove-password-from-pfx.cmd)将密码去掉 + ``` + openssl pkcs12 -in -nodes -out temp.pem -password pass: + openssl pkcs12 -export -in temp.pem -out -password pass: + ``` +1. 可以使用下面的命令将证书转换为`base64`格式: + ``` + certutil.exe -encode + ``` +1. 修改`DistroLauncher-Appx/MyDistro.appxmanifest`中的`Publisher=`字段,将其改为与上面的证书CN字段一致 +1. 修改`DistroLauncher-Appx/DistroLauncher-Appx.vcxproj`中的``字段,将其改为上面证书的指纹和证书`CN`字段,获取`CN`/`PackageCertificateThumbprint`的方法如下: ```powershell PS C:\> Get-PfxCertificate -FilePath .\DistroLauncher-Appx_TemporaryKey.pfx diff --git a/meta/20.03/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj b/meta/20.03/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj index c4e82daa2e96ebf8937989b04998d0abcf12ea20..fb93f55e3a93b230da1c108b189a4eccf8bd0716 100644 --- a/meta/20.03/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj +++ b/meta/20.03/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj @@ -76,7 +76,7 @@ False Always - DFB44C1372719889CD90289BEE1FC8AC90C26DE1 + 3F03B484C7EA61BBACE5C74A3610FE102DF06005 False x64|arm64 0 diff --git a/meta/20.03/DistroLauncher-Appx/MyDistro.appxmanifest b/meta/20.03/DistroLauncher-Appx/MyDistro.appxmanifest index bdeb61dcecd93273ece522dc2ffdf54a4ae09c1e..aa41feed9e2a1fa946b02bd01f3c5405ff484823 100644 --- a/meta/20.03/DistroLauncher-Appx/MyDistro.appxmanifest +++ b/meta/20.03/DistroLauncher-Appx/MyDistro.appxmanifest @@ -1,6 +1,6 @@  - + openEuler 20.03 diff --git a/meta/22.03/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj b/meta/22.03/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj index 02eb80faa9f944034b8c1cc8dfe6664c40e6a4d1..e5bbfb3e5b7e442e103c6a653388c977be4d7086 100644 --- a/meta/22.03/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj +++ b/meta/22.03/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj @@ -76,7 +76,7 @@ False Always - DFB44C1372719889CD90289BEE1FC8AC90C26DE1 + 3F03B484C7EA61BBACE5C74A3610FE102DF06005 False x64|arm64 0 diff --git a/meta/22.03/DistroLauncher-Appx/MyDistro.appxmanifest b/meta/22.03/DistroLauncher-Appx/MyDistro.appxmanifest index 1fc2a5d0536b70c1e205128ecd5e52c3bd7f0987..ccd885c5769da2088fecbbe3f9fadcb29a01025f 100644 --- a/meta/22.03/DistroLauncher-Appx/MyDistro.appxmanifest +++ b/meta/22.03/DistroLauncher-Appx/MyDistro.appxmanifest @@ -1,6 +1,6 @@  - + openEuler 22.03 diff --git a/meta/22.09/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj b/meta/22.09/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj index 7db1594a1f803a57fb7f8175463587b407aa1bce..955e6809c39b8a2331129a7c61df26f28b495ce8 100644 --- a/meta/22.09/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj +++ b/meta/22.09/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj @@ -76,7 +76,7 @@ False Always - DFB44C1372719889CD90289BEE1FC8AC90C26DE1 + 3F03B484C7EA61BBACE5C74A3610FE102DF06005 False x64|arm64 0 diff --git a/meta/22.09/DistroLauncher-Appx/MyDistro.appxmanifest b/meta/22.09/DistroLauncher-Appx/MyDistro.appxmanifest index 211081176de8bc769f7a96bf77579b5da18eeef2..d04fe9403595ec1b09caa0d412132ae0932292e6 100644 --- a/meta/22.09/DistroLauncher-Appx/MyDistro.appxmanifest +++ b/meta/22.09/DistroLauncher-Appx/MyDistro.appxmanifest @@ -1,6 +1,6 @@  - + openEuler 22.09 diff --git a/meta/23.03/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj b/meta/23.03/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj index 4b893ef6a3ea9bd9d2f5947686f7ffca63698ad4..fd6997207df95ef6d827bfb33727494db75edb42 100644 --- a/meta/23.03/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj +++ b/meta/23.03/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj @@ -76,7 +76,7 @@ False Always - DFB44C1372719889CD90289BEE1FC8AC90C26DE1 + 3F03B484C7EA61BBACE5C74A3610FE102DF06005 False x64|arm64 0 diff --git a/meta/23.03/DistroLauncher-Appx/MyDistro.appxmanifest b/meta/23.03/DistroLauncher-Appx/MyDistro.appxmanifest index b1a077af6475c755ce17b7ec21a17c2ffa8d24fa..1373d04c3d9b94f58307aa2fcfe3bc01ece275dc 100644 --- a/meta/23.03/DistroLauncher-Appx/MyDistro.appxmanifest +++ b/meta/23.03/DistroLauncher-Appx/MyDistro.appxmanifest @@ -1,6 +1,6 @@  - + openEuler 23.03 diff --git a/meta/23.09/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj b/meta/23.09/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj index e55d8533c3b87091e3218e4f06036a44e6582ee6..ba3d642732f3e9bfa023bfc8e0c8494b56d28662 100644 --- a/meta/23.09/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj +++ b/meta/23.09/DistroLauncher-Appx/DistroLauncher-Appx.vcxproj @@ -76,7 +76,7 @@ False Always - DFB44C1372719889CD90289BEE1FC8AC90C26DE1 + 3F03B484C7EA61BBACE5C74A3610FE102DF06005 False x64|arm64 0 diff --git a/meta/23.09/DistroLauncher-Appx/MyDistro.appxmanifest b/meta/23.09/DistroLauncher-Appx/MyDistro.appxmanifest index 5a3f162c3ac6a068f85cdb15456fd655069b59ea..69665a6cc2b919c6369eab11031a582ceff59586 100644 --- a/meta/23.09/DistroLauncher-Appx/MyDistro.appxmanifest +++ b/meta/23.09/DistroLauncher-Appx/MyDistro.appxmanifest @@ -1,6 +1,6 @@  - + openEuler 23.09