Skip to content

Added Fedora compatibility#1310

Open
DhruvK278 wants to merge 7 commits into
AOSSIE-Org:mainfrom
DhruvK278:feat-Fedora-update
Open

Added Fedora compatibility#1310
DhruvK278 wants to merge 7 commits into
AOSSIE-Org:mainfrom
DhruvK278:feat-Fedora-update

Conversation

@DhruvK278

@DhruvK278 DhruvK278 commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Addressed Issues:

Fixes #1309
Previously, the automated setup.sh script only supported Debian-based Linux distributions (like Ubuntu) and would exit with an "Unsupported OS" warning on Fedora. Additionally, manual configuration guides only listed Debian-specific package names. This PR introduces native Fedora support to the automated setup workflow and manual documentation.

Key changes

  1. Fedora/RedHat support in setup.sh:
  • Added detection for /etc/fedora-release and /etc/redhat-release.
  • Mapped Debian-specific system dependencies to their Fedora (dnf) equivalents (e.g., webkit2gtk4.1-devel, libxdo-devel, @development-tools).
  1. Setup script stability & robustness:
  • Resolved relative path constraints by dynamically resolving the script's directory and REPO_ROOT dynamically using $BASH_SOURCE[0]. This allows running setup.sh from any directory.
  • Added cleanup steps (rm -rf virtual environments) to ensure re-runs of the setup script start from a clean state.
  1. Documentation Updates:
  • Updated docs/Manual_Setup_Guide.md to list Fedora-specific dependency installation commands in step 1 of the Tauri Frontend Setup.

Recording

Here is the recording of the setup
https://drive.google.com/file/d/1y8EW4RuzapZdQbPAOH6oh0LXLx8aBLEW/view?usp=sharing

AI Usage Disclosure:

We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact. AI slop is strongly discouraged and may lead to banning and blocking. Do not spam our repos with AI slop.

Check one of the checkboxes below:

  • This PR contains AI-generated code. I have read the AI Usage Policy and this PR complies with this policy. I have tested the code locally and I am responsible for it.

I have used the following AI models and tools: TODO

Checklist

  • My PR addresses a single issue, fixes a single bug or makes a single improvement.
  • My code follows the project's code style and conventions
  • If applicable, I have made corresponding changes or additions to the documentation
  • My changes generate no new warnings or errors
  • I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • I have read the Contribution Guidelines
  • Once I submit my PR, CodeRabbit AI will automatically review it and I will address CodeRabbit's comments.
  • I have filled this PR template completely and carefully, and I understand that my PR may be closed without review otherwise.

Summary by CodeRabbit

  • Documentation

    • Expanded setup guides to explicitly support Fedora/RedHat-based Linux alongside Windows and Debian-based systems.
    • Added Fedora/RedHat-specific troubleshooting steps and package install guidance for missing system dependencies.
  • Chores

    • Improved the automated setup script to detect and support Fedora/RedHat distributions, use distro-appropriate install steps, recreate clean environments during setup, and provide clearer messaging for unsupported Linux environments.

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

⚠️ This PR has merge conflicts.

Please resolve the merge conflicts before review.

Your PR will only be reviewed by a maintainer after all conflicts have been resolved.

📺 Watch this video to understand why conflicts occur and how to resolve them:
https://www.youtube.com/watch?v=Sqsz1-o7nXk

@github-actions github-actions Bot added documentation Improvements or additions to documentation scripts Changes related to scripts labels Jun 9, 2026
@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

This PR extends the project's setup automation and documentation to support Fedora/RedHat-based Linux distributions alongside existing Windows and Debian-based support. Detection logic identifies the distribution, distro-specific package managers install dependencies, and service setup was refactored to use absolute paths from a calculated repository root.

Changes

Fedora/RedHat Linux Distribution Support

Layer / File(s) Summary
Documentation updates for supported platforms
CONTRIBUTING.md, docs/setup.md, docs/Script_Setup_Guide.md, docs/Manual_Setup_Guide.md
Setup guides and contributing documentation expanded to list Windows, Debian-based Linux (Ubuntu), and Fedora/RedHat-based Linux as supported platforms. Fedora-specific troubleshooting sections added to manual setup guide for missing system dependencies and gobject-2.0 errors.
Distribution detection and routing
scripts/setup.js
Node.js setup script now checks for Debian, Fedora, or RedHat release files (/etc/debian_version, /etc/fedora-release, /etc/redhat-release) to route to bash setup, with updated error messaging reflecting all supported distributions.
Repository root resolution & Fedora branches
scripts/setup.sh
Setup script computes REPO_ROOT from script location; Fedora/RedHat branch uses dnf for dependencies and dnf install nodejs npm for Node.js, while Debian-based systems use NodeSource + apt-get. Service setup uses absolute $REPO_ROOT paths and recreates Python venvs and frontend builds from repo-root directories.

Sequence Diagram(s)

sequenceDiagram
  participant setup_js as scripts/setup.js
  participant os as Detected_Distro
  participant bash as scripts/setup.sh
  setup_js->>os: check /etc/debian_version,/etc/fedora-release,/etc/redhat-release
  os->>setup_js: distro identified (debian|fedora|redhat) or unsupported
  setup_js->>bash: invoke bash setup (when supported)
  bash->>os: use apt/dnf branch to install dependencies
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • AOSSIE-Org/PictoPy#440: Unified setup documentation updates in docs/setup.md, managing the same setup page content that references the expanded platform support introduced here.

Suggested labels

Documentation, TypeScript/JavaScript

Poem

🐰 A script hops through distros with glee,
Fedora and Debian join the spree,
dnf and apt in tidy rows,
Repo root fixed — the workflow grows,
The rabbit cheers, setup runs free.

🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR includes an additional change not in the linked issue: making setup.sh robust to invocation location via $BASH_SOURCE[0] and REPO_ROOT resolution, plus venv cleanup steps. Document whether the REPO_ROOT resolution and venv cleanup enhancements are intended improvements or scope creep, and update issue #1309 or PR description accordingly for clarity.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Added Fedora compatibility' is concise and clearly summarizes the main change: extending Fedora/RedHat support across setup scripts and documentation.
Linked Issues check ✅ Passed All coding requirements from issue #1309 are met: setup.sh detects Fedora/RedHat via release files and installs dnf equivalents; setup.js validates distribution detection; docs are updated with Fedora-specific commands.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Review ran into problems

🔥 Problems

Stopped waiting for pipeline failures after 30000ms. One of your pipelines takes longer than our 30000ms fetch window to run, so review may not consider pipeline-failure results for inline comments if any failures occurred after the fetch window. Increase the timeout if you want to wait longer or run a @coderabbit review after the pipeline has finished.


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 and usage tips.

@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: 5

🧹 Nitpick comments (2)
docs/Script_Setup_Guide.md (1)

7-8: 💤 Low value

Consider adding a Fedora setup video guide.

The documentation now officially supports Fedora/RedHat-based Linux, but there's no corresponding video guide (only Windows and Ubuntu videos are listed). Consider adding a Fedora setup video to maintain consistency and help users on that platform.

🤖 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 `@docs/Script_Setup_Guide.md` around lines 7 - 8, Add a Fedora/RedHat video
link line to the same bullet list where the existing "[Windows]" and "[Ubuntu
(Debian)]" entries appear in the docs (so users on Fedora have parity with other
platforms); insert a new list item like "[Fedora (RedHat)](link-to-video)"
matching the existing format and ordering, ensuring the text label and URL
follow the style used by the "[Windows]" and "[Ubuntu (Debian)]" entries.
scripts/setup.sh (1)

94-101: 💤 Low value

Note: Node.js versions may differ between Debian and Fedora.

The Debian path uses NodeSource to install Node.js 18.x, while Fedora installs from distribution repositories. This may result in different Node.js versions across platforms. If the project requires a specific Node.js version, consider documenting the minimum/maximum supported versions or using a version manager consistently across distributions.

🤖 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 `@scripts/setup.sh` around lines 94 - 101, The install paths in
scripts/setup.sh (OS_TYPE check with the Debian branch using NodeSource
setup_18.x and the Fedora branch using distro packages) can produce inconsistent
Node.js versions; update the script so both branches install a consistent
required Node version (e.g., use NodeSource or NodeSource-equivalent repo for
Fedora or install and use a version manager like nvm/volta across all OSes)
and/or add clear documentation of the supported Node.js range; specifically
modify the Debian branch that calls setup_18.x and the Fedora/RedHat branch (the
branches under the OS_TYPE conditional) to either invoke the same NodeSource
installer or bootstrap nvm/volta and install the pinned version, and add a note
in the script header indicating the chosen required Node.js version constraint.
🤖 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 `@docs/Manual_Setup_Guide.md`:
- Around line 171-176: Update the section title string "Fedora:" to
"Fedora/RedHat:" for consistency with the rest of the docs; locate the block
that currently reads "Fedora:" above the bash snippet (the exact header string
"Fedora:") and change it to "Fedora/RedHat:" while leaving the install command
(sudo dnf install -y glib2-devel pkgconf-pkg-config) unchanged.
- Around line 155-159: The header "Fedora:" in the troubleshooting section is
inconsistent with other docs; change the header text to "Fedora/RedHat:" (or
"Fedora/RedHat-based:") so it matches terminology used in CONTRIBUTING.md,
Script_Setup_Guide.md, and setup.md; locate the header string "Fedora:" near the
glib2-devel mesa-libGL install snippet and update it accordingly.

In `@scripts/setup.sh`:
- Line 114: The script currently runs cd "$REPO_ROOT/backend" without checking
success; add guard/error handling around that change-directory step (the cd
"$REPO_ROOT/backend" invocation) so the script verifies the backend directory
exists and the cd succeeded and immediately exits with a clear error if not
(e.g., test -d "$REPO_ROOT/backend" or check the cd exit status and echo a
descriptive message and exit 1) to prevent subsequent commands from running in
the wrong location.
- Line 134: The script currently runs cd "$REPO_ROOT/frontend" without checking
for failure, so if the frontend dir is missing subsequent npm install runs in
the wrong place; update the block containing cd "$REPO_ROOT/frontend" to verify
the directory change (e.g., test the return status of cd or use a conditional
like cd ... || { echo "Failed to enter frontend directory"; exit 1; }) before
running npm install, mirroring the error handling pattern used for the src-tauri
block so the script exits with an error if the cd fails.
- Line 124: The script blindly runs cd "$REPO_ROOT/sync-microservice" which can
silently fail; update the setup.sh around the cd command to check its exit
status and handle errors: after attempting cd "$REPO_ROOT/sync-microservice"
verify the command succeeded (e.g., if the cd fails), emit a clear error message
and exit with a non-zero status so subsequent steps don't run in the wrong
directory; reference the existing cd "$REPO_ROOT/sync-microservice" invocation
when locating where to add this check and error handling.

---

Nitpick comments:
In `@docs/Script_Setup_Guide.md`:
- Around line 7-8: Add a Fedora/RedHat video link line to the same bullet list
where the existing "[Windows]" and "[Ubuntu (Debian)]" entries appear in the
docs (so users on Fedora have parity with other platforms); insert a new list
item like "[Fedora (RedHat)](link-to-video)" matching the existing format and
ordering, ensuring the text label and URL follow the style used by the
"[Windows]" and "[Ubuntu (Debian)]" entries.

In `@scripts/setup.sh`:
- Around line 94-101: The install paths in scripts/setup.sh (OS_TYPE check with
the Debian branch using NodeSource setup_18.x and the Fedora branch using distro
packages) can produce inconsistent Node.js versions; update the script so both
branches install a consistent required Node version (e.g., use NodeSource or
NodeSource-equivalent repo for Fedora or install and use a version manager like
nvm/volta across all OSes) and/or add clear documentation of the supported
Node.js range; specifically modify the Debian branch that calls setup_18.x and
the Fedora/RedHat branch (the branches under the OS_TYPE conditional) to either
invoke the same NodeSource installer or bootstrap nvm/volta and install the
pinned version, and add a note in the script header indicating the chosen
required Node.js version constraint.
🪄 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: 7c287e1d-14fc-46e5-8ea7-a5d095dd44f8

📥 Commits

Reviewing files that changed from the base of the PR and between c71d3e4 and 5e5c3bc.

📒 Files selected for processing (6)
  • CONTRIBUTING.md
  • docs/Manual_Setup_Guide.md
  • docs/Script_Setup_Guide.md
  • docs/setup.md
  • scripts/setup.js
  • scripts/setup.sh

Comment thread docs/Manual_Setup_Guide.md Outdated
Comment thread docs/Manual_Setup_Guide.md Outdated
Comment thread scripts/setup.sh Outdated
Comment thread scripts/setup.sh Outdated
Comment thread scripts/setup.sh Outdated
@rohan-pandeyy

Copy link
Copy Markdown
Member

LGTM

@DhruvK278 can you also share a screen recording of a clean installation using the script for Fedora?

@DhruvK278

Copy link
Copy Markdown
Contributor Author

LGTM

@DhruvK278 can you also share a screen recording of a clean installation using the script for Fedora?

I have updated the PR.

Comment thread scripts/setup.sh
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
elif [ -f "/etc/fedora-release" ] || [ -f "/etc/redhat-release" ]; then
sudo dnf install -y nodejs npm

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.

Debian strictly uses Node version 18
curl -fsSL https://deb.nodesource.com/setup_18.x on line 97.

I would recommend the same for Fedora as well, to maintain consistency across distributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation scripts Changes related to scripts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feat: Add dependencies for fedora distribution

3 participants