Skip to content

Commit

Permalink
Delete debug conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
Leoquicenoz committed Mar 8, 2024
1 parent 677da26 commit 5651dda
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
10 changes: 4 additions & 6 deletions rpms/SPECS/wazuh-manager.spec
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 3 additions & 7 deletions rpms/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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 \;

0 comments on commit 5651dda

Please sign in to comment.