Package creation for Wazuh Manager

75 views
Skip to first unread message

Dai Nguyen

unread,
Apr 15, 2024, 10:15:37 PM4/15/24
to Wazuh | Mailing List
Hello, I want to create a debian package for wazuh-manager. I'm using wazuh 4.3.10.
I use this command to build:
./generate_debian_package.sh -b v4.3.10 --packages-branch v4.3.10 -t manager -a amd64 --dev --sources /home/dai/sources/wazuh-manager/27-02/wazuh-4.3.10/wazuh/ -j 9 --dont-build-docker
I got this error while building the package:
/build_wazuh/manager/wazuh-manager-4.3.10/src/external/libyaml/config/missing: line 81: automake-1.15: command not found
yes
checking errno.h presence... WARNING: 'automake-1.15' is missing on your system.
         You should only need it if you modified 'Makefile.am' or
         'configure.ac' or m4 files included by 'configure.ac'.
         The 'automake' program is part of the GNU Automake package:
         <http://www.gnu.org/software/automake>
         It also requires GNU Autoconf, GNU m4 and Perl in order to run:
         <http://www.gnu.org/software/autoconf>
         <http://www.gnu.org/software/m4/>
         <http://www.perl.org/>
Makefile:372: recipe for target 'Makefile.in' failed
make[3]: *** [Makefile.in] Error 127
make[3]: Leaving directory '/build_wazuh/manager/wazuh-manager-1.0.0/src/external/libyaml'
Makefile:971: recipe for target 'external/libyaml/src/.libs/libyaml.a' failed
make[2]: *** [external/libyaml/src/.libs/libyaml.a] Error 2
make[2]: *** Waiting for unfinished jobs....


And this error:
make[6]: Entering directory '/build_wazuh/manager/wazuh-manager-4.3.10/src/external/popt/build/output'
checking for backtrace... /build_wazuh/manager/wazuh-manager-4.3.10/src/external/popt/build-aux/missing: line 81: aclocal-1.16: command not found
WARNING: 'aclocal-1.16' is missing on your system.
         You should only need it if you modified 'acinclude.m4' or
         'configure.ac' or m4 files included by 'configure.ac'.
         The 'aclocal' program is part of the GNU Automake package:
         <https://www.gnu.org/software/automake>
         It also requires GNU Autoconf, GNU m4 and Perl in order to run:
         <https://www.gnu.org/software/autoconf>
         <https://www.gnu.org/software/m4/>
         <https://www.perl.org/>
Makefile:437: recipe for target '/build_wazuh/manager/wazuh-manager-4.3.10/src/external/popt/aclocal.m4' failed
make[6]: *** [/build_wazuh/manager/wazuh-manager-4.3.10/src/external/popt/aclocal.m4] Error 127
make[6]: Leaving directory '/build_wazuh/manager/wazuh-manager-4.3.10/src/external/popt/build/output'
CMakeFiles/upstream_popt.dir/build.make:129: recipe for target 'upstream_popt-prefix/src/upstream_popt-stamp/upstream_popt-build' failed
make[5]: *** [upstream_popt-prefix/src/upstream_popt-stamp/upstream_popt-build] Error 2
make[5]: Leaving directory '/build_wazuh/manager/wazuh-manager-4.3.10/src/external/popt/build'
CMakeFiles/Makefile2:94: recipe for target 'CMakeFiles/upstream_popt.dir/all' failed
make[4]: *** [CMakeFiles/upstream_popt.dir/all] Error 2
make[4]: Leaving directory '/build_wazuh/manager/wazuh-manager-4.3.10/src/external/popt/build'
Makefile:102: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/build_wazuh/manager/wazuh-manager-4.3.10/src/external/popt/build'
Makefile:1106: recipe for target 'external/popt/build/output/src/.libs/libpopt.a' failed
make[2]: *** [external/popt/build/output/src/.libs/libpopt.a] Error 2

So, I can not build wazuh-manager debian package. 
I use this command to get the dependencies:
make deps TARGET=server EXTERNAL_SRC_ONLY=yes

Jose Luis Carreras Marin

unread,
Apr 16, 2024, 5:21:07 AM4/16/24
to Wazuh | Mailing List
Hello Dai

Looking at the warning logs you have obtained, it seems that some dependencies are missing in the Docker image that is being used in the generation script.
In the command you have passed, I see that you are using the --dont-build-dockerm option, this option causes that during the script the docker image is not built, but a previously generated local image is used (with the name deb_manager_builder_amd64), it seems that the image you are using does not have the dependencies you need, can you try to run the script without that parameter? This way we can check if building the image again this time all the dependencies are installed correctly.
If you find any other problem don't hesitate to send me as much related info and I will try to help you as much as possible.

Best regards
Jose

Dai Nguyen

unread,
Apr 16, 2024, 7:03:23 AM4/16/24
to Wazuh | Mailing List
Hello Jose,
I built docker image previously.
I run a docker by this command:
sudo docker exec -it container_id bash
So, in the docker, I check automake and aclocal command line, It's just have aclocal-1.14 not 1.16 and automake 1.14 not 1.15.
err.jpg
So, that's why I got this error. 
Here is the Dockerfile:
dockerfile.jpg
Vào lúc 16:21:07 UTC+7 ngày Thứ Ba, 16 tháng 4, 2024, Jose Luis Carreras Marin đã viết:

Jose Luis Carreras Marin

unread,
Apr 17, 2024, 5:32:17 AM4/17/24
to Wazuh | Mailing List
Hello Dai
You can try to update the versions of those dependencies and run the script again. It seems that these versions of Wazuh package have been somewhat outdated, surely certain updates of the operating systems have modified the dependencies that Wazuh needs to compile.
Try to update them and try again, if you still encounter problems, send me the logs you find and I will be happy to help you.
If necessary, send me also the Dockerfile you are using to make it easier to reproduce the error in local environments.

Regards
Jose
Reply all
Reply to author
Forward
0 new messages