wazuh / wazuh-packages

Wazuh - Tools for packages creation
https://wazuh.com
GNU General Public License v2.0
98 stars 89 forks source link

WIA uses `rpm` instead of `yum` in packages check #2811

Closed davidcr01 closed 5 months ago

davidcr01 commented 5 months ago
Related issue
https://github.com/wazuh/wazuh-packages/issues/2587

Description

The aim of this PR is to make the WIA use the rpm command instead of the yum command to check the installed packages. This avoids the use the yum command, which is slower than the RPM tool in this cases, avoids the use of the grep command, and avoids the YUM lock.

Tests

Testing is in: https://github.com/wazuh/wazuh-packages/issues/2587#issuecomment-1921081066

:green_circle: CentOS 8: https://ci.wazuh.info/job/Test_unattended/5206/ :green_circle: CentOS 7: https://ci.wazuh.info/job/Test_unattended/5205/ :green_circle: Ubuntu 18: https://ci.wazuh.info/job/Test_unattended/5207/ :green_circle: Ubuntu 16: https://ci.wazuh.info/job/Test_unattended/5208/ :green_circle: Ubuntu 20: https://ci.wazuh.info/job/Test_unattended/5209/ :green_circle: AL2: https://ci.wazuh.info/job/Test_unattended/5210/ :green_circle: RHEL7: https://ci.wazuh.info/job/Test_unattended/5204/ :green_circle: RHEL8: https://ci.wazuh.info/job/Test_unattended/5211/