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:
Kevin Yue authored and GitHub committed 2026-11-18 16:15:47 -08:00
commit dc1376dbac
8 files changed
+41 -21

No files matched your search

-1
View File
@@ -112,7 +112,6 @@ jobs:
in
assert builtins.elem package
hostSystem.config.environment.systemPackages;
assert hostSystem.config.services.ayatana-indicators.enable;
package
'
-2
View File
@@ -362,7 +362,6 @@ init-debian: clean-debian tarball
# Remove the GUI dependencies if neither GUI component is included
if [ $(INCLUDE_GUI) -eq 0 ] && [ $(BUILD_GUI_HELPER) -eq 0 ]; then \
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; \
fi
@@ -475,7 +474,6 @@ init-apk: clean-apk tarball
# Remove the GUI dependencies if neither GUI component is included
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; \
fi
+5 -12
View File
@@ -1,6 +1,6 @@
# 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.
@@ -94,16 +94,9 @@ Run `gpclient --help` or `gpclient <command> --help` to view all available comma
### Windows
Download the matching EXE installer from [GitHub Releases](https://github.com/yuezk/GlobalProtect-openconnect/releases/latest):
- **x64**: Windows 10 version 2004 (build 19041) or later.
- **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.
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.
3. Open **GP Connect** from the Start menu.
### 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
```
*(Requires `community` repository enabled for WebKitGTK and AppIndicator dependencies).*
*(Requires the `community` repository for WebKitGTK dependencies).*
### FreeBSD
+1 -1
View File
@@ -19,7 +19,7 @@ Install build and runtime dependencies:
```sh
sudo pkg install git rust libiconv gettext-tools autoconf automake libtool patch \
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:
-3
View File
@@ -86,7 +86,6 @@
linuxRuntimeDependencies = with pkgs; [
glib-networking
libayatana-appindicator
xdg-utils
];
@@ -174,7 +173,6 @@
webkitgtk_4_1
glib-networking
libsecret
libayatana-appindicator
];
installNixosPolkitRule = ''
@@ -326,7 +324,6 @@
config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
services.ayatana-indicators.enable = lib.mkDefault true;
security.polkit = {
enable = true;
} // lib.optionalAttrs (options.security.polkit ? enablePkexecWrapper) {
-1
View File
@@ -43,7 +43,6 @@ in {
prebuilt = assert prebuiltPackage.version == sourcePackage.version; prebuiltPackage;
module = assert modulePackage.version == sourcePackage.version;
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.wrappers.pkexec.enable;
assert hostSystem.config.security.wrappers.pkexec.setuid;
+24 -1
View File
@@ -37,7 +37,30 @@ PY
branch="chore/promote-$tag"
git switch -c "$branch" origin/main
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}"
# Check against Cargo too: overriding the expectation above is only for artifacts.
python3 "$script_dir/validate-release-version.py"
+11
View File
@@ -144,9 +144,15 @@ class PromotionTests(unittest.TestCase):
repo, origin, artifact = root / 'repo', root / 'origin.git', root / 'artifact'
initialize(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')
git(repo, 'switch', '-c', 'release/next')
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')
release = commit(repo, '3.2 source')
git(repo, 'tag', 'v3.2.0')
@@ -158,6 +164,8 @@ class PromotionTests(unittest.TestCase):
git(repo, 'push', 'origin', 'main', 'v3.2.0')
artifact.mkdir()
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'}))
result = subprocess.run(['bash', str(ROOT / 'scripts/prepare-release-promotion.sh'),
'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.assertTrue((repo / 'infrastructure').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, 'diff', '--name-only', 'HEAD^', 'HEAD'), 'flake.nix')
self.assertEqual(git(repo, 'status', '--porcelain'), '')