Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add Flatpak submodule and update CI configuration#15059

Open
besdar wants to merge 5 commits into
rustdesk:masterrustdesk/rustdesk:masterfrom
besdar:flatpak-submodulebesdar/rustdesk:flatpak-submoduleCopy head branch name to clipboard
Open

Add Flatpak submodule and update CI configuration#15059
besdar wants to merge 5 commits into
rustdesk:masterrustdesk/rustdesk:masterfrom
besdar:flatpak-submodulebesdar/rustdesk:flatpak-submoduleCopy head branch name to clipboard

Conversation

@besdar

@besdar besdar commented May 16, 2026

Copy link
Copy Markdown
Contributor

Hello @rustdesk!

This PR removes the duplicated in-tree Flatpak manifest and switches RustDesk release builds to use the Flathub packaging repository through the com.rustdesk.RustDesk submodule.

The old flatpak/rustdesk.json had drifted from Flathub. For example, PR #13530 fixed one instance of that drift by syncing runtime and PAM changes, but keeping two manifests means the same class of mismatch can happen again. With this change, the Flathub manifest becomes the source of truth for Flatpak packaging, and RustDesk CI only applies the small local changes needed to build release artifacts from the .deb produced by the pipeline.

This resolves RustDesk/Flathub manifest misalignments once and forever: future Flathub packaging updates are consumed through the submodule instead of being manually mirrored into a second manifest.

What Changed

  • Added com.rustdesk.RustDesk as the Flatpak packaging submodule.
  • Removed the old flatpak/ directory and its duplicated manifest/metainfo files.
  • Updated the Flatpak release job to build from com.rustdesk.RustDesk/com.rustdesk.RustDesk.json.
  • Rewrites only the CI-local manifest copy before building so it uses the freshly built rustdesk.deb artifact instead of downloading release .deb files.
  • Adds the currently required local Flatpak socket permissions before building the release bundle:
    • --socket=wayland
    • --socket=x11
  • Updates workflow path filters and version bump helpers so they no longer reference the removed flatpak/ directory.

Summary by CodeRabbit

  • Chores
    • Updated CI workflow path filtering to focus on the new Flatpak packaging directory instead of the old one.
    • Adjusted Flatpak build inputs/outputs to use the new packaging layout and publish artifacts from the updated path.
    • Added a new Flatpak packaging submodule and removed the legacy Flatpak manifest and appstream metadata files.
    • Updated version-bumping to skip flatpak/*json, and regenerated Flatpak metadata to include both Wayland and X11 socket support.

@coderabbitai

coderabbitai Bot commented May 16, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR migrates Flatpak packaging to the com.rustdesk.RustDesk submodule, updates CI trigger filters, rewrites the Flatpak build job to generate a local manifest and publish from the new path, and removes flatpak/*json from version bump substitution targets.

Changes

Flatpak Submodule Migration

Layer / File(s) Summary
Add Flathub submodule
.gitmodules
Registers com.rustdesk.RustDesk as a Git submodule with its repository URL.
Update CI workflow path-ignore patterns
.github/workflows/ci.yml, .github/workflows/flutter-ci.yml
Both workflow triggers now ignore com.rustdesk.RustDesk/** instead of flatpak/**.
Rework Flatpak build pipeline
.github/workflows/flutter-build.yml
Moves the .deb input and Flatpak artifact under com.rustdesk.RustDesk/, generates com.rustdesk.RustDesk.local.json with jq, updates sockets and module sources, and runs flatpak-builder from the generated manifest.
Exclude Flatpak JSON from version bump
res/bump.sh
Removes flatpak/*json from the version substitution glob list.

Estimated code review effort: 2 (Simple) | ~12 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding the Flatpak submodule and adjusting CI for it.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 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/flutter-build.yml:
- Around line 1980-1996: Add fail-fast validation around the jq manifest
transformation: before running the jq filter against com.rustdesk.RustDesk.json,
verify that a module with .name == "rustdesk" exists (fail and exit non-zero if
not); after writing com.rustdesk.RustDesk.local.json, validate that the rustdesk
module's .sources contains the two file entries ("rustdesk.deb" and
"com.rustdesk.RustDesk.metainfo.xml") and fail-fast if the expected sources are
not present. Tie these checks to the same shell step that runs the jq filter and
flatpak-builder so the script aborts immediately when the module is missing or
the post-transformation verification fails. Ensure error messages mention the
module name "rustdesk" and the manifest filenames to aid debugging.
🪄 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: defaults

Review profile: CHILL

Plan: Pro

Run ID: 4d2170d6-ef0b-47ca-8134-c1fd99445a78

📥 Commits

Reviewing files that changed from the base of the PR and between 472c4fc and 8329306.

📒 Files selected for processing (7)
  • .github/workflows/ci.yml
  • .github/workflows/flutter-build.yml
  • .github/workflows/flutter-ci.yml
  • .gitmodules
  • flatpak/com.rustdesk.RustDesk.metainfo.xml
  • flatpak/rustdesk.json
  • res/bump.sh
💤 Files with no reviewable changes (2)
  • flatpak/rustdesk.json
  • flatpak/com.rustdesk.RustDesk.metainfo.xml

Comment thread .github/workflows/flutter-build.yml

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 (1)
.github/workflows/flutter-build.yml (1)

1203-1211: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Replace matrix.job.arch in build-rustdesk-android-universal
This job has no strategy.matrix, so the upload-artifact name will fail to resolve. Use a fixed value here, e.g. universal, instead of ${{ matrix.job.arch }}.

🤖 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/flutter-build.yml around lines 1203 - 1211, The
build-rustdesk-android-universal job does not define a strategy.matrix, so any
upload-artifact name that references matrix.job.arch will not resolve. Update
the artifact naming in build-rustdesk-android-universal to use a fixed
identifier such as universal, and keep the change scoped to the upload-artifact
step in this job.

Source: Linters/SAST tools

🧹 Nitpick comments (2)
.github/workflows/flutter-build.yml (2)

216-219: 🩺 Stability & Availability | 🔵 Trivial | ⚖️ Poor tradeoff

Swatinem/rust-cache on the new arm64 build job enables caching by default (cache-poisoning risk).

zizmor flags this as a potential cache-poisoning vector since untrusted PR runs could seed cache entries consumed by trusted runs. This is consistent with the same pattern already present elsewhere in the file, so it's more of a repo-wide posture question than something introduced solely by this PR.

🤖 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/flutter-build.yml around lines 216 - 219, The rust-cache
step in the workflow is enabled by default on the new arm64 job, which can allow
untrusted PR runs to seed caches used by trusted runs. Update the
Swatinem/rust-cache configuration in the workflow to disable caching for
untrusted contexts or otherwise constrain it so only trusted runs can write/read
the cache, matching the repo’s safer caching posture used elsewhere.

Source: Linters/SAST tools


109-119: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win

Newly-added actions/checkout steps (arm64 Windows job, etc.) don't set persist-credentials: false.

zizmor flags credential persistence through GitHub Actions artifacts on these actions/checkout@... steps with submodules: recursive. Persisting the token in the local git config can leak it if any later step uploads or inspects .git/config in artifacts. Since several of these checkout steps are newly added/modified as part of this diff, consider adding the flag.

♻️ Proposed fix
       - name: Checkout source code
         uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
         with:
           submodules: recursive
+          persist-credentials: false

Also applies to: 405-408, 681-684, 995-997

🤖 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/flutter-build.yml around lines 109 - 119, The newly added
checkout steps using actions/checkout with submodules: recursive should not
persist GitHub credentials in the local git config. Update each affected
checkout invocation in the workflow, including the checkout step referenced here
and the other matching checkout steps noted in the review, to explicitly disable
credential persistence by setting persist-credentials to false. This change
should be applied on the actions/checkout blocks themselves so the token is not
stored for later steps.

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.

Outside diff comments:
In @.github/workflows/flutter-build.yml:
- Around line 1203-1211: The build-rustdesk-android-universal job does not
define a strategy.matrix, so any upload-artifact name that references
matrix.job.arch will not resolve. Update the artifact naming in
build-rustdesk-android-universal to use a fixed identifier such as universal,
and keep the change scoped to the upload-artifact step in this job.

---

Nitpick comments:
In @.github/workflows/flutter-build.yml:
- Around line 216-219: The rust-cache step in the workflow is enabled by default
on the new arm64 job, which can allow untrusted PR runs to seed caches used by
trusted runs. Update the Swatinem/rust-cache configuration in the workflow to
disable caching for untrusted contexts or otherwise constrain it so only trusted
runs can write/read the cache, matching the repo’s safer caching posture used
elsewhere.
- Around line 109-119: The newly added checkout steps using actions/checkout
with submodules: recursive should not persist GitHub credentials in the local
git config. Update each affected checkout invocation in the workflow, including
the checkout step referenced here and the other matching checkout steps noted in
the review, to explicitly disable credential persistence by setting
persist-credentials to false. This change should be applied on the
actions/checkout blocks themselves so the token is not stored for later steps.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9b8d9167-f4f4-4950-bc47-74985510273b

📥 Commits

Reviewing files that changed from the base of the PR and between ff42ce1 and ef76afd.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • .github/workflows/flutter-build.yml
  • res/bump.sh
🚧 Files skipped from review as they are similar to previous changes (1)
  • res/bump.sh

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.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.