From 5651dda3294b0444ef5ef7cf1ce88d9844ea8f15 Mon Sep 17 00:00:00 2001 From: Leonardo Quiceno Date: Thu, 7 Mar 2024 18:28:03 -0500 Subject: [PATCH] Delete debug conditional --- rpms/SPECS/wazuh-manager.spec | 10 ++++------ rpms/build.sh | 10 +++------- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/rpms/SPECS/wazuh-manager.spec b/rpms/SPECS/wazuh-manager.spec index b57c2ef8aa..59df5a2d48 100644 --- a/rpms/SPECS/wazuh-manager.spec +++ b/rpms/SPECS/wazuh-manager.spec @@ -1,9 +1,7 @@ -%if %{_debugenabled} == yes - %global _enable_debug_package 1 - %global debug_package %{_rpmfilename debuginfo} - %global __os_install_post %{nil} - %define __strip /bin/true -%endif +%global _enable_debug_package 1 +%global debug_package %{_rpmfilename debuginfo} +%global __os_install_post %{nil} +%define __strip /bin/true Summary: Wazuh helps you to gain security visibility into your infrastructure by monitoring hosts at an operating system and application level. It provides the following capabilities: log analysis, file integrity monitoring, intrusions detection and policy and compliance monitoring Name: wazuh-manager diff --git a/rpms/build.sh b/rpms/build.sh index 7707e5dc0a..9164a2b5bf 100755 --- a/rpms/build.sh +++ b/rpms/build.sh @@ -31,11 +31,6 @@ if [ -z "${package_release}" ]; then package_release="1" fi -if [ "${debug}" = "no" ]; then - disable_debug_flag='%debug_package %{nil}' - echo ${disable_debug_flag} > /etc/rpm/macros -fi - if [ ${build_target} = "api" ]; then if [ "${local_source_code}" = "no" ]; then curl -sL https://github.com/wazuh/wazuh-api/tarball/${wazuh_branch} | tar zx @@ -52,9 +47,9 @@ fi build_dir=/build_wazuh rpm_build_dir=${build_dir}/rpmbuild file_name="wazuh-${build_target}-${wazuh_version}-${package_release}" -symbols_file_name="wazuh-${build_target}-${wazuh_version}-${package_release}" +symbols_file_name="wazuh-${build_target}-${wazuh_version}-${package_release}-debuginfo" rpm_file="${file_name}.${architecture_target}.rpm" -symbols_rpm_file="${symbols_file_name}-dbg.${architecture_target}.rpm" +symbols_rpm_file="${symbols_file_name}.${architecture_target}.rpm" src_file="${file_name}.src.rpm" pkg_path="${rpm_build_dir}/RPMS/${architecture_target}" src_path="${rpm_build_dir}/SRPMS" @@ -141,3 +136,4 @@ if [[ "${src}" == "yes" ]]; then fi find ${extract_path} -maxdepth 3 -type f -name "${file_name}*" -exec mv {} /var/local/wazuh \; +find ${extract_path} -type f -name "*-debuginfo*" -exec mv {} /var/local/wazuh \;