Conversation
Co-authored-by: Project516 <138796702+Project516@users.noreply.github.com>
Co-authored-by: Project516 <138796702+Project516@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR adds RPM packaging support to enable installation on Fedora, RHEL, CentOS, and other RPM-based Linux distributions, complementing the existing Debian package distribution.
- New RPM packaging script and spec file following standard RPM build conventions
- GitHub Actions workflow updated to build and upload RPM packages alongside DEB packages
- Installation documentation added for DNF/YUM package managers
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| package-rpm.sh | Shell script that automates RPM package building using rpmbuild with proper error handling and cleanup |
| fedora-package/SPECS/numberguessinggame.spec | RPM spec file defining package metadata, dependencies, and installation paths |
| fedora-package/SOURCES/.gitignore | Ignores build artifacts in the SOURCES directory while preserving the .gitignore file |
| README.md | Adds comprehensive installation and uninstallation instructions for RPM-based distributions and documents the RPM packaging process |
| .gitignore | Adds pattern to ignore generated RPM packages |
| .github/workflows/release.yml | Integrates RPM package building into the release workflow and uploads it as a release asset |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| You can use curl to do it from the command line: | ||
| ```bash | ||
| curl -s -L -o numberguessinggame.rpm https://github.com/Project516/NumberGuessingGame/releases/download/0.x.y/numberguessinggame-1.0.0-1.noarch.rpm |
There was a problem hiding this comment.
The download URL includes a hardcoded version "1.0.0-1" in the filename (numberguessinggame-1.0.0-1.noarch.rpm), but uses a placeholder 0.x.y for the release tag. This is inconsistent with the DEB instructions (line 22) which only use placeholders. For consistency and to avoid confusion, consider using a placeholder pattern like numberguessinggame-*.rpm or numberguessinggame-1.0.0-1.noarch.rpm with a matching release tag placeholder.
| curl -s -L -o numberguessinggame.rpm https://github.com/Project516/NumberGuessingGame/releases/download/0.x.y/numberguessinggame-1.0.0-1.noarch.rpm | |
| curl -s -L -o numberguessinggame-*.rpm https://github.com/Project516/NumberGuessingGame/releases/download/0.x.y/numberguessinggame-*.rpm |
| Source0: game.jar | ||
|
|
||
| BuildArch: noarch | ||
| Requires: java-1.8.0-openjdk-headless |
There was a problem hiding this comment.
The dependency java-1.8.0-openjdk-headless is very specific and may not be available on all RPM-based distributions. Consider using a more flexible requirement like Requires: java-headless >= 1:1.8.0 or Requires: jre-headless >= 1.8.0 to allow any Java 8+ JRE implementation, similar to how the Debian package uses default-jre | java8-runtime.
| Requires: java-1.8.0-openjdk-headless | |
| Requires: java-headless >= 1:1.8.0 |
Add Fedora/RPM packaging support
Adds RPM packaging to complement existing Debian package distribution, enabling installation on Fedora, RHEL, and CentOS systems.
Changes
RPM spec file (
fedora-package/SPECS/numberguessinggame.spec): Package definition with java-1.8.0-openjdk-headless dependency, installs JAR to/usr/share/games/numberguessinggame/and wrapper script to/usr/bin/Build script (
package-rpm.sh): Automated RPM build using rpmbuild, mirrors existingpackage-deb.shworkflowCI/CD: GitHub Actions release workflow now builds and uploads RPM alongside existing DEB package
Documentation: Installation instructions for
dnf/yumpackage managersInstallation
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
esm.ubuntu.com/usr/lib/apt/methods/https /usr/lib/apt/methods/https(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.