diff --git a/.github/workflows/nix.yaml b/.github/workflows/nix.yaml index 388dffd..66c80d9 100644 --- a/.github/workflows/nix.yaml +++ b/.github/workflows/nix.yaml @@ -112,7 +112,6 @@ jobs: in assert builtins.elem package hostSystem.config.environment.systemPackages; - assert hostSystem.config.services.ayatana-indicators.enable; package ' diff --git a/Makefile b/Makefile index 551bbeb..3c6b085 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/README.md b/README.md index b4f49d4..54b0229 100644 --- a/README.md +++ b/README.md @@ -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 --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 diff --git a/docs/bsd-source-build.md b/docs/bsd-source-build.md index b49cd49..2c9d264 100644 --- a/docs/bsd-source-build.md +++ b/docs/bsd-source-build.md @@ -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: diff --git a/flake.nix b/flake.nix index 27010a4..cbea844 100644 --- a/flake.nix +++ b/flake.nix @@ -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) { diff --git a/nix/ci.nix b/nix/ci.nix index e7d48ca..ab14814 100644 --- a/nix/ci.nix +++ b/nix/ci.nix @@ -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; diff --git a/scripts/prepare-release-promotion.sh b/scripts/prepare-release-promotion.sh index 7766284..271c3de 100755 --- a/scripts/prepare-release-promotion.sh +++ b/scripts/prepare-release-promotion.sh @@ -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" diff --git a/scripts/tests/test_release_flow.py b/scripts/tests/test_release_flow.py index 6eeeff3..e1340a3 100644 --- a/scripts/tests/test_release_flow.py +++ b/scripts/tests/test_release_flow.py @@ -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'), '')