XRT icon indicating copy to clipboard operation
XRT copied to clipboard

xrtdeps : fix and update Fedora package list

Open Byvirven opened this issue 11 months ago • 7 comments
trafficstars

  • Added logic to detect Fedora version from /etc/os-release.
  • Introduced conditional inclusion of openssl-static, protobuf-static, and python2-sphinx based on Fedora version:
  • openssl-static for Fedora ≤ 35
  • protobuf-static for Fedora ≤ 38
  • python2-sphinx for Fedora < 32, otherwise python3-sphinx for Fedora ≥ 32
  • Cleaned up redundant entries in the package list (FD_LIST).
  • Improved error handling for unavailable packages with --skip-broken option in dnf.
  • Ensured compatibility with Fedora's evolving package ecosystem by addressing deprecated packages.

Problem solved by the commit

This commit updates the xrtdeps.sh script to fix the Fedora package installation list, ensuring compatibility with newer Fedora versions. Specifically, it addresses the absence of some packages and adapts the list dynamically based on the Fedora version.

Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered

No specific PR introduced the issue. The problem was identified while attempting to execute the xrtdeps.sh script on Fedora 41, where several packages were missing or incompatible with the current package list. Probably not the first time.

How problem was solved, alternative solutions (if any) and why they were rejected

The problem was solved by: Adding logic to detect the Fedora version dynamically from /etc/os-release. Introducing conditional logic to include specific packages only for supported Fedora versions:

  • openssl-static for Fedora ≤ 35.
  • protobuf-static for Fedora ≤ 38.
  • python2-sphinx for Fedora < 32, and python3-sphinx for Fedora ≥ 32.

Alternative solutions, such as manually installing missing packages or ignoring unavailable ones, were rejected as they would not ensure compatibility across Fedora versions and could cause issues in automated environments.

Risks (if any) associated the changes in the commit

The risks are minimal, but possible issues include:

  • Potential misidentification of Fedora version if /etc/os-release is missing or incorrectly configured.
  • Failure to handle edge cases where package names or availability might differ for custom Fedora configurations.

What has been tested and how, request additional testing if necessary

The updated script was tested on Fedora 41 to ensure:

  • Proper detection of Fedora version.
  • Inclusion/exclusion of packages based on the version.
  • Successful execution of the package installation command with dnf.

Additional testing could include running the script on other Fedora versions (e.g., 35, 38) to confirm conditional logic behaves as expected.

Documentation impact (if any)

The documentation for the xrtdeps.sh script, if it exists, may need an update to reflect:

  • The dynamic Fedora version handling.
  • Specific package inclusion/exclusion logic for various Fedora versions.

Byvirven avatar Nov 30 '24 00:11 Byvirven