sap_install_media_detect: no unrar in EPEL for RHEL10
Ansible Role
sap_install_media_detect
OS Family
RHEL
Ansible Controller - Python version
Python 3.12.0
Ansible-core version
ansible [core 2.18.7]
Bug Description
ansible [core 2.18.7]
Bug reproduction
This tasks fails since there is no unrar in EPEL for RHEL10 and therefore it does not get installed in sap_general_preconfigure. Installing the unrar binary itself does not help since this check is explicitly looking for an installed package.
TASK [community.sap_install.sap_install_media_detect : SAP Install Media Detect - Prepare - EPEL - Install the unar package] ********
task path: /home/nils/.ansible/collections/ansible_collections/community/sap_install/roles/sap_install_media_detect/tasks/prepare/enable_rar_handling.yml:49
fatal: [hana01]: FAILED! => {"changed": false, "failures": ["No package unar available."], "msg": "Failed to install some of the specified packages", "rc": 1, "results": []}
Community participation
Happy to help with this bug fix, but may need help (e.g. first time contributing to open-source using git)
@newkit Thanks for reporting this. You reported "This tasks fails since there is no unrar in EPEL for RHEL10 and therefore it does not get installed in sap_general_preconfigure" but the role sap_general_preconfigure does not install unrar or any other rar file listing/expansion tool. So I assume you meant "This tasks fails since there is no unrar in EPEL for RHEL10 and therefore it does not get installed in sap_install_media_detect", right?
On the issue itself, please try the following:
-
Copy your rar binary program to a path of your choice, e.g. /usr/local/bin .
-
In your playbook or inventory, set:
sap_install_media_detect_rar_package: 'linux-rar'
sap_install_media_detect_rar_list: '/usr/local/bin/rar lb'
sap_install_media_detect_rar_extract: '/usr/local/bin/rar x'
sap_install_media_detect_rar_extract_directory_argument: ' -o'
This should skip the tasks which try to enable EPEL and to install a rar package.
Due to non-free licensing issues with unrar it must not be shipped in any distribution. Hence, for RHEL, the tool "unar" from EPEL needs to be used. It can unpack RAR files and is free from the strict license constraints that are present in unrar.
AFAIK, the role used unar from EPEL.
@rhmk We can use any rar file listing/extracting program from EPEL, however there is currently none available in EPEL according to this issue. So customers can install their rar file listing/extracting program from another source, and the role can be configured to use that one (instead of enabling the EPEL repo and attempting to install the package from there).