Skip to content

Commit

Permalink
Merge branch '4.9.0' into merge-4.9.0-into-master
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelKemp committed Apr 30, 2024
2 parents 371c0d0 + 2e70e00 commit ae2e57d
Show file tree
Hide file tree
Showing 18 changed files with 83 additions and 73 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/password-tool.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Password tool script tests
on:
pull_request:
paths:
- 'unattended_installer/passwords_tool/**'
# Because from 4.9.0 this script is migrated to a new repository, the tests of this script will not be executed.
# name: Password tool script tests
# on:
# pull_request:
# paths:
# - 'unattended_installer/passwords_tool/**'

jobs:
Build-password-tool-and-wazuh-install-scripts:
Expand All @@ -14,15 +15,15 @@ jobs:
run: |
bash builder.sh -p
bash builder.sh -i -d staging
shell: bash
shell: bash
- uses: actions/upload-artifact@v3
with:
name: scripts
path: |
path: |
unattended_installer/wazuh-install.sh
unattended_installer/wazuh-passwords-tool.sh
if-no-files-found: error
if-no-files-found: error

test-password-tool-success:
runs-on: ubuntu-latest
needs: Build-password-tool-and-wazuh-install-scripts
Expand All @@ -34,11 +35,11 @@ jobs:
- name: Install wazuh
run: |
sudo bash wazuh-install.sh -a -v
- name: Uncompress wazuh install files
- name: Uncompress wazuh install files
run: sudo tar -xvf wazuh-install-files.tar
- name: Run script
run: sudo bash .github/actions/passwords-tool/tests-stack-success.sh

test-password-tool-failure:
runs-on: ubuntu-latest
needs: Build-password-tool-and-wazuh-install-scripts
Expand All @@ -50,7 +51,7 @@ jobs:
- name: Install wazuh
run: |
sudo bash wazuh-install.sh -a -v
- name: Uncompress wazuh install files
- name: Uncompress wazuh install files
run: sudo tar -xvf wazuh-install-files.tar
- name: Run script
run: sudo bash .github/actions/passwords-tool/tests-stack-failure.sh
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ All notable changes to this project will be documented in this file.

- https://github.com/wazuh/wazuh-packages/releases/tag/v4.8.0

## [4.7.4]

- https://github.com/wazuh/wazuh-packages/releases/tag/v4.7.4

## [4.7.3]

- https://github.com/wazuh/wazuh-packages/releases/tag/v4.7.3
Expand Down
9 changes: 4 additions & 5 deletions aix/SPECS/wazuh-agent-aix.spec
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Source0: %{name}-%{version}.tar.gz
Conflicts: ossec-hids ossec-hids-agent wazuh-manager wazuh-local
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Requires: bash
BuildRequires: coreutils automake autoconf libtool

%description
Expand Down Expand Up @@ -294,12 +295,10 @@ rm -fr %{buildroot}
- More info: https://documentation.wazuh.com/current/release-notes/release-5-0-0.html
* Tue May 14 2024 support <[email protected]> - 4.9.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-9-0.html
* Wed Apr 17 2024 support <[email protected]> - 4.8.2
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-2.html
* Wed Apr 03 2024 support <[email protected]> - 4.8.1
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-1.html
* Wed Mar 20 2024 support <[email protected]> - 4.8.0
* Thu May 09 2024 support <[email protected]> - 4.8.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-0.html
* Thu Apr 25 2024 support <[email protected]> - 4.7.4
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-4.html
* Tue Feb 27 2024 support <[email protected]> - 4.7.3
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-3.html
* Tue Jan 09 2024 support <[email protected]> - 4.7.2
Expand Down
8 changes: 7 additions & 1 deletion debs/SPECS/wazuh-agent/debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ wazuh-agent (4.8.0-RELEASE) stable; urgency=low

* More info: https://documentation.wazuh.com/current/release-notes/release-4-8-0.html

-- Wazuh, Inc <[email protected]> Wed, 20 Mar 2024 00:00:00 +0000
-- Wazuh, Inc <[email protected]> Thu, 09 May 2024 00:00:00 +0000

wazuh-agent (4.7.4-RELEASE) stable; urgency=low

* More info: https://documentation.wazuh.com/current/release-notes/release-4-7-4.html

-- Wazuh, Inc <[email protected]> Thu, 25 Apr 2024 00:00:00 +0000

wazuh-agent (4.7.3-RELEASE) stable; urgency=low

Expand Down
8 changes: 7 additions & 1 deletion debs/SPECS/wazuh-manager/debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ wazuh-manager (4.8.0-RELEASE) stable; urgency=low

* More info: https://documentation.wazuh.com/current/release-notes/release-4-8-0.html

-- Wazuh, Inc <[email protected]> Wed, 20 Mar 2024 00:00:00 +0000
-- Wazuh, Inc <[email protected]> Thu, 09 May 2024 00:00:00 +0000

wazuh-manager (4.7.4-RELEASE) stable; urgency=low

* More info: https://documentation.wazuh.com/current/release-notes/release-4-7-4.html

-- Wazuh, Inc <[email protected]> Thu, 25 Apr 2024 00:00:00 +0000

wazuh-manager (4.7.3-RELEASE) stable; urgency=low

Expand Down
16 changes: 0 additions & 16 deletions debs/SPECS/wazuh-manager/debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,6 @@ It was downloaded from:

https://www.wazuh.com

Upstream Authors:

[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

Copyright:

GNU General Public License version 2.
Expand Down
8 changes: 3 additions & 5 deletions rpms/SPECS/wazuh-agent.spec
Original file line number Diff line number Diff line change
Expand Up @@ -644,12 +644,10 @@ rm -fr %{buildroot}
- More info: https://documentation.wazuh.com/current/release-notes/release-5-0-0.html
* Tue May 14 2024 support <[email protected]> - 4.9.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-9-0.html
* Wed Apr 17 2024 support <[email protected]> - 4.8.2
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-2.html
* Wed Apr 03 2024 support <[email protected]> - 4.8.1
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-1.html
* Wed Mar 20 2024 support <[email protected]> - 4.8.0
* Thu May 09 2024 support <[email protected]> - 4.8.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-0.html
* Thu Apr 25 2024 support <[email protected]> - 4.7.4
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-4.html
* Tue Feb 27 2024 support <[email protected]> - 4.7.3
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-3.html
* Tue Jan 09 2024 support <[email protected]> - 4.7.2
Expand Down
8 changes: 3 additions & 5 deletions rpms/SPECS/wazuh-manager.spec
Original file line number Diff line number Diff line change
Expand Up @@ -891,12 +891,10 @@ rm -fr %{buildroot}
- More info: https://documentation.wazuh.com/current/release-notes/release-5-0-0.html
* Tue May 14 2024 support <[email protected]> - 4.9.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-9-0.html
* Wed Apr 17 2024 support <[email protected]> - 4.8.2
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-2.html
* Wed Apr 03 2024 support <[email protected]> - 4.8.1
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-1.html
* Wed Mar 20 2024 support <[email protected]> - 4.8.0
* Thu May 09 2024 support <[email protected]> - 4.8.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-0.html
* Thu Apr 25 2024 support <[email protected]> - 4.7.4
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-4.html
* Tue Feb 27 2024 support <[email protected]> - 4.7.3
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-3.html
* Tue Jan 09 2024 support <[email protected]> - 4.7.2
Expand Down
8 changes: 7 additions & 1 deletion stack/dashboard/deb/debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ wazuh-dashboard (4.8.0-RELEASE) stable; urgency=low

* More info: https://documentation.wazuh.com/current/release-notes/release-4-8-0.html

-- Wazuh, Inc <[email protected]> Wed, 20 Mar 2024 00:00:00 +0000
-- Wazuh, Inc <[email protected]> Thu, 09 May 2024 00:00:00 +0000

wazuh-dashboard (4.7.4-RELEASE) stable; urgency=low

* More info: https://documentation.wazuh.com/current/release-notes/release-4-7-4.html

-- Wazuh, Inc <[email protected]> Thu, 25 Apr 2024 00:00:00 +0000

wazuh-dashboard (4.7.3-RELEASE) stable; urgency=low

Expand Down
8 changes: 3 additions & 5 deletions stack/dashboard/rpm/wazuh-dashboard.spec
Original file line number Diff line number Diff line change
Expand Up @@ -339,12 +339,10 @@ rm -fr %{buildroot}
- More info: https://documentation.wazuh.com/current/release-notes/release-5-0-0.html
* Tue May 14 2024 support <[email protected]> - 4.9.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-9-0.html
* Wed Apr 17 2024 support <[email protected]> - 4.8.2
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-2.html
* Wed Apr 03 2024 support <[email protected]> - 4.8.1
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-1.html
* Wed Mar 20 2024 support <[email protected]> - 4.8.0
* Thu May 09 2024 support <[email protected]> - 4.8.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-0.html
* Thu Apr 25 2024 support <[email protected]> - 4.7.4
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-4.html
* Tue Feb 27 2024 support <[email protected]> - 4.7.3
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-3.html
* Tue Jan 09 2024 support <[email protected]> - 4.7.2
Expand Down
8 changes: 7 additions & 1 deletion stack/indexer/deb/debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ wazuh-indexer (4.8.0-RELEASE) stable; urgency=low

* More info: https://documentation.wazuh.com/current/release-notes/release-4-8-0.html

-- Wazuh, Inc <[email protected]> Wed, 20 Mar 2024 00:00:00 +0000
-- Wazuh, Inc <[email protected]> Thu, 09 May 2024 00:00:00 +0000

wazuh-indexer (4.7.4-RELEASE) stable; urgency=low

* More info: https://documentation.wazuh.com/current/release-notes/release-4-7-4.html

-- Wazuh, Inc <[email protected]> Thu, 25 Apr 2024 00:00:00 +0000

wazuh-indexer (4.7.3-RELEASE) stable; urgency=low

Expand Down
8 changes: 3 additions & 5 deletions stack/indexer/rpm/wazuh-indexer.spec
Original file line number Diff line number Diff line change
Expand Up @@ -685,12 +685,10 @@ rm -fr %{buildroot}
- More info: https://documentation.wazuh.com/current/release-notes/release-5-0-0.html
* Tue May 14 2024 support <[email protected]> - 4.9.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-9-0.html
* Wed Apr 17 2024 support <[email protected]> - 4.8.2
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-2.html
* Wed Apr 03 2024 support <[email protected]> - 4.8.1
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-1.html
* Wed Mar 20 2024 support <[email protected]> - 4.8.0
* Thu May 09 2024 support <[email protected]> - 4.8.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-0.html
* Thu Apr 25 2024 support <[email protected]> - 4.7.4
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-4.html
* Tue Feb 27 2024 support <[email protected]> - 4.7.3
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-3.html
* Tue Jan 09 2024 support <[email protected]> - 4.7.2
Expand Down
2 changes: 2 additions & 0 deletions unattended_installer/cert_tool/certMain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ function main() {
esac
done

common_logger "Verbose logging redirected to ${logfile}"

if [[ -d "${base_path}"/wazuh-certificates ]]; then
if [ -n "$(ls -A "${base_path}"/wazuh-certificates)" ]; then
common_logger -e "Directory wazuh-certificates already exists in the same path as the script. Please, remove the certs directory to create new certificates."
Expand Down
8 changes: 4 additions & 4 deletions unattended_installer/cert_tool/certVariables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
# License (version 2) as published by the FSF - Free Software
# Foundation.

base_path="$(dirname "$(readlink -f "$0")")"
readonly base_path
readonly base_path="$(dirname "$(readlink -f "$0")")"
readonly config_file="${base_path}/config.yml"
readonly logfile=""
readonly logfile="${base_path}/wazuh-certificates-tool.log"
cert_tmp_path="/tmp/wazuh-certificates"
debug=">> /dev/null 2>&1"
debug=">> ${logfile} 2>&1"
readonly cert_tool_script_name=".*certs.*\.sh"
4 changes: 2 additions & 2 deletions unattended_installer/common_functions/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function common_logger() {
fi

if [ -z "${debugLogger}" ] || { [ -n "${debugLogger}" ] && [ -n "${debugEnabled}" ]; }; then
if [ "$EUID" -eq 0 ] && [ -z "${nolog}" ]; then
if [ -z "${nolog}" ] && { [ "$EUID" -eq 0 ] || [[ "$(basename "$0")" =~ $cert_tool_script_name ]]; }; then
printf "%s\n" "${now} ${mtype} ${message}" | tee -a ${logfile}
else
printf "%b\n" "${now} ${mtype} ${message}"
Expand Down Expand Up @@ -146,7 +146,7 @@ function common_checkSystem() {
sep="="
common_logger -d "APT package manager will be used."
else
common_logger -e "Couldn't find type of system"
common_logger -e "Couldn't find YUM or APT package manager. Try installing the one corresponding to your operating system and then, launch the installation assistant again."
exit 1
fi

Expand Down
4 changes: 1 addition & 3 deletions unattended_installer/install_functions/checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,6 @@ function check_dist() {

function checks_health() {

common_logger "Verifying that your system meets the recommended minimum hardware requirements."

checks_specifications

common_logger -d "CPU cores detected: ${cores}"
Expand Down Expand Up @@ -365,7 +363,7 @@ function checks_specialDepsAL2023() {
function checks_specifications() {

cores=$(grep -c processor /proc/cpuinfo)
ram_gb=$(free -m | awk '/^Mem:/{print $2}')
ram_gb=$(free -m | awk 'FNR == 2 {print $2}')

}

Expand Down
2 changes: 1 addition & 1 deletion unattended_installer/install_functions/indexer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function indexer_configure() {
eval "export JAVA_HOME=/usr/share/wazuh-indexer/jdk/"

# Configure JVM options for Wazuh indexer
ram_mb=$(free -m | awk '/^Mem:/{print $2}')
ram_gb=$(free -m | awk 'FNR == 2 {print $2}')
ram="$(( ram_mb / 2 ))"

if [ "${ram}" -eq "0" ]; then
Expand Down
18 changes: 12 additions & 6 deletions unattended_installer/install_functions/installMain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -233,26 +233,32 @@ function main() {
elif [ -n "${offline_install}" ]; then
offline_checkDependencies
fi

common_checkInstalled
checks_arguments
if [ -n "${uninstall}" ]; then
installCommon_rollBack
exit 0
fi

# -------------- Preliminary checks and Prerequisites --------------------------------

if [ -z "${configurations}" ] && [ -z "${AIO}" ] && [ -z "${download}" ]; then
checks_previousCertificate
fi
checks_arch
if [ -n "${ignore}" ]; then
common_logger -w "Hardware and system checks ignored."
else
common_logger "Verifying that your system meets the recommended minimum hardware requirements."
checks_health
fi

# -------------- Preliminary checks and Prerequisites --------------------------------

if [ -z "${uninstall}" ]; then
installCommon_installCheckDependencies
fi

if [ -z "${configurations}" ] && [ -z "${AIO}" ] && [ -z "${download}" ]; then
checks_previousCertificate
fi

if [ -n "${port_specified}" ]; then
checks_available_port "${port_number}" "${wazuh_aio_ports[@]}"
dashboard_changePort "${port_number}"
Expand Down

0 comments on commit ae2e57d

Please sign in to comment.