Visitar URL original
[client] Ship a legacy GTK3 UI package for distros without WebKitGTK 6.0 by pappz · Pull Request #7040 · netbirdio/netbird · GitHub
Skip to content

[client] Ship a legacy GTK3 UI package for distros without WebKitGTK 6.0 - #7040

Merged
pappz merged 6 commits into
mainfrom
fix/ui-gtk3-support
Aug 6, 2026
Merged

pappz merged 6 commits into
mainfrom
fix/ui-gtk3-support

Conversation

@pappz

@pappz pappz commented Aug 3, 2026 •

Copy link
Copy Markdown
Collaborator

Describe your changes

Ship a legacy GTK3 UI package for distros without WebKitGTK 6.0

Ubuntu 22.04 depend from univeres repo

sudo add-apt-repository universe

Issue ticket number and link

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • I ran and tested this change locally — I did not rely on CI to find out whether it works
  • This PR has a single purpose (not a fix + refactor + feature in one)
  • This change is a trivial fix, OR it links an issue the NetBird team agreed on beforehand. Changes to the public API, gRPC protocols, functionality behavior, CLI / service flags, or new features always need that agreement first. See CONTRIBUTING.md.

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

https://github.com/netbirdio/docs/pull/__

Summary by CodeRabbit

New Features

  • Added release support for the legacy GTK3-based Linux application.
  • GTK3 builds are available as DEB and RPM packages for 64-bit Linux.
  • Added dedicated packaging, publishing, artifact verification, and optional RPM signing.

Compatibility

  • GTK3 builds gracefully disable unsupported XEmbed tray functionality.
  • Standard Linux builds retain existing tray integration.

Bug Fixes

  • Improved cursor positioning when no screen is detected on Linux.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The pull request adds GTK3 build stubs, cursor fallback handling, a dedicated GoReleaser configuration, and a release workflow job. The workflow packages, signs, uploads, reports, and gates signing for GTK3 artifacts.

Changes

GTK3 UI release

Layer / File(s) Summary
GTK3 build support
client/ui/xembed_host_gtk3_linux.go, client/ui/xembed_host_linux.go, client/ui/xembed_tray_linux.c, client/ui/services/cursor_linux.go
GTK3 builds use no-op XEmbed support and exclude the existing Linux XEmbed implementation. Cursor handling returns raw coordinates when no screen is available.
GTK3 packaging configuration
.goreleaser_ui_gtk3.yaml
GoReleaser builds a Linux amd64 GTK3 binary and creates DEB, RPM, and archive artifacts with GTK3 dependencies, optional RPM signing, and dedicated uploads.
GTK3 release workflow integration
.github/workflows/release.yml
The release workflow builds, verifies, uploads, reports, and signs GTK3 artifacts through the new release job.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ReleaseWorkflow
  participant GoReleaser
  participant ArtifactStore
  participant ReleaseComment
  participant Signer
  ReleaseWorkflow->>GoReleaser: Run GTK3 release configuration
  GoReleaser-->>ReleaseWorkflow: Produce GTK3 DEB and RPM artifacts
  ReleaseWorkflow->>ArtifactStore: Upload release-ui-gtk3 artifact
  ReleaseWorkflow->>ReleaseComment: Add GTK3 artifact status and URL
  ReleaseWorkflow->>Signer: Trigger signing after GTK3 release completes
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the primary change: shipping a legacy GTK3 UI package for distributions without WebKitGTK 6.0.
Description check ✅ Passed The description explains the change and follows the template, but it omits the required issue link and the reason documentation is not needed.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ui-gtk3-support

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 3, 2026 •

Copy link
Copy Markdown

Release artifacts

Built for PR head 6e67b9d in workflow run #17522.

Artifact Link
All release artifacts Download
Linux packages Download
Windows packages Download
macOS packages Download
UI artifacts Download
UI GTK3 artifacts Download
UI macOS artifacts Download

GHCR images (amd64)

This comment is updated by the Release workflow. Artifact links expire according to the workflow retention policy.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/release.yml (1)

478-482: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Consider adding a least-privilege permissions: block to release_ui_gtk3.

Static analysis flags this job for using default (broader) permissions because no permissions: block is set, unlike comment_release_artifacts which explicitly declares contents: read. Since this job checks out code, runs GoReleaser with secrets.GITHUB_TOKEN, and uploads artifacts, scope the GITHUB_TOKEN permissions explicitly (for example contents: read, adjusted if GoReleaser needs write access for this config).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml around lines 478 - 482, Add a job-level
permissions block to release_ui_gtk3, granting only the scopes required by
checkout, GoReleaser, and artifact uploads; include contents: read and add write
access only if this job’s GoReleaser configuration requires it. Keep the
permission scope limited to this job.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/release.yml:
- Around line 513-543: Update the “Cache Go modules” step to use the pinned
actions/cache/restore action instead of actions/cache, preserving its existing
paths and key configuration so it only restores caches. Also replace the
floating actions/setup-node@v4 reference in “Set up Node.js” with a pinned
commit SHA consistent with the rest of the workflow.

---

Nitpick comments:
In @.github/workflows/release.yml:
- Around line 478-482: Add a job-level permissions block to release_ui_gtk3,
granting only the scopes required by checkout, GoReleaser, and artifact uploads;
include contents: read and add write access only if this job’s GoReleaser
configuration requires it. Keep the permission scope limited to this job.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 8f4d85c3-19bd-4b37-83a9-aa9a3c382009

📥 Commits

Reviewing files that changed from the base of the PR and between 7546e77 and edc7d27.

📒 Files selected for processing (5)
  • .github/workflows/release.yml
  • .goreleaser_ui_gtk3.yaml
  • client/ui/xembed_host_gtk3_linux.go
  • client/ui/xembed_host_linux.go
  • client/ui/xembed_tray_linux.c

Comment thread .github/workflows/release.yml Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
.github/workflows/release.yml (3)

547-553: 🔒 Security & Privacy | 🔴 Critical | ⚡ Quick win

Do not expose the RPM signing key to pull-request builds.

This condition permits GPG_RPM_PRIVATE_KEY for same-repository pull requests. The job then builds pull-request-controlled code and runs GoReleaser hooks. A malicious branch can read /tmp/gpg-rpm-signing-key.asc and exfiltrate the signing key. GitHub’s fork protection does not cover this same-repository path. (docs.github.com)

Load the key only for the official stable-tag release path. Apply the same restriction to the existing GTK4 release job.

🔐 Proposed guard
-        if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
+        if: ${{ startsWith(github.ref, 'refs/tags/v') && github.repository == 'netbirdio/netbird' && steps.semver_parser.outputs.prerelease == '' }}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml around lines 547 - 553, Restrict the “Decode
GPG signing key” step to the official stable-tag release condition only,
removing the same-repository pull-request allowance so pull-request-controlled
code never receives GPG_RPM_PRIVATE_KEY. Apply the identical guard to the
corresponding GTK4 release job’s signing-key decode step, preserving key loading
for stable-tag releases.

579-581: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Replace the EOL Fedora verifier image.

Fedora 41 reached end of life on December 15, 2025, and its repositories are unavailable from the normal Fedora metadata paths. The dnf install in the RPM verification job can fail before signature verification runs. Use a maintained image or replace the fedora:41 container repo config with the Fedora archive baseurl.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml around lines 579 - 581, Update the RPM
verification container invocation in the workflow to use a maintained Fedora
image, or configure Fedora 41 repositories to use the Fedora archive baseurl
before the existing dnf install. Preserve the current rpm-sign installation and
signature-verification commands.

577-587: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Require a valid RPM signature before publishing GTK3 artifacts.

rpm -K can accept an unsigned package when package digests are valid. Use verbose output and fail the release when the package does not show signature validation with an allowed public key imported from the GTK3 repository target.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml around lines 577 - 587, Update the “Verify RPM
signatures” step to invoke rpm verification in verbose mode and require each
GTK3 RPM’s output to explicitly show a valid signature from an allowed imported
GTK3 repository key. Make the loop fail the workflow when verification reports
no signature or an untrusted/invalid key, while preserving the existing package
iteration and key import flow.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In @.github/workflows/release.yml:
- Around line 547-553: Restrict the “Decode GPG signing key” step to the
official stable-tag release condition only, removing the same-repository
pull-request allowance so pull-request-controlled code never receives
GPG_RPM_PRIVATE_KEY. Apply the identical guard to the corresponding GTK4 release
job’s signing-key decode step, preserving key loading for stable-tag releases.
- Around line 579-581: Update the RPM verification container invocation in the
workflow to use a maintained Fedora image, or configure Fedora 41 repositories
to use the Fedora archive baseurl before the existing dnf install. Preserve the
current rpm-sign installation and signature-verification commands.
- Around line 577-587: Update the “Verify RPM signatures” step to invoke rpm
verification in verbose mode and require each GTK3 RPM’s output to explicitly
show a valid signature from an allowed imported GTK3 repository key. Make the
loop fail the workflow when verification reports no signature or an
untrusted/invalid key, while preserving the existing package iteration and key
import flow.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 3854cda0-ae24-4363-af14-17674d16b75a

📥 Commits

Reviewing files that changed from the base of the PR and between edc7d27 and 04ec2c5.

📒 Files selected for processing (2)
  • .github/workflows/release.yml
  • .goreleaser_ui_gtk3.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .goreleaser_ui_gtk3.yaml

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
.github/workflows/release.yml (3)

581-584: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Replace the EOL Fedora 41 verifier image.

Fedora 41 reached end-of-life on December 15, 2025. This verifier installs rpm-sign and curl from Fedora 41 repositories in lines 582, 584, and 587, so update fedora:41 to an unsupported EOL-compatible image or a supported, digest-pinned Fedora image.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml around lines 581 - 584, Update the verifier
container image in the Docker command used by the release workflow, replacing
the EOL fedora:41 reference with a supported Fedora image or an approved
EOL-compatible digest-pinned image. Keep the existing rpm-sign and curl
installation and verification flow unchanged.

580-592: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Make the RPM verification step fail when commands or signatures fail.

The bash -c shell runs without set -e, so dnf/curl/rpm --import failures can be ignored by the >/dev/null 2>&1 redirection. A false SKIP_PUBLISH should fail when no files match /dist/*.rpm, and rpm -K can pass for digest-only checks; use rpm --checksig --define '_pkgverify_level signature' for signed release artifacts.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml around lines 580 - 592, Update the “Verify RPM
signatures” workflow step so its dockerized bash command enables fail-fast
behavior, preserves errors from dnf, curl, and rpm import despite output
redirection, and fails when no RPM files are found. Replace the rpm -K
verification with rpm --checksig using the _pkgverify_level signature definition
so artifacts require valid signatures rather than digest-only checks.

568-579: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Verify RPM artifacts before publishing GTK3 packages.

When stable tag builds set SKIP_PUBLISH=false, this GoReleaser step uploads Debian and YUM artifacts using UPLOAD_DEBIAN_SECRET and UPLOAD_YUM_SECRET. Stable RPM publishing can therefore happen before the next “Verify RPM signatures” step. Run GoReleaser without uploads until RPM signatures pass, then publish to .goreleaser_ui_gtk3.yaml.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/release.yml around lines 568 - 579, Update the GTK3
GoReleaser step using the `.goreleaser_ui_gtk3.yaml` configuration so it runs
without publishing or upload credentials before RPM signature verification.
Ensure the later post-verification release step performs the actual publish
after signatures pass, while preserving the existing stable-build behavior and
configuration.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In @.github/workflows/release.yml:
- Around line 581-584: Update the verifier container image in the Docker command
used by the release workflow, replacing the EOL fedora:41 reference with a
supported Fedora image or an approved EOL-compatible digest-pinned image. Keep
the existing rpm-sign and curl installation and verification flow unchanged.
- Around line 580-592: Update the “Verify RPM signatures” workflow step so its
dockerized bash command enables fail-fast behavior, preserves errors from dnf,
curl, and rpm import despite output redirection, and fails when no RPM files are
found. Replace the rpm -K verification with rpm --checksig using the
_pkgverify_level signature definition so artifacts require valid signatures
rather than digest-only checks.
- Around line 568-579: Update the GTK3 GoReleaser step using the
`.goreleaser_ui_gtk3.yaml` configuration so it runs without publishing or upload
credentials before RPM signature verification. Ensure the later
post-verification release step performs the actual publish after signatures
pass, while preserving the existing stable-build behavior and configuration.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5e7dd713-3647-43fa-9a62-aa2ab77c9d94

📥 Commits

Reviewing files that changed from the base of the PR and between 04ec2c5 and 5554d6d.

📒 Files selected for processing (1)
  • .github/workflows/release.yml

@riccardomanfrin riccardomanfrin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

couple of missed yaml values

Comment thread .goreleaser_ui_gtk3.yaml Resolved
Comment thread .github/workflows/release.yml Resolved
Comment thread .goreleaser_ui_gtk3.yaml Resolved
Comment thread .goreleaser_ui_gtk3.yaml Resolved
pappz added 2 commits August 6, 2026 09:39
The gtk3 deb and rpm reused goreleaser's default nfpm file name, which is
identical to the stable GTK4 packages'. The Debian pool is shared storage
keyed by file name, so whichever release job ran last overwrote the other's
artifact and both distributions indexed the same binary.

Add a file_name_template with a -gtk3 suffix to both nfpms. package_name
stays netbird-ui so legacy distros still install the same package.
The gtk3 config shares project_name with the GTK4 UI config, so both jobs
emitted netbird-ui_<version>_checksums.txt and raced on the same asset name
in the shared GitHub release. Name the gtk3 one explicitly, matching what
the darwin config already does, and disable the redundant changelog.
@sonarqubecloud

sonarqubecloud Bot commented Aug 6, 2026

Copy link
Copy Markdown

@riccardomanfrin
riccardomanfrin self-requested a review August 6, 2026 10:10

@riccardomanfrin riccardomanfrin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Name will become netbird-ui-gtk3_<ver>_linux_amd64.deb with "linux" in the way, the deb convention is <pkg>_<ver>_<arch>.deb

I'm approving but please check that we are ok with that, or in case I'll stamp it again

@pappz
pappz merged commit 98f8a24 into main Aug 6, 2026
45 checks passed
@pappz
pappz deleted the fix/ui-gtk3-support branch August 6, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants