From 8329306ed1a60a9b77212ae8817d92f22e5b7069 Mon Sep 17 00:00:00 2001 From: Dmitry Beskov <43372966+besdar@users.noreply.github.com> Date: Sat, 16 May 2026 15:22:07 +0300 Subject: [PATCH 1/2] Add flatpak submodule and change CI --- .github/workflows/ci.yml | 2 +- .github/workflows/flutter-build.yml | 28 +++++++-- .github/workflows/flutter-ci.yml | 2 +- .gitmodules | 3 + flatpak/com.rustdesk.RustDesk.metainfo.xml | 59 ------------------- flatpak/rustdesk.json | 66 ---------------------- res/bump.sh | 2 +- 7 files changed, 28 insertions(+), 134 deletions(-) delete mode 100644 flatpak/com.rustdesk.RustDesk.metainfo.xml delete mode 100644 flatpak/rustdesk.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a7d21d7e..d9a2952e8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ on: - "README.md" - "res/**" - "appimage/**" - - "flatpak/**" + - "com.rustdesk.RustDesk/**" jobs: # ensure_cargo_fmt: diff --git a/.github/workflows/flutter-build.yml b/.github/workflows/flutter-build.yml index 263bd67dc..03eb0a5f8 100644 --- a/.github/workflows/flutter-build.yml +++ b/.github/workflows/flutter-build.yml @@ -1951,7 +1951,7 @@ jobs: - name: Rename Binary run: | - mv rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}${{ matrix.job.suffix }}.deb flatpak/rustdesk.deb + mv rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}${{ matrix.job.suffix }}.deb com.rustdesk.RustDesk/rustdesk.deb - uses: rustdesk-org/run-on-arch-action@amd64-support name: Build rustdesk flatpak package for ${{ matrix.job.arch }} @@ -1967,17 +1967,33 @@ jobs: shell: /bin/bash install: | apt-get update -y - apt-get install -y git flatpak flatpak-builder + apt-get install -y git flatpak flatpak-builder jq run: | # disable git safe.directory git config --global --add safe.directory "*" pushd /workspace + git submodule update --init --recursive com.rustdesk.RustDesk # flatpak deps flatpak --user remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo # package - pushd flatpak - git clone https://github.com/flathub/shared-modules.git --depth=1 - flatpak-builder --user --install-deps-from=flathub -y --force-clean --repo=repo ./build ./rustdesk.json + pushd com.rustdesk.RustDesk + jq ' + .["finish-args"] = ( + (.["finish-args"] // []) + + (["--socket=wayland", "--socket=x11"] - (.["finish-args"] // [])) + ) | + (.modules[] | select(type == "object" and .name == "rustdesk").sources) = [ + { + "type": "file", + "path": "rustdesk.deb" + }, + { + "type": "file", + "path": "com.rustdesk.RustDesk.metainfo.xml" + } + ] + ' com.rustdesk.RustDesk.json > com.rustdesk.RustDesk.local.json + flatpak-builder --user --install-deps-from=flathub -y --force-clean --repo=repo ./build ./com.rustdesk.RustDesk.local.json flatpak build-bundle ./repo rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}${{ matrix.job.suffix }}.flatpak com.rustdesk.RustDesk - name: Publish flatpak package @@ -1986,7 +2002,7 @@ jobs: prerelease: true tag_name: ${{ env.TAG_NAME }} files: | - flatpak/rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}${{ matrix.job.suffix }}.flatpak + com.rustdesk.RustDesk/rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}${{ matrix.job.suffix }}.flatpak build-rustdesk-web: if: False diff --git a/.github/workflows/flutter-ci.yml b/.github/workflows/flutter-ci.yml index a64dd1197..8cdbf0db7 100644 --- a/.github/workflows/flutter-ci.yml +++ b/.github/workflows/flutter-ci.yml @@ -15,7 +15,7 @@ on: - "README.md" - "res/**" - "appimage/**" - - "flatpak/**" + - "com.rustdesk.RustDesk/**" jobs: run-ci: diff --git a/.gitmodules b/.gitmodules index d80e69aa8..35180beb3 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "libs/hbb_common"] path = libs/hbb_common url = https://github.com/rustdesk/hbb_common +[submodule "com.rustdesk.RustDesk"] + path = com.rustdesk.RustDesk + url = https://github.com/flathub/com.rustdesk.RustDesk.git diff --git a/flatpak/com.rustdesk.RustDesk.metainfo.xml b/flatpak/com.rustdesk.RustDesk.metainfo.xml deleted file mode 100644 index 90bdafcb5..000000000 --- a/flatpak/com.rustdesk.RustDesk.metainfo.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - com.rustdesk.RustDesk - - RustDesk - - com.rustdesk.RustDesk.desktop - CC0-1.0 - AGPL-3.0-only - RustDesk - Secure remote desktop access - -

- RustDesk is a full-featured open source remote control alternative for self-hosting and security with minimal configuration. -

- -

- For self-hosting setup instructions please go to our home page. -

-
- - Utility - - - - Remote desktop session - https://user-images.githubusercontent.com/71636191/171661982-430285f0-2e12-4b1d-9957-4a58e375304d.png - - - - #d9eaf8 - #0160ee - - https://rustdesk.com - https://github.com/rustdesk/rustdesk/issues - https://github.com/rustdesk/rustdesk/wiki/FAQ - https://rustdesk.com/docs - https://ko-fi.com/rustdesk - https://github.com/rustdesk/rustdesk - https://github.com/rustdesk/rustdesk/tree/master/src/lang - https://github.com/rustdesk/rustdesk/blob/master/docs/CONTRIBUTING.md - https://rustdesk.com/docs/en/technical-support - - 600 - always - - - keyboard - pointing - - -
diff --git a/flatpak/rustdesk.json b/flatpak/rustdesk.json deleted file mode 100644 index 2418ac2a6..000000000 --- a/flatpak/rustdesk.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "id": "com.rustdesk.RustDesk", - "runtime": "org.freedesktop.Platform", - "runtime-version": "24.08", - "sdk": "org.freedesktop.Sdk", - "command": "rustdesk", - "cleanup": ["/include", "/lib/pkgconfig", "/share/gtk-doc"], - "rename-desktop-file": "rustdesk.desktop", - "rename-icon": "rustdesk", - "modules": [ - "shared-modules/libappindicator/libappindicator-gtk3-12.10.json", - { - "name": "xdotool", - "no-autogen": true, - "make-install-args": ["PREFIX=${FLATPAK_DEST}"], - "sources": [ - { - "type": "archive", - "url": "https://github.com/jordansissel/xdotool/releases/download/v3.20211022.1/xdotool-3.20211022.1.tar.gz", - "sha256": "96f0facfde6d78eacad35b91b0f46fecd0b35e474c03e00e30da3fdd345f9ada" - } - ] - }, - { - "name": "pam", - "buildsystem": "autotools", - "config-opts": ["--disable-selinux"], - "sources": [ - { - "type": "archive", - "url": "https://github.com/linux-pam/linux-pam/releases/download/v1.3.1/Linux-PAM-1.3.1.tar.xz", - "sha256": "eff47a4ecd833fbf18de9686632a70ee8d0794b79aecb217ebd0ce11db4cd0db" - } - ] - }, - { - "name": "rustdesk", - "buildsystem": "simple", - "build-commands": [ - "bsdtar -Oxf rustdesk.deb data.tar.xz | bsdtar -xf -", - "cp -r usr/* /app/", - "mkdir -p /app/bin && ln -s /app/share/rustdesk/rustdesk /app/bin/rustdesk" - ], - "sources": [ - { - "type": "file", - "path": "rustdesk.deb" - }, - { - "type": "file", - "path": "com.rustdesk.RustDesk.metainfo.xml" - } - ] - } - ], - "finish-args": [ - "--share=ipc", - "--socket=wayland", - "--socket=x11", - "--share=network", - "--filesystem=home", - "--device=dri", - "--socket=pulseaudio", - "--talk-name=org.freedesktop.Flatpak" - ] -} \ No newline at end of file diff --git a/res/bump.sh b/res/bump.sh index 0fb62a0ac..f5574127a 100644 --- a/res/bump.sh +++ b/res/bump.sh @@ -1,3 +1,3 @@ #! /usr/bin/env bash -sed -i "s/$1/$2/g" res/*spec res/PKGBUILD flutter/pubspec.yaml Cargo.toml .github/workflows/*yml flatpak/*json appimage/*yml libs/portable/Cargo.toml +sed -i "s/$1/$2/g" res/*spec res/PKGBUILD flutter/pubspec.yaml Cargo.toml .github/workflows/*yml appimage/*yml libs/portable/Cargo.toml cargo run # to bump version in cargo lock From ff42ce17922405e3d482b036a628d308937ab5cc Mon Sep 17 00:00:00 2001 From: Dmitry Beskov <43372966+besdar@users.noreply.github.com> Date: Sat, 16 May 2026 15:46:10 +0300 Subject: [PATCH 2/2] Add checks for rustdesk module in Flatpak build configuration --- .github/workflows/flutter-build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/flutter-build.yml b/.github/workflows/flutter-build.yml index 03eb0a5f8..3a3e3a36e 100644 --- a/.github/workflows/flutter-build.yml +++ b/.github/workflows/flutter-build.yml @@ -1977,6 +1977,7 @@ jobs: flatpak --user remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo # package pushd com.rustdesk.RustDesk + jq -e 'any(.modules[]?; type == "object" and .name == "rustdesk")' com.rustdesk.RustDesk.json > /dev/null jq ' .["finish-args"] = ( (.["finish-args"] // []) + @@ -1993,6 +1994,7 @@ jobs: } ] ' com.rustdesk.RustDesk.json > com.rustdesk.RustDesk.local.json + jq -e 'any(.modules[]?; type == "object" and .name == "rustdesk" and any(.sources[]?; .type == "file" and .path == "rustdesk.deb"))' com.rustdesk.RustDesk.local.json > /dev/null flatpak-builder --user --install-deps-from=flathub -y --force-clean --repo=repo ./build ./com.rustdesk.RustDesk.local.json flatpak build-bundle ./repo rustdesk-${{ env.VERSION }}-${{ matrix.job.arch }}${{ matrix.job.suffix }}.flatpak com.rustdesk.RustDesk