Skip to content

Commit

Permalink
Rename the file with debuginfo
Browse files Browse the repository at this point in the history
  • Loading branch information
Leoquicenoz committed Mar 13, 2024
1 parent 5651dda commit 641782e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
15 changes: 11 additions & 4 deletions rpms/SPECS/wazuh-manager.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
%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 Expand Up @@ -37,9 +35,9 @@ log analysis, file integrity monitoring, intrusions detection and policy and com
# packages.
%global _build_id_links none

%package debuginfo
%package -n wazuh-manager-debuginfo
Summary: Debug information for package %{name}
%description debuginfo
%description -n wazuh-manager-debuginfo
This package provides debug information for package %{name}

%prep
Expand Down Expand Up @@ -192,6 +190,10 @@ install -m 0640 src/init/*.sh ${RPM_BUILD_ROOT}%{_localstatedir}/packages_files/
cp src/VERSION ${RPM_BUILD_ROOT}%{_localstatedir}/packages_files/manager_installation_scripts/src/
cp src/REVISION ${RPM_BUILD_ROOT}%{_localstatedir}/packages_files/manager_installation_scripts/src/

# Add debug symbols
mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/.symbols
cp src/symbols/* ${RPM_BUILD_ROOT}%{_localstatedir}/.symbols

exit 0

%pre
Expand Down Expand Up @@ -889,6 +891,11 @@ rm -fr %{buildroot}
%dir %attr(750, root, wazuh) %{_localstatedir}/wodles/gcloud
%attr(750, root, wazuh) %{_localstatedir}/wodles/gcloud/*


%files -n wazuh-agent-debuginfo
%dir %attr(750, root, root) %{_localstatedir}/.symbols
%attr(640, root, root) %{_localstatedir}/.symbols/*

%changelog
* Tue May 14 2024 support <[email protected]> - 4.9.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-9-0.html
Expand Down
4 changes: 2 additions & 2 deletions rpms/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ 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}-debuginfo"
symbols_file_name="wazuh-${build_target}-debuginfo-${wazuh_version}-${package_release}"
rpm_file="${file_name}.${architecture_target}.rpm"
symbols_rpm_file="${symbols_file_name}.${architecture_target}.rpm"
src_file="${file_name}.src.rpm"
Expand Down Expand Up @@ -136,4 +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 \;
find ${extract_path} -type f -name "${symbols_file_name}*" -exec mv {} /var/local/wazuh \;
2 changes: 1 addition & 1 deletion rpms/generate_rpm_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ build_rpm() {
${CHECKSUM} ${PACKAGES_BRANCH} ${USE_LOCAL_SPECS} ${SRC} \
${LEGACY} ${USE_LOCAL_SOURCE_CODE} ${FUTURE}|| return 1

echo "Package $(ls -Art ${OUTDIR} | tail -n 1) added to ${OUTDIR}."
echo "Package $(ls -Art ${OUTDIR} | tail -n 2) added to ${OUTDIR}."

return 0
}
Expand Down

0 comments on commit 641782e

Please sign in to comment.