mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2026-11-20 15:06:14 -05:00
Merge pull request #718 from yuezk/fix/nix-indicator-cleanup
fix(nix): remove stale tray dependencies and preserve release settings
This commit is contained in:
8 files changed
+41
-21
No files matched your search
@@ -112,7 +112,6 @@ jobs:
|
|||||||
in
|
in
|
||||||
assert builtins.elem package
|
assert builtins.elem package
|
||||||
hostSystem.config.environment.systemPackages;
|
hostSystem.config.environment.systemPackages;
|
||||||
assert hostSystem.config.services.ayatana-indicators.enable;
|
|
||||||
package
|
package
|
||||||
'
|
'
|
||||||
|
|
||||||
|
|||||||
@@ -362,7 +362,6 @@ init-debian: clean-debian tarball
|
|||||||
# Remove the GUI dependencies if neither GUI component is included
|
# Remove the GUI dependencies if neither GUI component is included
|
||||||
if [ $(INCLUDE_GUI) -eq 0 ] && [ $(BUILD_GUI_HELPER) -eq 0 ]; then \
|
if [ $(INCLUDE_GUI) -eq 0 ] && [ $(BUILD_GUI_HELPER) -eq 0 ]; then \
|
||||||
sed -i "/libsecret-1-0/d" .build/deb/$(PKG)/debian/control; \
|
sed -i "/libsecret-1-0/d" .build/deb/$(PKG)/debian/control; \
|
||||||
sed -i "/libayatana-appindicator3-1/d" .build/deb/$(PKG)/debian/control; \
|
|
||||||
sed -i "/gnome-keyring/d" .build/deb/$(PKG)/debian/control; \
|
sed -i "/gnome-keyring/d" .build/deb/$(PKG)/debian/control; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -475,7 +474,6 @@ init-apk: clean-apk tarball
|
|||||||
|
|
||||||
# Remove the GUI dependencies if neither GUI component is included
|
# Remove the GUI dependencies if neither GUI component is included
|
||||||
if [ $(INCLUDE_GUI) -eq 0 ] && [ $(BUILD_GUI_HELPER) -eq 0 ]; then \
|
if [ $(INCLUDE_GUI) -eq 0 ] && [ $(BUILD_GUI_HELPER) -eq 0 ]; then \
|
||||||
sed -i "/^\tlibayatana-appindicator$$/d" .build/apk/APKBUILD; \
|
|
||||||
sed -i "/^\tlibsecret$$/d" .build/apk/APKBUILD; \
|
sed -i "/^\tlibsecret$$/d" .build/apk/APKBUILD; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# GlobalProtect-openconnect
|
# GlobalProtect-openconnect
|
||||||
|
|
||||||
A GlobalProtect VPN client built on OpenConnect. GP Connect runs on Windows, macOS, Linux, FreeBSD, and OpenBSD. Command-line tools (`gpclient`) are available on macOS, Linux, and BSD.
|
A GlobalProtect VPN client built on OpenConnect. GP Connect runs on Windows, macOS, Linux, FreeBSD, and OpenBSD.
|
||||||
|
|
||||||
> **Disclaimer**: GP Connect is an independent third-party client for GlobalProtect VPN networks. It is not affiliated with or endorsed by Palo Alto Networks, Inc.
|
> **Disclaimer**: GP Connect is an independent third-party client for GlobalProtect VPN networks. It is not affiliated with or endorsed by Palo Alto Networks, Inc.
|
||||||
|
|
||||||
@@ -94,16 +94,9 @@ Run `gpclient --help` or `gpclient <command> --help` to view all available comma
|
|||||||
|
|
||||||
### Windows
|
### Windows
|
||||||
|
|
||||||
Download the matching EXE installer from [GitHub Releases](https://github.com/yuezk/GlobalProtect-openconnect/releases/latest):
|
1. Download the **x64** or **ARM64** installer for your PC from [GitHub Releases](https://github.com/yuezk/GlobalProtect-openconnect/releases/latest).
|
||||||
|
2. Run the installer and approve the administrator prompt.
|
||||||
- **x64**: Windows 10 version 2004 (build 19041) or later.
|
3. Open **GP Connect** from the Start menu.
|
||||||
- **ARM64**: Windows 11.
|
|
||||||
|
|
||||||
Run the installer and confirm installation. It installs GP Connect and its background VPN service for all users; administrator access is required. Open GP Connect from the Start menu as your normal user.
|
|
||||||
|
|
||||||
The installer and application executables are signed by **Tangramly, LLC**. Embedded sign-in uses Microsoft Edge WebView2 Runtime. You can also use your system browser from Settings.
|
|
||||||
|
|
||||||
GP Connect checks for updates in the app. Uninstall it from Windows Settings; your app settings are kept. The Windows package contains the desktop app and service, without the `gpclient` command-line tool.
|
|
||||||
|
|
||||||
### macOS
|
### macOS
|
||||||
|
|
||||||
@@ -168,7 +161,7 @@ Download the latest `.apk` package from the [releases](https://github.com/yuezk/
|
|||||||
sudo apk add --allow-untrusted globalprotect-openconnect-*.apk
|
sudo apk add --allow-untrusted globalprotect-openconnect-*.apk
|
||||||
```
|
```
|
||||||
|
|
||||||
*(Requires `community` repository enabled for WebKitGTK and AppIndicator dependencies).*
|
*(Requires the `community` repository for WebKitGTK dependencies).*
|
||||||
|
|
||||||
### FreeBSD
|
### FreeBSD
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ Install build and runtime dependencies:
|
|||||||
```sh
|
```sh
|
||||||
sudo pkg install git rust libiconv gettext-tools autoconf automake libtool patch \
|
sudo pkg install git rust libiconv gettext-tools autoconf automake libtool patch \
|
||||||
gmake pkgconf libxml2 gnutls p11-kit nettle gmp liblz4 gnome-keyring \
|
gmake pkgconf libxml2 gnutls p11-kit nettle gmp liblz4 gnome-keyring \
|
||||||
libayatana-appindicator polkit webkit2-gtk_41 xdg-utils
|
polkit webkit2-gtk_41 xdg-utils
|
||||||
```
|
```
|
||||||
|
|
||||||
Build and install:
|
Build and install:
|
||||||
|
|||||||
@@ -86,7 +86,6 @@
|
|||||||
|
|
||||||
linuxRuntimeDependencies = with pkgs; [
|
linuxRuntimeDependencies = with pkgs; [
|
||||||
glib-networking
|
glib-networking
|
||||||
libayatana-appindicator
|
|
||||||
xdg-utils
|
xdg-utils
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -174,7 +173,6 @@
|
|||||||
webkitgtk_4_1
|
webkitgtk_4_1
|
||||||
glib-networking
|
glib-networking
|
||||||
libsecret
|
libsecret
|
||||||
libayatana-appindicator
|
|
||||||
];
|
];
|
||||||
|
|
||||||
installNixosPolkitRule = ''
|
installNixosPolkitRule = ''
|
||||||
@@ -326,7 +324,6 @@
|
|||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
environment.systemPackages = [ cfg.package ];
|
environment.systemPackages = [ cfg.package ];
|
||||||
services.ayatana-indicators.enable = lib.mkDefault true;
|
|
||||||
security.polkit = {
|
security.polkit = {
|
||||||
enable = true;
|
enable = true;
|
||||||
} // lib.optionalAttrs (options.security.polkit ? enablePkexecWrapper) {
|
} // lib.optionalAttrs (options.security.polkit ? enablePkexecWrapper) {
|
||||||
|
|||||||
@@ -43,7 +43,6 @@ in {
|
|||||||
prebuilt = assert prebuiltPackage.version == sourcePackage.version; prebuiltPackage;
|
prebuilt = assert prebuiltPackage.version == sourcePackage.version; prebuiltPackage;
|
||||||
module = assert modulePackage.version == sourcePackage.version;
|
module = assert modulePackage.version == sourcePackage.version;
|
||||||
assert builtins.elem modulePackage hostSystem.config.environment.systemPackages;
|
assert builtins.elem modulePackage hostSystem.config.environment.systemPackages;
|
||||||
assert hostSystem.config.services.ayatana-indicators.enable;
|
|
||||||
assert hostSystem.config.security.polkit.enable;
|
assert hostSystem.config.security.polkit.enable;
|
||||||
assert hostSystem.config.security.wrappers.pkexec.enable;
|
assert hostSystem.config.security.wrappers.pkexec.enable;
|
||||||
assert hostSystem.config.security.wrappers.pkexec.setuid;
|
assert hostSystem.config.security.wrappers.pkexec.setuid;
|
||||||
|
|||||||
@@ -37,7 +37,30 @@ PY
|
|||||||
branch="chore/promote-$tag"
|
branch="chore/promote-$tag"
|
||||||
git switch -c "$branch" origin/main
|
git switch -c "$branch" origin/main
|
||||||
git merge --ff --no-edit "$release_sha"
|
git merge --ff --no-edit "$release_sha"
|
||||||
cp "$artifact_dir/flake.nix" "$artifact_dir/flake.lock" .
|
# The artifact may come from older main sources; preserve the released package logic.
|
||||||
|
python3 - "$artifact_dir/flake.nix" <<'PY'
|
||||||
|
import re, sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
artifact = Path(sys.argv[1]).read_text()
|
||||||
|
path = Path('flake.nix')
|
||||||
|
promoted = path.read_text()
|
||||||
|
fields = [(name, rf'(\b{name}\s*=\s*")([^"]+)(")')
|
||||||
|
for name in ('releaseTag', 'releaseVersion')]
|
||||||
|
for block in ('gpguiHashes', 'binaryHashes'):
|
||||||
|
for arch in ('x86_64', 'aarch64'):
|
||||||
|
fields.append((f'{block}.{arch}', rf'(\b{block}\s*=\s*\{{[^}}]*?\b{arch}\s*=\s*")([^"]+)(")'))
|
||||||
|
for name, pattern in fields:
|
||||||
|
values = re.findall(pattern, artifact)
|
||||||
|
if len(values) != 1:
|
||||||
|
raise SystemExit(f'Expected exactly one {name} in the flake artifact')
|
||||||
|
value = values[0][1]
|
||||||
|
promoted, count = re.subn(pattern, lambda match: match[1] + value + match[3], promoted)
|
||||||
|
if count != 1:
|
||||||
|
raise SystemExit(f'Expected exactly one {name} in the release flake')
|
||||||
|
path.write_text(promoted)
|
||||||
|
PY
|
||||||
|
cp "$artifact_dir/flake.lock" .
|
||||||
python3 "$script_dir/validate-release-version.py" --version "${tag#v}"
|
python3 "$script_dir/validate-release-version.py" --version "${tag#v}"
|
||||||
# Check against Cargo too: overriding the expectation above is only for artifacts.
|
# Check against Cargo too: overriding the expectation above is only for artifacts.
|
||||||
python3 "$script_dir/validate-release-version.py"
|
python3 "$script_dir/validate-release-version.py"
|
||||||
|
|||||||
@@ -144,9 +144,15 @@ class PromotionTests(unittest.TestCase):
|
|||||||
repo, origin, artifact = root / 'repo', root / 'origin.git', root / 'artifact'
|
repo, origin, artifact = root / 'repo', root / 'origin.git', root / 'artifact'
|
||||||
initialize(repo)
|
initialize(repo)
|
||||||
write_version(repo)
|
write_version(repo)
|
||||||
|
hashes = 'gpguiHashes = { x86_64 = "old-gui-x64"; aarch64 = "old-gui-arm64"; };\n' \
|
||||||
|
'binaryHashes = { x86_64 = "old-cli-x64"; aarch64 = "old-cli-arm64"; };\n'
|
||||||
|
with (repo / 'flake.nix').open('a') as flake:
|
||||||
|
flake.write('packageSetting = "original";\n' + hashes)
|
||||||
old = commit(repo, '3.1')
|
old = commit(repo, '3.1')
|
||||||
git(repo, 'switch', '-c', 'release/next')
|
git(repo, 'switch', '-c', 'release/next')
|
||||||
write_version(repo, '3.2.0', '3.1.0')
|
write_version(repo, '3.2.0', '3.1.0')
|
||||||
|
with (repo / 'flake.nix').open('a') as flake:
|
||||||
|
flake.write('packageSetting = "released";\n' + hashes)
|
||||||
(repo / 'feature').write_text('released product feature')
|
(repo / 'feature').write_text('released product feature')
|
||||||
release = commit(repo, '3.2 source')
|
release = commit(repo, '3.2 source')
|
||||||
git(repo, 'tag', 'v3.2.0')
|
git(repo, 'tag', 'v3.2.0')
|
||||||
@@ -158,6 +164,8 @@ class PromotionTests(unittest.TestCase):
|
|||||||
git(repo, 'push', 'origin', 'main', 'v3.2.0')
|
git(repo, 'push', 'origin', 'main', 'v3.2.0')
|
||||||
artifact.mkdir()
|
artifact.mkdir()
|
||||||
write_version(artifact, '3.2.0')
|
write_version(artifact, '3.2.0')
|
||||||
|
with (artifact / 'flake.nix').open('a') as flake:
|
||||||
|
flake.write('packageSetting = "original";\n' + hashes.replace('old-', 'new-'))
|
||||||
(artifact / 'release-candidate.json').write_text(json.dumps({'version': '3.2.0', 'releaseTag': 'v3.2.0'}))
|
(artifact / 'release-candidate.json').write_text(json.dumps({'version': '3.2.0', 'releaseTag': 'v3.2.0'}))
|
||||||
result = subprocess.run(['bash', str(ROOT / 'scripts/prepare-release-promotion.sh'),
|
result = subprocess.run(['bash', str(ROOT / 'scripts/prepare-release-promotion.sh'),
|
||||||
'v3.2.0', str(artifact)], cwd=repo, capture_output=True, text=True)
|
'v3.2.0', str(artifact)], cwd=repo, capture_output=True, text=True)
|
||||||
@@ -168,6 +176,9 @@ class PromotionTests(unittest.TestCase):
|
|||||||
self.assertEqual(git(repo, 'show', f'{old}:Cargo.toml'), '[workspace.package]\nversion = "3.1.0"')
|
self.assertEqual(git(repo, 'show', f'{old}:Cargo.toml'), '[workspace.package]\nversion = "3.1.0"')
|
||||||
self.assertTrue((repo / 'infrastructure').exists())
|
self.assertTrue((repo / 'infrastructure').exists())
|
||||||
self.assertTrue((repo / 'feature').exists())
|
self.assertTrue((repo / 'feature').exists())
|
||||||
|
promoted = (repo / 'flake.nix').read_text()
|
||||||
|
self.assertIn('packageSetting = "released";', promoted)
|
||||||
|
self.assertIn(hashes.replace('old-', 'new-'), promoted)
|
||||||
self.assertEqual(git(repo, 'rev-list', '--parents', '-1', 'HEAD^').split()[1:], [main, release])
|
self.assertEqual(git(repo, 'rev-list', '--parents', '-1', 'HEAD^').split()[1:], [main, release])
|
||||||
self.assertEqual(git(repo, 'diff', '--name-only', 'HEAD^', 'HEAD'), 'flake.nix')
|
self.assertEqual(git(repo, 'diff', '--name-only', 'HEAD^', 'HEAD'), 'flake.nix')
|
||||||
self.assertEqual(git(repo, 'status', '--porcelain'), '')
|
self.assertEqual(git(repo, 'status', '--porcelain'), '')
|
||||||
|
|||||||
Reference in new issue
Block a user