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

Merge 4.8.2 into 4.9.0 #2897

Merged
merged 16 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions hp-ux/generate_wazuh_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,10 @@ create_package() {
VERSION=`cat /tmp/VERSION`
rm ${install_path}/wodles/oscap/content/*.xml
wazuh_version=`echo "${wazuh_version}" | cut -d v -f 2`
pkg_name="wazuh-agent-${wazuh_version}-${wazuh_revision}-hpux-11v3-ia64.tar"
tar cvpf ${target_dir}/${pkg_name} ${install_path} /sbin/init.d/wazuh-agent /sbin/rc2.d/S97wazuh-agent /sbin/rc3.d/S97wazuh-agent
pkg_tar_file="wazuh-agent-${wazuh_version}-${wazuh_revision}-hpux-11v3-ia64.tar"
tar cvpf ${target_dir}/${pkg_tar_file} ${install_path} /sbin/init.d/wazuh-agent /sbin/rc2.d/S97wazuh-agent /sbin/rc3.d/S97wazuh-agent
pkg_name="${pkg_tar_file}.gz"
gzip ${target_dir}/${pkg_tar_file}

if [ "${compute_checksums}" = "yes" ]; then
cd ${target_dir}
Expand Down Expand Up @@ -210,11 +212,11 @@ show_help() {
echo
echo "Usage: $0 [OPTIONS]"
echo
echo " -e Install all the packages necessaries to build the TAR package"
echo " -e Install all the packages necessaries to build the package"
echo " -b <branch> Select Git branch. Example v3.5.0"
echo " -s <tar_directory> Directory to store the resulting tar package. By default, an output folder will be created."
echo " -p <tar_home> Installation path for the package. By default: /var"
echo " -c, --checksum Compute the SHA512 checksum of the TAR package."
echo " -s <pkg_directory> Directory to store the resulting package. By default, an output folder will be created."
echo " -p <pkg_home> Installation path for the package. By default: /var"
echo " -c, --checksum Compute the SHA512 checksum of the package."
echo " -d <path_to_depot>, --depot Change the path to depothelper package (by default current path)."
echo " -h Shows this help"
echo
Expand Down
6 changes: 3 additions & 3 deletions rpms/SPECS/wazuh-manager.spec
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ rm -fr %{buildroot}
%attr(640, wazuh, wazuh) %ghost %{_localstatedir}/logs/integrations.log
%attr(660, wazuh, wazuh) %ghost %{_localstatedir}/logs/ossec.log
%attr(660, wazuh, wazuh) %ghost %{_localstatedir}/logs/ossec.json
%dir %attr(750, wazuh, wazuh) %{_localstatedir}/templates
%dir %attr(440, root, wazuh) %{_localstatedir}/templates
%attr(0440, root, wazuh) %{_localstatedir}/templates/vd_states_template.json
%dir %attr(750, wazuh, wazuh) %{_localstatedir}/logs/api
%dir %attr(750, wazuh, wazuh) %{_localstatedir}/logs/archives
Expand Down Expand Up @@ -761,8 +761,8 @@ rm -fr %{buildroot}
%dir %attr(770, wazuh, wazuh) %{_localstatedir}/queue/rids
%dir %attr(770, wazuh, wazuh) %{_localstatedir}/queue/tasks
%dir %attr(770, wazuh, wazuh) %{_localstatedir}/queue/sockets
%dir %attr(770, wazuh, wazuh) %{_localstatedir}/queue/vd
%dir %attr(770, wazuh, wazuh) %{_localstatedir}/queue/indexer
%dir %attr(660, root, wazuh) %{_localstatedir}/queue/vd
%dir %attr(660, root, wazuh) %{_localstatedir}/queue/indexer
%dir %attr(770, wazuh, wazuh) %{_localstatedir}/queue/router
%dir %attr(750, wazuh, wazuh) %{_localstatedir}/queue/logcollector
%dir %attr(750, wazuh, wazuh) %{_localstatedir}/queue/keystore
Expand Down
6 changes: 5 additions & 1 deletion rpms/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ src_file="${file_name}.src.rpm"
pkg_path="${rpm_build_dir}/RPMS/${architecture_target}"
src_path="${rpm_build_dir}/SRPMS"
extract_path="${pkg_path}"
ssl_flag=""
mkdir -p ${rpm_build_dir}/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}

# Prepare the sources directory to build the source tar.gz
Expand All @@ -68,7 +69,10 @@ cp -R wazuh-* ${build_dir}/${package_name}
if [ "${use_local_specs}" = "no" ]; then
specs_path="/downloaded_tmp_specs"
mkdir -p "${specs_path}"
curl -L "https://raw.githubusercontent.com/wazuh/wazuh-packages/${wazuh_packages_branch}/rpms/SPECS/wazuh-${build_target}.spec" -o "${specs_path}/wazuh-${build_target}.spec"
if [ "${legacy}" = "yes" ]; then
ssl_flag+="-k"
fi
curl -L "https://raw.githubusercontent.com/wazuh/wazuh-packages/${wazuh_packages_branch}/rpms/SPECS/wazuh-${build_target}.spec" -o "${specs_path}/wazuh-${build_target}.spec" ${ssl_flag}
else
specs_path="/specs"
fi
Expand Down
4 changes: 2 additions & 2 deletions stack/dashboard/base/builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ sed -i "s/navigateToApp(\"home\")/navigateToApp(\"${app_home}\")/g" ./src/core/t
# Define categories
category_explore='{id:"explore",label:"Explore",order:100,euiIconType:"search"}'
category_indexer_management='{id:"management",label:"Indexer management",order:5e3,euiIconType:"managementApp"}'
category_dashboard_management='{id:"wz-category-dashboard-management",label:"Dashboard management",order:700,euiIconType:"dashboardApp"}'
category_dashboard_management='{id:"wz-category-dashboard-management",label:"Dashboard management",order:6e3,euiIconType:"dashboardApp"}'

# Add custom categories (explore) to the built-in
sed -i -e "s|DEFAULT_APP_CATEGORIES=Object.freeze({|DEFAULT_APP_CATEGORIES=Object.freeze({explore:${category_explore},|" ./src/core/target/public/core.entry.js
Expand Down Expand Up @@ -239,7 +239,7 @@ app_order_dev_tools=9050
sed -i -e "s|order:9070|order:${app_order_dev_tools}|g" ./src/plugins/dev_tools/target/public/devTools.plugin.js

# Replace app order to Dashboard management app
app_order_dashboard_management=701
app_order_dashboard_management=10001
sed -i -e "s|order:9030|order:${app_order_dashboard_management}|g" ./src/plugins/management/target/public/management.plugin.js

# Replace app order to Security app
Expand Down
2 changes: 1 addition & 1 deletion unattended_installer/install_functions/dashboard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function dashboard_changePort() {

chosen_port="$1"
http_port="${chosen_port}"
wazuh_dashboard_ports=( "${http_port}" )
wazuh_dashboard_port=( "${http_port}" )
wazuh_aio_ports=(9200 9300 1514 1515 1516 55000 "${http_port}")

sed -i 's/server\.port: [0-9]\+$/server.port: '"${chosen_port}"'/' "$0"
Expand Down
Loading