Skip to content

chore(linux): add github action for flatpak build#68

Draft
Ajit-Mehrotra wants to merge 83 commits intounraid:mainfrom
Ajit-Mehrotra:flatpak
Draft

chore(linux): add github action for flatpak build#68
Ajit-Mehrotra wants to merge 83 commits intounraid:mainfrom
Ajit-Mehrotra:flatpak

Conversation

@Ajit-Mehrotra
Copy link
Copy Markdown

@Ajit-Mehrotra Ajit-Mehrotra commented Jun 11, 2025

Currently builds but not fully functional due to flatpak sandboxing which prevents tool from accessing storage devices' GUID, which prevents user from selecting valid mountable devices for imaging.

Summary by CodeRabbit

  • New Features
    • Added a Flatpak build workflow for Ubuntu and a Flatpak manifest, enabling automated Flatpak packaging and sandboxed distribution.
  • Improvements
    • Enhanced the macOS build workflow with explicit CMake and Qt setup, code signing, DMG packaging, and artifact upload.
    • Updated the Windows build workflow to use a fixed container image for improved consistency.
  • Chores
    • Expanded .gitignore to better exclude build artifacts and platform-specific files.

jlre249 and others added 30 commits March 19, 2024 12:45
* main window in pretty good shape - now onto the popup boxes

* hw popup + delegate, os popup + delegate, and dst popup + delegate pretty much in a good spot. based on how the icons are displayed, didn't end up needing orange pngs, because the dark ones can be changed using ColorOverlay

* about to start working on options popup

* think the settings menu seems okay now

* language/keyboard selector & progress bar theming

* removal of a few now unused rpi pngs

* replace instances of "#2B2A29" with new UnColors singleton member mediumGray

* replace instances of "#FF8C2F" with new UnColors singleton member orange

* replace instances of "#1C1B1B" with new UnColors singleton member darkGray

* replace instances of "#FFFFFF" with color name white
* removes "use saved settings" pop up and always displays options popup instead
* ico for windows

* removed rpi-imager.ico and rpi-image.png; mods to CMakeLists.txt to swap from rpi to unraid for windows RC file and copying to 128x128 app icon folder, will need a few other changes to make this work with linux still

* renaming application from rpi-imager to unraid-imager

* changes for linux

* mac icns
* changed os list url in config.h

* default select unraid device on load
* seems to be in a good place now for both ident and network config

* added in the boot img stuff from the old usb creator (this also ensures that the volume label gets changed to UNRAID)

* get rid of unnecessary if inside else clause

* works on windows, though i did have to disable secure boot

* some misc cleanup: *help button linking to website *info button opening "about" popup *putenv to enable darkmode title bar on windows *remove obe img gz files *minor text edits *changed logo background from white to darkgray

* pushing to check on linux and mac
* local commit before switching branches

* pushing to check on linux

* working on linux

* committing new files

* completely disable devices in list that have an invalid guid
misc updates:
* shrink help/info icons + add text 
* hyperlink urls in about popup 
*adjust text in about popup 
*adjust wording of formatting text 
*adjust wording of custom img select 
*limit custom img select to zip files 
*adjust wording of invalid guid text 
*add text for missing guid
* renaming unraid-imager -> unraid-usb-creator

* more renaming + new icons

* guid working on mac, troubleshooting make bootable

* rename on format for mac

* rather than trying to make the make bootable script work on all platforms (since it's only needed for legacy boot, and we don't let the user select that as an option right now), simply display a message telling the user to run the script after burn successful

* fix embedded links in info popup

* adding back in linux drive renaming

* deb file updates
Co-authored-by: Jessica Reid <jlr@Jessicas-Mini-875.hsd1.va.comcast.net>
The legacy url currently being linked to is going away
# Conflicts:
#	src/imagewriter.cpp
#	src/linux/org.raspberrypi.rpi-imager.desktop
elibosley and others added 27 commits October 8, 2024 13:36
part 3 up to line 480
* is it this easy?

* let's try this again

* once more with feeling

* let's see if these replace the "2" qml modules from qt5

* try updating control file for debuild

* needed for linguist tools?

* see if this fixes Qt6::lprodump cmake error

* revert previous changes

* trying with install-qt-action

* syntax error

* try specifying something other than latest for os

* once more

* upload deb artifact

* see if we can hack something together here

* pick a runner that it can actually find

* keep running up that hill

* just gonna keep trying some stuff

* maybe?

* just need to re-trigger the github action

* remove changes to mac yml

* remove trailing whitespace from yml
- cmake 3.31 (<4.0)
- Qt 5 (not Qt6 or latest)
- add dmg wrapping for .app for drag and drop installation

**Important**: codesigning is still pending automation. Currently dev must:

1. remove quarantine from .dmg:
`sudo xattr -d com.apple.quarantine ~/Downloads/unraid-usb-creator.dmg`

2. double click the .dmg (drop .app into Applications folder)

3. then finally also remove quarantine from .app in Applications folder:

`xattr -d com.apple.quarantine /Applications/unraid-usb-creator.app`
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 11, 2025

📝 Walkthrough

Error: Could not generate a valid Mermaid diagram after multiple attempts.

✨ Finishing Touches
🧪 Generate Unit Tests
  • Create PR with Unit Tests
  • Commit Unit Tests in branch flatpak
  • Post Copyable Unit Tests in Comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

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

14-17: Pin container image to a specific version for reproducibility.
Using a floating latest tag can introduce breaking changes when the image is updated. Consider pinning to a specific version or digest (e.g., ghcr.io/unraid/usb-creator-next/usb-creator-mxe:vX.Y.Z) to ensure consistent builds.

.gitignore (2)

1-1: Scope ignore patterns to avoid unintentional matches.
The repo and build-dir entries are too generic and may ignore unrelated folders named repo or build-dir. Consider scoping them with trailing slashes (repo/, build-dir/) or prefixing with the flatpak/ path (flatpak/repo/).

Also applies to: 19-22


13-13: Remove trailing whitespace.
The Releases entry has trailing spaces which can prevent .gitignore from matching correctly.

flatpak/com.limetech.unraid-usb-creator.yml (2)

7-8: Fix typo in comment.
Change #Flapak is sandboxed. to # Flatpak is sandboxed. for clarity and correctness.


19-19: Remove trailing spaces and add newline at EOF.
Trailing whitespace on lines 19 and 27 triggers lint warnings. Also ensure the manifest ends with a newline character.

Also applies to: 27-27

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 19-19: trailing spaces

(trailing-spaces)

.github/workflows/build-ubuntu-flatpak.yml (3)

16-20: Pin Flatpak Builder package versions for reproducibility.
Installing unpinned packages (flatpak, flatpak-builder) can lead to inconsistent builds over time. Consider specifying explicit versions or caching runtimes to stabilize the environment.


39-44: Avoid skipping GPG verification for the local Flatpak repo.
Using --no-gpg-verify undermines package integrity. If possible, import the GPG key for the local repo and remove the flag to enforce signature checks.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 41-41: trailing spaces

(trailing-spaces)


[error] 42-42: trailing spaces

(trailing-spaces)


63-63: Remove trailing whitespace and add newline at EOF.
Clean up trailing spaces and ensure the workflow file ends with a newline to satisfy YAML lint rules.

🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 63-63: no new line character at the end of file

(new-line-at-end-of-file)


[error] 63-63: trailing spaces

(trailing-spaces)

.github/workflows/build-macos.yml (1)

22-22: Upgrade checkout action to v4.
actions/checkout@v3 works, but upgrading to actions/checkout@v4 provides performance enhancements and security fixes.

🧰 Tools
🪛 actionlint (1.7.7)

22-22: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9e52e7c and 98f49c1.

📒 Files selected for processing (5)
  • .github/workflows/build-macos.yml (2 hunks)
  • .github/workflows/build-ubuntu-flatpak.yml (1 hunks)
  • .github/workflows/build-windows.yml (1 hunks)
  • .gitignore (1 hunks)
  • flatpak/com.limetech.unraid-usb-creator.yml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
flatpak/com.limetech.unraid-usb-creator.yml

[error] 19-19: trailing spaces

(trailing-spaces)


[error] 27-27: no new line character at the end of file

(new-line-at-end-of-file)


[error] 27-27: trailing spaces

(trailing-spaces)

.github/workflows/build-ubuntu-flatpak.yml

[error] 36-36: trailing spaces

(trailing-spaces)


[error] 41-41: trailing spaces

(trailing-spaces)


[error] 42-42: trailing spaces

(trailing-spaces)


[error] 63-63: no new line character at the end of file

(new-line-at-end-of-file)


[error] 63-63: trailing spaces

(trailing-spaces)

🪛 actionlint (1.7.7)
.github/workflows/build-ubuntu-flatpak.yml

14-14: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

.github/workflows/build-macos.yml

22-22: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🔇 Additional comments (1)
.github/workflows/build-windows.yml (1)

16-16: Verify the GHCR container image is publicly accessible.
Ensure that ghcr.io/unraid/usb-creator-next/usb-creator-mxe:latest exists and includes the MXE toolchain required for cross-compiling Windows binaries.

Comment on lines +9 to +15
finish-args:
- --share=ipc
- --socket=x11
- --socket=wayland
- --share=network
- --device=dri

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Grant filesystem access for device GUID enumeration.
Flatpak's sandbox blocks /dev by default, preventing the app from discovering storage device GUIDs. Add --filesystem=/dev (or --filesystem=host) to finish-args to allow device enumeration.

🤖 Prompt for AI Agents
In flatpak/com.limetech.unraid-usb-creator.yml around lines 9 to 15, the
finish-args section lacks filesystem access to /dev, which blocks device GUID
enumeration. Add the line --filesystem=/dev to the finish-args list to grant the
app permission to access device files needed for GUID discovery.

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.

6 participants