mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-18 22:16:18 -05:00
feat: release GP Connect 3.3.0 with Native Shell support
This commit is contained in:
226 files changed
+7700
-5225
No files matched your search
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
# Record the library ABIs required by the staged OpenBSD executables.
|
||||
set -eu
|
||||
|
||||
root=$1
|
||||
temp=$(mktemp -d)
|
||||
trap 'rm -rf "$temp"' EXIT HUP INT TERM
|
||||
find "$root" -type f > "$temp/files"
|
||||
while IFS= read -r file; do
|
||||
case $(file -b "$file") in
|
||||
ELF*) objdump -p "$file" >> "$temp/headers" ;;
|
||||
esac
|
||||
done < "$temp/files"
|
||||
test -s "$temp/headers"
|
||||
sed -n 's/^[[:space:]]*NEEDED[[:space:]]*lib\([^[:space:]]*\)\.so\.\([0-9][0-9]*\.[0-9][0-9]*\)[[:space:]]*$/@wantlib \1.\2/p' \
|
||||
"$temp/headers" | LC_ALL=C sort -u
|
||||
@@ -21,6 +21,8 @@ xml_replacement=$(escape_replacement "$xml_prefix")
|
||||
temporary=$(mktemp)
|
||||
trap 'rm -f "$temporary"' EXIT HUP INT TERM
|
||||
for file in share/applications/gpgui.desktop \
|
||||
share/applications/gpgui-helper.desktop \
|
||||
share/applications/gpauth.desktop \
|
||||
share/polkit-1/actions/com.yuezk.gpgui.policy \
|
||||
lib/NetworkManager/dispatcher.d/pre-down.d/gpclient.down \
|
||||
lib/NetworkManager/dispatcher.d/gpclient-nm-hook; do
|
||||
|
||||
@@ -23,6 +23,11 @@ for platform in linux bsd; do
|
||||
CARGO_RELEASE_DIR="$temp/release" GPGUI_BINARY="$temp/release/gpgui" > "$temp/$platform.log"
|
||||
installed="$stage/custom/gp"
|
||||
test -x "$installed/bin/gpclient"
|
||||
for app in gpgui-helper gpauth; do
|
||||
grep -Fxq 'Exec=/custom/gp/bin/gpclient launch-gui' "$installed/share/applications/$app.desktop"
|
||||
grep -Fxq 'Icon=gpgui' "$installed/share/applications/$app.desktop"
|
||||
grep -Fxq 'NoDisplay=true' "$installed/share/applications/$app.desktop"
|
||||
done
|
||||
test -x "$installed/libexec/gpclient/gp-vpnc-script-installer"
|
||||
grep -Fxq 'Exec=/custom/gp/bin/gpclient launch-gui %u' "$installed/share/applications/gpgui.desktop"
|
||||
grep -q '>/custom/gp/bin/gpservice<' "$installed/share/polkit-1/actions/com.yuezk.gpgui.policy"
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
root=$(CDPATH= cd -- "$(dirname "$0")/../.." && pwd)
|
||||
temp=$(mktemp -d)
|
||||
trap 'rm -rf "$temp"' EXIT HUP INT TERM
|
||||
mkdir -p "$temp/bin" "$temp/stage/bin"
|
||||
touch "$temp/stage/bin/gpclient" "$temp/stage/bin/gpauth" "$temp/stage/bin/script"
|
||||
cat > "$temp/bin/file" <<'EOF'
|
||||
#!/bin/sh
|
||||
case $2 in
|
||||
*/script) echo 'POSIX shell script, ASCII text executable' ;;
|
||||
*) echo 'ELF 64-bit LSB shared object, x86-64' ;;
|
||||
esac
|
||||
EOF
|
||||
cat > "$temp/bin/objdump" <<'EOF'
|
||||
#!/bin/sh
|
||||
case $2 in
|
||||
*/gpclient)
|
||||
printf 'Dynamic Section:\n NEEDED libhogweed.so.3.1\n NEEDED libc.so.103.0\n'
|
||||
;;
|
||||
*/gpauth)
|
||||
printf ' NEEDED libc.so.103.0\n NEEDED libc++abi.so.9.0\n'
|
||||
;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
EOF
|
||||
chmod +x "$temp/bin/file" "$temp/bin/objdump"
|
||||
PATH="$temp/bin:$PATH" sh "$root/scripts/openbsd-library-dependencies.sh" "$temp/stage" > "$temp/actual"
|
||||
cat > "$temp/expected" <<'EOF'
|
||||
@wantlib c++abi.9.0
|
||||
@wantlib c.103.0
|
||||
@wantlib hogweed.3.1
|
||||
EOF
|
||||
diff -u "$temp/expected" "$temp/actual"
|
||||
# Failure to inspect an ELF file must stop packaging, not omit its requirements.
|
||||
printf '#!/bin/sh\nexit 1\n' > "$temp/bin/objdump"
|
||||
if PATH="$temp/bin:$PATH" sh "$root/scripts/openbsd-library-dependencies.sh" "$temp/stage" > /dev/null; then
|
||||
echo 'Expected ELF inspection failure' >&2
|
||||
exit 1
|
||||
fi
|
||||
echo 'OpenBSD library dependency checks passed.'
|
||||
@@ -57,17 +57,6 @@ verify_same_file \
|
||||
verify_same_file \
|
||||
"$GPGUI_APP_DIR/src-tauri/icons/icon.svg" \
|
||||
"$GP_DIR/packaging/files/usr/share/icons/hicolor/scalable/apps/gpgui.svg"
|
||||
for icon in \
|
||||
gpgui-connected-symbolic.svg \
|
||||
gpgui-disconnected-symbolic.svg \
|
||||
gpgui-connecting-1-symbolic.svg \
|
||||
gpgui-connecting-2-symbolic.svg \
|
||||
gpgui-connecting-3-symbolic.svg \
|
||||
gpgui-connecting-4-symbolic.svg; do
|
||||
verify_same_file \
|
||||
"$GPGUI_APP_DIR/src-tauri/icons/tray/theme/$icon" \
|
||||
"$GP_DIR/packaging/files/usr/share/icons/hicolor/scalable/status/$icon"
|
||||
done
|
||||
verify_same_file \
|
||||
"$GPGUI_APP_DIR/src-tauri/icons/32x32.png" \
|
||||
"$GP_DIR/apps/gpauth/icons/32x32.png"
|
||||
@@ -116,12 +105,18 @@ verify_contains \
|
||||
verify_contains \
|
||||
"$GPGUI_APP_DIR/gpgui.desktop.in" \
|
||||
"MimeType=x-scheme-handler/globalprotectcallback;"
|
||||
verify_contains \
|
||||
"$GPGUI_APP_DIR/gpgui.desktop.in" \
|
||||
"StartupWMClass=com.yuezk.gpgui"
|
||||
verify_contains \
|
||||
"$GP_DIR/packaging/files/usr/share/applications/gpgui.desktop" \
|
||||
"Exec=/usr/bin/gpclient launch-gui %u"
|
||||
verify_contains \
|
||||
"$GP_DIR/packaging/files/usr/share/applications/gpgui.desktop" \
|
||||
"MimeType=x-scheme-handler/globalprotectcallback;"
|
||||
verify_contains \
|
||||
"$GP_DIR/packaging/files/usr/share/applications/gpgui.desktop" \
|
||||
"StartupWMClass=com.yuezk.gpgui"
|
||||
verify_contains \
|
||||
"$GP_DIR/packaging/bsd/gpgui.desktop" \
|
||||
"Exec=/usr/local/bin/gpclient launch-gui %u"
|
||||
@@ -129,7 +124,19 @@ verify_contains \
|
||||
"$GP_DIR/packaging/bsd/gpgui.desktop" \
|
||||
"MimeType=x-scheme-handler/globalprotectcallback;"
|
||||
verify_absent "$GPGUI_APP_DIR/gpauth.desktop"
|
||||
verify_absent "$GP_DIR/packaging/files/usr/share/applications/gpauth.desktop"
|
||||
verify_absent "$GP_DIR/packaging/bsd/gpauth.desktop"
|
||||
for app in gpgui-helper gpauth; do
|
||||
for directory in "$GP_DIR/packaging/files/usr/share/applications" "$GP_DIR/packaging/bsd"; do
|
||||
desktop_file="$directory/$app.desktop"
|
||||
verify_contains "$desktop_file" "Icon=gpgui"
|
||||
verify_contains "$desktop_file" "NoDisplay=true"
|
||||
verify_contains "$desktop_file" "StartupWMClass=$app"
|
||||
if grep -q '^MimeType=' "$desktop_file"; then
|
||||
echo "Hidden desktop identity must not register a URL handler: $desktop_file" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
verify_contains "$GP_DIR/packaging/files/usr/share/applications/$app.desktop" "Exec=/usr/bin/gpclient launch-gui"
|
||||
verify_contains "$GP_DIR/packaging/bsd/$app.desktop" "Exec=/usr/local/bin/gpclient launch-gui"
|
||||
done
|
||||
|
||||
echo "Linux desktop and tray assets are synchronized"
|
||||
echo "Linux desktop assets are synchronized"
|
||||
Reference in new issue
Block a user