-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Generate Wazuh symbols for macOS, linux and windows and upload along with installation package. #23760
base: 4.10.0
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wazuh agent/WPK workflows are stored in a different repository, blocking this PR as it does not seem to be fully updated
Workflows running successfully:
|
Workflow runsDebhttps://github.com/wazuh/wazuh/actions/runs/9488184763 Deb with checksumhttps://github.com/wazuh/wazuh/actions/runs/9488185487 Deb with production nomenclaturehttps://github.com/wazuh/wazuh/actions/runs/9488186979 Rpmhttps://github.com/wazuh/wazuh/actions/runs/9488188830 Rpm with checksumhttps://github.com/wazuh/wazuh/actions/runs/9488189877 Rpm with production nomenclature |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add GHA runs for the following cases:
- Wazuh manager RPM (all archs)
- Wazuh manager DEB (all archs)
For every system and arch listed, add a build where the following parameters have:
- Case 1
- is_stage = true
- checksum = true
- Case 2
- is_stage = false
- checksum = false
- Case 3
- is_stage = true
- checksum = false
- Case 4
- is_stage = false
- checksum = true
Also, is the debug input needed now?
echo "PACKAGE_NAME=$(find /tmp -maxdepth 1 -type f -name *manager_*.${{ inputs.system }} -exec basename {} 2>/dev/null \;)" | tee -a $GITHUB_ENV | ||
echo "PACKAGE_SYMBOLS_NAME=$(find /tmp -maxdepth 1 -type f -name *manager-*.${{ inputs.system }} -exec basename {} 2>/dev/null \;)" | tee -a $GITHUB_ENV |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a is_stage=true
build to #23760 (comment), we need to be sure that the production nomenclature generation works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are 4.8.0 agent references in a 4.9.0 manager package generation, this is not correct
cpio: wazuh-agent-4.8.0/src/external/libarchive/libarchive/archive_write_set_options.c: Cannot stat: No such file or directory
cpio: wazuh-agent-4.8.0/src/external/libarchive/libarchive/archive_write_set_passphrase.c: Cannot stat: No such file or directory
cpio: wazuh-agent-4.8.0/src/external/libarchive/libarchive/archive_xxhash.h: Cannot stat: No such file or directory
cpio: wazuh-agent-4.8.0/src/external/libarchive/libarchive/filter_fork.h: Cannot stat: No such file or directory
cpio: wazuh-agent-4.8.0/src/external/libarchive/libarchive/filter_fork_posix.c: Cannot stat: No such file or directory
cpio: wazuh-agent-4.8.0/src/external/libarchive/libarchive/xxhash.c: Cannot stat: No such file or directory
23812 blocks
+ exit 0
Processing files: wazuh-manager-4.9.0-test9913.x86_64
warning: File listed twice: /var/ossec/wodles/aws
warning: File listed twice: /var/ossec/wodles/aws/__init__.py
warning: File listed twice: /var/ossec/wodles/aws/aws-s3
warning: File listed twice: /var/ossec/wodles/aws/aws-s3.py
warning: File listed twice: /var/ossec/wodles/aws/aws_tools.py
packages/build.sh
Outdated
@@ -118,4 +118,4 @@ build_deps $legacy | |||
build_package $package_name $debug "$short_commit_hash" "$wazuh_version" | |||
|
|||
# Post-processing | |||
get_package_and_checksum $wazuh_version $short_commit_hash $src | |||
get_package_and_checksum $wazuh_version $short_commit_hash $src |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
End line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
export SRC_NAME=$(ls -R ${rpm_build_dir}/SRPMS | grep "\.src\.rpm$") | ||
|
||
if [[ "${checksum}" == "yes" ]]; then | ||
cd "${rpm_build_dir}/RPMS" && sha512sum $RPM_NAME > /var/local/wazuh/$RPM_NAME.sha512 | ||
if [[ "${src}" == "yes" ]]; then | ||
cd "${rpm_build_dir}/SRPMS" && sha512sum $SRC_NAME > /var/local/wazuh/$SRC_NAME.sha512 | ||
sha512sum $SYMBOLS_NAME > /var/local/wazuh/$SYMBOLS_NAME.sha512 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the debug sha512sum file supposed to be uploaded too?
packages/wpk/generate_wpk_package.sh
Outdated
@@ -264,4 +264,4 @@ function main() { | |||
return 0 | |||
} | |||
|
|||
main "$@" | |||
main "$@" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
End line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -141,5 +141,6 @@ def test_agentd_state_config(test_configuration, test_metadata, remove_state_fil | |||
|
|||
# Follow ossec.log to find desired messages by a callback | |||
wazuh_log_monitor = FileMonitor(WAZUH_LOG_PATH) | |||
time.sleep(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I seem to recall this was needed because the test was failing due to a timing issue of some sort.
fd280b7
to
533bb13
Compare
533bb13
to
8c27b18
Compare
UpdateRPM
I have tested the manager and agent packages without problems in centos 7. The problem occurred in centos 5. Although the processes did not have the symbols, the libraries did, this caused the RPM package of the centos 5 agent to double its size. Analysis of this problem led to the determination that not only did the makefile have errors, but that CMake builds libraries with symbols regardless of the operating system. # ls -lh output/**
output/debug:
total 366M
-rw-r--r-- 1 root root 15M Jul 23 16:23 wazuh-agent-debuginfo_4.10.0-0_x86_64_f63e9e9.rpm
-rw-r--r-- 1 root root 22M Jul 23 16:27 wazuh-agent_4.10.0-0.el5_x86_64_f63e9e99dfd.rpm
-rw-r--r-- 1 root root 11M Jul 23 16:23 wazuh-agent_4.10.0-0_x86_64_f63e9e9.rpm
-rw-r--r-- 1 root root 33M Jul 23 16:16 wazuh-manager-debuginfo_4.10.0-0_x86_64_f63e9e9.rpm
-rw-r--r-- 1 root root 287M Jul 23 16:20 wazuh-manager_4.10.0-0_x86_64_f63e9e9.rpm
output/release:
total 365M
-rw-r--r-- 1 root root 20M Jul 23 17:21 wazuh-agent-debuginfo_4.10.0-0_x86_64_f63e9e9.rpm
-rw-r--r-- 1 root root 19M Jul 23 17:25 wazuh-agent_4.10.0-0.el5_x86_64_f63e9e99dfd.rpm
-rw-r--r-- 1 root root 8.9M Jul 23 17:21 wazuh-agent_4.10.0-0_x86_64_f63e9e9.rpm
-rw-r--r-- 1 root root 32M Jul 23 17:12 wazuh-manager-debuginfo_4.10.0-0_x86_64_f63e9e9.rpm
-rw-r--r-- 1 root root 286M Jul 23 17:16 wazuh-manager_4.10.0-0_x86_64_f63e9e9.rpm |
Generate Wazuh symbols for macOS, linux and windows and upload along with installation package. Co-authored-by: Ariel Martin <ariel.martin@wazuh.com> Co-authored-by: Marcel Kemp Muñoz <marcel.kemp@wazuh.com> Co-authored-by: Manuel <manuel.cano@wazuh.com> Co-authored-by: Raul Del Pozo Moreno <raul.delpozo@wazuh.com> Co-authored-by: Norberto Vicchi <nvicchi@gmail.com>
- Fixes optimizations in RPM builds - Fixes package building in centos 5 including debug mode - Correctly split packeages with symbols for centos >= 6
f63e9e9
to
115577f
Compare
Description
Configuration options
Logs/Alerts example
Tests