mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-19 06:26:14 -05:00
fix: repair platform dependency and Windows CI inputs
This commit is contained in:
7 files changed
+28
-11
No files matched your search
@@ -560,10 +560,6 @@ jobs:
|
|||||||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
||||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
python3 scripts/preserve-update-feeds.py \
|
|
||||||
--base-url "${FEED_URL%/appcast.xml}" \
|
|
||||||
--directory gpgui/apps/update-feed-worker/public \
|
|
||||||
--exclude appcast.xml --exclude latest.json
|
|
||||||
trap 'status=$?; if [ "$status" -ne 0 ]; then echo "::error::Private operation failed; diagnostics suppressed."; fi' EXIT
|
trap 'status=$?; if [ "$status" -ne 0 ]; then echo "::error::Private operation failed; diagnostics suppressed."; fi' EXIT
|
||||||
(
|
(
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|||||||
Generated
+11
@@ -2299,6 +2299,7 @@ dependencies = [
|
|||||||
"gptunnel",
|
"gptunnel",
|
||||||
"gpvpnc",
|
"gpvpnc",
|
||||||
"log",
|
"log",
|
||||||
|
"mac_address",
|
||||||
"nix",
|
"nix",
|
||||||
"openconnect",
|
"openconnect",
|
||||||
"openssl",
|
"openssl",
|
||||||
@@ -3258,6 +3259,16 @@ version = "0.3.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d3d25b0e0b648a86960ac23b7ad4abb9717601dec6f66c165f5b037f3f03065f"
|
checksum = "d3d25b0e0b648a86960ac23b7ad4abb9717601dec6f66c165f5b037f3f03065f"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "mac_address"
|
||||||
|
version = "1.2.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f3d0581a75c45969c63afd2bb87b1d8b25cfcc556c7a918cf9bb13b0fe8d2381"
|
||||||
|
dependencies = [
|
||||||
|
"nix",
|
||||||
|
"windows-sys 0.61.2",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "macro-string"
|
name = "macro-string"
|
||||||
version = "0.3.0"
|
version = "0.3.0"
|
||||||
|
|||||||
@@ -34,6 +34,12 @@ getrandom = "0.4"
|
|||||||
[target.'cfg(unix)'.dependencies]
|
[target.'cfg(unix)'.dependencies]
|
||||||
nix = { version = "0.31", features = ["fs", "socket", "user"] }
|
nix = { version = "0.31", features = ["fs", "socket", "user"] }
|
||||||
|
|
||||||
|
[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "openbsd"))'.dependencies]
|
||||||
|
mac_address = "1.2.1"
|
||||||
|
|
||||||
|
[target.'cfg(unix)'.dev-dependencies]
|
||||||
|
mac_address = "1.2.1"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
openssl.workspace = true
|
openssl.workspace = true
|
||||||
tokio-tungstenite.workspace = true
|
tokio-tungstenite.workspace = true
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
param(
|
param(
|
||||||
[string]$MsysRoot = 'C:\msys64',
|
[string]$MsysRoot = 'C:\msys64',
|
||||||
|
[ValidateSet('mingw64','ucrt64')][string]$MsysSubsystem = 'mingw64',
|
||||||
[string]$Prefix,
|
[string]$Prefix,
|
||||||
[int]$Jobs = 4
|
[int]$Jobs = 4
|
||||||
)
|
)
|
||||||
@@ -13,7 +14,7 @@ $Prefix = [System.IO.Path]::GetFullPath($Prefix)
|
|||||||
$bash = Join-Path $MsysRoot 'usr\bin\bash.exe'
|
$bash = Join-Path $MsysRoot 'usr\bin\bash.exe'
|
||||||
if (!(Test-Path $bash)) { throw 'MSYS2 is required to build OpenConnect.' }
|
if (!(Test-Path $bash)) { throw 'MSYS2 is required to build OpenConnect.' }
|
||||||
$ErrorActionPreference = 'Continue'
|
$ErrorActionPreference = 'Continue'
|
||||||
& $bash "$PSScriptRoot/build-openconnect-windows.sh" $repo $Prefix $Jobs
|
& $bash "$PSScriptRoot/build-openconnect-windows.sh" $repo $Prefix $Jobs $MsysSubsystem
|
||||||
$nativeExit = $LASTEXITCODE
|
$nativeExit = $LASTEXITCODE
|
||||||
$ErrorActionPreference = 'Stop'
|
$ErrorActionPreference = 'Stop'
|
||||||
if ($nativeExit -ne 0) { throw 'OpenConnect compilation failed.' }
|
if ($nativeExit -ne 0) { throw 'OpenConnect compilation failed.' }
|
||||||
@@ -49,7 +50,7 @@ while ($pending.Count) {
|
|||||||
foreach ($line in $dependencies) {
|
foreach ($line in $dependencies) {
|
||||||
if ($line -notmatch '^\s+(\S+\.dll)\s*$') { continue }
|
if ($line -notmatch '^\s+(\S+\.dll)\s*$') { continue }
|
||||||
$name = $Matches[1]
|
$name = $Matches[1]
|
||||||
$source = Join-Path "$MsysRoot\mingw64\bin" $name
|
$source = Join-Path "$MsysRoot\$MsysSubsystem\bin" $name
|
||||||
if (Test-Path $source) {
|
if (Test-Path $source) {
|
||||||
$target = Join-Path "$Prefix\bin" $name
|
$target = Join-Path "$Prefix\bin" $name
|
||||||
Copy-Item $source $target -Force
|
Copy-Item $source $target -Force
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Build the bundled protocol library with MSYS2's native Windows compiler.
|
# Build the bundled protocol library with MSYS2's native Windows compiler.
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
export PATH="/mingw64/bin:/usr/bin:$PATH"
|
subsystem=$4
|
||||||
|
export PATH="/$subsystem/bin:/usr/bin:$PATH"
|
||||||
repo=$(cygpath -u "$1")
|
repo=$(cygpath -u "$1")
|
||||||
prefix=$(cygpath -u "$2")
|
prefix=$(cygpath -u "$2")
|
||||||
jobs=$3
|
jobs=$3
|
||||||
export ACLOCAL_PATH=/mingw64/share/aclocal
|
export ACLOCAL_PATH="/$subsystem/share/aclocal"
|
||||||
source_dir="$repo/crates/openconnect/deps/openconnect"
|
source_dir="$repo/crates/openconnect/deps/openconnect"
|
||||||
build_dir="$repo/target/openconnect-windows"
|
build_dir="$repo/target/openconnect-windows"
|
||||||
cd "$source_dir"
|
cd "$source_dir"
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
[CmdletBinding()]
|
[CmdletBinding()]
|
||||||
param([string]$MsysRoot = 'C:\msys64', [string]$Prefix = $env:OPENCONNECT_WINDOWS_PREFIX)
|
param([string]$MsysRoot = 'C:\msys64', [string]$Prefix = $env:OPENCONNECT_WINDOWS_PREFIX,
|
||||||
|
[ValidateSet('mingw64','ucrt64')][string]$MsysSubsystem = 'mingw64')
|
||||||
$repo = Split-Path $PSScriptRoot -Parent
|
$repo = Split-Path $PSScriptRoot -Parent
|
||||||
if (!$Prefix) { $Prefix = Join-Path $repo 'target\native-windows' }
|
if (!$Prefix) { $Prefix = Join-Path $repo 'target\native-windows' }
|
||||||
& "$MsysRoot\usr\bin\bash.exe" "$PSScriptRoot/test-openconnect-windows.sh" $repo $Prefix
|
& "$MsysRoot\usr\bin\bash.exe" "$PSScriptRoot/test-openconnect-windows.sh" $repo $Prefix $MsysSubsystem
|
||||||
if ($LASTEXITCODE -ne 0) { throw 'Native OpenConnect packet-pipe tests failed.' }
|
if ($LASTEXITCODE -ne 0) { throw 'Native OpenConnect packet-pipe tests failed.' }
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Run the native packet-pipe regression against the bundled Windows DLL.
|
# Run the native packet-pipe regression against the bundled Windows DLL.
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
export PATH="/mingw64/bin:/usr/bin:$PATH"
|
subsystem=$3
|
||||||
|
export PATH="/$subsystem/bin:/usr/bin:$PATH"
|
||||||
repo=$(cygpath -u "$1")
|
repo=$(cygpath -u "$1")
|
||||||
prefix=$(cygpath -u "$2")
|
prefix=$(cygpath -u "$2")
|
||||||
build_dir="$repo/target/openconnect-windows"
|
build_dir="$repo/target/openconnect-windows"
|
||||||
|
|||||||
Reference in new issue
Block a user