Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 3, 2025

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 existing package-deb.sh workflow

  • CI/CD: GitHub Actions release workflow now builds and uploads RPM alongside existing DEB package

  • Documentation: Installation instructions for dnf/yum package managers

Installation

sudo dnf install ./numberguessinggame-1.0.0-1.noarch.rpm
numberguessinggame

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
    • Triggering command: /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

This section details on the original issue you should resolve

<issue_title>Package for fedora</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits December 3, 2025 02:39
Copilot AI changed the title [WIP] Add package support for Fedora distribution Add Fedora/RPM packaging support Dec 3, 2025
Copilot AI requested a review from Project516 December 3, 2025 02:43
@Project516 Project516 marked this pull request as ready for review December 3, 2025 02:48
Copilot AI review requested due to automatic review settings December 3, 2025 02:48
@Project516 Project516 merged commit 68f58e2 into master Dec 3, 2025
14 checks passed
@Project516 Project516 deleted the copilot/add-package-for-fedora branch December 3, 2025 02:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

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

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.

Suggested change
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

Copilot uses AI. Check for mistakes.
Source0: game.jar

BuildArch: noarch
Requires: java-1.8.0-openjdk-headless
Copy link

Copilot AI Dec 3, 2025

Choose a reason for hiding this comment

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

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.

Suggested change
Requires: java-1.8.0-openjdk-headless
Requires: java-headless >= 1:1.8.0

Copilot uses AI. Check for mistakes.
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.

Package for fedora

2 participants