Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add debug symbols to RPMs packages #2880

Conversation

Leoquicenoz
Copy link

@Leoquicenoz Leoquicenoz commented Mar 13, 2024

Related issue
#2866

Description

It is intended to implement the necessary changes to create the new symbol packages for manager and agent, which can be installed on the endpoint when appropriate.

Logs example

tail of build output ./generate_rpm_package.sh -b 4.9.0 --packages-branch 2866-add-debug-symbols-to-rpms -t agent

.
.
.
Wrote: /build_wazuh/rpmbuild/SRPMS/wazuh-agent-4.9.0-1.src.rpm
Wrote: /build_wazuh/rpmbuild/RPMS/x86_64/wazuh-agent-4.9.0-1.x86_64.rpm
Wrote: /build_wazuh/rpmbuild/RPMS/x86_64/wazuh-agent-debuginfo-4.9.0-1.x86_64.rpm
Executing(%clean): /bin/sh -e /usr/local/var/tmp/rpm-tmp.KmjjIm
+ umask 022
+ cd /build_wazuh/rpmbuild/BUILD
+ cd wazuh-agent-4.9.0
+ rm -fr /build_wazuh/rpmbuild/BUILDROOT/wazuh-agent-4.9.0-1.x86_64
+ RPM_EC=0
++ jobs -p
+ exit 0
+ [[ no == \y\e\s ]]
+ [[ no == \y\e\s ]]
+ find /build_wazuh/rpmbuild/RPMS/x86_64 -maxdepth 3 -type f -name 'wazuh-agent-4.9.0-1*' -exec mv '{}' /var/local/wazuh ';'
+ find /build_wazuh/rpmbuild/RPMS/x86_64 -maxdepth 3 -type f -name 'wazuh-agent-debuginfo-4.9.0-1*' -exec mv '{}' /var/local/wazuh ';'
Package wazuh-agent-4.9.0-1.x86_64.rpm wazuh-agent-debuginfo-4.9.0-1.x86_64.rpm  added to /wazuh-packages/rpms/output/.         

packages files generated

-rw-r--r-- 1 root root  33341592 mar 13 23:00 wazuh-manager-debuginfo-4.9.0-1.x86_64.rpm
-rw-r--r-- 1 root root 290462588 mar 13 23:03 wazuh-manager-4.9.0-1.x86_64.rpm
-rw-r--r-- 1 root root  10928373 mar 14 00:35 wazuh-agent-4.9.0-1.x86_64.rpm
-rw-r--r-- 1 root root  15109004 mar 14 00:35 wazuh-agent-debuginfo-4.9.0-1.x86_64.rpm                                                                                                                    

wazuh-agent-debuginfo install example

[vagrant@localhost ~]$ rpm -qil wazuh-agent-debuginfo-4.9.0-1.x86_64
Name        : wazuh-agent-debuginfo
Version     : 4.9.0
Release     : 1
Architecture: x86_64
Install Date: Thu Mar 14 06:10:19 2024
Group       : Development/Debug
Size        : 58253512
License     : GPL
Signature   : (none)
Source RPM  : wazuh-agent-4.9.0-1.src.rpm
Build Date  : Thu Mar 14 05:33:56 2024
Build Host  : 40005129ff86
Relocations : (not relocatable)
Packager    : Wazuh, Inc <info@wazuh.com>
Vendor      : Wazuh, Inc <info@wazuh.com>
URL         : https://www.wazuh.com/
Summary     : Debug information for package wazuh-agent
Description :
This package provides debug information for package wazuh-agent.
Debug information is useful when developing applications that use this
package or when debugging this package.
/usr/lib/debug
/usr/lib/debug/var
/usr/lib/debug/var/ossec
/usr/lib/debug/var/ossec/active-response
/usr/lib/debug/var/ossec/active-response/bin
/usr/lib/debug/var/ossec/active-response/bin/default-firewall-drop.debug
/usr/lib/debug/var/ossec/active-response/bin/disable-account.debug
/usr/lib/debug/var/ossec/active-response/bin/firewall-drop.debug
/usr/lib/debug/var/ossec/active-response/bin/firewalld-drop.debug
/usr/lib/debug/var/ossec/active-response/bin/host-deny.debug
/usr/lib/debug/var/ossec/active-response/bin/ip-customblock.debug
/usr/lib/debug/var/ossec/active-response/bin/ipfw.debug
/usr/lib/debug/var/ossec/active-response/bin/kaspersky.debug
/usr/lib/debug/var/ossec/active-response/bin/npf.debug
/usr/lib/debug/var/ossec/active-response/bin/pf.debug
/usr/lib/debug/var/ossec/active-response/bin/restart-wazuh.debug
/usr/lib/debug/var/ossec/active-response/bin/route-null.debug
/usr/lib/debug/var/ossec/active-response/bin/wazuh-slack.debug
/usr/lib/debug/var/ossec/bin
/usr/lib/debug/var/ossec/bin/agent-auth.debug
/usr/lib/debug/var/ossec/bin/manage_agents.debug
/usr/lib/debug/var/ossec/bin/wazuh-agentd.debug
/usr/lib/debug/var/ossec/bin/wazuh-execd.debug
/usr/lib/debug/var/ossec/bin/wazuh-logcollector.debug
/usr/lib/debug/var/ossec/bin/wazuh-modulesd.debug
/usr/lib/debug/var/ossec/bin/wazuh-syscheckd.debug
/usr/lib/debug/var/ossec/lib
/usr/lib/debug/var/ossec/lib/libdbsync.so.debug
/usr/lib/debug/var/ossec/lib/libfimdb.so.debug
/usr/lib/debug/var/ossec/lib/libgcc_s.so.1.debug
/usr/lib/debug/var/ossec/lib/librsync.so.debug
/usr/lib/debug/var/ossec/lib/libstdc++.so.6.debug
/usr/lib/debug/var/ossec/lib/libsyscollector.so.debug
/usr/lib/debug/var/ossec/lib/libsysinfo.so.debug
/usr/lib/debug/var/ossec/lib/libwazuhext.so.debug
/usr/lib/debug/var/ossec/lib/libwazuhshared.so.debug
/usr/src/debug/wazuh-agent-4.9.0
/usr/src/debug/wazuh-agent-4.9.0/src
/usr/src/debug/wazuh-agent-4.9.0/src/active-response
/usr/src/debug/wazuh-agent-4.9.0/src/active-response/active_responses.c
/usr/src/debug/wazuh-agent-4.9.0/src/active-response/active_responses.h
/usr/src/debug/wazuh-agent-4.9.0/src/active-response/disable-account.c
/usr/src/debug/wazuh-agent-4.9.0/src/active-response/firewalld-drop.c
/usr/src/debug/wazuh-agent-4.9.0/src/active-response/firewalls
/usr/src/debug/wazuh-agent-4.9.0/src/active-response/firewalls/default-firewall-drop.c
/usr/src/debug/wazuh-agent-4.9.0/src/active-response/firewalls/ipfw.c
/usr/src/debug/wazuh-agent-4.9.0/src/active-response/firewalls/npf.c
/usr/src/debug/wazuh-agent-4.9.0/src/active-response/firewalls/pf.c
/usr/src/debug/wazuh-agent-4.9.0/src/active-response/host-deny.c
/usr/src/debug/wazuh-agent-4.9.0/src/active-response/ip-customblock.c
/usr/src/debug/wazuh-agent-4.9.0/src/active-response/kaspersky.c
/usr/src/debug/wazuh-agent-4.9.0/src/active-response/restart-wazuh.c
/usr/src/debug/wazuh-agent-4.9.0/src/active-response/route-null.c
/usr/src/debug/wazuh-agent-4.9.0/src/active-response/wazuh-slack.c
/usr/src/debug/wazuh-agent-4.9.0/src/addagent
/usr/src/debug/wazuh-agent-4.9.0/src/addagent/main.c
/usr/src/debug/wazuh-agent-4.9.0/src/addagent/manage_agents.c
/usr/src/debug/wazuh-agent-4.9.0/src/addagent/manage_agents.h
/usr/src/debug/wazuh-agent-4.9.0/src/addagent/manage_keys.c
/usr/src/debug/wazuh-agent-4.9.0/src/addagent/read_from_user.c
/usr/src/debug/wazuh-agent-4.9.0/src/addagent/validate.c
/usr/src/debug/wazuh-agent-4.9.0/src/analysisd
/usr/src/debug/wazuh-agent-4.9.0/src/analysisd/active-response.h
/usr/src/debug/wazuh-agent-4.9.0/src/analysisd/cdb
/usr/src/debug/wazuh-agent-4.9.0/src/analysisd/cdb/cdb.h
/usr/src/debug/wazuh-agent-4.9.0/src/analysisd/cdb/uint32.h
/usr/src/debug/wazuh-agent-4.9.0/src/analysisd/decoders
/usr/src/debug/wazuh-agent-4.9.0/src/analysisd/decoders/decoder.h
/usr/src/debug/wazuh-agent-4.9.0/src/analysisd/eventinfo.h
/usr/src/debug/wazuh-agent-4.9.0/src/analysisd/lists.h
/usr/src/debug/wazuh-agent-4.9.0/src/analysisd/logmsg.c
/usr/src/debug/wazuh-agent-4.9.0/src/analysisd/logmsg.h
/usr/src/debug/wazuh-agent-4.9.0/src/analysisd/rules.h
/usr/src/debug/wazuh-agent-4.9.0/src/client-agent
/usr/src/debug/wazuh-agent-4.9.0/src/client-agent/agcom.c
/usr/src/debug/wazuh-agent-4.9.0/src/client-agent/agentd.c
/usr/src/debug/wazuh-agent-4.9.0/src/client-agent/agentd.h
/usr/src/debug/wazuh-agent-4.9.0/src/client-agent/buffer.c
/usr/src/debug/wazuh-agent-4.9.0/src/client-agent/config.c
/usr/src/debug/wazuh-agent-4.9.0/src/client-agent/event-forward.c
/usr/src/debug/wazuh-agent-4.9.0/src/client-agent/main.c
/usr/src/debug/wazuh-agent-4.9.0/src/client-agent/notify.c
/usr/src/debug/wazuh-agent-4.9.0/src/client-agent/receiver.c
/usr/src/debug/wazuh-agent-4.9.0/src/client-agent/request.c
/usr/src/debug/wazuh-agent-4.9.0/src/client-agent/restart_agent.c
/usr/src/debug/wazuh-agent-4.9.0/src/client-agent/rotate_log.c
/usr/src/debug/wazuh-agent-4.9.0/src/client-agent/sendmsg.c
/usr/src/debug/wazuh-agent-4.9.0/src/client-agent/start_agent.c
/usr/src/debug/wazuh-agent-4.9.0/src/client-agent/state.c
/usr/src/debug/wazuh-agent-4.9.0/src/client-agent/state.h
/usr/src/debug/wazuh-agent-4.9.0/src/config
/usr/src/debug/wazuh-agent-4.9.0/src/config/active-response.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/active-response.h
/usr/src/debug/wazuh-agent-4.9.0/src/config/agentlessd-config.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/agentlessd-config.h
/usr/src/debug/wazuh-agent-4.9.0/src/config/alerts-config.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/authd-config.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/authd-config.h
/usr/src/debug/wazuh-agent-4.9.0/src/config/buffer-config.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/client-config.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/client-config.h
/usr/src/debug/wazuh-agent-4.9.0/src/config/cluster-config.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/config.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/csyslogd-config.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/csyslogd-config.h
/usr/src/debug/wazuh-agent-4.9.0/src/config/dbd-config.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/dbd-config.h
/usr/src/debug/wazuh-agent-4.9.0/src/config/email-alerts-config.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/global-config.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/global-config.h
/usr/src/debug/wazuh-agent-4.9.0/src/config/integrator-config.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/integrator-config.h
/usr/src/debug/wazuh-agent-4.9.0/src/config/labels-config.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/localfile-config.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/localfile-config.h
/usr/src/debug/wazuh-agent-4.9.0/src/config/logtest-config.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/logtest-config.h
/usr/src/debug/wazuh-agent-4.9.0/src/config/mail-config.h
/usr/src/debug/wazuh-agent-4.9.0/src/config/remote-config.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/remote-config.h
/usr/src/debug/wazuh-agent-4.9.0/src/config/reports-config.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/reports-config.h
/usr/src/debug/wazuh-agent-4.9.0/src/config/rootcheck-config.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/rootcheck-config.h
/usr/src/debug/wazuh-agent-4.9.0/src/config/rules-config.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/socket-config.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/syscheck-config.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/syscheck-config.h
/usr/src/debug/wazuh-agent-4.9.0/src/config/wmodules-agent-upgrade.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/wmodules-aws.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/wmodules-azure.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/wmodules-ciscat.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/wmodules-command.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/wmodules-config.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/wmodules-docker.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/wmodules-fluent.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/wmodules-gcp.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/wmodules-github.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/wmodules-ms-graph.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/wmodules-office365.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/wmodules-oscap.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/wmodules-osquery-monitor.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/wmodules-sca.c
/usr/src/debug/wazuh-agent-4.9.0/src/config/wmodules-syscollector.c
/usr/src/debug/wazuh-agent-4.9.0/src/data_provider
.
.
.                                                                                                                                                            
  • Build the package in any supported platform
    • Linux
    • Windows
    • macOS
    • Solaris
    • AIX
    • HP-UX
  • Package installation
  • Package upgrade
  • Package downgrade
  • Package remove
  • Package install/remove/install
  • Change added to CHANGELOG.md
  • Tests for Linux RPM
    • Build the package for x86_64
    • Build the package for i386
    • Build the package for armhf
    • Build the package for aarch64
    • %files section is correctly updated if necessary

@Leoquicenoz Leoquicenoz self-assigned this Mar 13, 2024
@Leoquicenoz Leoquicenoz force-pushed the 2866-add-debug-symbols-to-rpms branch 4 times, most recently from 1393276 to 1e4ec47 Compare March 14, 2024 06:24
@Leoquicenoz Leoquicenoz marked this pull request as ready for review March 14, 2024 06:26
@Leoquicenoz Leoquicenoz force-pushed the 2866-add-debug-symbols-to-rpms branch from 1e4ec47 to 98dffe0 Compare March 14, 2024 06:36
@Leoquicenoz Leoquicenoz changed the base branch from master to enhancement/9913-generate-debug-symbols March 14, 2024 06:40
@tdrauncieal
Copy link
Contributor

Please, can you share the command that you are using to run the first output?
$ ./generate_rpm_package.sh ...

@tdrauncieal
Copy link
Contributor

Trying to generate debug packages I get the next one error: image

this error was due the wrong branch name being supplied
full branch name is enhancement/9913-generate-debug-symbols

Copy link
Contributor

@ncvicchi ncvicchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tdrauncieal
Copy link
Contributor

Generate manager packages

$ ./generate_rpm_package.sh -b enhancement/9913-generate-debug-symbols -t manager -a amd64 -s /tmp/test2 --packages-branch 2866-add-debug-symbols-to-rpms                                                                                                                                                                                                                                    
[+] Building 158.0s (9/22)                                                                                                                                                                                                                                                                                                                                                                   
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                                                                                                                                                         
.                                                                                                                                                                                                                                                                                                                                                                                            
.                                                                                                                                                                                                                                                                                                                                                                                            
.                                                                                                                                                                                                                                                                                                                                                                                            
equires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1                                                                                                                                                                                                                                                               
Requires(pre): /bin/sh /usr/sbin/groupadd /usr/sbin/useradd                                                                                                                                                                                                                                                                                                                                  
Requires(post): /bin/sh                                                                                                                                                                                                                                                                                                                                                                      
Requires(preun): /bin/sh                                                                                                                                                                                                                                                                                                                                                                     
Requires(postun): /bin/sh /usr/sbin/groupdel /usr/sbin/userdel                                                                                                                                                                                                                                                                                                                               
Requires(posttrans): /bin/sh                                                                                                                                                                                                                                                                                                                                                                 
Conflicts: ossec-hids ossec-hids-agent wazuh-agent wazuh-local                                                                                                                                                                                                                                                                                                                               
Obsoletes: wazuh-api < 4.0.0                                                                                                                                                                                                                                                                                                                                                                 
Processing files: wazuh-manager-debuginfo-4.9.0-1.x86_64                                                                                                                                                                                                                                                                                                                                     
Provides: wazuh-manager-debuginfo = 4.9.0-1 wazuh-manager-debuginfo(x86-64) = 4.9.0-1                                                                                                                                                                                                                                                                                                        
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1                                                                                                                                                                                                                                                              
Checking for unpackaged file(s): /usr/local/lib/rpm/check-files /build_wazuh/rpmbuild/BUILDROOT/wazuh-manager-4.9.0-1.x86_64                                                                                                                                                                                                                                                                 
Wrote: /build_wazuh/rpmbuild/SRPMS/wazuh-manager-4.9.0-1.src.rpm                                                                                                                                                                                                                                                                                                                             
Wrote: /build_wazuh/rpmbuild/RPMS/x86_64/wazuh-manager-debuginfo-4.9.0-1.x86_64.rpm                                                                                                                                                                                                                                                                                                          
Wrote: /build_wazuh/rpmbuild/RPMS/x86_64/wazuh-manager-4.9.0-1.x86_64.rpm                                                                                                                                                                                                                                                                                                                    
Executing(%clean): /bin/sh -e /usr/local/var/tmp/rpm-tmp.a816Bo                                                                                                                                                                                                                                                                                                                              
+ umask 022                                                                                                                                                                                                                                                                                                                                                                                  
+ cd /build_wazuh/rpmbuild/BUILD                                                                                                                                                                                                                                                                                                                                                             
+ cd wazuh-manager-4.9.0                                                                                                                                                                                                                                                                                                                                                                     
+ rm -fr /build_wazuh/rpmbuild/BUILDROOT/wazuh-manager-4.9.0-1.x86_64                                                                                                                                                                                                                                                                                                                        
+ RPM_EC=0                                                                                                                                                                                                                                                                                                                                                                                   ++ jobs -p                                                                                                                                                                                                                                                                                                                                                                                   
+ exit 0                                                                                                                                                                                                                                                                                                                                                                                     
+ [[ no == \y\e\s ]]                                                                                                                                                                                                                                                                                                                                                                         
+ [[ no == \y\e\s ]]                                                                                                                                                                                                                                                                                                                                                                         
+ find /build_wazuh/rpmbuild/RPMS/x86_64 -maxdepth 3 -type f -name 'wazuh-manager-4.9.0-1*' -exec mv '{}' /var/local/wazuh ';'                                                                                                                                                                                                                                                               + find /build_wazuh/rpmbuild/RPMS/x86_64 -maxdepth 3 -type f -name 'wazuh-manager-debuginfo-4.9.0-1*' -exec mv '{}' /var/local/wazuh ';'                                                                                                                                                                                                                                                     
Package wazuh-manager-debuginfo-4.9.0-1.x86_64.rpm wazuh-manager-4.9.0-1.x86_64.rpm  added to /tmp/test2.                                                                                                                                                                                                                                                                                    

List generated manager packages

$ ll -tr /tmp/tests2                                                                                                                                                                                                                                                                                                                                                                         
-rw-r--r-- 1 root root  33329380 Mar 18 18:29 wazuh-manager-debuginfo-4.9.0-1.x86_64.rpm                                                                                                                                                                                                                                                                                                     -rw-r--r-- 1 root root 290441032 Mar 18 18:33 wazuh-manager-4.9.0-1.x86_64.rpm                                                                                                                                                                                                                                                                                                               

Generate agent packages

[+] Building 4.1s (23/23) FINISHED                                                                                                                                                                                                                                                                                                                                                            => [internal] load .dockerignore                                                                                                                                                              0.3s                                                                                                                                                                                          
=> => transferring context: 2B                                                                                                                                                                0.0s                                                                                                                                                                                           => [internal] load build definition from Dockerfile                                                                                                                                           0.5s                                                                                                                                                                                          
=> => transferring dockerfile: 3.37kB                                                                                                                                                         0.0s                                                                                                                                                                                           => [internal] load metadata for docker.io/library/centos:6                                                                                                                                    2.1s                                                                                                                                                                                           => [internal] load build context                                                                                                                                                              0.2s                                                                                                                                                                                           => => transferring context: 5.49kB                                                                                                                                                            0.0s                                                                                                                                                                                           => [ 1/18] FROM docker.io/library/centos:6@sha256:a93df2e96e07f56ea48f215425c6f1673ab922927894595bb5c0ee4c5a955133                                                                            0.0s                                                                                                                                                                                          .                                                                                                                                                                                                                                                                                                                                                                                            
.                                                                                                                                                                                                                                                                                                                                                                                            .                                                                                                                                                                                                                                                                                                                                                                                            
.
warning: Missing build-id in /build_wazuh/rpmbuild/BUILDROOT/wazuh-agent-4.9.0-1.x86_64/usr/lib/debug/var/ossec/bin/manage_agents.debug                                                                                                                                                                                                                                                      warning: Missing build-id in /build_wazuh/rpmbuild/BUILDROOT/wazuh-agent-4.9.0-1.x86_64/usr/lib/debug/var/ossec/bin/agent-auth.debug                                                                                                                                                                                                                                                         
Provides: wazuh-agent-debuginfo = 4.9.0-1 wazuh-agent-debuginfo(x86-64) = 4.9.0-1                                                                                                                                                                                                                                                                                                            
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1                                                                                                                                                                                                                                                              
Checking for unpackaged file(s): /usr/local/lib/rpm/check-files /build_wazuh/rpmbuild/BUILDROOT/wazuh-agent-4.9.0-1.x86_64                                                                                                                                                                                                                                                                   
Wrote: /build_wazuh/rpmbuild/SRPMS/wazuh-agent-4.9.0-1.src.rpm                                                                                                                                                                                                                                                                                                                               
Wrote: /build_wazuh/rpmbuild/RPMS/x86_64/wazuh-agent-4.9.0-1.x86_64.rpm                                                                                                                                                                                                                                                                                                                      
Wrote: /build_wazuh/rpmbuild/RPMS/x86_64/wazuh-agent-debuginfo-4.9.0-1.x86_64.rpm                                                                                                                                                                                                                                                                                                            
Executing(%clean): /bin/sh -e /usr/local/var/tmp/rpm-tmp.Jc61Yn                                                                                                                                                                                                                                                                                                                              
+ umask 022                                                                                                                                                                                                                                                                                                                                                                                  
+ cd /build_wazuh/rpmbuild/BUILD                                                                                                                                                                                                                                                                                                                                                             
+ cd wazuh-agent-4.9.0                                                                                                                                                                                                                                                                                                                                                                       
+ rm -fr /build_wazuh/rpmbuild/BUILDROOT/wazuh-agent-4.9.0-1.x86_64                                                                                                                                                                                                                                                                                                                          
+ RPM_EC=0                                                                                                                                                                                                                                                                                                                                                                                   
++ jobs -p                                                                                                                                                                                                                                                                                                                                                                                   
+ exit 0                                                                                                                                                                                                                                                                                                                                                                                     
+ [[ no == \y\e\s ]]                                                                                                                                                                                                                                                                                                                                                                         
+ [[ no == \y\e\s ]]                                                                                                                                                                                                                                                                                                                                                                         
+ oind /build_wazuh/rpmbuild/RPMS/x86_64 -maxdepth 3 -type f -name 'wazuh-agent-4.9.0-1*' -exec mv '{}' /var/local/wazuh ';'                                                                                                                                                                                                                                                                 
- find /build_wazuh/rpmbuild/RPMS/x86_64 -maxdepth 3 -type f -name 'wazuh-agent-debuginfo-4.9.0-1*' -exec mv '{}' /var/local/wazuh ';'                                                                                                                                                                                                                                                       
-ackage wazuh-agent-4.9.0-1.x86_64.rpm wazuh-agent-debuginfo-4.9.0-1.x86_64.rpm  added to /tmp/test.                                                                                                                                                                                                                                                                                         

List generated agent packages

$ ll /tmp/test/                                                                                                                                                                                                                                                                                                                                                                              
-rw-r--r-- 1 root root 10687681 Mar 18 13:15 wazuh-agent-4.9.0-1.x86_64.rpm                                                                                                                                                                                                                                                                                                                  
-rw-r--r-- 1 root root 15746884 Mar 18 13:15 wazuh-agent-debuginfo-4.9.0-1.x86_64.rpm                                                                                                                                                                                                                                                                                                        

LGTM!

@ncvicchi ncvicchi merged commit 110d9d5 into enhancement/9913-generate-debug-symbols Mar 18, 2024
51 checks passed
@ncvicchi ncvicchi deleted the 2866-add-debug-symbols-to-rpms branch March 18, 2024 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement debug symbol generation during the build process for Linux - RPM
3 participants