[release_files] Add zypper support into the install.sh for OpenSUSE.#6413
[release_files] Add zypper support into the install.sh for OpenSUSE.#6413PizzaLovingNerd wants to merge 2 commits into
Conversation
📝 WalkthroughWalkthroughAdds native zypper support to the NetBird installer: detects zypper, introduces add_zypper_repo() to configure the repository and GPG key, and adds a zypper branch to install ChangesZypper package manager support
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds support for installing NetBird via zypper (openSUSE/SLES-style distros) by wiring in repo setup, package installation, and package-manager detection.
Changes:
- Introduce
add_zypper_repoto import the GPG key, add the NetBird repo, and refresh metadata. - Add a
zypperbranch ininstall_netbird()to installnetbirdand optionallynetbird-ui. - Extend package-manager detection to select
zypperwhen available.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ${SUDO} zypper --non-interactive install netbird | ||
|
|
||
| if ! $SKIP_UI_APP; then | ||
| ${SUDO} zypper --non-interactive install netbird-ui |
| add_zypper_repo() { | ||
| ${SUDO} rpm --import https://pkgs.netbird.io/yum/repodata/repomd.xml.key | ||
| ${SUDO} zypper --non-interactive removerepo netbird >/dev/null 2>&1 || true | ||
| ${SUDO} zypper --non-interactive addrepo -f -g https://pkgs.netbird.io/yum/ netbird | ||
| ${SUDO} zypper --gpg-auto-import-keys refresh netbird | ||
| } |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
release_files/install.sh (1)
456-458: Consider adding OpenSUSE to the CI test matrix.The zypper installation path will not be exercised by the current CI workflow, which only tests on
ubuntu-latestandmacos-latest. Consider adding an OpenSUSE runner (e.g., using a container or VM) to the test matrix in.github/workflows/install-script-test.ymlto validate the zypper installation flow in CI.🤖 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 `@release_files/install.sh` around lines 456 - 458, The CI doesn't exercise the zypper branch (PACKAGE_MANAGER set to "zypper") so add an OpenSUSE job to .github/workflows/install-script-test.yml to run the install.sh path that detects zypper; update the matrix or add a separate job that uses an OpenSUSE VM/container (or docker image like opensuse/leap) and runs the same install script to validate the zypper branch, ensuring the job runs the script end-to-end and fails on errors so the zypper installation flow is covered by CI.Source: MCP 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.
Inline comments:
In `@release_files/install.sh`:
- Around line 137-142: The add_zypper_repo() has redundant/possibly incorrect
key handling and a suspicious -g flag; either import the GPG key once via rpm
and remove zypper's auto-import steps, or rely on zypper to auto-import and drop
the separate rpm --import. Concretely: in add_zypper_repo(), choose one flow—(A)
keep ${SUDO} rpm --import https://pkgs.netbird.io/yum/repodata/repomd.xml.key,
remove the zypper --gpg-auto-import-keys line, and call ${SUDO} zypper
--non-interactive addrepo -f https://pkgs.netbird.io/yum/ netbird (drop the -g
flag); or (B) remove the rpm --import line, add the repo with ${SUDO} zypper
--non-interactive --gpg-auto-import-keys addrepo -f https://pkgs.netbird.io/yum/
netbird and then ${SUDO} zypper --non-interactive refresh netbird; update the
add_zypper_repo function accordingly so only one key-import path is used and the
-g flag is not present in the addrepo call.
---
Nitpick comments:
In `@release_files/install.sh`:
- Around line 456-458: The CI doesn't exercise the zypper branch
(PACKAGE_MANAGER set to "zypper") so add an OpenSUSE job to
.github/workflows/install-script-test.yml to run the install.sh path that
detects zypper; update the matrix or add a separate job that uses an OpenSUSE
VM/container (or docker image like opensuse/leap) and runs the same install
script to validate the zypper branch, ensuring the job runs the script
end-to-end and fails on errors so the zypper installation flow is covered by CI.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: a348ab79-a274-4f3b-b2b2-760ee0787632
📒 Files selected for processing (1)
release_files/install.sh
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6413 +/- ##
==========================================
+ Coverage 30.27% 30.29% +0.02%
==========================================
Files 905 911 +6
Lines 112288 112902 +614
==========================================
+ Hits 33994 34208 +214
- Misses 73786 74165 +379
- Partials 4508 4529 +21
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|




Describe your changes
Added Zypper to the installer that uses the existing RPMs which work well on OpenSUSE.
Issue ticket number and link
Fixes #4683 on OpenSUSE,
Stack
Checklist
Documentation
Select exactly one:
Not added yet, but I will also be adding docs for manual installation on OpenSUSE.
Docs PR URL (required if "docs added" is checked)
netbirdio/docs#793
Summary by CodeRabbit