Repository navigation
Fix linux packaging - #6
Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds first-class Linux AppImage support: new AppImage builder script and Taskfile task, CI and release steps to build/verify/upload AppImages, installer changes to prefer AppImage with dependency checks, icon generation updates, and README updates documenting AppImage and tar.gz installs. Changes
Sequence Diagram(s)sequenceDiagram
participant CI as CI / Release workflow
participant Script as scripts/create-appimage.sh
participant Remote as Remote HTTP (linuxdeploy, plugins)
participant LD as linuxdeploy (GTK plugin)
participant FS as Filesystem / Artifacts
CI->>Script: run ./scripts/create-appimage.sh <VERSION>
Script->>Remote: download linuxdeploy & gtk-plugin
Remote-->>Script: binaries
Script->>Script: (optional) verify checksums, validate env & binary
Script->>FS: prepare AppDir, desktop file, icon (use ImageMagick if needed)
Script->>LD: invoke linuxdeploy with GTK plugin
LD-->>Script: generated .AppImage
Script->>FS: move/rename AppImage to output dir
CI->>FS: collect AppImage artifact and generate checksums
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
Greptile SummaryThis PR improves Linux packaging by introducing AppImage as the recommended distribution format, alongside the existing tar.gz archives. The changes include:
The AppImage approach significantly improves the Linux user experience by eliminating dependency management issues, while maintaining tar.gz as an alternative for users who prefer traditional packaging. Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant CI as CI Workflow
participant Release as Release Workflow
participant Script as create-appimage.sh
participant LinuxDeploy as linuxdeploy tool
participant Installer as install.sh
Note over User,Installer: CI Build Process
CI->>CI: Install imagemagick
CI->>CI: Build Linux binary
CI->>Script: ./create-appimage.sh ci-test
Script->>LinuxDeploy: Download & verify linuxdeploy
Script->>LinuxDeploy: Download & verify GTK plugin
Script->>Script: Create desktop file & icon
Script->>LinuxDeploy: Build AppImage with GTK deps
LinuxDeploy-->>Script: AppImage created
Script-->>CI: Verification complete
Note over User,Installer: Release Process
Release->>Release: Install imagemagick
Release->>Release: Build Linux binary (wails build)
Release->>Script: ./create-appimage.sh $VERSION
Script->>LinuxDeploy: Download & verify tools
Script->>LinuxDeploy: Build AppImage
LinuxDeploy-->>Script: AppImage ready
Script-->>Release: pubsub-gui_linux_amd64_$VERSION.AppImage
Release->>Release: Also create tar.gz (fallback)
Release->>Release: Upload both to GitHub Release
Note over User,Installer: User Installation
User->>Installer: curl install.sh | bash
Installer->>Installer: Detect platform (Linux)
Installer->>Installer: Prefer AppImage over tar.gz
Installer->>Installer: Download AppImage from GitHub
Installer->>Installer: Verify checksum
Installer->>Installer: Install to ~/.local/bin
Installer->>Installer: Create symlink for CLI access
Installer-->>User: Installation complete (no deps needed)
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@README.md`:
- Around line 52-60: Update the README text that currently claims the AppImage
has "No dependencies required" and "no additional installation required" to
explicitly state the runtime dependency on FUSE/libfuse2 (e.g., package names
like libfuse2 on Debian/Ubuntu and libfuse2t64 on Ubuntu 24.04). Locate the
bullet "AppImage (Recommended)" and the "Linux - AppImage (Recommended)" section
and replace the absolute "no dependencies" wording with a note that the AppImage
bundles application libraries but requires FUSE (libfuse.so.2) at runtime, and
optionally add a short install hint for common distros.
In `@scripts/create-appimage.sh`:
- Around line 232-238: The AppImage detection assigns GENERATED_APPIMAGE using a
compound command where head -1 only applies to the fallback, causing multiple
matches from the first ls to be returned; change the command so you always pick
a single file (e.g., pipe the first ls to head -1 for the Pub_Sub_GUI*.AppImage
branch or use a glob and select the first element), update the
GENERATED_APPIMAGE assignment accordingly (reference GENERATED_APPIMAGE and the
subsequent log_error/exit branch) so only one AppImage path is stored and
checked.
🧹 Nitpick comments (2)
scripts/create-appimage.sh (1)
59-59: Use single quotes for trap to avoid early expansion.The trap command uses double quotes, which causes
$WORK_DIRto expand immediately when the trap is set. While this works becauseWORK_DIRis already defined, using single quotes is more robust and avoids potential issues if the script structure changes.♻️ Proposed fix
-trap "rm -rf '$WORK_DIR'" EXIT +trap 'rm -rf "$WORK_DIR"' EXITscripts/install.sh (1)
500-501: Consistency: Use single quotes for trap.Same issue as in
create-appimage.sh— prefer single quotes for the trap command to avoid early variable expansion.♻️ Proposed fix
- trap "rm -rf '$tmp_dir'" EXIT + trap 'rm -rf "$tmp_dir"' EXIT
| - **AppImage (Recommended)**: `pubsub-gui_linux_amd64_*.AppImage` - No dependencies required! | ||
| - **tar.gz**: `pubsub-gui_linux_amd64_*.tar.gz` - Requires runtime libraries (see below) | ||
|
|
||
| 2. Extract the archive and run the `pubsub-gui` binary | ||
| 2. **Linux - AppImage (Recommended):** | ||
| ```bash | ||
| chmod +x pubsub-gui_linux_amd64_*.AppImage | ||
| ./pubsub-gui_linux_amd64_*.AppImage | ||
| ``` | ||
| The AppImage bundles all dependencies - no additional installation required! |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
AppImage FUSE libfuse2 requirements 2024 2025 official documentation
💡 Result:
Short answer: Official AppImage documentation (AppImageKit wiki and the AppImage docs) requires FUSE 2 — i.e., the libfuse.so.2 runtime (package name libfuse2 on Debian/Ubuntu). The docs include instructions for installing/using libfuse2 and note Ubuntu 24.04 renamed the package to libfuse2t64 (and related packaging issues have been reported). [1][2][3]
Sources
- AppImageKit FUSE wiki (requirements, install notes, Ubuntu rename warning). [1]
- AppImage official troubleshooting docs (FUSE 2.x required, install and fallback instructions). [2]
- GitHub issue discussing libfuse2t64 removal/packaging problems on Ubuntu 24.04 (reported 2025). [3]
🏁 Script executed:
cat -n README.md | sed -n '45,70p'Repository: B87/pubsub-gui
Length of output: 1447
AppImage "no dependencies" claim is misleading — FUSE/libfuse2 is a documented runtime requirement.
Official AppImageKit documentation requires FUSE 2 (libfuse.so.2) as a runtime dependency. Current package names are libfuse2 on Debian/Ubuntu and libfuse2t64 on Ubuntu 24.04. The README should acknowledge this instead of claiming "no dependencies required" or "no additional installation required."
✏️ Suggested README fix
- - **AppImage (Recommended)**: `pubsub-gui_linux_amd64_*.AppImage` - No dependencies required!
+ - **AppImage (Recommended)**: `pubsub-gui_linux_amd64_*.AppImage` - Bundles app dependencies (requires FUSE/libfuse2).
...
- The AppImage bundles all dependencies - no additional installation required!
+ The AppImage bundles app dependencies. You may need to install FUSE/libfuse2 (libfuse2 on Debian/Ubuntu, libfuse2t64 on Ubuntu 24.04).📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - **AppImage (Recommended)**: `pubsub-gui_linux_amd64_*.AppImage` - No dependencies required! | |
| - **tar.gz**: `pubsub-gui_linux_amd64_*.tar.gz` - Requires runtime libraries (see below) | |
| 2. Extract the archive and run the `pubsub-gui` binary | |
| 2. **Linux - AppImage (Recommended):** | |
| ```bash | |
| chmod +x pubsub-gui_linux_amd64_*.AppImage | |
| ./pubsub-gui_linux_amd64_*.AppImage | |
| ``` | |
| The AppImage bundles all dependencies - no additional installation required! | |
| - **AppImage (Recommended)**: `pubsub-gui_linux_amd64_*.AppImage` - Bundles app dependencies (requires FUSE/libfuse2). | |
| - **tar.gz**: `pubsub-gui_linux_amd64_*.tar.gz` - Requires runtime libraries (see below) | |
| 2. **Linux - AppImage (Recommended):** |
🤖 Prompt for AI Agents
In `@README.md` around lines 52 - 60, Update the README text that currently claims
the AppImage has "No dependencies required" and "no additional installation
required" to explicitly state the runtime dependency on FUSE/libfuse2 (e.g.,
package names like libfuse2 on Debian/Ubuntu and libfuse2t64 on Ubuntu 24.04).
Locate the bullet "AppImage (Recommended)" and the "Linux - AppImage
(Recommended)" section and replace the absolute "no dependencies" wording with a
note that the AppImage bundles application libraries but requires FUSE
(libfuse.so.2) at runtime, and optionally add a short install hint for common
distros.
| # Find the generated AppImage (name varies based on desktop file) | ||
| GENERATED_APPIMAGE=$(ls -1 Pub_Sub_GUI*.AppImage 2>/dev/null || ls -1 *.AppImage 2>/dev/null | head -1) | ||
|
|
||
| if [[ -z "$GENERATED_APPIMAGE" ]]; then | ||
| log_error "Error: AppImage was not created" | ||
| exit 1 | ||
| fi |
There was a problem hiding this comment.
Potential issue with AppImage detection logic.
The command structure has a subtle precedence issue. If multiple Pub_Sub_GUI*.AppImage files exist, the first ls will return all of them (no head -1 applied). The head -1 only applies to the fallback branch.
🔧 Proposed fix
-GENERATED_APPIMAGE=$(ls -1 Pub_Sub_GUI*.AppImage 2>/dev/null || ls -1 *.AppImage 2>/dev/null | head -1)
+GENERATED_APPIMAGE=$(ls -1 Pub_Sub_GUI*.AppImage 2>/dev/null | head -1 || ls -1 *.AppImage 2>/dev/null | head -1)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # Find the generated AppImage (name varies based on desktop file) | |
| GENERATED_APPIMAGE=$(ls -1 Pub_Sub_GUI*.AppImage 2>/dev/null || ls -1 *.AppImage 2>/dev/null | head -1) | |
| if [[ -z "$GENERATED_APPIMAGE" ]]; then | |
| log_error "Error: AppImage was not created" | |
| exit 1 | |
| fi | |
| # Find the generated AppImage (name varies based on desktop file) | |
| GENERATED_APPIMAGE=$(ls -1 Pub_Sub_GUI*.AppImage 2>/dev/null | head -1 || ls -1 *.AppImage 2>/dev/null | head -1) | |
| if [[ -z "$GENERATED_APPIMAGE" ]]; then | |
| log_error "Error: AppImage was not created" | |
| exit 1 | |
| fi |
🤖 Prompt for AI Agents
In `@scripts/create-appimage.sh` around lines 232 - 238, The AppImage detection
assigns GENERATED_APPIMAGE using a compound command where head -1 only applies
to the fallback, causing multiple matches from the first ls to be returned;
change the command so you always pick a single file (e.g., pipe the first ls to
head -1 for the Pub_Sub_GUI*.AppImage branch or use a glob and select the first
element), update the GENERATED_APPIMAGE assignment accordingly (reference
GENERATED_APPIMAGE and the subsequent log_error/exit branch) so only one
AppImage path is stored and checked.
…eate-appimage script - Added wget to the list of dependencies in the CI workflow. - Updated linuxdeploy version to 1-alpha-20251107-1 in create-appimage.sh. - Improved error handling for wget commands to provide clearer error messages if downloads fail.
- Modified the script to attempt downloading the linuxdeploy checksum file, logging a warning if it is not available. - Updated checksum verification logic to only proceed if the checksum file was successfully downloaded and SKIP_CHECKSUM is not set. - Improved user feedback with success and warning messages during the checksum process.
- Updated the icon generation script to ensure all generated icons are exactly square by using the `-extent` option with ImageMagick. - Removed obsolete icon files from the appicon.iconset directory, including various sizes (16x16, 32x32, 64x64, 128x128, 256x256, 512x512) and their @2x counterparts. - Improved error handling during the ICNS file generation process to provide better feedback in case of failures.
- Copied the application icon to the working directory with the name expected by the desktop file, ensuring compatibility with linuxdeploy. - Updated the icon file reference in the AppImage creation process to use the newly copied icon, improving the build process.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@scripts/generate-icons.sh`:
- Around line 29-32: The ImageMagick command in scripts/generate-icons.sh
incorrectly places -gravity after -extent so centering has no effect; update the
call that uses $IMAGEMAGICK_CMD with "$SVG_ICON" -background none -resize
512x512 -gravity center -extent 512x512 "$BUILD_DIR/appicon.png" so -gravity
center is specified before -extent (keep the same $SVG_ICON, $BUILD_DIR and
output appicon.png identifiers).
- Around line 64-79: The ImageMagick commands using the IMAGEMAGICK_CMD variable
to create PNGs from SVG_ICON have -extent after -gravity which prevents proper
centering; update each invocation that writes to files like
"$ICONSET_DIR/icon_512x512.png", "$ICONSET_DIR/icon_256x256@2x.png", etc., so
that the -gravity center option appears before -extent (i.e., move "-gravity
center" immediately before each corresponding "-extent <size>x<size>" for all
sizes and `@2x` variants) to ensure images are correctly centered.
♻️ Duplicate comments (1)
scripts/create-appimage.sh (1)
246-252: AppImage detection logic still has precedence issue.The
head -1only applies to the fallback branch. If multiplePub_Sub_GUI*.AppImagefiles exist, all would be assigned toGENERATED_APPIMAGE, which could cause themvcommand on line 255 to fail.🔧 Suggested fix
-GENERATED_APPIMAGE=$(ls -1 Pub_Sub_GUI*.AppImage 2>/dev/null || ls -1 *.AppImage 2>/dev/null | head -1) +GENERATED_APPIMAGE=$(ls -1 Pub_Sub_GUI*.AppImage 2>/dev/null | head -1 || ls -1 *.AppImage 2>/dev/null | head -1)
🧹 Nitpick comments (1)
scripts/create-appimage.sh (1)
57-59: Consider using single quotes for the trap to defer variable expansion.The current double-quoted trap expands
$WORK_DIRwhen set rather than when triggered. While this works correctly here sinceWORK_DIRnever changes, the idiomatic pattern uses single quotes to defer expansion, which also silences the shellcheck SC2064 warning.🔧 Suggested fix
WORK_DIR=$(mktemp -d) -trap "rm -rf '$WORK_DIR'" EXIT +trap 'rm -rf "$WORK_DIR"' EXIT
- Updated the create-appimage script to ensure the output directory is absolute and exists before creating the AppImage, improving reliability. - Adjusted the handling of the generated AppImage name to only rename if it differs from the expected output name. - Refined the icon generation script to maintain consistent usage of the `-extent` option with ImageMagick, ensuring all icons are generated correctly.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@scripts/create-appimage.sh`:
- Line 63: The trap currently expands $WORK_DIR immediately; change the trap to
use single quotes so the variable is expanded when the trap runs (e.g., replace
the existing trap invocation that references WORK_DIR with a single-quoted trap
command so $WORK_DIR is resolved at EXIT), ensuring you still quote the variable
inside the trapped command to handle spaces (refer to the trap command and
WORK_DIR).
♻️ Duplicate comments (1)
scripts/create-appimage.sh (1)
280-280: AppImage detection still has precedence issue withhead -1.The
head -1only applies to the fallback*.AppImageglob, not the primaryPub_Sub_GUI*.AppImagepattern. If multiple files match the first pattern, all will be assigned toGENERATED_APPIMAGE, causing issues in the subsequentmvcommand.🔧 Proposed fix
-GENERATED_APPIMAGE=$(ls -1 "${OUTPUT_DIR}"/Pub_Sub_GUI*.AppImage 2>/dev/null || ls -1 "${OUTPUT_DIR}"/*.AppImage 2>/dev/null | head -1) +GENERATED_APPIMAGE=$(ls -1 "${OUTPUT_DIR}"/Pub_Sub_GUI*.AppImage 2>/dev/null | head -1 || ls -1 "${OUTPUT_DIR}"/*.AppImage 2>/dev/null | head -1)
|
|
||
| # Working directory for downloads | ||
| WORK_DIR=$(mktemp -d) | ||
| trap "rm -rf '$WORK_DIR'" EXIT |
There was a problem hiding this comment.
Use single quotes in trap to defer variable expansion.
The $WORK_DIR variable is expanded immediately when the trap is set, not when it's triggered. If WORK_DIR were ever reassigned later, the trap would still reference the old value. Use single quotes to defer expansion until the trap executes.
🔧 Proposed fix
-trap "rm -rf '$WORK_DIR'" EXIT
+trap 'rm -rf "$WORK_DIR"' EXIT📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| trap "rm -rf '$WORK_DIR'" EXIT | |
| trap 'rm -rf "$WORK_DIR"' EXIT |
🧰 Tools
🪛 Shellcheck (0.11.0)
[warning] 63-63: Use single quotes, otherwise this expands now rather than when signalled.
(SC2064)
🤖 Prompt for AI Agents
In `@scripts/create-appimage.sh` at line 63, The trap currently expands $WORK_DIR
immediately; change the trap to use single quotes so the variable is expanded
when the trap runs (e.g., replace the existing trap invocation that references
WORK_DIR with a single-quoted trap command so $WORK_DIR is resolved at EXIT),
ensuring you still quote the variable inside the trapped command to handle
spaces (refer to the trap command and WORK_DIR).
- Added squashfs-tools to the list of dependencies in both CI and release workflows, ensuring all necessary tools are available for AppImage creation. - Updated the create-appimage script documentation to reflect the new prerequisite for squashfs-tools, enhancing clarity for developers.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/release.yml (1)
122-158: Add Goreleaser step to the release workflow.The workflow builds artifacts and packages them manually, but the repository has
.goreleaser.yamlconfigured to handle builds, archives, checksums, and GitHub releases. Per the coding guidelines, add a Goreleaser step after the pre-build steps (frontend build, dependencies) complete. The existing custom packaging steps can be replaced with Goreleaser's built-in functionality.
🤖 Fix all issues with AI agents
In `@scripts/create-appimage.sh`:
- Around line 58-60: The script currently runs OUTPUT_DIR=$(cd "$OUTPUT_DIR" &&
pwd) before creating the directory, which will fail under set -e if OUTPUT_DIR
doesn't exist; change the order so you create the directory first (mkdir -p
"$OUTPUT_DIR") and then resolve the absolute path into OUTPUT_DIR using cd/pwd,
keeping the same variable names (OUTPUT_DIR) to avoid breaking downstream uses.
♻️ Duplicate comments (2)
scripts/create-appimage.sh (2)
64-64: DeferWORK_DIRexpansion in the trap.Double quotes expand immediately when setting the trap; use single quotes so
$WORK_DIRresolves at EXIT.🛠️ Proposed fix
-trap "rm -rf '$WORK_DIR'" EXIT +trap 'rm -rf "$WORK_DIR"' EXIT
280-282: Ensure only one AppImage is selected.
head -1applies only to the fallback branch, so the primarylscan return multiple files. Pipe both branches tohead -1.🛠️ Proposed fix
-GENERATED_APPIMAGE=$(ls -1 "${OUTPUT_DIR}"/Pub_Sub_GUI*.AppImage 2>/dev/null || ls -1 "${OUTPUT_DIR}"/*.AppImage 2>/dev/null | head -1) +GENERATED_APPIMAGE=$(ls -1 "${OUTPUT_DIR}"/Pub_Sub_GUI*.AppImage 2>/dev/null | head -1 || ls -1 "${OUTPUT_DIR}"/*.AppImage 2>/dev/null | head -1)
🧹 Nitpick comments (1)
.github/workflows/release.yml (1)
129-137: Avoid relying on the executable bit forcreate-appimage.sh.If the file mode isn’t executable in the repo, this step fails. Either ensure the exec bit is set or invoke via
bashto be safe.🛠️ Proposed fix
- ./scripts/create-appimage.sh "$VERSION" + bash ./scripts/create-appimage.sh "$VERSION"
- Added wget to the list of dependencies in the release workflow to ensure all necessary tools are available for AppImage creation. - Updated the create-appimage script to improve directory handling, ensuring the output directory is writable and creating a temporary directory for AppImage processes. - Adjusted the desktop file name in the script for consistency and improved error handling during the AppImage creation process.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.