-
Notifications
You must be signed in to change notification settings - Fork 32
Description
| Target version | Related issue | Related PR |
|---|---|---|
| 4.4 | wazuh/wazuh#14109 | wazuh/wazuh#14165 |
Description
As described on wazuh/wazuh#14109 the downloading of the precompiled dependencies was not working on Gentoo because the URLs were malformed. As a result the externals dependencies were compiled locally from sources.
The Makefile was building the URLs using the command 'uname -p', expecting values such as x86_64, amd64, arm32, etc. On Gentoo
this command outputs detailed information about the processor, for example: "Intel(R) Core(TM) i5-10210U CPU @ 1.60GHz".
This PR fixes this problem by using the command 'uname -m' to detect the architecture if the OS is Linux, MacOS or HP-UX. And uses 'uname -p' if the OS is Solaris or AIX.
Proposed checks
- Compile v4.3 on Gentoo Linux and check URLs built to download the precompiled dependencies.
- Compile v4.4 on Gentoo Linux and check URLs built to download the precompiled dependencies.
- Compile the fix branch on Gentoo Linux and check URLs built to download the precompiled dependencies.
- Run a compilation pipeline with as many OS as possible and check in the logs that the correct URL were used to download the precompiled dependencies.
Steps to reproduce
On a fresh Gentoo machine install either Agent or Manager v4.3/4.4 from sources.
The URLs are malformed and some errors are shown:

Expected results
Precompiled dependencies are downloaded correctly and Agent/Manager compiles without problems on Gentoo and every OS tested.
Configuration and considerations
This change not only affects compilation on Gentoo. It modifies some lines on the Makefile that are used by every OS, so it important to check the logs of the installation on as many OS as possible and check that the dependencies are downloaded from the correct URLs.