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 14, 2024
1 parent 6190d04 commit 98dffe0
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
19 changes: 9 additions & 10 deletions rpms/SPECS/wazuh-agent.spec
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
%if %{_debugenabled} == yes
%global _enable_debug_package 1
%global debug_package %{_rpmfilename debuginfo}
%global __os_install_post %{nil}
%define __strip /bin/true
%endif
%define _debugenabled yes

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-agent
Expand Down Expand Up @@ -35,10 +30,12 @@ Wazuh helps you to gain security visibility into your infrastructure by monitori
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

%package debuginfo
Summary: Debug information for package %{name}
%description debuginfo
This package provides debug information for package %{name}
# Build debuginfo package
%debug_package
%package wazuh-agent-debuginfo
Summary: Debug information for package %{name}.
%description wazuh-agent-debuginfo
his package provides debug information for package %{name}.

%prep
%setup -q
Expand Down Expand Up @@ -194,6 +191,8 @@ install -m 0640 src/init/*.sh ${RPM_BUILD_ROOT}%{_localstatedir}/packages_files/
cp src/VERSION ${RPM_BUILD_ROOT}%{_localstatedir}/packages_files/agent_installation_scripts/src/
cp src/REVISION ${RPM_BUILD_ROOT}%{_localstatedir}/packages_files/agent_installation_scripts/src/

%{_rpmconfigdir}/find-debuginfo.sh

exit 0

%pre
Expand Down
17 changes: 9 additions & 8 deletions rpms/SPECS/wazuh-manager.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
%global _enable_debug_package 1
%global debug_package %{_rpmfilename debuginfo}
%global __os_install_post %{nil}
%define __strip /bin/true
%define _debugenabled yes

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,10 +34,12 @@ log analysis, file integrity monitoring, intrusions detection and policy and com
# packages.
%global _build_id_links none

%package debuginfo
Summary: Debug information for package %{name}
%description debuginfo
This package provides debug information for package %{name}
# Build debuginfo package
%debug_package
%package wazuh-manager-debuginfo
Summary: Debug information for package %{name}.
%description wazuh-agent-debuginfo
his package provides debug information for package %{name}.

%prep
%setup -q
Expand Down Expand Up @@ -192,6 +191,8 @@ 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/

%{_rpmconfigdir}/find-debuginfo.sh

exit 0

%pre
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} -maxdepth 3 -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 | tr '\n' ' ') added to ${OUTDIR}."

return 0
}
Expand Down

0 comments on commit 98dffe0

Please sign in to comment.