feat(linux): native tray app, Rust core and AppImage releases - #112
Closed
productdevbook wants to merge 1 commit into
Closed
feat(linux): native tray app, Rust core and AppImage releases#112productdevbook wants to merge 1 commit into
productdevbook wants to merge 1 commit into
Conversation
Adds Linux support: a GTK 3 system tray application, the Rust scanning core it is built around, CI, and an AppImage published on each release. Originally contributed by @raine1120 in #111, which targeted the stale feat/rust-cross-platform-backend branch (57 commits behind main). This rebuilds that work on top of current main and drops everything that was not Linux-related. Scope: - portkiller-core carries only the Linux backends. The macOS and Windows implementations are omitted along with the Windows crate dependency — those platforms have native Swift and .NET apps that do not use this crate. portkiller-ffi is not included. - platforms/linux/ is self-contained Python and does not depend on the Rust core today. CI (.github/workflows/ci-linux.yml): - cargo build/test/clippy/fmt on Ubuntu. The Linux code is cfg-gated, so it was never compiled by the existing macOS and Windows jobs. - Python parser tests on 3.9 and 3.12, plus shellcheck on install.sh. - A GTK import smoke test, since the parser tests never load the UI modules and would not catch a broken import there. Release (build-linux job): - Builds a self-contained AppImage and attaches it to the release. - The GTK stack is taken from the host rather than bundled: PyGObject binds tightly to the system GLib/GTK and bundling it breaks on distros whose versions differ from the build image. The launcher checks for the bindings and prints per-distro install hints if they are missing. - Verified end to end: the job extracts the built AppImage and asserts the entry point, sources and AppRun are present. Also fixes install.sh, which looked for the icon at a root Resources/ directory that only existed on the old branch. Co-Authored-By: Raine Sanchez <raine1120@users.noreply.github.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
productdevbook
pushed a commit
that referenced
this pull request
Jul 24, 2026
Adds Linux support: a GTK 3 system tray application, the Rust scanning core, CI, and an AppImage published on each release. Scope: - portkiller-core carries only the Linux backends. The macOS and Windows implementations are omitted along with the Windows crate dependency — those platforms have native Swift and .NET apps that do not use this crate. portkiller-ffi is not included. - platforms/linux/ is self-contained Python and does not depend on the Rust core today. CI (.github/workflows/ci-linux.yml): - cargo build/test/clippy/fmt on Ubuntu. The Linux code is cfg-gated, so it was never compiled by the existing macOS and Windows jobs. - Python parser tests on 3.9 and 3.12, plus shellcheck on install.sh. - A GTK import smoke test, since the parser tests never load the UI modules and would not catch a broken import there. Release (build-linux job): - Builds a self-contained AppImage and attaches it to the release. - The GTK stack is taken from the host rather than bundled: PyGObject binds tightly to the system GLib/GTK and bundling it breaks on distros whose versions differ from the build image. The launcher checks for the bindings and prints per-distro install hints if they are missing. - The job extracts the built AppImage and asserts the entry point, sources and AppRun are present. Also fixes install.sh, which looked for the icon at a root Resources/ directory that does not exist in this tree.
Owner
Author
|
Merged into |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds Linux support: a GTK 3 system tray app, the Rust scanning core, CI, and an AppImage attached to each release.
Supersedes #111. That PR targeted
feat/rust-cross-platform-backend, which is 57 commits behindmain, so nothing in it reached users. This rebuilds the work on currentmainand keeps only the Linux parts.Credit to @raine1120 for the original implementation.
Scope
Deliberately not included:
portkiller-core's macOS and Windows backends, and thewindowscrate dependency. Those platforms have native Swift and .NET apps that don't use this crate, so shipping their Rust implementations would be dead code.scanner/mod.rsandprocess/mod.rsare now Linux-only, and the cratecompile_error!s elsewhere.portkiller-ffi.platforms/linux/is self-contained Python and doesn't depend on the Rust core today. Worth deciding later whether it should bind to it through FFI rather than keeping two scanner implementations.CI —
.github/workflows/ci-linux.ymlcargo build/test/clippy -D warnings/fmt --checkon Ubuntu, withprocps iproute2 lsofinstalled — without them the integration tests fail instead of exercising the real paths. This code iscfg-gated, so the existing macOS/Windows jobs never compiled it.shellcheckoninstall.sh.xvfb. The parser tests never load the UI modules, so a broken import there would otherwise slip through.Release —
build-linuxjobBuilds an AppImage and attaches it to the release.
The GTK stack is taken from the host rather than bundled. PyGObject binds tightly to the system GLib/GTK, and bundling those breaks on distros whose versions differ from the build image. The launcher checks for the bindings up front and prints per-distro install hints if they're missing. The job then extracts the AppImage it just built and asserts the entry point,
src/andAppRunare all present.Verification
Everything below was run on Linux in Docker, not just on macOS:
cargo build+cargo test— 20 tests + 2 doc-tests pass (withprocps/iproute2/lsofpresent)cargo clippy -- -D warningsandcargo fmt --check— cleanshellcheck install.sh— cleanTwo things the verification caught and fixed: a
manual_stripclippy failure, andinstall.shlooking for the icon at a rootResources/directory that only existed on the old branch.Included from the #111 review
The review fixes are all carried over — most notably
pkill -f "kubectl.*port-forward"(which matched unrelated processes) replaced with signalling only scanned PIDs,window.pywired up instead of sitting dead, scanning moved off the GTK main thread, the SIGTERM→SIGKILL sequence honoured, and the UTF-8 mangling indecode_escaped.