зеркало из https://github.com/microsoft/msquic.git
show warning prompt for installing Linux XDP deps (#4302)
* show warning for installing Linux XDP deps * change force flag name * Fix yml to use ForceXdpInstall * unify * try single quote * remove redundant xdp flag * fix renux packaging
This commit is contained in:
Родитель
0a29701afc
Коммит
e3135cf0ed
|
@ -99,7 +99,7 @@ jobs:
|
|||
chown -R $(id -u):$(id -g) $PWD
|
||||
- name: Prepare Machine
|
||||
shell: pwsh
|
||||
run: scripts/prepare-machine.ps1 ${{ inputs.plat == 'linux' && '-ForContainerBuild' || '-ForBuild' }} -Tls ${{ inputs.tls }} ${{ inputs.xdp }}
|
||||
run: scripts/prepare-machine.ps1 ${{ inputs.plat == 'linux' && '-ForContainerBuild' || '-ForBuild' }} -Tls ${{ inputs.tls }}
|
||||
- name: Build For Test
|
||||
if: inputs.build == '-Test'
|
||||
shell: pwsh
|
||||
|
|
|
@ -82,7 +82,7 @@ jobs:
|
|||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
||||
- name: Prepare Machine
|
||||
shell: pwsh
|
||||
run: scripts/prepare-machine.ps1 -ForTest ${{ matrix.vec.xdp }}
|
||||
run: scripts/prepare-machine.ps1 -ForTest ${{ matrix.vec.xdp == '-UseXdp' && '-UseXdp -ForceXdpInstall' || '' }}
|
||||
- name: Download Build Artifacts
|
||||
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
|
||||
with:
|
||||
|
|
|
@ -60,7 +60,7 @@ jobs:
|
|||
fetch-depth: 0
|
||||
- name: Prepare Machine
|
||||
shell: pwsh
|
||||
run: scripts/prepare-machine.ps1 -ForTest ${{ matrix.vec.xdp }}
|
||||
run: scripts/prepare-machine.ps1 -ForTest ${{ matrix.vec.xdp == '-UseXdp' && '-UseXdp -ForceXdpInstall' || '' }}
|
||||
- name: Download Package
|
||||
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
|
||||
with:
|
||||
|
|
|
@ -83,7 +83,7 @@ jobs:
|
|||
fetch-depth: 0
|
||||
- name: Prepare Machine
|
||||
shell: pwsh
|
||||
run: scripts/prepare-machine.ps1 -ForBuild ${{ inputs.xdp }}
|
||||
run: scripts/prepare-machine.ps1 -ForBuild ${{ inputs.xdp == '-UseXdp' && '-UseXdp -ForceXdpInstall' || '' }}
|
||||
- name: Download Build Artifacts
|
||||
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
|
||||
with:
|
||||
|
|
|
@ -112,7 +112,7 @@ jobs:
|
|||
run: |
|
||||
sudo chmod -R 777 artifacts
|
||||
- name: Prepare Machine
|
||||
run: scripts/prepare-machine.ps1 -Tls ${{ matrix.vec.tls }} -ForTest ${{ matrix.vec.xdp }}
|
||||
run: scripts/prepare-machine.ps1 -Tls ${{ matrix.vec.tls }} -ForTest ${{ matrix.vec.xdp == '-UseXdp' && '-UseXdp -ForceXdpInstall' || '' }}
|
||||
shell: pwsh
|
||||
- name: spinquic (PR)
|
||||
if: github.event_name == 'pull_request'
|
||||
|
|
|
@ -135,7 +135,7 @@ jobs:
|
|||
run: |
|
||||
sudo chmod -R 777 artifacts
|
||||
- name: Prepare Machine
|
||||
run: scripts/prepare-machine.ps1 -Tls ${{ matrix.vec.tls }} -ForTest ${{ matrix.vec.xdp }}
|
||||
run: scripts/prepare-machine.ps1 -Tls ${{ matrix.vec.tls }} -ForTest ${{ matrix.vec.xdp == '-UseXdp' && '-UseXdp -ForceXdpInstall' || '' }}
|
||||
shell: pwsh
|
||||
- name: Install ETW Manifest
|
||||
if: matrix.vec.plat == 'windows'
|
||||
|
@ -232,7 +232,7 @@ jobs:
|
|||
name: ${{ matrix.vec.config }}-${{ matrix.vec.plat }}-${{ matrix.vec.os }}-${{ matrix.vec.arch }}-${{ matrix.vec.tls }}${{ matrix.vec.sanitize }}${{ matrix.vec.build }}
|
||||
path: artifacts
|
||||
- name: Prepare Machine
|
||||
run: scripts/prepare-machine.ps1 -ForTest ${{ matrix.vec.xdp }}
|
||||
run: scripts/prepare-machine.ps1 -ForTest ${{ matrix.vec.xdp == '-UseXdp' && '-UseXdp -ForceXdpInstall' || '' }}
|
||||
shell: pwsh
|
||||
- name: Interop
|
||||
shell: pwsh
|
||||
|
|
|
@ -183,13 +183,22 @@ sudo dnf install libatomic
|
|||
|
||||
#### Linux XDP
|
||||
Linux XDP is experimentally supported on amd64 && Ubuntu 22.04LTS.
|
||||
Commands below automatically install dependencies and setup runtime environment.
|
||||
Commands below install dependencies and setup runtime environment.
|
||||
**<span style="color:red;">WARN: This might break your system by installing Ubuntu 24.04LTS packages on ubuntu 22.04.Do not run on production environment and need to understand the side effect. You can workaround this prompt by `-ForceXdpInstall` </span>**
|
||||
```sh
|
||||
pwsh ./scripts/prepare-machine.ps1 -UseXdp
|
||||
pwsh ./scripts/build.ps1 -UseXdp
|
||||
$ pwsh ./scripts/prepare-machine.ps1 -UseXdp
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARN !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
Linux XDP installs dependencies from Ubuntu 24.04 packages, which should affect your environment
|
||||
You need to understand the impact of this on your environment before proceeding
|
||||
Type 'YES' to proceed: YES
|
||||
|
||||
or
|
||||
|
||||
$ pwsh ./scripts/prepare-machine.ps1 -UseXdp -ForceXdpInstall
|
||||
$ pwsh ./scripts/build.ps1 -UseXdp
|
||||
```
|
||||
|
||||
`./scripts/prepare-machine.ps1` internally does the below commands:
|
||||
`./scripts/prepare-machine.ps1` internally does the below commands. This might break your environment.
|
||||
```sh
|
||||
# for libxdp v1.4.2
|
||||
sudo apt-add-repository "deb http://mirrors.kernel.org/ubuntu noble main" -y
|
||||
|
|
|
@ -70,6 +70,9 @@ param (
|
|||
[Parameter(Mandatory = $false)]
|
||||
[switch]$UseXdp,
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[switch]$ForceXdpInstall,
|
||||
|
||||
[Parameter(Mandatory = $false)]
|
||||
[switch]$InstallArm64Toolchain,
|
||||
|
||||
|
@ -97,6 +100,20 @@ Set-StrictMode -Version 'Latest'
|
|||
$PSDefaultParameterValues['*:ErrorAction'] = 'Stop'
|
||||
$ProgressPreference = 'SilentlyContinue'
|
||||
|
||||
if ($IsLinux -and $UseXdp) {
|
||||
$IsUbuntu2404 = (Get-Content -Path /etc/os-release | Select-String -Pattern "24.04") -ne $null
|
||||
if (!$IsUbuntu2404 -and !$ForceXdpInstall) {
|
||||
Write-Host "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! WARN !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
|
||||
Write-Host "Linux XDP installs dependencies from Ubuntu 24.04 packages, which should affect your environment"
|
||||
Write-Host "You need to understand the impact of this on your environment before proceeding"
|
||||
$userInput = Read-Host "Type 'YES' to proceed"
|
||||
if ($userInput -ne 'YES') {
|
||||
Write-Output "User did not type YES. Exiting script."
|
||||
exit
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$PrepConfig = & (Join-Path $PSScriptRoot get-buildconfig.ps1) -Tls $Tls
|
||||
$Tls = $PrepConfig.Tls
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче