From ab5e32521b155ecac3a4139daa97631abdd0b90e Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Tue, 13 Dec 2022 18:21:09 +0100 Subject: [PATCH 001/328] Added lsof as a dependency of the unattended installer --- unattended_installer/install_functions/checks.sh | 12 ++++-------- .../install_functions/installCommon.sh | 4 ++-- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/unattended_installer/install_functions/checks.sh b/unattended_installer/install_functions/checks.sh index 09d5ed8116..61c146a23f 100644 --- a/unattended_installer/install_functions/checks.sh +++ b/unattended_installer/install_functions/checks.sh @@ -310,15 +310,11 @@ function checks_ports() { used_port=0 ports=("$@") - if command -v ss > /dev/null; then - port_command="ss -lntup | grep -q " + if command -v lsof > /dev/null; then + port_command="lsof -i:" else - if command -v lsof > /dev/null; then - port_command="lsof -i:" - else - common_logger -w "Cannot find ss or lsof. Port checking will be skipped." - return 1 - fi + common_logger -w "Cannot find lsof. Port checking will be skipped." + return 1 fi for i in "${!ports[@]}"; do diff --git a/unattended_installer/install_functions/installCommon.sh b/unattended_installer/install_functions/installCommon.sh index 50ded1d4fe..edd130df6f 100644 --- a/unattended_installer/install_functions/installCommon.sh +++ b/unattended_installer/install_functions/installCommon.sh @@ -263,7 +263,7 @@ function installCommon_getPass() { function installCommon_installPrerequisites() { if [ "${sys_type}" == "yum" ]; then - dependencies=( curl libcap tar gnupg openssl ) + dependencies=( curl libcap tar gnupg openssl lsof ) not_installed=() for dep in "${dependencies[@]}"; do if [ "${dep}" == "openssl" ]; then @@ -289,7 +289,7 @@ function installCommon_installPrerequisites() { elif [ "${sys_type}" == "apt-get" ]; then eval "apt-get update -q ${debug}" - dependencies=( apt-transport-https curl libcap2-bin tar software-properties-common gnupg openssl ) + dependencies=( apt-transport-https curl libcap2-bin tar software-properties-common gnupg openssl lsof ) not_installed=() for dep in "${dependencies[@]}"; do From bb65c9385285f8883b388d891a5c82e9831905fd Mon Sep 17 00:00:00 2001 From: DFolchA Date: Mon, 9 Jan 2023 15:19:15 +0100 Subject: [PATCH 002/328] Change lsof command to show only listening processes --- unattended_installer/install_functions/checks.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unattended_installer/install_functions/checks.sh b/unattended_installer/install_functions/checks.sh index 73006acf66..cdd7fe0126 100644 --- a/unattended_installer/install_functions/checks.sh +++ b/unattended_installer/install_functions/checks.sh @@ -311,7 +311,7 @@ function checks_ports() { ports=("$@") if command -v lsof > /dev/null; then - port_command="lsof -i:" + port_command="lsof -sTCP:LISTEN -i:" else common_logger -w "Cannot find lsof. Port checking will be skipped." return 1 From 2262a8f95655b88a3fb576c155ea3469c9c84e4b Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Thu, 19 Jan 2023 09:23:55 +0100 Subject: [PATCH 003/328] Preserved securityconfig files upon upgrade --- .github/actions/upgrade-indexer/common.sh | 112 ++++++++++++++++++ .../upgrade-indexer/upgrade-indexer.sh | 42 +++++++ .github/workflows/test-indexer-debian.yml | 36 ++++++ .github/workflows/test-indexer-rpm.yml | 32 +++++ stack/indexer/deb/debian/postinst | 12 +- stack/indexer/deb/debian/postrm | 4 +- stack/indexer/deb/debian/preinst | 9 +- stack/indexer/rpm/wazuh-indexer.spec | 36 ++++-- 8 files changed, 267 insertions(+), 16 deletions(-) create mode 100644 .github/actions/upgrade-indexer/common.sh create mode 100644 .github/actions/upgrade-indexer/upgrade-indexer.sh create mode 100644 .github/workflows/test-indexer-debian.yml create mode 100644 .github/workflows/test-indexer-rpm.yml diff --git a/.github/actions/upgrade-indexer/common.sh b/.github/actions/upgrade-indexer/common.sh new file mode 100644 index 0000000000..78f27904f3 --- /dev/null +++ b/.github/actions/upgrade-indexer/common.sh @@ -0,0 +1,112 @@ +#!/bin/bash +FILES_OLD="/usr/share/wazuh-indexer/plugins/opensearch-security/securityconfig" +FILES_NEW="/etc/wazuh-indexer/opensearch-security" +declare -A files_old +declare -A files_new +PACKAGE_NAME="${1}" +MAJOR_MINOR_RELEASE=$((${2})) + +# Check the system to differ between DEB and RPM +function check_system() { + + if [ -n "$(command -v yum)" ]; then + sys_type="rpm" + elif [ -n "$(command -v apt-get)" ]; then + sys_type="deb" + else + echo "Error: could not detect the system." + exit 1 + fi + +} + +# Checks the version of Wazuh with 4.3 version, where path is different. +function check_version() { + + if [ -z "${MAJOR_MINOR_RELEASE}" ]; then + echo "Error: second argument expected." + exit 1 + fi + + # 43 represents the threshold where the path of the securityconfig + # files changes (major and minor) + if [ "${MAJOR_MINOR_RELEASE}" -gt "43" ]; then + FILES_OLD="${FILES_NEW}" + echo "New path detected (/etc)." + else + echo "Old path detected (/usr/share)." + fi + +} + +# Compare the arrays, the loop ends if a different checksum is detected +function compare_arrays() { + + for file in "${!files_old[@]}"; do + echo "Comparing $file file checksum..." + echo "Old: ${files_old[$file]}" + echo "New: ${files_new[$file]}" + if [[ "${files_old[$file]}" == "${files_new[$file]}" ]]; then + echo "${file} - Same checksum." + else + echo "${file} - Different checksum." + exit 1 + fi + done + +} + +# Steps before installing the RPM release package. +function add_production_repository() { + + rpm --import https://packages.wazuh.com/key/GPG-KEY-WAZUH + echo -e '[wazuh]\ngpgcheck=1\ngpgkey=https://packages.wazuh.com/key/GPG-KEY-WAZUH\nenabled=1\nname=EL-$releasever - Wazuh\nbaseurl=https://packages.wazuh.com/4.x/yum/\nprotect=1' | tee /etc/yum.repos.d/wazuh.repo + +} + +# Reads the files passed by param and store their checksum in the array +function read_files() { + + if [ ! -d "${1}" ]; then + echo "Error: the directory does not exist. ${1}." + exit 1 + fi + + for file in ${1}/*; do + if [ -f "${file}" ]; then + echo "Processing ${file} file..." + + # Change only the old files + if [ "${2}" == "old" ]; then + echo "# Adding a new line to force changed checksum" >> ${f} + echo "Changed file." + fi + checksum=`md5sum ${file} | cut -d " " -f1` + basename=`basename ${file}` + if [ "${2}" == "old" ]; then + files_old["${basename}"]="${checksum}" + elif [ "${2}" == "new" ]; then + files_new["${basename}"]="${checksum}" + fi + fi + done + +} + +# Prints associative array of the files passed by params +function print_files() { + + aux=$(declare -p "$1") + eval "declare -A arr="${aux#*=} + + if [ "${#arr[@]}" -eq 0 ]; then + echo "Error: the array didn't scan correctly." + exit 1 + fi + + for KEY in "${!arr[@]}"; do + echo "Key: ${KEY}" + echo "Value: ${arr[${KEY}]}" + done + +} diff --git a/.github/actions/upgrade-indexer/upgrade-indexer.sh b/.github/actions/upgrade-indexer/upgrade-indexer.sh new file mode 100644 index 0000000000..6a50bad4c4 --- /dev/null +++ b/.github/actions/upgrade-indexer/upgrade-indexer.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +# Gets the absolute path of the script, used to load the common.sh file +ABSOLUTE_PATH="$( cd $(dirname ${0}) ; pwd -P )" +. ${ABSOLUTE_PATH}/common.sh + +check_system +check_version + +echo "Installing old version of Wazuh indexer..." +if [ ${sys_type} == "deb" ]; then + apt-get -y install wazuh-indexer +elif [ ${sys_type} == "rpm" ]; then + add_production_repository + yum -y install wazuh-indexer +else + echo "Error: No system detected." + exit 1 +fi + +read_files "${FILES_OLD}" "old" +echo "Old files..." +print_files "files_old" + +echo "Installing new version of Wazuh indexer..." +if [ ${sys_type} == "deb" ]; then + apt-get install $PACKAGE_NAME +elif [ ${sys_type} == "rpm" ]; then + yum -y localinstall $PACKAGE_NAME +fi + +read_files "${FILES_NEW}" "new" +echo "New files..." +print_files "files_new" + +compare_arrays +if [ "$?" -eq 0 ]; then + echo "Same checksums - Test passed correctly." + exit 0 +fi +echo "Error: different checksums detected." +exit 1 diff --git a/.github/workflows/test-indexer-debian.yml b/.github/workflows/test-indexer-debian.yml new file mode 100644 index 0000000000..7506fde912 --- /dev/null +++ b/.github/workflows/test-indexer-debian.yml @@ -0,0 +1,36 @@ +name: Test the preserving of security config files upon upgrade - Wazuh indexer - Debian +on: + pull_request: + paths: + - 'stack/indexer/deb/debian/*' + workflow_dispatch: + +jobs: + Test-security-config-files-preservation-Debian: + runs-on: ubuntu-latest + steps: + - name: Preinstall the latest stable version of the Wazuh indexer package + run: | + curl -s https://packages.wazuh.com/key/GPG-KEY-WAZUH | gpg --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/wazuh.gpg --import && chmod 644 /usr/share/keyrings/wazuh.gpg + echo "deb [signed-by=/usr/share/keyrings/wazuh.gpg] https://packages.wazuh.com/4.x/apt/ stable main" | sudo tee -a /etc/apt/sources.list.d/wazuh.list + sudo apt-get update + + - name: Get the latest stable Wazuh version (all components) + run: echo "LATEST_STABLE_VERSION=$(jq -r 'map(select(.prerelease == false and .draft == false)) | .[] | .tag_name' <<< $(curl --silent https://api.github.com/repos/wazuh/wazuh/releases) | sed "s|v||g" | sort -rV | head -n 1)" >> $GITHUB_ENV + + - name: Get the major and minor of the latest stable version + run: echo "MAJOR_MINOR=$(echo $LATEST_STABLE_VERSION | cut -d '.' -f1-2 | sed "s|\.||")" >> $GITHUB_ENV + + - uses: actions/checkout@v3 + - name: Build the Wazuh indexer package and set environment variable + working-directory: ./stack/indexer/deb + run: | + sudo ./build_package.sh + echo "PACKAGE_NAME=$(ls ./output | grep .deb | head -n 1)" >> $GITHUB_ENV + + - name: Move the built package + working-directory: ./stack/indexer/deb + run: sudo cp ./output/$PACKAGE_NAME $GITHUB_WORKSPACE/$PACKAGE_NAME + + - name: Run script + run: sudo bash $GITHUB_WORKSPACE/.github/actions/upgrade-indexer/upgrade-indexer.sh $GITHUB_WORKSPACE/$PACKAGE_NAME $MAJOR_MINOR diff --git a/.github/workflows/test-indexer-rpm.yml b/.github/workflows/test-indexer-rpm.yml new file mode 100644 index 0000000000..5cf1bb00af --- /dev/null +++ b/.github/workflows/test-indexer-rpm.yml @@ -0,0 +1,32 @@ +name: Test the preserving of security config files upon upgrade - Wazuh indexer - RPM +on: + pull_request: + paths: + - 'stack/indexer/rpm/wazuh-indexer.spec' + workflow_dispatch: + +jobs: + Test-security-config-files-preservation-RPM: + runs-on: ubuntu-latest + steps: + - name: Get the latest stable Wazuh version (all components) + run: echo "LATEST_STABLE_VERSION=$(jq -r 'map(select(.prerelease == false and .draft == false)) | .[] | .tag_name' <<< $(curl --silent https://api.github.com/repos/wazuh/wazuh/releases) | sed "s|v||g" | sort -rV | head -n 1)" >> $GITHUB_ENV + + - name: Get the major and minor of the latest stable version + run: echo "MAJOR_MINOR=$(echo $LATEST_STABLE_VERSION | cut -d '.' -f1-2 | sed "s|\.||")" >> $GITHUB_ENV + + - uses: actions/checkout@v3 + - name: Build the Wazuh indexer package and set environment variable + working-directory: ./stack/indexer/rpm + run: | + sudo ./build_package.sh + echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV + + - name: Move the built package + working-directory: ./stack/indexer/rpm + run: | + mkdir $GITHUB_WORKSPACE/packages + sudo cp ./output/$PACKAGE_NAME $GITHUB_WORKSPACE/packages/$PACKAGE_NAME + + - name: Launch docker + run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/upgrade-indexer/:/tests -v $GITHUB_WORKSPACE/packages/:/packages centos:centos7 bash /tests/upgrade-indexer.sh /packages/$PACKAGE_NAME $MAJOR_MINOR diff --git a/stack/indexer/deb/debian/postinst b/stack/indexer/deb/debian/postinst index ee04f993cb..0ce951f7bf 100644 --- a/stack/indexer/deb/debian/postinst +++ b/stack/indexer/deb/debian/postinst @@ -14,12 +14,13 @@ export USER=${NAME} export GROUP=${NAME} export CONFIG_DIR=/etc/${NAME} export INSTALLATION_DIR=/usr/share/${NAME} +export BACKUP_DIR="${CONFIG_DIR}/upgrade_backup" export LOG_DIR=/var/log/${NAME} export PID_DIR=/run/${NAME} export LIB_DIR=/var/lib/${NAME} export SYS_DIR=/usr/lib -set -e +set -e # # This script is executed in the post-installation phase @@ -44,7 +45,7 @@ case "$1" in # The codeblock below is using the fact that postinst script is called with the most-recently configured version. # In other words, a fresh installed will be called like "postinst configure" with no previous version ($2 is null) if [ -z "$2" ]; then - # If $2 is null, this is an install + # If $2 is null, this is an install # Setting owner and group chown -R ${USER}:${GROUP} ${CONFIG_DIR} @@ -81,6 +82,13 @@ case "$1" in echo "${USER} soft nofile 65535" >> /etc/security/limits.conf else # Otherwise it is an upgrade + + # If the backup of securityconfig files is done (4.3.x), restore them + if [ -d "${BACKUP_DIR}/securityconfig" ]; then + cp "${BACKUP_DIR}"/securityconfig/* "${CONFIG_DIR}/opensearch-security" + rm -rf "${BACKUP_DIR}" + fi + if [ -f "${INSTALLATION_DIR}/${NAME}.restart" ]; then echo -n "Restarting wazuh-indexer service..." rm -f "${INSTALLATION_DIR}/${NAME}.restart" diff --git a/stack/indexer/deb/debian/postrm b/stack/indexer/deb/debian/postrm index 5ed47adbfe..f3a64a2983 100644 --- a/stack/indexer/deb/debian/postrm +++ b/stack/indexer/deb/debian/postrm @@ -7,7 +7,7 @@ # License (version 2) as published by the FSF - Free Software # Foundation. -set -e +set -e export NAME=wazuh-indexer export CONFIG_DIR="/etc/${NAME}" @@ -46,7 +46,7 @@ case "$1" in REMOVE_USER_AND_GROUP=true ;; - failed-upgrade|abort-install|abort-upgrade|disappear|upgrade|disappear) + failed-upgrade|abort-install|abort-upgrade|upgrade|disappear) ;; *) diff --git a/stack/indexer/deb/debian/preinst b/stack/indexer/deb/debian/preinst index f404c33686..310e6367ac 100644 --- a/stack/indexer/deb/debian/preinst +++ b/stack/indexer/deb/debian/preinst @@ -7,10 +7,11 @@ # License (version 2) as published by the FSF - Free Software # Foundation. -set -e +set -e export NAME=wazuh-indexer export CONFIG_DIR="/etc/${NAME}" +export BACKUP_DIR="${CONFIG_DIR}/upgrade_backup" export INSTALLATION_DIR="/usr/share/${NAME}" # @@ -60,6 +61,12 @@ case "$1" in ;; upgrade) + # Move the securityconfig files if they exist (4.3.x versions) + if [ -d "${INSTALLATION_DIR}/plugins/opensearch-security/securityconfig" ]; then + mkdir "${BACKUP_DIR}" + cp -r "${INSTALLATION_DIR}/plugins/opensearch-security/securityconfig/" "${BACKUP_DIR}" + fi + # Stop the services to upgrade if command -v systemctl > /dev/null 2>&1 && systemctl > /dev/null 2>&1 && systemctl is-active --quiet "${NAME}" > /dev/null 2>&1; then systemctl stop "${NAME}".service > /dev/null 2>&1 diff --git a/stack/indexer/rpm/wazuh-indexer.spec b/stack/indexer/rpm/wazuh-indexer.spec index 9bfd35c114..2bd5a3cfbe 100755 --- a/stack/indexer/rpm/wazuh-indexer.spec +++ b/stack/indexer/rpm/wazuh-indexer.spec @@ -170,6 +170,18 @@ if [ -f /etc/os-release ]; then fi fi +# If is an upgrade, move the securityconfig files if they exist (4.3.x versions) +if [ ${1} = 2 ]; then + if [ -d "%{INSTALL_DIR}"/plugins/opensearch-security/securityconfig ]; then + + if [ ! -d "%{CONFIG_DIR}"/opensearch-security ]; then + mkdir "%{CONFIG_DIR}"/opensearch-security + fi + + cp -r "%{INSTALL_DIR}"/plugins/opensearch-security/securityconfig/* "%{CONFIG_DIR}"/opensearch-security + fi +fi + # ----------------------------------------------------------------------------- %preun @@ -453,17 +465,17 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-performance-analyzer/rca_idle_cluster_manager.conf %attr(640, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-performance-analyzer/supervisord.conf %dir %attr(750, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-security -%attr(640, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-security/action_groups.yml -%attr(640, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-security/audit.yml -%attr(640, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-security/config.yml -%attr(640, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-security/internal_users.yml -%attr(640, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-security/nodes_dn.yml -%attr(640, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-security/opensearch.yml.example -%attr(640, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-security/roles.yml -%attr(640, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-security/roles_mapping.yml -%attr(640, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-security/tenants.yml -%attr(640, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-security/whitelist.yml -%attr(640, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-security/allowlist.yml +%config(noreplace) %attr(640, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-security/action_groups.yml +%config(noreplace) %attr(640, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-security/audit.yml +%config(noreplace) %attr(640, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-security/config.yml +%config(noreplace) %attr(640, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-security/internal_users.yml +%config(noreplace) %attr(640, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-security/nodes_dn.yml +%config(noreplace) %attr(640, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-security/opensearch.yml.example +%config(noreplace) %attr(640, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-security/roles.yml +%config(noreplace) %attr(640, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-security/roles_mapping.yml +%config(noreplace) %attr(640, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-security/tenants.yml +%config(noreplace) %attr(640, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-security/whitelist.yml +%config(noreplace) %attr(640, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-security/allowlist.yml %attr(440, %{USER}, %{GROUP}) %{INSTALL_DIR}/VERSION %dir %attr(750, %{USER}, %{GROUP}) %{CONFIG_DIR}/jvm.options.d %config(noreplace) %attr(660, %{USER}, %{GROUP}) %{CONFIG_DIR}/log4j2.properties @@ -1364,6 +1376,8 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/jdk/lib/security/blocked.certs %changelog +* Fri May 05 2023 support - %{version} +- More info: https://documentation.wazuh.com/current/release-notes/ * Wed Jan 18 2023 support - 4.4.0 - More info: https://documentation.wazuh.com/current/release-notes/ * Thu Nov 10 2022 support - 4.3.10 From dd6ee396d2fcf094a6bce5446d05ff140789e8a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 19 Jan 2023 19:15:38 +0100 Subject: [PATCH 004/328] Add Alma Linux, Rocky Linux and Oracle Linux to the init.d fix done for RHEL 9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- rpms/SPECS/wazuh-agent.spec | 2 +- rpms/SPECS/wazuh-manager.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpms/SPECS/wazuh-agent.spec b/rpms/SPECS/wazuh-agent.spec index 6a640ef165..80181fadfd 100644 --- a/rpms/SPECS/wazuh-agent.spec +++ b/rpms/SPECS/wazuh-agent.spec @@ -242,7 +242,7 @@ fi if [ -f /etc/os-release ]; then source /etc/os-release - if [ "${NAME}" = "Red Hat Enterprise Linux" ] && [ "$((${VERSION_ID:0:1}))" -ge 9 ]; then + if ( [ "${NAME}" = "Red Hat Enterprise Linux" ] || [ "${NAME}" = "Rocky Linux" ] || [ "${NAME}" = "Red Hat Enterprise Linux" ] || [ "${NAME}" = "Oracle Linux Server" ] ) && [ "$((${VERSION_ID:0:1}))" -ge 9 ]; then rm -f %{_initrddir}/wazuh-agent fi fi diff --git a/rpms/SPECS/wazuh-manager.spec b/rpms/SPECS/wazuh-manager.spec index ccfd0e1aa6..971291d3a3 100644 --- a/rpms/SPECS/wazuh-manager.spec +++ b/rpms/SPECS/wazuh-manager.spec @@ -332,7 +332,7 @@ fi if [ -f /etc/os-release ]; then source /etc/os-release - if [ "${NAME}" = "Red Hat Enterprise Linux" ] && [ "$((${VERSION_ID:0:1}))" -ge 9 ]; then + if ( [ "${NAME}" = "Red Hat Enterprise Linux" ] || [ "${NAME}" = "Rocky Linux" ] || [ "${NAME}" = "Red Hat Enterprise Linux" ] || [ "${NAME}" = "Oracle Linux Server" ] ) && [ "$((${VERSION_ID:0:1}))" -ge 9 ]; then rm -f %{_initrddir}/wazuh-manager fi fi From 1312148e4b6220fe6e7c8449769ce2e2e061430c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 19 Jan 2023 19:25:21 +0100 Subject: [PATCH 005/328] Remove Oracle Linux as it does not replicate the error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- rpms/SPECS/wazuh-agent.spec | 2 +- rpms/SPECS/wazuh-manager.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpms/SPECS/wazuh-agent.spec b/rpms/SPECS/wazuh-agent.spec index 80181fadfd..032765e0d9 100644 --- a/rpms/SPECS/wazuh-agent.spec +++ b/rpms/SPECS/wazuh-agent.spec @@ -242,7 +242,7 @@ fi if [ -f /etc/os-release ]; then source /etc/os-release - if ( [ "${NAME}" = "Red Hat Enterprise Linux" ] || [ "${NAME}" = "Rocky Linux" ] || [ "${NAME}" = "Red Hat Enterprise Linux" ] || [ "${NAME}" = "Oracle Linux Server" ] ) && [ "$((${VERSION_ID:0:1}))" -ge 9 ]; then + if ( [ "${NAME}" = "Red Hat Enterprise Linux" ] || [ "${NAME}" = "Rocky Linux" ] || [ "${NAME}" = "Red Hat Enterprise Linux" ] ) && [ "$((${VERSION_ID:0:1}))" -ge 9 ]; then rm -f %{_initrddir}/wazuh-agent fi fi diff --git a/rpms/SPECS/wazuh-manager.spec b/rpms/SPECS/wazuh-manager.spec index 971291d3a3..2a838bf8f9 100644 --- a/rpms/SPECS/wazuh-manager.spec +++ b/rpms/SPECS/wazuh-manager.spec @@ -332,7 +332,7 @@ fi if [ -f /etc/os-release ]; then source /etc/os-release - if ( [ "${NAME}" = "Red Hat Enterprise Linux" ] || [ "${NAME}" = "Rocky Linux" ] || [ "${NAME}" = "Red Hat Enterprise Linux" ] || [ "${NAME}" = "Oracle Linux Server" ] ) && [ "$((${VERSION_ID:0:1}))" -ge 9 ]; then + if ( [ "${NAME}" = "Red Hat Enterprise Linux" ] || [ "${NAME}" = "Rocky Linux" ] || [ "${NAME}" = "Red Hat Enterprise Linux" ] ) && [ "$((${VERSION_ID:0:1}))" -ge 9 ]; then rm -f %{_initrddir}/wazuh-manager fi fi From 226f3315744464c0e2da84188a205e67bad3ceba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 20 Jan 2023 11:18:00 +0100 Subject: [PATCH 006/328] Fix Red Hat Enterprise Linux repeated and Alma Linux missing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- rpms/SPECS/wazuh-agent.spec | 2 +- rpms/SPECS/wazuh-manager.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rpms/SPECS/wazuh-agent.spec b/rpms/SPECS/wazuh-agent.spec index 032765e0d9..8b01346087 100644 --- a/rpms/SPECS/wazuh-agent.spec +++ b/rpms/SPECS/wazuh-agent.spec @@ -242,7 +242,7 @@ fi if [ -f /etc/os-release ]; then source /etc/os-release - if ( [ "${NAME}" = "Red Hat Enterprise Linux" ] || [ "${NAME}" = "Rocky Linux" ] || [ "${NAME}" = "Red Hat Enterprise Linux" ] ) && [ "$((${VERSION_ID:0:1}))" -ge 9 ]; then + if ( [ "${NAME}" = "Red Hat Enterprise Linux" ] || [ "${NAME}" = "Rocky Linux" ] || [ "${NAME}" = "AlmaLinux" ] ) && [ "$((${VERSION_ID:0:1}))" -ge 9 ]; then rm -f %{_initrddir}/wazuh-agent fi fi diff --git a/rpms/SPECS/wazuh-manager.spec b/rpms/SPECS/wazuh-manager.spec index 2a838bf8f9..0a75ff63ce 100644 --- a/rpms/SPECS/wazuh-manager.spec +++ b/rpms/SPECS/wazuh-manager.spec @@ -332,7 +332,7 @@ fi if [ -f /etc/os-release ]; then source /etc/os-release - if ( [ "${NAME}" = "Red Hat Enterprise Linux" ] || [ "${NAME}" = "Rocky Linux" ] || [ "${NAME}" = "Red Hat Enterprise Linux" ] ) && [ "$((${VERSION_ID:0:1}))" -ge 9 ]; then + if ( [ "${NAME}" = "Red Hat Enterprise Linux" ] || [ "${NAME}" = "Rocky Linux" ] || [ "${NAME}" = "AlmaLinux" ] ) && [ "$((${VERSION_ID:0:1}))" -ge 9 ]; then rm -f %{_initrddir}/wazuh-manager fi fi From 756ae34155ec46386852e2dd5bc53ba983363152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 20 Jan 2023 13:10:46 +0100 Subject: [PATCH 007/328] Add Github Actions test for systemctl in RHEL 9 and derivatives MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../install_and_test_agent.sh | 8 ++++++ .../install_and_test_manager.sh | 8 ++++++ .github/workflows/test-enable-alma9-agent.yml | 26 +++++++++++++++++++ .github/workflows/test-enable-rhel9-agent.yml | 26 +++++++++++++++++++ .../workflows/test-enable-rhel9-manager.yml | 26 +++++++++++++++++++ .../workflows/test-enable-rocky9-agent.yml | 26 +++++++++++++++++++ 6 files changed, 120 insertions(+) create mode 100644 .github/actions/test-enable-rhel9-derivatives/install_and_test_agent.sh create mode 100644 .github/actions/test-enable-rhel9-derivatives/install_and_test_manager.sh create mode 100644 .github/workflows/test-enable-alma9-agent.yml create mode 100644 .github/workflows/test-enable-rhel9-agent.yml create mode 100644 .github/workflows/test-enable-rhel9-manager.yml create mode 100644 .github/workflows/test-enable-rocky9-agent.yml diff --git a/.github/actions/test-enable-rhel9-derivatives/install_and_test_agent.sh b/.github/actions/test-enable-rhel9-derivatives/install_and_test_agent.sh new file mode 100644 index 0000000000..c0a7b30824 --- /dev/null +++ b/.github/actions/test-enable-rhel9-derivatives/install_and_test_agent.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +echo "Installing Wazuh Agent." +yum install $PACKAGE_NAME + +echo "Enabling Wazuh Agent." +systemctl daemon-reload +systemctl enable wazuh-agent \ No newline at end of file diff --git a/.github/actions/test-enable-rhel9-derivatives/install_and_test_manager.sh b/.github/actions/test-enable-rhel9-derivatives/install_and_test_manager.sh new file mode 100644 index 0000000000..2761b8ade9 --- /dev/null +++ b/.github/actions/test-enable-rhel9-derivatives/install_and_test_manager.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +echo "Installing Wazuh Manager." +yum install $PACKAGE_NAME + +echo "Enabling Wazuh Agent." +systemctl daemon-reload +systemctl enable wazuh-manager \ No newline at end of file diff --git a/.github/workflows/test-enable-alma9-agent.yml b/.github/workflows/test-enable-alma9-agent.yml new file mode 100644 index 0000000000..5d2f83d3d3 --- /dev/null +++ b/.github/workflows/test-enable-alma9-agent.yml @@ -0,0 +1,26 @@ +name: Test the preserving of security config files upon upgrade - Wazuh indexer - RPM +on: + pull_request: + paths: + - 'stack/indexer/rpm/wazuh-indexer.spec' + workflow_dispatch: + +jobs: + Test-security-config-files-preservation-RPM: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Build the Wazuh agent package + working-directory: ./rpms + run: | + sudo ./bash generate_rpm_package.sh -b master -t agent -a x86_64 --dev + echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV + + - name: Move the built package + working-directory: ./rpms + run: | + mkdir $GITHUB_WORKSPACE/packages + sudo cp ./output/$PACKAGE_NAME $GITHUB_WORKSPACE/packages/$PACKAGE_NAME + + - name: Launch docker + run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages almalinux:latest bash /tests/install-and-test-agent.sh diff --git a/.github/workflows/test-enable-rhel9-agent.yml b/.github/workflows/test-enable-rhel9-agent.yml new file mode 100644 index 0000000000..e8aa830840 --- /dev/null +++ b/.github/workflows/test-enable-rhel9-agent.yml @@ -0,0 +1,26 @@ +name: Test the preserving of security config files upon upgrade - Wazuh indexer - RPM +on: + pull_request: + paths: + - 'stack/indexer/rpm/wazuh-indexer.spec' + workflow_dispatch: + +jobs: + Test-security-config-files-preservation-RPM: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Build the Wazuh agent package + working-directory: ./rpms + run: | + sudo ./bash generate_rpm_package.sh -b master -t agent -a x86_64 --dev + echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV + + - name: Move the built package + working-directory: ./rpms + run: | + mkdir $GITHUB_WORKSPACE/packages + sudo cp ./output/$PACKAGE_NAME $GITHUB_WORKSPACE/packages/$PACKAGE_NAME + + - name: Launch docker + run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages redhat/ubi9-minimal:latest bash /tests/install-and-test-agent.sh diff --git a/.github/workflows/test-enable-rhel9-manager.yml b/.github/workflows/test-enable-rhel9-manager.yml new file mode 100644 index 0000000000..4dfd9ea9ea --- /dev/null +++ b/.github/workflows/test-enable-rhel9-manager.yml @@ -0,0 +1,26 @@ +name: Test the preserving of security config files upon upgrade - Wazuh indexer - RPM +on: + pull_request: + paths: + - 'stack/indexer/rpm/wazuh-indexer.spec' + workflow_dispatch: + +jobs: + Test-security-config-files-preservation-RPM: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Build the Wazuh agent package + working-directory: ./rpms + run: | + sudo ./bash generate_rpm_package.sh -b master -t manager -a x86_64 --dev + echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV + + - name: Move the built package + working-directory: ./rpms + run: | + mkdir $GITHUB_WORKSPACE/packages + sudo cp ./output/$PACKAGE_NAME $GITHUB_WORKSPACE/packages/$PACKAGE_NAME + + - name: Launch docker + run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages redhat/ubi9-minimal:latest bash /tests/install-and-test-manager.sh diff --git a/.github/workflows/test-enable-rocky9-agent.yml b/.github/workflows/test-enable-rocky9-agent.yml new file mode 100644 index 0000000000..b9d1d5e4a4 --- /dev/null +++ b/.github/workflows/test-enable-rocky9-agent.yml @@ -0,0 +1,26 @@ +name: Test the preserving of security config files upon upgrade - Wazuh indexer - RPM +on: + pull_request: + paths: + - 'stack/indexer/rpm/wazuh-indexer.spec' + workflow_dispatch: + +jobs: + Test-security-config-files-preservation-RPM: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Build the Wazuh agent package + working-directory: ./rpms + run: | + sudo ./bash generate_rpm_package.sh -b master -t agent -a x86_64 --dev + echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV + + - name: Move the built package + working-directory: ./rpms + run: | + mkdir $GITHUB_WORKSPACE/packages + sudo cp ./output/$PACKAGE_NAME $GITHUB_WORKSPACE/packages/$PACKAGE_NAME + + - name: Launch docker + run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages rockylinux:9 bash /tests/install-and-test-agent.sh From 1bd2583d9c03d399d6f073a46a00921ffa9f93ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 20 Jan 2023 13:19:21 +0100 Subject: [PATCH 008/328] Change names and Pull request paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-enable-alma9-agent.yml | 8 +++++--- .github/workflows/test-enable-rhel9-agent.yml | 8 +++++--- .github/workflows/test-enable-rhel9-manager.yml | 8 +++++--- .github/workflows/test-enable-rocky9-agent.yml | 8 +++++--- 4 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test-enable-alma9-agent.yml b/.github/workflows/test-enable-alma9-agent.yml index 5d2f83d3d3..6a56ca01dd 100644 --- a/.github/workflows/test-enable-alma9-agent.yml +++ b/.github/workflows/test-enable-alma9-agent.yml @@ -1,12 +1,14 @@ -name: Test the preserving of security config files upon upgrade - Wazuh indexer - RPM +name: Test the enabling of the Wazuh agent - AlmaLinux 9 - RPM on: pull_request: paths: - - 'stack/indexer/rpm/wazuh-indexer.spec' + - 'rpms/SPECS' + - 'rpms/generate_rpm_package.sh' + - 'rpms/build.sh' workflow_dispatch: jobs: - Test-security-config-files-preservation-RPM: + Test-enable-wazuh-agent-alma9: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/test-enable-rhel9-agent.yml b/.github/workflows/test-enable-rhel9-agent.yml index e8aa830840..375e5fba3c 100644 --- a/.github/workflows/test-enable-rhel9-agent.yml +++ b/.github/workflows/test-enable-rhel9-agent.yml @@ -1,12 +1,14 @@ -name: Test the preserving of security config files upon upgrade - Wazuh indexer - RPM +name: Test the enabling of the Wazuh agent - Red Hat Enterprise Linux 9 - RPM on: pull_request: paths: - - 'stack/indexer/rpm/wazuh-indexer.spec' + - 'rpms/SPECS' + - 'rpms/generate_rpm_package.sh' + - 'rpms/build.sh' workflow_dispatch: jobs: - Test-security-config-files-preservation-RPM: + Test-enable-wazuh-agent-rhel9: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/test-enable-rhel9-manager.yml b/.github/workflows/test-enable-rhel9-manager.yml index 4dfd9ea9ea..73726ee661 100644 --- a/.github/workflows/test-enable-rhel9-manager.yml +++ b/.github/workflows/test-enable-rhel9-manager.yml @@ -1,12 +1,14 @@ -name: Test the preserving of security config files upon upgrade - Wazuh indexer - RPM +name: Test the enabling of the Wazuh manager - Red Hat Enterprise Linux 9 - RPM on: pull_request: paths: - - 'stack/indexer/rpm/wazuh-indexer.spec' + - 'rpms/SPECS' + - 'rpms/generate_rpm_package.sh' + - 'rpms/build.sh' workflow_dispatch: jobs: - Test-security-config-files-preservation-RPM: + Test-enable-wazuh-manager-rhel9: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/test-enable-rocky9-agent.yml b/.github/workflows/test-enable-rocky9-agent.yml index b9d1d5e4a4..e3b9d213a6 100644 --- a/.github/workflows/test-enable-rocky9-agent.yml +++ b/.github/workflows/test-enable-rocky9-agent.yml @@ -1,12 +1,14 @@ -name: Test the preserving of security config files upon upgrade - Wazuh indexer - RPM +name: Test the enabling of the Wazuh agent - Rocky Linux 9 - RPM on: pull_request: paths: - - 'stack/indexer/rpm/wazuh-indexer.spec' + - 'rpms/SPECS' + - 'rpms/generate_rpm_package.sh' + - 'rpms/build.sh' workflow_dispatch: jobs: - Test-security-config-files-preservation-RPM: + Test-enable-wazuh-agent-rocky9: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From de8edfccd76186103948624b734be0a5b2410bf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 20 Jan 2023 14:50:40 +0100 Subject: [PATCH 009/328] Change images and fix script for github actions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../install_and_test_agent.sh | 12 +++++++++--- .../install_and_test_manager.sh | 12 +++++++++--- .github/workflows/test-enable-alma9-agent.yml | 2 +- .github/workflows/test-enable-rhel9-agent.yml | 2 +- .github/workflows/test-enable-rhel9-manager.yml | 2 +- 5 files changed, 21 insertions(+), 9 deletions(-) diff --git a/.github/actions/test-enable-rhel9-derivatives/install_and_test_agent.sh b/.github/actions/test-enable-rhel9-derivatives/install_and_test_agent.sh index c0a7b30824..2239dfc495 100644 --- a/.github/actions/test-enable-rhel9-derivatives/install_and_test_agent.sh +++ b/.github/actions/test-enable-rhel9-derivatives/install_and_test_agent.sh @@ -1,8 +1,14 @@ #!/bin/bash echo "Installing Wazuh Agent." -yum install $PACKAGE_NAME +yum install -y $PACKAGE_NAME echo "Enabling Wazuh Agent." -systemctl daemon-reload -systemctl enable wazuh-agent \ No newline at end of file +systemctl enable wazuh-agent +if [ "$?" -eq 0 ]; then + echo "Wazuh agent enabled - Test passed correctly." + exit 0 +else + echo "Error: Wazuh agent not enabled." + exit 1 +fi \ No newline at end of file diff --git a/.github/actions/test-enable-rhel9-derivatives/install_and_test_manager.sh b/.github/actions/test-enable-rhel9-derivatives/install_and_test_manager.sh index 2761b8ade9..36af2b0ba2 100644 --- a/.github/actions/test-enable-rhel9-derivatives/install_and_test_manager.sh +++ b/.github/actions/test-enable-rhel9-derivatives/install_and_test_manager.sh @@ -1,8 +1,14 @@ #!/bin/bash echo "Installing Wazuh Manager." -yum install $PACKAGE_NAME +yum install -y $PACKAGE_NAME echo "Enabling Wazuh Agent." -systemctl daemon-reload -systemctl enable wazuh-manager \ No newline at end of file +systemctl enable wazuh-manager +if [ "$?" -eq 0 ]; then + echo "Wazuh agent enabled - Test passed correctly." + exit 0 +else + echo "Error: Wazuh agent not enabled." + exit 1 +fi \ No newline at end of file diff --git a/.github/workflows/test-enable-alma9-agent.yml b/.github/workflows/test-enable-alma9-agent.yml index 6a56ca01dd..a84a779ccf 100644 --- a/.github/workflows/test-enable-alma9-agent.yml +++ b/.github/workflows/test-enable-alma9-agent.yml @@ -25,4 +25,4 @@ jobs: sudo cp ./output/$PACKAGE_NAME $GITHUB_WORKSPACE/packages/$PACKAGE_NAME - name: Launch docker - run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages almalinux:latest bash /tests/install-and-test-agent.sh + run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages almalinux:9.1 bash /tests/install-and-test-agent.sh diff --git a/.github/workflows/test-enable-rhel9-agent.yml b/.github/workflows/test-enable-rhel9-agent.yml index 375e5fba3c..0555e4a9df 100644 --- a/.github/workflows/test-enable-rhel9-agent.yml +++ b/.github/workflows/test-enable-rhel9-agent.yml @@ -25,4 +25,4 @@ jobs: sudo cp ./output/$PACKAGE_NAME $GITHUB_WORKSPACE/packages/$PACKAGE_NAME - name: Launch docker - run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages redhat/ubi9-minimal:latest bash /tests/install-and-test-agent.sh + run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages redhat/ubi9 bash /tests/install-and-test-agent.sh diff --git a/.github/workflows/test-enable-rhel9-manager.yml b/.github/workflows/test-enable-rhel9-manager.yml index 73726ee661..c3651a81ba 100644 --- a/.github/workflows/test-enable-rhel9-manager.yml +++ b/.github/workflows/test-enable-rhel9-manager.yml @@ -25,4 +25,4 @@ jobs: sudo cp ./output/$PACKAGE_NAME $GITHUB_WORKSPACE/packages/$PACKAGE_NAME - name: Launch docker - run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages redhat/ubi9-minimal:latest bash /tests/install-and-test-manager.sh + run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages redhat/ubi9-init bash /tests/install-and-test-manager.sh From 742b4a19cba8248c8441d7134b8767f8b3d3229d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 20 Jan 2023 14:56:13 +0100 Subject: [PATCH 010/328] Small fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- macos/generate_wazuh_packages.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macos/generate_wazuh_packages.sh b/macos/generate_wazuh_packages.sh index fb035d845f..be8b3c655f 100755 --- a/macos/generate_wazuh_packages.sh +++ b/macos/generate_wazuh_packages.sh @@ -386,7 +386,7 @@ function main() { CHECKSUMDIR="${DESTINATION}" fi - if [[ "$BUILD" != "no" ]]; then + if [[ "${BUILD}" != "no" ]]; then check_root build_package "${CURRENT_PATH}/uninstall.sh" From 9ef7f716475b914d54c68e98bddda1de0a94f269 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 20 Jan 2023 14:58:30 +0100 Subject: [PATCH 011/328] Fix paths in workflows for github actions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-enable-alma9-agent.yml | 2 +- .github/workflows/test-enable-rhel9-agent.yml | 2 +- .github/workflows/test-enable-rhel9-manager.yml | 2 +- .github/workflows/test-enable-rocky9-agent.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-enable-alma9-agent.yml b/.github/workflows/test-enable-alma9-agent.yml index a84a779ccf..d842ab9450 100644 --- a/.github/workflows/test-enable-alma9-agent.yml +++ b/.github/workflows/test-enable-alma9-agent.yml @@ -2,7 +2,7 @@ name: Test the enabling of the Wazuh agent - AlmaLinux 9 - RPM on: pull_request: paths: - - 'rpms/SPECS' + - 'rpms/SPECS/*' - 'rpms/generate_rpm_package.sh' - 'rpms/build.sh' workflow_dispatch: diff --git a/.github/workflows/test-enable-rhel9-agent.yml b/.github/workflows/test-enable-rhel9-agent.yml index 0555e4a9df..819940fbd4 100644 --- a/.github/workflows/test-enable-rhel9-agent.yml +++ b/.github/workflows/test-enable-rhel9-agent.yml @@ -2,7 +2,7 @@ name: Test the enabling of the Wazuh agent - Red Hat Enterprise Linux 9 - RPM on: pull_request: paths: - - 'rpms/SPECS' + - 'rpms/SPECS/*' - 'rpms/generate_rpm_package.sh' - 'rpms/build.sh' workflow_dispatch: diff --git a/.github/workflows/test-enable-rhel9-manager.yml b/.github/workflows/test-enable-rhel9-manager.yml index c3651a81ba..5aa02fa990 100644 --- a/.github/workflows/test-enable-rhel9-manager.yml +++ b/.github/workflows/test-enable-rhel9-manager.yml @@ -2,7 +2,7 @@ name: Test the enabling of the Wazuh manager - Red Hat Enterprise Linux 9 - RPM on: pull_request: paths: - - 'rpms/SPECS' + - 'rpms/SPECS/*' - 'rpms/generate_rpm_package.sh' - 'rpms/build.sh' workflow_dispatch: diff --git a/.github/workflows/test-enable-rocky9-agent.yml b/.github/workflows/test-enable-rocky9-agent.yml index e3b9d213a6..6c78fc0d38 100644 --- a/.github/workflows/test-enable-rocky9-agent.yml +++ b/.github/workflows/test-enable-rocky9-agent.yml @@ -2,7 +2,7 @@ name: Test the enabling of the Wazuh agent - Rocky Linux 9 - RPM on: pull_request: paths: - - 'rpms/SPECS' + - 'rpms/SPECS/*' - 'rpms/generate_rpm_package.sh' - 'rpms/build.sh' workflow_dispatch: From d947c57f07a8d33efca48753cb5d6e998212996e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 20 Jan 2023 15:00:16 +0100 Subject: [PATCH 012/328] Fix call to generate_rpm_package in github actions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-enable-alma9-agent.yml | 2 +- .github/workflows/test-enable-rhel9-agent.yml | 2 +- .github/workflows/test-enable-rhel9-manager.yml | 2 +- .github/workflows/test-enable-rocky9-agent.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-enable-alma9-agent.yml b/.github/workflows/test-enable-alma9-agent.yml index d842ab9450..f8d982b9a1 100644 --- a/.github/workflows/test-enable-alma9-agent.yml +++ b/.github/workflows/test-enable-alma9-agent.yml @@ -15,7 +15,7 @@ jobs: - name: Build the Wazuh agent package working-directory: ./rpms run: | - sudo ./bash generate_rpm_package.sh -b master -t agent -a x86_64 --dev + bash generate_rpm_package.sh -b master -t agent -a x86_64 --dev echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV - name: Move the built package diff --git a/.github/workflows/test-enable-rhel9-agent.yml b/.github/workflows/test-enable-rhel9-agent.yml index 819940fbd4..4656838ad7 100644 --- a/.github/workflows/test-enable-rhel9-agent.yml +++ b/.github/workflows/test-enable-rhel9-agent.yml @@ -15,7 +15,7 @@ jobs: - name: Build the Wazuh agent package working-directory: ./rpms run: | - sudo ./bash generate_rpm_package.sh -b master -t agent -a x86_64 --dev + bash generate_rpm_package.sh -b master -t agent -a x86_64 --dev echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV - name: Move the built package diff --git a/.github/workflows/test-enable-rhel9-manager.yml b/.github/workflows/test-enable-rhel9-manager.yml index 5aa02fa990..2f97d11b8d 100644 --- a/.github/workflows/test-enable-rhel9-manager.yml +++ b/.github/workflows/test-enable-rhel9-manager.yml @@ -15,7 +15,7 @@ jobs: - name: Build the Wazuh agent package working-directory: ./rpms run: | - sudo ./bash generate_rpm_package.sh -b master -t manager -a x86_64 --dev + bash generate_rpm_package.sh -b master -t manager -a x86_64 --dev echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV - name: Move the built package diff --git a/.github/workflows/test-enable-rocky9-agent.yml b/.github/workflows/test-enable-rocky9-agent.yml index 6c78fc0d38..f58260d168 100644 --- a/.github/workflows/test-enable-rocky9-agent.yml +++ b/.github/workflows/test-enable-rocky9-agent.yml @@ -15,7 +15,7 @@ jobs: - name: Build the Wazuh agent package working-directory: ./rpms run: | - sudo ./bash generate_rpm_package.sh -b master -t agent -a x86_64 --dev + bash generate_rpm_package.sh -b master -t agent -a x86_64 --dev echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV - name: Move the built package From 8d49c5a3bed79d298aeb574ae8135fa2639ee1b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 20 Jan 2023 16:37:08 +0100 Subject: [PATCH 013/328] Fix test path in shared file with docker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-enable-alma9-agent.yml | 2 +- .github/workflows/test-enable-rhel9-agent.yml | 2 +- .github/workflows/test-enable-rhel9-manager.yml | 2 +- .github/workflows/test-enable-rocky9-agent.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-enable-alma9-agent.yml b/.github/workflows/test-enable-alma9-agent.yml index f8d982b9a1..e701155da4 100644 --- a/.github/workflows/test-enable-alma9-agent.yml +++ b/.github/workflows/test-enable-alma9-agent.yml @@ -25,4 +25,4 @@ jobs: sudo cp ./output/$PACKAGE_NAME $GITHUB_WORKSPACE/packages/$PACKAGE_NAME - name: Launch docker - run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages almalinux:9.1 bash /tests/install-and-test-agent.sh + run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel9-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages almalinux:9.1 bash /tests/install-and-test-agent.sh diff --git a/.github/workflows/test-enable-rhel9-agent.yml b/.github/workflows/test-enable-rhel9-agent.yml index 4656838ad7..10d3aaebd7 100644 --- a/.github/workflows/test-enable-rhel9-agent.yml +++ b/.github/workflows/test-enable-rhel9-agent.yml @@ -25,4 +25,4 @@ jobs: sudo cp ./output/$PACKAGE_NAME $GITHUB_WORKSPACE/packages/$PACKAGE_NAME - name: Launch docker - run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages redhat/ubi9 bash /tests/install-and-test-agent.sh + run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel9-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages redhat/ubi9 bash /tests/install-and-test-agent.sh diff --git a/.github/workflows/test-enable-rhel9-manager.yml b/.github/workflows/test-enable-rhel9-manager.yml index 2f97d11b8d..5617901e52 100644 --- a/.github/workflows/test-enable-rhel9-manager.yml +++ b/.github/workflows/test-enable-rhel9-manager.yml @@ -25,4 +25,4 @@ jobs: sudo cp ./output/$PACKAGE_NAME $GITHUB_WORKSPACE/packages/$PACKAGE_NAME - name: Launch docker - run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages redhat/ubi9-init bash /tests/install-and-test-manager.sh + run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel9-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages redhat/ubi9-init bash /tests/install-and-test-manager.sh diff --git a/.github/workflows/test-enable-rocky9-agent.yml b/.github/workflows/test-enable-rocky9-agent.yml index f58260d168..a3ee925101 100644 --- a/.github/workflows/test-enable-rocky9-agent.yml +++ b/.github/workflows/test-enable-rocky9-agent.yml @@ -25,4 +25,4 @@ jobs: sudo cp ./output/$PACKAGE_NAME $GITHUB_WORKSPACE/packages/$PACKAGE_NAME - name: Launch docker - run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages rockylinux:9 bash /tests/install-and-test-agent.sh + run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel9-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages rockylinux:9 bash /tests/install-and-test-agent.sh From 163d3b65402d0cb5a58f94288da44430f6e7eab5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 23 Jan 2023 17:14:17 +0100 Subject: [PATCH 014/328] Fixes to github actions tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../test-enable-rhel9-derivatives/install_and_test_agent.sh | 2 +- .../test-enable-rhel9-derivatives/install_and_test_manager.sh | 2 +- .github/workflows/test-enable-alma9-agent.yml | 2 +- .github/workflows/test-enable-rhel9-agent.yml | 2 +- .github/workflows/test-enable-rhel9-manager.yml | 2 +- .github/workflows/test-enable-rocky9-agent.yml | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/actions/test-enable-rhel9-derivatives/install_and_test_agent.sh b/.github/actions/test-enable-rhel9-derivatives/install_and_test_agent.sh index 2239dfc495..e403e3f960 100644 --- a/.github/actions/test-enable-rhel9-derivatives/install_and_test_agent.sh +++ b/.github/actions/test-enable-rhel9-derivatives/install_and_test_agent.sh @@ -1,7 +1,7 @@ #!/bin/bash echo "Installing Wazuh Agent." -yum install -y $PACKAGE_NAME +yum install -y "/packages/$1" echo "Enabling Wazuh Agent." systemctl enable wazuh-agent diff --git a/.github/actions/test-enable-rhel9-derivatives/install_and_test_manager.sh b/.github/actions/test-enable-rhel9-derivatives/install_and_test_manager.sh index 36af2b0ba2..d6bd719a87 100644 --- a/.github/actions/test-enable-rhel9-derivatives/install_and_test_manager.sh +++ b/.github/actions/test-enable-rhel9-derivatives/install_and_test_manager.sh @@ -1,7 +1,7 @@ #!/bin/bash echo "Installing Wazuh Manager." -yum install -y $PACKAGE_NAME +yum install -y "/packages/$1" echo "Enabling Wazuh Agent." systemctl enable wazuh-manager diff --git a/.github/workflows/test-enable-alma9-agent.yml b/.github/workflows/test-enable-alma9-agent.yml index e701155da4..8d62ff8aba 100644 --- a/.github/workflows/test-enable-alma9-agent.yml +++ b/.github/workflows/test-enable-alma9-agent.yml @@ -25,4 +25,4 @@ jobs: sudo cp ./output/$PACKAGE_NAME $GITHUB_WORKSPACE/packages/$PACKAGE_NAME - name: Launch docker - run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel9-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages almalinux:9.1 bash /tests/install-and-test-agent.sh + run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel9-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages almalinux:9.1 bash /tests/install_and_test_agent.sh $PACKAGE_NAME diff --git a/.github/workflows/test-enable-rhel9-agent.yml b/.github/workflows/test-enable-rhel9-agent.yml index 10d3aaebd7..d54740e256 100644 --- a/.github/workflows/test-enable-rhel9-agent.yml +++ b/.github/workflows/test-enable-rhel9-agent.yml @@ -25,4 +25,4 @@ jobs: sudo cp ./output/$PACKAGE_NAME $GITHUB_WORKSPACE/packages/$PACKAGE_NAME - name: Launch docker - run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel9-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages redhat/ubi9 bash /tests/install-and-test-agent.sh + run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel9-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages redhat/ubi9 bash /tests/install_and_test_agent.sh $PACKAGE_NAME diff --git a/.github/workflows/test-enable-rhel9-manager.yml b/.github/workflows/test-enable-rhel9-manager.yml index 5617901e52..71f7304c3c 100644 --- a/.github/workflows/test-enable-rhel9-manager.yml +++ b/.github/workflows/test-enable-rhel9-manager.yml @@ -25,4 +25,4 @@ jobs: sudo cp ./output/$PACKAGE_NAME $GITHUB_WORKSPACE/packages/$PACKAGE_NAME - name: Launch docker - run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel9-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages redhat/ubi9-init bash /tests/install-and-test-manager.sh + run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel9-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages redhat/ubi9-init bash /tests/install_and_test_manager.sh $PACKAGE_NAME diff --git a/.github/workflows/test-enable-rocky9-agent.yml b/.github/workflows/test-enable-rocky9-agent.yml index a3ee925101..07471dc381 100644 --- a/.github/workflows/test-enable-rocky9-agent.yml +++ b/.github/workflows/test-enable-rocky9-agent.yml @@ -25,4 +25,4 @@ jobs: sudo cp ./output/$PACKAGE_NAME $GITHUB_WORKSPACE/packages/$PACKAGE_NAME - name: Launch docker - run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel9-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages rockylinux:9 bash /tests/install-and-test-agent.sh + run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel9-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages rockylinux:9 bash /tests/install_and_test_agent.sh $PACKAGE_NAME From ef4db24d8a9fbe647ab0b7645bb40156ca97a75f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 24 Jan 2023 12:45:21 +0100 Subject: [PATCH 015/328] Add workflow to create rpm packages for all architectures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/create-rpm-packages.yml | 64 +++++++++++++++++++ .github/workflows/test-enable-alma9-agent.yml | 28 -------- .github/workflows/test-enable-rhel9-agent.yml | 28 -------- .../workflows/test-enable-rhel9-manager.yml | 28 -------- .../workflows/test-enable-rocky9-agent.yml | 28 -------- 5 files changed, 64 insertions(+), 112 deletions(-) create mode 100644 .github/workflows/create-rpm-packages.yml delete mode 100644 .github/workflows/test-enable-alma9-agent.yml delete mode 100644 .github/workflows/test-enable-rhel9-agent.yml delete mode 100644 .github/workflows/test-enable-rhel9-manager.yml delete mode 100644 .github/workflows/test-enable-rocky9-agent.yml diff --git a/.github/workflows/create-rpm-packages.yml b/.github/workflows/create-rpm-packages.yml new file mode 100644 index 0000000000..c5c10bb584 --- /dev/null +++ b/.github/workflows/create-rpm-packages.yml @@ -0,0 +1,64 @@ +name: Build Wazuh Packages - RPM - All architectures +on: + pull_request: + paths: + - 'rpms/SPECS/*' + - 'rpms/generate_rpm_package.sh' + - 'rpms/build.sh' + workflow_dispatch: + +jobs: + Wazuh-agent-rpm-package-builds-aarch64-armv7-ppc64le: + runs-on: ubuntu-latest + strategy: + matrix: + type: [agent, manager] + arch : [aarch64, armv7] + distro: [ubuntu18.04] + include: + - arch: ppc64le + distro: alpine_latest + type: agent + - arch: ppc64le + distro: alpine_latest + type: manager + steps: + - uses: actions/checkout@v3 + + - uses: uraimo/run-on-arch-action@v2 + name: Build the ${{ matrix.arch }} rpm Wazuh ${{ matrix.type }} package + working-directory: ./rpms + with: + arch: ${{ matrix.arch }} + distro: ${{ matrix.distro }} + githubToken: ${{ github.token }} + run: | + bash generate_rpm_package.sh -b master -t ${{ matrix.type }} -a ${{ matrix.arch }} --dev + echo "PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV + + - name: Upload Wazuh ${{ matrix.type }} ${{ matrix.arch }} package as artifact + uses: actions/upload-artifact@v2 + with: + name: $PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }} + path: ./rpms/output/$PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }} + + Wazuh-agent-rpm-package-builds-x86_64-i386: + runs-on: ubuntu-latest + strategy: + matrix: + type: [agent, manager] + arch : [x86_64, i386] + steps: + - uses: actions/checkout@v3 + + - name: Build the ${{ matrix.arch }} rpm Wazuh ${{ matrix.type }} package + working-directory: ./rpms + run: | + bash generate_rpm_package.sh -b master -t ${{ matrix.type }} -a ${{ matrix.arch }} --dev + echo "PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV + + - name: Upload Wazuh ${{ matrix.type }} ${{ matrix.arch }} package as artifact + uses: actions/upload-artifact@v2 + with: + name: $PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }} + path: ./rpms/output/$PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }} \ No newline at end of file diff --git a/.github/workflows/test-enable-alma9-agent.yml b/.github/workflows/test-enable-alma9-agent.yml deleted file mode 100644 index 8d62ff8aba..0000000000 --- a/.github/workflows/test-enable-alma9-agent.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Test the enabling of the Wazuh agent - AlmaLinux 9 - RPM -on: - pull_request: - paths: - - 'rpms/SPECS/*' - - 'rpms/generate_rpm_package.sh' - - 'rpms/build.sh' - workflow_dispatch: - -jobs: - Test-enable-wazuh-agent-alma9: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Build the Wazuh agent package - working-directory: ./rpms - run: | - bash generate_rpm_package.sh -b master -t agent -a x86_64 --dev - echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV - - - name: Move the built package - working-directory: ./rpms - run: | - mkdir $GITHUB_WORKSPACE/packages - sudo cp ./output/$PACKAGE_NAME $GITHUB_WORKSPACE/packages/$PACKAGE_NAME - - - name: Launch docker - run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel9-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages almalinux:9.1 bash /tests/install_and_test_agent.sh $PACKAGE_NAME diff --git a/.github/workflows/test-enable-rhel9-agent.yml b/.github/workflows/test-enable-rhel9-agent.yml deleted file mode 100644 index d54740e256..0000000000 --- a/.github/workflows/test-enable-rhel9-agent.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Test the enabling of the Wazuh agent - Red Hat Enterprise Linux 9 - RPM -on: - pull_request: - paths: - - 'rpms/SPECS/*' - - 'rpms/generate_rpm_package.sh' - - 'rpms/build.sh' - workflow_dispatch: - -jobs: - Test-enable-wazuh-agent-rhel9: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Build the Wazuh agent package - working-directory: ./rpms - run: | - bash generate_rpm_package.sh -b master -t agent -a x86_64 --dev - echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV - - - name: Move the built package - working-directory: ./rpms - run: | - mkdir $GITHUB_WORKSPACE/packages - sudo cp ./output/$PACKAGE_NAME $GITHUB_WORKSPACE/packages/$PACKAGE_NAME - - - name: Launch docker - run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel9-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages redhat/ubi9 bash /tests/install_and_test_agent.sh $PACKAGE_NAME diff --git a/.github/workflows/test-enable-rhel9-manager.yml b/.github/workflows/test-enable-rhel9-manager.yml deleted file mode 100644 index 71f7304c3c..0000000000 --- a/.github/workflows/test-enable-rhel9-manager.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Test the enabling of the Wazuh manager - Red Hat Enterprise Linux 9 - RPM -on: - pull_request: - paths: - - 'rpms/SPECS/*' - - 'rpms/generate_rpm_package.sh' - - 'rpms/build.sh' - workflow_dispatch: - -jobs: - Test-enable-wazuh-manager-rhel9: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Build the Wazuh agent package - working-directory: ./rpms - run: | - bash generate_rpm_package.sh -b master -t manager -a x86_64 --dev - echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV - - - name: Move the built package - working-directory: ./rpms - run: | - mkdir $GITHUB_WORKSPACE/packages - sudo cp ./output/$PACKAGE_NAME $GITHUB_WORKSPACE/packages/$PACKAGE_NAME - - - name: Launch docker - run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel9-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages redhat/ubi9-init bash /tests/install_and_test_manager.sh $PACKAGE_NAME diff --git a/.github/workflows/test-enable-rocky9-agent.yml b/.github/workflows/test-enable-rocky9-agent.yml deleted file mode 100644 index 07471dc381..0000000000 --- a/.github/workflows/test-enable-rocky9-agent.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Test the enabling of the Wazuh agent - Rocky Linux 9 - RPM -on: - pull_request: - paths: - - 'rpms/SPECS/*' - - 'rpms/generate_rpm_package.sh' - - 'rpms/build.sh' - workflow_dispatch: - -jobs: - Test-enable-wazuh-agent-rocky9: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Build the Wazuh agent package - working-directory: ./rpms - run: | - bash generate_rpm_package.sh -b master -t agent -a x86_64 --dev - echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV - - - name: Move the built package - working-directory: ./rpms - run: | - mkdir $GITHUB_WORKSPACE/packages - sudo cp ./output/$PACKAGE_NAME $GITHUB_WORKSPACE/packages/$PACKAGE_NAME - - - name: Launch docker - run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-enable-rhel9-derivatives/:/tests -v $GITHUB_WORKSPACE/packages/:/packages rockylinux:9 bash /tests/install_and_test_agent.sh $PACKAGE_NAME From 752f5cc9d19fc9f14e18ead7f457ac06f5762692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 24 Jan 2023 13:58:34 +0100 Subject: [PATCH 016/328] Change working directory position on package creation workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/create-rpm-packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create-rpm-packages.yml b/.github/workflows/create-rpm-packages.yml index c5c10bb584..d151935164 100644 --- a/.github/workflows/create-rpm-packages.yml +++ b/.github/workflows/create-rpm-packages.yml @@ -27,11 +27,11 @@ jobs: - uses: uraimo/run-on-arch-action@v2 name: Build the ${{ matrix.arch }} rpm Wazuh ${{ matrix.type }} package - working-directory: ./rpms with: arch: ${{ matrix.arch }} distro: ${{ matrix.distro }} githubToken: ${{ github.token }} + working-directory: ./rpms run: | bash generate_rpm_package.sh -b master -t ${{ matrix.type }} -a ${{ matrix.arch }} --dev echo "PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV From 3861d8a44e9bcc155916bd23d98eb014f4a96925 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 24 Jan 2023 14:41:29 +0100 Subject: [PATCH 017/328] Unify install and enable tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../install_and_test_agent.sh | 14 ------- .../install_and_test_manager.sh | 14 ------- .../test-install-enable/install_and_enable.sh | 21 ++++++++++ .../workflows/test-install-and-enable-rpm.yml | 41 +++++++++++++++++++ 4 files changed, 62 insertions(+), 28 deletions(-) delete mode 100644 .github/actions/test-enable-rhel9-derivatives/install_and_test_agent.sh delete mode 100644 .github/actions/test-enable-rhel9-derivatives/install_and_test_manager.sh create mode 100644 .github/actions/test-install-enable/install_and_enable.sh create mode 100644 .github/workflows/test-install-and-enable-rpm.yml diff --git a/.github/actions/test-enable-rhel9-derivatives/install_and_test_agent.sh b/.github/actions/test-enable-rhel9-derivatives/install_and_test_agent.sh deleted file mode 100644 index e403e3f960..0000000000 --- a/.github/actions/test-enable-rhel9-derivatives/install_and_test_agent.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -echo "Installing Wazuh Agent." -yum install -y "/packages/$1" - -echo "Enabling Wazuh Agent." -systemctl enable wazuh-agent -if [ "$?" -eq 0 ]; then - echo "Wazuh agent enabled - Test passed correctly." - exit 0 -else - echo "Error: Wazuh agent not enabled." - exit 1 -fi \ No newline at end of file diff --git a/.github/actions/test-enable-rhel9-derivatives/install_and_test_manager.sh b/.github/actions/test-enable-rhel9-derivatives/install_and_test_manager.sh deleted file mode 100644 index d6bd719a87..0000000000 --- a/.github/actions/test-enable-rhel9-derivatives/install_and_test_manager.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -echo "Installing Wazuh Manager." -yum install -y "/packages/$1" - -echo "Enabling Wazuh Agent." -systemctl enable wazuh-manager -if [ "$?" -eq 0 ]; then - echo "Wazuh agent enabled - Test passed correctly." - exit 0 -else - echo "Error: Wazuh agent not enabled." - exit 1 -fi \ No newline at end of file diff --git a/.github/actions/test-install-enable/install_and_enable.sh b/.github/actions/test-install-enable/install_and_enable.sh new file mode 100644 index 0000000000..5753e9d6fe --- /dev/null +++ b/.github/actions/test-install-enable/install_and_enable.sh @@ -0,0 +1,21 @@ +#!/bin/bash +set -x +ls -la /packages +echo "Installing Wazuh $2." +source /etc/os-release +if [ "$ID" = "centos" ] && [ "$VERSION_ID" = "8" ]; then + find /etc/yum.repos.d/ -type f -exec sed -i 's/mirrorlist/#mirrorlist/g' {} \; + find /etc/yum.repos.d/ -type f -exec sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' {} \; +fi +yum install -y "/packages/$1" + +echo "Enabling Wazuh $2." +systemctl enable wazuh-$2 +if [ "$?" -eq 0 ]; then + echo "Wazuh $2 enabled - Test passed correctly." + exit 0 +else + echo "Error: Wazuh $2 not enabled." + exit 1 +fi +set +x \ No newline at end of file diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml new file mode 100644 index 0000000000..862e3d40ee --- /dev/null +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -0,0 +1,41 @@ +name: Test install and enable Wazuh agent and manager - RPM +on: + pull_request: + paths: + - 'rpms/SPECS/*' + - 'rpms/generate_rpm_package.sh' + - 'rpms/build.sh' + workflow_dispatch: + +jobs: + Test-install-and-enable-rpm-systems: + runs-on: ubuntu-latest + strategy: + matrix: + distro: [almalinux:9.1, oraclelinux:9, rockylinux:9.1, centos:7, centos:8, redhat/ubi8, redhat/ubi9] + type: [agent, manager] + exclude: + - distro: almalinux:9.1 + type: manager + - distro: oraclelinux:9 + type: manager + - distro: rockylinux:9.1 + type: manager + - distro: centos:9 + type: manager + steps: + - uses: actions/checkout@v3 + + - name: Setup directories and variables + run: | + mkdir $GITHUB_WORKSPACE/packages + echo 'PACKAGE_NAME=wazuh-${{ matrix.type }}-4.4.0-1.x86_64.rpm' >> $GITHUB_ENV + + - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.distro }} + working-directory: ./rpms + run: | + curl -o $PACKAGE_NAME https://packages-dev.wazuh.com/pre-release/yum/$PACKAGE_NAME + mv $PACKAGE_NAME $GITHUB_WORKSPACE/packages + + - name: Launch docker + run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-install-enable/:/tests -v $GITHUB_WORKSPACE/packages/:/packages ${{ matrix.distro }} bash /tests/install_and_enable.sh $PACKAGE_NAME ${{ matrix.type }} \ No newline at end of file From c85eb2ce079def907e83be7b1506d84891dc6c5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 24 Jan 2023 14:42:24 +0100 Subject: [PATCH 018/328] Remove working directory in package creation workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/create-rpm-packages.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/create-rpm-packages.yml b/.github/workflows/create-rpm-packages.yml index d151935164..ea23bae456 100644 --- a/.github/workflows/create-rpm-packages.yml +++ b/.github/workflows/create-rpm-packages.yml @@ -31,9 +31,8 @@ jobs: arch: ${{ matrix.arch }} distro: ${{ matrix.distro }} githubToken: ${{ github.token }} - working-directory: ./rpms run: | - bash generate_rpm_package.sh -b master -t ${{ matrix.type }} -a ${{ matrix.arch }} --dev + bash ./rpms/generate_rpm_package.sh -b master -t ${{ matrix.type }} -a ${{ matrix.arch }} --dev echo "PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV - name: Upload Wazuh ${{ matrix.type }} ${{ matrix.arch }} package as artifact From 26c962d368f88b2c9750998fc3840d58a3354ff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 24 Jan 2023 14:56:51 +0100 Subject: [PATCH 019/328] Fixes in install and enable test workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../test-install-enable/install_and_enable.sh | 5 +---- .github/workflows/test-install-and-enable-rpm.yml | 14 +++++++------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/actions/test-install-enable/install_and_enable.sh b/.github/actions/test-install-enable/install_and_enable.sh index 5753e9d6fe..d97cfb83ec 100644 --- a/.github/actions/test-install-enable/install_and_enable.sh +++ b/.github/actions/test-install-enable/install_and_enable.sh @@ -1,6 +1,4 @@ #!/bin/bash -set -x -ls -la /packages echo "Installing Wazuh $2." source /etc/os-release if [ "$ID" = "centos" ] && [ "$VERSION_ID" = "8" ]; then @@ -17,5 +15,4 @@ if [ "$?" -eq 0 ]; then else echo "Error: Wazuh $2 not enabled." exit 1 -fi -set +x \ No newline at end of file +fi \ No newline at end of file diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 862e3d40ee..aff4f0bea5 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -12,16 +12,14 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - distro: [almalinux:9.1, oraclelinux:9, rockylinux:9.1, centos:7, centos:8, redhat/ubi8, redhat/ubi9] - type: [agent, manager] + distro: [ almalinux\:9, oraclelinux\:9, rockylinux\:9, centos\:7, centos\:8, redhat/ubi8, redhat/ubi9] + type: [manager] exclude: - - distro: almalinux:9.1 + - distro: almalinux\:9 type: manager - - distro: oraclelinux:9 + - distro: oraclelinux\:9 type: manager - - distro: rockylinux:9.1 - type: manager - - distro: centos:9 + - distro: rockylinux\:9 type: manager steps: - uses: actions/checkout@v3 @@ -37,5 +35,7 @@ jobs: curl -o $PACKAGE_NAME https://packages-dev.wazuh.com/pre-release/yum/$PACKAGE_NAME mv $PACKAGE_NAME $GITHUB_WORKSPACE/packages + - run: find $GITHUB_WORKSPACE + - name: Launch docker run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-install-enable/:/tests -v $GITHUB_WORKSPACE/packages/:/packages ${{ matrix.distro }} bash /tests/install_and_enable.sh $PACKAGE_NAME ${{ matrix.type }} \ No newline at end of file From 1263c736614fbec674a1833cc5630b8cbfabd484 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 24 Jan 2023 15:50:17 +0100 Subject: [PATCH 020/328] Remove `:` from docker images in install and enable test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../workflows/test-install-and-enable-rpm.yml | 43 ++++++++++++++----- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index aff4f0bea5..f5593d2c07 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -12,14 +12,39 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - distro: [ almalinux\:9, oraclelinux\:9, rockylinux\:9, centos\:7, centos\:8, redhat/ubi8, redhat/ubi9] - type: [manager] - exclude: - - distro: almalinux\:9 + include: + - imagename: almalinux + version: 9 + type: agent + - imagename: oraclelinux + version: 9 + type: agent + - imagename: rockylinux + version: 9 + type: agent + - imagename: centos + version: 7 + type: agent + - imagename: centos + version: 7 type: manager - - distro: oraclelinux\:9 + - imagename: centos + version: 8 + type: agent + - imagename: centos + version: 8 type: manager - - distro: rockylinux\:9 + - imagename: redhat/ubi8 + version: latest + type: agent + - imagename: redhat/ubi8 + version: latest + type: manager + - imagename: redhat/ubi9 + version: latest + type: agent + - imagename: redhat/ubi9 + version: latest type: manager steps: - uses: actions/checkout@v3 @@ -29,13 +54,11 @@ jobs: mkdir $GITHUB_WORKSPACE/packages echo 'PACKAGE_NAME=wazuh-${{ matrix.type }}-4.4.0-1.x86_64.rpm' >> $GITHUB_ENV - - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.distro }} + - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.imagename }}:${{ matrix.version }} working-directory: ./rpms run: | curl -o $PACKAGE_NAME https://packages-dev.wazuh.com/pre-release/yum/$PACKAGE_NAME mv $PACKAGE_NAME $GITHUB_WORKSPACE/packages - - run: find $GITHUB_WORKSPACE - - name: Launch docker - run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-install-enable/:/tests -v $GITHUB_WORKSPACE/packages/:/packages ${{ matrix.distro }} bash /tests/install_and_enable.sh $PACKAGE_NAME ${{ matrix.type }} \ No newline at end of file + run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-install-enable/:/tests -v $GITHUB_WORKSPACE/packages/:/packages ${{ matrix.imagename }}:${{ matrix.version }} bash /tests/install_and_enable.sh $PACKAGE_NAME ${{ matrix.type }} \ No newline at end of file From 59c5a9c4c3fc4f4efab5ee13f89e11012598f269 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 24 Jan 2023 16:18:39 +0100 Subject: [PATCH 021/328] Disable automatic cancel when one fails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/create-rpm-packages.yml | 1 + .github/workflows/test-install-and-enable-rpm.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/create-rpm-packages.yml b/.github/workflows/create-rpm-packages.yml index ea23bae456..f00d2b8f56 100644 --- a/.github/workflows/create-rpm-packages.yml +++ b/.github/workflows/create-rpm-packages.yml @@ -22,6 +22,7 @@ jobs: - arch: ppc64le distro: alpine_latest type: manager + fail-fast: false steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index f5593d2c07..27b35fa4ab 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -46,6 +46,7 @@ jobs: - imagename: redhat/ubi9 version: latest type: manager + fail-fast: false steps: - uses: actions/checkout@v3 From ca0619f24cb35109af38f8124868fba0ec55b4db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 24 Jan 2023 16:39:31 +0100 Subject: [PATCH 022/328] Install docker on rare architectures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../common-tools/install_docker_on_ubuntu.sh | 9 +++++++++ .github/workflows/create-rpm-packages.yml | 17 +++++++++-------- 2 files changed, 18 insertions(+), 8 deletions(-) create mode 100644 .github/actions/common-tools/install_docker_on_ubuntu.sh diff --git a/.github/actions/common-tools/install_docker_on_ubuntu.sh b/.github/actions/common-tools/install_docker_on_ubuntu.sh new file mode 100644 index 0000000000..fdd3ce2965 --- /dev/null +++ b/.github/actions/common-tools/install_docker_on_ubuntu.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +apt-get update +apt-get install ca-certificates curl gnupg lsb-release +mkdir -p /etc/apt/keyrings +curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg +echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null +apt-get update +apt-get install -y docker-ce docker-ce-cli containerd.io \ No newline at end of file diff --git a/.github/workflows/create-rpm-packages.yml b/.github/workflows/create-rpm-packages.yml index f00d2b8f56..4ca3622895 100644 --- a/.github/workflows/create-rpm-packages.yml +++ b/.github/workflows/create-rpm-packages.yml @@ -14,26 +14,27 @@ jobs: matrix: type: [agent, manager] arch : [aarch64, armv7] - distro: [ubuntu18.04] - include: - - arch: ppc64le + distro: [ubuntu18.04, alpine_latest] + exclude: + - arch: armv7 distro: alpine_latest - type: agent - - arch: ppc64le + - arch: aarch64 distro: alpine_latest - type: manager + - arch: ppc64le + distro: ubuntu18.04 fail-fast: false steps: - uses: actions/checkout@v3 - - uses: uraimo/run-on-arch-action@v2 + - uses: uraimo/run-on-arch-action@v2.5.0 name: Build the ${{ matrix.arch }} rpm Wazuh ${{ matrix.type }} package with: arch: ${{ matrix.arch }} distro: ${{ matrix.distro }} githubToken: ${{ github.token }} run: | - bash ./rpms/generate_rpm_package.sh -b master -t ${{ matrix.type }} -a ${{ matrix.arch }} --dev + bash $GItHUB_WORKSPACE/.github/actions/common-tools/install_docker_on_ubuntu.sh + bash $GITHUB_WORKSPACE/rpms/generate_rpm_package.sh -b master -t ${{ matrix.type }} -a ${{ matrix.arch }} --dev echo "PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV - name: Upload Wazuh ${{ matrix.type }} ${{ matrix.arch }} package as artifact From cec21cbe3b21a418cc0e7b8ee987618624302b40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 24 Jan 2023 16:41:24 +0100 Subject: [PATCH 023/328] Fix variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/create-rpm-packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/create-rpm-packages.yml b/.github/workflows/create-rpm-packages.yml index 4ca3622895..7f47f66bfe 100644 --- a/.github/workflows/create-rpm-packages.yml +++ b/.github/workflows/create-rpm-packages.yml @@ -33,7 +33,7 @@ jobs: distro: ${{ matrix.distro }} githubToken: ${{ github.token }} run: | - bash $GItHUB_WORKSPACE/.github/actions/common-tools/install_docker_on_ubuntu.sh + bash $GITHUB_WORKSPACE/.github/actions/common-tools/install_docker_on_ubuntu.sh bash $GITHUB_WORKSPACE/rpms/generate_rpm_package.sh -b master -t ${{ matrix.type }} -a ${{ matrix.arch }} --dev echo "PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV From a316ac26d3b860bd2f93f33a801e6ba53480bf31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 24 Jan 2023 17:45:32 +0100 Subject: [PATCH 024/328] The package is now downloaded as an artifact from the package creation workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/create-rpm-packages.yml | 10 +++++----- .github/workflows/test-install-and-enable-rpm.yml | 10 +++++++++- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/create-rpm-packages.yml b/.github/workflows/create-rpm-packages.yml index 7f47f66bfe..87cf247979 100644 --- a/.github/workflows/create-rpm-packages.yml +++ b/.github/workflows/create-rpm-packages.yml @@ -40,8 +40,8 @@ jobs: - name: Upload Wazuh ${{ matrix.type }} ${{ matrix.arch }} package as artifact uses: actions/upload-artifact@v2 with: - name: $PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }} - path: ./rpms/output/$PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }} + name: ${PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}} + path: ./rpms/output/${PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}} Wazuh-agent-rpm-package-builds-x86_64-i386: runs-on: ubuntu-latest @@ -56,10 +56,10 @@ jobs: working-directory: ./rpms run: | bash generate_rpm_package.sh -b master -t ${{ matrix.type }} -a ${{ matrix.arch }} --dev - echo "PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV + echo "{PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}}=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV - name: Upload Wazuh ${{ matrix.type }} ${{ matrix.arch }} package as artifact uses: actions/upload-artifact@v2 with: - name: $PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }} - path: ./rpms/output/$PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }} \ No newline at end of file + name: ${PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}} + path: ./rpms/output/${PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}} \ No newline at end of file diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 27b35fa4ab..7b8a30eff8 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -55,10 +55,18 @@ jobs: mkdir $GITHUB_WORKSPACE/packages echo 'PACKAGE_NAME=wazuh-${{ matrix.type }}-4.4.0-1.x86_64.rpm' >> $GITHUB_ENV + - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.imagename }}:${{ matrix.version }} + uses: dawidd6/action-download-artifact@v2 + with: + workflow: create-rpm-packages.yml + workflow_conclusion: success + name: $PACKAGE_NAME + + - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.imagename }}:${{ matrix.version }} working-directory: ./rpms run: | - curl -o $PACKAGE_NAME https://packages-dev.wazuh.com/pre-release/yum/$PACKAGE_NAME + #curl -o $PACKAGE_NAME https://packages-dev.wazuh.com/pre-release/yum/$PACKAGE_NAME mv $PACKAGE_NAME $GITHUB_WORKSPACE/packages - name: Launch docker From 0ad5cb22f6cb126e30659f2e14fa3ee41f3e5f9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 24 Jan 2023 17:45:58 +0100 Subject: [PATCH 025/328] The uploading of the package creation images is automatised in a GitHub Action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../upload-package-creation-images.yml | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/upload-package-creation-images.yml diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml new file mode 100644 index 0000000000..8c87d15916 --- /dev/null +++ b/.github/workflows/upload-package-creation-images.yml @@ -0,0 +1,40 @@ +name: Upload package creation Docker images +on: + pull_request: + paths: + - 'rpms/CentOS/*' + workflow_dispatch: + +jobs: + Upload RPM x86_64 image: + runs-on: ubuntu-latest + strategy: + matrix: + image: [ \ + {CONTAINER_NAME: 'rpm_builder_x86', DOCKERFILE_PATH: '$GITHUB_WORKSPACE/rpms/CentOS/6/x86_64'}, \ + {CONTAINER_NAME: 'rpm_builder_i386', DOCKERFILE_PATH: '$GITHUB_WORKSPACE/rpms/CentOS/6/i386'}, \ + {CONTAINER_NAME: 'rpm_builder_aarch64', DOCKERFILE_PATH: '$GITHUB_WORKSPACE/rpms/CentOS/7/aarch64'}, \ + {CONTAINER_NAME: 'rpm_builder_ppc64le', DOCKERFILE_PATH: '$GITHUB_WORKSPACE/rpms/CentOS/7/ppc64le'}, \ + {CONTAINER_NAME: 'rpm_builder_armv7', DOCKERFILE_PATH: '$GITHUB_WORKSPACE/rpms/CentOS/7/armv7hl'} + ] + steps: + + - uses: actions/checkout@v2 + - uses: dorny/paths-filter@v2 + id: changes + with: + filters: | + src: + - 'src/**' + + # run only if some file in 'src' folder was changed +- if: steps.changes.outputs.src == 'true' + run: ... + - name: Build and push image ${{ image.CONTAINER_NAME }} to GIthub Container Registry + uses: pmorelli92/github-container-registry-build-push@2.0.0 + name: Build and Publish latest service image + with: + github-push-secret: ${{secrets.GITHUB_TOKEN}} + docker-image-name: ${{ image.CONTAINER_NAME }} + docker-image-tag: latest + dockerfile-path: ${{ image.DOCKERFILE_PATH }}/Dockerfile \ No newline at end of file From 4adee7229688898323b0123653c8be2411438f6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 25 Jan 2023 09:39:39 +0100 Subject: [PATCH 026/328] Fixes in upload images workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../workflows/upload-package-creation-images.yml | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index 8c87d15916..788d097fa6 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -15,24 +15,14 @@ jobs: {CONTAINER_NAME: 'rpm_builder_i386', DOCKERFILE_PATH: '$GITHUB_WORKSPACE/rpms/CentOS/6/i386'}, \ {CONTAINER_NAME: 'rpm_builder_aarch64', DOCKERFILE_PATH: '$GITHUB_WORKSPACE/rpms/CentOS/7/aarch64'}, \ {CONTAINER_NAME: 'rpm_builder_ppc64le', DOCKERFILE_PATH: '$GITHUB_WORKSPACE/rpms/CentOS/7/ppc64le'}, \ - {CONTAINER_NAME: 'rpm_builder_armv7', DOCKERFILE_PATH: '$GITHUB_WORKSPACE/rpms/CentOS/7/armv7hl'} - ] + {CONTAINER_NAME: 'rpm_builder_armv7', DOCKERFILE_PATH: '$GITHUB_WORKSPACE/rpms/CentOS/7/armv7hl'} ] steps: - - uses: actions/checkout@v2 - - uses: dorny/paths-filter@v2 - id: changes - with: - filters: | - src: - - 'src/**' # run only if some file in 'src' folder was changed -- if: steps.changes.outputs.src == 'true' - run: ... - - name: Build and push image ${{ image.CONTAINER_NAME }} to GIthub Container Registry + - if: steps.changes.outputs.src == 'true' + name: Build and push image ${{ image.CONTAINER_NAME }} to GIthub Container Registry uses: pmorelli92/github-container-registry-build-push@2.0.0 - name: Build and Publish latest service image with: github-push-secret: ${{secrets.GITHUB_TOKEN}} docker-image-name: ${{ image.CONTAINER_NAME }} From 34e79d291e6b86b0b7155ef1552baafd0ff81a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 25 Jan 2023 09:45:04 +0100 Subject: [PATCH 027/328] Change file name for build packages workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../{create-rpm-packages.yml => build-rpm-packages.yml} | 1 + 1 file changed, 1 insertion(+) rename .github/workflows/{create-rpm-packages.yml => build-rpm-packages.yml} (99%) diff --git a/.github/workflows/create-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml similarity index 99% rename from .github/workflows/create-rpm-packages.yml rename to .github/workflows/build-rpm-packages.yml index 87cf247979..7bb57cd24b 100644 --- a/.github/workflows/create-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -49,6 +49,7 @@ jobs: matrix: type: [agent, manager] arch : [x86_64, i386] + fail-fast: false steps: - uses: actions/checkout@v3 From c42c420a30033921ffdbf7b0b27e95403997d7e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 25 Jan 2023 09:45:25 +0100 Subject: [PATCH 028/328] More syntax fixes in upload images workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-package-creation-images.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index 788d097fa6..3442091818 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -10,12 +10,8 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - image: [ \ - {CONTAINER_NAME: 'rpm_builder_x86', DOCKERFILE_PATH: '$GITHUB_WORKSPACE/rpms/CentOS/6/x86_64'}, \ - {CONTAINER_NAME: 'rpm_builder_i386', DOCKERFILE_PATH: '$GITHUB_WORKSPACE/rpms/CentOS/6/i386'}, \ - {CONTAINER_NAME: 'rpm_builder_aarch64', DOCKERFILE_PATH: '$GITHUB_WORKSPACE/rpms/CentOS/7/aarch64'}, \ - {CONTAINER_NAME: 'rpm_builder_ppc64le', DOCKERFILE_PATH: '$GITHUB_WORKSPACE/rpms/CentOS/7/ppc64le'}, \ - {CONTAINER_NAME: 'rpm_builder_armv7', DOCKERFILE_PATH: '$GITHUB_WORKSPACE/rpms/CentOS/7/armv7hl'} ] + image: [ {CONTAINER_NAME: rpm_builder_x86, DOCKERFILE_PATH: $GITHUB_WORKSPACE/rpms/CentOS/6/x86_64}, {CONTAINER_NAME: rpm_builder_i386, DOCKERFILE_PATH: $GITHUB_WORKSPACE/rpms/CentOS/6/i386}, {CONTAINER_NAME: rpm_builder_aarch64, DOCKERFILE_PATH: $GITHUB_WORKSPACE/rpms/CentOS/7/aarch64}, {CONTAINER_NAME: rpm_builder_ppc64le, DOCKERFILE_PATH: $GITHUB_WORKSPACE/rpms/CentOS/7/ppc64le}, {CONTAINER_NAME: rpm_builder_armv7, DOCKERFILE_PATH: $GITHUB_WORKSPACE/rpms/CentOS/7/armv7hl} ] + fail-fast: false steps: - uses: actions/checkout@v2 From fa93d78ffb819c975eb5f9603d818c612a764f83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 25 Jan 2023 09:53:20 +0100 Subject: [PATCH 029/328] Run upload images worflow when changed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-package-creation-images.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index 3442091818..c71baec10c 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -3,6 +3,7 @@ on: pull_request: paths: - 'rpms/CentOS/*' + - '.github/workflows/upload-package-creation-images.yml' workflow_dispatch: jobs: From 40c5e745f1d208fdcfc039ede540381ab7196e2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 25 Jan 2023 10:11:46 +0100 Subject: [PATCH 030/328] More syntax fixes for upload images workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-package-creation-images.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index c71baec10c..5791a85358 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -7,7 +7,7 @@ on: workflow_dispatch: jobs: - Upload RPM x86_64 image: + Upload-RPM-x86_64-image: runs-on: ubuntu-latest strategy: matrix: @@ -16,12 +16,10 @@ jobs: steps: - uses: actions/checkout@v2 - # run only if some file in 'src' folder was changed - - if: steps.changes.outputs.src == 'true' - name: Build and push image ${{ image.CONTAINER_NAME }} to GIthub Container Registry + - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} to Github Container Registry uses: pmorelli92/github-container-registry-build-push@2.0.0 with: github-push-secret: ${{secrets.GITHUB_TOKEN}} - docker-image-name: ${{ image.CONTAINER_NAME }} + docker-image-name: ${{ matrix.image.CONTAINER_NAME }} docker-image-tag: latest - dockerfile-path: ${{ image.DOCKERFILE_PATH }}/Dockerfile \ No newline at end of file + dockerfile-path: ${{ matrix.image.DOCKERFILE_PATH }}/Dockerfile \ No newline at end of file From fc001069f4e75fa75b0b317c2720614587cd4fe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 25 Jan 2023 10:43:24 +0100 Subject: [PATCH 031/328] Change path for dockerfile in upload image workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-package-creation-images.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index 5791a85358..fec5b5710c 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -2,8 +2,13 @@ name: Upload package creation Docker images on: pull_request: paths: - - 'rpms/CentOS/*' - '.github/workflows/upload-package-creation-images.yml' + push: + branches: + - master + - 4.4 + paths: + - './rpms/CentOS/*' workflow_dispatch: jobs: @@ -11,7 +16,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - image: [ {CONTAINER_NAME: rpm_builder_x86, DOCKERFILE_PATH: $GITHUB_WORKSPACE/rpms/CentOS/6/x86_64}, {CONTAINER_NAME: rpm_builder_i386, DOCKERFILE_PATH: $GITHUB_WORKSPACE/rpms/CentOS/6/i386}, {CONTAINER_NAME: rpm_builder_aarch64, DOCKERFILE_PATH: $GITHUB_WORKSPACE/rpms/CentOS/7/aarch64}, {CONTAINER_NAME: rpm_builder_ppc64le, DOCKERFILE_PATH: $GITHUB_WORKSPACE/rpms/CentOS/7/ppc64le}, {CONTAINER_NAME: rpm_builder_armv7, DOCKERFILE_PATH: $GITHUB_WORKSPACE/rpms/CentOS/7/armv7hl} ] + image: [ {CONTAINER_NAME: rpm_builder_x86, DOCKERFILE_PATH: /rpms/CentOS/6/x86_64}, {CONTAINER_NAME: rpm_builder_i386, DOCKERFILE_PATH: /rpms/CentOS/6/i386}, {CONTAINER_NAME: rpm_builder_aarch64, DOCKERFILE_PATH: /rpms/CentOS/7/aarch64}, {CONTAINER_NAME: rpm_builder_ppc64le, DOCKERFILE_PATH: /rpms/CentOS/7/ppc64le}, {CONTAINER_NAME: rpm_builder_armv7, DOCKERFILE_PATH: /rpms/CentOS/7/armv7hl} ] fail-fast: false steps: - uses: actions/checkout@v2 @@ -22,4 +27,4 @@ jobs: github-push-secret: ${{secrets.GITHUB_TOKEN}} docker-image-name: ${{ matrix.image.CONTAINER_NAME }} docker-image-tag: latest - dockerfile-path: ${{ matrix.image.DOCKERFILE_PATH }}/Dockerfile \ No newline at end of file + dockerfile-path: $GITHUB_WORKSPACE/${{ matrix.image.DOCKERFILE_PATH }}/Dockerfile \ No newline at end of file From 6a2552b5ec38f696c13c76af885e56ba3899189a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 25 Jan 2023 11:05:03 +0100 Subject: [PATCH 032/328] Remove unnecessary slash in path for Dockerfile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-package-creation-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index fec5b5710c..4737409c36 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -27,4 +27,4 @@ jobs: github-push-secret: ${{secrets.GITHUB_TOKEN}} docker-image-name: ${{ matrix.image.CONTAINER_NAME }} docker-image-tag: latest - dockerfile-path: $GITHUB_WORKSPACE/${{ matrix.image.DOCKERFILE_PATH }}/Dockerfile \ No newline at end of file + dockerfile-path: $GITHUB_WORKSPACE${{ matrix.image.DOCKERFILE_PATH }}/Dockerfile \ No newline at end of file From 7d4e0568e4ca69cc1a770664878edfab52c46422 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 25 Jan 2023 11:05:24 +0100 Subject: [PATCH 033/328] Add cancel of last runs for test install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-rpm.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 7b8a30eff8..efea81a784 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -8,6 +8,15 @@ on: workflow_dispatch: jobs: + Cancel-previous-runs: + name: 'Cancel Previous Runs' + runs-on: ubuntu-latest + timeout-minutes: 3 + steps: + - uses: styfle/cancel-workflow-action + with: + workflow_id: ${{ github.run_id }} + Test-install-and-enable-rpm-systems: runs-on: ubuntu-latest strategy: From c046b70412e998e6288f9806497b2af8c97cffcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 25 Jan 2023 11:39:24 +0100 Subject: [PATCH 034/328] Fix calls to env variable GITHUB_WORKSPACE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-rpm-packages.yml | 5 ++--- .github/workflows/upload-package-creation-images.yml | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 7bb57cd24b..c92a455252 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -41,7 +41,7 @@ jobs: uses: actions/upload-artifact@v2 with: name: ${PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}} - path: ./rpms/output/${PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}} + path: ${{github.workspace}}/rpms/output/${PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}} Wazuh-agent-rpm-package-builds-x86_64-i386: runs-on: ubuntu-latest @@ -49,7 +49,6 @@ jobs: matrix: type: [agent, manager] arch : [x86_64, i386] - fail-fast: false steps: - uses: actions/checkout@v3 @@ -63,4 +62,4 @@ jobs: uses: actions/upload-artifact@v2 with: name: ${PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}} - path: ./rpms/output/${PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}} \ No newline at end of file + path: ${{github.workspace}}/rpms/output/${PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}} \ No newline at end of file diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index 4737409c36..81ceb32f49 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -8,7 +8,7 @@ on: - master - 4.4 paths: - - './rpms/CentOS/*' + - 'rpms/CentOS/*' workflow_dispatch: jobs: @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - image: [ {CONTAINER_NAME: rpm_builder_x86, DOCKERFILE_PATH: /rpms/CentOS/6/x86_64}, {CONTAINER_NAME: rpm_builder_i386, DOCKERFILE_PATH: /rpms/CentOS/6/i386}, {CONTAINER_NAME: rpm_builder_aarch64, DOCKERFILE_PATH: /rpms/CentOS/7/aarch64}, {CONTAINER_NAME: rpm_builder_ppc64le, DOCKERFILE_PATH: /rpms/CentOS/7/ppc64le}, {CONTAINER_NAME: rpm_builder_armv7, DOCKERFILE_PATH: /rpms/CentOS/7/armv7hl} ] + image: [ {CONTAINER_NAME: rpm_builder_x86, DOCKERFILE_PATH: rpms/CentOS/6/x86_64}, {CONTAINER_NAME: rpm_builder_i386, DOCKERFILE_PATH: rpms/CentOS/6/i386}, {CONTAINER_NAME: rpm_builder_aarch64, DOCKERFILE_PATH: rpms/CentOS/7/aarch64}, {CONTAINER_NAME: rpm_builder_ppc64le, DOCKERFILE_PATH: rpms/CentOS/7/ppc64le}, {CONTAINER_NAME: rpm_builder_armv7, DOCKERFILE_PATH: rpms/CentOS/7/armv7hl} ] fail-fast: false steps: - uses: actions/checkout@v2 @@ -27,4 +27,4 @@ jobs: github-push-secret: ${{secrets.GITHUB_TOKEN}} docker-image-name: ${{ matrix.image.CONTAINER_NAME }} docker-image-tag: latest - dockerfile-path: $GITHUB_WORKSPACE${{ matrix.image.DOCKERFILE_PATH }}/Dockerfile \ No newline at end of file + dockerfile-path: ${{github.workspace}}/${{ matrix.image.DOCKERFILE_PATH }}/Dockerfile \ No newline at end of file From 54449387b4e382739a7493f841db8120ac3af076 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 25 Jan 2023 11:43:33 +0100 Subject: [PATCH 035/328] Remove env variable from dockerfile path for upload package creation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-package-creation-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index 81ceb32f49..22165cead4 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -27,4 +27,4 @@ jobs: github-push-secret: ${{secrets.GITHUB_TOKEN}} docker-image-name: ${{ matrix.image.CONTAINER_NAME }} docker-image-tag: latest - dockerfile-path: ${{github.workspace}}/${{ matrix.image.DOCKERFILE_PATH }}/Dockerfile \ No newline at end of file + dockerfile-path: ./${{ matrix.image.DOCKERFILE_PATH }}/Dockerfile \ No newline at end of file From 9d98190d8c58b5b2d030f9c9f3b3257340f21a86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 25 Jan 2023 11:46:22 +0100 Subject: [PATCH 036/328] Add build context to upload image workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-package-creation-images.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index 22165cead4..a2fe9e4c3d 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -27,4 +27,5 @@ jobs: github-push-secret: ${{secrets.GITHUB_TOKEN}} docker-image-name: ${{ matrix.image.CONTAINER_NAME }} docker-image-tag: latest - dockerfile-path: ./${{ matrix.image.DOCKERFILE_PATH }}/Dockerfile \ No newline at end of file + dockerfile-path: ./${{ matrix.image.DOCKERFILE_PATH }}/Dockerfile + build-context: ./${{ matrix.image.DOCKERFILE_PATH }} \ No newline at end of file From fe289e0f48b67cdf4c7cfefe490217437293f20e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 25 Jan 2023 11:59:51 +0100 Subject: [PATCH 037/328] Change variable for the package name in the building of the package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-rpm-packages.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index c92a455252..4831d24132 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -56,10 +56,10 @@ jobs: working-directory: ./rpms run: | bash generate_rpm_package.sh -b master -t ${{ matrix.type }} -a ${{ matrix.arch }} --dev - echo "{PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}}=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV + echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV - name: Upload Wazuh ${{ matrix.type }} ${{ matrix.arch }} package as artifact uses: actions/upload-artifact@v2 with: - name: ${PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}} - path: ${{github.workspace}}/rpms/output/${PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}} \ No newline at end of file + name: ${PACKAGE_NAME} + path: ${{github.workspace}}/rpms/output/${PACKAGE_NAME} \ No newline at end of file From 157cf2e1fadbc6b61dcf3f0baeb2250095509b44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 25 Jan 2023 12:00:35 +0100 Subject: [PATCH 038/328] Change container name to include branch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-package-creation-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index a2fe9e4c3d..4f045e6ec1 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -25,7 +25,7 @@ jobs: uses: pmorelli92/github-container-registry-build-push@2.0.0 with: github-push-secret: ${{secrets.GITHUB_TOKEN}} - docker-image-name: ${{ matrix.image.CONTAINER_NAME }} + docker-image-name: ${{ matrix.image.CONTAINER_NAME }}_${{github.branch}} docker-image-tag: latest dockerfile-path: ./${{ matrix.image.DOCKERFILE_PATH }}/Dockerfile build-context: ./${{ matrix.image.DOCKERFILE_PATH }} \ No newline at end of file From 504586f4a36e9334a7a57d74e5f9ee11fda139db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 25 Jan 2023 12:06:13 +0100 Subject: [PATCH 039/328] Change github branch name reference MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-package-creation-images.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index 4f045e6ec1..2d6bf07748 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -21,11 +21,11 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} to Github Container Registry + - name: Build and push image ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} to Github Container Registry uses: pmorelli92/github-container-registry-build-push@2.0.0 with: github-push-secret: ${{secrets.GITHUB_TOKEN}} - docker-image-name: ${{ matrix.image.CONTAINER_NAME }}_${{github.branch}} + docker-image-name: ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} docker-image-tag: latest dockerfile-path: ./${{ matrix.image.DOCKERFILE_PATH }}/Dockerfile build-context: ./${{ matrix.image.DOCKERFILE_PATH }} \ No newline at end of file From 8603bded7d0eae06674c4fda02cbe23da425c520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 25 Jan 2023 13:25:17 +0100 Subject: [PATCH 040/328] Change the building and upload of images to be done with a script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../build_and_push_image_to_ghcr.sh | 33 +++++++++++++++++++ .github/workflows/build-rpm-packages.yml | 2 +- .../upload-package-creation-images.yml | 28 +++++++++++----- 3 files changed, 54 insertions(+), 9 deletions(-) create mode 100644 .github/actions/common-tools/build_and_push_image_to_ghcr.sh diff --git a/.github/actions/common-tools/build_and_push_image_to_ghcr.sh b/.github/actions/common-tools/build_and_push_image_to_ghcr.sh new file mode 100644 index 0000000000..847c22c55a --- /dev/null +++ b/.github/actions/common-tools/build_and_push_image_to_ghcr.sh @@ -0,0 +1,33 @@ +GITHUB_PUSH_SECRET=$1 +DOCKER_IMAGE_NAME=$2 +BUILD_CONTEXT=$3 +DOCKERFILE_PATH="$BUILD_CONTEXT/Dockerfile" +if [ -n "$4" ]; then + DOCKER_IMAGE_TAG=$4 +else + DOCKER_IMAGE_TAG="latest" +fi + + +# Login to GHCR +echo ${GITHUB_PUSH_SECRET} | docker login https://ghcr.io -u "wazuh"--password-stdin + +# GITHUB_REPOSITORY is always org/repo syntax. Get the owner in case it is different than the actor (when working in an org) +GITHUB_REPOSITORY="wazuh/wazuh-packages" +GITHUB_OWNER="wazuh" + +# Set up full image with tag +IMAGE_ID=ghcr.io/${GITHUB_OWNER}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG} +IMAGE_ID=$(echo ${IMAGE_ID} | tr '[A-Z]' '[a-z]') + + +# Build image +echo build -t ${IMAGE_ID} -f ${DOCKERFILE_PATH} ${BUILD_CONTEXT} +docker build -t ${IMAGE_ID} -f ${DOCKERFILE_PATH} ${BUILD_CONTEXT} + +# Push image +if [ "$BUILD_ONLY" == "true" ]; then + echo "skipping push" +else + docker push ${IMAGE_ID} +fi \ No newline at end of file diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 4831d24132..b3d4ffd056 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: type: [agent, manager] - arch : [aarch64, armv7] + arch : [aarch64, armv7, ppc64le] distro: [ubuntu18.04, alpine_latest] exclude: - arch: armv7 diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index 2d6bf07748..eeb7dcc6f5 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -12,20 +12,32 @@ on: workflow_dispatch: jobs: - Upload-RPM-x86_64-image: + Upload-RPM-x86_64-i386-images: runs-on: ubuntu-latest strategy: matrix: - image: [ {CONTAINER_NAME: rpm_builder_x86, DOCKERFILE_PATH: rpms/CentOS/6/x86_64}, {CONTAINER_NAME: rpm_builder_i386, DOCKERFILE_PATH: rpms/CentOS/6/i386}, {CONTAINER_NAME: rpm_builder_aarch64, DOCKERFILE_PATH: rpms/CentOS/7/aarch64}, {CONTAINER_NAME: rpm_builder_ppc64le, DOCKERFILE_PATH: rpms/CentOS/7/ppc64le}, {CONTAINER_NAME: rpm_builder_armv7, DOCKERFILE_PATH: rpms/CentOS/7/armv7hl} ] + image: [ {CONTAINER_NAME: rpm_builder_x86, DOCKERFILE_PATH: rpms/CentOS/6/x86_64}, {CONTAINER_NAME: rpm_builder_i386, DOCKERFILE_PATH: rpms/CentOS/6/i386}] fail-fast: false steps: - uses: actions/checkout@v2 - name: Build and push image ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} to Github Container Registry - uses: pmorelli92/github-container-registry-build-push@2.0.0 + run: + bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} ./${{ matrix.image.DOCKERFILE_PATH }} + + Upload-RPM-armv7-ppc64le-aarch64-images: + runs-on: ubuntu-latest + strategy: + matrix: + image: [ {CONTAINER_NAME: rpm_builder_aarch64, DOCKERFILE_PATH: rpms/CentOS/7/aarch64, ARCHITECTURE: aarch64, DISTRO: ubuntu18.04}, {CONTAINER_NAME: rpm_builder_ppc64le, DOCKERFILE_PATH: rpms/CentOS/7/ppc64le, ARCHITECTURE: ppc64le, DISTRO: alpine_latest}, {CONTAINER_NAME: rpm_builder_armv7, DOCKERFILE_PATH: rpms/CentOS/7/armv7hl, ARCHITECTURE: armv7 , DISTRO: ubuntu18.04} ] + fail-fast: false + steps: + - uses: actions/checkout@v2 + + - uses: uraimo/run-on-arch-action@v2.5.0 + name: Build and push image ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} to Github Container Registry with: - github-push-secret: ${{secrets.GITHUB_TOKEN}} - docker-image-name: ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} - docker-image-tag: latest - dockerfile-path: ./${{ matrix.image.DOCKERFILE_PATH }}/Dockerfile - build-context: ./${{ matrix.image.DOCKERFILE_PATH }} \ No newline at end of file + arch: ${{ matrix.image.ARCHITECTURE }} + distro: ${{ matrix.image.DISTRO }} + run: + bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} ./${{ matrix.image.DOCKERFILE_PATH }} From 6eae325a1f8fb894064609689efd2b4f88b141d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 25 Jan 2023 13:31:44 +0100 Subject: [PATCH 041/328] Install docker on rare architecture containers to build image for package creation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-package-creation-images.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index eeb7dcc6f5..4cae8b1770 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -40,4 +40,5 @@ jobs: arch: ${{ matrix.image.ARCHITECTURE }} distro: ${{ matrix.image.DISTRO }} run: + bash $GITHUB_WORKSPACE/.github/actions/common-tools/install_docker_on_ubuntu.sh bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} ./${{ matrix.image.DOCKERFILE_PATH }} From ad260a804d55587fd0666e1f1307437c9c32297f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 25 Jan 2023 13:50:23 +0100 Subject: [PATCH 042/328] Copy build.sh to correct place before building images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-package-creation-images.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index 4cae8b1770..fabf0ed126 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -9,6 +9,7 @@ on: - 4.4 paths: - 'rpms/CentOS/*' + - 'rpms/build.sh' workflow_dispatch: jobs: @@ -23,7 +24,8 @@ jobs: - name: Build and push image ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} to Github Container Registry run: - bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} ./${{ matrix.image.DOCKERFILE_PATH }} + cp $GITHUB_WORKSPACE/rpms/build.sh $GITHUB_WORKSPACE/${{ matrix.image.DOCKERFILE_PATH }} + bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} rpms ${{ matrix.image.DOCKERFILE_PATH }} Upload-RPM-armv7-ppc64le-aarch64-images: runs-on: ubuntu-latest @@ -41,4 +43,5 @@ jobs: distro: ${{ matrix.image.DISTRO }} run: bash $GITHUB_WORKSPACE/.github/actions/common-tools/install_docker_on_ubuntu.sh - bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} ./${{ matrix.image.DOCKERFILE_PATH }} + cp $GITHUB_WORKSPACE/rpms/build.sh $GITHUB_WORKSPACE/${{ matrix.image.DOCKERFILE_PATH }} + bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} ${{ matrix.image.DOCKERFILE_PATH }} From c459080aaa791fdbff45d9d40529626eb9fbb5c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 25 Jan 2023 14:04:05 +0100 Subject: [PATCH 043/328] Separate commands MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-package-creation-images.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index fabf0ed126..f6f96d7c67 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -22,10 +22,13 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Build and push image ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} to Github Container Registry + - name: Copy build.sh before building image run: cp $GITHUB_WORKSPACE/rpms/build.sh $GITHUB_WORKSPACE/${{ matrix.image.DOCKERFILE_PATH }} - bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} rpms ${{ matrix.image.DOCKERFILE_PATH }} + + - name: Build and push image ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} to Github Container Registry + run: + bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} ${{ matrix.image.DOCKERFILE_PATH }} Upload-RPM-armv7-ppc64le-aarch64-images: runs-on: ubuntu-latest From f017bc82b195995c8d372ae3afa058683b07766d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 25 Jan 2023 16:00:29 +0100 Subject: [PATCH 044/328] Separate docker setup scripts for ubuntu and alpine MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/actions/common-tools/setup_docker.sh | 9 +++++++++ .github/actions/common-tools/setup_docker_alpine.sh | 7 +++++++ ...nstall_docker_on_ubuntu.sh => setup_docker_ubuntu.sh} | 4 ++-- .github/workflows/build-rpm-packages.yml | 2 +- .github/workflows/upload-package-creation-images.yml | 4 ++-- 5 files changed, 21 insertions(+), 5 deletions(-) create mode 100755 .github/actions/common-tools/setup_docker.sh create mode 100644 .github/actions/common-tools/setup_docker_alpine.sh rename .github/actions/common-tools/{install_docker_on_ubuntu.sh => setup_docker_ubuntu.sh} (67%) diff --git a/.github/actions/common-tools/setup_docker.sh b/.github/actions/common-tools/setup_docker.sh new file mode 100755 index 0000000000..628c7819d8 --- /dev/null +++ b/.github/actions/common-tools/setup_docker.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +scriptpath=$(dirname "$0") +. /etc/os-release +if [ "$ID" = "alpine" ]; then + sh $scriptpath/setup_docker_alpine.sh +elif [ "$ID" = "ubuntu" ]; then + bash $scriptpath/setup_docker_ubuntu.sh +fi \ No newline at end of file diff --git a/.github/actions/common-tools/setup_docker_alpine.sh b/.github/actions/common-tools/setup_docker_alpine.sh new file mode 100644 index 0000000000..3e37944b5c --- /dev/null +++ b/.github/actions/common-tools/setup_docker_alpine.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +apk update +apk add bash +apk add docker docker-compose +apk add openrc +service docker start diff --git a/.github/actions/common-tools/install_docker_on_ubuntu.sh b/.github/actions/common-tools/setup_docker_ubuntu.sh similarity index 67% rename from .github/actions/common-tools/install_docker_on_ubuntu.sh rename to .github/actions/common-tools/setup_docker_ubuntu.sh index fdd3ce2965..3ff33642b1 100644 --- a/.github/actions/common-tools/install_docker_on_ubuntu.sh +++ b/.github/actions/common-tools/setup_docker_ubuntu.sh @@ -1,9 +1,9 @@ #!/bin/bash apt-get update -apt-get install ca-certificates curl gnupg lsb-release +apt-get install -y ca-certificates curl gnupg lsb-release mkdir -p /etc/apt/keyrings -curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg +curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null apt-get update apt-get install -y docker-ce docker-ce-cli containerd.io \ No newline at end of file diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index b3d4ffd056..43c1b9fabb 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -33,7 +33,7 @@ jobs: distro: ${{ matrix.distro }} githubToken: ${{ github.token }} run: | - bash $GITHUB_WORKSPACE/.github/actions/common-tools/install_docker_on_ubuntu.sh + sh $GITHUB_WORKSPACE/.github/actions/common-tools/setup_docker.sh bash $GITHUB_WORKSPACE/rpms/generate_rpm_package.sh -b master -t ${{ matrix.type }} -a ${{ matrix.arch }} --dev echo "PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index f6f96d7c67..50fdcd3f57 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -22,7 +22,7 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Copy build.sh before building image + - name: Copy build.sh to Dockerfile path run: cp $GITHUB_WORKSPACE/rpms/build.sh $GITHUB_WORKSPACE/${{ matrix.image.DOCKERFILE_PATH }} @@ -45,6 +45,6 @@ jobs: arch: ${{ matrix.image.ARCHITECTURE }} distro: ${{ matrix.image.DISTRO }} run: - bash $GITHUB_WORKSPACE/.github/actions/common-tools/install_docker_on_ubuntu.sh + sh $GITHUB_WORKSPACE/.github/actions/common-tools/setup_docker.sh cp $GITHUB_WORKSPACE/rpms/build.sh $GITHUB_WORKSPACE/${{ matrix.image.DOCKERFILE_PATH }} bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} ${{ matrix.image.DOCKERFILE_PATH }} From 8e4fdb269af3cdc188096a89e02a6cc659e1e092 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 25 Jan 2023 16:45:24 +0100 Subject: [PATCH 045/328] Pass user as argument to the build and push image scritp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../common-tools/build_and_push_image_to_ghcr.sh | 11 ++++++----- .github/actions/common-tools/setup_docker_ubuntu.sh | 4 ++-- .github/workflows/build-rpm-packages.yml | 1 + .github/workflows/upload-package-creation-images.yml | 5 +++-- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/actions/common-tools/build_and_push_image_to_ghcr.sh b/.github/actions/common-tools/build_and_push_image_to_ghcr.sh index 847c22c55a..33d35310bc 100644 --- a/.github/actions/common-tools/build_and_push_image_to_ghcr.sh +++ b/.github/actions/common-tools/build_and_push_image_to_ghcr.sh @@ -1,16 +1,17 @@ GITHUB_PUSH_SECRET=$1 -DOCKER_IMAGE_NAME=$2 -BUILD_CONTEXT=$3 +GITHUB_USER=$2 +DOCKER_IMAGE_NAME=$3 +BUILD_CONTEXT=$4 DOCKERFILE_PATH="$BUILD_CONTEXT/Dockerfile" -if [ -n "$4" ]; then - DOCKER_IMAGE_TAG=$4 +if [ -n "$5" ]; then + DOCKER_IMAGE_TAG=$5 else DOCKER_IMAGE_TAG="latest" fi # Login to GHCR -echo ${GITHUB_PUSH_SECRET} | docker login https://ghcr.io -u "wazuh"--password-stdin +echo ${GITHUB_PUSH_SECRET} | docker login https://ghcr.io -u $GITHUB_USER --password-stdin # GITHUB_REPOSITORY is always org/repo syntax. Get the owner in case it is different than the actor (when working in an org) GITHUB_REPOSITORY="wazuh/wazuh-packages" diff --git a/.github/actions/common-tools/setup_docker_ubuntu.sh b/.github/actions/common-tools/setup_docker_ubuntu.sh index 3ff33642b1..3520225296 100644 --- a/.github/actions/common-tools/setup_docker_ubuntu.sh +++ b/.github/actions/common-tools/setup_docker_ubuntu.sh @@ -1,9 +1,9 @@ #!/bin/bash apt-get update -apt-get install -y ca-certificates curl gnupg lsb-release +apt-get install ca-certificates curl gnupg lsb-release mkdir -p /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg -echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null +echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null apt-get update apt-get install -y docker-ce docker-ce-cli containerd.io \ No newline at end of file diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 43c1b9fabb..895e8bc74b 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -32,6 +32,7 @@ jobs: arch: ${{ matrix.arch }} distro: ${{ matrix.distro }} githubToken: ${{ github.token }} + dockerRunArgs: --volume /var/run/docker.sock:/var/run/docker.sock run: | sh $GITHUB_WORKSPACE/.github/actions/common-tools/setup_docker.sh bash $GITHUB_WORKSPACE/rpms/generate_rpm_package.sh -b master -t ${{ matrix.type }} -a ${{ matrix.arch }} --dev diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index 50fdcd3f57..1d89543af9 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -28,7 +28,7 @@ jobs: - name: Build and push image ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} to Github Container Registry run: - bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} ${{ matrix.image.DOCKERFILE_PATH }} + bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} ${{ matrix.image.DOCKERFILE_PATH }} Upload-RPM-armv7-ppc64le-aarch64-images: runs-on: ubuntu-latest @@ -44,7 +44,8 @@ jobs: with: arch: ${{ matrix.image.ARCHITECTURE }} distro: ${{ matrix.image.DISTRO }} + dockerRunArgs: --volume /var/run/docker.sock:/var/run/docker.sock run: sh $GITHUB_WORKSPACE/.github/actions/common-tools/setup_docker.sh cp $GITHUB_WORKSPACE/rpms/build.sh $GITHUB_WORKSPACE/${{ matrix.image.DOCKERFILE_PATH }} - bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} ${{ matrix.image.DOCKERFILE_PATH }} + bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} ${{ matrix.image.DOCKERFILE_PATH }} From dbf68f0c379838c402bee496e627ed24cea510ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 25 Jan 2023 16:54:51 +0100 Subject: [PATCH 046/328] Remove unneccessary commands in alpine setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/actions/common-tools/setup_docker_alpine.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/actions/common-tools/setup_docker_alpine.sh b/.github/actions/common-tools/setup_docker_alpine.sh index 3e37944b5c..b9bb7139c5 100644 --- a/.github/actions/common-tools/setup_docker_alpine.sh +++ b/.github/actions/common-tools/setup_docker_alpine.sh @@ -3,5 +3,3 @@ apk update apk add bash apk add docker docker-compose -apk add openrc -service docker start From cccd73c062299d882c92f7d21072bbb1c45e9795 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 25 Jan 2023 17:02:09 +0100 Subject: [PATCH 047/328] Allow for more than one command on the upload image workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-package-creation-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index 1d89543af9..d042622a32 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -45,7 +45,7 @@ jobs: arch: ${{ matrix.image.ARCHITECTURE }} distro: ${{ matrix.image.DISTRO }} dockerRunArgs: --volume /var/run/docker.sock:/var/run/docker.sock - run: + run: | sh $GITHUB_WORKSPACE/.github/actions/common-tools/setup_docker.sh cp $GITHUB_WORKSPACE/rpms/build.sh $GITHUB_WORKSPACE/${{ matrix.image.DOCKERFILE_PATH }} bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} ${{ matrix.image.DOCKERFILE_PATH }} From e77e3f733221c9bccf2f04181c60e624a225e86d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 25 Jan 2023 17:34:39 +0100 Subject: [PATCH 048/328] Change OS on which the images are generated MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/actions/common-tools/setup_docker_alpine.sh | 6 +++--- .github/actions/common-tools/setup_docker_ubuntu.sh | 4 ++-- .github/workflows/upload-package-creation-images.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/actions/common-tools/setup_docker_alpine.sh b/.github/actions/common-tools/setup_docker_alpine.sh index b9bb7139c5..6ce1f343e8 100644 --- a/.github/actions/common-tools/setup_docker_alpine.sh +++ b/.github/actions/common-tools/setup_docker_alpine.sh @@ -1,5 +1,5 @@ #!/bin/sh -apk update -apk add bash -apk add docker docker-compose +apk -q update +apk -q add bash +apk -q add docker docker-compose diff --git a/.github/actions/common-tools/setup_docker_ubuntu.sh b/.github/actions/common-tools/setup_docker_ubuntu.sh index 3520225296..e727b17868 100644 --- a/.github/actions/common-tools/setup_docker_ubuntu.sh +++ b/.github/actions/common-tools/setup_docker_ubuntu.sh @@ -1,9 +1,9 @@ #!/bin/bash apt-get update -apt-get install ca-certificates curl gnupg lsb-release +apt-get install -y -q ca-certificates curl gnupg lsb-release mkdir -p /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null apt-get update -apt-get install -y docker-ce docker-ce-cli containerd.io \ No newline at end of file +apt-get install -y -q docker-ce docker-ce-cli containerd.io \ No newline at end of file diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index d042622a32..170e1cfb8d 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - image: [ {CONTAINER_NAME: rpm_builder_aarch64, DOCKERFILE_PATH: rpms/CentOS/7/aarch64, ARCHITECTURE: aarch64, DISTRO: ubuntu18.04}, {CONTAINER_NAME: rpm_builder_ppc64le, DOCKERFILE_PATH: rpms/CentOS/7/ppc64le, ARCHITECTURE: ppc64le, DISTRO: alpine_latest}, {CONTAINER_NAME: rpm_builder_armv7, DOCKERFILE_PATH: rpms/CentOS/7/armv7hl, ARCHITECTURE: armv7 , DISTRO: ubuntu18.04} ] + image: [ {CONTAINER_NAME: rpm_builder_aarch64, DOCKERFILE_PATH: rpms/CentOS/7/aarch64, ARCHITECTURE: aarch64, DISTRO: alpine_latest}, {CONTAINER_NAME: rpm_builder_ppc64le, DOCKERFILE_PATH: rpms/CentOS/7/ppc64le, ARCHITECTURE: ppc64le, DISTRO: alpine_latest}, {CONTAINER_NAME: rpm_builder_armv7, DOCKERFILE_PATH: rpms/CentOS/7/armv7hl, ARCHITECTURE: armv7 , DISTRO: alpine_latest} ] fail-fast: false steps: - uses: actions/checkout@v2 From efd6472e0b6d2ba5eb6418fe27721b0e3b5f27fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 25 Jan 2023 17:38:19 +0100 Subject: [PATCH 049/328] Change Os in which the images are built MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-package-creation-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index 170e1cfb8d..7f4e2fe82a 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - image: [ {CONTAINER_NAME: rpm_builder_aarch64, DOCKERFILE_PATH: rpms/CentOS/7/aarch64, ARCHITECTURE: aarch64, DISTRO: alpine_latest}, {CONTAINER_NAME: rpm_builder_ppc64le, DOCKERFILE_PATH: rpms/CentOS/7/ppc64le, ARCHITECTURE: ppc64le, DISTRO: alpine_latest}, {CONTAINER_NAME: rpm_builder_armv7, DOCKERFILE_PATH: rpms/CentOS/7/armv7hl, ARCHITECTURE: armv7 , DISTRO: alpine_latest} ] + image: [ {CONTAINER_NAME: rpm_builder_aarch64, DOCKERFILE_PATH: rpms/CentOS/7/aarch64, ARCHITECTURE: aarch64, DISTRO: ubuntu_latest}, {CONTAINER_NAME: rpm_builder_ppc64le, DOCKERFILE_PATH: rpms/CentOS/7/ppc64le, ARCHITECTURE: ppc64le, DISTRO: ubuntu_latest}, {CONTAINER_NAME: rpm_builder_armv7, DOCKERFILE_PATH: rpms/CentOS/7/armv7hl, ARCHITECTURE: armv7 , DISTRO: ubuntu_latest} ] fail-fast: false steps: - uses: actions/checkout@v2 From e6c763e89fe7db9fa265c38eb266196bdf7c1fe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 26 Jan 2023 12:04:47 +0100 Subject: [PATCH 050/328] Correct name for images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-package-creation-images.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index 7f4e2fe82a..0b4aa1feb9 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -26,9 +26,14 @@ jobs: run: cp $GITHUB_WORKSPACE/rpms/build.sh $GITHUB_WORKSPACE/${{ matrix.image.DOCKERFILE_PATH }} + - name: Set image name + run: | + if [[ -n ${{github.base_ref}} ]]; then IMAGE_NAME=${{ matrix.image.CONTAINER_NAME }}_${{github.base_ref}}; else IMAGE_NAME=${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}}; fi + echo "IMAGE_NAME=$IMAGE_NAME" >> $GITHUB_ENV + - name: Build and push image ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} to Github Container Registry run: - bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} ${{ matrix.image.DOCKERFILE_PATH }} + bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $IMAGE_NAME ${{ matrix.image.DOCKERFILE_PATH }} Upload-RPM-armv7-ppc64le-aarch64-images: runs-on: ubuntu-latest @@ -40,7 +45,7 @@ jobs: - uses: actions/checkout@v2 - uses: uraimo/run-on-arch-action@v2.5.0 - name: Build and push image ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} to Github Container Registry + name: Build and push image $IMAGE_NAME to Github Container Registry with: arch: ${{ matrix.image.ARCHITECTURE }} distro: ${{ matrix.image.DISTRO }} @@ -48,4 +53,4 @@ jobs: run: | sh $GITHUB_WORKSPACE/.github/actions/common-tools/setup_docker.sh cp $GITHUB_WORKSPACE/rpms/build.sh $GITHUB_WORKSPACE/${{ matrix.image.DOCKERFILE_PATH }} - bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} ${{ matrix.image.DOCKERFILE_PATH }} + bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $IMAGE_NAME ${{ matrix.image.DOCKERFILE_PATH }} From e79cd126debd571b61d87ce809215f1effba31f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 26 Jan 2023 12:11:18 +0100 Subject: [PATCH 051/328] Add image name variable definition where needed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-package-creation-images.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index 0b4aa1feb9..4410b91e24 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -44,6 +44,11 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Set image name + run: | + if [[ -n ${{github.base_ref}} ]]; then IMAGE_NAME=${{ matrix.image.CONTAINER_NAME }}_${{github.base_ref}}; else IMAGE_NAME=${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}}; fi + echo "IMAGE_NAME=$IMAGE_NAME" >> $GITHUB_ENV + - uses: uraimo/run-on-arch-action@v2.5.0 name: Build and push image $IMAGE_NAME to Github Container Registry with: From f8d759dd5d7d8519c92fd6951d4ff778af18b469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 26 Jan 2023 12:21:22 +0100 Subject: [PATCH 052/328] Fix adding image_name to environment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-package-creation-images.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index 4410b91e24..956eef9057 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -28,8 +28,7 @@ jobs: - name: Set image name run: | - if [[ -n ${{github.base_ref}} ]]; then IMAGE_NAME=${{ matrix.image.CONTAINER_NAME }}_${{github.base_ref}}; else IMAGE_NAME=${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}}; fi - echo "IMAGE_NAME=$IMAGE_NAME" >> $GITHUB_ENV + if [[ -n ${{github.base_ref}} ]]; then echo "IMAGE_NAME=${{ matrix.image.CONTAINER_NAME }}_${{github.base_ref}}" >> $GITHUB_ENV; else echo "IMAGE_NAME=${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}}" >> $GITHUB_ENV ; fi - name: Build and push image ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} to Github Container Registry run: @@ -46,8 +45,7 @@ jobs: - name: Set image name run: | - if [[ -n ${{github.base_ref}} ]]; then IMAGE_NAME=${{ matrix.image.CONTAINER_NAME }}_${{github.base_ref}}; else IMAGE_NAME=${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}}; fi - echo "IMAGE_NAME=$IMAGE_NAME" >> $GITHUB_ENV + if [[ -n ${{github.base_ref}} ]]; then echo "IMAGE_NAME=${{ matrix.image.CONTAINER_NAME }}_${{github.base_ref}}" >> $GITHUB_ENV; else echo "IMAGE_NAME=${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}}" >> $GITHUB_ENV ; fi - uses: uraimo/run-on-arch-action@v2.5.0 name: Build and push image $IMAGE_NAME to Github Container Registry From f10965d9e41ebf37d9316652106e4f7d2b8957a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 26 Jan 2023 12:37:17 +0100 Subject: [PATCH 053/328] Version is now in tag instead of name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../workflows/upload-package-creation-images.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index 956eef9057..dbda28bd17 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -26,13 +26,13 @@ jobs: run: cp $GITHUB_WORKSPACE/rpms/build.sh $GITHUB_WORKSPACE/${{ matrix.image.DOCKERFILE_PATH }} - - name: Set image name - run: | - if [[ -n ${{github.base_ref}} ]]; then echo "IMAGE_NAME=${{ matrix.image.CONTAINER_NAME }}_${{github.base_ref}}" >> $GITHUB_ENV; else echo "IMAGE_NAME=${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}}" >> $GITHUB_ENV ; fi + - name: Set tag as version + run: + if [ ! -z ${{ github.base_ref }} ]; then echo "TAG=${{ github.base_ref }}" >> $GITHUB_ENV; else echo "TAG=$(cat $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi - name: Build and push image ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} to Github Container Registry run: - bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $IMAGE_NAME ${{ matrix.image.DOCKERFILE_PATH }} + bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} $TAG Upload-RPM-armv7-ppc64le-aarch64-images: runs-on: ubuntu-latest @@ -43,12 +43,12 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set image name + - name: Set tag as version run: | - if [[ -n ${{github.base_ref}} ]]; then echo "IMAGE_NAME=${{ matrix.image.CONTAINER_NAME }}_${{github.base_ref}}" >> $GITHUB_ENV; else echo "IMAGE_NAME=${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}}" >> $GITHUB_ENV ; fi + if [ ! -z ${{ github.base_ref }} ]; then echo "TAG=${{ github.base_ref }}" >> $GITHUB_ENV; else echo "TAG=$(cat $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi - uses: uraimo/run-on-arch-action@v2.5.0 - name: Build and push image $IMAGE_NAME to Github Container Registry + name: Build and push image ${{matrix.image.CONTAINER_NAME}} to Github Container Registry with: arch: ${{ matrix.image.ARCHITECTURE }} distro: ${{ matrix.image.DISTRO }} @@ -56,4 +56,4 @@ jobs: run: | sh $GITHUB_WORKSPACE/.github/actions/common-tools/setup_docker.sh cp $GITHUB_WORKSPACE/rpms/build.sh $GITHUB_WORKSPACE/${{ matrix.image.DOCKERFILE_PATH }} - bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $IMAGE_NAME ${{ matrix.image.DOCKERFILE_PATH }} + bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} $TAG From 37be5b72c9a66d06f8c6dd31bf1b15d47930de75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 26 Jan 2023 12:55:15 +0100 Subject: [PATCH 054/328] Add efficiency options to save images and MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-package-creation-images.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index dbda28bd17..c35a5a214b 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -52,8 +52,12 @@ jobs: with: arch: ${{ matrix.image.ARCHITECTURE }} distro: ${{ matrix.image.DISTRO }} + githubToken: ${{ secrets.GITHUB_TOKEN }} dockerRunArgs: --volume /var/run/docker.sock:/var/run/docker.sock - run: | - sh $GITHUB_WORKSPACE/.github/actions/common-tools/setup_docker.sh + env: + TAG: ${{ env.TAG }} + install: | + bash $GITHUB_WORKSPACE/.github/actions/common-tools/setup_docker.sh cp $GITHUB_WORKSPACE/rpms/build.sh $GITHUB_WORKSPACE/${{ matrix.image.DOCKERFILE_PATH }} + run: | bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} $TAG From c5cedae7e66aa6418c22b90bb73bc6d61c526aec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 26 Jan 2023 14:13:15 +0100 Subject: [PATCH 055/328] Add environment variables to run-on-arch and setup docker on install part MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/actions/common-tools/setup_docker.sh | 9 ------ .../common-tools/setup_docker_alpine.sh | 5 ---- .../common-tools/setup_docker_ubuntu.sh | 9 ------ .../upload-package-creation-images.yml | 28 +++++++++++++++---- 4 files changed, 23 insertions(+), 28 deletions(-) delete mode 100755 .github/actions/common-tools/setup_docker.sh delete mode 100644 .github/actions/common-tools/setup_docker_alpine.sh delete mode 100644 .github/actions/common-tools/setup_docker_ubuntu.sh diff --git a/.github/actions/common-tools/setup_docker.sh b/.github/actions/common-tools/setup_docker.sh deleted file mode 100755 index 628c7819d8..0000000000 --- a/.github/actions/common-tools/setup_docker.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -scriptpath=$(dirname "$0") -. /etc/os-release -if [ "$ID" = "alpine" ]; then - sh $scriptpath/setup_docker_alpine.sh -elif [ "$ID" = "ubuntu" ]; then - bash $scriptpath/setup_docker_ubuntu.sh -fi \ No newline at end of file diff --git a/.github/actions/common-tools/setup_docker_alpine.sh b/.github/actions/common-tools/setup_docker_alpine.sh deleted file mode 100644 index 6ce1f343e8..0000000000 --- a/.github/actions/common-tools/setup_docker_alpine.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -apk -q update -apk -q add bash -apk -q add docker docker-compose diff --git a/.github/actions/common-tools/setup_docker_ubuntu.sh b/.github/actions/common-tools/setup_docker_ubuntu.sh deleted file mode 100644 index e727b17868..0000000000 --- a/.github/actions/common-tools/setup_docker_ubuntu.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -apt-get update -apt-get install -y -q ca-certificates curl gnupg lsb-release -mkdir -p /etc/apt/keyrings -curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg -echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null -apt-get update -apt-get install -y -q docker-ce docker-ce-cli containerd.io \ No newline at end of file diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index c35a5a214b..63d5fb19ac 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -53,11 +53,29 @@ jobs: arch: ${{ matrix.image.ARCHITECTURE }} distro: ${{ matrix.image.DISTRO }} githubToken: ${{ secrets.GITHUB_TOKEN }} - dockerRunArgs: --volume /var/run/docker.sock:/var/run/docker.sock - env: - TAG: ${{ env.TAG }} + dockerRunArgs: | + --volume /var/run/docker.sock:/var/run/docker.sock + --volume $GITHUB_WORKSPACE:/github/workspace + env: | + TAG: $TAG + GITHUB_WORKSPACE: "/github/workspace" install: | - bash $GITHUB_WORKSPACE/.github/actions/common-tools/setup_docker.sh - cp $GITHUB_WORKSPACE/rpms/build.sh $GITHUB_WORKSPACE/${{ matrix.image.DOCKERFILE_PATH }} + case "${{ matrix.image.DISTRO }}" in + ubuntu*) + apt-get update + apt-get install -y -q ca-certificates curl gnupg lsb-release apt-utils + mkdir -p /etc/apt/keyrings + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg + echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null + apt-get update + apt-get install -y -q docker-ce docker-ce-cli containerd.io + ;; + alpine*) + apk -q update + apk -q add bash + apk -q add docker docker-compose + ;; + esac run: | + cp $GITHUB_WORKSPACE/rpms/build.sh $GITHUB_WORKSPACE/${{ matrix.image.DOCKERFILE_PATH }} bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} $TAG From edb2d09c0cc3aa3bfe801f8c77d54993c7b49e38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 26 Jan 2023 14:21:04 +0100 Subject: [PATCH 056/328] Remove GITHUB_WORKSPACE variable from explicitly declared variables for run-on-arch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-package-creation-images.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index 63d5fb19ac..de8ee4bf5b 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -55,10 +55,8 @@ jobs: githubToken: ${{ secrets.GITHUB_TOKEN }} dockerRunArgs: | --volume /var/run/docker.sock:/var/run/docker.sock - --volume $GITHUB_WORKSPACE:/github/workspace env: | TAG: $TAG - GITHUB_WORKSPACE: "/github/workspace" install: | case "${{ matrix.image.DISTRO }}" in ubuntu*) From a48f4baf5be64a818e9158c9ebb2384f85f9dc3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 26 Jan 2023 14:40:53 +0100 Subject: [PATCH 057/328] Echo the tag used to push the image to ghcr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-package-creation-images.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index de8ee4bf5b..bb4397b6a4 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -56,7 +56,7 @@ jobs: dockerRunArgs: | --volume /var/run/docker.sock:/var/run/docker.sock env: | - TAG: $TAG + TAG: ${{ env.TAG }} install: | case "${{ matrix.image.DISTRO }}" in ubuntu*) @@ -76,4 +76,5 @@ jobs: esac run: | cp $GITHUB_WORKSPACE/rpms/build.sh $GITHUB_WORKSPACE/${{ matrix.image.DOCKERFILE_PATH }} - bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} $TAG + echo "TAG=$TAG" + bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} ${TAG} From ede0cefa5c6df9fb2101a910b7eb214daae94c9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 26 Jan 2023 14:45:19 +0100 Subject: [PATCH 058/328] When the action is called from a PR, the image uploaded has the tag for the PR's head branch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-package-creation-images.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index bb4397b6a4..c539d31544 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -28,7 +28,7 @@ jobs: - name: Set tag as version run: - if [ ! -z ${{ github.base_ref }} ]; then echo "TAG=${{ github.base_ref }}" >> $GITHUB_ENV; else echo "TAG=$(cat $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi + if [ ! -z ${{ github.head_ref }} ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(cat $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi - name: Build and push image ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} to Github Container Registry run: @@ -45,7 +45,7 @@ jobs: - name: Set tag as version run: | - if [ ! -z ${{ github.base_ref }} ]; then echo "TAG=${{ github.base_ref }}" >> $GITHUB_ENV; else echo "TAG=$(cat $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi + if [ ! -z ${{ github.head_ref }} ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(cat $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi - uses: uraimo/run-on-arch-action@v2.5.0 name: Build and push image ${{matrix.image.CONTAINER_NAME}} to Github Container Registry From a83e51ee31b3d71716ff19598ae250a70fe3dd4c Mon Sep 17 00:00:00 2001 From: Antonio Manuel Fresneda Rodriguez Date: Wed, 29 Dec 2021 12:29:49 +0100 Subject: [PATCH 059/328] Add libfimdb to CentOS SPECS. --- rpms/SPECS/wazuh-agent.spec | 1 + rpms/SPECS/wazuh-manager.spec | 1 + 2 files changed, 2 insertions(+) diff --git a/rpms/SPECS/wazuh-agent.spec b/rpms/SPECS/wazuh-agent.spec index 6a640ef165..6ffe4c6be0 100644 --- a/rpms/SPECS/wazuh-agent.spec +++ b/rpms/SPECS/wazuh-agent.spec @@ -549,6 +549,7 @@ rm -fr %{buildroot} %attr(750, root, wazuh) %{_localstatedir}/lib/libsysinfo.so %attr(750, root, wazuh) %{_localstatedir}/lib/libstdc++.so.6 %attr(750, root, wazuh) %{_localstatedir}/lib/libgcc_s.so.1 +%attr(750, root, wazuh) %{_localstatedir}/lib/libfimdb.so %dir %attr(750, wazuh, wazuh) %config(missingok) %{_localstatedir}/tmp/sca-%{version}-%{release}-tmp %dir %attr(750, wazuh, wazuh) %config(missingok) %{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/generic %attr(640, root, wazuh) %config(missingok) %{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/generic/* diff --git a/rpms/SPECS/wazuh-manager.spec b/rpms/SPECS/wazuh-manager.spec index 544136e75c..a6c479bbd8 100644 --- a/rpms/SPECS/wazuh-manager.spec +++ b/rpms/SPECS/wazuh-manager.spec @@ -676,6 +676,7 @@ rm -fr %{buildroot} %attr(750, root, wazuh) %{_localstatedir}/lib/libjemalloc.so.2 %attr(750, root, wazuh) %{_localstatedir}/lib/libstdc++.so.6 %attr(750, root, wazuh) %{_localstatedir}/lib/libgcc_s.so.1 +%attr(750, root, wazuh) %{_localstatedir}/lib/libfimdb.so %{_localstatedir}/lib/libpython3.9.so.1.0 %dir %attr(770, wazuh, wazuh) %{_localstatedir}/logs %attr(660, wazuh, wazuh) %ghost %{_localstatedir}/logs/active-responses.log From 643fa5ed47e70d07b25d19e5d25042e39fd9b089 Mon Sep 17 00:00:00 2001 From: Antonio Manuel Fresneda Rodriguez Date: Wed, 29 Dec 2021 12:42:24 +0100 Subject: [PATCH 060/328] Add libfimdb to Solaris SPECS. --- solaris/solaris11/SPECS/template_agent.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/solaris/solaris11/SPECS/template_agent.json b/solaris/solaris11/SPECS/template_agent.json index ec6b503f6e..81bc2c8fd0 100644 --- a/solaris/solaris11/SPECS/template_agent.json +++ b/solaris/solaris11/SPECS/template_agent.json @@ -679,6 +679,14 @@ "type": "file", "user": "root" }, + "/var/ossec/lib/libfimdb.so": { + "class": "static", + "group": "wazuh", + "mode": "0750", + "prot": "-rwxr-x---", + "type": "file", + "user": "root" + }, "/var/ossec/lib/libsysinfo.so": { "class": "static", "group": "wazuh", From 2bdf721f55a4142bb648157800793908fe43fb8c Mon Sep 17 00:00:00 2001 From: Chema Martinez Date: Thu, 24 Mar 2022 17:04:00 +0100 Subject: [PATCH 061/328] Update HP-UX generate packages script to include GCC-9.4 and cmake-3.22.2 --- hp-ux/generate_wazuh_packages.sh | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/hp-ux/generate_wazuh_packages.sh b/hp-ux/generate_wazuh_packages.sh index 896808cc81..5d310ef100 100755 --- a/hp-ux/generate_wazuh_packages.sh +++ b/hp-ux/generate_wazuh_packages.sh @@ -8,9 +8,9 @@ install_path="/var/ossec" current_path=`pwd` +build_tools_path="/home/okkam" source_directory=${current_path}/wazuh-sources configuration_file="${source_directory}/etc/preloaded-vars.conf" -PATH=$PATH:/usr/local/bin target_dir="${current_path}/output" checksum_dir="" wazuh_version="" @@ -18,6 +18,11 @@ wazuh_revision="1" depot_path="" control_binary="" +# Needed variables to build Wazuh with custom GCC and cmake +PATH=${build_tools_path}/bootstrap-gcc/gcc94_prefix/bin:${build_tools_path}/cmake_prefix_install/bin:$PATH:/usr/local/bin +LD_LIBRARY_PATH=${build_tools_path}/bootstrap-gcc/gcc94_prefix/lib +CXX=/home/okkam/bootstrap-gcc/gcc94_prefix/bin/g++ + build_environment() { # Resizing partitions for Site Ox boxes (used by Wazuh team) @@ -53,7 +58,6 @@ build_environment() { swinstall -s $depot \* /usr/local/bin/depothelper $fpt_connection -f curl /usr/local/bin/depothelper $fpt_connection -f unzip - /usr/local/bin/depothelper $fpt_connection -f gcc /usr/local/bin/depothelper $fpt_connection -f make /usr/local/bin/depothelper $fpt_connection -f bash /usr/local/bin/depothelper $fpt_connection -f gzip @@ -62,9 +66,29 @@ build_environment() { /usr/local/bin/depothelper $fpt_connection -f libtool /usr/local/bin/depothelper $fpt_connection -f coreutils /usr/local/bin/depothelper $fpt_connection -f gdb - /usr/local/bin/depothelper $fpt_connection -f perl + /usr/local/bin/depothelper $fpt_connection -f perl-5.10.1 /usr/local/bin/depothelper $fpt_connection -f regex /usr/local/bin/depothelper $fpt_connection -f python + cp /usr/bin/perl /tmp/perl + cp /usr/local/bin/perl5.10.1 /usr/bin/perl + + # Install GCC 9.4 + mkdir ${build_tools_path} + cd ${build_tools_path} + mkdir bootstrap-gcc + cd ${build_tools_path}/bootstrap-gcc + curl -k -SO https://packages.wazuh.com/utils/gcc/gcc_9.4_HPUX_build.tar.gz + gunzip gcc_9.4_HPUX_build.tar.gz + tar -xf gcc_9.4_HPUX_build.tar + rm -f gcc_9.4_HPUX_build.tar + cp -f ${build_tools_path}/bootstrap-gcc/gcc94_prefix/bin/gcc ${build_tools_path}/bootstrap-gcc/gcc94_prefix/bin/cc + + # Install cmake 3.22.2 + cd ${build_tools_path} + curl -k -SO https://packages.wazuh.com/utils/cmake/cmake_3.22.2_HPUX_build.tar.gz + gunzip cmake_3.22.2_HPUX_build.tar.gz + tar -xf cmake_3.22.2_HPUX_build.tar + rm -f cmake_3.22.2_HPUX_build.tar } config() { @@ -172,6 +196,8 @@ clean() { userdel wazuh groupdel wazuh + rm -rf ${build_tools_path} + exit ${exit_code} } From c7b82fbe9f6b36392b15267284c766cfaa5e2a6d Mon Sep 17 00:00:00 2001 From: Chema Martinez Date: Tue, 3 May 2022 18:32:41 +0200 Subject: [PATCH 062/328] Include GCC libs to HPUX agent package --- hp-ux/generate_wazuh_packages.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hp-ux/generate_wazuh_packages.sh b/hp-ux/generate_wazuh_packages.sh index 5d310ef100..d4c8454e4f 100755 --- a/hp-ux/generate_wazuh_packages.sh +++ b/hp-ux/generate_wazuh_packages.sh @@ -141,6 +141,12 @@ compile() { gmake deps RESOURCES_URL=http://packages.wazuh.com/deps/${deps_version} TARGET=agent gmake TARGET=agent USE_SELINUX=no bash ${source_directory}/install.sh + # Install std libs needed to run the agent + cp -f ${build_tools_path}/bootstrap-gcc/gcc94_prefix/lib/libstdc++.so.6.28 ${install_path}/lib + cp -f ${build_tools_path}/bootstrap-gcc/gcc94_prefix/lib/libgcc_s.so.0 ${install_path}/lib + ln -s ${install_path}/lib/libstdc++.so.6.28 ${install_path}/lib/libstdc++.so.6 + ln -s ${install_path}/lib/libstdc++.so.6.28 ${install_path}/lib/libstdc++.so + ln -s ${install_path}/lib/libgcc_s.so.0 ${install_path}/lib/libgcc_s.so cd $current_path } From f1253f5f08f38cadc6770da22e8c92beca9893a2 Mon Sep 17 00:00:00 2001 From: Jotacarma Date: Tue, 15 Nov 2022 12:57:38 +0100 Subject: [PATCH 063/328] Added link to use gcc 9.4 after installing --- debs/Debian/amd64/Dockerfile | 3 ++- debs/Debian/arm64/Dockerfile | 3 ++- debs/Debian/armhf/Dockerfile | 3 ++- debs/Debian/i386/Dockerfile | 3 ++- debs/Debian/ppc64le/Dockerfile | 3 ++- rpms/CentOS/5/i386/Dockerfile | 3 ++- rpms/CentOS/5/x86_64/Dockerfile | 3 ++- rpms/CentOS/6/i386/Dockerfile | 3 ++- rpms/CentOS/6/x86_64/Dockerfile | 3 ++- rpms/CentOS/7/aarch64/Dockerfile | 3 ++- rpms/CentOS/7/armv7hl/Dockerfile | 3 ++- rpms/CentOS/7/ppc64le/Dockerfile | 3 ++- wpk/linux/x86_64/Dockerfile | 3 ++- 13 files changed, 26 insertions(+), 13 deletions(-) diff --git a/debs/Debian/amd64/Dockerfile b/debs/Debian/amd64/Dockerfile index c3734b3576..2610d3f139 100644 --- a/debs/Debian/amd64/Dockerfile +++ b/debs/Debian/amd64/Dockerfile @@ -20,7 +20,8 @@ RUN curl -OL http://packages.wazuh.com/utils/gcc/gcc-9.4.0.tar.gz && \ ./configure --prefix=/usr/local/gcc-9.4.0 --enable-languages=c,c++ --disable-multilib \ --disable-libsanitizer && \ make -j$(nproc) && make install && \ - ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && cd / && rm -rf gcc-* + ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && \ + ln -fs /usr/local/gcc-9.4.0/bin/gcc /usr/bin/cc && cd / && rm -rf gcc-* ENV CPLUS_INCLUDE_PATH "/usr/local/gcc-9.4.0/include/c++/9.4.0/" ENV LD_LIBRARY_PATH "/usr/local/gcc-9.4.0/lib64:${LD_LIBRARY_PATH}" diff --git a/debs/Debian/arm64/Dockerfile b/debs/Debian/arm64/Dockerfile index 7c4737fbe0..3a24ee820f 100644 --- a/debs/Debian/arm64/Dockerfile +++ b/debs/Debian/arm64/Dockerfile @@ -23,7 +23,8 @@ RUN curl -OL http://packages.wazuh.com/utils/gcc/gcc-9.4.0.tar.gz && \ ./configure --prefix=/usr/local/gcc-9.4.0 --enable-languages=c,c++ --disable-multilib \ --disable-libsanitizer && \ make -j$(nproc) && make install && \ - ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && cd / && rm -rf gcc-* + ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && \ + ln -fs /usr/local/gcc-9.4.0/bin/gcc /usr/bin/cc && cd / && rm -rf gcc-* ENV CPLUS_INCLUDE_PATH "/usr/local/gcc-9.4.0/include/c++/9.4.0/" ENV LD_LIBRARY_PATH "/usr/local/gcc-9.4.0/lib64/" diff --git a/debs/Debian/armhf/Dockerfile b/debs/Debian/armhf/Dockerfile index b9d5d8a015..4320d43498 100644 --- a/debs/Debian/armhf/Dockerfile +++ b/debs/Debian/armhf/Dockerfile @@ -24,7 +24,8 @@ RUN curl -OL http://packages.wazuh.com/utils/gcc/gcc-9.4.0.tar.gz && \ --with-fpu=vfpv3-d16 --with-float=hard --enable-languages=c,c++ \ --disable-multilib --disable-libsanitizer && \ linux32 make -j$(nproc) && linux32 make install && \ - ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && cd / && rm -rf gcc-* + ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && \ + ln -fs /usr/local/gcc-9.4.0/bin/gcc /usr/bin/cc && cd / && rm -rf gcc-* ENV CPLUS_INCLUDE_PATH "/usr/local/gcc-9.4.0/include/c++/9.4.0/" ENV LD_LIBRARY_PATH "/usr/local/gcc-9.4.0/lib/" diff --git a/debs/Debian/i386/Dockerfile b/debs/Debian/i386/Dockerfile index 99eef6c673..f1e8867b13 100644 --- a/debs/Debian/i386/Dockerfile +++ b/debs/Debian/i386/Dockerfile @@ -23,7 +23,8 @@ RUN curl -OL http://packages.wazuh.com/utils/gcc/gcc-9.4.0.tar.gz && \ linux32 ./configure --prefix=/usr/local/gcc-9.4.0 --enable-languages=c,c++ \ --disable-multilib --disable-libsanitizer && \ linux32 make -j$(nproc) && linux32 make install && \ - ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && cd / && rm -rf gcc-* + ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && \ + ln -fs /usr/local/gcc-9.4.0/bin/gcc /usr/bin/cc && cd / && rm -rf gcc-* ENV CPLUS_INCLUDE_PATH "/usr/local/gcc-9.4.0/include/c++/9.4.0/" ENV LD_LIBRARY_PATH "/usr/local/gcc-9.4.0/lib:${LD_LIBRARY_PATH}" diff --git a/debs/Debian/ppc64le/Dockerfile b/debs/Debian/ppc64le/Dockerfile index cbdf066de4..2fa4fe311a 100644 --- a/debs/Debian/ppc64le/Dockerfile +++ b/debs/Debian/ppc64le/Dockerfile @@ -20,7 +20,8 @@ RUN curl -OL http://packages.wazuh.com/utils/gcc/gcc-9.4.0.tar.gz && \ ./configure --prefix=/usr/local/gcc-9.4.0 --enable-languages=c,c++ --disable-multilib \ --disable-libsanitizer && \ make -j$(nproc) && make install && \ - ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && cd / && rm -rf gcc-* + ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && \ + ln -fs /usr/local/gcc-9.4.0/bin/gcc /usr/bin/cc && cd / && rm -rf gcc-* ENV CPLUS_INCLUDE_PATH "/usr/local/gcc-9.4.0/include/c++/9.4.0/" ENV LD_LIBRARY_PATH "/usr/local/gcc-9.4.0/lib64:${LD_LIBRARY_PATH}" diff --git a/rpms/CentOS/5/i386/Dockerfile b/rpms/CentOS/5/i386/Dockerfile index 7c19499b5c..af68534de5 100644 --- a/rpms/CentOS/5/i386/Dockerfile +++ b/rpms/CentOS/5/i386/Dockerfile @@ -31,7 +31,8 @@ RUN curl -OL http://packages.wazuh.com/utils/gcc/gcc-9.4.0.tar.gz && \ linux32 ./contrib/download_prerequisites && \ linux32 ./configure --prefix=/usr/local/gcc-9.4.0 --enable-languages=c,c++ --disable-multilib --disable-libsanitizer && \ linux32 make -j2 && linux32 make install && \ - ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && cd / && rm -rf gcc-* + ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && \ + ln -fs /usr/local/gcc-9.4.0/bin/gcc /usr/bin/cc && cd / && rm -rf gcc-* ENV CPLUS_INCLUDE_PATH "/usr/local/gcc-9.4.0/include/c++/9.4.0/" ENV LD_LIBRARY_PATH "/usr/local/gcc-9.4.0/lib/" diff --git a/rpms/CentOS/5/x86_64/Dockerfile b/rpms/CentOS/5/x86_64/Dockerfile index 01e4e65e64..2a6b2d9581 100644 --- a/rpms/CentOS/5/x86_64/Dockerfile +++ b/rpms/CentOS/5/x86_64/Dockerfile @@ -35,7 +35,8 @@ RUN curl -OL http://packages.wazuh.com/utils/gcc/gcc-9.4.0.tar.gz && \ ./configure --prefix=/usr/local/gcc-9.4.0 --enable-languages=c,c++ \ --disable-multilib --disable-libsanitizer && \ make -j2 && make install && \ - ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && cd / && rm -rf gcc-* + ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && \ + ln -fs /usr/local/gcc-9.4.0/bin/gcc /usr/bin/cc && cd / && rm -rf gcc-* ENV CPLUS_INCLUDE_PATH "/usr/local/gcc-9.4.0/include/c++/9.4.0/" ENV LD_LIBRARY_PATH "/usr/local/gcc-9.4.0/lib64/" diff --git a/rpms/CentOS/6/i386/Dockerfile b/rpms/CentOS/6/i386/Dockerfile index 04cdb78fa5..289dee9946 100644 --- a/rpms/CentOS/6/i386/Dockerfile +++ b/rpms/CentOS/6/i386/Dockerfile @@ -46,7 +46,8 @@ RUN curl -OL http://packages.wazuh.com/utils/gcc/gcc-9.4.0.tar.gz && \ linux32 ./configure --prefix=/usr/local/gcc-9.4.0 --enable-languages=c,c++ \ --disable-multilib --disable-libsanitizer && \ linux32 make -j$(nproc) && linux32 make install && \ - ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && cd / && rm -rf gcc-* + ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && \ + ln -fs /usr/local/gcc-9.4.0/bin/gcc /usr/bin/cc && cd / && rm -rf gcc-* ENV CPLUS_INCLUDE_PATH "/usr/local/gcc-9.4.0/include/c++/9.4.0/" ENV LD_LIBRARY_PATH "/usr/local/gcc-9.4.0/lib/" diff --git a/rpms/CentOS/6/x86_64/Dockerfile b/rpms/CentOS/6/x86_64/Dockerfile index 898fb35bf9..d6968907c6 100644 --- a/rpms/CentOS/6/x86_64/Dockerfile +++ b/rpms/CentOS/6/x86_64/Dockerfile @@ -46,7 +46,8 @@ RUN curl -OL http://packages.wazuh.com/utils/gcc/gcc-9.4.0.tar.gz && \ ./configure --prefix=/usr/local/gcc-9.4.0 --enable-languages=c,c++ \ --disable-multilib --disable-libsanitizer && \ make -j$(nproc) && make install && \ - ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && cd / && rm -rf gcc-* + ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && \ + ln -fs /usr/local/gcc-9.4.0/bin/gcc /usr/bin/cc && cd / && rm -rf gcc-* ENV CPLUS_INCLUDE_PATH "/usr/local/gcc-9.4.0/include/c++/9.4.0/" ENV LD_LIBRARY_PATH "/usr/local/gcc-9.4.0/lib64/" diff --git a/rpms/CentOS/7/aarch64/Dockerfile b/rpms/CentOS/7/aarch64/Dockerfile index cedd1811a7..1b4a6ad33d 100644 --- a/rpms/CentOS/7/aarch64/Dockerfile +++ b/rpms/CentOS/7/aarch64/Dockerfile @@ -30,7 +30,8 @@ RUN curl -OL http://packages.wazuh.com/utils/gcc/gcc-9.4.0.tar.gz && \ ./configure --prefix=/usr/local/gcc-9.4.0 --enable-languages=c,c++ --disable-multilib \ --disable-libsanitizer --disable-bootstrap && \ make -j$(nproc) && make install && \ - ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && cd / && rm -rf gcc-* + ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && \ + ln -fs /usr/local/gcc-9.4.0/bin/gcc /usr/bin/cc && cd / && rm -rf gcc-* ENV CPLUS_INCLUDE_PATH "/usr/local/gcc-9.4.0/include/c++/9.4.0/" ENV LD_LIBRARY_PATH "/usr/local/gcc-9.4.0/lib64/" diff --git a/rpms/CentOS/7/armv7hl/Dockerfile b/rpms/CentOS/7/armv7hl/Dockerfile index dc929b2005..f4e81eae0c 100644 --- a/rpms/CentOS/7/armv7hl/Dockerfile +++ b/rpms/CentOS/7/armv7hl/Dockerfile @@ -10,7 +10,8 @@ RUN curl -OL http://packages.wazuh.com/utils/gcc/gcc-9.4.0.tar.gz && \ --with-float=hard --with-fpu=vfpv3-d16 --enable-languages=c,c++ --disable-multilib \ --disable-libsanitizer && \ linux32 make -j$(nproc) && linux32 make install && \ - ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && cd / && rm -rf gcc-* + ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && \ + ln -fs /usr/local/gcc-9.4.0/bin/gcc /usr/bin/cc && cd / && rm -rf gcc-* ENV CPLUS_INCLUDE_PATH "/usr/local/gcc-9.4.0/include/c++/9.4.0/" ENV LD_LIBRARY_PATH "/usr/local/gcc-9.4.0/lib/" diff --git a/rpms/CentOS/7/ppc64le/Dockerfile b/rpms/CentOS/7/ppc64le/Dockerfile index 23a0620696..e588b6c2e2 100644 --- a/rpms/CentOS/7/ppc64le/Dockerfile +++ b/rpms/CentOS/7/ppc64le/Dockerfile @@ -27,7 +27,8 @@ RUN curl -OL http://packages.wazuh.com/utils/gcc/gcc-9.4.0.tar.gz && \ ./configure --prefix=/usr/local/gcc-9.4.0 --enable-languages=c,c++ \ --disable-multilib --disable-libsanitizer && \ make -j$(nproc) && make install && \ - ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && cd / && rm -rf gcc-* + ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && \ + ln -fs /usr/local/gcc-9.4.0/bin/gcc /usr/bin/cc && cd / && rm -rf gcc-* ENV CPLUS_INCLUDE_PATH "/usr/local/gcc-9.4.0/include/c++/9.4.0/" ENV LD_LIBRARY_PATH "/usr/local/gcc-9.4.0/lib64/" diff --git a/wpk/linux/x86_64/Dockerfile b/wpk/linux/x86_64/Dockerfile index a7a184192d..8caddc00f7 100644 --- a/wpk/linux/x86_64/Dockerfile +++ b/wpk/linux/x86_64/Dockerfile @@ -25,7 +25,8 @@ RUN curl -OL http://packages.wazuh.com/utils/gcc/gcc-9.4.0.tar.gz && \ ./configure --prefix=/usr/local/gcc-9.4.0 --enable-languages=c,c++ \ --disable-multilib --disable-libsanitizer && \ make -j$(nproc) && make install && \ - ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && cd / && rm -rf gcc-* + ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && \ + ln -fs /usr/local/gcc-9.4.0/bin/gcc /usr/bin/cc && cd / && rm -rf gcc-* ENV CPLUS_INCLUDE_PATH "/usr/local/gcc-9.4.0/include/c++/9.4.0/" ENV LD_LIBRARY_PATH "/usr/local/gcc-9.4.0/lib64/" From 0c4b0cce3c0a0dd440ed4703c538455ec42a78f5 Mon Sep 17 00:00:00 2001 From: Jotacarma Date: Thu, 22 Dec 2022 12:41:31 +0100 Subject: [PATCH 064/328] Remove perl version while provisioning environment --- hp-ux/generate_wazuh_packages.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hp-ux/generate_wazuh_packages.sh b/hp-ux/generate_wazuh_packages.sh index d4c8454e4f..0c4c55bd21 100755 --- a/hp-ux/generate_wazuh_packages.sh +++ b/hp-ux/generate_wazuh_packages.sh @@ -66,11 +66,9 @@ build_environment() { /usr/local/bin/depothelper $fpt_connection -f libtool /usr/local/bin/depothelper $fpt_connection -f coreutils /usr/local/bin/depothelper $fpt_connection -f gdb - /usr/local/bin/depothelper $fpt_connection -f perl-5.10.1 + /usr/local/bin/depothelper $fpt_connection -f perl /usr/local/bin/depothelper $fpt_connection -f regex /usr/local/bin/depothelper $fpt_connection -f python - cp /usr/bin/perl /tmp/perl - cp /usr/local/bin/perl5.10.1 /usr/bin/perl # Install GCC 9.4 mkdir ${build_tools_path} From 9a52db685396ecf27ed05a904aeae5fb2bb0eb03 Mon Sep 17 00:00:00 2001 From: Jotacarma Date: Mon, 9 Jan 2023 13:00:42 +0100 Subject: [PATCH 065/328] Change to http protocol because can be problems in HP-UX --- hp-ux/generate_wazuh_packages.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hp-ux/generate_wazuh_packages.sh b/hp-ux/generate_wazuh_packages.sh index 0c4c55bd21..7ad1faef5b 100755 --- a/hp-ux/generate_wazuh_packages.sh +++ b/hp-ux/generate_wazuh_packages.sh @@ -75,7 +75,7 @@ build_environment() { cd ${build_tools_path} mkdir bootstrap-gcc cd ${build_tools_path}/bootstrap-gcc - curl -k -SO https://packages.wazuh.com/utils/gcc/gcc_9.4_HPUX_build.tar.gz + curl -k -SO http://packages.wazuh.com/utils/gcc/gcc_9.4_HPUX_build.tar.gz gunzip gcc_9.4_HPUX_build.tar.gz tar -xf gcc_9.4_HPUX_build.tar rm -f gcc_9.4_HPUX_build.tar @@ -83,7 +83,7 @@ build_environment() { # Install cmake 3.22.2 cd ${build_tools_path} - curl -k -SO https://packages.wazuh.com/utils/cmake/cmake_3.22.2_HPUX_build.tar.gz + curl -k -SO http://packages.wazuh.com/utils/cmake/cmake_3.22.2_HPUX_build.tar.gz gunzip cmake_3.22.2_HPUX_build.tar.gz tar -xf cmake_3.22.2_HPUX_build.tar rm -f cmake_3.22.2_HPUX_build.tar From 3b8bf189c96b272709f41f3cfeaed38f283b8b36 Mon Sep 17 00:00:00 2001 From: Jotacarma Date: Thu, 12 Jan 2023 10:05:53 +0100 Subject: [PATCH 066/328] Export LD_LIBRARY_PATH to fix compilation --- hp-ux/generate_wazuh_packages.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hp-ux/generate_wazuh_packages.sh b/hp-ux/generate_wazuh_packages.sh index 7ad1faef5b..caf58ddce6 100755 --- a/hp-ux/generate_wazuh_packages.sh +++ b/hp-ux/generate_wazuh_packages.sh @@ -21,7 +21,8 @@ control_binary="" # Needed variables to build Wazuh with custom GCC and cmake PATH=${build_tools_path}/bootstrap-gcc/gcc94_prefix/bin:${build_tools_path}/cmake_prefix_install/bin:$PATH:/usr/local/bin LD_LIBRARY_PATH=${build_tools_path}/bootstrap-gcc/gcc94_prefix/lib -CXX=/home/okkam/bootstrap-gcc/gcc94_prefix/bin/g++ +export LD_LIBRARY_PATH +CXX=${build_tools_path}/bootstrap-gcc/gcc94_prefix/bin/g++ build_environment() { From 4132931043fedef477486b40ca6acfe11db6cc04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 26 Jan 2023 18:03:23 +0100 Subject: [PATCH 067/328] Download the docker images to create the packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../build_and_push_image_to_ghcr.sh | 8 +- .../common-tools/pull_image_from_ghcr.sh | 28 +++++ .github/workflows/build-rpm-packages.yml | 101 ++++++++++++------ .../upload-package-creation-images.yml | 2 + 4 files changed, 100 insertions(+), 39 deletions(-) create mode 100644 .github/actions/common-tools/pull_image_from_ghcr.sh diff --git a/.github/actions/common-tools/build_and_push_image_to_ghcr.sh b/.github/actions/common-tools/build_and_push_image_to_ghcr.sh index 33d35310bc..a61d23bbf0 100644 --- a/.github/actions/common-tools/build_and_push_image_to_ghcr.sh +++ b/.github/actions/common-tools/build_and_push_image_to_ghcr.sh @@ -25,10 +25,4 @@ IMAGE_ID=$(echo ${IMAGE_ID} | tr '[A-Z]' '[a-z]') # Build image echo build -t ${IMAGE_ID} -f ${DOCKERFILE_PATH} ${BUILD_CONTEXT} docker build -t ${IMAGE_ID} -f ${DOCKERFILE_PATH} ${BUILD_CONTEXT} - -# Push image -if [ "$BUILD_ONLY" == "true" ]; then - echo "skipping push" -else - docker push ${IMAGE_ID} -fi \ No newline at end of file +docker push ${IMAGE_ID} \ No newline at end of file diff --git a/.github/actions/common-tools/pull_image_from_ghcr.sh b/.github/actions/common-tools/pull_image_from_ghcr.sh new file mode 100644 index 0000000000..844376cc31 --- /dev/null +++ b/.github/actions/common-tools/pull_image_from_ghcr.sh @@ -0,0 +1,28 @@ +GITHUB_PUSH_SECRET=$1 +GITHUB_USER=$2 +DOCKER_IMAGE_NAME=$3 +BUILD_CONTEXT=$4 +DOCKERFILE_PATH="$BUILD_CONTEXT/Dockerfile" +if [ -n "$5" ]; then + DOCKER_IMAGE_TAG="$5" +else + DOCKER_IMAGE_TAG="latest" +fi + + +# Login to GHCR +echo ${GITHUB_PUSH_SECRET} | docker login https://ghcr.io -u $GITHUB_USER --password-stdin + +# GITHUB_REPOSITORY is always org/repo syntax. Get the owner in case it is different than the actor (when working in an org) +GITHUB_REPOSITORY="wazuh/wazuh-packages" +GITHUB_OWNER="wazuh" + +# Set up full image with tag +IMAGE_ID=ghcr.io/${GITHUB_OWNER}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG} +IMAGE_ID=$(echo ${IMAGE_ID} | tr '[A-Z]' '[a-z]') + +docker pull ${IMAGE_ID} + +docker rmi ghcr.io/wazuh/rpm_builder_x86_2053/merge:latest +docker rmi ghcr.io/wazuh/rpm_builder_i386_2053/merge:latest +docker rmi ghcr.io/wazuh/rpm_builder_aarch64_2053/merge:latest diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 895e8bc74b..7b6d239799 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -8,59 +8,96 @@ on: workflow_dispatch: jobs: - Wazuh-agent-rpm-package-builds-aarch64-armv7-ppc64le: + Wazuh-agent-rpm-package-builds-x86_64-i386: runs-on: ubuntu-latest strategy: matrix: type: [agent, manager] - arch : [aarch64, armv7, ppc64le] - distro: [ubuntu18.04, alpine_latest] - exclude: - - arch: armv7 - distro: alpine_latest - - arch: aarch64 - distro: alpine_latest - - arch: ppc64le - distro: ubuntu18.04 - fail-fast: false + arch : [x86_64, i386] steps: - uses: actions/checkout@v3 - - uses: uraimo/run-on-arch-action@v2.5.0 - name: Build the ${{ matrix.arch }} rpm Wazuh ${{ matrix.type }} package - with: - arch: ${{ matrix.arch }} - distro: ${{ matrix.distro }} - githubToken: ${{ github.token }} - dockerRunArgs: --volume /var/run/docker.sock:/var/run/docker.sock - run: | - sh $GITHUB_WORKSPACE/.github/actions/common-tools/setup_docker.sh - bash $GITHUB_WORKSPACE/rpms/generate_rpm_package.sh -b master -t ${{ matrix.type }} -a ${{ matrix.arch }} --dev - echo "PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV + - name: Set tag as version + run: + if [ ! -z ${{ github.head_ref }} ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(cat $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi + + - name: Download docker image for package building + run: + bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} $TAG + + - name: Build the ${{ matrix.arch }} rpm Wazuh ${{ matrix.type }} package + working-directory: ./rpms + run: | + bash generate_rpm_package.sh -b master -t ${{ matrix.type }} -a ${{ matrix.arch }} --dev + echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV - name: Upload Wazuh ${{ matrix.type }} ${{ matrix.arch }} package as artifact uses: actions/upload-artifact@v2 with: - name: ${PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}} - path: ${{github.workspace}}/rpms/output/${PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}} + name: ${PACKAGE_NAME} + path: ${{github.workspace}}/rpms/output/${PACKAGE_NAME} - Wazuh-agent-rpm-package-builds-x86_64-i386: + + Wazuh-agent-rpm-package-builds-aarch64-armv7-ppc64le: runs-on: ubuntu-latest strategy: matrix: type: [agent, manager] - arch : [x86_64, i386] + arch : [aarch64, armv7, ppc64le] + distro: [ubuntu_latest] + fail-fast: false steps: - uses: actions/checkout@v3 - - name: Build the ${{ matrix.arch }} rpm Wazuh ${{ matrix.type }} package - working-directory: ./rpms + - name: Get changed files + id: changes + # Set outputs using the command. run: | - bash generate_rpm_package.sh -b master -t ${{ matrix.type }} -a ${{ matrix.arch }} --dev - echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV + echo "::set-output name=all::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | xargs)" + echo "::set-output name=ts::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep .ts$ | xargs)" + + - name: Set tag as version + run: + if [ ! -z ${{ github.head_ref }} && $(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | xargs | grep 'rpms/CentOS')]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(cat $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi + + - name: Download docker image for package building + run: + bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} 1626-fix-rhel9-derived-services + + - uses: uraimo/run-on-arch-action@v2.5.0 + name: Build the ${{ matrix.arch }} rpm Wazuh ${{ matrix.type }} package + with: + arch: ${{ matrix.arch }} + distro: ${{ matrix.distro }} + githubToken: ${{ secrets.GITHUB_TOKEN }} + dockerRunArgs: | + --volume /var/run/docker.sock:/var/run/docker.sock + env: | + TAG: ${{ env.TAG }} + install: | + case "${{ matrix.image.DISTRO }}" in + ubuntu*) + apt-get update + apt-get install -y -q ca-certificates curl gnupg lsb-release apt-utils + mkdir -p /etc/apt/keyrings + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg + echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null + apt-get update + apt-get install -y -q docker-ce docker-ce-cli containerd.io + ;; + alpine*) + apk -q update + apk -q add bash + apk -q add docker docker-compose + ;; + esac + run: | + bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} 1626-fix-rhel9-derived-services + bash $GITHUB_WORKSPACE/rpms/generate_rpm_package.sh -b master -t ${{ matrix.type }} -a ${{ matrix.arch }} --dev --dont-build-docker + echo "PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV - name: Upload Wazuh ${{ matrix.type }} ${{ matrix.arch }} package as artifact uses: actions/upload-artifact@v2 with: - name: ${PACKAGE_NAME} - path: ${{github.workspace}}/rpms/output/${PACKAGE_NAME} \ No newline at end of file + name: ${PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}} + path: ${{github.workspace}}/rpms/output/${PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}} diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index c539d31544..b100a1ed1c 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -3,6 +3,8 @@ on: pull_request: paths: - '.github/workflows/upload-package-creation-images.yml' + - 'rpms/CentOS/*' + - 'rpms/build.sh' push: branches: - master From b42cec35dfbfda089a930fe2ffe99b7f8d874d66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 26 Jan 2023 18:05:05 +0100 Subject: [PATCH 068/328] Change OS for armv7 creation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-package-creation-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index b100a1ed1c..01741d488d 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -40,7 +40,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - image: [ {CONTAINER_NAME: rpm_builder_aarch64, DOCKERFILE_PATH: rpms/CentOS/7/aarch64, ARCHITECTURE: aarch64, DISTRO: ubuntu_latest}, {CONTAINER_NAME: rpm_builder_ppc64le, DOCKERFILE_PATH: rpms/CentOS/7/ppc64le, ARCHITECTURE: ppc64le, DISTRO: ubuntu_latest}, {CONTAINER_NAME: rpm_builder_armv7, DOCKERFILE_PATH: rpms/CentOS/7/armv7hl, ARCHITECTURE: armv7 , DISTRO: ubuntu_latest} ] + image: [ {CONTAINER_NAME: rpm_builder_aarch64, DOCKERFILE_PATH: rpms/CentOS/7/aarch64, ARCHITECTURE: aarch64, DISTRO: ubuntu_latest}, {CONTAINER_NAME: rpm_builder_ppc64le, DOCKERFILE_PATH: rpms/CentOS/7/ppc64le, ARCHITECTURE: ppc64le, DISTRO: ubuntu_latest}, {CONTAINER_NAME: rpm_builder_armv7, DOCKERFILE_PATH: rpms/CentOS/7/armv7hl, ARCHITECTURE: armv7 , DISTRO: alpine_latest} ] fail-fast: false steps: - uses: actions/checkout@v2 From 7ae6dedb0aee29a59e509fbed3907667f792a015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 26 Jan 2023 18:22:51 +0100 Subject: [PATCH 069/328] Fix container name to pull from ghcr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../actions/common-tools/pull_image_from_ghcr.sh | 7 +++---- .github/workflows/build-rpm-packages.yml | 13 ++++++------- .../workflows/upload-package-creation-images.yml | 2 +- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.github/actions/common-tools/pull_image_from_ghcr.sh b/.github/actions/common-tools/pull_image_from_ghcr.sh index 844376cc31..ee88a7199b 100644 --- a/.github/actions/common-tools/pull_image_from_ghcr.sh +++ b/.github/actions/common-tools/pull_image_from_ghcr.sh @@ -1,10 +1,8 @@ GITHUB_PUSH_SECRET=$1 GITHUB_USER=$2 DOCKER_IMAGE_NAME=$3 -BUILD_CONTEXT=$4 -DOCKERFILE_PATH="$BUILD_CONTEXT/Dockerfile" -if [ -n "$5" ]; then - DOCKER_IMAGE_TAG="$5" +if [ -n "$4" ]; then + DOCKER_IMAGE_TAG="$4" else DOCKER_IMAGE_TAG="latest" fi @@ -21,6 +19,7 @@ GITHUB_OWNER="wazuh" IMAGE_ID=ghcr.io/${GITHUB_OWNER}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG} IMAGE_ID=$(echo ${IMAGE_ID} | tr '[A-Z]' '[a-z]') +echo "docker pull ${IMAGE_ID}" docker pull ${IMAGE_ID} docker rmi ghcr.io/wazuh/rpm_builder_x86_2053/merge:latest diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 7b6d239799..544b273137 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -20,6 +20,7 @@ jobs: - name: Set tag as version run: if [ ! -z ${{ github.head_ref }} ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(cat $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi + if [ ${{ matrix.arch }} == "x86_64" ]; then echo "CONTAINER_NAME=rpm_builder_x86" >> $GITHUB_ENV ; else echo "CONTAINER_NAME=${{ matrix.arch }}" >> $GITHUB_ENV ; fi - name: Download docker image for package building run: @@ -56,13 +57,10 @@ jobs: echo "::set-output name=all::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | xargs)" echo "::set-output name=ts::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep .ts$ | xargs)" - - name: Set tag as version - run: + - name: Set tag and container name + run: | if [ ! -z ${{ github.head_ref }} && $(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | xargs | grep 'rpms/CentOS')]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(cat $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi - - - name: Download docker image for package building - run: - bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} 1626-fix-rhel9-derived-services + echo "CONTAINER_NAME=rpm_builder_${{ matrix.arch}}" >> $GITHUB_ENV - uses: uraimo/run-on-arch-action@v2.5.0 name: Build the ${{ matrix.arch }} rpm Wazuh ${{ matrix.type }} package @@ -74,6 +72,7 @@ jobs: --volume /var/run/docker.sock:/var/run/docker.sock env: | TAG: ${{ env.TAG }} + CONTAINER_NAME: ${{ env.CONTAINER_NAME }} install: | case "${{ matrix.image.DISTRO }}" in ubuntu*) @@ -92,7 +91,7 @@ jobs: ;; esac run: | - bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} 1626-fix-rhel9-derived-services + bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{ env.CONTAINER_NAME }} 1626-fix-rhel9-derived-services bash $GITHUB_WORKSPACE/rpms/generate_rpm_package.sh -b master -t ${{ matrix.type }} -a ${{ matrix.arch }} --dev --dont-build-docker echo "PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index 01741d488d..b100a1ed1c 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -40,7 +40,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - image: [ {CONTAINER_NAME: rpm_builder_aarch64, DOCKERFILE_PATH: rpms/CentOS/7/aarch64, ARCHITECTURE: aarch64, DISTRO: ubuntu_latest}, {CONTAINER_NAME: rpm_builder_ppc64le, DOCKERFILE_PATH: rpms/CentOS/7/ppc64le, ARCHITECTURE: ppc64le, DISTRO: ubuntu_latest}, {CONTAINER_NAME: rpm_builder_armv7, DOCKERFILE_PATH: rpms/CentOS/7/armv7hl, ARCHITECTURE: armv7 , DISTRO: alpine_latest} ] + image: [ {CONTAINER_NAME: rpm_builder_aarch64, DOCKERFILE_PATH: rpms/CentOS/7/aarch64, ARCHITECTURE: aarch64, DISTRO: ubuntu_latest}, {CONTAINER_NAME: rpm_builder_ppc64le, DOCKERFILE_PATH: rpms/CentOS/7/ppc64le, ARCHITECTURE: ppc64le, DISTRO: ubuntu_latest}, {CONTAINER_NAME: rpm_builder_armv7, DOCKERFILE_PATH: rpms/CentOS/7/armv7hl, ARCHITECTURE: armv7 , DISTRO: ubuntu_latest} ] fail-fast: false steps: - uses: actions/checkout@v2 From 798beda81dc5dc3f49f7371d5189cb87ace8de38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 26 Jan 2023 18:28:41 +0100 Subject: [PATCH 070/328] Unify build packages jobs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-rpm-packages.yml | 59 +++++++++--------------- 1 file changed, 21 insertions(+), 38 deletions(-) diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 544b273137..9406853a43 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -8,62 +8,45 @@ on: workflow_dispatch: jobs: - Wazuh-agent-rpm-package-builds-x86_64-i386: + Wazuh-agent-rpm-package-builds: runs-on: ubuntu-latest strategy: matrix: type: [agent, manager] - arch : [x86_64, i386] + arch : [x86_64, i386, aarch64, armv7, ppc64le] + distro: [ubuntu_latest] + fail-fast: false + steps: - uses: actions/checkout@v3 + - name: Get changed files + id: changes + # Set outputs using the command. + run: | + echo "::set-output name=all::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | xargs)" + echo "::set-output name=ts::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep .ts$ | xargs)" + - name: Set tag as version - run: + run: | if [ ! -z ${{ github.head_ref }} ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(cat $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi - if [ ${{ matrix.arch }} == "x86_64" ]; then echo "CONTAINER_NAME=rpm_builder_x86" >> $GITHUB_ENV ; else echo "CONTAINER_NAME=${{ matrix.arch }}" >> $GITHUB_ENV ; fi + if [ ${{ matrix.arch }} == "x86_64" ]; then echo "CONTAINER_NAME=rpm_builder_x86" >> $GITHUB_ENV ; else echo "CONTAINER_NAME=rpm_builder_${{ matrix.arch }}" >> $GITHUB_ENV ; fi - name: Download docker image for package building + if: "${{ matrix.arch }}" == "x86_64" || "${{ matrix.arch }}" == "i386" run: bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} $TAG - name: Build the ${{ matrix.arch }} rpm Wazuh ${{ matrix.type }} package + if: "${{ matrix.arch }}" == "x86_64" || "${{ matrix.arch }}" == "i386" working-directory: ./rpms run: | bash generate_rpm_package.sh -b master -t ${{ matrix.type }} -a ${{ matrix.arch }} --dev echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV - - name: Upload Wazuh ${{ matrix.type }} ${{ matrix.arch }} package as artifact - uses: actions/upload-artifact@v2 - with: - name: ${PACKAGE_NAME} - path: ${{github.workspace}}/rpms/output/${PACKAGE_NAME} - - - Wazuh-agent-rpm-package-builds-aarch64-armv7-ppc64le: - runs-on: ubuntu-latest - strategy: - matrix: - type: [agent, manager] - arch : [aarch64, armv7, ppc64le] - distro: [ubuntu_latest] - fail-fast: false - steps: - - uses: actions/checkout@v3 - - - name: Get changed files - id: changes - # Set outputs using the command. - run: | - echo "::set-output name=all::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | xargs)" - echo "::set-output name=ts::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep .ts$ | xargs)" - - - name: Set tag and container name - run: | - if [ ! -z ${{ github.head_ref }} && $(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | xargs | grep 'rpms/CentOS')]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(cat $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi - echo "CONTAINER_NAME=rpm_builder_${{ matrix.arch}}" >> $GITHUB_ENV - - - uses: uraimo/run-on-arch-action@v2.5.0 - name: Build the ${{ matrix.arch }} rpm Wazuh ${{ matrix.type }} package + - name: Build the ${{ matrix.arch }} rpm Wazuh ${{ matrix.type }} package + if: "${{ matrix.arch }}" != "x86_64" && "${{ matrix.arch }}" != "i386" + uses: uraimo/run-on-arch-action@v2.5.0 with: arch: ${{ matrix.arch }} distro: ${{ matrix.distro }} @@ -98,5 +81,5 @@ jobs: - name: Upload Wazuh ${{ matrix.type }} ${{ matrix.arch }} package as artifact uses: actions/upload-artifact@v2 with: - name: ${PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}} - path: ${{github.workspace}}/rpms/output/${PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}} + name: ${PACKAGE_NAME} + path: ${{github.workspace}}/rpms/output/${PACKAGE_NAME} \ No newline at end of file From e8962de553726cfbf9d4a24727f45a36268d513a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 26 Jan 2023 18:42:59 +0100 Subject: [PATCH 071/328] Unify upload images jobs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-rpm-packages.yml | 6 +++--- .../upload-package-creation-images.yml | 19 +++++-------------- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 9406853a43..e35b04ef69 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -33,19 +33,19 @@ jobs: if [ ${{ matrix.arch }} == "x86_64" ]; then echo "CONTAINER_NAME=rpm_builder_x86" >> $GITHUB_ENV ; else echo "CONTAINER_NAME=rpm_builder_${{ matrix.arch }}" >> $GITHUB_ENV ; fi - name: Download docker image for package building - if: "${{ matrix.arch }}" == "x86_64" || "${{ matrix.arch }}" == "i386" + if: ${{ ( matrix.image.arch == 'x86_64') || ( matrix.arch == 'i386' ) }} run: bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} $TAG - name: Build the ${{ matrix.arch }} rpm Wazuh ${{ matrix.type }} package - if: "${{ matrix.arch }}" == "x86_64" || "${{ matrix.arch }}" == "i386" + if: ${{ ( matrix.image.arch == 'x86_64') || ( matrix.arch == 'i386' ) }} working-directory: ./rpms run: | bash generate_rpm_package.sh -b master -t ${{ matrix.type }} -a ${{ matrix.arch }} --dev echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV - name: Build the ${{ matrix.arch }} rpm Wazuh ${{ matrix.type }} package - if: "${{ matrix.arch }}" != "x86_64" && "${{ matrix.arch }}" != "i386" + if: ${{ ( matrix.image.arch != 'x86_64') && ( matrix.arch != 'i386' )}} uses: uraimo/run-on-arch-action@v2.5.0 with: arch: ${{ matrix.arch }} diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index b100a1ed1c..4bba331d8e 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -19,12 +19,13 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - image: [ {CONTAINER_NAME: rpm_builder_x86, DOCKERFILE_PATH: rpms/CentOS/6/x86_64}, {CONTAINER_NAME: rpm_builder_i386, DOCKERFILE_PATH: rpms/CentOS/6/i386}] + image: [ {CONTAINER_NAME: rpm_builder_x86, DOCKERFILE_PATH: rpms/CentOS/6/x86_64, ARCHITECTURE: x86_64}, {CONTAINER_NAME: rpm_builder_i386, DOCKERFILE_PATH: rpms/CentOS/6/i386, ARCHITECTURE: i386}, {CONTAINER_NAME: rpm_builder_aarch64, DOCKERFILE_PATH: rpms/CentOS/7/aarch64, ARCHITECTURE: aarch64, DISTRO: ubuntu_latest}, {CONTAINER_NAME: rpm_builder_ppc64le, DOCKERFILE_PATH: rpms/CentOS/7/ppc64le, ARCHITECTURE: ppc64le, DISTRO: ubuntu_latest}, {CONTAINER_NAME: rpm_builder_armv7, DOCKERFILE_PATH: rpms/CentOS/7/armv7hl, ARCHITECTURE: armv7 , DISTRO: ubuntu_latest}] fail-fast: false steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Copy build.sh to Dockerfile path + if: ${{ ( matrix.image.ARCHITECTURE == 'x86_64') || ( matrix.image.ARCHITECTURE == 'i386' )}} run: cp $GITHUB_WORKSPACE/rpms/build.sh $GITHUB_WORKSPACE/${{ matrix.image.DOCKERFILE_PATH }} @@ -33,23 +34,13 @@ jobs: if [ ! -z ${{ github.head_ref }} ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(cat $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi - name: Build and push image ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} to Github Container Registry + if: ${{ ( matrix.image.ARCHITECTURE == 'x86_64') || ( matrix.image.ARCHITECTURE == 'i386' )}} run: bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} $TAG - Upload-RPM-armv7-ppc64le-aarch64-images: - runs-on: ubuntu-latest - strategy: - matrix: - image: [ {CONTAINER_NAME: rpm_builder_aarch64, DOCKERFILE_PATH: rpms/CentOS/7/aarch64, ARCHITECTURE: aarch64, DISTRO: ubuntu_latest}, {CONTAINER_NAME: rpm_builder_ppc64le, DOCKERFILE_PATH: rpms/CentOS/7/ppc64le, ARCHITECTURE: ppc64le, DISTRO: ubuntu_latest}, {CONTAINER_NAME: rpm_builder_armv7, DOCKERFILE_PATH: rpms/CentOS/7/armv7hl, ARCHITECTURE: armv7 , DISTRO: ubuntu_latest} ] - fail-fast: false - steps: - - uses: actions/checkout@v2 - - - name: Set tag as version - run: | - if [ ! -z ${{ github.head_ref }} ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(cat $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi - uses: uraimo/run-on-arch-action@v2.5.0 + if: ${{ ( matrix.image.ARCHITECTURE != 'x86_64') && ( matrix.image.ARCHITECTURE != 'i386' )}} name: Build and push image ${{matrix.image.CONTAINER_NAME}} to Github Container Registry with: arch: ${{ matrix.image.ARCHITECTURE }} From 47353e90859b5445cb5b9cf3ef814a6be48ebed5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 26 Jan 2023 18:48:59 +0100 Subject: [PATCH 072/328] Fix variable names for the package building workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-rpm-packages.yml | 32 +++++++++---------- .../upload-package-creation-images.yml | 6 ++-- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index e35b04ef69..ba56ce1c01 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -12,9 +12,9 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - type: [agent, manager] - arch : [x86_64, i386, aarch64, armv7, ppc64le] - distro: [ubuntu_latest] + TYPE: [agent, manager] + ARCHITECTURE : [x86_64, i386, aarch64, armv7, ppc64le] + DISTRO: [ubuntu_latest] fail-fast: false steps: @@ -30,26 +30,26 @@ jobs: - name: Set tag as version run: | if [ ! -z ${{ github.head_ref }} ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(cat $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi - if [ ${{ matrix.arch }} == "x86_64" ]; then echo "CONTAINER_NAME=rpm_builder_x86" >> $GITHUB_ENV ; else echo "CONTAINER_NAME=rpm_builder_${{ matrix.arch }}" >> $GITHUB_ENV ; fi + if [ ${{ matrix.ARCHITECTURE }} == "x86_64" ]; then echo "CONTAINER_NAME=rpm_builder_x86" >> $GITHUB_ENV ; else echo "CONTAINER_NAME=rpm_builder_${{ matrix.ARCHITECTURE }}" >> $GITHUB_ENV ; fi - name: Download docker image for package building - if: ${{ ( matrix.image.arch == 'x86_64') || ( matrix.arch == 'i386' ) }} + if: ${{ ( matrix.ARCHITECTURE == 'x86_64') || ( matrix.ARCHITECTURE == 'i386' ) }} run: bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} $TAG - - name: Build the ${{ matrix.arch }} rpm Wazuh ${{ matrix.type }} package - if: ${{ ( matrix.image.arch == 'x86_64') || ( matrix.arch == 'i386' ) }} + - name: Build the ${{ matrix.ARCHITECTURE }} rpm Wazuh ${{ matrix.TYPE }} package + if: ${{ ( matrix.ARCHITECTURE == 'x86_64') || ( matrix.ARCHITECTURE == 'i386' ) }} working-directory: ./rpms run: | - bash generate_rpm_package.sh -b master -t ${{ matrix.type }} -a ${{ matrix.arch }} --dev + bash generate_rpm_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV - - name: Build the ${{ matrix.arch }} rpm Wazuh ${{ matrix.type }} package - if: ${{ ( matrix.image.arch != 'x86_64') && ( matrix.arch != 'i386' )}} + - name: Build the ${{ matrix.ARCHITECTURE }} rpm Wazuh ${{ matrix.TYPE }} package + if: ${{ ( matrix.ARCHITECTURE != 'x86_64') && ( matrix.ARCHITECTURE != 'i386' )}} uses: uraimo/run-on-arch-action@v2.5.0 with: - arch: ${{ matrix.arch }} - distro: ${{ matrix.distro }} + arch: ${{ matrix.ARCHITECTURE }} + distro: ${{ matrix.DISTRO }} githubToken: ${{ secrets.GITHUB_TOKEN }} dockerRunArgs: | --volume /var/run/docker.sock:/var/run/docker.sock @@ -57,7 +57,7 @@ jobs: TAG: ${{ env.TAG }} CONTAINER_NAME: ${{ env.CONTAINER_NAME }} install: | - case "${{ matrix.image.DISTRO }}" in + case "${{ matrix.DISTRO }}" in ubuntu*) apt-get update apt-get install -y -q ca-certificates curl gnupg lsb-release apt-utils @@ -75,10 +75,10 @@ jobs: esac run: | bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{ env.CONTAINER_NAME }} 1626-fix-rhel9-derived-services - bash $GITHUB_WORKSPACE/rpms/generate_rpm_package.sh -b master -t ${{ matrix.type }} -a ${{ matrix.arch }} --dev --dont-build-docker - echo "PACKAGE_NAME_${{ matrix.arch }}_${{ matrix.type }}=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV + bash $GITHUB_WORKSPACE/rpms/generate_rpm_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev --dont-build-docker + echo "PACKAGE_NAME_${{ matrix.ARCHITECTURE }}_${{ matrix.TYPE }}=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV - - name: Upload Wazuh ${{ matrix.type }} ${{ matrix.arch }} package as artifact + - name: Upload Wazuh ${{ matrix.TYPE }} ${{ matrix.ARCHITECTURE }} package as artifact uses: actions/upload-artifact@v2 with: name: ${PACKAGE_NAME} diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index 4bba331d8e..90c329aa62 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -33,15 +33,15 @@ jobs: run: if [ ! -z ${{ github.head_ref }} ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(cat $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi - - name: Build and push image ${{ matrix.image.CONTAINER_NAME }}_${{github.ref_name}} to Github Container Registry + - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} to Github Container Registry if: ${{ ( matrix.image.ARCHITECTURE == 'x86_64') || ( matrix.image.ARCHITECTURE == 'i386' )}} run: bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} $TAG - - uses: uraimo/run-on-arch-action@v2.5.0 + - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} to Github Container Registry + uses: uraimo/run-on-arch-action@v2.5.0 if: ${{ ( matrix.image.ARCHITECTURE != 'x86_64') && ( matrix.image.ARCHITECTURE != 'i386' )}} - name: Build and push image ${{matrix.image.CONTAINER_NAME}} to Github Container Registry with: arch: ${{ matrix.image.ARCHITECTURE }} distro: ${{ matrix.image.DISTRO }} From 2463c24af6181c590ce3733682426c51d589bd2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 26 Jan 2023 18:56:15 +0100 Subject: [PATCH 073/328] Fix variable name for container name in x86_64 and i386 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/actions/common-tools/pull_image_from_ghcr.sh | 4 ---- .github/workflows/build-rpm-packages.yml | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/actions/common-tools/pull_image_from_ghcr.sh b/.github/actions/common-tools/pull_image_from_ghcr.sh index ee88a7199b..ab8cf315cb 100644 --- a/.github/actions/common-tools/pull_image_from_ghcr.sh +++ b/.github/actions/common-tools/pull_image_from_ghcr.sh @@ -21,7 +21,3 @@ IMAGE_ID=$(echo ${IMAGE_ID} | tr '[A-Z]' '[a-z]') echo "docker pull ${IMAGE_ID}" docker pull ${IMAGE_ID} - -docker rmi ghcr.io/wazuh/rpm_builder_x86_2053/merge:latest -docker rmi ghcr.io/wazuh/rpm_builder_i386_2053/merge:latest -docker rmi ghcr.io/wazuh/rpm_builder_aarch64_2053/merge:latest diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index ba56ce1c01..812cec396c 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -27,15 +27,15 @@ jobs: echo "::set-output name=all::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | xargs)" echo "::set-output name=ts::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep .ts$ | xargs)" - - name: Set tag as version + - name: Set tag and container name run: | if [ ! -z ${{ github.head_ref }} ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(cat $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi - if [ ${{ matrix.ARCHITECTURE }} == "x86_64" ]; then echo "CONTAINER_NAME=rpm_builder_x86" >> $GITHUB_ENV ; else echo "CONTAINER_NAME=rpm_builder_${{ matrix.ARCHITECTURE }}" >> $GITHUB_ENV ; fi + if [ "${{ matrix.ARCHITECTURE }}" == "x86_64" ]; then echo "CONTAINER_NAME=rpm_builder_x86" >> $GITHUB_ENV ; else echo "CONTAINER_NAME=rpm_builder_${{ matrix.ARCHITECTURE }}" >> $GITHUB_ENV ; fi - name: Download docker image for package building if: ${{ ( matrix.ARCHITECTURE == 'x86_64') || ( matrix.ARCHITECTURE == 'i386' ) }} run: - bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} $TAG + bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ matrix.image.DOCKERFILE_PATH }} $TAG - name: Build the ${{ matrix.ARCHITECTURE }} rpm Wazuh ${{ matrix.TYPE }} package if: ${{ ( matrix.ARCHITECTURE == 'x86_64') || ( matrix.ARCHITECTURE == 'i386' ) }} From 5b1fbee4d85eaa1665d192278153e77a69914801 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 27 Jan 2023 11:38:59 +0100 Subject: [PATCH 074/328] Remove support for ppc64 aarch64 and armv7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../common-tools/pull_image_from_ghcr.sh | 2 +- .github/workflows/build-rpm-packages.yml | 61 ++++--------------- .../upload-package-creation-images.yml | 40 +----------- 3 files changed, 16 insertions(+), 87 deletions(-) diff --git a/.github/actions/common-tools/pull_image_from_ghcr.sh b/.github/actions/common-tools/pull_image_from_ghcr.sh index ab8cf315cb..474279c754 100644 --- a/.github/actions/common-tools/pull_image_from_ghcr.sh +++ b/.github/actions/common-tools/pull_image_from_ghcr.sh @@ -3,7 +3,7 @@ GITHUB_USER=$2 DOCKER_IMAGE_NAME=$3 if [ -n "$4" ]; then DOCKER_IMAGE_TAG="$4" -else +else DOCKER_IMAGE_TAG="latest" fi diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 812cec396c..47bc5442f1 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -5,6 +5,8 @@ on: - 'rpms/SPECS/*' - 'rpms/generate_rpm_package.sh' - 'rpms/build.sh' + - 'rpms/CentOS/*' + - 'rpms/build.sh' workflow_dispatch: jobs: @@ -13,23 +15,24 @@ jobs: strategy: matrix: TYPE: [agent, manager] - ARCHITECTURE : [x86_64, i386, aarch64, armv7, ppc64le] - DISTRO: [ubuntu_latest] + ARCHITECTURE : [x86_64, i386] fail-fast: false steps: - uses: actions/checkout@v3 - name: Get changed files - id: changes - # Set outputs using the command. - run: | - echo "::set-output name=all::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | xargs)" - echo "::set-output name=ts::$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep .ts$ | xargs)" + uses: dorny/paths-filter@v2 + id: changes + with: + filters: | + rpm_images: + - 'rpms/CentOS/**' + - 'rpms/build.sh' - name: Set tag and container name run: | - if [ ! -z ${{ github.head_ref }} ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(cat $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi + if [ "${{ steps.changes.outputs.src }}" == "true" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(cat $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi if [ "${{ matrix.ARCHITECTURE }}" == "x86_64" ]; then echo "CONTAINER_NAME=rpm_builder_x86" >> $GITHUB_ENV ; else echo "CONTAINER_NAME=rpm_builder_${{ matrix.ARCHITECTURE }}" >> $GITHUB_ENV ; fi - name: Download docker image for package building @@ -42,44 +45,4 @@ jobs: working-directory: ./rpms run: | bash generate_rpm_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev - echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV - - - name: Build the ${{ matrix.ARCHITECTURE }} rpm Wazuh ${{ matrix.TYPE }} package - if: ${{ ( matrix.ARCHITECTURE != 'x86_64') && ( matrix.ARCHITECTURE != 'i386' )}} - uses: uraimo/run-on-arch-action@v2.5.0 - with: - arch: ${{ matrix.ARCHITECTURE }} - distro: ${{ matrix.DISTRO }} - githubToken: ${{ secrets.GITHUB_TOKEN }} - dockerRunArgs: | - --volume /var/run/docker.sock:/var/run/docker.sock - env: | - TAG: ${{ env.TAG }} - CONTAINER_NAME: ${{ env.CONTAINER_NAME }} - install: | - case "${{ matrix.DISTRO }}" in - ubuntu*) - apt-get update - apt-get install -y -q ca-certificates curl gnupg lsb-release apt-utils - mkdir -p /etc/apt/keyrings - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg - echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null - apt-get update - apt-get install -y -q docker-ce docker-ce-cli containerd.io - ;; - alpine*) - apk -q update - apk -q add bash - apk -q add docker docker-compose - ;; - esac - run: | - bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{ env.CONTAINER_NAME }} 1626-fix-rhel9-derived-services - bash $GITHUB_WORKSPACE/rpms/generate_rpm_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev --dont-build-docker - echo "PACKAGE_NAME_${{ matrix.ARCHITECTURE }}_${{ matrix.TYPE }}=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV - - - name: Upload Wazuh ${{ matrix.TYPE }} ${{ matrix.ARCHITECTURE }} package as artifact - uses: actions/upload-artifact@v2 - with: - name: ${PACKAGE_NAME} - path: ${{github.workspace}}/rpms/output/${PACKAGE_NAME} \ No newline at end of file + echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV \ No newline at end of file diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-package-creation-images.yml index 90c329aa62..753a606a84 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-package-creation-images.yml @@ -15,11 +15,11 @@ on: workflow_dispatch: jobs: - Upload-RPM-x86_64-i386-images: + Upload-rpm-package-building-images: runs-on: ubuntu-latest strategy: matrix: - image: [ {CONTAINER_NAME: rpm_builder_x86, DOCKERFILE_PATH: rpms/CentOS/6/x86_64, ARCHITECTURE: x86_64}, {CONTAINER_NAME: rpm_builder_i386, DOCKERFILE_PATH: rpms/CentOS/6/i386, ARCHITECTURE: i386}, {CONTAINER_NAME: rpm_builder_aarch64, DOCKERFILE_PATH: rpms/CentOS/7/aarch64, ARCHITECTURE: aarch64, DISTRO: ubuntu_latest}, {CONTAINER_NAME: rpm_builder_ppc64le, DOCKERFILE_PATH: rpms/CentOS/7/ppc64le, ARCHITECTURE: ppc64le, DISTRO: ubuntu_latest}, {CONTAINER_NAME: rpm_builder_armv7, DOCKERFILE_PATH: rpms/CentOS/7/armv7hl, ARCHITECTURE: armv7 , DISTRO: ubuntu_latest}] + image: [ {CONTAINER_NAME: rpm_builder_x86, DOCKERFILE_PATH: rpms/CentOS/6/x86_64, ARCHITECTURE: x86_64}, {CONTAINER_NAME: rpm_builder_i386, DOCKERFILE_PATH: rpms/CentOS/6/i386, ARCHITECTURE: i386}] fail-fast: false steps: - uses: actions/checkout@v3 @@ -31,43 +31,9 @@ jobs: - name: Set tag as version run: - if [ ! -z ${{ github.head_ref }} ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(cat $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi + if [ "${{ github.event_name }}" == "pull_request" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(cat $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} to Github Container Registry if: ${{ ( matrix.image.ARCHITECTURE == 'x86_64') || ( matrix.image.ARCHITECTURE == 'i386' )}} run: bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} $TAG - - - - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} to Github Container Registry - uses: uraimo/run-on-arch-action@v2.5.0 - if: ${{ ( matrix.image.ARCHITECTURE != 'x86_64') && ( matrix.image.ARCHITECTURE != 'i386' )}} - with: - arch: ${{ matrix.image.ARCHITECTURE }} - distro: ${{ matrix.image.DISTRO }} - githubToken: ${{ secrets.GITHUB_TOKEN }} - dockerRunArgs: | - --volume /var/run/docker.sock:/var/run/docker.sock - env: | - TAG: ${{ env.TAG }} - install: | - case "${{ matrix.image.DISTRO }}" in - ubuntu*) - apt-get update - apt-get install -y -q ca-certificates curl gnupg lsb-release apt-utils - mkdir -p /etc/apt/keyrings - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg - echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null - apt-get update - apt-get install -y -q docker-ce docker-ce-cli containerd.io - ;; - alpine*) - apk -q update - apk -q add bash - apk -q add docker docker-compose - ;; - esac - run: | - cp $GITHUB_WORKSPACE/rpms/build.sh $GITHUB_WORKSPACE/${{ matrix.image.DOCKERFILE_PATH }} - echo "TAG=$TAG" - bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} ${TAG} From 23a9b811c38d2173f70a9e57dd5328413f199ab2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 27 Jan 2023 11:40:19 +0100 Subject: [PATCH 075/328] Fix syntax error in buil_rpm_packages.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-rpm-packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 47bc5442f1..87f73c1e16 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -23,7 +23,7 @@ jobs: - name: Get changed files uses: dorny/paths-filter@v2 - id: changes + id: changes with: filters: | rpm_images: From 286d874b79f585a6bb3d87003665087a134f5104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 27 Jan 2023 12:16:40 +0100 Subject: [PATCH 076/328] Remove unnecessary code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-rpm-packages.yml | 18 ++++++++++-------- ...eation-images.yml => upload-rpm-images.yml} | 12 +++++------- 2 files changed, 15 insertions(+), 15 deletions(-) rename .github/workflows/{upload-package-creation-images.yml => upload-rpm-images.yml} (68%) diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 87f73c1e16..67cb2be5e1 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -4,9 +4,9 @@ on: paths: - 'rpms/SPECS/*' - 'rpms/generate_rpm_package.sh' - - 'rpms/build.sh' - 'rpms/CentOS/*' - 'rpms/build.sh' + - '.github/workflows/upload-rpm-images.yml' workflow_dispatch: jobs: @@ -24,11 +24,15 @@ jobs: - name: Get changed files uses: dorny/paths-filter@v2 id: changes - with: - filters: | - rpm_images: - - 'rpms/CentOS/**' - - 'rpms/build.sh' + with: + filters: | + rpm_images: + - 'rpms/CentOS/**' + - 'rpms/build.sh' + - '.github/workflows/upload-rpm-images.yml' + rpm_packages: + - 'rpms/SPECS/**' + - 'rpms/generate_rpm_package.sh' - name: Set tag and container name run: | @@ -36,12 +40,10 @@ jobs: if [ "${{ matrix.ARCHITECTURE }}" == "x86_64" ]; then echo "CONTAINER_NAME=rpm_builder_x86" >> $GITHUB_ENV ; else echo "CONTAINER_NAME=rpm_builder_${{ matrix.ARCHITECTURE }}" >> $GITHUB_ENV ; fi - name: Download docker image for package building - if: ${{ ( matrix.ARCHITECTURE == 'x86_64') || ( matrix.ARCHITECTURE == 'i386' ) }} run: bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ matrix.image.DOCKERFILE_PATH }} $TAG - name: Build the ${{ matrix.ARCHITECTURE }} rpm Wazuh ${{ matrix.TYPE }} package - if: ${{ ( matrix.ARCHITECTURE == 'x86_64') || ( matrix.ARCHITECTURE == 'i386' ) }} working-directory: ./rpms run: | bash generate_rpm_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev diff --git a/.github/workflows/upload-package-creation-images.yml b/.github/workflows/upload-rpm-images.yml similarity index 68% rename from .github/workflows/upload-package-creation-images.yml rename to .github/workflows/upload-rpm-images.yml index 753a606a84..fc42fa2fb3 100644 --- a/.github/workflows/upload-package-creation-images.yml +++ b/.github/workflows/upload-rpm-images.yml @@ -2,7 +2,7 @@ name: Upload package creation Docker images on: pull_request: paths: - - '.github/workflows/upload-package-creation-images.yml' + - '.github/workflows/upload-rpm-images.yml' - 'rpms/CentOS/*' - 'rpms/build.sh' push: @@ -19,21 +19,19 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - image: [ {CONTAINER_NAME: rpm_builder_x86, DOCKERFILE_PATH: rpms/CentOS/6/x86_64, ARCHITECTURE: x86_64}, {CONTAINER_NAME: rpm_builder_i386, DOCKERFILE_PATH: rpms/CentOS/6/i386, ARCHITECTURE: i386}] + image: [ {CONTAINER_NAME: rpm_builder_x86, DOCKERFILE_PATH: rpms/CentOS/6/x86_64}, {CONTAINER_NAME: rpm_builder_i386, DOCKERFILE_PATH: rpms/CentOS/6/i386}] fail-fast: false steps: - uses: actions/checkout@v3 - name: Copy build.sh to Dockerfile path - if: ${{ ( matrix.image.ARCHITECTURE == 'x86_64') || ( matrix.image.ARCHITECTURE == 'i386' )}} run: cp $GITHUB_WORKSPACE/rpms/build.sh $GITHUB_WORKSPACE/${{ matrix.image.DOCKERFILE_PATH }} - name: Set tag as version - run: - if [ "${{ github.event_name }}" == "pull_request" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(cat $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi + run: + if [ "${{ github.event_name }}" == "pull_request" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV; fi - - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} to Github Container Registry - if: ${{ ( matrix.image.ARCHITECTURE == 'x86_64') || ( matrix.image.ARCHITECTURE == 'i386' )}} + - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} with tag $TAG to Github Container Registry run: bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} $TAG From 040cb16b84409d7dc4857ffad5bf4b447fa2abe0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 27 Jan 2023 12:19:28 +0100 Subject: [PATCH 077/328] Force a run of the image upload workflow to create 4.5 images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-rpm-images.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/upload-rpm-images.yml b/.github/workflows/upload-rpm-images.yml index fc42fa2fb3..007a98f1b9 100644 --- a/.github/workflows/upload-rpm-images.yml +++ b/.github/workflows/upload-rpm-images.yml @@ -34,4 +34,4 @@ jobs: - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} with tag $TAG to Github Container Registry run: - bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} $TAG + bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} 4.5 From 9f2ae9cbdfcb83a7a7c2f35576a733b569fbc099 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 27 Jan 2023 12:21:00 +0100 Subject: [PATCH 078/328] Fix tags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-rpm-packages.yml | 2 +- .github/workflows/upload-rpm-images.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 67cb2be5e1..b858ca145b 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -36,7 +36,7 @@ jobs: - name: Set tag and container name run: | - if [ "${{ steps.changes.outputs.src }}" == "true" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(cat $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi + if [ "${{ steps.changes.outputs.src }}" == "true" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi if [ "${{ matrix.ARCHITECTURE }}" == "x86_64" ]; then echo "CONTAINER_NAME=rpm_builder_x86" >> $GITHUB_ENV ; else echo "CONTAINER_NAME=rpm_builder_${{ matrix.ARCHITECTURE }}" >> $GITHUB_ENV ; fi - name: Download docker image for package building diff --git a/.github/workflows/upload-rpm-images.yml b/.github/workflows/upload-rpm-images.yml index 007a98f1b9..fc42fa2fb3 100644 --- a/.github/workflows/upload-rpm-images.yml +++ b/.github/workflows/upload-rpm-images.yml @@ -34,4 +34,4 @@ jobs: - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} with tag $TAG to Github Container Registry run: - bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} 4.5 + bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} $TAG From 018d1fcea5371fd22d451e3c91bcec0599365c09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 27 Jan 2023 12:47:37 +0100 Subject: [PATCH 079/328] Add deb GitHub Actions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 50 ++++++++++++++++++++++++ .github/workflows/build-rpm-packages.yml | 2 +- .github/workflows/upload-deb-images.yml | 37 ++++++++++++++++++ .github/workflows/upload-rpm-images.yml | 4 +- 4 files changed, 90 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/build-deb-packages.yml create mode 100644 .github/workflows/upload-deb-images.yml diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml new file mode 100644 index 0000000000..64e6ccf976 --- /dev/null +++ b/.github/workflows/build-deb-packages.yml @@ -0,0 +1,50 @@ +name: Build Wazuh Packages - DEB - All architectures +on: + pull_request: + paths: + - 'debs/SPECS/*' + - 'debs/generate_debian_package.sh' + - 'debs/Debian/*' + - 'debs/build.sh' + - '.github/workflows/upload-deb-images.yml' + workflow_dispatch: + +jobs: + Wazuh-agent-deb-package-builds: + runs-on: ubuntu-latest + strategy: + matrix: + TYPE: [agent, manager] + ARCHITECTURE : [amd64, i386] + fail-fast: false + + steps: + - uses: actions/checkout@v3 + + - name: Get changed files + uses: dorny/paths-filter@v2 + id: changes + with: + filters: | + deb_images: + - 'debs/Debian/**' + - 'debs/build.sh' + - '.github/workflows/upload-deb-images.yml' + deb_packages: + - 'debs/SPECS/**' + - 'debs/generate_debian_package.sh' + + - name: Set tag and container name + run: | + if [ "${{ steps.changes.outputs.src }}" == "true" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi + echo "CONTAINER_NAME=deb_builder_${{ matrix.ARCHITECTURE }}" >> $GITHUB_ENV + + - name: Download docker image for package building + run: + bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ matrix.image.DOCKERFILE_PATH }} $TAG + + - name: Build the ${{ matrix.ARCHITECTURE }} deb Wazuh ${{ matrix.TYPE }} package + working-directory: ./debs + run: | + bash generate_debian_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 + echo "PACKAGE_NAME=$(ls ./output | grep .deb | head -n 1)" >> $GITHUB_ENV \ No newline at end of file diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index b858ca145b..52b8f8aef5 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -46,5 +46,5 @@ jobs: - name: Build the ${{ matrix.ARCHITECTURE }} rpm Wazuh ${{ matrix.TYPE }} package working-directory: ./rpms run: | - bash generate_rpm_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev + bash generate_rpm_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV \ No newline at end of file diff --git a/.github/workflows/upload-deb-images.yml b/.github/workflows/upload-deb-images.yml new file mode 100644 index 0000000000..854a79a48f --- /dev/null +++ b/.github/workflows/upload-deb-images.yml @@ -0,0 +1,37 @@ +name: Upload DEB package creation Docker images +on: + pull_request: + paths: + - '.github/workflows/upload-deb-images.yml' + - 'debs/Debian/*' + - 'debs/build.sh' + push: + branches: + - master + - 4.4 + paths: + - 'debs/Debian/*' + - 'debs/build.sh' + workflow_dispatch: + +jobs: + Upload-rpm-package-building-images: + runs-on: ubuntu-latest + strategy: + matrix: + image: [ {CONTAINER_NAME: deb_builder_amd64, DOCKERFILE_PATH: debs/Debian/amd64}, {CONTAINER_NAME: deb_builder_i386, DOCKERFILE_PATH: debs/Debian/i386}] + fail-fast: false + steps: + - uses: actions/checkout@v3 + + - name: Copy build.sh to Dockerfile path + run: + cp $GITHUB_WORKSPACE/debs/build.sh $GITHUB_WORKSPACE/${{ matrix.image.DOCKERFILE_PATH }} + + - name: Set tag as version + run: + if [ "${{ github.event_name }}" == "pull_request" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV; fi + + - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} with tag ${{ env.TAG }} to Github Container Registry + run: + bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} $TAG diff --git a/.github/workflows/upload-rpm-images.yml b/.github/workflows/upload-rpm-images.yml index fc42fa2fb3..de28bc14cc 100644 --- a/.github/workflows/upload-rpm-images.yml +++ b/.github/workflows/upload-rpm-images.yml @@ -1,4 +1,4 @@ -name: Upload package creation Docker images +name: Upload RPM package creation Docker images on: pull_request: paths: @@ -32,6 +32,6 @@ jobs: run: if [ "${{ github.event_name }}" == "pull_request" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV; fi - - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} with tag $TAG to Github Container Registry + - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} with tag ${{ env.TAG }} to Github Container Registry run: bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} $TAG From fbffbd28e1d907faa2ae21da03f3994ee0c661ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 27 Jan 2023 13:12:24 +0100 Subject: [PATCH 080/328] Add `--force-yes` to apt-utils install in deb image build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- debs/Debian/amd64/Dockerfile | 2 +- debs/Debian/i386/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debs/Debian/amd64/Dockerfile b/debs/Debian/amd64/Dockerfile index c3734b3576..76198ac058 100644 --- a/debs/Debian/amd64/Dockerfile +++ b/debs/Debian/amd64/Dockerfile @@ -5,7 +5,7 @@ ENV DEBIAN_FRONTEND noninteractive # Installing necessary packages RUN echo "deb http://archive.debian.org/debian/ wheezy contrib main non-free" > /etc/apt/sources.list && \ echo "deb-src http://archive.debian.org/debian/ wheezy contrib main non-free" >> /etc/apt/sources.list && \ - apt-get update && apt-get install -y apt-utils && \ + apt-get update && apt-get install -y --force-yes apt-utils && \ apt-get install -y --force-yes \ curl gcc make sudo wget expect gnupg perl-base=5.14.2-21+deb7u3 perl \ libc-bin=2.13-38+deb7u10 libc6=2.13-38+deb7u10 libc6-dev build-essential \ diff --git a/debs/Debian/i386/Dockerfile b/debs/Debian/i386/Dockerfile index 99eef6c673..b2c9234fa2 100644 --- a/debs/Debian/i386/Dockerfile +++ b/debs/Debian/i386/Dockerfile @@ -5,7 +5,7 @@ ENV DEBIAN_FRONTEND noninteractive # Installing necessary packages RUN echo "deb http://archive.debian.org/debian/ wheezy contrib main non-free" > /etc/apt/sources.list && \ echo "deb-src http://archive.debian.org/debian/ wheezy contrib main non-free" >> /etc/apt/sources.list && \ - apt-get update && apt-get install -y apt-utils && \ + apt-get update && apt-get install -y --force-yes apt-utils && \ apt-get install -y --force-yes \ curl gcc-multilib make wget sudo expect gnupg perl-base=5.14.2-21+deb7u3 \ perl libc-bin=2.13-38+deb7u10 libc6=2.13-38+deb7u10 libc6-dev \ From b68b669c74c70023e8f39bcc999731f0080bf34f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 27 Jan 2023 13:24:25 +0100 Subject: [PATCH 081/328] Add `--force-yes` to the Dockerfile for deb package creation to be able to test it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 2 +- .github/workflows/build-rpm-packages.yml | 2 +- .github/workflows/upload-deb-images.yml | 2 +- debs/Debian/amd64/Dockerfile | 2 +- debs/Debian/i386/Dockerfile | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index 64e6ccf976..5420efd803 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -36,7 +36,7 @@ jobs: - name: Set tag and container name run: | - if [ "${{ steps.changes.outputs.src }}" == "true" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi + if [ "${{ steps.changes.outputs.deb_images }}" == "true" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi echo "CONTAINER_NAME=deb_builder_${{ matrix.ARCHITECTURE }}" >> $GITHUB_ENV - name: Download docker image for package building diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 52b8f8aef5..78d932ab7c 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -36,7 +36,7 @@ jobs: - name: Set tag and container name run: | - if [ "${{ steps.changes.outputs.src }}" == "true" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi + if [ "${{ steps.changes.outputs.rpm_images }}" == "true" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi if [ "${{ matrix.ARCHITECTURE }}" == "x86_64" ]; then echo "CONTAINER_NAME=rpm_builder_x86" >> $GITHUB_ENV ; else echo "CONTAINER_NAME=rpm_builder_${{ matrix.ARCHITECTURE }}" >> $GITHUB_ENV ; fi - name: Download docker image for package building diff --git a/.github/workflows/upload-deb-images.yml b/.github/workflows/upload-deb-images.yml index 854a79a48f..06dc25e6b5 100644 --- a/.github/workflows/upload-deb-images.yml +++ b/.github/workflows/upload-deb-images.yml @@ -15,7 +15,7 @@ on: workflow_dispatch: jobs: - Upload-rpm-package-building-images: + Upload-deb-package-building-images: runs-on: ubuntu-latest strategy: matrix: diff --git a/debs/Debian/amd64/Dockerfile b/debs/Debian/amd64/Dockerfile index 76198ac058..cab85b23cd 100644 --- a/debs/Debian/amd64/Dockerfile +++ b/debs/Debian/amd64/Dockerfile @@ -12,7 +12,7 @@ RUN echo "deb http://archive.debian.org/debian/ wheezy contrib main non-free" > cdbs devscripts equivs automake autoconf libtool libaudit-dev selinux-basics \ libdb5.1=5.1.29-5 libdb5.1-dev libssl1.0.0=1.0.1e-2+deb7u20 procps gawk libsigsegv2 -RUN apt-get update && apt-get build-dep python3.2 -y +RUN apt-get update && apt-get build-dep python3.2 -y --force-yes RUN curl -OL http://packages.wazuh.com/utils/gcc/gcc-9.4.0.tar.gz && \ tar xzf gcc-9.4.0.tar.gz && cd gcc-9.4.0/ && \ diff --git a/debs/Debian/i386/Dockerfile b/debs/Debian/i386/Dockerfile index b2c9234fa2..c43803f4bf 100644 --- a/debs/Debian/i386/Dockerfile +++ b/debs/Debian/i386/Dockerfile @@ -14,7 +14,7 @@ RUN echo "deb http://archive.debian.org/debian/ wheezy contrib main non-free" > libssl1.0.0=1.0.1e-2+deb7u20 gawk libsigsegv2 procps # Add Debian's source repository -RUN apt-get update && apt-get build-dep python3.2 -y +RUN apt-get update && apt-get build-dep python3.2 -y --force-yes RUN sed -i "s;/\* To add :#define SO_REUSEPORT 15 \*/;#define SO_REUSEPORT 15;g" /usr/include/asm-generic/socket.h RUN curl -OL http://packages.wazuh.com/utils/gcc/gcc-9.4.0.tar.gz && \ From a833e1fb114260b742076de3365517f8fa05a687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 27 Jan 2023 13:50:16 +0100 Subject: [PATCH 082/328] Call package builder from image uploader if run from a pr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 4 +--- .github/workflows/build-rpm-packages.yml | 4 +--- .github/workflows/upload-deb-images.yml | 5 +++++ .github/workflows/upload-rpm-images.yml | 5 +++++ 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index 5420efd803..31eb5ff57c 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -4,10 +4,8 @@ on: paths: - 'debs/SPECS/*' - 'debs/generate_debian_package.sh' - - 'debs/Debian/*' - - 'debs/build.sh' - - '.github/workflows/upload-deb-images.yml' workflow_dispatch: + workflow_call: jobs: Wazuh-agent-deb-package-builds: diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 78d932ab7c..7663b617bb 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -4,10 +4,8 @@ on: paths: - 'rpms/SPECS/*' - 'rpms/generate_rpm_package.sh' - - 'rpms/CentOS/*' - - 'rpms/build.sh' - - '.github/workflows/upload-rpm-images.yml' workflow_dispatch: + workflow_call: jobs: Wazuh-agent-rpm-package-builds: diff --git a/.github/workflows/upload-deb-images.yml b/.github/workflows/upload-deb-images.yml index 06dc25e6b5..1ade025193 100644 --- a/.github/workflows/upload-deb-images.yml +++ b/.github/workflows/upload-deb-images.yml @@ -35,3 +35,8 @@ jobs: - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} with tag ${{ env.TAG }} to Github Container Registry run: bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} $TAG + + - name: Call create packages workflow + if: github.event_name == 'pull_request' + uses: ./.github/workflows/build-deb-packages.yml + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/upload-rpm-images.yml b/.github/workflows/upload-rpm-images.yml index de28bc14cc..5e9d8b2c19 100644 --- a/.github/workflows/upload-rpm-images.yml +++ b/.github/workflows/upload-rpm-images.yml @@ -35,3 +35,8 @@ jobs: - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} with tag ${{ env.TAG }} to Github Container Registry run: bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} $TAG + + - name: Call create packages workflow + if: github.event_name == 'pull_request' + uses: ./.github/workflows/build-rpm-packages.yml + secrets: inherit \ No newline at end of file From 5e5ed8f565620aaa98fcea2cb5c6c9b44a4e3138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 27 Jan 2023 13:56:16 +0100 Subject: [PATCH 083/328] Change call to package creations from step to job MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 1 - .github/workflows/build-rpm-packages.yml | 1 - .github/workflows/upload-deb-images.yml | 9 ++++----- .github/workflows/upload-rpm-images.yml | 9 ++++----- 4 files changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index 31eb5ff57c..37eef805d2 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -27,7 +27,6 @@ jobs: deb_images: - 'debs/Debian/**' - 'debs/build.sh' - - '.github/workflows/upload-deb-images.yml' deb_packages: - 'debs/SPECS/**' - 'debs/generate_debian_package.sh' diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 7663b617bb..19ef223423 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -27,7 +27,6 @@ jobs: rpm_images: - 'rpms/CentOS/**' - 'rpms/build.sh' - - '.github/workflows/upload-rpm-images.yml' rpm_packages: - 'rpms/SPECS/**' - 'rpms/generate_rpm_package.sh' diff --git a/.github/workflows/upload-deb-images.yml b/.github/workflows/upload-deb-images.yml index 1ade025193..5475121e53 100644 --- a/.github/workflows/upload-deb-images.yml +++ b/.github/workflows/upload-deb-images.yml @@ -2,7 +2,6 @@ name: Upload DEB package creation Docker images on: pull_request: paths: - - '.github/workflows/upload-deb-images.yml' - 'debs/Debian/*' - 'debs/build.sh' push: @@ -36,7 +35,7 @@ jobs: run: bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} $TAG - - name: Call create packages workflow - if: github.event_name == 'pull_request' - uses: ./.github/workflows/build-deb-packages.yml - secrets: inherit \ No newline at end of file + Call create packages workflow: + if: github.event_name == 'pull_request' + uses: ./.github/workflows/build-deb-packages.yml + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/upload-rpm-images.yml b/.github/workflows/upload-rpm-images.yml index 5e9d8b2c19..f3f3983b49 100644 --- a/.github/workflows/upload-rpm-images.yml +++ b/.github/workflows/upload-rpm-images.yml @@ -2,7 +2,6 @@ name: Upload RPM package creation Docker images on: pull_request: paths: - - '.github/workflows/upload-rpm-images.yml' - 'rpms/CentOS/*' - 'rpms/build.sh' push: @@ -36,7 +35,7 @@ jobs: run: bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} $TAG - - name: Call create packages workflow - if: github.event_name == 'pull_request' - uses: ./.github/workflows/build-rpm-packages.yml - secrets: inherit \ No newline at end of file + Call create packages workflow: + if: github.event_name == 'pull_request' + uses: ./.github/workflows/build-rpm-packages.yml + secrets: inherit \ No newline at end of file From 8b645f24d1e26ad06dbe32089afa04de78a47f4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 27 Jan 2023 14:20:36 +0100 Subject: [PATCH 084/328] Dont build docker image when creating packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 2 +- .github/workflows/build-rpm-packages.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index 37eef805d2..76cc2edf00 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -43,5 +43,5 @@ jobs: - name: Build the ${{ matrix.ARCHITECTURE }} deb Wazuh ${{ matrix.TYPE }} package working-directory: ./debs run: | - bash generate_debian_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 + bash generate_debian_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker echo "PACKAGE_NAME=$(ls ./output | grep .deb | head -n 1)" >> $GITHUB_ENV \ No newline at end of file diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 19ef223423..d04bc63ae5 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -43,5 +43,5 @@ jobs: - name: Build the ${{ matrix.ARCHITECTURE }} rpm Wazuh ${{ matrix.TYPE }} package working-directory: ./rpms run: | - bash generate_rpm_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 + bash generate_rpm_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV \ No newline at end of file From 724c70ea8572b8b54d405e4642c865571ca6e53c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 27 Jan 2023 14:24:52 +0100 Subject: [PATCH 085/328] Fix paths in trigger of worflows and call to TAG MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 2 +- .github/workflows/build-rpm-packages.yml | 2 +- .github/workflows/upload-deb-images.yml | 4 ++-- .github/workflows/upload-rpm-images.yml | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index 76cc2edf00..d9aa854a05 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -38,7 +38,7 @@ jobs: - name: Download docker image for package building run: - bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ matrix.image.DOCKERFILE_PATH }} $TAG + bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }} - name: Build the ${{ matrix.ARCHITECTURE }} deb Wazuh ${{ matrix.TYPE }} package working-directory: ./debs diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index d04bc63ae5..0338d3c727 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -38,7 +38,7 @@ jobs: - name: Download docker image for package building run: - bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ matrix.image.DOCKERFILE_PATH }} $TAG + bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }} - name: Build the ${{ matrix.ARCHITECTURE }} rpm Wazuh ${{ matrix.TYPE }} package working-directory: ./rpms diff --git a/.github/workflows/upload-deb-images.yml b/.github/workflows/upload-deb-images.yml index 5475121e53..6b312b9da4 100644 --- a/.github/workflows/upload-deb-images.yml +++ b/.github/workflows/upload-deb-images.yml @@ -2,7 +2,7 @@ name: Upload DEB package creation Docker images on: pull_request: paths: - - 'debs/Debian/*' + - 'debs/Debian/**' - 'debs/build.sh' push: branches: @@ -33,7 +33,7 @@ jobs: - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} with tag ${{ env.TAG }} to Github Container Registry run: - bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} $TAG + bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }} Call create packages workflow: if: github.event_name == 'pull_request' diff --git a/.github/workflows/upload-rpm-images.yml b/.github/workflows/upload-rpm-images.yml index f3f3983b49..db3208ffce 100644 --- a/.github/workflows/upload-rpm-images.yml +++ b/.github/workflows/upload-rpm-images.yml @@ -2,7 +2,7 @@ name: Upload RPM package creation Docker images on: pull_request: paths: - - 'rpms/CentOS/*' + - 'rpms/CentOS/**' - 'rpms/build.sh' push: branches: @@ -33,7 +33,7 @@ jobs: - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} with tag ${{ env.TAG }} to Github Container Registry run: - bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} $TAG + bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }} Call create packages workflow: if: github.event_name == 'pull_request' From 1138bff4226f84d6d6d8629331521f1c738733b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 27 Jan 2023 14:33:36 +0100 Subject: [PATCH 086/328] Add clean workflow runs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/clean-worflow-runs.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/clean-worflow-runs.yml diff --git a/.github/workflows/clean-worflow-runs.yml b/.github/workflows/clean-worflow-runs.yml new file mode 100644 index 0000000000..9dd8b21405 --- /dev/null +++ b/.github/workflows/clean-worflow-runs.yml @@ -0,0 +1,15 @@ +name: Clean workflow runs +on: workflow-dispatch +jobs: + delete_runs: + runs-on: ubuntu-latest + steps: + - name: Delete workflow runs + uses: dmvict/clean-workflow-runs@v1.0.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + run_conclusions: | + cancelled + skipped + save_period: 10 + save_min_runs_number: 0 \ No newline at end of file From fbc3b190d73a9afe3bb24ead9794f51af917b231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 27 Jan 2023 14:33:45 +0100 Subject: [PATCH 087/328] Syntax errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-deb-images.yml | 2 +- .github/workflows/upload-rpm-images.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/upload-deb-images.yml b/.github/workflows/upload-deb-images.yml index 6b312b9da4..0e091dc482 100644 --- a/.github/workflows/upload-deb-images.yml +++ b/.github/workflows/upload-deb-images.yml @@ -35,7 +35,7 @@ jobs: run: bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }} - Call create packages workflow: + Call-build-packages-workflow: if: github.event_name == 'pull_request' uses: ./.github/workflows/build-deb-packages.yml secrets: inherit \ No newline at end of file diff --git a/.github/workflows/upload-rpm-images.yml b/.github/workflows/upload-rpm-images.yml index db3208ffce..4bd11917fd 100644 --- a/.github/workflows/upload-rpm-images.yml +++ b/.github/workflows/upload-rpm-images.yml @@ -35,7 +35,7 @@ jobs: run: bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }} - Call create packages workflow: + Call-build-packages-workflow: if: github.event_name == 'pull_request' uses: ./.github/workflows/build-rpm-packages.yml secrets: inherit \ No newline at end of file From a7b0e41314aea0f54e7bb7daf1e5d052460b1927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 27 Jan 2023 14:37:21 +0100 Subject: [PATCH 088/328] Add needs to sub-job in upload images and debug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 1 + .github/workflows/build-rpm-packages.yml | 1 + .github/workflows/upload-deb-images.yml | 1 + .github/workflows/upload-rpm-images.yml | 1 + 4 files changed, 4 insertions(+) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index d9aa854a05..ec552f91ee 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -38,6 +38,7 @@ jobs: - name: Download docker image for package building run: + echo "bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }}" bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }} - name: Build the ${{ matrix.ARCHITECTURE }} deb Wazuh ${{ matrix.TYPE }} package diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 0338d3c727..815617a973 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -38,6 +38,7 @@ jobs: - name: Download docker image for package building run: + echo "bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }}" bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }} - name: Build the ${{ matrix.ARCHITECTURE }} rpm Wazuh ${{ matrix.TYPE }} package diff --git a/.github/workflows/upload-deb-images.yml b/.github/workflows/upload-deb-images.yml index 0e091dc482..7a3318e279 100644 --- a/.github/workflows/upload-deb-images.yml +++ b/.github/workflows/upload-deb-images.yml @@ -36,6 +36,7 @@ jobs: bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }} Call-build-packages-workflow: + needs: Upload-deb-package-building-images if: github.event_name == 'pull_request' uses: ./.github/workflows/build-deb-packages.yml secrets: inherit \ No newline at end of file diff --git a/.github/workflows/upload-rpm-images.yml b/.github/workflows/upload-rpm-images.yml index 4bd11917fd..9a859391a9 100644 --- a/.github/workflows/upload-rpm-images.yml +++ b/.github/workflows/upload-rpm-images.yml @@ -36,6 +36,7 @@ jobs: bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }} Call-build-packages-workflow: + needs: Upload-rpm-package-building-images if: github.event_name == 'pull_request' uses: ./.github/workflows/build-rpm-packages.yml secrets: inherit \ No newline at end of file From 9c99ad5c08fc3e462209eb3701bacb6321dc882c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 27 Jan 2023 14:51:46 +0100 Subject: [PATCH 089/328] Add argument --tag to generate__packages and call it on the actions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 2 +- .github/workflows/build-rpm-packages.yml | 2 +- .github/workflows/clean-worflow-runs.yml | 3 ++- debs/generate_debian_package.sh | 14 ++++++++++++-- rpms/generate_rpm_package.sh | 14 ++++++++++++-- 5 files changed, 28 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index ec552f91ee..bfe7b30c28 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -44,5 +44,5 @@ jobs: - name: Build the ${{ matrix.ARCHITECTURE }} deb Wazuh ${{ matrix.TYPE }} package working-directory: ./debs run: | - bash generate_debian_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker + bash generate_debian_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} echo "PACKAGE_NAME=$(ls ./output | grep .deb | head -n 1)" >> $GITHUB_ENV \ No newline at end of file diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 815617a973..eb88f5f875 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -44,5 +44,5 @@ jobs: - name: Build the ${{ matrix.ARCHITECTURE }} rpm Wazuh ${{ matrix.TYPE }} package working-directory: ./rpms run: | - bash generate_rpm_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker + bash generate_rpm_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV \ No newline at end of file diff --git a/.github/workflows/clean-worflow-runs.yml b/.github/workflows/clean-worflow-runs.yml index 9dd8b21405..49ac19f2c7 100644 --- a/.github/workflows/clean-worflow-runs.yml +++ b/.github/workflows/clean-worflow-runs.yml @@ -1,5 +1,6 @@ name: Clean workflow runs -on: workflow-dispatch +on: + workflow-dispatch: jobs: delete_runs: runs-on: ubuntu-latest diff --git a/debs/generate_debian_package.sh b/debs/generate_debian_package.sh index 6195db8ebb..ca8c5f964b 100755 --- a/debs/generate_debian_package.sh +++ b/debs/generate_debian_package.sh @@ -16,6 +16,7 @@ TARGET="" JOBS="2" DEBUG="no" BUILD_DOCKER="yes" +DOCKER_TAG="latest" INSTALLATION_PATH="/var/ossec" DEB_AMD64_BUILDER="deb_builder_amd64" DEB_I386_BUILDER="deb_builder_i386" @@ -66,7 +67,7 @@ build_deb() { # Build the Docker image if [[ ${BUILD_DOCKER} == "yes" ]]; then - docker build -t ${CONTAINER_NAME} ${DOCKERFILE_PATH} || return 1 + docker build -t ${CONTAINER_NAME}:${DOCKER_TAG} ${DOCKERFILE_PATH} || return 1 fi # Build the Debian package with a Docker container @@ -74,7 +75,7 @@ build_deb() { -v ${CHECKSUMDIR}:/var/local/checksum:Z \ -v ${LOCAL_SPECS}:/specs:Z \ ${CUSTOM_CODE_VOL} \ - ${CONTAINER_NAME} ${TARGET} ${BRANCH} ${ARCHITECTURE} \ + ${CONTAINER_NAME}:${DOCKER_TAG} ${TARGET} ${BRANCH} ${ARCHITECTURE} \ ${REVISION} ${JOBS} ${INSTALLATION_PATH} ${DEBUG} \ ${CHECKSUM} ${PACKAGES_BRANCH} ${USE_LOCAL_SPECS} \ ${USE_LOCAL_SOURCE_CODE} ${FUTURE}|| return 1 @@ -152,6 +153,7 @@ help() { echo " -d, --debug [Optional] Build the binaries with debug symbols. By default: no." echo " -c, --checksum [Optional] Generate checksum on the desired path (by default, if no path is specified it will be generated on the same directory than the package)." echo " --dont-build-docker [Optional] Locally built docker image will be used instead of generating a new one." + echo " --tag [Optional] Tag to use with the docker image." echo " --sources [Optional] Absolute path containing wazuh source code. This option will use local source code instead of downloading it from GitHub." echo " --packages-branch [Optional] Select Git branch or tag from wazuh-packages repository. e.g master." echo " --dev [Optional] Use the SPECS files stored in the host instead of downloading them from GitHub." @@ -237,6 +239,14 @@ main() { BUILD_DOCKER="no" shift 1 ;; + "--tag") + if [ -n "$2" ]; then + TAG="$2" + shift 2 + else + help 1 + fi + ;; "-s"|"--store") if [ -n "$2" ]; then OUTDIR="$2" diff --git a/rpms/generate_rpm_package.sh b/rpms/generate_rpm_package.sh index 89d57977dd..530407ac53 100755 --- a/rpms/generate_rpm_package.sh +++ b/rpms/generate_rpm_package.sh @@ -19,6 +19,7 @@ TARGET="" JOBS="2" DEBUG="no" BUILD_DOCKER="yes" +DOCKER_TAG="latest" USER_PATH="no" SRC="no" RPM_AARCH64_BUILDER="rpm_builder_aarch64" @@ -86,7 +87,7 @@ build_rpm() { # Build the Docker image if [[ ${BUILD_DOCKER} == "yes" ]]; then - docker build -t ${CONTAINER_NAME} ${DOCKERFILE_PATH} || return 1 + docker build -t ${CONTAINER_NAME}:${DOCKER_TAG} ${DOCKERFILE_PATH} || return 1 fi # Build the RPM package with a Docker container @@ -94,7 +95,7 @@ build_rpm() { -v ${CHECKSUMDIR}:/var/local/checksum:Z \ -v ${LOCAL_SPECS}:/specs:Z \ ${CUSTOM_CODE_VOL} \ - ${CONTAINER_NAME} ${TARGET} ${BRANCH} ${ARCHITECTURE} \ + ${CONTAINER_NAME}:${DOCKER_TAG} ${TARGET} ${BRANCH} ${ARCHITECTURE} \ ${JOBS} ${REVISION} ${INSTALLATION_PATH} ${DEBUG} \ ${CHECKSUM} ${PACKAGES_BRANCH} ${USE_LOCAL_SPECS} ${SRC} \ ${LEGACY} ${USE_LOCAL_SOURCE_CODE} ${FUTURE}|| return 1 @@ -181,6 +182,7 @@ help() { echo " -d, --debug [Optional] Build the binaries with debug symbols and create debuginfo packages. By default: no." echo " -c, --checksum [Optional] Generate checksum on the desired path (by default, if no path is specified it will be generated on the same directory than the package)." echo " --dont-build-docker [Optional] Locally built docker image will be used instead of generating a new one." + echo " --tag [Optional] Tag to use with the docker image." echo " --sources [Optional] Absolute path containing wazuh source code. This option will use local source code instead of downloading it from GitHub." echo " --packages-branch [Optional] Select Git branch or tag from wazuh-packages repository. e.g ${PACKAGES_BRANCH}" echo " --dev [Optional] Use the SPECS files stored in the host instead of downloading them from GitHub." @@ -261,6 +263,14 @@ main() { BUILD_DOCKER="no" shift 1 ;; + "--tag") + if [ -n "$2" ]; then + TAG="$2" + shift 2 + else + help 1 + fi + ;; "-c"|"--checksum") if [ -n "$2" ]; then CHECKSUMDIR="$2" From 903bb9a30ed32ff7f2633cd4b5f59bec1c4fc196 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 27 Jan 2023 14:58:14 +0100 Subject: [PATCH 090/328] Fix syntax MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/clean-worflow-runs.yml | 3 +-- debs/generate_debian_package.sh | 2 +- rpms/generate_rpm_package.sh | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/clean-worflow-runs.yml b/.github/workflows/clean-worflow-runs.yml index 49ac19f2c7..66b38ff0fc 100644 --- a/.github/workflows/clean-worflow-runs.yml +++ b/.github/workflows/clean-worflow-runs.yml @@ -1,6 +1,5 @@ name: Clean workflow runs -on: - workflow-dispatch: +on: workflow_dispatch jobs: delete_runs: runs-on: ubuntu-latest diff --git a/debs/generate_debian_package.sh b/debs/generate_debian_package.sh index ca8c5f964b..e3ccf969dc 100755 --- a/debs/generate_debian_package.sh +++ b/debs/generate_debian_package.sh @@ -241,7 +241,7 @@ main() { ;; "--tag") if [ -n "$2" ]; then - TAG="$2" + DOCKER_TAG="$2" shift 2 else help 1 diff --git a/rpms/generate_rpm_package.sh b/rpms/generate_rpm_package.sh index 530407ac53..9371dec599 100755 --- a/rpms/generate_rpm_package.sh +++ b/rpms/generate_rpm_package.sh @@ -265,7 +265,7 @@ main() { ;; "--tag") if [ -n "$2" ]; then - TAG="$2" + DOCKER_TAG="$2" shift 2 else help 1 From c4008743d913a552d6d25417932b30a6de603550 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 27 Jan 2023 15:10:22 +0100 Subject: [PATCH 091/328] Change made to force the different runtype of the workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- rpms/CentOS/6/i386/CentOS-Base.repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpms/CentOS/6/i386/CentOS-Base.repo b/rpms/CentOS/6/i386/CentOS-Base.repo index 1f492ab2b8..aac76933ec 100644 --- a/rpms/CentOS/6/i386/CentOS-Base.repo +++ b/rpms/CentOS/6/i386/CentOS-Base.repo @@ -8,7 +8,7 @@ # If the mirrorlist= does not work for you, as a fall back you can try the # remarked out baseurl= line instead. # -# + [base] name=CentOS-$releasever - Base From 80451d0a269cebfe6a897c6a0cdcbd84391ad00e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 27 Jan 2023 15:22:16 +0100 Subject: [PATCH 092/328] Remove debug and fix call to pull image script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/actions/common-tools/pull_image_from_ghcr.sh | 1 - .github/workflows/build-deb-packages.yml | 3 +-- .github/workflows/build-rpm-packages.yml | 3 +-- .github/workflows/clean-worflow-runs.yml | 4 +++- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/actions/common-tools/pull_image_from_ghcr.sh b/.github/actions/common-tools/pull_image_from_ghcr.sh index 474279c754..98f668d89e 100644 --- a/.github/actions/common-tools/pull_image_from_ghcr.sh +++ b/.github/actions/common-tools/pull_image_from_ghcr.sh @@ -19,5 +19,4 @@ GITHUB_OWNER="wazuh" IMAGE_ID=ghcr.io/${GITHUB_OWNER}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG} IMAGE_ID=$(echo ${IMAGE_ID} | tr '[A-Z]' '[a-z]') -echo "docker pull ${IMAGE_ID}" docker pull ${IMAGE_ID} diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index bfe7b30c28..731ebcc786 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -38,8 +38,7 @@ jobs: - name: Download docker image for package building run: - echo "bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }}" - bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }} + bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ env.TAG }} - name: Build the ${{ matrix.ARCHITECTURE }} deb Wazuh ${{ matrix.TYPE }} package working-directory: ./debs diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index eb88f5f875..bd1a9fd862 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -38,8 +38,7 @@ jobs: - name: Download docker image for package building run: - echo "bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }}" - bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }} + bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ env.TAG }} - name: Build the ${{ matrix.ARCHITECTURE }} rpm Wazuh ${{ matrix.TYPE }} package working-directory: ./rpms diff --git a/.github/workflows/clean-worflow-runs.yml b/.github/workflows/clean-worflow-runs.yml index 66b38ff0fc..d61ffdae79 100644 --- a/.github/workflows/clean-worflow-runs.yml +++ b/.github/workflows/clean-worflow-runs.yml @@ -1,5 +1,7 @@ name: Clean workflow runs -on: workflow_dispatch +on: + workflow_dispatch: + jobs: delete_runs: runs-on: ubuntu-latest From e720ff75bf68e19ef3360bb140cbead42ce64046 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 27 Jan 2023 16:09:00 +0100 Subject: [PATCH 093/328] Add other ways of triggering the cleaning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/clean-worflow-runs.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/clean-worflow-runs.yml b/.github/workflows/clean-worflow-runs.yml index d61ffdae79..78a169eebb 100644 --- a/.github/workflows/clean-worflow-runs.yml +++ b/.github/workflows/clean-worflow-runs.yml @@ -1,9 +1,14 @@ name: Clean workflow runs -on: +on: workflow_dispatch: + schedule: + - cron: '0 0 * * 1' + pull_request: + paths: + - '.github/workflows/clean-workflow-runs.yml' jobs: - delete_runs: + Clean-runs: runs-on: ubuntu-latest steps: - name: Delete workflow runs @@ -13,5 +18,4 @@ jobs: run_conclusions: | cancelled skipped - save_period: 10 - save_min_runs_number: 0 \ No newline at end of file + save_period: 10 \ No newline at end of file From 26f4cb6671e7835a244bec8f9b1a2d1515254c2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 27 Jan 2023 16:16:43 +0100 Subject: [PATCH 094/328] Debug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 3 ++- .github/workflows/build-rpm-packages.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index 731ebcc786..be555ab665 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -37,8 +37,9 @@ jobs: echo "CONTAINER_NAME=deb_builder_${{ matrix.ARCHITECTURE }}" >> $GITHUB_ENV - name: Download docker image for package building - run: + run: | bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ env.TAG }} + echo $(docker images) - name: Build the ${{ matrix.ARCHITECTURE }} deb Wazuh ${{ matrix.TYPE }} package working-directory: ./debs diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index bd1a9fd862..b60c1c0ad0 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -37,8 +37,9 @@ jobs: if [ "${{ matrix.ARCHITECTURE }}" == "x86_64" ]; then echo "CONTAINER_NAME=rpm_builder_x86" >> $GITHUB_ENV ; else echo "CONTAINER_NAME=rpm_builder_${{ matrix.ARCHITECTURE }}" >> $GITHUB_ENV ; fi - name: Download docker image for package building - run: + run: | bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ env.TAG }} + echo $(docker images) - name: Build the ${{ matrix.ARCHITECTURE }} rpm Wazuh ${{ matrix.TYPE }} package working-directory: ./rpms From 4e768aac8ae816295b3e9ff8c2cc31375fc1ccd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 27 Jan 2023 16:27:44 +0100 Subject: [PATCH 095/328] Remove repo name from image name after pulling it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/actions/common-tools/pull_image_from_ghcr.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/common-tools/pull_image_from_ghcr.sh b/.github/actions/common-tools/pull_image_from_ghcr.sh index 98f668d89e..79c2682f51 100644 --- a/.github/actions/common-tools/pull_image_from_ghcr.sh +++ b/.github/actions/common-tools/pull_image_from_ghcr.sh @@ -20,3 +20,4 @@ IMAGE_ID=ghcr.io/${GITHUB_OWNER}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG} IMAGE_ID=$(echo ${IMAGE_ID} | tr '[A-Z]' '[a-z]') docker pull ${IMAGE_ID} +docker image tag ghcr.io/${GITHUB_OWNER}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG} ${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG} From fff3dd8d761b0225a71a2ad1eaef6221ebebdcb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 27 Jan 2023 16:33:41 +0100 Subject: [PATCH 096/328] Upload the created package as an artifact MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 9 +++++++-- .github/workflows/build-rpm-packages.yml | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index be555ab665..75d44fa245 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -39,10 +39,15 @@ jobs: - name: Download docker image for package building run: | bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ env.TAG }} - echo $(docker images) - name: Build the ${{ matrix.ARCHITECTURE }} deb Wazuh ${{ matrix.TYPE }} package working-directory: ./debs run: | bash generate_debian_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} - echo "PACKAGE_NAME=$(ls ./output | grep .deb | head -n 1)" >> $GITHUB_ENV \ No newline at end of file + echo "PACKAGE_NAME=$(ls ./output | grep .deb | head -n 1)" >> $GITHUB_ENV + + - name: Upload Wazuh ${{ matrix.TYPE }} ${{ matrix.ARCHITECTURE }} package as artifact + uses: actions/upload-artifact@v2 + with: + name: ${{ env.PACKAGE_NAME }} + path: ${{github.workspace}}/rpms/output/${{ env.PACKAGE_NAME }} \ No newline at end of file diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index b60c1c0ad0..73a5dda2ef 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -39,10 +39,15 @@ jobs: - name: Download docker image for package building run: | bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ env.TAG }} - echo $(docker images) - name: Build the ${{ matrix.ARCHITECTURE }} rpm Wazuh ${{ matrix.TYPE }} package working-directory: ./rpms run: | bash generate_rpm_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} - echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV \ No newline at end of file + echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV + + - name: Upload Wazuh ${{ matrix.TYPE }} ${{ matrix.ARCHITECTURE }} package as artifact + uses: actions/upload-artifact@v2 + with: + name: ${{ env.PACKAGE_NAME }} + path: ${{github.workspace}}/rpms/output/${{ env.PACKAGE_NAME }} \ No newline at end of file From 7b707ce3f383d7e66926fad2ac154510d377f8ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 27 Jan 2023 17:02:15 +0100 Subject: [PATCH 097/328] Fix workflow names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 2 +- .github/workflows/build-rpm-packages.yml | 2 +- .github/workflows/upload-deb-images.yml | 2 +- .github/workflows/upload-rpm-images.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index 75d44fa245..d8272ca996 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -1,4 +1,4 @@ -name: Build Wazuh Packages - DEB - All architectures +name: Build Wazuh Packages - DEB - amd64 and i386 on: pull_request: paths: diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 73a5dda2ef..4e28656056 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -1,4 +1,4 @@ -name: Build Wazuh Packages - RPM - All architectures +name: Build Wazuh Packages - RPM - x86_64 and i386 on: pull_request: paths: diff --git a/.github/workflows/upload-deb-images.yml b/.github/workflows/upload-deb-images.yml index 7a3318e279..0941aefc87 100644 --- a/.github/workflows/upload-deb-images.yml +++ b/.github/workflows/upload-deb-images.yml @@ -1,4 +1,4 @@ -name: Upload DEB package creation Docker images +name: Upload package creation Docker images - DEB - amd64 and i386 on: pull_request: paths: diff --git a/.github/workflows/upload-rpm-images.yml b/.github/workflows/upload-rpm-images.yml index 9a859391a9..711e9252d1 100644 --- a/.github/workflows/upload-rpm-images.yml +++ b/.github/workflows/upload-rpm-images.yml @@ -1,4 +1,4 @@ -name: Upload RPM package creation Docker images +name: Upload package creation Docker images - RPM - x86 and i386 on: pull_request: paths: From 026d6530c3e6f0efde82772bf173c6a188f4dad1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 10:16:01 +0100 Subject: [PATCH 098/328] Remove the test for manager i386, as it is not supported MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 3 +++ .github/workflows/build-rpm-packages.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index d8272ca996..74921c6f34 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -14,6 +14,9 @@ jobs: matrix: TYPE: [agent, manager] ARCHITECTURE : [amd64, i386] + exclude: + - TYPE: manager + ARCHITECTURE: i386 fail-fast: false steps: diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 4e28656056..87a286b252 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -14,6 +14,9 @@ jobs: matrix: TYPE: [agent, manager] ARCHITECTURE : [x86_64, i386] + exclude: + - TYPE: manager + ARCHITECTURE: i386 fail-fast: false steps: From 16228ac30b2cfc07aab1d8ddf4cc76b578d058ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 11:28:03 +0100 Subject: [PATCH 099/328] Add install and enable tests after the creation of packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 2 +- .github/workflows/build-rpm-packages.yml | 9 ++- .../workflows/test-install-and-enable-rpm.yml | 56 ++++--------------- 3 files changed, 18 insertions(+), 49 deletions(-) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index 74921c6f34..3e4695e8c3 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -46,7 +46,7 @@ jobs: - name: Build the ${{ matrix.ARCHITECTURE }} deb Wazuh ${{ matrix.TYPE }} package working-directory: ./debs run: | - bash generate_debian_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} + bash generate_debian_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} -r 'test' echo "PACKAGE_NAME=$(ls ./output | grep .deb | head -n 1)" >> $GITHUB_ENV - name: Upload Wazuh ${{ matrix.TYPE }} ${{ matrix.ARCHITECTURE }} package as artifact diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 87a286b252..09cb442a75 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -46,11 +46,16 @@ jobs: - name: Build the ${{ matrix.ARCHITECTURE }} rpm Wazuh ${{ matrix.TYPE }} package working-directory: ./rpms run: | - bash generate_rpm_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} + bash generate_rpm_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} -r 'test' echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV - name: Upload Wazuh ${{ matrix.TYPE }} ${{ matrix.ARCHITECTURE }} package as artifact uses: actions/upload-artifact@v2 with: name: ${{ env.PACKAGE_NAME }} - path: ${{github.workspace}}/rpms/output/${{ env.PACKAGE_NAME }} \ No newline at end of file + path: ${{github.workspace}}/rpms/output/${{ env.PACKAGE_NAME }} + + Call-test-packages-workflow: + needs: Wazuh-agent-rpm-package-builds + uses: ./.github/workflows/test-install-and-enable-rpm.yml + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index efea81a784..b98851e691 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -1,11 +1,7 @@ name: Test install and enable Wazuh agent and manager - RPM on: - pull_request: - paths: - - 'rpms/SPECS/*' - - 'rpms/generate_rpm_package.sh' - - 'rpms/build.sh' workflow_dispatch: + workflow_call: jobs: Cancel-previous-runs: @@ -21,62 +17,30 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - include: - - imagename: almalinux - version: 9 - type: agent - - imagename: oraclelinux - version: 9 - type: agent - - imagename: rockylinux - version: 9 - type: agent - - imagename: centos - version: 7 - type: agent - - imagename: centos - version: 7 - type: manager - - imagename: centos - version: 8 - type: agent - - imagename: centos - version: 8 - type: manager - - imagename: redhat/ubi8 - version: latest - type: agent - - imagename: redhat/ubi8 - version: latest - type: manager - - imagename: redhat/ubi9 - version: latest - type: agent - - imagename: redhat/ubi9 - version: latest - type: manager + system: [{DISTRO: "oraclelinux", VERSION: 9}, {DISTRO: "almalinux", VERSION: 9}, {DISTRO: "rockylinux", VERSION: 9}, {DISTRO: "centos", VERSION: 7, 8}, {DISTRO: "redhat/ubi8", VERSION: latest}, {DISTRO: "redhat/ubi9", VERSION: latest"}] + type: [agent, manager] fail-fast: false steps: - uses: actions/checkout@v3 - name: Setup directories and variables run: | - mkdir $GITHUB_WORKSPACE/packages - echo 'PACKAGE_NAME=wazuh-${{ matrix.type }}-4.4.0-1.x86_64.rpm' >> $GITHUB_ENV + echo 'VERSION=$GITHUB_WORKSPACE/VERSION' >> $GITHUB_ENV + echo 'PACKAGE_NAME=wazuh-${{ matrix.type }}-${{ env.VERSION }}-test.x86_64.rpm' >> $GITHUB_ENV - - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.imagename }}:${{ matrix.version }} + - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.system.DISTRO }}:${{ matrix.system.VERSION }} uses: dawidd6/action-download-artifact@v2 with: - workflow: create-rpm-packages.yml + workflow: build-rpm-packages.yml workflow_conclusion: success name: $PACKAGE_NAME - - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.imagename }}:${{ matrix.version }} + - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.system.DISTRO }}:${{ matrix.system.VERSION }} to the packages directory working-directory: ./rpms run: | - #curl -o $PACKAGE_NAME https://packages-dev.wazuh.com/pre-release/yum/$PACKAGE_NAME + mkdir $GITHUB_WORKSPACE/packages mv $PACKAGE_NAME $GITHUB_WORKSPACE/packages - name: Launch docker - run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-install-enable/:/tests -v $GITHUB_WORKSPACE/packages/:/packages ${{ matrix.imagename }}:${{ matrix.version }} bash /tests/install_and_enable.sh $PACKAGE_NAME ${{ matrix.type }} \ No newline at end of file + run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-install-enable/:/tests -v $GITHUB_WORKSPACE/packages/:/packages ${{ matrix.system.DISTRO }}:${{ matrix.system.VERSION }} bash /tests/install_and_enable.sh $PACKAGE_NAME ${{ matrix.type }} \ No newline at end of file From 5a9a74300d68ff50bd130777d96af3566d1945ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 11:32:11 +0100 Subject: [PATCH 100/328] Fix syntax error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 2 +- .github/workflows/build-rpm-packages.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index 3e4695e8c3..fdb0bab7f6 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -46,7 +46,7 @@ jobs: - name: Build the ${{ matrix.ARCHITECTURE }} deb Wazuh ${{ matrix.TYPE }} package working-directory: ./debs run: | - bash generate_debian_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} -r 'test' + bash generate_debian_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} -r 'test' echo "PACKAGE_NAME=$(ls ./output | grep .deb | head -n 1)" >> $GITHUB_ENV - name: Upload Wazuh ${{ matrix.TYPE }} ${{ matrix.ARCHITECTURE }} package as artifact diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 09cb442a75..3ff51d43ec 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -46,7 +46,7 @@ jobs: - name: Build the ${{ matrix.ARCHITECTURE }} rpm Wazuh ${{ matrix.TYPE }} package working-directory: ./rpms run: | - bash generate_rpm_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} -r 'test' + bash generate_rpm_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} -r test echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV - name: Upload Wazuh ${{ matrix.TYPE }} ${{ matrix.ARCHITECTURE }} package as artifact From fb8b0ebd1de1bd5cb4cd1cf48f68b8f42e88f996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 11:38:05 +0100 Subject: [PATCH 101/328] Change uses syntax from path to owner/repo/path MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-rpm-packages.yml | 2 +- .github/workflows/upload-deb-images.yml | 2 +- .github/workflows/upload-rpm-images.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 3ff51d43ec..1f3932becb 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -57,5 +57,5 @@ jobs: Call-test-packages-workflow: needs: Wazuh-agent-rpm-package-builds - uses: ./.github/workflows/test-install-and-enable-rpm.yml + uses: wazuh/wazuh-packages/.github/workflows/test-install-and-enable-rpm.yml secrets: inherit \ No newline at end of file diff --git a/.github/workflows/upload-deb-images.yml b/.github/workflows/upload-deb-images.yml index 0941aefc87..466cb03f8c 100644 --- a/.github/workflows/upload-deb-images.yml +++ b/.github/workflows/upload-deb-images.yml @@ -38,5 +38,5 @@ jobs: Call-build-packages-workflow: needs: Upload-deb-package-building-images if: github.event_name == 'pull_request' - uses: ./.github/workflows/build-deb-packages.yml + uses: wazuh/wazuh-packages/.github/workflows/build-deb-packages.yml secrets: inherit \ No newline at end of file diff --git a/.github/workflows/upload-rpm-images.yml b/.github/workflows/upload-rpm-images.yml index 711e9252d1..6b44b8abb7 100644 --- a/.github/workflows/upload-rpm-images.yml +++ b/.github/workflows/upload-rpm-images.yml @@ -38,5 +38,5 @@ jobs: Call-build-packages-workflow: needs: Upload-rpm-package-building-images if: github.event_name == 'pull_request' - uses: ./.github/workflows/build-rpm-packages.yml + uses: wazuh/wazuh-packages/.github/workflows/build-rpm-packages.yml secrets: inherit \ No newline at end of file From 2ad23d6abbf854c3b900e1ff83e00f4e8ab46e32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 12:01:53 +0100 Subject: [PATCH 102/328] Add commit reference to uses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-rpm-packages.yml | 2 +- .github/workflows/upload-deb-images.yml | 2 +- .github/workflows/upload-rpm-images.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 1f3932becb..c0bb64a9e3 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -57,5 +57,5 @@ jobs: Call-test-packages-workflow: needs: Wazuh-agent-rpm-package-builds - uses: wazuh/wazuh-packages/.github/workflows/test-install-and-enable-rpm.yml + uses: wazuh/wazuh-packages/.github/workflows/test-install-and-enable-rpm.yml@${{ github.commit_ref }} secrets: inherit \ No newline at end of file diff --git a/.github/workflows/upload-deb-images.yml b/.github/workflows/upload-deb-images.yml index 466cb03f8c..373c0d5406 100644 --- a/.github/workflows/upload-deb-images.yml +++ b/.github/workflows/upload-deb-images.yml @@ -38,5 +38,5 @@ jobs: Call-build-packages-workflow: needs: Upload-deb-package-building-images if: github.event_name == 'pull_request' - uses: wazuh/wazuh-packages/.github/workflows/build-deb-packages.yml + uses: wazuh/wazuh-packages/.github/workflows/build-deb-packages.yml@${{ github.commit_ref }} secrets: inherit \ No newline at end of file diff --git a/.github/workflows/upload-rpm-images.yml b/.github/workflows/upload-rpm-images.yml index 6b44b8abb7..033d1291a2 100644 --- a/.github/workflows/upload-rpm-images.yml +++ b/.github/workflows/upload-rpm-images.yml @@ -38,5 +38,5 @@ jobs: Call-build-packages-workflow: needs: Upload-rpm-package-building-images if: github.event_name == 'pull_request' - uses: wazuh/wazuh-packages/.github/workflows/build-rpm-packages.yml + uses: wazuh/wazuh-packages/.github/workflows/build-rpm-packages.yml@${{ github.commit_ref }} secrets: inherit \ No newline at end of file From 898423327ffa38d6a07f8680c5ac4308aa8632c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 12:03:41 +0100 Subject: [PATCH 103/328] Change variable used to add reference to commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-rpm-packages.yml | 2 +- .github/workflows/upload-deb-images.yml | 2 +- .github/workflows/upload-rpm-images.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index c0bb64a9e3..2ffddf0219 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -57,5 +57,5 @@ jobs: Call-test-packages-workflow: needs: Wazuh-agent-rpm-package-builds - uses: wazuh/wazuh-packages/.github/workflows/test-install-and-enable-rpm.yml@${{ github.commit_ref }} + uses: wazuh/wazuh-packages/.github/workflows/test-install-and-enable-rpm.yml@${{ github.sha }} secrets: inherit \ No newline at end of file diff --git a/.github/workflows/upload-deb-images.yml b/.github/workflows/upload-deb-images.yml index 373c0d5406..8ae421da9b 100644 --- a/.github/workflows/upload-deb-images.yml +++ b/.github/workflows/upload-deb-images.yml @@ -38,5 +38,5 @@ jobs: Call-build-packages-workflow: needs: Upload-deb-package-building-images if: github.event_name == 'pull_request' - uses: wazuh/wazuh-packages/.github/workflows/build-deb-packages.yml@${{ github.commit_ref }} + uses: wazuh/wazuh-packages/.github/workflows/build-deb-packages.yml@${{ github.sha }} secrets: inherit \ No newline at end of file diff --git a/.github/workflows/upload-rpm-images.yml b/.github/workflows/upload-rpm-images.yml index 033d1291a2..22be710674 100644 --- a/.github/workflows/upload-rpm-images.yml +++ b/.github/workflows/upload-rpm-images.yml @@ -38,5 +38,5 @@ jobs: Call-build-packages-workflow: needs: Upload-rpm-package-building-images if: github.event_name == 'pull_request' - uses: wazuh/wazuh-packages/.github/workflows/build-rpm-packages.yml@${{ github.commit_ref }} + uses: wazuh/wazuh-packages/.github/workflows/build-rpm-packages.yml@${{ github.sha }} secrets: inherit \ No newline at end of file From 0663e3df8cb0e905f18c7a049f626d7f795b0ffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 12:16:07 +0100 Subject: [PATCH 104/328] Try direct path for reusable worflows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-rpm-packages.yml | 8 ++++---- .github/workflows/upload-deb-images.yml | 2 +- .github/workflows/upload-rpm-images.yml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 2ffddf0219..e3aabb2d55 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -55,7 +55,7 @@ jobs: name: ${{ env.PACKAGE_NAME }} path: ${{github.workspace}}/rpms/output/${{ env.PACKAGE_NAME }} - Call-test-packages-workflow: - needs: Wazuh-agent-rpm-package-builds - uses: wazuh/wazuh-packages/.github/workflows/test-install-and-enable-rpm.yml@${{ github.sha }} - secrets: inherit \ No newline at end of file + # Call-test-packages-workflow: + # needs: Wazuh-agent-rpm-package-builds + # uses: wazuh/wazuh-packages/.github/workflows/test-install-and-enable-rpm.yml@${{ github.sha }} + # secrets: inherit \ No newline at end of file diff --git a/.github/workflows/upload-deb-images.yml b/.github/workflows/upload-deb-images.yml index 8ae421da9b..048042fd47 100644 --- a/.github/workflows/upload-deb-images.yml +++ b/.github/workflows/upload-deb-images.yml @@ -38,5 +38,5 @@ jobs: Call-build-packages-workflow: needs: Upload-deb-package-building-images if: github.event_name == 'pull_request' - uses: wazuh/wazuh-packages/.github/workflows/build-deb-packages.yml@${{ github.sha }} + uses: .github/workflows/build-deb-packages.yml secrets: inherit \ No newline at end of file diff --git a/.github/workflows/upload-rpm-images.yml b/.github/workflows/upload-rpm-images.yml index 22be710674..58efbcade8 100644 --- a/.github/workflows/upload-rpm-images.yml +++ b/.github/workflows/upload-rpm-images.yml @@ -38,5 +38,5 @@ jobs: Call-build-packages-workflow: needs: Upload-rpm-package-building-images if: github.event_name == 'pull_request' - uses: wazuh/wazuh-packages/.github/workflows/build-rpm-packages.yml@${{ github.sha }} + uses: .github/workflows/build-rpm-packages.yml secrets: inherit \ No newline at end of file From d52d9551914e1afbbce1ff73b5586686a2ca0824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 12:17:53 +0100 Subject: [PATCH 105/328] Change path type to reuse workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-deb-images.yml | 2 +- .github/workflows/upload-rpm-images.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/upload-deb-images.yml b/.github/workflows/upload-deb-images.yml index 048042fd47..0941aefc87 100644 --- a/.github/workflows/upload-deb-images.yml +++ b/.github/workflows/upload-deb-images.yml @@ -38,5 +38,5 @@ jobs: Call-build-packages-workflow: needs: Upload-deb-package-building-images if: github.event_name == 'pull_request' - uses: .github/workflows/build-deb-packages.yml + uses: ./.github/workflows/build-deb-packages.yml secrets: inherit \ No newline at end of file diff --git a/.github/workflows/upload-rpm-images.yml b/.github/workflows/upload-rpm-images.yml index 58efbcade8..711e9252d1 100644 --- a/.github/workflows/upload-rpm-images.yml +++ b/.github/workflows/upload-rpm-images.yml @@ -38,5 +38,5 @@ jobs: Call-build-packages-workflow: needs: Upload-rpm-package-building-images if: github.event_name == 'pull_request' - uses: .github/workflows/build-rpm-packages.yml + uses: ./.github/workflows/build-rpm-packages.yml secrets: inherit \ No newline at end of file From 35f1a023f0a30419f1189f075bf13d7415906773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 12:27:05 +0100 Subject: [PATCH 106/328] Add call to test the packages after creating them MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-rpm-packages.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index e3aabb2d55..3ff51d43ec 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -55,7 +55,7 @@ jobs: name: ${{ env.PACKAGE_NAME }} path: ${{github.workspace}}/rpms/output/${{ env.PACKAGE_NAME }} - # Call-test-packages-workflow: - # needs: Wazuh-agent-rpm-package-builds - # uses: wazuh/wazuh-packages/.github/workflows/test-install-and-enable-rpm.yml@${{ github.sha }} - # secrets: inherit \ No newline at end of file + Call-test-packages-workflow: + needs: Wazuh-agent-rpm-package-builds + uses: ./.github/workflows/test-install-and-enable-rpm.yml + secrets: inherit \ No newline at end of file From ba1d83195b5d066d367d4eb7b7fd1743c0fa0cc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 12:34:49 +0100 Subject: [PATCH 107/328] Check if test install and enable works on its own MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-rpm-packages.yml | 9 +++++---- .github/workflows/test-install-and-enable-rpm.yml | 13 ++++--------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 3ff51d43ec..d38e6b62e9 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -55,7 +55,8 @@ jobs: name: ${{ env.PACKAGE_NAME }} path: ${{github.workspace}}/rpms/output/${{ env.PACKAGE_NAME }} - Call-test-packages-workflow: - needs: Wazuh-agent-rpm-package-builds - uses: ./.github/workflows/test-install-and-enable-rpm.yml - secrets: inherit \ No newline at end of file + # Call-test-packages-workflow: + # needs: + # - Wazuh-agent-rpm-package-builds + # uses: ./.github/workflows/test-install-and-enable-rpm.yml + # secrets: inherit \ No newline at end of file diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index b98851e691..79c8fef6d3 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -1,18 +1,13 @@ name: Test install and enable Wazuh agent and manager - RPM on: + pull_request: + paths: + - 'rpms/SPECS/*' + - 'rpms/generate_rpm_package.sh' workflow_dispatch: workflow_call: jobs: - Cancel-previous-runs: - name: 'Cancel Previous Runs' - runs-on: ubuntu-latest - timeout-minutes: 3 - steps: - - uses: styfle/cancel-workflow-action - with: - workflow_id: ${{ github.run_id }} - Test-install-and-enable-rpm-systems: runs-on: ubuntu-latest strategy: From 68e3eeeefee11be20a1cd9346cd0990dc6641622 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 12:52:04 +0100 Subject: [PATCH 108/328] Fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 5 +++-- .github/workflows/build-rpm-packages.yml | 1 + .github/workflows/test-install-and-enable-rpm.yml | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index fdb0bab7f6..b81826f934 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -46,11 +46,12 @@ jobs: - name: Build the ${{ matrix.ARCHITECTURE }} deb Wazuh ${{ matrix.TYPE }} package working-directory: ./debs run: | - bash generate_debian_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} -r 'test' + bash generate_debian_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} -r test echo "PACKAGE_NAME=$(ls ./output | grep .deb | head -n 1)" >> $GITHUB_ENV - name: Upload Wazuh ${{ matrix.TYPE }} ${{ matrix.ARCHITECTURE }} package as artifact uses: actions/upload-artifact@v2 with: name: ${{ env.PACKAGE_NAME }} - path: ${{github.workspace}}/rpms/output/${{ env.PACKAGE_NAME }} \ No newline at end of file + path: ${{github.workspace}}/debs/output/${{ env.PACKAGE_NAME }} + if-no-files-found: error \ No newline at end of file diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index d38e6b62e9..bd83e50322 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -54,6 +54,7 @@ jobs: with: name: ${{ env.PACKAGE_NAME }} path: ${{github.workspace}}/rpms/output/${{ env.PACKAGE_NAME }} + if-no-files-found: error # Call-test-packages-workflow: # needs: diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 79c8fef6d3..9c851cf7b3 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -28,14 +28,14 @@ jobs: with: workflow: build-rpm-packages.yml workflow_conclusion: success - name: $PACKAGE_NAME + name: ${{env.PACKAGE_NAME}} - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.system.DISTRO }}:${{ matrix.system.VERSION }} to the packages directory working-directory: ./rpms run: | mkdir $GITHUB_WORKSPACE/packages - mv $PACKAGE_NAME $GITHUB_WORKSPACE/packages + mv ${{env.PACKAGE_NAME}} $GITHUB_WORKSPACE/packages - name: Launch docker run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-install-enable/:/tests -v $GITHUB_WORKSPACE/packages/:/packages ${{ matrix.system.DISTRO }}:${{ matrix.system.VERSION }} bash /tests/install_and_enable.sh $PACKAGE_NAME ${{ matrix.type }} \ No newline at end of file From 023be39f0d8710188b7d25f77059a1a82fe57e2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 12:58:17 +0100 Subject: [PATCH 109/328] Change call to VERSION variable inside step MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-rpm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 9c851cf7b3..4f2182dcdd 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -21,7 +21,7 @@ jobs: - name: Setup directories and variables run: | echo 'VERSION=$GITHUB_WORKSPACE/VERSION' >> $GITHUB_ENV - echo 'PACKAGE_NAME=wazuh-${{ matrix.type }}-${{ env.VERSION }}-test.x86_64.rpm' >> $GITHUB_ENV + echo 'PACKAGE_NAME=wazuh-${{ matrix.type }}-$VERSION-test.x86_64.rpm' >> $GITHUB_ENV - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.system.DISTRO }}:${{ matrix.system.VERSION }} uses: dawidd6/action-download-artifact@v2 From 7abf95b709e32e07f6095bf7e19d3dd150fddcfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 13:01:04 +0100 Subject: [PATCH 110/328] Fix variable VERSION setting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-rpm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 4f2182dcdd..c32150a6d5 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -20,7 +20,7 @@ jobs: - name: Setup directories and variables run: | - echo 'VERSION=$GITHUB_WORKSPACE/VERSION' >> $GITHUB_ENV + VERSION=$GITHUB_WORKSPACE/VERSION echo 'PACKAGE_NAME=wazuh-${{ matrix.type }}-$VERSION-test.x86_64.rpm' >> $GITHUB_ENV - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.system.DISTRO }}:${{ matrix.system.VERSION }} From dc2b1c705843177ecd16fd1f70c953f517b49518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 13:04:28 +0100 Subject: [PATCH 111/328] Fix variable VERSION setting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-rpm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index c32150a6d5..aaae625837 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -20,7 +20,7 @@ jobs: - name: Setup directories and variables run: | - VERSION=$GITHUB_WORKSPACE/VERSION + VERSION=$(cat $GITHUB_WORKSPACE/VERSION) echo 'PACKAGE_NAME=wazuh-${{ matrix.type }}-$VERSION-test.x86_64.rpm' >> $GITHUB_ENV - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.system.DISTRO }}:${{ matrix.system.VERSION }} From 7da79992683a7951027841d4232a13b72372fa5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 13:10:05 +0100 Subject: [PATCH 112/328] Change single for double quotes when setting the package name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-rpm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index aaae625837..431b71ef0e 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -21,7 +21,7 @@ jobs: - name: Setup directories and variables run: | VERSION=$(cat $GITHUB_WORKSPACE/VERSION) - echo 'PACKAGE_NAME=wazuh-${{ matrix.type }}-$VERSION-test.x86_64.rpm' >> $GITHUB_ENV + echo "PACKAGE_NAME=wazuh-${{ matrix.type }}-$VERSION-test.x86_64.rpm" >> $GITHUB_ENV - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.system.DISTRO }}:${{ matrix.system.VERSION }} uses: dawidd6/action-download-artifact@v2 From aa2ebc343e6795fa61b01176743281c3b6775637 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 13:20:26 +0100 Subject: [PATCH 113/328] Change path for the moving of the package and add argument to artifact download MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-rpm.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 431b71ef0e..2296d885c8 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -29,13 +29,14 @@ jobs: workflow: build-rpm-packages.yml workflow_conclusion: success name: ${{env.PACKAGE_NAME}} + if_no_artifact_found: fail - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.system.DISTRO }}:${{ matrix.system.VERSION }} to the packages directory working-directory: ./rpms run: | mkdir $GITHUB_WORKSPACE/packages - mv ${{env.PACKAGE_NAME}} $GITHUB_WORKSPACE/packages + mv ./${{env.PACKAGE_NAME}} $GITHUB_WORKSPACE/packages - name: Launch docker run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-install-enable/:/tests -v $GITHUB_WORKSPACE/packages/:/packages ${{ matrix.system.DISTRO }}:${{ matrix.system.VERSION }} bash /tests/install_and_enable.sh $PACKAGE_NAME ${{ matrix.type }} \ No newline at end of file From d1e6c053123f251c211e26fbeea2ed485203d538 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 13:23:04 +0100 Subject: [PATCH 114/328] Remove unneccessary working directory from step MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-rpm.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 2296d885c8..c32b7676c9 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -33,10 +33,9 @@ jobs: - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.system.DISTRO }}:${{ matrix.system.VERSION }} to the packages directory - working-directory: ./rpms run: | mkdir $GITHUB_WORKSPACE/packages - mv ./${{env.PACKAGE_NAME}} $GITHUB_WORKSPACE/packages + mv ${{env.PACKAGE_NAME}} $GITHUB_WORKSPACE/packages - name: Launch docker run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-install-enable/:/tests -v $GITHUB_WORKSPACE/packages/:/packages ${{ matrix.system.DISTRO }}:${{ matrix.system.VERSION }} bash /tests/install_and_enable.sh $PACKAGE_NAME ${{ matrix.type }} \ No newline at end of file From 94629360d96147cb9e471b2dfb9907bd61e462dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 13:29:42 +0100 Subject: [PATCH 115/328] Cancel duplicate workflows and fix test install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 3 +++ .github/workflows/build-rpm-packages.yml | 3 +++ .github/workflows/test-install-and-enable-rpm.yml | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index b81826f934..a54cf02e3a 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -22,6 +22,9 @@ jobs: steps: - uses: actions/checkout@v3 + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + - name: Get changed files uses: dorny/paths-filter@v2 id: changes diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index bd83e50322..c0ebd6df4c 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -22,6 +22,9 @@ jobs: steps: - uses: actions/checkout@v3 + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + - name: Get changed files uses: dorny/paths-filter@v2 id: changes diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index c32b7676c9..a7fe6932e4 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - system: [{DISTRO: "oraclelinux", VERSION: 9}, {DISTRO: "almalinux", VERSION: 9}, {DISTRO: "rockylinux", VERSION: 9}, {DISTRO: "centos", VERSION: 7, 8}, {DISTRO: "redhat/ubi8", VERSION: latest}, {DISTRO: "redhat/ubi9", VERSION: latest"}] + system: [{DISTRO: "oraclelinux", VERSION: 9}, {DISTRO: "almalinux", VERSION: 9}, {DISTRO: "rockylinux", VERSION: 9}, {DISTRO: "centos", VERSION: 7, 8}, {DISTRO: "redhat/ubi8", VERSION: latest}, {DISTRO: "redhat/ubi9", VERSION: latest}] type: [agent, manager] fail-fast: false steps: From ec3f3d56fcf7035fcf02f8a4755d4709f2292943 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 13:36:35 +0100 Subject: [PATCH 116/328] Call the install test after creating the packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-rpm-packages.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index c0ebd6df4c..cd064cad6e 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -59,8 +59,7 @@ jobs: path: ${{github.workspace}}/rpms/output/${{ env.PACKAGE_NAME }} if-no-files-found: error - # Call-test-packages-workflow: - # needs: - # - Wazuh-agent-rpm-package-builds - # uses: ./.github/workflows/test-install-and-enable-rpm.yml - # secrets: inherit \ No newline at end of file + Call-test-packages-workflow: + needs: Wazuh-agent-rpm-package-builds + uses: ./.github/workflows/test-install-and-enable-rpm.yml + secrets: inherit \ No newline at end of file From 253b2fe0a6ca3055a7864a67b1a31970b2640014 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 14:30:13 +0100 Subject: [PATCH 117/328] Add tests install and enable for debian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 7 ++- .github/workflows/build-rpm-packages.yml | 2 +- .../workflows/test-install-and-enable-deb.yml | 43 +++++++++++++++++++ .../workflows/test-install-and-enable-rpm.yml | 26 +++++++---- 4 files changed, 67 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/test-install-and-enable-deb.yml diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index a54cf02e3a..aaa5024ca0 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -57,4 +57,9 @@ jobs: with: name: ${{ env.PACKAGE_NAME }} path: ${{github.workspace}}/debs/output/${{ env.PACKAGE_NAME }} - if-no-files-found: error \ No newline at end of file + if-no-files-found: error + + Test-install-packages-deb: + needs: Wazuh-agent-deb-package-builds + uses: ./.github/workflows/test-install-and-enable-deb.yml + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index cd064cad6e..ccf195fe2a 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -59,7 +59,7 @@ jobs: path: ${{github.workspace}}/rpms/output/${{ env.PACKAGE_NAME }} if-no-files-found: error - Call-test-packages-workflow: + Test-install-packages-rpm: needs: Wazuh-agent-rpm-package-builds uses: ./.github/workflows/test-install-and-enable-rpm.yml secrets: inherit \ No newline at end of file diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml new file mode 100644 index 0000000000..1b9cec5b3e --- /dev/null +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -0,0 +1,43 @@ +name: Test install and enable Wazuh agent and manager - DEB +on: + workflow_dispatch: + workflow_call: + +jobs: + Test-install-and-enable-deb-systems: + runs-on: ubuntu-latest + strategy: + matrix: + distro_name: [ubuntu:xenial, ubuntu:bionic, ubuntu:focal, ubuntu:jammy, debian:stretch, debian:buster, debian:bullseye, amazonlinux:2] + type: [agent, manager] + arch: [amd64, i386] + exclude: + - distro_name: amazonlinux:2 + arch: i386 + - type: manager + arch: i386 + fail-fast: false + steps: + - uses: actions/checkout@v3 + + - name: Setup directories and variables + run: | + VERSION=$(cat $GITHUB_WORKSPACE/VERSION) + echo "PACKAGE_NAME=wazuh-${{ matrix.type }}-$VERSION-test.${{ matrix.arch }}.rpm" >> $GITHUB_ENV + + - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} + uses: dawidd6/action-download-artifact@v2 + with: + workflow: build-rpm-packages.yml + workflow_conclusion: success + name: ${{env.PACKAGE_NAME}} + if_no_artifact_found: fail + + + - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} to the packages directory + run: | + mkdir $GITHUB_WORKSPACE/packages + mv ${{env.PACKAGE_NAME}} $GITHUB_WORKSPACE/packages + + - name: Launch docker + run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-install-enable/:/tests -v $GITHUB_WORKSPACE/packages/:/packages ${{ matrix.distro_name }} bash /tests/install_and_enable.sh $PACKAGE_NAME ${{ matrix.type }} \ No newline at end of file diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index a7fe6932e4..b9fce9db4d 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -1,9 +1,5 @@ name: Test install and enable Wazuh agent and manager - RPM on: - pull_request: - paths: - - 'rpms/SPECS/*' - - 'rpms/generate_rpm_package.sh' workflow_dispatch: workflow_call: @@ -12,8 +8,20 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - system: [{DISTRO: "oraclelinux", VERSION: 9}, {DISTRO: "almalinux", VERSION: 9}, {DISTRO: "rockylinux", VERSION: 9}, {DISTRO: "centos", VERSION: 7, 8}, {DISTRO: "redhat/ubi8", VERSION: latest}, {DISTRO: "redhat/ubi9", VERSION: latest}] + system: [ + {NAME: "oraclelinux:9", ARCH: "x86_64"}, + {NAME: "almalinux:9", ARCH: "x86_64"}, + {NAME: "rockylinux:9", ARCH: "x86_64"}, + {NAME: "centos:7", ARCH: "x86_64"}, + {NAME: "centos:8", ARCH: "i386"}, + {NAME: "i386/centos:7", ARCH: "x86_64"}, + {NAME: "i386/centos:7", ARCH: "i386"}, + {NAME: "redhat/ubi8:latest", ARCH: "x86_64"}, + {NAME: "redhat/ubi9:latest", ARCH: "x86_64"}] type: [agent, manager] + exclude: + - system: {ARCH: "i386"} + type: manager fail-fast: false steps: - uses: actions/checkout@v3 @@ -21,9 +29,9 @@ jobs: - name: Setup directories and variables run: | VERSION=$(cat $GITHUB_WORKSPACE/VERSION) - echo "PACKAGE_NAME=wazuh-${{ matrix.type }}-$VERSION-test.x86_64.rpm" >> $GITHUB_ENV + echo "PACKAGE_NAME=wazuh-${{ matrix.type }}-$VERSION-test.${{matrix.system.ARCH}}.rpm" >> $GITHUB_ENV - - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.system.DISTRO }}:${{ matrix.system.VERSION }} + - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} uses: dawidd6/action-download-artifact@v2 with: workflow: build-rpm-packages.yml @@ -32,10 +40,10 @@ jobs: if_no_artifact_found: fail - - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.system.DISTRO }}:${{ matrix.system.VERSION }} to the packages directory + - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} to the packages directory run: | mkdir $GITHUB_WORKSPACE/packages mv ${{env.PACKAGE_NAME}} $GITHUB_WORKSPACE/packages - name: Launch docker - run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-install-enable/:/tests -v $GITHUB_WORKSPACE/packages/:/packages ${{ matrix.system.DISTRO }}:${{ matrix.system.VERSION }} bash /tests/install_and_enable.sh $PACKAGE_NAME ${{ matrix.type }} \ No newline at end of file + run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-install-enable/:/tests -v $GITHUB_WORKSPACE/packages/:/packages ${{ matrix.system.NAME }} bash /tests/install_and_enable.sh $PACKAGE_NAME ${{ matrix.type }} \ No newline at end of file From 93afcdd4604adbc5459e6494026a572ad55ccd04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 14:34:19 +0100 Subject: [PATCH 118/328] Change quotes in docker images name for testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../workflows/test-install-and-enable-deb.yml | 2 +- .../workflows/test-install-and-enable-rpm.yml | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index 1b9cec5b3e..f6d6880a99 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - distro_name: [ubuntu:xenial, ubuntu:bionic, ubuntu:focal, ubuntu:jammy, debian:stretch, debian:buster, debian:bullseye, amazonlinux:2] + distro_name: ['ubuntu:xenial', 'ubuntu:bionic', 'ubuntu:focal', 'ubuntu:jammy', 'debian:stretch', 'debian:buster', 'debian:bullseye', 'amazonlinux:2'] type: [agent, manager] arch: [amd64, i386] exclude: diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index b9fce9db4d..987224b1c8 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -9,15 +9,15 @@ jobs: strategy: matrix: system: [ - {NAME: "oraclelinux:9", ARCH: "x86_64"}, - {NAME: "almalinux:9", ARCH: "x86_64"}, - {NAME: "rockylinux:9", ARCH: "x86_64"}, - {NAME: "centos:7", ARCH: "x86_64"}, - {NAME: "centos:8", ARCH: "i386"}, - {NAME: "i386/centos:7", ARCH: "x86_64"}, - {NAME: "i386/centos:7", ARCH: "i386"}, - {NAME: "redhat/ubi8:latest", ARCH: "x86_64"}, - {NAME: "redhat/ubi9:latest", ARCH: "x86_64"}] + {NAME: 'oraclelinux:9', ARCH: "x86_64"}, + {NAME: 'almalinux:0', ARCH: "x86_64"}, + {NAME: 'rockylinux:9', ARCH: "x86_64"}, + {NAME: 'centos:7', ARCH: "x86_64"}, + {NAME: 'centos:8', ARCH: "i386"}, + {NAME: 'i386/centos:7', ARCH: "x86_64"}, + {NAME: 'i386/centos:7', ARCH: "i386"}, + {NAME: 'redhat/ubi8:latest', ARCH: "x86_64"}, + {NAME: 'redhat/ubi9:latest', ARCH: "x86_64"}] type: [agent, manager] exclude: - system: {ARCH: "i386"} From 43d7de26927acfce46862ce3285192bc6fdb1bbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 14:41:03 +0100 Subject: [PATCH 119/328] Remove the skip duplicates action in the package building and change names MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 3 --- .github/workflows/build-rpm-packages.yml | 3 --- .github/workflows/upload-deb-images.yml | 2 +- .github/workflows/upload-rpm-images.yml | 2 +- 4 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index aaa5024ca0..d667353d45 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -22,9 +22,6 @@ jobs: steps: - uses: actions/checkout@v3 - - id: skip_check - uses: fkirc/skip-duplicate-actions@master - - name: Get changed files uses: dorny/paths-filter@v2 id: changes diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index ccf195fe2a..f9a2dad486 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -22,9 +22,6 @@ jobs: steps: - uses: actions/checkout@v3 - - id: skip_check - uses: fkirc/skip-duplicate-actions@master - - name: Get changed files uses: dorny/paths-filter@v2 id: changes diff --git a/.github/workflows/upload-deb-images.yml b/.github/workflows/upload-deb-images.yml index 0941aefc87..c94f3a961d 100644 --- a/.github/workflows/upload-deb-images.yml +++ b/.github/workflows/upload-deb-images.yml @@ -35,7 +35,7 @@ jobs: run: bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }} - Call-build-packages-workflow: + Build-packages-rpm: needs: Upload-deb-package-building-images if: github.event_name == 'pull_request' uses: ./.github/workflows/build-deb-packages.yml diff --git a/.github/workflows/upload-rpm-images.yml b/.github/workflows/upload-rpm-images.yml index 711e9252d1..cfbbb4844c 100644 --- a/.github/workflows/upload-rpm-images.yml +++ b/.github/workflows/upload-rpm-images.yml @@ -35,7 +35,7 @@ jobs: run: bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }} - Call-build-packages-workflow: + Build-packages-rpm: needs: Upload-rpm-package-building-images if: github.event_name == 'pull_request' uses: ./.github/workflows/build-rpm-packages.yml From 42c6fef8248a5d6fdd612fa81f137178faf47959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 14:49:18 +0100 Subject: [PATCH 120/328] Fix architecture errors for the install and enable tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../test-install-enable/install_and_enable.sh | 15 ++++++++++++++- .github/workflows/build-deb-packages.yml | 3 +++ .github/workflows/build-rpm-packages.yml | 3 +++ .github/workflows/test-install-and-enable-deb.yml | 2 +- .github/workflows/test-install-and-enable-rpm.yml | 6 +++--- 5 files changed, 24 insertions(+), 5 deletions(-) diff --git a/.github/actions/test-install-enable/install_and_enable.sh b/.github/actions/test-install-enable/install_and_enable.sh index d97cfb83ec..2c895e26d0 100644 --- a/.github/actions/test-install-enable/install_and_enable.sh +++ b/.github/actions/test-install-enable/install_and_enable.sh @@ -1,11 +1,24 @@ #!/bin/bash echo "Installing Wazuh $2." + source /etc/os-release if [ "$ID" = "centos" ] && [ "$VERSION_ID" = "8" ]; then find /etc/yum.repos.d/ -type f -exec sed -i 's/mirrorlist/#mirrorlist/g' {} \; find /etc/yum.repos.d/ -type f -exec sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' {} \; fi -yum install -y "/packages/$1" + +if [ -n "$(command -v yum)" ]; then + sys_type="yum" + sep="-" +elif [ -n "$(command -v apt-get)" ]; then + sys_type="apt-get" + sep="=" +else + common_logger -e "Couldn'd find type of system" + exit 1 +fi + +$sys_type install -y "/packages/$1" echo "Enabling Wazuh $2." systemctl enable wazuh-$2 diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index d667353d45..aaa5024ca0 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -22,6 +22,9 @@ jobs: steps: - uses: actions/checkout@v3 + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + - name: Get changed files uses: dorny/paths-filter@v2 id: changes diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index f9a2dad486..ccf195fe2a 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -22,6 +22,9 @@ jobs: steps: - uses: actions/checkout@v3 + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + - name: Get changed files uses: dorny/paths-filter@v2 id: changes diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index f6d6880a99..d7a6827707 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -10,7 +10,7 @@ jobs: matrix: distro_name: ['ubuntu:xenial', 'ubuntu:bionic', 'ubuntu:focal', 'ubuntu:jammy', 'debian:stretch', 'debian:buster', 'debian:bullseye', 'amazonlinux:2'] type: [agent, manager] - arch: [amd64, i386] + arch: [x86_64, i386] exclude: - distro_name: amazonlinux:2 arch: i386 diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 987224b1c8..ca5e9acfcf 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -10,12 +10,12 @@ jobs: matrix: system: [ {NAME: 'oraclelinux:9', ARCH: "x86_64"}, - {NAME: 'almalinux:0', ARCH: "x86_64"}, + {NAME: 'almalinux:9', ARCH: "x86_64"}, {NAME: 'rockylinux:9', ARCH: "x86_64"}, {NAME: 'centos:7', ARCH: "x86_64"}, - {NAME: 'centos:8', ARCH: "i386"}, - {NAME: 'i386/centos:7', ARCH: "x86_64"}, + {NAME: 'centos:8', ARCH: "x86_64"}, {NAME: 'i386/centos:7', ARCH: "i386"}, + {NAME: 'i386/centos:8', ARCH: "i386"}, {NAME: 'redhat/ubi8:latest', ARCH: "x86_64"}, {NAME: 'redhat/ubi9:latest', ARCH: "x86_64"}] type: [agent, manager] From 32e2f1e1239cfe0425af468287e491eeb552e35f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 15:37:18 +0100 Subject: [PATCH 121/328] Fixes for the install and enable test for both rpm and deb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-deb.yml | 4 ++-- .github/workflows/test-install-and-enable-rpm.yml | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index d7a6827707..9df52375b1 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -23,12 +23,12 @@ jobs: - name: Setup directories and variables run: | VERSION=$(cat $GITHUB_WORKSPACE/VERSION) - echo "PACKAGE_NAME=wazuh-${{ matrix.type }}-$VERSION-test.${{ matrix.arch }}.rpm" >> $GITHUB_ENV + echo "PACKAGE_NAME=wazuh-${{ matrix.type }}-$VERSION-test.${{ matrix.arch }}.deb" >> $GITHUB_ENV - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} uses: dawidd6/action-download-artifact@v2 with: - workflow: build-rpm-packages.yml + workflow: build-deb-packages.yml workflow_conclusion: success name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index ca5e9acfcf..f2b9f54874 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -15,7 +15,6 @@ jobs: {NAME: 'centos:7', ARCH: "x86_64"}, {NAME: 'centos:8', ARCH: "x86_64"}, {NAME: 'i386/centos:7', ARCH: "i386"}, - {NAME: 'i386/centos:8', ARCH: "i386"}, {NAME: 'redhat/ubi8:latest', ARCH: "x86_64"}, {NAME: 'redhat/ubi9:latest', ARCH: "x86_64"}] type: [agent, manager] From 080e1d927d4f710d43c33d95f13df15e8e592098 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 15:48:02 +0100 Subject: [PATCH 122/328] Architecture fixes in install and enable test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 3 --- .github/workflows/build-rpm-packages.yml | 3 --- .github/workflows/test-install-and-enable-deb.yml | 2 +- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index aaa5024ca0..d667353d45 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -22,9 +22,6 @@ jobs: steps: - uses: actions/checkout@v3 - - id: skip_check - uses: fkirc/skip-duplicate-actions@master - - name: Get changed files uses: dorny/paths-filter@v2 id: changes diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index ccf195fe2a..f9a2dad486 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -22,9 +22,6 @@ jobs: steps: - uses: actions/checkout@v3 - - id: skip_check - uses: fkirc/skip-duplicate-actions@master - - name: Get changed files uses: dorny/paths-filter@v2 id: changes diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index 9df52375b1..5d755d58ff 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -10,7 +10,7 @@ jobs: matrix: distro_name: ['ubuntu:xenial', 'ubuntu:bionic', 'ubuntu:focal', 'ubuntu:jammy', 'debian:stretch', 'debian:buster', 'debian:bullseye', 'amazonlinux:2'] type: [agent, manager] - arch: [x86_64, i386] + arch: [amd64, i386] exclude: - distro_name: amazonlinux:2 arch: i386 From 96a16e172ad4cb529078ffcf71b4f2329f482100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 15:53:49 +0100 Subject: [PATCH 123/328] Change amazon linux from deb to rpm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-deb.yml | 4 +--- .github/workflows/test-install-and-enable-rpm.yml | 3 ++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index 5d755d58ff..4dfbfb59f8 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -8,12 +8,10 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - distro_name: ['ubuntu:xenial', 'ubuntu:bionic', 'ubuntu:focal', 'ubuntu:jammy', 'debian:stretch', 'debian:buster', 'debian:bullseye', 'amazonlinux:2'] + distro_name: ['ubuntu:xenial', 'ubuntu:bionic', 'ubuntu:focal', 'ubuntu:jammy', 'debian:stretch', 'debian:buster', 'debian:bullseye'] type: [agent, manager] arch: [amd64, i386] exclude: - - distro_name: amazonlinux:2 - arch: i386 - type: manager arch: i386 fail-fast: false diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index f2b9f54874..982128ca9d 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -16,7 +16,8 @@ jobs: {NAME: 'centos:8', ARCH: "x86_64"}, {NAME: 'i386/centos:7', ARCH: "i386"}, {NAME: 'redhat/ubi8:latest', ARCH: "x86_64"}, - {NAME: 'redhat/ubi9:latest', ARCH: "x86_64"}] + {NAME: 'redhat/ubi9:latest', ARCH: "x86_64"}, + {NAME: 'amazonlinux:2', ARCH: "x86_64"}] type: [agent, manager] exclude: - system: {ARCH: "i386"} From 4a92498fc92177316cc63a79b12f02fe4bcedc19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 16:03:10 +0100 Subject: [PATCH 124/328] Fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-deb.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index 4dfbfb59f8..c07171ec87 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -21,7 +21,7 @@ jobs: - name: Setup directories and variables run: | VERSION=$(cat $GITHUB_WORKSPACE/VERSION) - echo "PACKAGE_NAME=wazuh-${{ matrix.type }}-$VERSION-test.${{ matrix.arch }}.deb" >> $GITHUB_ENV + echo "PACKAGE_NAME=wazuh-${{ matrix.type }}-$VERSION-test_${{ matrix.arch }}.deb" >> $GITHUB_ENV - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} uses: dawidd6/action-download-artifact@v2 From 887f670fbae9f72c56b10ce28e1f4386a80a368b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 16:16:05 +0100 Subject: [PATCH 125/328] Fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-deb.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index c07171ec87..f420426453 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -21,7 +21,7 @@ jobs: - name: Setup directories and variables run: | VERSION=$(cat $GITHUB_WORKSPACE/VERSION) - echo "PACKAGE_NAME=wazuh-${{ matrix.type }}-$VERSION-test_${{ matrix.arch }}.deb" >> $GITHUB_ENV + echo "PACKAGE_NAME=wazuh-${{ matrix.type }}_$VERSION-test_${{ matrix.arch }}.deb" >> $GITHUB_ENV - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} uses: dawidd6/action-download-artifact@v2 From 50b5e27d12c369fe5d5db872d0d1e24efec20294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 16:58:22 +0100 Subject: [PATCH 126/328] Update apt repos before installing the package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/actions/test-install-enable/install_and_enable.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/actions/test-install-enable/install_and_enable.sh b/.github/actions/test-install-enable/install_and_enable.sh index 2c895e26d0..22d31dd041 100644 --- a/.github/actions/test-install-enable/install_and_enable.sh +++ b/.github/actions/test-install-enable/install_and_enable.sh @@ -9,10 +9,9 @@ fi if [ -n "$(command -v yum)" ]; then sys_type="yum" - sep="-" elif [ -n "$(command -v apt-get)" ]; then sys_type="apt-get" - sep="=" + apt-get update else common_logger -e "Couldn'd find type of system" exit 1 From 82c4953646079c554c201d03421b38dd5659879a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 17:21:14 +0100 Subject: [PATCH 127/328] Install systemd on DEB systems MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/actions/test-install-enable/install_and_enable.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/test-install-enable/install_and_enable.sh b/.github/actions/test-install-enable/install_and_enable.sh index 22d31dd041..ed82e33ada 100644 --- a/.github/actions/test-install-enable/install_and_enable.sh +++ b/.github/actions/test-install-enable/install_and_enable.sh @@ -12,6 +12,7 @@ if [ -n "$(command -v yum)" ]; then elif [ -n "$(command -v apt-get)" ]; then sys_type="apt-get" apt-get update + apt-get install -y systemd else common_logger -e "Couldn'd find type of system" exit 1 From 23ad40755fc825c37daa8aaf4cf670a6df225c76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 17:34:09 +0100 Subject: [PATCH 128/328] DEB docker add architecture MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-deb.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index f420426453..80090c423a 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -38,4 +38,4 @@ jobs: mv ${{env.PACKAGE_NAME}} $GITHUB_WORKSPACE/packages - name: Launch docker - run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-install-enable/:/tests -v $GITHUB_WORKSPACE/packages/:/packages ${{ matrix.distro_name }} bash /tests/install_and_enable.sh $PACKAGE_NAME ${{ matrix.type }} \ No newline at end of file + run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-install-enable/:/tests -v $GITHUB_WORKSPACE/packages/:/packages ${{ matrix.arch }}/${{ matrix.distro_name }} bash /tests/install_and_enable.sh $PACKAGE_NAME ${{ matrix.type }} \ No newline at end of file From 7ce0a3c2b80f052c493275c5b7bb38e98478e88c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 30 Jan 2023 17:44:43 +0100 Subject: [PATCH 129/328] Remove distro combination ubuntu:jammy with i386 architecture MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-deb.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index 80090c423a..605e1397de 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -14,6 +14,8 @@ jobs: exclude: - type: manager arch: i386 + - distro_name: 'ubuntu:jammy' + arch: i386 fail-fast: false steps: - uses: actions/checkout@v3 From 527f94f3baf42ff6413c74725b9d249e655ea3bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 31 Jan 2023 09:29:35 +0100 Subject: [PATCH 130/328] Change revision of packages for the name of the branch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 3 ++- .github/workflows/build-rpm-packages.yml | 3 ++- .github/workflows/test-install-and-enable-deb.yml | 3 ++- .github/workflows/test-install-and-enable-rpm.yml | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index d667353d45..7e41f948b9 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -46,7 +46,8 @@ jobs: - name: Build the ${{ matrix.ARCHITECTURE }} deb Wazuh ${{ matrix.TYPE }} package working-directory: ./debs run: | - bash generate_debian_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} -r test + REVISION="${{ github.ref }}" + bash generate_debian_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} -r REVISION echo "PACKAGE_NAME=$(ls ./output | grep .deb | head -n 1)" >> $GITHUB_ENV - name: Upload Wazuh ${{ matrix.TYPE }} ${{ matrix.ARCHITECTURE }} package as artifact diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index f9a2dad486..8bc939f95c 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -46,7 +46,8 @@ jobs: - name: Build the ${{ matrix.ARCHITECTURE }} rpm Wazuh ${{ matrix.TYPE }} package working-directory: ./rpms run: | - bash generate_rpm_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} -r test + REVISION="${{ github.ref }}" + bash generate_rpm_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} -r REVISION echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV - name: Upload Wazuh ${{ matrix.TYPE }} ${{ matrix.ARCHITECTURE }} package as artifact diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index 605e1397de..f0e6670d2b 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -23,7 +23,8 @@ jobs: - name: Setup directories and variables run: | VERSION=$(cat $GITHUB_WORKSPACE/VERSION) - echo "PACKAGE_NAME=wazuh-${{ matrix.type }}_$VERSION-test_${{ matrix.arch }}.deb" >> $GITHUB_ENV + REVISION="${{ github.ref }}" + echo "PACKAGE_NAME=wazuh-${{ matrix.type }}_$VERSION-$REVISION_${{ matrix.arch }}.deb" >> $GITHUB_ENV - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} uses: dawidd6/action-download-artifact@v2 diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 982128ca9d..c1a32ee6cf 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -29,7 +29,8 @@ jobs: - name: Setup directories and variables run: | VERSION=$(cat $GITHUB_WORKSPACE/VERSION) - echo "PACKAGE_NAME=wazuh-${{ matrix.type }}-$VERSION-test.${{matrix.system.ARCH}}.rpm" >> $GITHUB_ENV + REVISION="${{ github.ref }}" + echo "PACKAGE_NAME=wazuh-${{ matrix.type }}-$VERSION-$REVISION.${{matrix.system.ARCH}}.rpm" >> $GITHUB_ENV - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} uses: dawidd6/action-download-artifact@v2 From d35caa5bbf18848066dfa4f3ba7091181771270b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 31 Jan 2023 09:51:18 +0100 Subject: [PATCH 131/328] Change package revision name and add step to retry artifact uri MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 4 ++-- .github/workflows/build-rpm-packages.yml | 6 ++++-- .github/workflows/test-install-and-enable-deb.yml | 13 +++++++++++-- .github/workflows/test-install-and-enable-rpm.yml | 11 ++++++++++- 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index 7e41f948b9..2c3902d83c 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -46,8 +46,8 @@ jobs: - name: Build the ${{ matrix.ARCHITECTURE }} deb Wazuh ${{ matrix.TYPE }} package working-directory: ./debs run: | - REVISION="${{ github.ref }}" - bash generate_debian_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} -r REVISION + REVISION="${{ github.head_ref }}" + bash generate_debian_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} -r $REVISION echo "PACKAGE_NAME=$(ls ./output | grep .deb | head -n 1)" >> $GITHUB_ENV - name: Upload Wazuh ${{ matrix.TYPE }} ${{ matrix.ARCHITECTURE }} package as artifact diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 8bc939f95c..a039b0db7d 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -6,6 +6,8 @@ on: - 'rpms/generate_rpm_package.sh' workflow_dispatch: workflow_call: + input: + jobs: Wazuh-agent-rpm-package-builds: @@ -46,8 +48,8 @@ jobs: - name: Build the ${{ matrix.ARCHITECTURE }} rpm Wazuh ${{ matrix.TYPE }} package working-directory: ./rpms run: | - REVISION="${{ github.ref }}" - bash generate_rpm_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} -r REVISION + REVISION="${{ github.head_ref }}" + bash generate_rpm_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} -r $REVISION echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV - name: Upload Wazuh ${{ matrix.TYPE }} ${{ matrix.ARCHITECTURE }} package as artifact diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index f0e6670d2b..6be79486c6 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -23,10 +23,20 @@ jobs: - name: Setup directories and variables run: | VERSION=$(cat $GITHUB_WORKSPACE/VERSION) - REVISION="${{ github.ref }}" + REVISION="${{ github.head_ref }}" echo "PACKAGE_NAME=wazuh-${{ matrix.type }}_$VERSION-$REVISION_${{ matrix.arch }}.deb" >> $GITHUB_ENV - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} + id: download_package + uses: dawidd6/action-download-artifact@v2 + with: + workflow: build-deb-packages.yml + workflow_conclusion: success + name: ${{env.PACKAGE_NAME}} + if_no_artifact_found: warn + + - name: Try again to download execution timetable from the last workflow if failed + if: ${{ always() && steps.download_package.outcome == 'failure' }} uses: dawidd6/action-download-artifact@v2 with: workflow: build-deb-packages.yml @@ -34,7 +44,6 @@ jobs: name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail - - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} to the packages directory run: | mkdir $GITHUB_WORKSPACE/packages diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index c1a32ee6cf..cf3246c06e 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -29,10 +29,11 @@ jobs: - name: Setup directories and variables run: | VERSION=$(cat $GITHUB_WORKSPACE/VERSION) - REVISION="${{ github.ref }}" + REVISION="${{ github.head_ref }}" echo "PACKAGE_NAME=wazuh-${{ matrix.type }}-$VERSION-$REVISION.${{matrix.system.ARCH}}.rpm" >> $GITHUB_ENV - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} + id: download_package uses: dawidd6/action-download-artifact@v2 with: workflow: build-rpm-packages.yml @@ -40,6 +41,14 @@ jobs: name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail + - name: Try again to download execution timetable from the last workflow if failed + if: ${{ always() && steps.download_package.outcome == 'failure' }} + uses: dawidd6/action-download-artifact@v2 + with: + workflow: build-rpm-packages.yml + workflow_conclusion: success + name: ${{env.PACKAGE_NAME}} + if_no_artifact_found: fail - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} to the packages directory run: | From 642237ff649b92ed7aabc7317d401438b8c16aea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 31 Jan 2023 09:52:58 +0100 Subject: [PATCH 132/328] Remove unnecessary input: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-rpm-packages.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index a039b0db7d..7513d8dee2 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -6,7 +6,6 @@ on: - 'rpms/generate_rpm_package.sh' workflow_dispatch: workflow_call: - input: jobs: From 18b46714ccdde3eb9b01637f2d229d114062b8c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 31 Jan 2023 10:14:51 +0100 Subject: [PATCH 133/328] Remove hyphen for revision in rpm and debug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-rpm-packages.yml | 2 +- .github/workflows/test-install-and-enable-deb.yml | 1 + .github/workflows/test-install-and-enable-rpm.yml | 5 +++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 7513d8dee2..4a0691926c 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -47,7 +47,7 @@ jobs: - name: Build the ${{ matrix.ARCHITECTURE }} rpm Wazuh ${{ matrix.TYPE }} package working-directory: ./rpms run: | - REVISION="${{ github.head_ref }}" + REVISION=$( echo ${{ github.head_ref }} | sed 's/-/./g' ) bash generate_rpm_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} -r $REVISION echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index 6be79486c6..663fa1d188 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -25,6 +25,7 @@ jobs: VERSION=$(cat $GITHUB_WORKSPACE/VERSION) REVISION="${{ github.head_ref }}" echo "PACKAGE_NAME=wazuh-${{ matrix.type }}_$VERSION-$REVISION_${{ matrix.arch }}.deb" >> $GITHUB_ENV + cat $GITHUB_ENV - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} id: download_package diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index cf3246c06e..06c4d3f136 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -29,8 +29,9 @@ jobs: - name: Setup directories and variables run: | VERSION=$(cat $GITHUB_WORKSPACE/VERSION) - REVISION="${{ github.head_ref }}" + REVISION=$( echo ${{ github.head_ref }} | sed 's/-/./g' ) echo "PACKAGE_NAME=wazuh-${{ matrix.type }}-$VERSION-$REVISION.${{matrix.system.ARCH}}.rpm" >> $GITHUB_ENV + cat $GITHUB_ENV - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} id: download_package @@ -39,7 +40,7 @@ jobs: workflow: build-rpm-packages.yml workflow_conclusion: success name: ${{env.PACKAGE_NAME}} - if_no_artifact_found: fail + if_no_artifact_found: warn - name: Try again to download execution timetable from the last workflow if failed if: ${{ always() && steps.download_package.outcome == 'failure' }} From 051171da8cd435489aa4ecd9f73f5ba448b7a720 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 31 Jan 2023 10:27:02 +0100 Subject: [PATCH 134/328] Change the workflow conclusion neccessary to download the artifact to in_progress MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-deb.yml | 6 +++--- .github/workflows/test-install-and-enable-rpm.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index 663fa1d188..f22235e6db 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -32,16 +32,16 @@ jobs: uses: dawidd6/action-download-artifact@v2 with: workflow: build-deb-packages.yml - workflow_conclusion: success + workflow_conclusion: in_progress name: ${{env.PACKAGE_NAME}} - if_no_artifact_found: warn + if_no_artifact_found: fail - name: Try again to download execution timetable from the last workflow if failed if: ${{ always() && steps.download_package.outcome == 'failure' }} uses: dawidd6/action-download-artifact@v2 with: workflow: build-deb-packages.yml - workflow_conclusion: success + workflow_conclusion: in_progress name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 06c4d3f136..8c83422534 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -38,16 +38,16 @@ jobs: uses: dawidd6/action-download-artifact@v2 with: workflow: build-rpm-packages.yml - workflow_conclusion: success + workflow_conclusion: in_progress name: ${{env.PACKAGE_NAME}} - if_no_artifact_found: warn + if_no_artifact_found: fail - name: Try again to download execution timetable from the last workflow if failed if: ${{ always() && steps.download_package.outcome == 'failure' }} uses: dawidd6/action-download-artifact@v2 with: workflow: build-rpm-packages.yml - workflow_conclusion: success + workflow_conclusion: in_progress name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail From 0a42059f258b78c712f314e1c468465a1e6a1bfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 31 Jan 2023 10:52:58 +0100 Subject: [PATCH 135/328] Change way to retry down,load of artifact MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../workflows/test-install-and-enable-deb.yml | 28 ++++++++----------- .../workflows/test-install-and-enable-rpm.yml | 26 +++++++---------- 2 files changed, 21 insertions(+), 33 deletions(-) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index f22235e6db..43365d27a7 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -23,27 +23,21 @@ jobs: - name: Setup directories and variables run: | VERSION=$(cat $GITHUB_WORKSPACE/VERSION) - REVISION="${{ github.head_ref }}" + REVISION=${{ github.head_ref }} echo "PACKAGE_NAME=wazuh-${{ matrix.type }}_$VERSION-$REVISION_${{ matrix.arch }}.deb" >> $GITHUB_ENV cat $GITHUB_ENV - - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} - id: download_package - uses: dawidd6/action-download-artifact@v2 + - uses: Wandalen/wretry.action@master + name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} with: - workflow: build-deb-packages.yml - workflow_conclusion: in_progress - name: ${{env.PACKAGE_NAME}} - if_no_artifact_found: fail - - - name: Try again to download execution timetable from the last workflow if failed - if: ${{ always() && steps.download_package.outcome == 'failure' }} - uses: dawidd6/action-download-artifact@v2 - with: - workflow: build-deb-packages.yml - workflow_conclusion: in_progress - name: ${{env.PACKAGE_NAME}} - if_no_artifact_found: fail + action: dawidd6/action-download-artifact@v2 + with: | + workflow: build-deb-packages.yml + workflow_conclusion: in_progress + name: ${{env.PACKAGE_NAME}} + if_no_artifact_found: fail + attempt_limit: 3 + attempt_delay: 2000 - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} to the packages directory run: | diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 8c83422534..d73ceeb078 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -33,23 +33,17 @@ jobs: echo "PACKAGE_NAME=wazuh-${{ matrix.type }}-$VERSION-$REVISION.${{matrix.system.ARCH}}.rpm" >> $GITHUB_ENV cat $GITHUB_ENV - - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} - id: download_package - uses: dawidd6/action-download-artifact@v2 + - uses: Wandalen/wretry.action@master + name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} with: - workflow: build-rpm-packages.yml - workflow_conclusion: in_progress - name: ${{env.PACKAGE_NAME}} - if_no_artifact_found: fail - - - name: Try again to download execution timetable from the last workflow if failed - if: ${{ always() && steps.download_package.outcome == 'failure' }} - uses: dawidd6/action-download-artifact@v2 - with: - workflow: build-rpm-packages.yml - workflow_conclusion: in_progress - name: ${{env.PACKAGE_NAME}} - if_no_artifact_found: fail + action: dawidd6/action-download-artifact@v2 + with: | + workflow: build-rpm-packages.yml + workflow_conclusion: in_progress + name: ${{env.PACKAGE_NAME}} + if_no_artifact_found: fail + attempt_limit: 3 + attempt_delay: 2000 - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} to the packages directory run: | From f70e5598eb2ebad263483a5534d267216f8c4884 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 31 Jan 2023 11:06:10 +0100 Subject: [PATCH 136/328] Increase timeout to download artifact MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-deb.yml | 6 +++--- .github/workflows/test-install-and-enable-rpm.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index 43365d27a7..fcedd892f1 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -23,7 +23,7 @@ jobs: - name: Setup directories and variables run: | VERSION=$(cat $GITHUB_WORKSPACE/VERSION) - REVISION=${{ github.head_ref }} + REVISION=$( echo ${{ github.head_ref }}) echo "PACKAGE_NAME=wazuh-${{ matrix.type }}_$VERSION-$REVISION_${{ matrix.arch }}.deb" >> $GITHUB_ENV cat $GITHUB_ENV @@ -36,8 +36,8 @@ jobs: workflow_conclusion: in_progress name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail - attempt_limit: 3 - attempt_delay: 2000 + attempt_limit: 15 + attempt_delay: 20000 - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} to the packages directory run: | diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index d73ceeb078..8a1b9035a5 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -42,8 +42,8 @@ jobs: workflow_conclusion: in_progress name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail - attempt_limit: 3 - attempt_delay: 2000 + attempt_limit: 15 + attempt_delay: 20000 - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} to the packages directory run: | From 9eb370be1af93929dd0c3ec5a8a80eb20b4e299f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 31 Jan 2023 11:28:03 +0100 Subject: [PATCH 137/328] Search for artifact with commit sha instead of workflow name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-deb.yml | 7 +++---- .github/workflows/test-install-and-enable-rpm.yml | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index fcedd892f1..56770a38ab 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -24,7 +24,7 @@ jobs: run: | VERSION=$(cat $GITHUB_WORKSPACE/VERSION) REVISION=$( echo ${{ github.head_ref }}) - echo "PACKAGE_NAME=wazuh-${{ matrix.type }}_$VERSION-$REVISION_${{ matrix.arch }}.deb" >> $GITHUB_ENV + echo "PACKAGE_NAME=wazuh-${{ matrix.type }}_${VERSION}-${REVISION_}${{ matrix.arch }}.deb" >> $GITHUB_ENV cat $GITHUB_ENV - uses: Wandalen/wretry.action@master @@ -32,12 +32,11 @@ jobs: with: action: dawidd6/action-download-artifact@v2 with: | - workflow: build-deb-packages.yml - workflow_conclusion: in_progress + commit: ${{ github.sha }} name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail attempt_limit: 15 - attempt_delay: 20000 + attempt_delay: 60000 - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} to the packages directory run: | diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 8a1b9035a5..41d259a35b 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -30,7 +30,7 @@ jobs: run: | VERSION=$(cat $GITHUB_WORKSPACE/VERSION) REVISION=$( echo ${{ github.head_ref }} | sed 's/-/./g' ) - echo "PACKAGE_NAME=wazuh-${{ matrix.type }}-$VERSION-$REVISION.${{matrix.system.ARCH}}.rpm" >> $GITHUB_ENV + echo "PACKAGE_NAME=wazuh-${{ matrix.type }}-${VERSION}-${REVISION}.${{matrix.system.ARCH}}.rpm" >> $GITHUB_ENV cat $GITHUB_ENV - uses: Wandalen/wretry.action@master @@ -39,11 +39,11 @@ jobs: action: dawidd6/action-download-artifact@v2 with: | workflow: build-rpm-packages.yml - workflow_conclusion: in_progress + commit: ${{ github.sha }} name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail attempt_limit: 15 - attempt_delay: 20000 + attempt_delay: 60000 - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} to the packages directory run: | From 58f5b3f476a6d669b8be9e7808702a61942eb68f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 31 Jan 2023 11:51:19 +0100 Subject: [PATCH 138/328] Search for artifacts with branch instead of commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-deb.yml | 6 +++--- .github/workflows/test-install-and-enable-rpm.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index 56770a38ab..950f06761a 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -24,7 +24,7 @@ jobs: run: | VERSION=$(cat $GITHUB_WORKSPACE/VERSION) REVISION=$( echo ${{ github.head_ref }}) - echo "PACKAGE_NAME=wazuh-${{ matrix.type }}_${VERSION}-${REVISION_}${{ matrix.arch }}.deb" >> $GITHUB_ENV + echo "PACKAGE_NAME=wazuh-${{ matrix.type }}_${VERSION}-${REVISION}_${{ matrix.arch }}.deb" >> $GITHUB_ENV cat $GITHUB_ENV - uses: Wandalen/wretry.action@master @@ -32,10 +32,10 @@ jobs: with: action: dawidd6/action-download-artifact@v2 with: | - commit: ${{ github.sha }} + branch: ${{ github.head_ref }} name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail - attempt_limit: 15 + attempt_limit: 3 attempt_delay: 60000 - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} to the packages directory diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 41d259a35b..402f838a0b 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -39,10 +39,10 @@ jobs: action: dawidd6/action-download-artifact@v2 with: | workflow: build-rpm-packages.yml - commit: ${{ github.sha }} + branch: ${{ github.head_ref }} name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail - attempt_limit: 15 + attempt_limit: 3 attempt_delay: 60000 - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} to the packages directory From 03c9f25764cc520320a1cced0b647cd10a13ad92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 31 Jan 2023 12:03:29 +0100 Subject: [PATCH 139/328] Check artifact with workflow name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-deb.yml | 8 ++++---- .github/workflows/test-install-and-enable-rpm.yml | 7 +++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index 950f06761a..23c27d0584 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -25,18 +25,18 @@ jobs: VERSION=$(cat $GITHUB_WORKSPACE/VERSION) REVISION=$( echo ${{ github.head_ref }}) echo "PACKAGE_NAME=wazuh-${{ matrix.type }}_${VERSION}-${REVISION}_${{ matrix.arch }}.deb" >> $GITHUB_ENV - cat $GITHUB_ENV - uses: Wandalen/wretry.action@master name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} with: action: dawidd6/action-download-artifact@v2 with: | - branch: ${{ github.head_ref }} + workflow: build-deb-packages.yml + workflow_conclusion: in_progress name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail - attempt_limit: 3 - attempt_delay: 60000 + attempt_limit: 5 + attempt_delay: 40000 - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} to the packages directory run: | diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 402f838a0b..5a2ae29de2 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -31,7 +31,6 @@ jobs: VERSION=$(cat $GITHUB_WORKSPACE/VERSION) REVISION=$( echo ${{ github.head_ref }} | sed 's/-/./g' ) echo "PACKAGE_NAME=wazuh-${{ matrix.type }}-${VERSION}-${REVISION}.${{matrix.system.ARCH}}.rpm" >> $GITHUB_ENV - cat $GITHUB_ENV - uses: Wandalen/wretry.action@master name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} @@ -39,11 +38,11 @@ jobs: action: dawidd6/action-download-artifact@v2 with: | workflow: build-rpm-packages.yml - branch: ${{ github.head_ref }} + workflow_conclusion: in_progress name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail - attempt_limit: 3 - attempt_delay: 60000 + attempt_limit: 5 + attempt_delay: 40000 - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} to the packages directory run: | From e711c1b1cc0f42ba1bfdc5157545209e747735a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 31 Jan 2023 12:13:25 +0100 Subject: [PATCH 140/328] Remove space in Clean runs workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/clean-worflow-runs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/clean-worflow-runs.yml b/.github/workflows/clean-worflow-runs.yml index 78a169eebb..3bff57e301 100644 --- a/.github/workflows/clean-worflow-runs.yml +++ b/.github/workflows/clean-worflow-runs.yml @@ -1,5 +1,5 @@ name: Clean workflow runs -on: +on: workflow_dispatch: schedule: - cron: '0 0 * * 1' From 55978faf93d08ae5c4906984af7efdb246f70c57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 31 Jan 2023 12:15:02 +0100 Subject: [PATCH 141/328] Call to clean workflow runs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/clean-worflow-runs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/clean-worflow-runs.yml b/.github/workflows/clean-worflow-runs.yml index 3bff57e301..92a4986d05 100644 --- a/.github/workflows/clean-worflow-runs.yml +++ b/.github/workflows/clean-worflow-runs.yml @@ -5,6 +5,8 @@ on: - cron: '0 0 * * 1' pull_request: paths: + - 'rpms/SPECS/*' + - 'rpms/generate_rpm_package.sh' - '.github/workflows/clean-workflow-runs.yml' jobs: From a59e82883804d916654593c1432be8b2fc2b9be4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 31 Jan 2023 12:32:49 +0100 Subject: [PATCH 142/328] Remove pull_requests call to Clean runs workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/clean-worflow-runs.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/clean-worflow-runs.yml b/.github/workflows/clean-worflow-runs.yml index 92a4986d05..4dd935097c 100644 --- a/.github/workflows/clean-worflow-runs.yml +++ b/.github/workflows/clean-worflow-runs.yml @@ -3,11 +3,6 @@ on: workflow_dispatch: schedule: - cron: '0 0 * * 1' - pull_request: - paths: - - 'rpms/SPECS/*' - - 'rpms/generate_rpm_package.sh' - - '.github/workflows/clean-workflow-runs.yml' jobs: Clean-runs: From 5773cfbf658f0f4a6b434afb5b774e8911dd3b01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 31 Jan 2023 12:52:07 +0100 Subject: [PATCH 143/328] Check if artifact is available in the building package workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-rpm-packages.yml | 9 +++++++++ .github/workflows/test-install-and-enable-deb.yml | 3 +-- .github/workflows/test-install-and-enable-rpm.yml | 3 +-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 4a0691926c..1d8c15f751 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -58,6 +58,15 @@ jobs: path: ${{github.workspace}}/rpms/output/${{ env.PACKAGE_NAME }} if-no-files-found: error + - uses: Wandalen/wretry.action@master + name: Check if artifact is uploaded + with: + action: xSAVIKx/artifact-exists-action@v0 + with: | + name: ${{env.PACKAGE_NAME}} + attempt_limit: 5 + attempt_delay: 40000 + Test-install-packages-rpm: needs: Wazuh-agent-rpm-package-builds uses: ./.github/workflows/test-install-and-enable-rpm.yml diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index 23c27d0584..93cfb333f1 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -31,10 +31,9 @@ jobs: with: action: dawidd6/action-download-artifact@v2 with: | - workflow: build-deb-packages.yml - workflow_conclusion: in_progress name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail + check_artifacts: true attempt_limit: 5 attempt_delay: 40000 diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 5a2ae29de2..0ecd3381d8 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -37,10 +37,9 @@ jobs: with: action: dawidd6/action-download-artifact@v2 with: | - workflow: build-rpm-packages.yml - workflow_conclusion: in_progress name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail + check_artifacts: true attempt_limit: 5 attempt_delay: 40000 From 6deda0c0a875700c9264b9f47426ec7518cbd60a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 31 Jan 2023 13:06:51 +0100 Subject: [PATCH 144/328] Change action to download artifact MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-deb.yml | 4 +--- .github/workflows/test-install-and-enable-rpm.yml | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index 93cfb333f1..4de4fda7c9 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -29,11 +29,9 @@ jobs: - uses: Wandalen/wretry.action@master name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} with: - action: dawidd6/action-download-artifact@v2 + action: aochmann/actions-download-artifact@1.0.0 with: | name: ${{env.PACKAGE_NAME}} - if_no_artifact_found: fail - check_artifacts: true attempt_limit: 5 attempt_delay: 40000 diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 0ecd3381d8..b2dc0f2dd6 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -35,11 +35,9 @@ jobs: - uses: Wandalen/wretry.action@master name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} with: - action: dawidd6/action-download-artifact@v2 + action: aochmann/actions-download-artifact@1.0.0 with: | name: ${{env.PACKAGE_NAME}} - if_no_artifact_found: fail - check_artifacts: true attempt_limit: 5 attempt_delay: 40000 From 02ca40966330237f4b1928afd952046986905a1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 31 Jan 2023 13:33:02 +0100 Subject: [PATCH 145/328] Go back to previous artifact download action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-deb.yml | 4 +++- .github/workflows/test-install-and-enable-rpm.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index 4de4fda7c9..93cfb333f1 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -29,9 +29,11 @@ jobs: - uses: Wandalen/wretry.action@master name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} with: - action: aochmann/actions-download-artifact@1.0.0 + action: dawidd6/action-download-artifact@v2 with: | name: ${{env.PACKAGE_NAME}} + if_no_artifact_found: fail + check_artifacts: true attempt_limit: 5 attempt_delay: 40000 diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index b2dc0f2dd6..0ecd3381d8 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -35,9 +35,11 @@ jobs: - uses: Wandalen/wretry.action@master name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} with: - action: aochmann/actions-download-artifact@1.0.0 + action: dawidd6/action-download-artifact@v2 with: | name: ${{env.PACKAGE_NAME}} + if_no_artifact_found: fail + check_artifacts: true attempt_limit: 5 attempt_delay: 40000 From c713ab2280ebd093596fcadbed99c16f6ac65f93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 31 Jan 2023 13:34:10 +0100 Subject: [PATCH 146/328] Test downloading artifact from the building package workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-rpm-packages.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 1d8c15f751..23b39ab4eb 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -67,6 +67,13 @@ jobs: attempt_limit: 5 attempt_delay: 40000 + - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} + uses: dawidd6/action-download-artifact@v2 + with: + name: ${{env.PACKAGE_NAME}} + if_no_artifact_found: fail + check_artifacts: true + Test-install-packages-rpm: needs: Wazuh-agent-rpm-package-builds uses: ./.github/workflows/test-install-and-enable-rpm.yml From be6c7e44b99d4ee902c9c0a0daf23a854540e348 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 31 Jan 2023 13:43:49 +0100 Subject: [PATCH 147/328] Debug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-rpm-packages.yml | 14 +++++++++----- .github/workflows/test-install-and-enable-deb.yml | 12 +++++++++++- .github/workflows/test-install-and-enable-rpm.yml | 3 ++- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 23b39ab4eb..b70ed2b828 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -67,12 +67,16 @@ jobs: attempt_limit: 5 attempt_delay: 40000 - - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} - uses: dawidd6/action-download-artifact@v2 + - uses: Wandalen/wretry.action@master + name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} with: - name: ${{env.PACKAGE_NAME}} - if_no_artifact_found: fail - check_artifacts: true + action: dawidd6/action-download-artifact@v2 + with: | + name: ${{env.PACKAGE_NAME}} + if_no_artifact_found: fail + check_artifacts: true + attempt_limit: 5 + attempt_delay: 40000 Test-install-packages-rpm: needs: Wazuh-agent-rpm-package-builds diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index 93cfb333f1..3fe68b273c 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -26,14 +26,24 @@ jobs: REVISION=$( echo ${{ github.head_ref }}) echo "PACKAGE_NAME=wazuh-${{ matrix.type }}_${VERSION}-${REVISION}_${{ matrix.arch }}.deb" >> $GITHUB_ENV + - uses: Wandalen/wretry.action@master + name: Check if artifact is uploaded + with: + action: xSAVIKx/artifact-exists-action@v0 + with: | + name: ${{env.PACKAGE_NAME}} + attempt_limit: 5 + attempt_delay: 40000 + - uses: Wandalen/wretry.action@master name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} with: action: dawidd6/action-download-artifact@v2 with: | + workflow: build-deb-packages.yml + workflow_conclusion: in_progress name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail - check_artifacts: true attempt_limit: 5 attempt_delay: 40000 diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 0ecd3381d8..5a2ae29de2 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -37,9 +37,10 @@ jobs: with: action: dawidd6/action-download-artifact@v2 with: | + workflow: build-rpm-packages.yml + workflow_conclusion: in_progress name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail - check_artifacts: true attempt_limit: 5 attempt_delay: 40000 From c19d381098f16563b8ca46505095d9e64384071a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 31 Jan 2023 14:02:15 +0100 Subject: [PATCH 148/328] Add waiting time after uploading artifact MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-rpm-packages.yml | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index b70ed2b828..74068c1e11 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -59,24 +59,9 @@ jobs: if-no-files-found: error - uses: Wandalen/wretry.action@master - name: Check if artifact is uploaded - with: - action: xSAVIKx/artifact-exists-action@v0 - with: | - name: ${{env.PACKAGE_NAME}} - attempt_limit: 5 - attempt_delay: 40000 - - - uses: Wandalen/wretry.action@master - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} - with: - action: dawidd6/action-download-artifact@v2 - with: | - name: ${{env.PACKAGE_NAME}} - if_no_artifact_found: fail - check_artifacts: true - attempt_limit: 5 - attempt_delay: 40000 + name: Wait for the artifact to be uploaded + run: | + sleep 60 Test-install-packages-rpm: needs: Wazuh-agent-rpm-package-builds From f64deed567bbf51849d99059e0767d9ba65cfec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 31 Jan 2023 14:03:11 +0100 Subject: [PATCH 149/328] Fix error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-rpm-packages.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 74068c1e11..aa7fc5b99a 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -58,8 +58,7 @@ jobs: path: ${{github.workspace}}/rpms/output/${{ env.PACKAGE_NAME }} if-no-files-found: error - - uses: Wandalen/wretry.action@master - name: Wait for the artifact to be uploaded + - name: Wait for the artifact to be uploaded run: | sleep 60 From 0cac89f13e0271c791035c8c3fd9fa40f8501f06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 31 Jan 2023 14:21:08 +0100 Subject: [PATCH 150/328] Debugging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-rpm-packages.yml | 4 --- .../workflows/test-install-and-enable-deb.yml | 27 ++++++++----------- .../workflows/test-install-and-enable-rpm.yml | 18 ++++++++----- 3 files changed, 22 insertions(+), 27 deletions(-) diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index aa7fc5b99a..4a0691926c 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -58,10 +58,6 @@ jobs: path: ${{github.workspace}}/rpms/output/${{ env.PACKAGE_NAME }} if-no-files-found: error - - name: Wait for the artifact to be uploaded - run: | - sleep 60 - Test-install-packages-rpm: needs: Wazuh-agent-rpm-package-builds uses: ./.github/workflows/test-install-and-enable-rpm.yml diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index 3fe68b273c..a1ae5a830e 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -26,26 +26,21 @@ jobs: REVISION=$( echo ${{ github.head_ref }}) echo "PACKAGE_NAME=wazuh-${{ matrix.type }}_${VERSION}-${REVISION}_${{ matrix.arch }}.deb" >> $GITHUB_ENV - - uses: Wandalen/wretry.action@master - name: Check if artifact is uploaded - with: - action: xSAVIKx/artifact-exists-action@v0 - with: | - name: ${{env.PACKAGE_NAME}} - attempt_limit: 5 - attempt_delay: 40000 - - - uses: Wandalen/wretry.action@master - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} - with: - action: dawidd6/action-download-artifact@v2 - with: | + - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} + id: download-artifact + uses: dawidd6/action-download-artifact@v2 + with: workflow: build-deb-packages.yml workflow_conclusion: in_progress name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail - attempt_limit: 5 - attempt_delay: 40000 + + - name: Retry download if it has failed + if: ${{ always() && steps.download-artifact.outcome == 'failure' }} + uses: dawidd6/action-download-artifact@v2 + with: + name: ${{env.PACKAGE_NAME}} + if_no_artifact_found: fail - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} to the packages directory run: | diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 5a2ae29de2..417155594b 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -32,17 +32,21 @@ jobs: REVISION=$( echo ${{ github.head_ref }} | sed 's/-/./g' ) echo "PACKAGE_NAME=wazuh-${{ matrix.type }}-${VERSION}-${REVISION}.${{matrix.system.ARCH}}.rpm" >> $GITHUB_ENV - - uses: Wandalen/wretry.action@master - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} - with: - action: dawidd6/action-download-artifact@v2 - with: | + - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} + id: download-artifact + uses: dawidd6/action-download-artifact@v2 + with: workflow: build-rpm-packages.yml workflow_conclusion: in_progress name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail - attempt_limit: 5 - attempt_delay: 40000 + + - name: Retry download if it has failed + if: ${{ always() && steps.download-artifact.outcome == 'failure' }} + uses: dawidd6/action-download-artifact@v2 + with: + name: ${{env.PACKAGE_NAME}} + if_no_artifact_found: fail - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} to the packages directory run: | From c30f7f83e8e304b0157ec8bcb5e88c73de49d191 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 31 Jan 2023 14:23:48 +0100 Subject: [PATCH 151/328] Yaml syntax fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../workflows/test-install-and-enable-deb.yml | 16 ++++++++-------- .../workflows/test-install-and-enable-rpm.yml | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index a1ae5a830e..d58cf74aa7 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -29,18 +29,18 @@ jobs: - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} id: download-artifact uses: dawidd6/action-download-artifact@v2 - with: - workflow: build-deb-packages.yml - workflow_conclusion: in_progress - name: ${{env.PACKAGE_NAME}} - if_no_artifact_found: fail + with: + workflow: build-deb-packages.yml + workflow_conclusion: in_progress + name: ${{env.PACKAGE_NAME}} + if_no_artifact_found: fail - name: Retry download if it has failed if: ${{ always() && steps.download-artifact.outcome == 'failure' }} uses: dawidd6/action-download-artifact@v2 - with: - name: ${{env.PACKAGE_NAME}} - if_no_artifact_found: fail + with: + name: ${{env.PACKAGE_NAME}} + if_no_artifact_found: fail - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} to the packages directory run: | diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 417155594b..1f02ce58a5 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -35,18 +35,18 @@ jobs: - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} id: download-artifact uses: dawidd6/action-download-artifact@v2 - with: - workflow: build-rpm-packages.yml - workflow_conclusion: in_progress - name: ${{env.PACKAGE_NAME}} - if_no_artifact_found: fail + with: + workflow: build-rpm-packages.yml + workflow_conclusion: in_progress + name: ${{env.PACKAGE_NAME}} + if_no_artifact_found: fail - name: Retry download if it has failed if: ${{ always() && steps.download-artifact.outcome == 'failure' }} uses: dawidd6/action-download-artifact@v2 - with: - name: ${{env.PACKAGE_NAME}} - if_no_artifact_found: fail + with: + name: ${{env.PACKAGE_NAME}} + if_no_artifact_found: fail - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} to the packages directory run: | From d03c3b5739c302d49233a920fb5d6a6bde64e6ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 31 Jan 2023 14:38:11 +0100 Subject: [PATCH 152/328] Wait for the artifact to be uploaded if download fails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-deb.yml | 5 +++++ .github/workflows/test-install-and-enable-rpm.yml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index d58cf74aa7..aa410807cc 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -35,6 +35,11 @@ jobs: name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail + - name: Wait for the artifact to be uploaded + if: ${{ always() && steps.download-artifact.outcome == 'failure' }} + run: | + sleep 60 + - name: Retry download if it has failed if: ${{ always() && steps.download-artifact.outcome == 'failure' }} uses: dawidd6/action-download-artifact@v2 diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 1f02ce58a5..97a4188f8b 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -41,6 +41,11 @@ jobs: name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail + - name: Wait for the artifact to be uploaded + if: ${{ always() && steps.download-artifact.outcome == 'failure' }} + run: | + sleep 60 + - name: Retry download if it has failed if: ${{ always() && steps.download-artifact.outcome == 'failure' }} uses: dawidd6/action-download-artifact@v2 From 07a3aede9feef06102eece8d29e72524a854b82e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 31 Jan 2023 14:48:00 +0100 Subject: [PATCH 153/328] Add continue_on_error to the install and enable test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 1 + .github/workflows/build-rpm-packages.yml | 1 + .github/workflows/clean-worflow-runs.yml | 3 ++- .github/workflows/test-install-and-enable-deb.yml | 1 + .github/workflows/test-install-and-enable-rpm.yml | 1 + 5 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index 2c3902d83c..1473593062 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -18,6 +18,7 @@ jobs: - TYPE: manager ARCHITECTURE: i386 fail-fast: false + continue-on-error: true steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 4a0691926c..7b2e65a367 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -19,6 +19,7 @@ jobs: - TYPE: manager ARCHITECTURE: i386 fail-fast: false + continue-on-error: true steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/clean-worflow-runs.yml b/.github/workflows/clean-worflow-runs.yml index 4dd935097c..193f83e14a 100644 --- a/.github/workflows/clean-worflow-runs.yml +++ b/.github/workflows/clean-worflow-runs.yml @@ -15,4 +15,5 @@ jobs: run_conclusions: | cancelled skipped - save_period: 10 \ No newline at end of file + timed_out + save_period: 5 \ No newline at end of file diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index aa410807cc..c243466c46 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -17,6 +17,7 @@ jobs: - distro_name: 'ubuntu:jammy' arch: i386 fail-fast: false + continue-on-error: true steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 97a4188f8b..a82432e2fb 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -23,6 +23,7 @@ jobs: - system: {ARCH: "i386"} type: manager fail-fast: false + continue-on-error: true steps: - uses: actions/checkout@v3 From 4abcd8b9dacc887b4e4c49c7b3c8cdf0cb3f64f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 31 Jan 2023 14:50:29 +0100 Subject: [PATCH 154/328] Add continue-on-error to download of artifact MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 1 - .github/workflows/build-rpm-packages.yml | 1 - .github/workflows/test-install-and-enable-deb.yml | 2 +- .github/workflows/test-install-and-enable-rpm.yml | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index 1473593062..2c3902d83c 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -18,7 +18,6 @@ jobs: - TYPE: manager ARCHITECTURE: i386 fail-fast: false - continue-on-error: true steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 7b2e65a367..4a0691926c 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -19,7 +19,6 @@ jobs: - TYPE: manager ARCHITECTURE: i386 fail-fast: false - continue-on-error: true steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index c243466c46..0839030768 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -17,7 +17,6 @@ jobs: - distro_name: 'ubuntu:jammy' arch: i386 fail-fast: false - continue-on-error: true steps: - uses: actions/checkout@v3 @@ -29,6 +28,7 @@ jobs: - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} id: download-artifact + continue-on-error: true uses: dawidd6/action-download-artifact@v2 with: workflow: build-deb-packages.yml diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index a82432e2fb..081f2474c2 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -23,7 +23,6 @@ jobs: - system: {ARCH: "i386"} type: manager fail-fast: false - continue-on-error: true steps: - uses: actions/checkout@v3 @@ -35,6 +34,7 @@ jobs: - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} id: download-artifact + continue-on-error: true uses: dawidd6/action-download-artifact@v2 with: workflow: build-rpm-packages.yml From b9538f1b9652368f29a4bb52126ba8e13603b6da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 31 Jan 2023 15:01:22 +0100 Subject: [PATCH 155/328] Remove unnecessary always() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-deb.yml | 4 ++-- .github/workflows/test-install-and-enable-rpm.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index 0839030768..f81caf4616 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -37,12 +37,12 @@ jobs: if_no_artifact_found: fail - name: Wait for the artifact to be uploaded - if: ${{ always() && steps.download-artifact.outcome == 'failure' }} + if: ${{ steps.download-artifact.outcome == 'failure' }} run: | sleep 60 - name: Retry download if it has failed - if: ${{ always() && steps.download-artifact.outcome == 'failure' }} + if: ${{ steps.download-artifact.outcome == 'failure' }} uses: dawidd6/action-download-artifact@v2 with: name: ${{env.PACKAGE_NAME}} diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 081f2474c2..b655821918 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -43,12 +43,12 @@ jobs: if_no_artifact_found: fail - name: Wait for the artifact to be uploaded - if: ${{ always() && steps.download-artifact.outcome == 'failure' }} + if: ${{ steps.download-artifact.outcome == 'failure' }} run: | sleep 60 - name: Retry download if it has failed - if: ${{ always() && steps.download-artifact.outcome == 'failure' }} + if: ${{ steps.download-artifact.outcome == 'failure' }} uses: dawidd6/action-download-artifact@v2 with: name: ${{env.PACKAGE_NAME}} From 7b1c9b671392d109a58c44f3e6b2c519673a6611 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 31 Jan 2023 15:04:58 +0100 Subject: [PATCH 156/328] Change day cleaning of workflow runs is done MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/clean-worflow-runs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/clean-worflow-runs.yml b/.github/workflows/clean-worflow-runs.yml index 193f83e14a..2ccd7739dd 100644 --- a/.github/workflows/clean-worflow-runs.yml +++ b/.github/workflows/clean-worflow-runs.yml @@ -2,7 +2,7 @@ name: Clean workflow runs on: workflow_dispatch: schedule: - - cron: '0 0 * * 1' + - cron: '0 0 * * Sunday' jobs: Clean-runs: From 791cd81f5033546fd74564f3669d4115efcfa246 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 1 Feb 2023 11:21:29 +0100 Subject: [PATCH 157/328] Syntax fixes for the ghcr pushing and pulling scripts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../build_and_push_image_to_ghcr.sh | 10 ++-------- .../pull_image_from_ghcr.sh | 12 ++++-------- .github/workflows/build-deb-packages.yml | 2 +- .github/workflows/build-rpm-packages.yml | 2 +- .github/workflows/upload-deb-images.yml | 2 +- .github/workflows/upload-rpm-images.yml | 2 +- 6 files changed, 10 insertions(+), 20 deletions(-) rename .github/actions/{common-tools => ghcr-pull-and-push}/build_and_push_image_to_ghcr.sh (80%) rename .github/actions/{common-tools => ghcr-pull-and-push}/pull_image_from_ghcr.sh (78%) diff --git a/.github/actions/common-tools/build_and_push_image_to_ghcr.sh b/.github/actions/ghcr-pull-and-push/build_and_push_image_to_ghcr.sh similarity index 80% rename from .github/actions/common-tools/build_and_push_image_to_ghcr.sh rename to .github/actions/ghcr-pull-and-push/build_and_push_image_to_ghcr.sh index a61d23bbf0..83b32e8fce 100644 --- a/.github/actions/common-tools/build_and_push_image_to_ghcr.sh +++ b/.github/actions/ghcr-pull-and-push/build_and_push_image_to_ghcr.sh @@ -8,19 +8,13 @@ if [ -n "$5" ]; then else DOCKER_IMAGE_TAG="latest" fi - - -# Login to GHCR -echo ${GITHUB_PUSH_SECRET} | docker login https://ghcr.io -u $GITHUB_USER --password-stdin - -# GITHUB_REPOSITORY is always org/repo syntax. Get the owner in case it is different than the actor (when working in an org) GITHUB_REPOSITORY="wazuh/wazuh-packages" GITHUB_OWNER="wazuh" - -# Set up full image with tag IMAGE_ID=ghcr.io/${GITHUB_OWNER}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG} IMAGE_ID=$(echo ${IMAGE_ID} | tr '[A-Z]' '[a-z]') +# Login to GHCR +echo ${GITHUB_PUSH_SECRET} | docker login https://ghcr.io -u $GITHUB_USER --password-stdin # Build image echo build -t ${IMAGE_ID} -f ${DOCKERFILE_PATH} ${BUILD_CONTEXT} diff --git a/.github/actions/common-tools/pull_image_from_ghcr.sh b/.github/actions/ghcr-pull-and-push/pull_image_from_ghcr.sh similarity index 78% rename from .github/actions/common-tools/pull_image_from_ghcr.sh rename to .github/actions/ghcr-pull-and-push/pull_image_from_ghcr.sh index 79c2682f51..03f4e60910 100644 --- a/.github/actions/common-tools/pull_image_from_ghcr.sh +++ b/.github/actions/ghcr-pull-and-push/pull_image_from_ghcr.sh @@ -6,18 +6,14 @@ if [ -n "$4" ]; then else DOCKER_IMAGE_TAG="latest" fi - - -# Login to GHCR -echo ${GITHUB_PUSH_SECRET} | docker login https://ghcr.io -u $GITHUB_USER --password-stdin - -# GITHUB_REPOSITORY is always org/repo syntax. Get the owner in case it is different than the actor (when working in an org) GITHUB_REPOSITORY="wazuh/wazuh-packages" GITHUB_OWNER="wazuh" - -# Set up full image with tag IMAGE_ID=ghcr.io/${GITHUB_OWNER}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG} IMAGE_ID=$(echo ${IMAGE_ID} | tr '[A-Z]' '[a-z]') +# Login to GHCR +echo ${GITHUB_PUSH_SECRET} | docker login https://ghcr.io -u $GITHUB_USER --password-stdin + +# Pull and rename image docker pull ${IMAGE_ID} docker image tag ghcr.io/${GITHUB_OWNER}/${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG} ${DOCKER_IMAGE_NAME}:${DOCKER_IMAGE_TAG} diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index 2c3902d83c..5f2c92db62 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -41,7 +41,7 @@ jobs: - name: Download docker image for package building run: | - bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ env.TAG }} + bash $GITHUB_WORKSPACE/.github/actions/ghcr-pull-and-push/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ env.TAG }} - name: Build the ${{ matrix.ARCHITECTURE }} deb Wazuh ${{ matrix.TYPE }} package working-directory: ./debs diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 4a0691926c..126123e0b4 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -42,7 +42,7 @@ jobs: - name: Download docker image for package building run: | - bash $GITHUB_WORKSPACE/.github/actions/common-tools/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ env.TAG }} + bash $GITHUB_WORKSPACE/.github/actions/ghcr-pull-and-push/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ env.TAG }} - name: Build the ${{ matrix.ARCHITECTURE }} rpm Wazuh ${{ matrix.TYPE }} package working-directory: ./rpms diff --git a/.github/workflows/upload-deb-images.yml b/.github/workflows/upload-deb-images.yml index c94f3a961d..7cb1c9b3da 100644 --- a/.github/workflows/upload-deb-images.yml +++ b/.github/workflows/upload-deb-images.yml @@ -33,7 +33,7 @@ jobs: - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} with tag ${{ env.TAG }} to Github Container Registry run: - bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }} + bash $GITHUB_WORKSPACE/.github/actions/ghcr-pull-and-push/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }} Build-packages-rpm: needs: Upload-deb-package-building-images diff --git a/.github/workflows/upload-rpm-images.yml b/.github/workflows/upload-rpm-images.yml index cfbbb4844c..e48355a89a 100644 --- a/.github/workflows/upload-rpm-images.yml +++ b/.github/workflows/upload-rpm-images.yml @@ -33,7 +33,7 @@ jobs: - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} with tag ${{ env.TAG }} to Github Container Registry run: - bash $GITHUB_WORKSPACE/.github/actions/common-tools/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }} + bash $GITHUB_WORKSPACE/.github/actions/ghcr-pull-and-push/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }} Build-packages-rpm: needs: Upload-rpm-package-building-images From dbc7197a5cfedbacff4322ef6ab07f2aadd98e0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 1 Feb 2023 11:39:53 +0100 Subject: [PATCH 158/328] Add 4.5 to branches for which to create docker images on push MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-deb-images.yml | 1 + .github/workflows/upload-rpm-images.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/upload-deb-images.yml b/.github/workflows/upload-deb-images.yml index 7cb1c9b3da..9a67713401 100644 --- a/.github/workflows/upload-deb-images.yml +++ b/.github/workflows/upload-deb-images.yml @@ -7,6 +7,7 @@ on: push: branches: - master + - 4.5 - 4.4 paths: - 'debs/Debian/*' diff --git a/.github/workflows/upload-rpm-images.yml b/.github/workflows/upload-rpm-images.yml index e48355a89a..abf196ed8e 100644 --- a/.github/workflows/upload-rpm-images.yml +++ b/.github/workflows/upload-rpm-images.yml @@ -7,6 +7,7 @@ on: push: branches: - master + - 4.5 - 4.4 paths: - 'rpms/CentOS/*' From 36ffb4d942527e65ea761b96b701c4e4c02ff715 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 1 Feb 2023 11:40:42 +0100 Subject: [PATCH 159/328] Fix cron attribute for Cleaning worfklow runs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/clean-worflow-runs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/clean-worflow-runs.yml b/.github/workflows/clean-worflow-runs.yml index 2ccd7739dd..0afdb32beb 100644 --- a/.github/workflows/clean-worflow-runs.yml +++ b/.github/workflows/clean-worflow-runs.yml @@ -2,7 +2,7 @@ name: Clean workflow runs on: workflow_dispatch: schedule: - - cron: '0 0 * * Sunday' + - cron: '0 0 * * 7' jobs: Clean-runs: From 5045a01a1a7991531bac4eaa20688e20641edeae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 1 Feb 2023 11:43:02 +0100 Subject: [PATCH 160/328] Fix schedule cron for Clean runs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/clean-worflow-runs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/clean-worflow-runs.yml b/.github/workflows/clean-worflow-runs.yml index 0afdb32beb..7493693765 100644 --- a/.github/workflows/clean-worflow-runs.yml +++ b/.github/workflows/clean-worflow-runs.yml @@ -1,8 +1,8 @@ name: Clean workflow runs on: - workflow_dispatch: schedule: - cron: '0 0 * * 7' + workflow_dispatch: jobs: Clean-runs: From ecbe45f5f3f3ccd1be827737655a3589466a3026 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 1 Feb 2023 11:55:43 +0100 Subject: [PATCH 161/328] Difference between master and major versions when building packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 6 ++++-- .github/workflows/build-rpm-packages.yml | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index 5f2c92db62..4282a42241 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -36,7 +36,9 @@ jobs: - name: Set tag and container name run: | - if [ "${{ steps.changes.outputs.deb_images }}" == "true" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi + MAJOR=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION) + if [ "${{ steps.changes.outputs.deb_images }}" == "true" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$MAJOR" >> $GITHUB_ENV ; fi + if [ $MAJOR == "4.6" ]; then echo "VERSION=master" >> $GITHUB_ENV $ ; else echo "VERSION=$MAJOR" >> $GITHUB_ENV; fi echo "CONTAINER_NAME=deb_builder_${{ matrix.ARCHITECTURE }}" >> $GITHUB_ENV - name: Download docker image for package building @@ -47,7 +49,7 @@ jobs: working-directory: ./debs run: | REVISION="${{ github.head_ref }}" - bash generate_debian_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} -r $REVISION + bash generate_debian_package.sh -b ${{ env.VERSION }} -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} -r $REVISION echo "PACKAGE_NAME=$(ls ./output | grep .deb | head -n 1)" >> $GITHUB_ENV - name: Upload Wazuh ${{ matrix.TYPE }} ${{ matrix.ARCHITECTURE }} package as artifact diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 126123e0b4..26cd6b18d2 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -37,7 +37,9 @@ jobs: - name: Set tag and container name run: | - if [ "${{ steps.changes.outputs.rpm_images }}" == "true" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV ; fi + MAJOR=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION) + if [ "${{ steps.changes.outputs.rpm_images }}" == "true" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$MAJOR" >> $GITHUB_ENV ; fi + if [ $MAJOR == "4.6" ]; then echo "VERSION=master" >> $GITHUB_ENV $ ; else echo "VERSION=$MAJOR" >> $GITHUB_ENV; fi if [ "${{ matrix.ARCHITECTURE }}" == "x86_64" ]; then echo "CONTAINER_NAME=rpm_builder_x86" >> $GITHUB_ENV ; else echo "CONTAINER_NAME=rpm_builder_${{ matrix.ARCHITECTURE }}" >> $GITHUB_ENV ; fi - name: Download docker image for package building @@ -48,7 +50,7 @@ jobs: working-directory: ./rpms run: | REVISION=$( echo ${{ github.head_ref }} | sed 's/-/./g' ) - bash generate_rpm_package.sh -b master -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} -r $REVISION + bash generate_rpm_package.sh -b ${{ env.VERSION }} -t ${{ matrix.TYPE }} -a ${{ matrix.ARCHITECTURE }} --dev -j 2 --dont-build-docker --tag ${{ env.TAG }} -r $REVISION echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV - name: Upload Wazuh ${{ matrix.TYPE }} ${{ matrix.ARCHITECTURE }} package as artifact From 37d496bf59d4361a37d5d05e0f2ea7d4eb9f8cf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 1 Feb 2023 12:37:38 +0100 Subject: [PATCH 162/328] Cancel runs of the workflow for previous commits MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-deb-images.yml | 5 ++++- .github/workflows/upload-rpm-images.yml | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/upload-deb-images.yml b/.github/workflows/upload-deb-images.yml index 9a67713401..0dc87475f3 100644 --- a/.github/workflows/upload-deb-images.yml +++ b/.github/workflows/upload-deb-images.yml @@ -22,6 +22,9 @@ jobs: image: [ {CONTAINER_NAME: deb_builder_amd64, DOCKERFILE_PATH: debs/Debian/amd64}, {CONTAINER_NAME: deb_builder_i386, DOCKERFILE_PATH: debs/Debian/i386}] fail-fast: false steps: + + - uses: fkirc/skip-duplicate-actions@master + - uses: actions/checkout@v3 - name: Copy build.sh to Dockerfile path @@ -29,7 +32,7 @@ jobs: cp $GITHUB_WORKSPACE/debs/build.sh $GITHUB_WORKSPACE/${{ matrix.image.DOCKERFILE_PATH }} - name: Set tag as version - run: + run: if [ "${{ github.event_name }}" == "pull_request" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV; fi - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} with tag ${{ env.TAG }} to Github Container Registry diff --git a/.github/workflows/upload-rpm-images.yml b/.github/workflows/upload-rpm-images.yml index abf196ed8e..1b6084b608 100644 --- a/.github/workflows/upload-rpm-images.yml +++ b/.github/workflows/upload-rpm-images.yml @@ -22,6 +22,9 @@ jobs: image: [ {CONTAINER_NAME: rpm_builder_x86, DOCKERFILE_PATH: rpms/CentOS/6/x86_64}, {CONTAINER_NAME: rpm_builder_i386, DOCKERFILE_PATH: rpms/CentOS/6/i386}] fail-fast: false steps: + + - uses: fkirc/skip-duplicate-actions@master + - uses: actions/checkout@v3 - name: Copy build.sh to Dockerfile path From 6cd61078e01b95756d1cb198055078b313ce1456 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 1 Feb 2023 12:41:19 +0100 Subject: [PATCH 163/328] Set cancel to true when checking for previous runs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/clean-worflow-runs.yml | 2 +- .github/workflows/upload-deb-images.yml | 6 +++++- .github/workflows/upload-rpm-images.yml | 6 +++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/clean-worflow-runs.yml b/.github/workflows/clean-worflow-runs.yml index 7493693765..cd7ee9eb08 100644 --- a/.github/workflows/clean-worflow-runs.yml +++ b/.github/workflows/clean-worflow-runs.yml @@ -1,7 +1,7 @@ name: Clean workflow runs on: schedule: - - cron: '0 0 * * 7' + - cron: '0 0 * * 5' workflow_dispatch: jobs: diff --git a/.github/workflows/upload-deb-images.yml b/.github/workflows/upload-deb-images.yml index 0dc87475f3..b147fab90a 100644 --- a/.github/workflows/upload-deb-images.yml +++ b/.github/workflows/upload-deb-images.yml @@ -23,7 +23,11 @@ jobs: fail-fast: false steps: - - uses: fkirc/skip-duplicate-actions@master + - name: Cancel previous runs + uses: fkirc/skip-duplicate-actions@master + with: + cancel_others: 'true' + github_token: ${{ secrets.GITHUB_TOKEN }} - uses: actions/checkout@v3 diff --git a/.github/workflows/upload-rpm-images.yml b/.github/workflows/upload-rpm-images.yml index 1b6084b608..4dff25d6f4 100644 --- a/.github/workflows/upload-rpm-images.yml +++ b/.github/workflows/upload-rpm-images.yml @@ -23,7 +23,11 @@ jobs: fail-fast: false steps: - - uses: fkirc/skip-duplicate-actions@master + - name: Cancel previous runs + uses: fkirc/skip-duplicate-actions@master + with: + cancel_others: 'true' + github_token: ${{ secrets.GITHUB_TOKEN }} - uses: actions/checkout@v3 From e6ca43666531c448aad22f836615b598f6734fe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 1 Feb 2023 12:44:12 +0100 Subject: [PATCH 164/328] Cancel previous runs for Build packages workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 6 ++++++ .github/workflows/build-rpm-packages.yml | 6 ++++++ .github/workflows/upload-deb-images.yml | 1 - .github/workflows/upload-rpm-images.yml | 1 - 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index 4282a42241..9320ebc96a 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -20,6 +20,12 @@ jobs: fail-fast: false steps: + - name: Cancel previous runs + uses: fkirc/skip-duplicate-actions@master + with: + cancel_others: 'true' + github_token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v3 - name: Get changed files diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 26cd6b18d2..5d352b4886 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -21,6 +21,12 @@ jobs: fail-fast: false steps: + - name: Cancel previous runs + uses: fkirc/skip-duplicate-actions@master + with: + cancel_others: 'true' + github_token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v3 - name: Get changed files diff --git a/.github/workflows/upload-deb-images.yml b/.github/workflows/upload-deb-images.yml index b147fab90a..ef92e33eb4 100644 --- a/.github/workflows/upload-deb-images.yml +++ b/.github/workflows/upload-deb-images.yml @@ -22,7 +22,6 @@ jobs: image: [ {CONTAINER_NAME: deb_builder_amd64, DOCKERFILE_PATH: debs/Debian/amd64}, {CONTAINER_NAME: deb_builder_i386, DOCKERFILE_PATH: debs/Debian/i386}] fail-fast: false steps: - - name: Cancel previous runs uses: fkirc/skip-duplicate-actions@master with: diff --git a/.github/workflows/upload-rpm-images.yml b/.github/workflows/upload-rpm-images.yml index 4dff25d6f4..1c434560cf 100644 --- a/.github/workflows/upload-rpm-images.yml +++ b/.github/workflows/upload-rpm-images.yml @@ -22,7 +22,6 @@ jobs: image: [ {CONTAINER_NAME: rpm_builder_x86, DOCKERFILE_PATH: rpms/CentOS/6/x86_64}, {CONTAINER_NAME: rpm_builder_i386, DOCKERFILE_PATH: rpms/CentOS/6/i386}] fail-fast: false steps: - - name: Cancel previous runs uses: fkirc/skip-duplicate-actions@master with: From 13ba7e95ebf3261e7597205e23613ee2692ebcf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 1 Feb 2023 13:08:52 +0100 Subject: [PATCH 165/328] Step up waiting time for artifact download retry to 90 seconds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-deb.yml | 3 +-- .github/workflows/test-install-and-enable-rpm.yml | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index f81caf4616..604c037ec9 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -38,8 +38,7 @@ jobs: - name: Wait for the artifact to be uploaded if: ${{ steps.download-artifact.outcome == 'failure' }} - run: | - sleep 60 + run: sleep 90 - name: Retry download if it has failed if: ${{ steps.download-artifact.outcome == 'failure' }} diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index b655821918..6827577a76 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -44,8 +44,7 @@ jobs: - name: Wait for the artifact to be uploaded if: ${{ steps.download-artifact.outcome == 'failure' }} - run: | - sleep 60 + run: sleep 90 - name: Retry download if it has failed if: ${{ steps.download-artifact.outcome == 'failure' }} From 733537b985160d600a554f3b6bd3a3d9514bf8f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 1 Feb 2023 13:24:49 +0100 Subject: [PATCH 166/328] Add workflow name and conclusion to retry of the artifact download MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-deb.yml | 2 ++ .github/workflows/test-install-and-enable-rpm.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index 604c037ec9..f0b8b1e8d6 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -44,6 +44,8 @@ jobs: if: ${{ steps.download-artifact.outcome == 'failure' }} uses: dawidd6/action-download-artifact@v2 with: + workflow: build-deb-packages.yml + workflow_conclusion: in_progress name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 6827577a76..cd32ac5caf 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -50,6 +50,8 @@ jobs: if: ${{ steps.download-artifact.outcome == 'failure' }} uses: dawidd6/action-download-artifact@v2 with: + workflow: build-rpm-packages.yml + workflow_conclusion: in_progress name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail From bac6a0e996474774c1f969f60e8073d7f3f44e91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 1 Feb 2023 14:08:59 +0100 Subject: [PATCH 167/328] Fix to cancel previous runs step MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 1 + .github/workflows/build-rpm-packages.yml | 1 + .github/workflows/upload-deb-images.yml | 1 + .github/workflows/upload-rpm-images.yml | 1 + 4 files changed, 4 insertions(+) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index 9320ebc96a..dbfde72637 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -25,6 +25,7 @@ jobs: with: cancel_others: 'true' github_token: ${{ secrets.GITHUB_TOKEN }} + skip_after_successful_duplicate: 'false' - uses: actions/checkout@v3 diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 5d352b4886..170913048b 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -26,6 +26,7 @@ jobs: with: cancel_others: 'true' github_token: ${{ secrets.GITHUB_TOKEN }} + skip_after_successful_duplicate: 'false' - uses: actions/checkout@v3 diff --git a/.github/workflows/upload-deb-images.yml b/.github/workflows/upload-deb-images.yml index ef92e33eb4..5b707d67f9 100644 --- a/.github/workflows/upload-deb-images.yml +++ b/.github/workflows/upload-deb-images.yml @@ -27,6 +27,7 @@ jobs: with: cancel_others: 'true' github_token: ${{ secrets.GITHUB_TOKEN }} + skip_after_successful_duplicate: 'false' - uses: actions/checkout@v3 diff --git a/.github/workflows/upload-rpm-images.yml b/.github/workflows/upload-rpm-images.yml index 1c434560cf..7fc3624963 100644 --- a/.github/workflows/upload-rpm-images.yml +++ b/.github/workflows/upload-rpm-images.yml @@ -27,6 +27,7 @@ jobs: with: cancel_others: 'true' github_token: ${{ secrets.GITHUB_TOKEN }} + skip_after_successful_duplicate: 'false' - uses: actions/checkout@v3 From c5266ce086117698399bec71cf468cb0efc69a88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 1 Feb 2023 14:20:17 +0100 Subject: [PATCH 168/328] Remove retry of artifact download MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-deb.yml | 13 ------------- .github/workflows/test-install-and-enable-rpm.yml | 13 ------------- 2 files changed, 26 deletions(-) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index f0b8b1e8d6..16abbf0354 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -36,19 +36,6 @@ jobs: name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail - - name: Wait for the artifact to be uploaded - if: ${{ steps.download-artifact.outcome == 'failure' }} - run: sleep 90 - - - name: Retry download if it has failed - if: ${{ steps.download-artifact.outcome == 'failure' }} - uses: dawidd6/action-download-artifact@v2 - with: - workflow: build-deb-packages.yml - workflow_conclusion: in_progress - name: ${{env.PACKAGE_NAME}} - if_no_artifact_found: fail - - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} to the packages directory run: | mkdir $GITHUB_WORKSPACE/packages diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index cd32ac5caf..874b720c2a 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -42,19 +42,6 @@ jobs: name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail - - name: Wait for the artifact to be uploaded - if: ${{ steps.download-artifact.outcome == 'failure' }} - run: sleep 90 - - - name: Retry download if it has failed - if: ${{ steps.download-artifact.outcome == 'failure' }} - uses: dawidd6/action-download-artifact@v2 - with: - workflow: build-rpm-packages.yml - workflow_conclusion: in_progress - name: ${{env.PACKAGE_NAME}} - if_no_artifact_found: fail - - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} to the packages directory run: | mkdir $GITHUB_WORKSPACE/packages From 32e6a60a827a799e42050ef1c75a9603da75e5b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 1 Feb 2023 17:08:00 +0100 Subject: [PATCH 169/328] Try again the artifact download retry with 240 seconds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-deb.yml | 13 +++++++++++++ .github/workflows/test-install-and-enable-rpm.yml | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index 16abbf0354..fdf567ccb2 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -36,6 +36,19 @@ jobs: name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail + - name: Wait for the artifact to be uploaded + if: ${{ steps.download-artifact.outcome == 'failure' }} + run: sleep 240 + + - name: Retry download if it has failed + if: ${{ steps.download-artifact.outcome == 'failure' }} + uses: dawidd6/action-download-artifact@v2 + with: + workflow: build-deb-packages.yml + workflow_conclusion: in_progress + name: ${{env.PACKAGE_NAME}} + if_no_artifact_found: fail + - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} to the packages directory run: | mkdir $GITHUB_WORKSPACE/packages diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 874b720c2a..d0f312ce03 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -42,6 +42,19 @@ jobs: name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail + - name: Wait for the artifact to be uploaded + if: ${{ steps.download-artifact.outcome == 'failure' }} + run: sleep 240 + + - name: Retry download if it has failed + if: ${{ steps.download-artifact.outcome == 'failure' }} + uses: dawidd6/action-download-artifact@v2 + with: + workflow: build-rpm-packages.yml + workflow_conclusion: in_progress + name: ${{env.PACKAGE_NAME}} + if_no_artifact_found: fail + - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} to the packages directory run: | mkdir $GITHUB_WORKSPACE/packages From a4f477e85c76da2ba27b6b3e3734efaed007e03f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 1 Feb 2023 17:15:37 +0100 Subject: [PATCH 170/328] Debug if the workspace is the same when reusing workflows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-deb.yml | 1 + .github/workflows/test-install-and-enable-rpm.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index fdf567ccb2..82a439408b 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -25,6 +25,7 @@ jobs: VERSION=$(cat $GITHUB_WORKSPACE/VERSION) REVISION=$( echo ${{ github.head_ref }}) echo "PACKAGE_NAME=wazuh-${{ matrix.type }}_${VERSION}-${REVISION}_${{ matrix.arch }}.deb" >> $GITHUB_ENV + ls -la $GITHUB_WORKSPACE/debs/output/ - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} id: download-artifact diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index d0f312ce03..82c1d378e8 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -31,6 +31,7 @@ jobs: VERSION=$(cat $GITHUB_WORKSPACE/VERSION) REVISION=$( echo ${{ github.head_ref }} | sed 's/-/./g' ) echo "PACKAGE_NAME=wazuh-${{ matrix.type }}-${VERSION}-${REVISION}.${{matrix.system.ARCH}}.rpm" >> $GITHUB_ENV + ls -la $GITHUB_WORKSPACE/debs/output/ - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} id: download-artifact From ac63a74eb2dbc89c1120998118a5ac223879c610 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 1 Feb 2023 17:23:39 +0100 Subject: [PATCH 171/328] Test calling builder from another workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-rpm-packages.yml | 4 ---- .github/workflows/test-call-build-rpm.yml | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/test-call-build-rpm.yml diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 170913048b..b857bcb5ae 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -1,9 +1,5 @@ name: Build Wazuh Packages - RPM - x86_64 and i386 on: - pull_request: - paths: - - 'rpms/SPECS/*' - - 'rpms/generate_rpm_package.sh' workflow_dispatch: workflow_call: diff --git a/.github/workflows/test-call-build-rpm.yml b/.github/workflows/test-call-build-rpm.yml new file mode 100644 index 0000000000..62d3b7c2bc --- /dev/null +++ b/.github/workflows/test-call-build-rpm.yml @@ -0,0 +1,21 @@ +name: Test +on: + pull_request: + paths: + - 'rpms/CentOS/**' + - 'rpms/build.sh' + push: + branches: + - master + - 4.5 + - 4.4 + paths: + - 'rpms/CentOS/*' + - 'rpms/build.sh' + workflow_dispatch: + +jobs: + Build-packages-rpm: + if: github.event_name == 'pull_request' + uses: ./.github/workflows/build-rpm-packages.yml + secrets: inherit \ No newline at end of file From 9fec45ac273d34eb3312f76f24e24a99bf4e70cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 1 Feb 2023 17:31:54 +0100 Subject: [PATCH 172/328] Remove check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-deb.yml | 1 - .github/workflows/test-install-and-enable-rpm.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index 82a439408b..fdf567ccb2 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -25,7 +25,6 @@ jobs: VERSION=$(cat $GITHUB_WORKSPACE/VERSION) REVISION=$( echo ${{ github.head_ref }}) echo "PACKAGE_NAME=wazuh-${{ matrix.type }}_${VERSION}-${REVISION}_${{ matrix.arch }}.deb" >> $GITHUB_ENV - ls -la $GITHUB_WORKSPACE/debs/output/ - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} id: download-artifact diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 82c1d378e8..d0f312ce03 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -31,7 +31,6 @@ jobs: VERSION=$(cat $GITHUB_WORKSPACE/VERSION) REVISION=$( echo ${{ github.head_ref }} | sed 's/-/./g' ) echo "PACKAGE_NAME=wazuh-${{ matrix.type }}-${VERSION}-${REVISION}.${{matrix.system.ARCH}}.rpm" >> $GITHUB_ENV - ls -la $GITHUB_WORKSPACE/debs/output/ - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} id: download-artifact From abcee78d2b2ceea8c98c8a5032edb092aed0c8ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 1 Feb 2023 18:11:12 +0100 Subject: [PATCH 173/328] Test as a different workflow and wait for the package to be created MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 9 ++----- .github/workflows/build-rpm-packages.yml | 13 +++++----- .github/workflows/test-call-build-rpm.yml | 21 ---------------- .../workflows/test-install-and-enable-deb.yml | 25 +++++++++---------- .../workflows/test-install-and-enable-rpm.yml | 25 +++++++++---------- .github/workflows/upload-deb-images.yml | 8 +++++- .github/workflows/upload-rpm-images.yml | 6 +++++ 7 files changed, 45 insertions(+), 62 deletions(-) delete mode 100644 .github/workflows/test-call-build-rpm.yml diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index dbfde72637..4fbc38ffad 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -8,7 +8,7 @@ on: workflow_call: jobs: - Wazuh-agent-deb-package-builds: + Wazuh-agent-deb-package-build: runs-on: ubuntu-latest strategy: matrix: @@ -64,9 +64,4 @@ jobs: with: name: ${{ env.PACKAGE_NAME }} path: ${{github.workspace}}/debs/output/${{ env.PACKAGE_NAME }} - if-no-files-found: error - - Test-install-packages-deb: - needs: Wazuh-agent-deb-package-builds - uses: ./.github/workflows/test-install-and-enable-deb.yml - secrets: inherit \ No newline at end of file + if-no-files-found: error \ No newline at end of file diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index b857bcb5ae..9a385478aa 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -1,11 +1,15 @@ name: Build Wazuh Packages - RPM - x86_64 and i386 on: + pull_request: + paths: + - 'rpms/SPECS/*' + - 'rpms/generate_rpm_package.sh' workflow_dispatch: workflow_call: jobs: - Wazuh-agent-rpm-package-builds: + Wazuh-agent-rpm-package-build: runs-on: ubuntu-latest strategy: matrix: @@ -61,9 +65,4 @@ jobs: with: name: ${{ env.PACKAGE_NAME }} path: ${{github.workspace}}/rpms/output/${{ env.PACKAGE_NAME }} - if-no-files-found: error - - Test-install-packages-rpm: - needs: Wazuh-agent-rpm-package-builds - uses: ./.github/workflows/test-install-and-enable-rpm.yml - secrets: inherit \ No newline at end of file + if-no-files-found: error \ No newline at end of file diff --git a/.github/workflows/test-call-build-rpm.yml b/.github/workflows/test-call-build-rpm.yml deleted file mode 100644 index 62d3b7c2bc..0000000000 --- a/.github/workflows/test-call-build-rpm.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Test -on: - pull_request: - paths: - - 'rpms/CentOS/**' - - 'rpms/build.sh' - push: - branches: - - master - - 4.5 - - 4.4 - paths: - - 'rpms/CentOS/*' - - 'rpms/build.sh' - workflow_dispatch: - -jobs: - Build-packages-rpm: - if: github.event_name == 'pull_request' - uses: ./.github/workflows/build-rpm-packages.yml - secrets: inherit \ No newline at end of file diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index fdf567ccb2..45c500b245 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -1,5 +1,9 @@ name: Test install and enable Wazuh agent and manager - DEB on: + pull_request: + paths: + - 'debs/SPECS/*' + - 'debs/generate_debian_package.sh' workflow_dispatch: workflow_call: @@ -18,6 +22,14 @@ jobs: arch: i386 fail-fast: false steps: + - name: Wait for the package to be built + uses: fountainhead/action-wait-for-check@v1.1.0 + id: wait-for-build + with: + token: ${{ secrets.GITHUB_TOKEN }} + checkName: Wazuh-agent-deb-package-build + ref: ${{ github.event.pull_request.head.sha || github.sha }} + - uses: actions/checkout@v3 - name: Setup directories and variables @@ -36,19 +48,6 @@ jobs: name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail - - name: Wait for the artifact to be uploaded - if: ${{ steps.download-artifact.outcome == 'failure' }} - run: sleep 240 - - - name: Retry download if it has failed - if: ${{ steps.download-artifact.outcome == 'failure' }} - uses: dawidd6/action-download-artifact@v2 - with: - workflow: build-deb-packages.yml - workflow_conclusion: in_progress - name: ${{env.PACKAGE_NAME}} - if_no_artifact_found: fail - - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} to the packages directory run: | mkdir $GITHUB_WORKSPACE/packages diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index d0f312ce03..d9cc0bf2e9 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -1,5 +1,9 @@ name: Test install and enable Wazuh agent and manager - RPM on: + pull_request: + paths: + - 'rpms/SPECS/*' + - 'rpms/generate_rpm_package.sh' workflow_dispatch: workflow_call: @@ -24,6 +28,14 @@ jobs: type: manager fail-fast: false steps: + - name: Wait for the package to be built + uses: fountainhead/action-wait-for-check@v1.1.0 + id: wait-for-build + with: + token: ${{ secrets.GITHUB_TOKEN }} + checkName: Wazuh-agent-rpm-package-build + ref: ${{ github.event.pull_request.head.sha || github.sha }} + - uses: actions/checkout@v3 - name: Setup directories and variables @@ -42,19 +54,6 @@ jobs: name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail - - name: Wait for the artifact to be uploaded - if: ${{ steps.download-artifact.outcome == 'failure' }} - run: sleep 240 - - - name: Retry download if it has failed - if: ${{ steps.download-artifact.outcome == 'failure' }} - uses: dawidd6/action-download-artifact@v2 - with: - workflow: build-rpm-packages.yml - workflow_conclusion: in_progress - name: ${{env.PACKAGE_NAME}} - if_no_artifact_found: fail - - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} to the packages directory run: | mkdir $GITHUB_WORKSPACE/packages diff --git a/.github/workflows/upload-deb-images.yml b/.github/workflows/upload-deb-images.yml index 5b707d67f9..7f8d5969cb 100644 --- a/.github/workflows/upload-deb-images.yml +++ b/.github/workflows/upload-deb-images.yml @@ -43,8 +43,14 @@ jobs: run: bash $GITHUB_WORKSPACE/.github/actions/ghcr-pull-and-push/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }} - Build-packages-rpm: + Build-packages-deb: needs: Upload-deb-package-building-images if: github.event_name == 'pull_request' uses: ./.github/workflows/build-deb-packages.yml + secrets: inherit + + Test-packages-deb: + needs: Build-packages-deb + if: github.event_name == 'pull_request' + uses: ./.github/workflows/test-install-and-enable-deb.yml secrets: inherit \ No newline at end of file diff --git a/.github/workflows/upload-rpm-images.yml b/.github/workflows/upload-rpm-images.yml index 7fc3624963..a4f7cffd01 100644 --- a/.github/workflows/upload-rpm-images.yml +++ b/.github/workflows/upload-rpm-images.yml @@ -47,4 +47,10 @@ jobs: needs: Upload-rpm-package-building-images if: github.event_name == 'pull_request' uses: ./.github/workflows/build-rpm-packages.yml + secrets: inherit + + Test-packages-rpm: + needs: Build-packages-rpm + if: github.event_name == 'pull_request' + uses: ./.github/workflows/test-install-and-enable-rpm.yml secrets: inherit \ No newline at end of file From ed43bdc67190d099f7f4e0706b6ef96ec5acd3c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 1 Feb 2023 18:14:28 +0100 Subject: [PATCH 174/328] Change interval and timeout to wait for package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-deb.yml | 2 ++ .github/workflows/test-install-and-enable-rpm.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index 45c500b245..78e4b96501 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -29,6 +29,8 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} checkName: Wazuh-agent-deb-package-build ref: ${{ github.event.pull_request.head.sha || github.sha }} + interval: 60 + timeoutSeconds: 7200 - uses: actions/checkout@v3 diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index d9cc0bf2e9..6651682f2f 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -35,6 +35,8 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} checkName: Wazuh-agent-rpm-package-build ref: ${{ github.event.pull_request.head.sha || github.sha }} + interval: 60 + timeoutSeconds: 7200 - uses: actions/checkout@v3 From 625c62677d2798048c0a613b27b482b809f0fc5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 1 Feb 2023 18:16:03 +0100 Subject: [PATCH 175/328] Add cancel last run to the tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-deb.yml | 7 +++++++ .github/workflows/test-install-and-enable-rpm.yml | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index 78e4b96501..ba288e836f 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -22,6 +22,13 @@ jobs: arch: i386 fail-fast: false steps: + - name: Cancel previous runs + uses: fkirc/skip-duplicate-actions@master + with: + cancel_others: 'true' + github_token: ${{ secrets.GITHUB_TOKEN }} + skip_after_successful_duplicate: 'false' + - name: Wait for the package to be built uses: fountainhead/action-wait-for-check@v1.1.0 id: wait-for-build diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 6651682f2f..31762c22f4 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -28,6 +28,13 @@ jobs: type: manager fail-fast: false steps: + - name: Cancel previous runs + uses: fkirc/skip-duplicate-actions@master + with: + cancel_others: 'true' + github_token: ${{ secrets.GITHUB_TOKEN }} + skip_after_successful_duplicate: 'false' + - name: Wait for the package to be built uses: fountainhead/action-wait-for-check@v1.1.0 id: wait-for-build From e041a0212968c37e1f645e33bee34d7fdef4f9eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 1 Feb 2023 18:30:02 +0100 Subject: [PATCH 176/328] Add job to cancel and wait for the package to be built MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../workflows/test-install-and-enable-deb.yml | 27 ++++++++----- .../workflows/test-install-and-enable-rpm.yml | 38 +++++++++++-------- 2 files changed, 39 insertions(+), 26 deletions(-) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index ba288e836f..2eb467856e 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -8,18 +8,10 @@ on: workflow_call: jobs: - Test-install-and-enable-deb-systems: + + Wait-for-package-building: runs-on: ubuntu-latest strategy: - matrix: - distro_name: ['ubuntu:xenial', 'ubuntu:bionic', 'ubuntu:focal', 'ubuntu:jammy', 'debian:stretch', 'debian:buster', 'debian:bullseye'] - type: [agent, manager] - arch: [amd64, i386] - exclude: - - type: manager - arch: i386 - - distro_name: 'ubuntu:jammy' - arch: i386 fail-fast: false steps: - name: Cancel previous runs @@ -39,6 +31,21 @@ jobs: interval: 60 timeoutSeconds: 7200 + Test-install-and-enable-deb-systems: + needs: Wait-for-package-building + runs-on: ubuntu-latest + strategy: + matrix: + distro_name: ['ubuntu:xenial', 'ubuntu:bionic', 'ubuntu:focal', 'ubuntu:jammy', 'debian:stretch', 'debian:buster', 'debian:bullseye'] + type: [agent, manager] + arch: [amd64, i386] + exclude: + - type: manager + arch: i386 + - distro_name: 'ubuntu:jammy' + arch: i386 + fail-fast: false + steps: - uses: actions/checkout@v3 - name: Setup directories and variables diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 31762c22f4..c6865c3dc7 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -8,24 +8,9 @@ on: workflow_call: jobs: - Test-install-and-enable-rpm-systems: + Wait-for-package-building: runs-on: ubuntu-latest strategy: - matrix: - system: [ - {NAME: 'oraclelinux:9', ARCH: "x86_64"}, - {NAME: 'almalinux:9', ARCH: "x86_64"}, - {NAME: 'rockylinux:9', ARCH: "x86_64"}, - {NAME: 'centos:7', ARCH: "x86_64"}, - {NAME: 'centos:8', ARCH: "x86_64"}, - {NAME: 'i386/centos:7', ARCH: "i386"}, - {NAME: 'redhat/ubi8:latest', ARCH: "x86_64"}, - {NAME: 'redhat/ubi9:latest', ARCH: "x86_64"}, - {NAME: 'amazonlinux:2', ARCH: "x86_64"}] - type: [agent, manager] - exclude: - - system: {ARCH: "i386"} - type: manager fail-fast: false steps: - name: Cancel previous runs @@ -45,6 +30,27 @@ jobs: interval: 60 timeoutSeconds: 7200 + Test-install-and-enable-rpm-systems: + needs: Wait-for-package-building + runs-on: ubuntu-latest + strategy: + matrix: + system: [ + {NAME: 'oraclelinux:9', ARCH: "x86_64"}, + {NAME: 'almalinux:9', ARCH: "x86_64"}, + {NAME: 'rockylinux:9', ARCH: "x86_64"}, + {NAME: 'centos:7', ARCH: "x86_64"}, + {NAME: 'centos:8', ARCH: "x86_64"}, + {NAME: 'i386/centos:7', ARCH: "i386"}, + {NAME: 'redhat/ubi8:latest', ARCH: "x86_64"}, + {NAME: 'redhat/ubi9:latest', ARCH: "x86_64"}, + {NAME: 'amazonlinux:2', ARCH: "x86_64"}] + type: [agent, manager] + exclude: + - system: {ARCH: "i386"} + type: manager + fail-fast: false + steps: - uses: actions/checkout@v3 - name: Setup directories and variables From 01389de2dcdf69b5846c675f5e2b7819cf7b0975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 2 Feb 2023 09:29:34 +0100 Subject: [PATCH 177/328] Test wait for one hour of package creation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-deb.yml | 2 +- .github/workflows/test-install-and-enable-rpm.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index 2eb467856e..ecd9dfd871 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -29,7 +29,7 @@ jobs: checkName: Wazuh-agent-deb-package-build ref: ${{ github.event.pull_request.head.sha || github.sha }} interval: 60 - timeoutSeconds: 7200 + timeoutSeconds: 3600 Test-install-and-enable-deb-systems: needs: Wait-for-package-building diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index c6865c3dc7..3b344d3660 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -28,7 +28,7 @@ jobs: checkName: Wazuh-agent-rpm-package-build ref: ${{ github.event.pull_request.head.sha || github.sha }} interval: 60 - timeoutSeconds: 7200 + timeoutSeconds: 3600 Test-install-and-enable-rpm-systems: needs: Wait-for-package-building From dc13d75e63d16b148f0dadbd94b9866629c9e0f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 2 Feb 2023 10:22:33 +0100 Subject: [PATCH 178/328] Try different action to wait MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-rpm.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 3b344d3660..3d2beda17a 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -21,14 +21,13 @@ jobs: skip_after_successful_duplicate: 'false' - name: Wait for the package to be built - uses: fountainhead/action-wait-for-check@v1.1.0 + uses: ArcticLampyrid/action-wait-for-workflow@v1.1.0 id: wait-for-build with: - token: ${{ secrets.GITHUB_TOKEN }} - checkName: Wazuh-agent-rpm-package-build - ref: ${{ github.event.pull_request.head.sha || github.sha }} - interval: 60 - timeoutSeconds: 3600 + github_token: ${{ secrets.GITHUB_TOKEN }} + workflow: build-rpm-packages.yml + sha: ${{ github.event.pull_request.head.sha || github.sha }} + wait-interval: 60 Test-install-and-enable-rpm-systems: needs: Wait-for-package-building From 00ad4401c317f26a4d24ba710bdb18b000566b92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 2 Feb 2023 10:23:56 +0100 Subject: [PATCH 179/328] Fix version for new waiting action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-rpm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 3d2beda17a..c200392487 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -21,7 +21,7 @@ jobs: skip_after_successful_duplicate: 'false' - name: Wait for the package to be built - uses: ArcticLampyrid/action-wait-for-workflow@v1.1.0 + uses: ArcticLampyrid/action-wait-for-workflow@v1.0.3 id: wait-for-build with: github_token: ${{ secrets.GITHUB_TOKEN }} From 8c9d4ef43dfc0259407274ddbf93ef6ab116c0a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 2 Feb 2023 10:33:44 +0100 Subject: [PATCH 180/328] Fix download artifact from success workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-deb.yml | 6 ++++-- .github/workflows/test-install-and-enable-rpm.yml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index ecd9dfd871..c06336617c 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -28,7 +28,9 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} checkName: Wazuh-agent-deb-package-build ref: ${{ github.event.pull_request.head.sha || github.sha }} - interval: 60 + owner: ${{ github.repository_owner }} + repository: ${{ github.repository }} + intervalSeconds: 60 timeoutSeconds: 3600 Test-install-and-enable-deb-systems: @@ -60,7 +62,7 @@ jobs: uses: dawidd6/action-download-artifact@v2 with: workflow: build-deb-packages.yml - workflow_conclusion: in_progress + workflow_conclusion: success name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index c200392487..6182271a24 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -64,7 +64,7 @@ jobs: uses: dawidd6/action-download-artifact@v2 with: workflow: build-rpm-packages.yml - workflow_conclusion: in_progress + workflow_conclusion: success name: ${{env.PACKAGE_NAME}} if_no_artifact_found: fail From 2bd2bc063802fca73cfa31615ed54a75445910b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 2 Feb 2023 10:42:22 +0100 Subject: [PATCH 181/328] Change waiting action for deb too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-deb.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index c06336617c..86e2cd9dc9 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -22,16 +22,13 @@ jobs: skip_after_successful_duplicate: 'false' - name: Wait for the package to be built - uses: fountainhead/action-wait-for-check@v1.1.0 + uses: ArcticLampyrid/action-wait-for-workflow@v1.0.3 id: wait-for-build with: - token: ${{ secrets.GITHUB_TOKEN }} - checkName: Wazuh-agent-deb-package-build - ref: ${{ github.event.pull_request.head.sha || github.sha }} - owner: ${{ github.repository_owner }} - repository: ${{ github.repository }} - intervalSeconds: 60 - timeoutSeconds: 3600 + github_token: ${{ secrets.GITHUB_TOKEN }} + workflow: build-deb-packages.yml + sha: ${{ github.event.pull_request.head.sha || github.sha }} + wait-interval: 60 Test-install-and-enable-deb-systems: needs: Wait-for-package-building From 08bd1075fac0413d8095fa31404ff6a6b0283032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 2 Feb 2023 17:07:04 +0100 Subject: [PATCH 182/328] Added CentOS 9 Stream and Fedora 34 to the orifinal fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- rpms/SPECS/wazuh-agent.spec | 2 +- rpms/SPECS/wazuh-manager.spec | 2 +- stack/indexer/rpm/wazuh-indexer.spec | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rpms/SPECS/wazuh-agent.spec b/rpms/SPECS/wazuh-agent.spec index 8b01346087..a6f44c6e8d 100644 --- a/rpms/SPECS/wazuh-agent.spec +++ b/rpms/SPECS/wazuh-agent.spec @@ -242,7 +242,7 @@ fi if [ -f /etc/os-release ]; then source /etc/os-release - if ( [ "${NAME}" = "Red Hat Enterprise Linux" ] || [ "${NAME}" = "Rocky Linux" ] || [ "${NAME}" = "AlmaLinux" ] ) && [ "$((${VERSION_ID:0:1}))" -ge 9 ]; then + if (( [ "${NAME}" = "Red Hat Enterprise Linux" ] || [ "${NAME}" = "Rocky Linux" ] || [ "${NAME}" = "AlmaLinux" ] || [ "CentOS Stream" ]) && [ "$((${VERSION_ID:0:1}))" -ge 9 ]) || ( [ "${NAME}" = "Fedora" ] && [ "$((${VERSION_ID}))" -ge 34 ] ); then rm -f %{_initrddir}/wazuh-agent fi fi diff --git a/rpms/SPECS/wazuh-manager.spec b/rpms/SPECS/wazuh-manager.spec index 441258ee22..ce0bbc58e2 100644 --- a/rpms/SPECS/wazuh-manager.spec +++ b/rpms/SPECS/wazuh-manager.spec @@ -332,7 +332,7 @@ fi if [ -f /etc/os-release ]; then source /etc/os-release - if ( [ "${NAME}" = "Red Hat Enterprise Linux" ] || [ "${NAME}" = "Rocky Linux" ] || [ "${NAME}" = "AlmaLinux" ] ) && [ "$((${VERSION_ID:0:1}))" -ge 9 ]; then + if (( [ "${NAME}" = "Red Hat Enterprise Linux" ] || [ "${NAME}" = "Rocky Linux" ] || [ "${NAME}" = "AlmaLinux" ] || [ "CentOS Stream" ]) && [ "$((${VERSION_ID:0:1}))" -ge 9 ]) || ( [ "${NAME}" = "Fedora" ] && [ "$((${VERSION_ID}))" -ge 34 ] ); then rm -f %{_initrddir}/wazuh-manager fi fi diff --git a/stack/indexer/rpm/wazuh-indexer.spec b/stack/indexer/rpm/wazuh-indexer.spec index 2bd5a3cfbe..80447077ad 100755 --- a/stack/indexer/rpm/wazuh-indexer.spec +++ b/stack/indexer/rpm/wazuh-indexer.spec @@ -165,7 +165,7 @@ fi if [ -f /etc/os-release ]; then source /etc/os-release - if [ "${NAME}" = "Red Hat Enterprise Linux" ] && [ "$((${VERSION_ID:0:1}))" -ge 9 ]; then + if (( [ "${NAME}" = "Red Hat Enterprise Linux" ] || [ "${NAME}" = "Rocky Linux" ] || [ "${NAME}" = "AlmaLinux" ] || [ "CentOS Stream" ]) && [ "$((${VERSION_ID:0:1}))" -ge 9 ]) || ( [ "${NAME}" = "Fedora" ] && [ "$((${VERSION_ID}))" -ge 34 ] ); then rm -f /etc/init.d/%{name} fi fi From f52d16beca387fc3994fb7abe5e0f3c69ff11d1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 2 Feb 2023 17:08:31 +0100 Subject: [PATCH 183/328] Add install and enable test for fedora 34 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-rpm.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 6182271a24..9025c2e491 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -43,7 +43,8 @@ jobs: {NAME: 'i386/centos:7', ARCH: "i386"}, {NAME: 'redhat/ubi8:latest', ARCH: "x86_64"}, {NAME: 'redhat/ubi9:latest', ARCH: "x86_64"}, - {NAME: 'amazonlinux:2', ARCH: "x86_64"}] + {NAME: 'amazonlinux:2', ARCH: "x86_64"}, + {NAME: 'fedora:34', ARCH: "x86_64"}] type: [agent, manager] exclude: - system: {ARCH: "i386"} From 92232231af69c4c33cd5b2bcccd40fe8e86467eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 3 Feb 2023 10:40:08 +0100 Subject: [PATCH 184/328] Only install /etc/init.d/rc.d/* if systemd-sysv-install is not present MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- rpms/SPECS/wazuh-agent.spec | 14 +++++--------- rpms/SPECS/wazuh-manager.spec | 18 +++++++----------- 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/rpms/SPECS/wazuh-agent.spec b/rpms/SPECS/wazuh-agent.spec index 6a640ef165..26e7833f6f 100644 --- a/rpms/SPECS/wazuh-agent.spec +++ b/rpms/SPECS/wazuh-agent.spec @@ -81,14 +81,16 @@ echo 'USER_AUTO_START="n"' >> ./etc/preloaded-vars.conf %endif # Create directories -mkdir -p ${RPM_BUILD_ROOT}%{_initrddir} +if [ ! -f /usr/lib/systemd/systemd-sysv-install ]; then mkdir -p ${RPM_BUILD_ROOT}%{_initrddir}; fi mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/.ssh # Copy the installed files into RPM_BUILD_ROOT directory cp -pr %{_localstatedir}/* ${RPM_BUILD_ROOT}%{_localstatedir}/ mkdir -p ${RPM_BUILD_ROOT}/usr/lib/systemd/system/ -sed -i "s:WAZUH_HOME_TMP:%{_localstatedir}:g" src/init/templates/ossec-hids-rh.init -install -m 0755 src/init/templates/ossec-hids-rh.init ${RPM_BUILD_ROOT}%{_initrddir}/wazuh-agent +if [ ! -f /usr/lib/systemd/systemd-sysv-install ]; then + sed -i "s:WAZUH_HOME_TMP:%{_localstatedir}:g" src/init/templates/ossec-hids-rh.init + install -m 0755 src/init/templates/ossec-hids-rh.init ${RPM_BUILD_ROOT}%{_initrddir}/wazuh-agent +fi sed -i "s:WAZUH_HOME_TMP:%{_localstatedir}:g" src/init/templates/wazuh-agent.service install -m 0644 src/init/templates/wazuh-agent.service ${RPM_BUILD_ROOT}/usr/lib/systemd/system/ @@ -240,12 +242,6 @@ if [ $1 = 1 ]; then %{_localstatedir}/packages_files/agent_installation_scripts/src/init/register_configure_agent.sh %{_localstatedir} > /dev/null || : fi -if [ -f /etc/os-release ]; then - source /etc/os-release - if [ "${NAME}" = "Red Hat Enterprise Linux" ] && [ "$((${VERSION_ID:0:1}))" -ge 9 ]; then - rm -f %{_initrddir}/wazuh-agent - fi -fi # We create this fix for the operating system that deprecated the SySV. For now, this fix is for suse/openSUSE sles="" diff --git a/rpms/SPECS/wazuh-manager.spec b/rpms/SPECS/wazuh-manager.spec index 544136e75c..e6b35f1eee 100644 --- a/rpms/SPECS/wazuh-manager.spec +++ b/rpms/SPECS/wazuh-manager.spec @@ -74,14 +74,17 @@ echo 'USER_CREATE_SSL_CERT="n"' >> ./etc/preloaded-vars.conf ./install.sh # Create directories -mkdir -p ${RPM_BUILD_ROOT}%{_initrddir} + +if [ ! -f /usr/lib/systemd/systemd-sysv-install ]; then mkdir -p ${RPM_BUILD_ROOT}%{_initrddir}; fi mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/.ssh # Copy the installed files into RPM_BUILD_ROOT directory cp -pr %{_localstatedir}/* ${RPM_BUILD_ROOT}%{_localstatedir}/ mkdir -p ${RPM_BUILD_ROOT}/usr/lib/systemd/system/ -sed -i "s:WAZUH_HOME_TMP:%{_localstatedir}:g" src/init/templates/ossec-hids-rh.init -install -m 0755 src/init/templates/ossec-hids-rh.init ${RPM_BUILD_ROOT}%{_initrddir}/wazuh-manager +if [ ! -f /usr/lib/systemd/systemd-sysv-install ]; then + sed -i "s:WAZUH_HOME_TMP:%{_localstatedir}:g" src/init/templates/ossec-hids-rh.init + install -m 0755 src/init/templates/ossec-hids-rh.init ${RPM_BUILD_ROOT}%{_initrddir}/wazuh-manager +fi sed -i "s:WAZUH_HOME_TMP:%{_localstatedir}:g" src/init/templates/wazuh-manager.service install -m 0644 src/init/templates/wazuh-manager.service ${RPM_BUILD_ROOT}/usr/lib/systemd/system/ @@ -326,17 +329,10 @@ fi if [ -n "$sles" ] && [ $(ps --no-headers -o comm 1) == "systemd" ]; then if [ -f /etc/init.d/wazuh-manager ]; then - rm -f /etc/init.d/wazuh-manager + rm -f %{_initrddir}//wazuh-manager fi fi -if [ -f /etc/os-release ]; then - source /etc/os-release - if [ "${NAME}" = "Red Hat Enterprise Linux" ] && [ "$((${VERSION_ID:0:1}))" -ge 9 ]; then - rm -f %{_initrddir}/wazuh-manager - fi -fi - # Generation auto-signed certificate if not exists if [ ! -f "%{_localstatedir}/etc/sslmanager.key" ] && [ ! -f "%{_localstatedir}/etc/sslmanager.cert" ]; then %{_localstatedir}/bin/wazuh-authd -C 365 -B 2048 -S "/C=US/ST=California/CN=Wazuh/" -K %{_localstatedir}/etc/sslmanager.key -X %{_localstatedir}/etc/sslmanager.cert 2>/dev/null From 24734fb12d34b2b331876e697f44ebe4ad25e0af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 3 Feb 2023 12:44:33 +0100 Subject: [PATCH 185/328] Fix typo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/actions/test-install-enable/install_and_enable.sh | 2 +- unattended_installer/common_functions/common.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/test-install-enable/install_and_enable.sh b/.github/actions/test-install-enable/install_and_enable.sh index ed82e33ada..b201222253 100644 --- a/.github/actions/test-install-enable/install_and_enable.sh +++ b/.github/actions/test-install-enable/install_and_enable.sh @@ -14,7 +14,7 @@ elif [ -n "$(command -v apt-get)" ]; then apt-get update apt-get install -y systemd else - common_logger -e "Couldn'd find type of system" + common_logger -e "Couldn't find type of system" exit 1 fi diff --git a/unattended_installer/common_functions/common.sh b/unattended_installer/common_functions/common.sh index b38315b781..51e76dbe63 100644 --- a/unattended_installer/common_functions/common.sh +++ b/unattended_installer/common_functions/common.sh @@ -118,7 +118,7 @@ function common_checkSystem() { sys_type="apt-get" sep="=" else - common_logger -e "Couldn'd find type of system" + common_logger -e "Couldn't find type of system" exit 1 fi From ccd448689ee74173cca4027a712dd35f6e3842cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 3 Feb 2023 13:07:09 +0100 Subject: [PATCH 186/328] Change condition to remove /etc/init.d/wazuh-indexer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- stack/indexer/rpm/wazuh-indexer.spec | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/stack/indexer/rpm/wazuh-indexer.spec b/stack/indexer/rpm/wazuh-indexer.spec index 2bd5a3cfbe..5b889782e1 100755 --- a/stack/indexer/rpm/wazuh-indexer.spec +++ b/stack/indexer/rpm/wazuh-indexer.spec @@ -163,11 +163,9 @@ if [ $1 = 1 ];then # Install fi -if [ -f /etc/os-release ]; then - source /etc/os-release - if [ "${NAME}" = "Red Hat Enterprise Linux" ] && [ "$((${VERSION_ID:0:1}))" -ge 9 ]; then + +if [ ! -f /usr/lib/systemd/systemd-sysv-install ]; then rm -f /etc/init.d/%{name} - fi fi # If is an upgrade, move the securityconfig files if they exist (4.3.x versions) From 3e69fa3ecac1bf06951a6e04f61342bdc78fb188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 3 Feb 2023 13:22:02 +0100 Subject: [PATCH 187/328] Change debug call so it only runs if the command is not run with --help MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- stack/indexer/rpm/build_package.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stack/indexer/rpm/build_package.sh b/stack/indexer/rpm/build_package.sh index 2ef8076c31..3d254e1bed 100755 --- a/stack/indexer/rpm/build_package.sh +++ b/stack/indexer/rpm/build_package.sh @@ -8,8 +8,6 @@ # License (version 2) as published by the FSF - Free Software # Foundation. -set -ex - current_path="$( cd $(dirname $0) ; pwd -P )" architecture="x86_64" outdir="${current_path}/output" @@ -158,6 +156,8 @@ main() { esac done + set -ex + build || clean 1 clean 0 From 680e61f066fe4de5ff6a83c474844926ffcecb9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 3 Feb 2023 13:49:00 +0100 Subject: [PATCH 188/328] Correct the condition for init.d deprecation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- rpms/SPECS/wazuh-agent.spec | 4 ++-- rpms/SPECS/wazuh-manager.spec | 4 ++-- stack/indexer/rpm/wazuh-indexer.spec | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rpms/SPECS/wazuh-agent.spec b/rpms/SPECS/wazuh-agent.spec index 26e7833f6f..650800a6dc 100644 --- a/rpms/SPECS/wazuh-agent.spec +++ b/rpms/SPECS/wazuh-agent.spec @@ -81,13 +81,13 @@ echo 'USER_AUTO_START="n"' >> ./etc/preloaded-vars.conf %endif # Create directories -if [ ! -f /usr/lib/systemd/systemd-sysv-install ]; then mkdir -p ${RPM_BUILD_ROOT}%{_initrddir}; fi +if [ -f /usr/lib/systemd/systemd-sysv-install ]; then mkdir -p ${RPM_BUILD_ROOT}%{_initrddir}; fi mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/.ssh # Copy the installed files into RPM_BUILD_ROOT directory cp -pr %{_localstatedir}/* ${RPM_BUILD_ROOT}%{_localstatedir}/ mkdir -p ${RPM_BUILD_ROOT}/usr/lib/systemd/system/ -if [ ! -f /usr/lib/systemd/systemd-sysv-install ]; then +if [ -f /usr/lib/systemd/systemd-sysv-install ]; then sed -i "s:WAZUH_HOME_TMP:%{_localstatedir}:g" src/init/templates/ossec-hids-rh.init install -m 0755 src/init/templates/ossec-hids-rh.init ${RPM_BUILD_ROOT}%{_initrddir}/wazuh-agent fi diff --git a/rpms/SPECS/wazuh-manager.spec b/rpms/SPECS/wazuh-manager.spec index e6b35f1eee..a7adb2c893 100644 --- a/rpms/SPECS/wazuh-manager.spec +++ b/rpms/SPECS/wazuh-manager.spec @@ -75,13 +75,13 @@ echo 'USER_CREATE_SSL_CERT="n"' >> ./etc/preloaded-vars.conf # Create directories -if [ ! -f /usr/lib/systemd/systemd-sysv-install ]; then mkdir -p ${RPM_BUILD_ROOT}%{_initrddir}; fi +if [ -f /usr/lib/systemd/systemd-sysv-install ]; then mkdir -p ${RPM_BUILD_ROOT}%{_initrddir}; fi mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/.ssh # Copy the installed files into RPM_BUILD_ROOT directory cp -pr %{_localstatedir}/* ${RPM_BUILD_ROOT}%{_localstatedir}/ mkdir -p ${RPM_BUILD_ROOT}/usr/lib/systemd/system/ -if [ ! -f /usr/lib/systemd/systemd-sysv-install ]; then +if [ -f /usr/lib/systemd/systemd-sysv-install ]; then sed -i "s:WAZUH_HOME_TMP:%{_localstatedir}:g" src/init/templates/ossec-hids-rh.init install -m 0755 src/init/templates/ossec-hids-rh.init ${RPM_BUILD_ROOT}%{_initrddir}/wazuh-manager fi diff --git a/stack/indexer/rpm/wazuh-indexer.spec b/stack/indexer/rpm/wazuh-indexer.spec index 5b889782e1..c6e7ac0927 100755 --- a/stack/indexer/rpm/wazuh-indexer.spec +++ b/stack/indexer/rpm/wazuh-indexer.spec @@ -164,7 +164,7 @@ if [ $1 = 1 ];then # Install fi -if [ ! -f /usr/lib/systemd/systemd-sysv-install ]; then +if [ -f /usr/lib/systemd/systemd-sysv-install ]; then rm -f /etc/init.d/%{name} fi From 066a21d5ef361637751f0bf9a3b6dbacc326c676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 3 Feb 2023 16:26:50 +0100 Subject: [PATCH 189/328] Change the condition to a macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- rpms/SPECS/wazuh-agent.spec | 13 +++++++++---- rpms/SPECS/wazuh-manager.spec | 14 +++++++++----- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/rpms/SPECS/wazuh-agent.spec b/rpms/SPECS/wazuh-agent.spec index 650800a6dc..3e848d9b7b 100644 --- a/rpms/SPECS/wazuh-agent.spec +++ b/rpms/SPECS/wazuh-agent.spec @@ -35,6 +35,7 @@ log analysis, file integrity monitoring, intrusions detection and policy and com ./gen_ossec.sh conf agent centos %rhel %{_localstatedir} > etc/ossec-agent.conf %build +%define initd_valid %( if [ -f /usr/lib/systemd/systemd-sysv-install ]; then echo "1" ; else echo "0"; fi ) pushd src # Rebuild for agent make clean @@ -81,16 +82,18 @@ echo 'USER_AUTO_START="n"' >> ./etc/preloaded-vars.conf %endif # Create directories -if [ -f /usr/lib/systemd/systemd-sysv-install ]; then mkdir -p ${RPM_BUILD_ROOT}%{_initrddir}; fi +%if %initd_valid + mkdir -p ${RPM_BUILD_ROOT}%{_initrddir} +%endif mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/.ssh # Copy the installed files into RPM_BUILD_ROOT directory cp -pr %{_localstatedir}/* ${RPM_BUILD_ROOT}%{_localstatedir}/ mkdir -p ${RPM_BUILD_ROOT}/usr/lib/systemd/system/ -if [ -f /usr/lib/systemd/systemd-sysv-install ]; then +%if %initd_valid sed -i "s:WAZUH_HOME_TMP:%{_localstatedir}:g" src/init/templates/ossec-hids-rh.init install -m 0755 src/init/templates/ossec-hids-rh.init ${RPM_BUILD_ROOT}%{_initrddir}/wazuh-agent -fi +%endif sed -i "s:WAZUH_HOME_TMP:%{_localstatedir}:g" src/init/templates/wazuh-agent.service install -m 0644 src/init/templates/wazuh-agent.service ${RPM_BUILD_ROOT}/usr/lib/systemd/system/ @@ -488,7 +491,9 @@ rm -fr %{buildroot} %files %defattr(-,root,root) -%config(missingok) %{_initrddir}/wazuh-agent +%if %initd_valid + %config(missingok) %{_initrddir}/wazuh-agent +%endif %attr(640, root, wazuh) %verify(not md5 size mtime) %ghost %{_sysconfdir}/ossec-init.conf /usr/lib/systemd/system/wazuh-agent.service %dir %attr(750, root, wazuh) %{_localstatedir} diff --git a/rpms/SPECS/wazuh-manager.spec b/rpms/SPECS/wazuh-manager.spec index a7adb2c893..e3eef3d6c6 100644 --- a/rpms/SPECS/wazuh-manager.spec +++ b/rpms/SPECS/wazuh-manager.spec @@ -36,6 +36,7 @@ log analysis, file integrity monitoring, intrusions detection and policy and com ./gen_ossec.sh conf manager centos %rhel %{_localstatedir} > etc/ossec-server.conf %build +%define initd_valid %( if [ -f /usr/lib/systemd/systemd-sysv-install ]; then echo "1" ; else echo "0"; fi ) pushd src # Rebuild for server make clean @@ -74,17 +75,18 @@ echo 'USER_CREATE_SSL_CERT="n"' >> ./etc/preloaded-vars.conf ./install.sh # Create directories - -if [ -f /usr/lib/systemd/systemd-sysv-install ]; then mkdir -p ${RPM_BUILD_ROOT}%{_initrddir}; fi +%if %initd_valid + mkdir -p ${RPM_BUILD_ROOT}%{_initrddir} +%endif mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/.ssh # Copy the installed files into RPM_BUILD_ROOT directory cp -pr %{_localstatedir}/* ${RPM_BUILD_ROOT}%{_localstatedir}/ mkdir -p ${RPM_BUILD_ROOT}/usr/lib/systemd/system/ -if [ -f /usr/lib/systemd/systemd-sysv-install ]; then +%if %initd_valid sed -i "s:WAZUH_HOME_TMP:%{_localstatedir}:g" src/init/templates/ossec-hids-rh.init install -m 0755 src/init/templates/ossec-hids-rh.init ${RPM_BUILD_ROOT}%{_initrddir}/wazuh-manager -fi +%endif sed -i "s:WAZUH_HOME_TMP:%{_localstatedir}:g" src/init/templates/wazuh-manager.service install -m 0644 src/init/templates/wazuh-manager.service ${RPM_BUILD_ROOT}/usr/lib/systemd/system/ @@ -578,7 +580,9 @@ rm -fr %{buildroot} %files %defattr(-,root,wazuh) -%config(missingok) %{_initrddir}/wazuh-manager +%if %initd_valid + %config(missingok) %{_initrddir}/wazuh-agent +%endif %attr(640, root, wazuh) %verify(not md5 size mtime) %ghost %{_sysconfdir}/ossec-init.conf /usr/lib/systemd/system/wazuh-manager.service %dir %attr(750, root, wazuh) %{_localstatedir} From c61261c0d2197b2c83734c0457cdacf3a85d3115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 3 Feb 2023 16:27:12 +0100 Subject: [PATCH 190/328] Remove trailing whitespace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- rpms/build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rpms/build.sh b/rpms/build.sh index b6006f30af..91c1bd9ab1 100755 --- a/rpms/build.sh +++ b/rpms/build.sh @@ -73,7 +73,7 @@ else specs_path="/specs" fi -if [[ "${future}" == "yes" ]]; then +if [[ "${future}" == "yes" ]]; then # MODIFY VARIABLES base_version=$wazuh_version MAJOR=$(echo $base_version | cut -dv -f2 | cut -d. -f1) @@ -112,6 +112,7 @@ if [ "${legacy}" = "no" ]; then fi # Building RPM +set -ex $linux $rpmbuild --define "_sysconfdir /etc" --define "_topdir ${rpm_build_dir}" \ --define "_threads ${threads}" --define "_release ${package_release}" \ --define "_localstatedir ${directory_base}" --define "_debugenabled ${debug}" \ From ad78e4b494e07a7b48c61a454968f82e1fa0b745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 3 Feb 2023 16:54:25 +0100 Subject: [PATCH 191/328] Only create the correspondent docker image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-deb-images.yml | 13 +++++++++++++ .github/workflows/upload-rpm-images.yml | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/.github/workflows/upload-deb-images.yml b/.github/workflows/upload-deb-images.yml index 7f8d5969cb..d44da9c428 100644 --- a/.github/workflows/upload-deb-images.yml +++ b/.github/workflows/upload-deb-images.yml @@ -31,6 +31,18 @@ jobs: - uses: actions/checkout@v3 + - name: Get changed files + uses: dorny/paths-filter@v2 + id: changes + with: + filters: | + i386: + - 'debs/Debian/i386/**' + - 'debs/build.sh' + amd64: + - 'debs/Debian/amd64/**' + - 'debs/build.sh' + - name: Copy build.sh to Dockerfile path run: cp $GITHUB_WORKSPACE/debs/build.sh $GITHUB_WORKSPACE/${{ matrix.image.DOCKERFILE_PATH }} @@ -40,6 +52,7 @@ jobs: if [ "${{ github.event_name }}" == "pull_request" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV; fi - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} with tag ${{ env.TAG }} to Github Container Registry + if: ( steps.changes.outputs.i386 == 'true' && matrix.CONTAINER_NAME == "deb_builder_i386" ) || ( steps.changes.outputs.amd64 == 'true' && matrix.CONTAINER_NAME == "deb_builder_amd64" ) run: bash $GITHUB_WORKSPACE/.github/actions/ghcr-pull-and-push/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }} diff --git a/.github/workflows/upload-rpm-images.yml b/.github/workflows/upload-rpm-images.yml index a4f7cffd01..1368890bcf 100644 --- a/.github/workflows/upload-rpm-images.yml +++ b/.github/workflows/upload-rpm-images.yml @@ -31,6 +31,18 @@ jobs: - uses: actions/checkout@v3 + - name: Get changed files + uses: dorny/paths-filter@v2 + id: changes + with: + filters: | + i386: + - 'rpms/CentOS/6/i386/**' + - 'rpms/build.sh' + x86_64: + - 'rpms/CentOS/6/x86_64/**' + - 'rpms/build.sh' + - name: Copy build.sh to Dockerfile path run: cp $GITHUB_WORKSPACE/rpms/build.sh $GITHUB_WORKSPACE/${{ matrix.image.DOCKERFILE_PATH }} @@ -40,6 +52,7 @@ jobs: if [ "${{ github.event_name }}" == "pull_request" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV; fi - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} with tag ${{ env.TAG }} to Github Container Registry + if: ( steps.changes.outputs.i386 == 'true' && matrix.CONTAINER_NAME == "rpm_builder_i386" ) || ( steps.changes.outputs.amd64 == 'true' && matrix.CONTAINER_NAME == "rpm_builder_x86" ) run: bash $GITHUB_WORKSPACE/.github/actions/ghcr-pull-and-push/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }} From 2ae6fd4a23d772bf6c5c55d3170e500faa92a30d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 3 Feb 2023 17:02:22 +0100 Subject: [PATCH 192/328] Add the changes to build_packages and fix in upload images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 7 +++++++ .github/workflows/build-rpm-packages.yml | 7 +++++++ .github/workflows/upload-deb-images.yml | 2 +- .github/workflows/upload-rpm-images.yml | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index 4fbc38ffad..a4f7277f80 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -37,6 +37,12 @@ jobs: deb_images: - 'debs/Debian/**' - 'debs/build.sh' + deb_images_i386: + - 'debs/Debian/i386/**' + - 'debs/build.sh' + deb_images_amd64: + - 'debs/Debian/amd64/**' + - 'debs/build.sh' deb_packages: - 'debs/SPECS/**' - 'debs/generate_debian_package.sh' @@ -53,6 +59,7 @@ jobs: bash $GITHUB_WORKSPACE/.github/actions/ghcr-pull-and-push/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ env.TAG }} - name: Build the ${{ matrix.ARCHITECTURE }} deb Wazuh ${{ matrix.TYPE }} package + if: steps.changes.outputs.deb_packages == 'true' || (steps.changes.outputs.deb_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.deb_images_amd64 == 'true' && matrix.ARCHITECTURE == 'amd64') working-directory: ./debs run: | REVISION="${{ github.head_ref }}" diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 9a385478aa..a7b1871460 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -38,6 +38,12 @@ jobs: rpm_images: - 'rpms/CentOS/**' - 'rpms/build.sh' + rpm_images_i386: + - 'rpms/CentOS/6/i386/**' + - 'rpms/build.sh' + rpm_images_x86_64: + - 'rpms/CentOS/6/x86_64/**' + - 'rpms/build.sh' rpm_packages: - 'rpms/SPECS/**' - 'rpms/generate_rpm_package.sh' @@ -54,6 +60,7 @@ jobs: bash $GITHUB_WORKSPACE/.github/actions/ghcr-pull-and-push/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ env.TAG }} - name: Build the ${{ matrix.ARCHITECTURE }} rpm Wazuh ${{ matrix.TYPE }} package + if : steps.changes.outputs.rpm_packages == 'true' || (steps.changes.outputs.rpm_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.rpm_images_x86_64 == 'true' && matrix.ARCHITECTURE == 'x86_64' working-directory: ./rpms run: | REVISION=$( echo ${{ github.head_ref }} | sed 's/-/./g' ) diff --git a/.github/workflows/upload-deb-images.yml b/.github/workflows/upload-deb-images.yml index d44da9c428..a216abd904 100644 --- a/.github/workflows/upload-deb-images.yml +++ b/.github/workflows/upload-deb-images.yml @@ -52,7 +52,7 @@ jobs: if [ "${{ github.event_name }}" == "pull_request" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV; fi - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} with tag ${{ env.TAG }} to Github Container Registry - if: ( steps.changes.outputs.i386 == 'true' && matrix.CONTAINER_NAME == "deb_builder_i386" ) || ( steps.changes.outputs.amd64 == 'true' && matrix.CONTAINER_NAME == "deb_builder_amd64" ) + if: ( steps.changes.outputs.i386 == 'true' && matrix.CONTAINER_NAME == 'deb_builder_i386' ) || ( steps.changes.outputs.amd64 == 'true' && matrix.CONTAINER_NAME == 'deb_builder_amd64' ) run: bash $GITHUB_WORKSPACE/.github/actions/ghcr-pull-and-push/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }} diff --git a/.github/workflows/upload-rpm-images.yml b/.github/workflows/upload-rpm-images.yml index 1368890bcf..0a340447f9 100644 --- a/.github/workflows/upload-rpm-images.yml +++ b/.github/workflows/upload-rpm-images.yml @@ -52,7 +52,7 @@ jobs: if [ "${{ github.event_name }}" == "pull_request" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV; fi - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} with tag ${{ env.TAG }} to Github Container Registry - if: ( steps.changes.outputs.i386 == 'true' && matrix.CONTAINER_NAME == "rpm_builder_i386" ) || ( steps.changes.outputs.amd64 == 'true' && matrix.CONTAINER_NAME == "rpm_builder_x86" ) + if: ( steps.changes.outputs.i386 == 'true' && matrix.CONTAINER_NAME == 'rpm_builder_i386' ) || ( steps.changes.outputs.amd64 == 'true' && matrix.CONTAINER_NAME == 'rpm_builder_x86' ) run: bash $GITHUB_WORKSPACE/.github/actions/ghcr-pull-and-push/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }} From 56790180b3f3274b97b27306981404e1d99279ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 3 Feb 2023 17:04:52 +0100 Subject: [PATCH 193/328] Add changes to test install MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../workflows/test-install-and-enable-deb.yml | 19 +++++++++++++++++++ .../workflows/test-install-and-enable-rpm.yml | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index 86e2cd9dc9..60019ea788 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -30,8 +30,27 @@ jobs: sha: ${{ github.event.pull_request.head.sha || github.sha }} wait-interval: 60 + - name: Get changed files + uses: dorny/paths-filter@v2 + id: changes + with: + filters: | + deb_images: + - 'debs/Debian/**' + - 'debs/build.sh' + deb_images_i386: + - 'debs/Debian/i386/**' + - 'debs/build.sh' + deb_images_amd64: + - 'debs/Debian/amd64/**' + - 'debs/build.sh' + deb_packages: + - 'debs/SPECS/**' + - 'debs/generate_debian_package.sh' + Test-install-and-enable-deb-systems: needs: Wait-for-package-building + if: steps.changes.outputs.deb_packages == 'true' || (steps.changes.outputs.deb_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.deb_images_amd64 == 'true' && matrix.ARCHITECTURE == 'amd64') runs-on: ubuntu-latest strategy: matrix: diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 9025c2e491..f4bfd57a17 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -29,8 +29,27 @@ jobs: sha: ${{ github.event.pull_request.head.sha || github.sha }} wait-interval: 60 + - name: Get changed files + uses: dorny/paths-filter@v2 + id: changes + with: + filters: | + rpm_images: + - 'rpms/CentOS/**' + - 'rpms/build.sh' + rpm_images_i386: + - 'rpms/CentOS/6/i386/**' + - 'rpms/build.sh' + rpm_images_x86_64: + - 'rpms/CentOS/6/x86_64/**' + - 'rpms/build.sh' + rpm_packages: + - 'rpms/SPECS/**' + - 'rpms/generate_rpm_package.sh' + Test-install-and-enable-rpm-systems: needs: Wait-for-package-building + if : steps.changes.outputs.rpm_packages == 'true' || (steps.changes.outputs.rpm_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.rpm_images_x86_64 == 'true' && matrix.ARCHITECTURE == 'x86_64' runs-on: ubuntu-latest strategy: matrix: From 908ef357f4d2c6b3f6591f9366b4e712e3ccc0e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 3 Feb 2023 17:06:09 +0100 Subject: [PATCH 194/328] Missing parenthesis MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-rpm-packages.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index a7b1871460..b40536fc4f 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -60,7 +60,7 @@ jobs: bash $GITHUB_WORKSPACE/.github/actions/ghcr-pull-and-push/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ env.TAG }} - name: Build the ${{ matrix.ARCHITECTURE }} rpm Wazuh ${{ matrix.TYPE }} package - if : steps.changes.outputs.rpm_packages == 'true' || (steps.changes.outputs.rpm_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.rpm_images_x86_64 == 'true' && matrix.ARCHITECTURE == 'x86_64' + if : steps.changes.outputs.rpm_packages == 'true' || (steps.changes.outputs.rpm_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.rpm_images_x86_64 == 'true' && matrix.ARCHITECTURE == 'x86_64') working-directory: ./rpms run: | REVISION=$( echo ${{ github.head_ref }} | sed 's/-/./g' ) From 39ea44e9b6e8e95a9f05f091169a50216357cb74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 3 Feb 2023 17:09:47 +0100 Subject: [PATCH 195/328] Change how the conditionals are called in the test install files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../workflows/test-install-and-enable-deb.yml | 39 ++++++++++-------- .../workflows/test-install-and-enable-rpm.yml | 41 ++++++++++--------- 2 files changed, 43 insertions(+), 37 deletions(-) diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-and-enable-deb.yml index 60019ea788..0ad0d8a5fd 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-and-enable-deb.yml @@ -30,6 +30,23 @@ jobs: sha: ${{ github.event.pull_request.head.sha || github.sha }} wait-interval: 60 + Test-install-and-enable-deb-systems: + needs: Wait-for-package-building + runs-on: ubuntu-latest + strategy: + matrix: + distro_name: ['ubuntu:xenial', 'ubuntu:bionic', 'ubuntu:focal', 'ubuntu:jammy', 'debian:stretch', 'debian:buster', 'debian:bullseye'] + type: [agent, manager] + arch: [amd64, i386] + exclude: + - type: manager + arch: i386 + - distro_name: 'ubuntu:jammy' + arch: i386 + fail-fast: false + steps: + - uses: actions/checkout@v3 + - name: Get changed files uses: dorny/paths-filter@v2 id: changes @@ -48,31 +65,15 @@ jobs: - 'debs/SPECS/**' - 'debs/generate_debian_package.sh' - Test-install-and-enable-deb-systems: - needs: Wait-for-package-building - if: steps.changes.outputs.deb_packages == 'true' || (steps.changes.outputs.deb_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.deb_images_amd64 == 'true' && matrix.ARCHITECTURE == 'amd64') - runs-on: ubuntu-latest - strategy: - matrix: - distro_name: ['ubuntu:xenial', 'ubuntu:bionic', 'ubuntu:focal', 'ubuntu:jammy', 'debian:stretch', 'debian:buster', 'debian:bullseye'] - type: [agent, manager] - arch: [amd64, i386] - exclude: - - type: manager - arch: i386 - - distro_name: 'ubuntu:jammy' - arch: i386 - fail-fast: false - steps: - - uses: actions/checkout@v3 - - name: Setup directories and variables + if: steps.changes.outputs.deb_packages == 'true' || (steps.changes.outputs.deb_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.deb_images_amd64 == 'true' && matrix.ARCHITECTURE == 'amd64') run: | VERSION=$(cat $GITHUB_WORKSPACE/VERSION) REVISION=$( echo ${{ github.head_ref }}) echo "PACKAGE_NAME=wazuh-${{ matrix.type }}_${VERSION}-${REVISION}_${{ matrix.arch }}.deb" >> $GITHUB_ENV - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} + if: steps.changes.outputs.deb_packages == 'true' || (steps.changes.outputs.deb_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.deb_images_amd64 == 'true' && matrix.ARCHITECTURE == 'amd64') id: download-artifact continue-on-error: true uses: dawidd6/action-download-artifact@v2 @@ -83,9 +84,11 @@ jobs: if_no_artifact_found: fail - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.distro_name }} to the packages directory + if: steps.changes.outputs.deb_packages == 'true' || (steps.changes.outputs.deb_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.deb_images_amd64 == 'true' && matrix.ARCHITECTURE == 'amd64') run: | mkdir $GITHUB_WORKSPACE/packages mv ${{env.PACKAGE_NAME}} $GITHUB_WORKSPACE/packages - name: Launch docker + if: steps.changes.outputs.deb_packages == 'true' || (steps.changes.outputs.deb_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.deb_images_amd64 == 'true' && matrix.ARCHITECTURE == 'amd64') run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-install-enable/:/tests -v $GITHUB_WORKSPACE/packages/:/packages ${{ matrix.arch }}/${{ matrix.distro_name }} bash /tests/install_and_enable.sh $PACKAGE_NAME ${{ matrix.type }} \ No newline at end of file diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index f4bfd57a17..027de4d06e 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -29,27 +29,8 @@ jobs: sha: ${{ github.event.pull_request.head.sha || github.sha }} wait-interval: 60 - - name: Get changed files - uses: dorny/paths-filter@v2 - id: changes - with: - filters: | - rpm_images: - - 'rpms/CentOS/**' - - 'rpms/build.sh' - rpm_images_i386: - - 'rpms/CentOS/6/i386/**' - - 'rpms/build.sh' - rpm_images_x86_64: - - 'rpms/CentOS/6/x86_64/**' - - 'rpms/build.sh' - rpm_packages: - - 'rpms/SPECS/**' - - 'rpms/generate_rpm_package.sh' - Test-install-and-enable-rpm-systems: needs: Wait-for-package-building - if : steps.changes.outputs.rpm_packages == 'true' || (steps.changes.outputs.rpm_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.rpm_images_x86_64 == 'true' && matrix.ARCHITECTURE == 'x86_64' runs-on: ubuntu-latest strategy: matrix: @@ -72,13 +53,33 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Get changed files + uses: dorny/paths-filter@v2 + id: changes + with: + filters: | + rpm_images: + - 'rpms/CentOS/**' + - 'rpms/build.sh' + rpm_images_i386: + - 'rpms/CentOS/6/i386/**' + - 'rpms/build.sh' + rpm_images_x86_64: + - 'rpms/CentOS/6/x86_64/**' + - 'rpms/build.sh' + rpm_packages: + - 'rpms/SPECS/**' + - 'rpms/generate_rpm_package.sh' + - name: Setup directories and variables + if : steps.changes.outputs.rpm_packages == 'true' || (steps.changes.outputs.rpm_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.rpm_images_x86_64 == 'true' && matrix.ARCHITECTURE == 'x86_64' run: | VERSION=$(cat $GITHUB_WORKSPACE/VERSION) REVISION=$( echo ${{ github.head_ref }} | sed 's/-/./g' ) echo "PACKAGE_NAME=wazuh-${{ matrix.type }}-${VERSION}-${REVISION}.${{matrix.system.ARCH}}.rpm" >> $GITHUB_ENV - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} + if : steps.changes.outputs.rpm_packages == 'true' || (steps.changes.outputs.rpm_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.rpm_images_x86_64 == 'true' && matrix.ARCHITECTURE == 'x86_64' id: download-artifact continue-on-error: true uses: dawidd6/action-download-artifact@v2 @@ -89,9 +90,11 @@ jobs: if_no_artifact_found: fail - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} to the packages directory + if : steps.changes.outputs.rpm_packages == 'true' || (steps.changes.outputs.rpm_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.rpm_images_x86_64 == 'true' && matrix.ARCHITECTURE == 'x86_64' run: | mkdir $GITHUB_WORKSPACE/packages mv ${{env.PACKAGE_NAME}} $GITHUB_WORKSPACE/packages - name: Launch docker + if : steps.changes.outputs.rpm_packages == 'true' || (steps.changes.outputs.rpm_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.rpm_images_x86_64 == 'true' && matrix.ARCHITECTURE == 'x86_64' run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-install-enable/:/tests -v $GITHUB_WORKSPACE/packages/:/packages ${{ matrix.system.NAME }} bash /tests/install_and_enable.sh $PACKAGE_NAME ${{ matrix.type }} \ No newline at end of file From b51b44985106fbca0bcdffc2334af29cbe330c2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 3 Feb 2023 17:11:27 +0100 Subject: [PATCH 196/328] Missing parenthesis MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-rpm.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 027de4d06e..21f2bd1e30 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -72,14 +72,14 @@ jobs: - 'rpms/generate_rpm_package.sh' - name: Setup directories and variables - if : steps.changes.outputs.rpm_packages == 'true' || (steps.changes.outputs.rpm_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.rpm_images_x86_64 == 'true' && matrix.ARCHITECTURE == 'x86_64' + if : steps.changes.outputs.rpm_packages == 'true' || (steps.changes.outputs.rpm_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.rpm_images_x86_64 == 'true' && matrix.ARCHITECTURE == 'x86_64') run: | VERSION=$(cat $GITHUB_WORKSPACE/VERSION) REVISION=$( echo ${{ github.head_ref }} | sed 's/-/./g' ) echo "PACKAGE_NAME=wazuh-${{ matrix.type }}-${VERSION}-${REVISION}.${{matrix.system.ARCH}}.rpm" >> $GITHUB_ENV - name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} - if : steps.changes.outputs.rpm_packages == 'true' || (steps.changes.outputs.rpm_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.rpm_images_x86_64 == 'true' && matrix.ARCHITECTURE == 'x86_64' + if : steps.changes.outputs.rpm_packages == 'true' || (steps.changes.outputs.rpm_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.rpm_images_x86_64 == 'true' && matrix.ARCHITECTURE == 'x86_64') id: download-artifact continue-on-error: true uses: dawidd6/action-download-artifact@v2 @@ -90,11 +90,11 @@ jobs: if_no_artifact_found: fail - name: Move the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }} to the packages directory - if : steps.changes.outputs.rpm_packages == 'true' || (steps.changes.outputs.rpm_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.rpm_images_x86_64 == 'true' && matrix.ARCHITECTURE == 'x86_64' + if : steps.changes.outputs.rpm_packages == 'true' || (steps.changes.outputs.rpm_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.rpm_images_x86_64 == 'true' && matrix.ARCHITECTURE == 'x86_64') run: | mkdir $GITHUB_WORKSPACE/packages mv ${{env.PACKAGE_NAME}} $GITHUB_WORKSPACE/packages - name: Launch docker - if : steps.changes.outputs.rpm_packages == 'true' || (steps.changes.outputs.rpm_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.rpm_images_x86_64 == 'true' && matrix.ARCHITECTURE == 'x86_64' + if : steps.changes.outputs.rpm_packages == 'true' || (steps.changes.outputs.rpm_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.rpm_images_x86_64 == 'true' && matrix.ARCHITECTURE == 'x86_64') run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-install-enable/:/tests -v $GITHUB_WORKSPACE/packages/:/packages ${{ matrix.system.NAME }} bash /tests/install_and_enable.sh $PACKAGE_NAME ${{ matrix.type }} \ No newline at end of file From 865d0a5e1241ea10de61582f9573266bfe9b8b87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 3 Feb 2023 17:23:27 +0100 Subject: [PATCH 197/328] Changed condition for wazuh indexer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- stack/indexer/rpm/wazuh-indexer.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack/indexer/rpm/wazuh-indexer.spec b/stack/indexer/rpm/wazuh-indexer.spec index c6e7ac0927..5b889782e1 100755 --- a/stack/indexer/rpm/wazuh-indexer.spec +++ b/stack/indexer/rpm/wazuh-indexer.spec @@ -164,7 +164,7 @@ if [ $1 = 1 ];then # Install fi -if [ -f /usr/lib/systemd/systemd-sysv-install ]; then +if [ ! -f /usr/lib/systemd/systemd-sysv-install ]; then rm -f /etc/init.d/%{name} fi From 378f5ec69f17367827afc26491e19904c9988c41 Mon Sep 17 00:00:00 2001 From: Gabriel Date: Wed, 11 Jan 2023 12:38:23 -0300 Subject: [PATCH 198/328] fix: Improve find command with xargs --- debs/SPECS/wazuh-manager/debian/postinst | 8 ++++---- rpms/SPECS/wazuh-manager.spec | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/debs/SPECS/wazuh-manager/debian/postinst b/debs/SPECS/wazuh-manager/debian/postinst index 240754a93e..c5c84fc29e 100644 --- a/debs/SPECS/wazuh-manager/debian/postinst +++ b/debs/SPECS/wazuh-manager/debian/postinst @@ -240,17 +240,17 @@ case "$1" in # Remove old ossec user and group if exists and change ownwership of files if getent group ossec > /dev/null 2>&1; then - find ${DIR}/ -group ossec -user root -exec chown root:wazuh {} \; > /dev/null 2>&1 || true + find ${DIR}/ -group ossec -user root -print0 | xargs -0 chown root:wazuh > /dev/null 2>&1 || true if getent passwd ossec > /dev/null 2>&1; then - find ${DIR}/ -group ossec -user ossec -exec chown ${USER}:${GROUP} {} \; > /dev/null 2>&1 || true + find ${DIR}/ -group ossec -user ossec -print0 | xargs -0 chown ${USER}:${GROUP} > /dev/null 2>&1 || true deluser ossec > /dev/null 2>&1 fi if getent passwd ossecm > /dev/null 2>&1; then - find ${DIR}/ -group ossec -user ossecm -exec chown ${USER}:${GROUP} {} \; > /dev/null 2>&1 || true + find ${DIR}/ -group ossec -user ossecm -print0 | xargs -0 chown ${USER}:${GROUP} > /dev/null 2>&1 || true deluser ossecm > /dev/null 2>&1 fi if getent passwd ossecr > /dev/null 2>&1; then - find ${DIR}/ -group ossec -user ossecr -exec chown ${USER}:${GROUP} {} \; > /dev/null 2>&1 || true + find ${DIR}/ -group ossec -user ossecr -print0 | xargs -0 chown ${USER}:${GROUP} > /dev/null 2>&1 || true deluser ossecr > /dev/null 2>&1 fi if getent group ossec > /dev/null 2>&1; then diff --git a/rpms/SPECS/wazuh-manager.spec b/rpms/SPECS/wazuh-manager.spec index 544136e75c..dedcc57b4f 100644 --- a/rpms/SPECS/wazuh-manager.spec +++ b/rpms/SPECS/wazuh-manager.spec @@ -451,17 +451,17 @@ rm -f %{_localstatedir}/etc/shared/default/*.rpmnew # Remove old ossec user and group if exists and change ownwership of files if getent group ossec > /dev/null 2>&1; then - find %{_localstatedir}/ -group ossec -user root -exec chown root:wazuh {} \; > /dev/null 2>&1 || true + find %{_localstatedir}/ -group ossec -user root -print0 | xargs -0 chown root:wazuh > /dev/null 2>&1 || true if getent passwd ossec > /dev/null 2>&1; then - find %{_localstatedir}/ -group ossec -user ossec -exec chown wazuh:wazuh {} \; > /dev/null 2>&1 || true + find %{_localstatedir}/ -group ossec -user ossec -print0 | xargs -0 chown wazuh:wazuh > /dev/null 2>&1 || true userdel ossec > /dev/null 2>&1 fi if getent passwd ossecm > /dev/null 2>&1; then - find %{_localstatedir}/ -group ossec -user ossecm -exec chown wazuh:wazuh {} \; > /dev/null 2>&1 || true + find %{_localstatedir}/ -group ossec -user ossecm -print0 | xargs -0 chown wazuh:wazuh > /dev/null 2>&1 || true userdel ossecm > /dev/null 2>&1 fi if getent passwd ossecr > /dev/null 2>&1; then - find %{_localstatedir}/ -group ossec -user ossecr -exec chown wazuh:wazuh {} \; > /dev/null 2>&1 || true + find %{_localstatedir}/ -group ossec -user ossecr -print0 | xargs -0 chown wazuh:wazuh > /dev/null 2>&1 || true userdel ossecr > /dev/null 2>&1 fi if getent group ossec > /dev/null 2>&1; then From 0a651da1fbb5da9c678db8a6a395f48eed0da0a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Correa=20Rodr=C3=ADguez?= <72193239+davidcr01@users.noreply.github.com> Date: Mon, 6 Feb 2023 11:00:57 +0100 Subject: [PATCH 199/328] Improval of the `curl` tool in the Installation Assistant (#2063) * Added retry params to curls of unattended * Removed unnecessary params of curl * Fix previous * Removed params of connections of dashboard and indexer * Added --retry-connrefused option * Checked simple AIO curl commands * Checked checkFilebeatURL curls * Added --fail option to offline download * Offline installation checked * Changed curls of dashboard and indexer. Improved offline installation * Deleted --retry-connrefused of the builder.sh * Removed changes of builder.sh * Added installCommon_curl and its dependencies * Changed curls to installCommon_curl * Fixed indexer_startCluster curl * Separated curls in indexer_startCluster * Fixed changePassword curls * Improval of dashboard_initialize * Import of GPG key improved * Changed indexer.sh curls * Improved comments and added blank line * Changed curl to common.sh * Changed curl check and connrefused variable * Changed curl variable * Changed invocation of check_curlVersion * Improved curl check in installPrerequisites * Improved checks of the installed dependencies * Removed installed curl check in curlVersion --- .../common_functions/common.sh | 23 ++++++++++++++- .../install_functions/checks.sh | 24 +++++++++++++++- .../install_functions/dashboard.sh | 20 ++++--------- .../install_functions/filebeat.sh | 6 ++-- .../install_functions/indexer.sh | 27 +++++++----------- .../install_functions/installCommon.sh | 24 ++++++++++------ .../install_functions/installMain.sh | 1 + .../wazuh-offline-download.sh | 16 +++++------ .../passwords_tool/passwordsFunctions.sh | 28 +++++++++---------- 9 files changed, 102 insertions(+), 67 deletions(-) diff --git a/unattended_installer/common_functions/common.sh b/unattended_installer/common_functions/common.sh index b38315b781..06186f89c6 100644 --- a/unattended_installer/common_functions/common.sh +++ b/unattended_installer/common_functions/common.sh @@ -134,8 +134,29 @@ function common_checkWazuhConfigYaml() { } +# Retries even if the --retry-connrefused is not available +function common_curl() { + + if [ -n "${curl_has_connrefused}" ]; then + eval "curl $@ --retry-connrefused" + e_code="${PIPESTATUS[0]}" + else + retries=0 + eval "curl $@" + e_code="${PIPESTATUS[0]}" + while [ "${e_code}" -eq 7 ] && [ "${retries}" -ne 12 ]; do + retries=$((retries+1)) + sleep 5 + eval "curl $@" + e_code="${PIPESTATUS[0]}" + done + fi + return "${e_code}" + +} + function common_remove_gpg_key() { - + if [ "${sys_type}" == "yum" ]; then if { rpm -q gpg-pubkey --qf '%{NAME}-%{VERSION}-%{RELEASE}\t%{SUMMARY}\n' | grep "Wazuh"; } >/dev/null ; then key=$(rpm -q gpg-pubkey --qf '%{NAME}-%{VERSION}-%{RELEASE}\t%{SUMMARY}\n' | grep "Wazuh Signing Key" | awk '{print $1}' ) diff --git a/unattended_installer/install_functions/checks.sh b/unattended_installer/install_functions/checks.sh index 643299cc90..f2954a83d4 100644 --- a/unattended_installer/install_functions/checks.sh +++ b/unattended_installer/install_functions/checks.sh @@ -166,6 +166,17 @@ function checks_arguments() { } +# Checks if the --retry-connrefused is available in curl +function check_curlVersion() { + + # --retry-connrefused was added in 7.52.0 + curl_version=$(curl -V | head -n 1 | awk '{ print $2 }') + if [ $(check_versions ${curl_version} 7.52.0) == "0" ]; then + curl_has_connrefused=0 + fi + +} + function check_dist() { dist_detect if [ "${DIST_NAME}" != "centos" ] && [ "${DIST_NAME}" != "rhel" ] && [ "${DIST_NAME}" != "amzn" ] && [ "${DIST_NAME}" != "ubuntu" ]; then @@ -330,4 +341,15 @@ function checks_ports() { exit 1 fi -} \ No newline at end of file +} + +# Checks if the first version is greater equal than to second one +function check_versions() { + + if test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" == "$1"; then + echo 0 + else + echo 1 + fi + +} diff --git a/unattended_installer/install_functions/dashboard.sh b/unattended_installer/install_functions/dashboard.sh index bff659ff3a..9b1395775a 100644 --- a/unattended_installer/install_functions/dashboard.sh +++ b/unattended_installer/install_functions/dashboard.sh @@ -98,12 +98,7 @@ function dashboard_initialize() { print_ip="${nodes_dashboard_ip}" fi - until [ "$(curl -XGET https://"${nodes_dashboard_ip}"/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null)" -eq "200" ] || [ "${j}" -eq "12" ]; do - sleep 10 - j=$((j+1)) - done - - if [ ${j} -lt 12 ]; then + if [ "$(common_curl -XGET https://"${nodes_dashboard_ip}"/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null --max-time 300 --retry 12 --retry-delay 10 --fail)" -eq "200" ]; then if [ "${#server_node_names[@]}" -eq 1 ]; then wazuh_api_address=${server_node_ips[0]} else @@ -121,7 +116,7 @@ function dashboard_initialize() { common_logger -nl "--- Summary ---" common_logger -nl "You can access the web interface https://${print_ip}\n User: admin\n Password: ${u_pass}" - elif [ ${j} -eq 12 ]; then + else flag="-w" if [ -z "${force}" ]; then flag="-e" @@ -130,13 +125,12 @@ function dashboard_initialize() { common_logger "${flag}" "Cannot connect to Wazuh dashboard." for i in "${!indexer_node_ips[@]}"; do - curl=$(curl -XGET https://"${indexer_node_ips[i]}":9200/ -uadmin:"${u_pass}" -k -s) + curl=$(common_curl -XGET https://"${indexer_node_ips[i]}":9200/ -uadmin:"${u_pass}" -k -s --max-time 300 --retry 5 --retry-delay 5 --fail) exit_code=${PIPESTATUS[0]} if [[ "${exit_code}" -eq "7" ]]; then failed_connect=1 failed_nodes+=("${indexer_node_names[i]}") - fi - if [ "${curl}" == "OpenSearch Security not initialized." ]; then + elif [ "${exit_code}" -eq "22" ]; then sec_not_initialized=1 fi done @@ -164,11 +158,7 @@ function dashboard_initializeAIO() { common_logger "Initializing Wazuh dashboard web application." installCommon_getPass "admin" - until [ "$(curl -XGET https://localhost/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null)" -eq "200" ] || [ "${i}" -eq 12 ]; do - sleep 10 - i=$((i+1)) - done - if [ ${i} -eq 12 ]; then + if [ "$(common_curl -XGET https://localhost/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null --max-time 300 --retry 12 --retry-delay 10 --fail)" -ne "200" ]; then common_logger -e "Cannot connect to Wazuh dashboard." installCommon_rollBack exit 1 diff --git a/unattended_installer/install_functions/filebeat.sh b/unattended_installer/install_functions/filebeat.sh index 26447bd0e6..7c0e29448f 100644 --- a/unattended_installer/install_functions/filebeat.sh +++ b/unattended_installer/install_functions/filebeat.sh @@ -8,15 +8,15 @@ function filebeat_configure(){ - eval "curl -so /etc/filebeat/wazuh-template.json ${filebeat_wazuh_template} --max-time 300 ${debug}" + eval "common_curl -so /etc/filebeat/wazuh-template.json ${filebeat_wazuh_template} --max-time 300 --retry 5 --retry-delay 5 --fail ${debug}" if [ ! -f "/etc/filebeat/wazuh-template.json" ]; then common_logger -e "Error downloading wazuh-template.json file." installCommon_rollBack exit 1 fi - + eval "chmod go+r /etc/filebeat/wazuh-template.json ${debug}" - eval "curl -s ${filebeat_wazuh_module} --max-time 300 | tar -xvz -C /usr/share/filebeat/module ${debug}" + eval "common_curl -s ${filebeat_wazuh_module} --max-time 300 --retry 5 --retry-delay 5 --fail | tar -xvz -C /usr/share/filebeat/module ${debug}" if [ ! -d "/usr/share/filebeat/module" ]; then common_logger -e "Error downloading wazuh filebeat module." installCommon_rollBack diff --git a/unattended_installer/install_functions/indexer.sh b/unattended_installer/install_functions/indexer.sh index bab72864b9..542aff48b2 100644 --- a/unattended_installer/install_functions/indexer.sh +++ b/unattended_installer/install_functions/indexer.sh @@ -29,7 +29,7 @@ function indexer_configure() { pos=0 { echo "node.name: ${indxname}" - echo "network.host: ${indexer_node_ips[0]}" + echo "network.host: ${indexer_node_ips[0]}" echo "cluster.initial_master_nodes: ${indxname}" echo "plugins.security.nodes_dn:" echo ' - CN='"${indxname}"',OU=Wazuh,O=Wazuh,L=California,C=US' @@ -111,12 +111,10 @@ function indexer_copyCertificates() { function indexer_initialize() { common_logger "Initializing Wazuh indexer cluster security settings." - i=0 - until curl -XGET https://"${indexer_node_ips[pos]}":9200/ -uadmin:admin -k --max-time 120 --silent --output /dev/null || [ "${i}" -eq 12 ]; do - sleep 10 - i=$((i+1)) - done - if [ ${i} -eq 12 ]; then + eval "common_curl -XGET https://"${indexer_node_ips[pos]}":9200/ -uadmin:admin -k --max-time 120 --silent --output /dev/null" + e_code="${PIPESTATUS[0]}" + + if [ "${e_code}" -ne "0" ]; then common_logger -e "Cannot initialize Wazuh indexer cluster." installCommon_rollBack exit 1 @@ -160,21 +158,16 @@ function indexer_install() { function indexer_startCluster() { - retries=0 for ip_to_test in "${indexer_node_ips[@]}"; do - eval "curl -XGET https://"${ip_to_test}":9200/ -k -s -o /dev/null" + eval "common_curl -XGET https://"${ip_to_test}":9200/ -k -s -o /dev/null" e_code="${PIPESTATUS[0]}" - until [ "${e_code}" -ne 7 ] || [ "${retries}" -eq 12 ]; do - sleep 10 - retries=$((retries+1)) - eval "curl -XGET https://"${ip_to_test}":9200/ -k -s -o /dev/null" - e_code="${PIPESTATUS[0]}" - done - if [ ${retries} -eq 12 ]; then + + if [ "${e_code}" -eq "7" ]; then common_logger -e "Connectivity check failed on node ${ip_to_test} port 9200. Possible causes: Wazuh indexer not installed on the node, the Wazuh indexer service is not running or you have connectivity issues with that node. Please check this before trying again." exit 1 fi done + eval "wazuh_indexer_ip=( $(cat /etc/wazuh-indexer/opensearch.yml | grep network.host | sed 's/network.host:\s//') )" eval "sudo -u wazuh-indexer JAVA_HOME=/usr/share/wazuh-indexer/jdk/ OPENSEARCH_CONF_DIR=/etc/wazuh-indexer /usr/share/wazuh-indexer/plugins/opensearch-security/tools/securityadmin.sh -cd /etc/wazuh-indexer/opensearch-security -icl -p 9200 -nhnv -cacert /etc/wazuh-indexer/certs/root-ca.pem -cert /etc/wazuh-indexer/certs/admin.pem -key /etc/wazuh-indexer/certs/admin-key.pem -h ${wazuh_indexer_ip} ${debug}" if [ "${PIPESTATUS[0]}" != 0 ]; then @@ -183,7 +176,7 @@ function indexer_startCluster() { else common_logger "Wazuh indexer cluster security configuration initialized." fi - eval "curl --silent ${filebeat_wazuh_template} | curl -X PUT 'https://${indexer_node_ips[pos]}:9200/_template/wazuh' -H 'Content-Type: application/json' -d @- -uadmin:admin -k --silent ${debug}" + eval "common_curl --silent ${filebeat_wazuh_template} --max-time 300 --retry 5 --retry-delay 5" | eval "common_curl -X PUT 'https://${indexer_node_ips[pos]}:9200/_template/wazuh' -H 'Content-Type: application/json' -d @- -uadmin:admin -k --silent --max-time 300 --retry 5 --retry-delay 5 ${debug}" if [ "${PIPESTATUS[0]}" != 0 ]; then common_logger -e "The wazuh-alerts template could not be inserted into the Wazuh indexer cluster." exit 1 diff --git a/unattended_installer/install_functions/installCommon.sh b/unattended_installer/install_functions/installCommon.sh index 644fa6bcd3..198f27fb88 100644 --- a/unattended_installer/install_functions/installCommon.sh +++ b/unattended_installer/install_functions/installCommon.sh @@ -42,10 +42,18 @@ function installCommon_addWazuhRepo() { if [ ! -f "/etc/yum.repos.d/wazuh.repo" ] && [ ! -f "/etc/zypp/repos.d/wazuh.repo" ] && [ ! -f "/etc/apt/sources.list.d/wazuh.list" ] ; then if [ "${sys_type}" == "yum" ]; then eval "rpm --import ${repogpg} ${debug}" + if [ "${PIPESTATUS[0]}" != 0 ]; then + common_logger -e "Cannot import Wazuh GPG key" + exit 1 + fi eval "echo -e '[wazuh]\ngpgcheck=1\ngpgkey=${repogpg}\nenabled=1\nname=EL-\${releasever} - Wazuh\nbaseurl='${repobaseurl}'/yum/\nprotect=1' | tee /etc/yum.repos.d/wazuh.repo ${debug}" eval "chmod 644 /etc/yum.repos.d/wazuh.repo ${debug}" elif [ "${sys_type}" == "apt-get" ]; then - eval "curl -s ${repogpg} --max-time 300 | gpg --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/wazuh.gpg --import - ${debug}" + eval "common_curl -s ${repogpg} --max-time 300 --retry 5 --retry-delay 5 --fail | gpg --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/wazuh.gpg --import - ${debug}" + if [ "${PIPESTATUS[0]}" != 0 ]; then + common_logger -e "Cannot import Wazuh GPG key" + exit 1 + fi eval "chmod 644 /usr/share/keyrings/wazuh.gpg ${debug}" eval "echo \"deb [signed-by=/usr/share/keyrings/wazuh.gpg] ${repobaseurl}/apt/ ${reporelease} main\" | tee /etc/apt/sources.list.d/wazuh.list ${debug}" eval "apt-get update -q ${debug}" @@ -97,8 +105,8 @@ function installCommon_changePasswordApi() { for i in "${!api_passwords[@]}"; do if [ -n "${wazuh}" ] || [ -n "${AIO}" ]; then passwords_getApiUserId "${api_users[i]}" - WAZUH_PASS_API='{"password":"'"${api_passwords[i]}"'"}' - eval 'curl -s -k -X PUT -H "Authorization: Bearer $TOKEN_API" -H "Content-Type: application/json" -d "$WAZUH_PASS_API" "https://localhost:55000/security/users/${user_id}" -o /dev/null' + WAZUH_PASS_API='{\"password\":\"'"${api_passwords[i]}"'\"}' + eval 'common_curl -s -k -X PUT -H \"Authorization: Bearer $TOKEN_API\" -H \"Content-Type: application/json\" -d "$WAZUH_PASS_API" "https://localhost:55000/security/users/${user_id}" -o /dev/null --max-time 300 --retry 5 --retry-delay 5 --fail' if [ "${api_users[i]}" == "${adminUser}" ]; then sleep 1 adminPassword="${api_passwords[i]}" @@ -112,8 +120,8 @@ function installCommon_changePasswordApi() { else if [ -n "${wazuh}" ] || [ -n "${AIO}" ]; then passwords_getApiUserId "${nuser}" - WAZUH_PASS_API='{"password":"'"${password}"'"}' - eval 'curl -s -k -X PUT -H "Authorization: Bearer $TOKEN_API" -H "Content-Type: application/json" -d "$WAZUH_PASS_API" "https://localhost:55000/security/users/${user_id}" -o /dev/null' + WAZUH_PASS_API='{\"password\":\"'"${password}"'\"}' + eval 'common_curl -s -k -X PUT -H \"Authorization: Bearer $TOKEN_API\" -H \"Content-Type: application/json\" -d "$WAZUH_PASS_API" "https://localhost:55000/security/users/${user_id}" -o /dev/null --max-time 300 --retry 5 --retry-delay 5 --fail' fi if [ "${nuser}" == "wazuh-wui" ] && { [ -n "${dashboard}" ] || [ -n "${AIO}" ]; }; then passwords_changeDashboardApiPassword "${password}" @@ -269,10 +277,10 @@ function installCommon_installPrerequisites() { not_installed=() for dep in "${dependencies[@]}"; do if [ "${dep}" == "openssl" ]; then - if ! yum list installed 2>/dev/null | grep -q "${dep}\.";then + if ! yum list installed 2>/dev/null | grep -q -E ^"${dep}\.";then not_installed+=("${dep}") fi - elif ! yum list installed 2>/dev/null | grep -q "${dep}";then + elif ! yum list installed 2>/dev/null | grep -q -E ^"${dep}";then not_installed+=("${dep}") fi done @@ -295,7 +303,7 @@ function installCommon_installPrerequisites() { not_installed=() for dep in "${dependencies[@]}"; do - if ! apt list --installed 2>/dev/null | grep -q "${dep}"; then + if ! apt list --installed 2>/dev/null | grep -q -E ^"${dep}"; then not_installed+=("${dep}") fi done diff --git a/unattended_installer/install_functions/installMain.sh b/unattended_installer/install_functions/installMain.sh index c97dcfc366..3909a73884 100755 --- a/unattended_installer/install_functions/installMain.sh +++ b/unattended_installer/install_functions/installMain.sh @@ -246,6 +246,7 @@ function main() { # -------------- Prerequisites and Wazuh repo ---------------------- if [ -n "${AIO}" ] || [ -n "${indexer}" ] || [ -n "${dashboard}" ] || [ -n "${wazuh}" ]; then installCommon_installPrerequisites + check_curlVersion installCommon_addWazuhRepo fi diff --git a/unattended_installer/install_functions/wazuh-offline-download.sh b/unattended_installer/install_functions/wazuh-offline-download.sh index fa8ead27b8..796e69d4df 100755 --- a/unattended_installer/install_functions/wazuh-offline-download.sh +++ b/unattended_installer/install_functions/wazuh-offline-download.sh @@ -52,7 +52,7 @@ function offline_download() { exit 1 fi - while curl -s -o /dev/null -w "%{http_code}" "${manager_base_url}/${manager_package}" | grep -q "200"; do + while common_curl -s -o /dev/null -w "%{http_code}" "${manager_base_url}/${manager_package}" --max-time 300 --retry 5 --retry-delay 5 --fail | grep -q "200"; do manager_revision=$((manager_revision+1)) if [ "${package_type}" == "rpm" ]; then manager_rpm_package="wazuh-manager-${wazuh_version}-${manager_revision}.x86_64.rpm" @@ -62,7 +62,7 @@ function offline_download() { manager_package="${manager_deb_package}" fi done - if [ "$manager_revision" -gt 1 ] && [ "$(curl -s -o /dev/null -w "%{http_code}" "${manager_base_url}/${manager_package}")" -ne "200" ]; then + if [ "$manager_revision" -gt 1 ] && [ "$(common_curl -s -o /dev/null -w "%{http_code}" "${manager_base_url}/${manager_package}" --max-time 300 --retry 5 --retry-delay 5 --fail)" -ne "200" ]; then manager_revision=$((manager_revision-1)) if [ "${package_type}" == "rpm" ]; then manager_rpm_package="wazuh-manager-${wazuh_version}-${manager_revision}.x86_64.rpm" @@ -71,7 +71,7 @@ function offline_download() { fi fi - while curl -s -o /dev/null -w "%{http_code}" "${indexer_base_url}/${indexer_package}" | grep -q "200"; do + while common_curl -s -o /dev/null -w "%{http_code}" "${indexer_base_url}/${indexer_package}" --max-time 300 --retry 5 --retry-delay 5 --fail | grep -q "200"; do indexer_revision=$((indexer_revision+1)) if [ "${package_type}" == "rpm" ]; then indexer_rpm_package="wazuh-indexer-${wazuh_version}-${indexer_revision}.x86_64.rpm" @@ -81,7 +81,7 @@ function offline_download() { indexer_package="${indexer_deb_package}" fi done - if [ "$indexer_revision" -gt 1 ] && [ "$(curl -s -o /dev/null -w "%{http_code}" "${indexer_base_url}/${indexer_package}")" -ne "200" ]; then + if [ "$indexer_revision" -gt 1 ] && [ "$(common_curl -s -o /dev/null -w "%{http_code}" "${indexer_base_url}/${indexer_package}" --max-time 300 --retry 5 --retry-delay 5 --fail)" -ne "200" ]; then indexer_revision=$((indexer_revision-1)) if [ "${package_type}" == "rpm" ]; then indexer_rpm_package="wazuh-indexer-${wazuh_version}-${indexer_revision}.x86_64.rpm" @@ -90,7 +90,7 @@ function offline_download() { fi fi - while curl -s -o /dev/null -w "%{http_code}" "${dashboard_base_url}/${dashboard_package}" | grep -q "200"; do + while common_curl -s -o /dev/null -w "%{http_code}" "${dashboard_base_url}/${dashboard_package}" --max-time 300 --retry 5 --retry-delay 5 --fail | grep -q "200"; do dashboard_revision=$((dashboard_revision+1)) if [ "${package_type}" == "rpm" ]; then dashboard_rpm_package="wazuh-dashboard-${wazuh_version}-${dashboard_revision}.x86_64.rpm" @@ -100,7 +100,7 @@ function offline_download() { dashboard_package="${dashboard_deb_package}" fi done - if [ "$dashboard_revision" -gt 1 ] && [ "$(curl -s -o /dev/null -w "%{http_code}" "${dashboard_base_url}/${dashboard_package}")" -ne "200" ]; then + if [ "$dashboard_revision" -gt 1 ] && [ "$(common_curl -s -o /dev/null -w "%{http_code}" "${dashboard_base_url}/${dashboard_package}" --max-time 300 --retry 5 --retry-delay 5 --fail)" -ne "200" ]; then dashboard_revision=$((dashboard_revision-1)) if [ "${package_type}" == "rpm" ]; then dashboard_rpm_package="wazuh-dashboard-${wazuh_version}-${dashboard_revision}.x86_64.rpm" @@ -115,7 +115,7 @@ function offline_download() { package_name="${package}_${package_type}_package" eval "package_base_url=${package}_${package_type}_base_url" - eval "curl -so ${dest_path}/${!package_name} ${!package_base_url}/${!package_name}" + eval "common_curl -so ${dest_path}/${!package_name} ${!package_base_url}/${!package_name} --max-time 300 --retry 5 --retry-delay 5 --fail" if [ "${PIPESTATUS[0]}" != 0 ]; then common_logger -e "The ${package} package could not be downloaded. Exiting." exit 1 @@ -145,7 +145,7 @@ function offline_download() { for file in "${files_to_download[@]}" do - eval "curl -sO ${file}" + eval "common_curl -sO ${file} --max-time 300 --retry 5 --retry-delay 5 --fail" if [ "${PIPESTATUS[0]}" != 0 ]; then common_logger -e "The resource ${file} could not be downloaded. Exiting." exit 1 diff --git a/unattended_installer/passwords_tool/passwordsFunctions.sh b/unattended_installer/passwords_tool/passwordsFunctions.sh index bd9e265303..ee40bfb53b 100644 --- a/unattended_installer/passwords_tool/passwordsFunctions.sh +++ b/unattended_installer/passwords_tool/passwordsFunctions.sh @@ -83,8 +83,8 @@ function passwords_changePasswordApi() { for i in "${!api_passwords[@]}"; do if [ -n "${wazuh_installed}" ]; then passwords_getApiUserId "${api_users[i]}" - WAZUH_PASS_API='{"password":"'"${api_passwords[i]}"'"}' - eval 'curl -s -k -X PUT -H "Authorization: Bearer $TOKEN_API" -H "Content-Type: application/json" -d "$WAZUH_PASS_API" "https://localhost:55000/security/users/${user_id}" -o /dev/null' + WAZUH_PASS_API='{\"password\":\"'"${api_passwords[i]}"'\"}' + eval 'common_curl -s -k -X PUT -H \"Authorization: Bearer $TOKEN_API\" -H \"Content-Type: application/json\" -d "$WAZUH_PASS_API" "https://localhost:55000/security/users/${user_id}" -o /dev/null --max-time 300 --retry 5 --retry-delay 5 --fail' if [ "${api_users[i]}" == "${adminUser}" ]; then sleep 1 adminPassword="${api_passwords[i]}" @@ -101,8 +101,8 @@ function passwords_changePasswordApi() { else if [ -n "${wazuh_installed}" ]; then passwords_getApiUserId "${nuser}" - WAZUH_PASS_API='{"password":"'"${password}"'"}' - eval 'curl -s -k -X PUT -H "Authorization: Bearer $TOKEN_API" -H "Content-Type: application/json" -d "$WAZUH_PASS_API" "https://localhost:55000/security/users/${user_id}" -o /dev/null' + WAZUH_PASS_API='{\"password\":\"'"${password}"'\"}' + eval 'common_curl -s -k -X PUT -H \"Authorization: Bearer $TOKEN_API\" -H \"Content-Type: application/json\" -d "$WAZUH_PASS_API" "https://localhost:55000/security/users/${user_id}" -o /dev/null --max-time 300 --retry 5 --retry-delay 5 --fail' if [ -z "${AIO}" ] && [ -z "${indexer}" ] && [ -z "${dashboard}" ] && [ -z "${wazuh}" ] && [ -z "${start_indexer_cluster}" ]; then common_logger -nl $"The password for Wazuh API user ${nuser} is ${password}" fi @@ -284,18 +284,18 @@ function passwords_generatePasswordFile() { for i in "${!users[@]}"; do { echo "# ${user_description[${i}]}" - echo " indexer_username: '${users[${i}]}'" - echo " indexer_password: '${passwords[${i}]}'" - echo "" + echo " indexer_username: '${users[${i}]}'" + echo " indexer_password: '${passwords[${i}]}'" + echo "" } >> "${gen_file}" done for i in "${!api_users[@]}"; do { - echo "# ${api_user_description[${i}]}" - echo " api_username: '${api_users[${i}]}'" + echo "# ${api_user_description[${i}]}" + echo " api_username: '${api_users[${i}]}'" echo " api_password: '${api_passwords[${i}]}'" - echo "" + echo "" } >> "${gen_file}" done @@ -303,7 +303,7 @@ function passwords_generatePasswordFile() { function passwords_getApiToken() { - TOKEN_API=$(curl -s -u "${adminUser}":"${adminPassword}" -k -X POST "https://localhost:55000/security/user/authenticate?raw=true") + TOKEN_API=$(common_curl -s -u "${adminUser}":"${adminPassword}" -k -X POST "https://localhost:55000/security/user/authenticate?raw=true" --max-time 300 --retry 5 --retry-delay 5) if [[ ${TOKEN_API} =~ "Invalid credentials" ]]; then common_logger -e "Invalid admin user credentials" if [[ $(type -t installCommon_rollBack) == "function" ]]; then @@ -316,13 +316,13 @@ function passwords_getApiToken() { function passwords_getApiUsers() { - mapfile -t api_users < <(curl -s -k -X GET -H "Authorization: Bearer $TOKEN_API" -H "Content-Type: application/json" "https://localhost:55000/security/users?pretty=true" | grep username | awk -F': ' '{print $2}' | sed -e "s/[\'\",]//g") + mapfile -t api_users < <(common_curl -s -k -X GET -H \"Authorization: Bearer $TOKEN_API\" -H \"Content-Type: application/json\" \"https://localhost:55000/security/users?pretty=true\" --max-time 300 --retry 5 --retry-delay 5 | grep username | awk -F': ' '{print $2}' | sed -e "s/[\'\",]//g") } function passwords_getApiIds() { - mapfile -t api_ids < <(curl -s -k -X GET -H "Authorization: Bearer $TOKEN_API" -H "Content-Type: application/json" "https://localhost:55000/security/users?pretty=true" | grep id | awk -F': ' '{print $2}' | sed -e "s/[\'\",]//g") + mapfile -t api_ids < <(common_curl -s -k -X GET -H \"Authorization: Bearer $TOKEN_API\" -H \"Content-Type: application/json\" \"https://localhost:55000/security/users?pretty=true\" --max-time 300 --retry 5 --retry-delay 5 | grep id | awk -F': ' '{print $2}' | sed -e "s/[\'\",]//g") } @@ -492,7 +492,7 @@ For Wazuh API users, the file must have this format: mapfile -t passwords < <(printf "%s\n" "${finalpasswords[@]}") mapfile -t api_users < <(printf "%s\n" "${finalapiusers[@]}") mapfile -t api_passwords < <(printf "%s\n" "${finalapipasswords[@]}") - + changeall=1 fi From 52c10552601eb6f7a730ce348fb5f5a5ee4d9ec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 7 Feb 2023 10:00:11 +0100 Subject: [PATCH 200/328] Revert changes in build.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- rpms/build.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rpms/build.sh b/rpms/build.sh index 91c1bd9ab1..b6006f30af 100755 --- a/rpms/build.sh +++ b/rpms/build.sh @@ -73,7 +73,7 @@ else specs_path="/specs" fi -if [[ "${future}" == "yes" ]]; then +if [[ "${future}" == "yes" ]]; then # MODIFY VARIABLES base_version=$wazuh_version MAJOR=$(echo $base_version | cut -dv -f2 | cut -d. -f1) @@ -112,7 +112,6 @@ if [ "${legacy}" = "no" ]; then fi # Building RPM -set -ex $linux $rpmbuild --define "_sysconfdir /etc" --define "_topdir ${rpm_build_dir}" \ --define "_threads ${threads}" --define "_release ${package_release}" \ --define "_localstatedir ${directory_base}" --define "_debugenabled ${debug}" \ From 0f7526f7c85906837b9e2b0a00824f44363d755f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 7 Feb 2023 16:38:38 +0100 Subject: [PATCH 201/328] Add opensuse to the testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/actions/test-install-enable/install_and_enable.sh | 2 ++ .github/workflows/test-install-and-enable-rpm.yml | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/actions/test-install-enable/install_and_enable.sh b/.github/actions/test-install-enable/install_and_enable.sh index b201222253..3a4338dfcc 100644 --- a/.github/actions/test-install-enable/install_and_enable.sh +++ b/.github/actions/test-install-enable/install_and_enable.sh @@ -13,6 +13,8 @@ elif [ -n "$(command -v apt-get)" ]; then sys_type="apt-get" apt-get update apt-get install -y systemd +elif [ -n "$(command -v zypper)" ]; then + sys_type="zypper" else common_logger -e "Couldn't find type of system" exit 1 diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index 21f2bd1e30..f55ed5a3e6 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -44,7 +44,10 @@ jobs: {NAME: 'redhat/ubi8:latest', ARCH: "x86_64"}, {NAME: 'redhat/ubi9:latest', ARCH: "x86_64"}, {NAME: 'amazonlinux:2', ARCH: "x86_64"}, - {NAME: 'fedora:34', ARCH: "x86_64"}] + {NAME: 'fedora:34', ARCH: "x86_64"}, + {NAME: 'opensuse/leap:latest', ARCH: "x86_64"}, + {NAME: 'opensuse/tumbleweed:latest', ARCH: "x86_64"}, + {NAME: '386/opensuse/tumbleweed:latest', ARCH: "i386"}] type: [agent, manager] exclude: - system: {ARCH: "i386"} From 9f30cfd60d704eaed81b34a269199e4b77e88f98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 7 Feb 2023 16:41:24 +0100 Subject: [PATCH 202/328] Remove installation of init.d service on manager and indexer and better removal of the service on agent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- rpms/SPECS/wazuh-agent.spec | 36 ++++++---------------------- rpms/SPECS/wazuh-manager.spec | 11 --------- stack/indexer/rpm/wazuh-indexer.spec | 2 +- 3 files changed, 8 insertions(+), 41 deletions(-) diff --git a/rpms/SPECS/wazuh-agent.spec b/rpms/SPECS/wazuh-agent.spec index 3e848d9b7b..2c8715d5d5 100644 --- a/rpms/SPECS/wazuh-agent.spec +++ b/rpms/SPECS/wazuh-agent.spec @@ -35,7 +35,6 @@ log analysis, file integrity monitoring, intrusions detection and policy and com ./gen_ossec.sh conf agent centos %rhel %{_localstatedir} > etc/ossec-agent.conf %build -%define initd_valid %( if [ -f /usr/lib/systemd/systemd-sysv-install ]; then echo "1" ; else echo "0"; fi ) pushd src # Rebuild for agent make clean @@ -82,18 +81,14 @@ echo 'USER_AUTO_START="n"' >> ./etc/preloaded-vars.conf %endif # Create directories -%if %initd_valid - mkdir -p ${RPM_BUILD_ROOT}%{_initrddir} -%endif +mkdir -p ${RPM_BUILD_ROOT}%{_initrddir} mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/.ssh # Copy the installed files into RPM_BUILD_ROOT directory cp -pr %{_localstatedir}/* ${RPM_BUILD_ROOT}%{_localstatedir}/ mkdir -p ${RPM_BUILD_ROOT}/usr/lib/systemd/system/ -%if %initd_valid - sed -i "s:WAZUH_HOME_TMP:%{_localstatedir}:g" src/init/templates/ossec-hids-rh.init - install -m 0755 src/init/templates/ossec-hids-rh.init ${RPM_BUILD_ROOT}%{_initrddir}/wazuh-agent -%endif +sed -i "s:WAZUH_HOME_TMP:%{_localstatedir}:g" src/init/templates/ossec-hids-rh.init +install -m 0755 src/init/templates/ossec-hids-rh.init ${RPM_BUILD_ROOT}%{_initrddir}/wazuh-agent sed -i "s:WAZUH_HOME_TMP:%{_localstatedir}:g" src/init/templates/wazuh-agent.service install -m 0644 src/init/templates/wazuh-agent.service ${RPM_BUILD_ROOT}/usr/lib/systemd/system/ @@ -245,24 +240,9 @@ if [ $1 = 1 ]; then %{_localstatedir}/packages_files/agent_installation_scripts/src/init/register_configure_agent.sh %{_localstatedir} > /dev/null || : fi - - # We create this fix for the operating system that deprecated the SySV. For now, this fix is for suse/openSUSE - sles="" - if [ -f /etc/SuSE-release ]; then - sles="suse" - elif [ -f /etc/os-release ]; then - if `grep -q "\"sles" /etc/os-release` ; then - sles="suse" - elif `grep -q -i "\"opensuse" /etc/os-release` ; then - sles="opensuse" - fi - fi - - if [ -n "$sles" ] && [ $(ps --no-headers -o comm 1) == "systemd" ]; then - if [ -f /etc/init.d/wazuh-agent ]; then - rm -f /etc/init.d/wazuh-agent - fi - fi +if ps -e | grep -E -q "^\ *1\ .*systemd$"; then + rm -f %{_initrddir}/wazuh-agent +fi # Delete the installation files used to configure the agent rm -rf %{_localstatedir}/packages_files @@ -491,9 +471,7 @@ rm -fr %{buildroot} %files %defattr(-,root,root) -%if %initd_valid - %config(missingok) %{_initrddir}/wazuh-agent -%endif +%config(missingok) %{_initrddir}/wazuh-agent %attr(640, root, wazuh) %verify(not md5 size mtime) %ghost %{_sysconfdir}/ossec-init.conf /usr/lib/systemd/system/wazuh-agent.service %dir %attr(750, root, wazuh) %{_localstatedir} diff --git a/rpms/SPECS/wazuh-manager.spec b/rpms/SPECS/wazuh-manager.spec index 30e7ba3c43..e52afd58a4 100644 --- a/rpms/SPECS/wazuh-manager.spec +++ b/rpms/SPECS/wazuh-manager.spec @@ -36,7 +36,6 @@ log analysis, file integrity monitoring, intrusions detection and policy and com ./gen_ossec.sh conf manager centos %rhel %{_localstatedir} > etc/ossec-server.conf %build -%define initd_valid %( if [ -f /usr/lib/systemd/systemd-sysv-install ]; then echo "1" ; else echo "0"; fi ) pushd src # Rebuild for server make clean @@ -75,18 +74,11 @@ echo 'USER_CREATE_SSL_CERT="n"' >> ./etc/preloaded-vars.conf ./install.sh # Create directories -%if %initd_valid - mkdir -p ${RPM_BUILD_ROOT}%{_initrddir} -%endif mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/.ssh # Copy the installed files into RPM_BUILD_ROOT directory cp -pr %{_localstatedir}/* ${RPM_BUILD_ROOT}%{_localstatedir}/ mkdir -p ${RPM_BUILD_ROOT}/usr/lib/systemd/system/ -%if %initd_valid - sed -i "s:WAZUH_HOME_TMP:%{_localstatedir}:g" src/init/templates/ossec-hids-rh.init - install -m 0755 src/init/templates/ossec-hids-rh.init ${RPM_BUILD_ROOT}%{_initrddir}/wazuh-manager -%endif sed -i "s:WAZUH_HOME_TMP:%{_localstatedir}:g" src/init/templates/wazuh-manager.service install -m 0644 src/init/templates/wazuh-manager.service ${RPM_BUILD_ROOT}/usr/lib/systemd/system/ @@ -580,9 +572,6 @@ rm -fr %{buildroot} %files %defattr(-,root,wazuh) -%if %initd_valid - %config(missingok) %{_initrddir}/wazuh-agent -%endif %attr(640, root, wazuh) %verify(not md5 size mtime) %ghost %{_sysconfdir}/ossec-init.conf /usr/lib/systemd/system/wazuh-manager.service %dir %attr(750, root, wazuh) %{_localstatedir} diff --git a/stack/indexer/rpm/wazuh-indexer.spec b/stack/indexer/rpm/wazuh-indexer.spec index 5b889782e1..0473be819c 100755 --- a/stack/indexer/rpm/wazuh-indexer.spec +++ b/stack/indexer/rpm/wazuh-indexer.spec @@ -164,7 +164,7 @@ if [ $1 = 1 ];then # Install fi -if [ ! -f /usr/lib/systemd/systemd-sysv-install ]; then +if ps -e | grep -E -q "^\ *1\ .*systemd$" ; then rm -f /etc/init.d/%{name} fi From d7dc64ea802f47c6139bbd39c6ec4fd1fa690781 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 7 Feb 2023 16:56:34 +0100 Subject: [PATCH 203/328] Fix new tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../test-install-enable/install_and_enable.sh | 14 ++++++++++++-- .github/workflows/test-install-and-enable-rpm.yml | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/actions/test-install-enable/install_and_enable.sh b/.github/actions/test-install-enable/install_and_enable.sh index 3a4338dfcc..dc8d8d2676 100644 --- a/.github/actions/test-install-enable/install_and_enable.sh +++ b/.github/actions/test-install-enable/install_and_enable.sh @@ -23,8 +23,18 @@ fi $sys_type install -y "/packages/$1" echo "Enabling Wazuh $2." -systemctl enable wazuh-$2 -if [ "$?" -eq 0 ]; then +if ps -e | grep -E -q "^\ *1\ .*systemd$"; then + systemctl daemon-reload + systemctl enable wazuh-$2 + output=$(echo $?) +elif ps -e | grep -E -q "^\ *1\ .*init$"; then + chkconfig --add wazuh-$2 + output=$(echo $?) +else + /etc/rc.d/init.d/wazuh${2} start + output=$(echo $?) +fi +if [ "$output" -eq 0 ]; then echo "Wazuh $2 enabled - Test passed correctly." exit 0 else diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index f55ed5a3e6..bd79dacf7e 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -47,7 +47,7 @@ jobs: {NAME: 'fedora:34', ARCH: "x86_64"}, {NAME: 'opensuse/leap:latest', ARCH: "x86_64"}, {NAME: 'opensuse/tumbleweed:latest', ARCH: "x86_64"}, - {NAME: '386/opensuse/tumbleweed:latest', ARCH: "i386"}] + {NAME: 'i386/opensuse/tumbleweed:latest', ARCH: "i386"}] type: [agent, manager] exclude: - system: {ARCH: "i386"} From 97f03e146df7fa21ce17631303d8e6bc82f16a65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 7 Feb 2023 16:56:57 +0100 Subject: [PATCH 204/328] Remove Suse fix for the manager MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- rpms/SPECS/wazuh-manager.spec | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/rpms/SPECS/wazuh-manager.spec b/rpms/SPECS/wazuh-manager.spec index e52afd58a4..6f70f0f19e 100644 --- a/rpms/SPECS/wazuh-manager.spec +++ b/rpms/SPECS/wazuh-manager.spec @@ -309,24 +309,6 @@ if [ $1 = 1 ]; then %{_localstatedir}/packages_files/manager_installation_scripts/add_localfiles.sh %{_localstatedir} >> %{_localstatedir}/etc/ossec.conf fi - # We create this fix for the operating system that decraped the SySV. For now, this fix is for suse/openSUSE - sles="" - if [ -f /etc/SuSE-release ]; then - sles="suse" - elif [ -f /etc/os-release ]; then - if `grep -q "\"sles" /etc/os-release` ; then - sles="suse" - elif `grep -q -i "\"opensuse" /etc/os-release` ; then - sles="opensuse" - fi - fi - - if [ -n "$sles" ] && [ $(ps --no-headers -o comm 1) == "systemd" ]; then - if [ -f /etc/init.d/wazuh-manager ]; then - rm -f %{_initrddir}//wazuh-manager - fi - fi - # Generation auto-signed certificate if not exists if [ ! -f "%{_localstatedir}/etc/sslmanager.key" ] && [ ! -f "%{_localstatedir}/etc/sslmanager.cert" ]; then %{_localstatedir}/bin/wazuh-authd -C 365 -B 2048 -S "/C=US/ST=California/CN=Wazuh/" -K %{_localstatedir}/etc/sslmanager.key -X %{_localstatedir}/etc/sslmanager.cert 2>/dev/null From 7997c6eca5e65ddd4b5d04aa602033527de3f009 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 7 Feb 2023 17:11:15 +0100 Subject: [PATCH 205/328] Correct the way to check type of init manager used MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/actions/test-install-enable/install_and_enable.sh | 6 +++--- rpms/SPECS/wazuh-agent.spec | 2 +- stack/indexer/rpm/wazuh-indexer.spec | 2 +- unattended_installer/install_functions/installCommon.sh | 4 ++-- unattended_installer/passwords_tool/passwordsFunctions.sh | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/actions/test-install-enable/install_and_enable.sh b/.github/actions/test-install-enable/install_and_enable.sh index dc8d8d2676..f53d9a3b3d 100644 --- a/.github/actions/test-install-enable/install_and_enable.sh +++ b/.github/actions/test-install-enable/install_and_enable.sh @@ -23,11 +23,11 @@ fi $sys_type install -y "/packages/$1" echo "Enabling Wazuh $2." -if ps -e | grep -E -q "^\ *1\ .*systemd$"; then +if ps -p 1 -o comm= | grep -q "systemd"; then systemctl daemon-reload systemctl enable wazuh-$2 output=$(echo $?) -elif ps -e | grep -E -q "^\ *1\ .*init$"; then +elif ps -p 1 -o comm= | grep -q "init"; then chkconfig --add wazuh-$2 output=$(echo $?) else @@ -37,7 +37,7 @@ fi if [ "$output" -eq 0 ]; then echo "Wazuh $2 enabled - Test passed correctly." exit 0 -else +else echo "Error: Wazuh $2 not enabled." exit 1 fi \ No newline at end of file diff --git a/rpms/SPECS/wazuh-agent.spec b/rpms/SPECS/wazuh-agent.spec index 2c8715d5d5..721dff9993 100644 --- a/rpms/SPECS/wazuh-agent.spec +++ b/rpms/SPECS/wazuh-agent.spec @@ -240,7 +240,7 @@ if [ $1 = 1 ]; then %{_localstatedir}/packages_files/agent_installation_scripts/src/init/register_configure_agent.sh %{_localstatedir} > /dev/null || : fi -if ps -e | grep -E -q "^\ *1\ .*systemd$"; then +if [[ -d /run/systemd/system ]]; then rm -f %{_initrddir}/wazuh-agent fi diff --git a/stack/indexer/rpm/wazuh-indexer.spec b/stack/indexer/rpm/wazuh-indexer.spec index 0473be819c..2f72d2b214 100755 --- a/stack/indexer/rpm/wazuh-indexer.spec +++ b/stack/indexer/rpm/wazuh-indexer.spec @@ -164,7 +164,7 @@ if [ $1 = 1 ];then # Install fi -if ps -e | grep -E -q "^\ *1\ .*systemd$" ; then +if [[ -d /run/systemd/system ]] ; then rm -f /etc/init.d/%{name} fi diff --git a/unattended_installer/install_functions/installCommon.sh b/unattended_installer/install_functions/installCommon.sh index 198f27fb88..c9bf605806 100644 --- a/unattended_installer/install_functions/installCommon.sh +++ b/unattended_installer/install_functions/installCommon.sh @@ -572,7 +572,7 @@ function installCommon_startService() { common_logger "Starting service ${1}." - if ps -e | grep -E -q "^\ *1\ .*systemd$"; then + if [[ -d /run/systemd/system ]]; then eval "systemctl daemon-reload ${debug}" eval "systemctl enable ${1}.service ${debug}" eval "systemctl start ${1}.service ${debug}" @@ -586,7 +586,7 @@ function installCommon_startService() { else common_logger "${1} service started." fi - elif ps -e | grep -E -q "^\ *1\ .*init$"; then + elif ps -p 1 -o comm= | grep "init"; then eval "chkconfig ${1} on ${debug}" eval "service ${1} start ${debug}" eval "/etc/init.d/${1} start ${debug}" diff --git a/unattended_installer/passwords_tool/passwordsFunctions.sh b/unattended_installer/passwords_tool/passwordsFunctions.sh index ee40bfb53b..2633d728e5 100644 --- a/unattended_installer/passwords_tool/passwordsFunctions.sh +++ b/unattended_installer/passwords_tool/passwordsFunctions.sh @@ -512,7 +512,7 @@ function passwords_restartService() { exit 1 fi - if ps -e | grep -E -q "^\ *1\ .*systemd$"; then + if [[ -d /run/systemd/system ]]; then eval "systemctl daemon-reload ${debug}" eval "systemctl restart ${1}.service ${debug}" if [ "${PIPESTATUS[0]}" != 0 ]; then @@ -527,7 +527,7 @@ function passwords_restartService() { else common_logger -d "${1} started." fi - elif ps -e | grep -E -q "^\ *1\ .*init$"; then + elif ps -p 1 -o comm= | grep "init"; then eval "/etc/init.d/${1} restart ${debug}" if [ "${PIPESTATUS[0]}" != 0 ]; then common_logger -e "${1} could not be started." From 2a36d6626e7f1802397e210dd16deb09bb06185a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 7 Feb 2023 17:33:42 +0100 Subject: [PATCH 206/328] Fix test, ps -p 1 gi ves bash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/actions/test-install-enable/install_and_enable.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/actions/test-install-enable/install_and_enable.sh b/.github/actions/test-install-enable/install_and_enable.sh index f53d9a3b3d..b04d6f189e 100644 --- a/.github/actions/test-install-enable/install_and_enable.sh +++ b/.github/actions/test-install-enable/install_and_enable.sh @@ -23,15 +23,16 @@ fi $sys_type install -y "/packages/$1" echo "Enabling Wazuh $2." -if ps -p 1 -o comm= | grep -q "systemd"; then +if command -v systemctl; then systemctl daemon-reload systemctl enable wazuh-$2 output=$(echo $?) -elif ps -p 1 -o comm= | grep -q "init"; then +elif command -v service; then chkconfig --add wazuh-$2 + service wazuh-$2 start output=$(echo $?) else - /etc/rc.d/init.d/wazuh${2} start + /etc/rc.d/init.d/wazuh-$2 start output=$(echo $?) fi if [ "$output" -eq 0 ]; then From cc817bdbbae7638ccd41b6a2c89c4fae4de97161 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 7 Feb 2023 17:51:33 +0100 Subject: [PATCH 207/328] Add centos 5 and 6 to the tests and try to pass on systemd to the testing docker containers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-and-enable-rpm.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-and-enable-rpm.yml index bd79dacf7e..e8255554d9 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-and-enable-rpm.yml @@ -45,13 +45,17 @@ jobs: {NAME: 'redhat/ubi9:latest', ARCH: "x86_64"}, {NAME: 'amazonlinux:2', ARCH: "x86_64"}, {NAME: 'fedora:34', ARCH: "x86_64"}, - {NAME: 'opensuse/leap:latest', ARCH: "x86_64"}, - {NAME: 'opensuse/tumbleweed:latest', ARCH: "x86_64"}, - {NAME: 'i386/opensuse/tumbleweed:latest', ARCH: "i386"}] + {NAME: 'opensuse/leap:latest', ARCH: "x86_64", INIT: "initd"}, + {NAME: 'opensuse/tumbleweed:latest', ARCH: "x86_64", INIT: "initd"}, + {NAME: 'i386/opensuse/tumbleweed:latest', ARCH: "i386", INIT: "initd"}, + {NAME: 'centos:6.9', ARCH: "x86_64", INIT: "initd"}, + {NAME: 'centos:5.11', ARCH: "x86_64", INIT: "initd"}] type: [agent, manager] exclude: - system: {ARCH: "i386"} type: manager + - system: {INIT: "initd"} + type: manager fail-fast: false steps: - uses: actions/checkout@v3 @@ -100,4 +104,4 @@ jobs: - name: Launch docker if : steps.changes.outputs.rpm_packages == 'true' || (steps.changes.outputs.rpm_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.rpm_images_x86_64 == 'true' && matrix.ARCHITECTURE == 'x86_64') - run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-install-enable/:/tests -v $GITHUB_WORKSPACE/packages/:/packages ${{ matrix.system.NAME }} bash /tests/install_and_enable.sh $PACKAGE_NAME ${{ matrix.type }} \ No newline at end of file + run: sudo docker run --privileged -v /run/systemd/system:/run/systemd/system -v $GITHUB_WORKSPACE/.github/actions/test-install-enable/:/tests -v $GITHUB_WORKSPACE/packages/:/packages ${{ matrix.system.NAME }} bash /tests/install_and_enable.sh $PACKAGE_NAME ${{ matrix.type }} \ No newline at end of file From d3c42309ac1a191b9e1c88354b13609d40e0604e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 8 Feb 2023 10:49:35 +0100 Subject: [PATCH 208/328] Change back manager to accept initd with the same solution as the agent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- rpms/SPECS/wazuh-manager.spec | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rpms/SPECS/wazuh-manager.spec b/rpms/SPECS/wazuh-manager.spec index 6f70f0f19e..111816e115 100644 --- a/rpms/SPECS/wazuh-manager.spec +++ b/rpms/SPECS/wazuh-manager.spec @@ -74,10 +74,13 @@ echo 'USER_CREATE_SSL_CERT="n"' >> ./etc/preloaded-vars.conf ./install.sh # Create directories +mkdir -p ${RPM_BUILD_ROOT}%{_initrddir} mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/.ssh # Copy the installed files into RPM_BUILD_ROOT directory cp -pr %{_localstatedir}/* ${RPM_BUILD_ROOT}%{_localstatedir}/ +sed -i "s:WAZUH_HOME_TMP:%{_localstatedir}:g" src/init/templates/ossec-hids-rh.init +install -m 0755 src/init/templates/ossec-hids-rh.init ${RPM_BUILD_ROOT}%{_initrddir}/wazuh-manager mkdir -p ${RPM_BUILD_ROOT}/usr/lib/systemd/system/ sed -i "s:WAZUH_HOME_TMP:%{_localstatedir}:g" src/init/templates/wazuh-manager.service install -m 0644 src/init/templates/wazuh-manager.service ${RPM_BUILD_ROOT}/usr/lib/systemd/system/ @@ -290,6 +293,10 @@ if [ $1 = 2 ]; then fi fi +if [[ -d /run/systemd/system ]]; then + rm -f %{_initrddir}/wazuh-agent +fi + # Fresh install code block if [ $1 = 1 ]; then @@ -554,6 +561,7 @@ rm -fr %{buildroot} %files %defattr(-,root,wazuh) +%config(missingok) %{_initrddir}/wazuh-manager %attr(640, root, wazuh) %verify(not md5 size mtime) %ghost %{_sysconfdir}/ossec-init.conf /usr/lib/systemd/system/wazuh-manager.service %dir %attr(750, root, wazuh) %{_localstatedir} From 74a1dc6733922849eed3a140d9a769496efa3ac3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 8 Feb 2023 10:51:55 +0100 Subject: [PATCH 209/328] Remove enable test as new solution doesn't cover docker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- ...all_and_enable.sh => install_component.sh} | 23 +------------------ ...nd-enable-deb.yml => test-install-deb.yml} | 2 +- ...nd-enable-rpm.yml => test-install-rpm.yml} | 2 +- 3 files changed, 3 insertions(+), 24 deletions(-) rename .github/actions/test-install-enable/{install_and_enable.sh => install_component.sh} (56%) rename .github/workflows/{test-install-and-enable-deb.yml => test-install-deb.yml} (98%) rename .github/workflows/{test-install-and-enable-rpm.yml => test-install-rpm.yml} (94%) diff --git a/.github/actions/test-install-enable/install_and_enable.sh b/.github/actions/test-install-enable/install_component.sh similarity index 56% rename from .github/actions/test-install-enable/install_and_enable.sh rename to .github/actions/test-install-enable/install_component.sh index b04d6f189e..ee897b3a9a 100644 --- a/.github/actions/test-install-enable/install_and_enable.sh +++ b/.github/actions/test-install-enable/install_component.sh @@ -20,25 +20,4 @@ else exit 1 fi -$sys_type install -y "/packages/$1" - -echo "Enabling Wazuh $2." -if command -v systemctl; then - systemctl daemon-reload - systemctl enable wazuh-$2 - output=$(echo $?) -elif command -v service; then - chkconfig --add wazuh-$2 - service wazuh-$2 start - output=$(echo $?) -else - /etc/rc.d/init.d/wazuh-$2 start - output=$(echo $?) -fi -if [ "$output" -eq 0 ]; then - echo "Wazuh $2 enabled - Test passed correctly." - exit 0 -else - echo "Error: Wazuh $2 not enabled." - exit 1 -fi \ No newline at end of file +$sys_type install -y "/packages/$1" \ No newline at end of file diff --git a/.github/workflows/test-install-and-enable-deb.yml b/.github/workflows/test-install-deb.yml similarity index 98% rename from .github/workflows/test-install-and-enable-deb.yml rename to .github/workflows/test-install-deb.yml index 0ad0d8a5fd..3ba17620f2 100644 --- a/.github/workflows/test-install-and-enable-deb.yml +++ b/.github/workflows/test-install-deb.yml @@ -91,4 +91,4 @@ jobs: - name: Launch docker if: steps.changes.outputs.deb_packages == 'true' || (steps.changes.outputs.deb_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.deb_images_amd64 == 'true' && matrix.ARCHITECTURE == 'amd64') - run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-install-enable/:/tests -v $GITHUB_WORKSPACE/packages/:/packages ${{ matrix.arch }}/${{ matrix.distro_name }} bash /tests/install_and_enable.sh $PACKAGE_NAME ${{ matrix.type }} \ No newline at end of file + run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-install-enable/:/tests -v $GITHUB_WORKSPACE/packages/:/packages ${{ matrix.arch }}/${{ matrix.distro_name }} bash /tests/install_component.sh $PACKAGE_NAME ${{ matrix.type }} \ No newline at end of file diff --git a/.github/workflows/test-install-and-enable-rpm.yml b/.github/workflows/test-install-rpm.yml similarity index 94% rename from .github/workflows/test-install-and-enable-rpm.yml rename to .github/workflows/test-install-rpm.yml index e8255554d9..232e801d8f 100644 --- a/.github/workflows/test-install-and-enable-rpm.yml +++ b/.github/workflows/test-install-rpm.yml @@ -104,4 +104,4 @@ jobs: - name: Launch docker if : steps.changes.outputs.rpm_packages == 'true' || (steps.changes.outputs.rpm_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.rpm_images_x86_64 == 'true' && matrix.ARCHITECTURE == 'x86_64') - run: sudo docker run --privileged -v /run/systemd/system:/run/systemd/system -v $GITHUB_WORKSPACE/.github/actions/test-install-enable/:/tests -v $GITHUB_WORKSPACE/packages/:/packages ${{ matrix.system.NAME }} bash /tests/install_and_enable.sh $PACKAGE_NAME ${{ matrix.type }} \ No newline at end of file + run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-install-enable/:/tests -v $GITHUB_WORKSPACE/packages/:/packages ${{ matrix.system.NAME }} bash /tests/install_component.sh $PACKAGE_NAME ${{ matrix.type }} \ No newline at end of file From e6795ac6ba56b7ca972d4c7c1465f89c3f0f815c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Correa=20Rodr=C3=ADguez?= <72193239+davidcr01@users.noreply.github.com> Date: Wed, 8 Feb 2023 12:58:53 +0100 Subject: [PATCH 210/328] Improval of the curl tool in the Offline Installation (#2071) * Initial version of the Offline installation action * Improval of Offline installation action * Finished workflow * Fix workflow and filebeat installation * Starting services manually in RPM test * Action finished * Added -I to checkFilebeatURL curls * Added check_shards function to the Action * Added -I to offline curls * Improval of the offline test workflow * General improvements of the Offline installation action * Improval of the Offline installation workflow * Added common_curl to offline-download --- .../actions/offline-installation/common.sh | 311 ++++++++++++++++++ .../offline-installation.sh | 21 ++ .github/workflows/offline-installation.yml | 64 ++++ unattended_installer/builder.sh | 4 +- .../wazuh-offline-download.sh | 12 +- 5 files changed, 404 insertions(+), 8 deletions(-) create mode 100644 .github/actions/offline-installation/common.sh create mode 100644 .github/actions/offline-installation/offline-installation.sh create mode 100644 .github/workflows/offline-installation.yml diff --git a/.github/actions/offline-installation/common.sh b/.github/actions/offline-installation/common.sh new file mode 100644 index 0000000000..7042ae644d --- /dev/null +++ b/.github/actions/offline-installation/common.sh @@ -0,0 +1,311 @@ +#!/bin/bash + +function check_package() { + + if [ "${sys_type}" == "deb" ]; then + if ! apt list --installed 2>/dev/null | grep -q "${1}"; then + echo "INFO: The package "${1}" is not installed." + return 1 + fi + elif [ "${sys_type}" == "rpm" ]; then + if ! yum list installed 2>/dev/null | grep -q "${1}"; then + echo "INFO: The package "${1}" is not installed." + return 1 + fi + fi + return 0 + +} + +function check_system() { + + if [ -n "$(command -v yum)" ]; then + sys_type="rpm" + echo "INFO: RPM system detected." + elif [ -n "$(command -v apt-get)" ]; then + sys_type="deb" + echo "INFO: DEB system detected." + else + echo "ERROR: could not detect the system." + exit 1 + fi + +} + +function check_file() { + + if [ ! -f "${1}" ]; then + echo "ERROR: The ${1} file could not be downloaded." + exit 1 + fi + +} + +function check_shards() { + + retries=0 + until [ "$(curl -s -k -u admin:admin "https://localhost:9200/_template/wazuh?pretty&filter_path=wazuh.settings.index.number_of_shards" | grep "number_of_shards")" ] || [ "${retries}" -eq 5 ]; do + sleep 5 + retries=$((retries+1)) + done + + if [ ${retries} -eq 5 ]; then + echo "ERROR: Could not get the number of shards." + exit 1 + fi + curl -s -k -u admin:admin "https://localhost:9200/_template/wazuh?pretty&filter_path=wazuh.settings.index.number_of_shards" + echo "INFO: Number of shards detected." + +} + +function dashboard_installation() { + + install_package "wazuh-dashboard" + check_package "wazuh-dashboard" + + echo "INFO: Generating certificates of the Wazuh dashboard..." + NODE_NAME=dashboard + mkdir /etc/wazuh-dashboard/certs + mv -n wazuh-certificates/$NODE_NAME.pem /etc/wazuh-dashboard/certs/dashboard.pem + mv -n wazuh-certificates/$NODE_NAME-key.pem /etc/wazuh-dashboard/certs/dashboard-key.pem + cp wazuh-certificates/root-ca.pem /etc/wazuh-dashboard/certs/ + chmod 500 /etc/wazuh-dashboard/certs + chmod 400 /etc/wazuh-dashboard/certs/* + chown -R wazuh-dashboard:wazuh-dashboard /etc/wazuh-dashboard/certs + + if [ "${sys_type}" == "deb" ]; then + enable_start_service "wazuh-dashboard" + elif [ "${sys_type}" == "rpm" ]; then + /usr/share/wazuh-dashboard/bin/opensearch-dashboards "-c /etc/wazuh-dashboard/opensearch_dashboards.yml" --allow-root > /dev/null 2>&1 & + fi + + sleep 10 + # In this context, 302 HTTP code refers to SSL certificates warning: success. + if [ "$(curl -k -s -I -w "%{http_code}" https://localhost -o /dev/null --fail)" -ne "302" ]; then + echo "ERROR: The Wazuh dashboard installation has failed." + exit 1 + fi + echo "INFO: The Wazuh dashboard is ready." + +} + +function download_resources() { + + check_file "${ABSOLUTE_PATH}"/wazuh-install.sh + bash "${ABSOLUTE_PATH}"/wazuh-install.sh -dw "${sys_type}" + echo "INFO: Downloading the resources..." + + curl -sO https://packages.wazuh.com/4.3/config.yml + check_file "config.yml" + + sed -i -e '0,// s//127.0.0.1/' config.yml + sed -i -e '0,// s//127.0.0.1/' config.yml + sed -i -e '0,// s//127.0.0.1/' config.yml + + curl -sO https://packages.wazuh.com/4.3/wazuh-certs-tool.sh + check_file "wazuh-certs-tool.sh" + chmod 744 wazuh-certs-tool.sh + ./wazuh-certs-tool.sh --all + + tar xf wazuh-offline.tar.gz + echo "INFO: Download finished." + + if [ ! -d ./wazuh-offline ]; then + echo "ERROR: Could not download the resources." + exit 1 + fi + +} + +function enable_start_service() { + + systemctl daemon-reload + systemctl enable "${1}" + systemctl start "${1}" + + retries=0 + until [ "$(systemctl status "${1}" | grep "active")" ] || [ "${retries}" -eq 3 ]; do + sleep 2 + retries=$((retries+1)) + systemctl start "${1}" + done + + if [ ${retries} -eq 3 ]; then + echo "ERROR: The "${1}" service could not be started." + exit 1 + fi + +} + +function filebeat_installation() { + + install_package "filebeat" + check_package "filebeat" + + cp ./wazuh-offline/wazuh-files/filebeat.yml /etc/filebeat/ &&\ + cp ./wazuh-offline/wazuh-files/wazuh-template.json /etc/filebeat/ &&\ + chmod go+r /etc/filebeat/wazuh-template.json + + sed -i 's|\("index.number_of_shards": \)".*"|\1 "1"|' /etc/filebeat/wazuh-template.json + filebeat keystore create + echo admin | filebeat keystore add username --stdin --force + echo admin | filebeat keystore add password --stdin --force + tar -xzf ./wazuh-offline/wazuh-files/wazuh-filebeat-0.2.tar.gz -C /usr/share/filebeat/module + + echo "INFO: Generating certificates of Filebeat..." + NODE_NAME=wazuh-1 + mkdir /etc/filebeat/certs + mv -n wazuh-certificates/$NODE_NAME.pem /etc/filebeat/certs/filebeat.pem + mv -n wazuh-certificates/$NODE_NAME-key.pem /etc/filebeat/certs/filebeat-key.pem + cp wazuh-certificates/root-ca.pem /etc/filebeat/certs/ + chmod 500 /etc/filebeat/certs + chmod 400 /etc/filebeat/certs/* + chown -R root:root /etc/filebeat/certs + + if [ "${sys_type}" == "deb" ]; then + enable_start_service "filebeat" + elif [ "${sys_type}" == "rpm" ]; then + /usr/share/filebeat/bin/filebeat --environment systemd -c /etc/filebeat/filebeat.yml --path.home /usr/share/filebeat --path.config /etc/filebeat --path.data /var/lib/filebeat --path.logs /var/log/filebeat & + fi + + sleep 10 + check_shards + eval "filebeat test output" + if [ "${PIPESTATUS[0]}" != 0 ]; then + echo "ERROR: The Filebeat installation has failed." + exit 1 + fi + +} + +function indexer_initialize() { + + retries=0 + until [ "$(cat /var/log/wazuh-indexer/wazuh-cluster.log | grep "Node started")" ] || [ "${retries}" -eq 5 ]; do + sleep 5 + retries=$((retries+1)) + done + + if [ ${retries} -eq 5 ]; then + echo "ERROR: The indexer node is not started." + exit 1 + fi + /usr/share/wazuh-indexer/bin/indexer-security-init.sh + +} + +function indexer_installation() { + + if [ "${sys_type}" == "rpm" ]; then + rpm --import ./wazuh-offline/wazuh-files/GPG-KEY-WAZUH + fi + + install_package "wazuh-indexer" + check_package "wazuh-indexer" + + echo "INFO: Generating certificates of the Wazuh indexer..." + NODE_NAME=node-1 + mkdir /etc/wazuh-indexer/certs + mv -n wazuh-certificates/$NODE_NAME.pem /etc/wazuh-indexer/certs/indexer.pem + mv -n wazuh-certificates/$NODE_NAME-key.pem /etc/wazuh-indexer/certs/indexer-key.pem + mv wazuh-certificates/admin-key.pem /etc/wazuh-indexer/certs/ + mv wazuh-certificates/admin.pem /etc/wazuh-indexer/certs/ + cp wazuh-certificates/root-ca.pem /etc/wazuh-indexer/certs/ + chmod 500 /etc/wazuh-indexer/certs + chmod 400 /etc/wazuh-indexer/certs/* + chown -R wazuh-indexer:wazuh-indexer /etc/wazuh-indexer/certs + + sed -i 's|\(network.host: \)"0.0.0.0"|\1"127.0.0.1"|' /etc/wazuh-indexer/opensearch.yml + + if [ "${sys_type}" == "rpm" ]; then + runuser "wazuh-indexer" --shell="/bin/bash" --command="OPENSEARCH_PATH_CONF=/etc/wazuh-indexer /usr/share/wazuh-indexer/bin/opensearch" > /dev/null 2>&1 & + sleep 5 + elif [ "${sys_type}" == "deb" ]; then + enable_start_service "wazuh-indexer" + fi + + indexer_initialize + sleep 10 + eval "curl -s -XGET https://localhost:9200 -u admin:admin -k --fail" + if [ "${PIPESTATUS[0]}" != 0 ]; then + echo "ERROR: The Wazuh indexer installation has failed." + exit 1 + fi + +} + +function install_dependencies() { + + if [ "${sys_type}" == "rpm" ]; then + dependencies=( util-linux initscripts openssl ) + not_installed=() + for dep in "${dependencies[@]}"; do + if [ "${dep}" == "openssl" ]; then + if ! yum list installed 2>/dev/null | grep -q "${dep}\.";then + not_installed+=("${dep}") + fi + elif ! yum list installed 2>/dev/null | grep -q "${dep}";then + not_installed+=("${dep}") + fi + done + + if [ "${#not_installed[@]}" -gt 0 ]; then + echo "--- Dependencies ---" + for dep in "${not_installed[@]}"; do + echo "Installing $dep." + eval "yum install ${dep} -y" + if [ "${PIPESTATUS[0]}" != 0 ]; then + echo "ERROR: Cannot install dependency: ${dep}." + exit 1 + fi + done + fi + + elif [ "${sys_type}" == "deb" ]; then + eval "apt-get update -q > /dev/null" + dependencies=( openssl ) + not_installed=() + + for dep in "${dependencies[@]}"; do + if ! apt list --installed 2>/dev/null | grep -q "${dep}"; then + not_installed+=("${dep}") + fi + done + + if [ "${#not_installed[@]}" -gt 0 ]; then + echo "--- Dependencies ----" + for dep in "${not_installed[@]}"; do + echo "Installing $dep." + apt-get install -y "${dep}" + if [ "${install_result}" != 0 ]; then + echo "ERROR: Cannot install dependency: ${dep}." + exit 1 + fi + done + fi + fi + +} + +function install_package() { + + if [ "${sys_type}" == "deb" ]; then + dpkg -i ./wazuh-offline/wazuh-packages/"${1}"*.deb + elif [ "${sys_type}" == "rpm" ]; then + rpm -ivh ./wazuh-offline/wazuh-packages/"${1}"*.rpm + fi + +} + +function manager_installation() { + + install_package "wazuh-manager" + check_package "wazuh-manager" + + if [ "${sys_type}" == "deb" ]; then + enable_start_service "wazuh-manager" + elif [ "${sys_type}" == "rpm" ]; then + /var/ossec/bin/wazuh-control start + fi + +} diff --git a/.github/actions/offline-installation/offline-installation.sh b/.github/actions/offline-installation/offline-installation.sh new file mode 100644 index 0000000000..787b20bf66 --- /dev/null +++ b/.github/actions/offline-installation/offline-installation.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +# Gets the absolute path of the script, used to load the common.sh file +ABSOLUTE_PATH="$( cd $(dirname ${0}) ; pwd -P )" +. ${ABSOLUTE_PATH}/common.sh + +check_system +install_dependencies +download_resources + +indexer_installation +echo "INFO: Wazuh indexer installation completed." + +manager_installation +echo "INFO: Wazuh manager installation completed." + +filebeat_installation +echo "INFO: Filebeat installation completed." + +dashboard_installation +echo "INFO: Wazuh dashboard installation completed." diff --git a/.github/workflows/offline-installation.yml b/.github/workflows/offline-installation.yml new file mode 100644 index 0000000000..07b75cb45f --- /dev/null +++ b/.github/workflows/offline-installation.yml @@ -0,0 +1,64 @@ +name: Offline installation test +on: + pull_request: + paths: + - 'unattended_installer/install_functions/wazuh-offline-download.sh' + +jobs: + Build-wazuh-install-script: + runs-on: ubuntu-latest + steps: + - name: Cancel previous runs + uses: fkirc/skip-duplicate-actions@master + with: + cancel_others: 'true' + github_token: ${{ secrets.GITHUB_TOKEN }} + skip_after_successful_duplicate: 'false' + + - uses: actions/checkout@v2 + + - name: Build wazuh-install script and use pre-release packages + working-directory: ./unattended_installer + run: | + bash builder.sh -i -d + sed -i 's|wazuh_major="4\.5"|wazuh_major="4\.4"|g' wazuh-install.sh + sed -i 's|wazuh_version="4\.5\(.*\)"|wazuh_version="4\.4\1"|g' wazuh-install.sh + + - uses: actions/upload-artifact@v3 + with: + name: script + path: | + unattended_installer/wazuh-install.sh + if-no-files-found: error + + Test-offline-installation-debian: + runs-on: ubuntu-latest + needs: Build-wazuh-install-script + steps: + - uses: actions/checkout@v2 + + - uses: actions/download-artifact@v3 + with: + name: script + + - name: Move unattended script + run: cp $GITHUB_WORKSPACE/wazuh-install.sh $GITHUB_WORKSPACE/.github/actions/offline-installation/wazuh-install.sh + + - name: Run script + run: sudo bash $GITHUB_WORKSPACE/.github/actions/offline-installation/offline-installation.sh + + Test-offline-installation-rpm: + runs-on: ubuntu-latest + needs: Build-wazuh-install-script + steps: + - uses: actions/checkout@v2 + + - uses: actions/download-artifact@v3 + with: + name: script + + - name: Move unattended script + run: cp $GITHUB_WORKSPACE/wazuh-install.sh $GITHUB_WORKSPACE/.github/actions/offline-installation/wazuh-install.sh + + - name: Launch docker and run script + run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/offline-installation/:/tests centos:centos7 bash /tests/offline-installation.sh diff --git a/unattended_installer/builder.sh b/unattended_installer/builder.sh index 86e0da54c1..14fdae8c21 100755 --- a/unattended_installer/builder.sh +++ b/unattended_installer/builder.sh @@ -278,9 +278,9 @@ function checkFilebeatURL() { new_filebeat_url="https://raw.githubusercontent.com/wazuh/wazuh/master/extensions/elasticsearch/7.x/wazuh-template.json" # Get the response of the URL and check it - response=$(curl --write-out '%{http_code}' --silent --output /dev/null $filebeat_wazuh_template) + response=$(curl -I --write-out '%{http_code}' --silent --output /dev/null $filebeat_wazuh_template) if [ "${response}" != "200" ]; then - response=$(curl --write-out '%{http_code}' --silent --output /dev/null $new_filebeat_url) + response=$(curl -I --write-out '%{http_code}' --silent --output /dev/null $new_filebeat_url) # Display error if both URLs do not get the resource if [ "${response}" != "200" ]; then diff --git a/unattended_installer/install_functions/wazuh-offline-download.sh b/unattended_installer/install_functions/wazuh-offline-download.sh index 796e69d4df..05c9937180 100755 --- a/unattended_installer/install_functions/wazuh-offline-download.sh +++ b/unattended_installer/install_functions/wazuh-offline-download.sh @@ -52,7 +52,7 @@ function offline_download() { exit 1 fi - while common_curl -s -o /dev/null -w "%{http_code}" "${manager_base_url}/${manager_package}" --max-time 300 --retry 5 --retry-delay 5 --fail | grep -q "200"; do + while common_curl -s -I -o /dev/null -w "%{http_code}" "${manager_base_url}/${manager_package}" --max-time 300 --retry 5 --retry-delay 5 --fail | grep -q "200"; do manager_revision=$((manager_revision+1)) if [ "${package_type}" == "rpm" ]; then manager_rpm_package="wazuh-manager-${wazuh_version}-${manager_revision}.x86_64.rpm" @@ -62,7 +62,7 @@ function offline_download() { manager_package="${manager_deb_package}" fi done - if [ "$manager_revision" -gt 1 ] && [ "$(common_curl -s -o /dev/null -w "%{http_code}" "${manager_base_url}/${manager_package}" --max-time 300 --retry 5 --retry-delay 5 --fail)" -ne "200" ]; then + if [ "$manager_revision" -gt 1 ] && [ "$(common_curl -s -I -o /dev/null -w "%{http_code}" "${manager_base_url}/${manager_package}" --max-time 300 --retry 5 --retry-delay 5 --fail)" -ne "200" ]; then manager_revision=$((manager_revision-1)) if [ "${package_type}" == "rpm" ]; then manager_rpm_package="wazuh-manager-${wazuh_version}-${manager_revision}.x86_64.rpm" @@ -71,7 +71,7 @@ function offline_download() { fi fi - while common_curl -s -o /dev/null -w "%{http_code}" "${indexer_base_url}/${indexer_package}" --max-time 300 --retry 5 --retry-delay 5 --fail | grep -q "200"; do + while common_curl -s -I -o /dev/null -w "%{http_code}" "${indexer_base_url}/${indexer_package}" --max-time 300 --retry 5 --retry-delay 5 --fail | grep -q "200"; do indexer_revision=$((indexer_revision+1)) if [ "${package_type}" == "rpm" ]; then indexer_rpm_package="wazuh-indexer-${wazuh_version}-${indexer_revision}.x86_64.rpm" @@ -81,7 +81,7 @@ function offline_download() { indexer_package="${indexer_deb_package}" fi done - if [ "$indexer_revision" -gt 1 ] && [ "$(common_curl -s -o /dev/null -w "%{http_code}" "${indexer_base_url}/${indexer_package}" --max-time 300 --retry 5 --retry-delay 5 --fail)" -ne "200" ]; then + if [ "$indexer_revision" -gt 1 ] && [ "$(common_curl -s -I -o /dev/null -w "%{http_code}" "${indexer_base_url}/${indexer_package}" --max-time 300 --retry 5 --retry-delay 5 --fail)" -ne "200" ]; then indexer_revision=$((indexer_revision-1)) if [ "${package_type}" == "rpm" ]; then indexer_rpm_package="wazuh-indexer-${wazuh_version}-${indexer_revision}.x86_64.rpm" @@ -90,7 +90,7 @@ function offline_download() { fi fi - while common_curl -s -o /dev/null -w "%{http_code}" "${dashboard_base_url}/${dashboard_package}" --max-time 300 --retry 5 --retry-delay 5 --fail | grep -q "200"; do + while common_curl -s -I -o /dev/null -w "%{http_code}" "${dashboard_base_url}/${dashboard_package}" --max-time 300 --retry 5 --retry-delay 5 --fail | grep -q "200"; do dashboard_revision=$((dashboard_revision+1)) if [ "${package_type}" == "rpm" ]; then dashboard_rpm_package="wazuh-dashboard-${wazuh_version}-${dashboard_revision}.x86_64.rpm" @@ -100,7 +100,7 @@ function offline_download() { dashboard_package="${dashboard_deb_package}" fi done - if [ "$dashboard_revision" -gt 1 ] && [ "$(common_curl -s -o /dev/null -w "%{http_code}" "${dashboard_base_url}/${dashboard_package}" --max-time 300 --retry 5 --retry-delay 5 --fail)" -ne "200" ]; then + if [ "$dashboard_revision" -gt 1 ] && [ "$(common_curl -s -I -o /dev/null -w "%{http_code}" "${dashboard_base_url}/${dashboard_package}" --max-time 300 --retry 5 --retry-delay 5 --fail)" -ne "200" ]; then dashboard_revision=$((dashboard_revision-1)) if [ "${package_type}" == "rpm" ]; then dashboard_rpm_package="wazuh-dashboard-${wazuh_version}-${dashboard_revision}.x86_64.rpm" From 41a3548ae844d11c76ef8f4b14d2a4fa2bbcc822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 8 Feb 2023 14:34:53 +0100 Subject: [PATCH 211/328] Fix zypper and wazuh-manger.spec MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/actions/test-install-enable/install_component.sh | 2 +- rpms/SPECS/wazuh-manager.spec | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/test-install-enable/install_component.sh b/.github/actions/test-install-enable/install_component.sh index ee897b3a9a..0a365d47a3 100644 --- a/.github/actions/test-install-enable/install_component.sh +++ b/.github/actions/test-install-enable/install_component.sh @@ -14,7 +14,7 @@ elif [ -n "$(command -v apt-get)" ]; then apt-get update apt-get install -y systemd elif [ -n "$(command -v zypper)" ]; then - sys_type="zypper" + sys_type="zypper --no-gpg-checks" else common_logger -e "Couldn't find type of system" exit 1 diff --git a/rpms/SPECS/wazuh-manager.spec b/rpms/SPECS/wazuh-manager.spec index 111816e115..a9d87f7639 100644 --- a/rpms/SPECS/wazuh-manager.spec +++ b/rpms/SPECS/wazuh-manager.spec @@ -293,10 +293,6 @@ if [ $1 = 2 ]; then fi fi -if [[ -d /run/systemd/system ]]; then - rm -f %{_initrddir}/wazuh-agent -fi - # Fresh install code block if [ $1 = 1 ]; then @@ -316,6 +312,10 @@ if [ $1 = 1 ]; then %{_localstatedir}/packages_files/manager_installation_scripts/add_localfiles.sh %{_localstatedir} >> %{_localstatedir}/etc/ossec.conf fi +if [[ -d /run/systemd/system ]]; then + rm -f %{_initrddir}/wazuh-manager +fi + # Generation auto-signed certificate if not exists if [ ! -f "%{_localstatedir}/etc/sslmanager.key" ] && [ ! -f "%{_localstatedir}/etc/sslmanager.cert" ]; then %{_localstatedir}/bin/wazuh-authd -C 365 -B 2048 -S "/C=US/ST=California/CN=Wazuh/" -K %{_localstatedir}/etc/sslmanager.key -X %{_localstatedir}/etc/sslmanager.cert 2>/dev/null From 6e9290678f73e8a2451554b265f409fb034d1144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 8 Feb 2023 17:07:14 +0100 Subject: [PATCH 212/328] Remove zypper machines from the tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/actions/test-install-enable/install_component.sh | 2 -- .github/workflows/test-install-rpm.yml | 3 --- 2 files changed, 5 deletions(-) diff --git a/.github/actions/test-install-enable/install_component.sh b/.github/actions/test-install-enable/install_component.sh index 0a365d47a3..29ce8605cf 100644 --- a/.github/actions/test-install-enable/install_component.sh +++ b/.github/actions/test-install-enable/install_component.sh @@ -13,8 +13,6 @@ elif [ -n "$(command -v apt-get)" ]; then sys_type="apt-get" apt-get update apt-get install -y systemd -elif [ -n "$(command -v zypper)" ]; then - sys_type="zypper --no-gpg-checks" else common_logger -e "Couldn't find type of system" exit 1 diff --git a/.github/workflows/test-install-rpm.yml b/.github/workflows/test-install-rpm.yml index 232e801d8f..9848e7969f 100644 --- a/.github/workflows/test-install-rpm.yml +++ b/.github/workflows/test-install-rpm.yml @@ -45,9 +45,6 @@ jobs: {NAME: 'redhat/ubi9:latest', ARCH: "x86_64"}, {NAME: 'amazonlinux:2', ARCH: "x86_64"}, {NAME: 'fedora:34', ARCH: "x86_64"}, - {NAME: 'opensuse/leap:latest', ARCH: "x86_64", INIT: "initd"}, - {NAME: 'opensuse/tumbleweed:latest', ARCH: "x86_64", INIT: "initd"}, - {NAME: 'i386/opensuse/tumbleweed:latest', ARCH: "i386", INIT: "initd"}, {NAME: 'centos:6.9', ARCH: "x86_64", INIT: "initd"}, {NAME: 'centos:5.11', ARCH: "x86_64", INIT: "initd"}] type: [agent, manager] From 63babe9b631dbcaeca7942f0d28f99e43cb504a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 8 Feb 2023 17:43:55 +0100 Subject: [PATCH 213/328] Remove repositories if test run on centos 5 or 6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../test-install-enable/install_component.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/actions/test-install-enable/install_component.sh b/.github/actions/test-install-enable/install_component.sh index 29ce8605cf..a854d386be 100644 --- a/.github/actions/test-install-enable/install_component.sh +++ b/.github/actions/test-install-enable/install_component.sh @@ -1,10 +1,19 @@ #!/bin/bash echo "Installing Wazuh $2." -source /etc/os-release -if [ "$ID" = "centos" ] && [ "$VERSION_ID" = "8" ]; then - find /etc/yum.repos.d/ -type f -exec sed -i 's/mirrorlist/#mirrorlist/g' {} \; - find /etc/yum.repos.d/ -type f -exec sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' {} \; +if [ -f /etc/os-release ]; then + source /etc/os-release + if [ "$ID" = "centos" ] && [ "$VERSION_ID" = "8" ]; then + find /etc/yum.repos.d/ -type f -exec sed -i 's/mirrorlist/#mirrorlist/g' {} \; + find /etc/yum.repos.d/ -type f -exec sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' {} \; + fi +fi + +if [ -f /etc/redhat-release ]; then + VERSION=$(cat /etc/redhat-release) + if [ "$VERSION" = "CentOS release 5.11 (Final)" ] || [ "$VERSION" = "CentOS release 6.9 (Final)" ]; then + rm -rf /etc/yum.repos.d/* + fi fi if [ -n "$(command -v yum)" ]; then From f46fc4824a1dc523565e39177a97d86ee73b3a96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 8 Feb 2023 18:14:05 +0100 Subject: [PATCH 214/328] Fix repos for centos 6 instead of removing them MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/actions/test-install-enable/install_component.sh | 4 ++-- .github/workflows/test-install-rpm.yml | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/actions/test-install-enable/install_component.sh b/.github/actions/test-install-enable/install_component.sh index a854d386be..9f507d1f53 100644 --- a/.github/actions/test-install-enable/install_component.sh +++ b/.github/actions/test-install-enable/install_component.sh @@ -11,8 +11,8 @@ fi if [ -f /etc/redhat-release ]; then VERSION=$(cat /etc/redhat-release) - if [ "$VERSION" = "CentOS release 5.11 (Final)" ] || [ "$VERSION" = "CentOS release 6.9 (Final)" ]; then - rm -rf /etc/yum.repos.d/* + if [ "$VERSION" = "CentOS release 6.9 (Final)" ]; then + curl https://www.getpagespeed.com/files/centos6-eol.repo --output /etc/yum.repos.d/CentOS-Base.repo fi fi diff --git a/.github/workflows/test-install-rpm.yml b/.github/workflows/test-install-rpm.yml index 9848e7969f..2c8fbb2878 100644 --- a/.github/workflows/test-install-rpm.yml +++ b/.github/workflows/test-install-rpm.yml @@ -45,8 +45,7 @@ jobs: {NAME: 'redhat/ubi9:latest', ARCH: "x86_64"}, {NAME: 'amazonlinux:2', ARCH: "x86_64"}, {NAME: 'fedora:34', ARCH: "x86_64"}, - {NAME: 'centos:6.9', ARCH: "x86_64", INIT: "initd"}, - {NAME: 'centos:5.11', ARCH: "x86_64", INIT: "initd"}] + {NAME: 'centos:6.9', ARCH: "x86_64", INIT: "initd"}] type: [agent, manager] exclude: - system: {ARCH: "i386"} From 2ac19c6c71b00bfc8358609df035b861989ca485 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 8 Feb 2023 18:21:43 +0100 Subject: [PATCH 215/328] Change file name to the install tests of github actions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../install_component.sh | 0 .github/workflows/test-install-deb.yml | 2 +- .github/workflows/test-install-rpm.yml | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename .github/actions/{test-install-enable => test-install-components}/install_component.sh (100%) diff --git a/.github/actions/test-install-enable/install_component.sh b/.github/actions/test-install-components/install_component.sh similarity index 100% rename from .github/actions/test-install-enable/install_component.sh rename to .github/actions/test-install-components/install_component.sh diff --git a/.github/workflows/test-install-deb.yml b/.github/workflows/test-install-deb.yml index 3ba17620f2..bfffce639d 100644 --- a/.github/workflows/test-install-deb.yml +++ b/.github/workflows/test-install-deb.yml @@ -91,4 +91,4 @@ jobs: - name: Launch docker if: steps.changes.outputs.deb_packages == 'true' || (steps.changes.outputs.deb_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.deb_images_amd64 == 'true' && matrix.ARCHITECTURE == 'amd64') - run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-install-enable/:/tests -v $GITHUB_WORKSPACE/packages/:/packages ${{ matrix.arch }}/${{ matrix.distro_name }} bash /tests/install_component.sh $PACKAGE_NAME ${{ matrix.type }} \ No newline at end of file + run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-install-components/:/tests -v $GITHUB_WORKSPACE/packages/:/packages ${{ matrix.arch }}/${{ matrix.distro_name }} bash /tests/install_component.sh $PACKAGE_NAME ${{ matrix.type }} \ No newline at end of file diff --git a/.github/workflows/test-install-rpm.yml b/.github/workflows/test-install-rpm.yml index 2c8fbb2878..03bdf545f0 100644 --- a/.github/workflows/test-install-rpm.yml +++ b/.github/workflows/test-install-rpm.yml @@ -100,4 +100,4 @@ jobs: - name: Launch docker if : steps.changes.outputs.rpm_packages == 'true' || (steps.changes.outputs.rpm_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.rpm_images_x86_64 == 'true' && matrix.ARCHITECTURE == 'x86_64') - run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-install-enable/:/tests -v $GITHUB_WORKSPACE/packages/:/packages ${{ matrix.system.NAME }} bash /tests/install_component.sh $PACKAGE_NAME ${{ matrix.type }} \ No newline at end of file + run: sudo docker run -v $GITHUB_WORKSPACE/.github/actions/test-install-components/:/tests -v $GITHUB_WORKSPACE/packages/:/packages ${{ matrix.system.NAME }} bash /tests/install_component.sh $PACKAGE_NAME ${{ matrix.type }} \ No newline at end of file From 5ad28944b8a19d19eaa1b41881911c3ce59d4c9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 9 Feb 2023 09:23:36 +0100 Subject: [PATCH 216/328] Change name of installation test github action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/test-install-deb.yml | 4 ++-- .github/workflows/test-install-rpm.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-install-deb.yml b/.github/workflows/test-install-deb.yml index bfffce639d..7396c1b043 100644 --- a/.github/workflows/test-install-deb.yml +++ b/.github/workflows/test-install-deb.yml @@ -1,4 +1,4 @@ -name: Test install and enable Wazuh agent and manager - DEB +name: Test install Wazuh agent and manager - DEB on: pull_request: paths: @@ -30,7 +30,7 @@ jobs: sha: ${{ github.event.pull_request.head.sha || github.sha }} wait-interval: 60 - Test-install-and-enable-deb-systems: + Test-install-deb-systems: needs: Wait-for-package-building runs-on: ubuntu-latest strategy: diff --git a/.github/workflows/test-install-rpm.yml b/.github/workflows/test-install-rpm.yml index 03bdf545f0..a44498a53a 100644 --- a/.github/workflows/test-install-rpm.yml +++ b/.github/workflows/test-install-rpm.yml @@ -1,4 +1,4 @@ -name: Test install and enable Wazuh agent and manager - RPM +name: Test install Wazuh agent and manager - RPM on: pull_request: paths: @@ -29,7 +29,7 @@ jobs: sha: ${{ github.event.pull_request.head.sha || github.sha }} wait-interval: 60 - Test-install-and-enable-rpm-systems: + Test-install-rpm-systems: needs: Wait-for-package-building runs-on: ubuntu-latest strategy: From 39deaafc7941e1ba88e0bd3aa11393c846006857 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 9 Feb 2023 13:09:27 +0100 Subject: [PATCH 217/328] Add the same changes to debian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- debs/SPECS/wazuh-agent/debian/postinst | 4 ++++ debs/SPECS/wazuh-manager/debian/postinst | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/debs/SPECS/wazuh-agent/debian/postinst b/debs/SPECS/wazuh-agent/debian/postinst index d7b5538e9c..e755febd75 100644 --- a/debs/SPECS/wazuh-agent/debian/postinst +++ b/debs/SPECS/wazuh-agent/debian/postinst @@ -19,6 +19,10 @@ case "$1" in OSMYSHELL="/sbin/nologin" + if [[ -d /run/systemd/system ]]; then + rm -f %{_initrddir}/wazuh-agent + fi + if [ ! -f ${OSMYSHELL} ]; then if [ -f "/bin/false" ]; then OSMYSHELL="/bin/false" diff --git a/debs/SPECS/wazuh-manager/debian/postinst b/debs/SPECS/wazuh-manager/debian/postinst index c5c84fc29e..dd4d507de8 100644 --- a/debs/SPECS/wazuh-manager/debian/postinst +++ b/debs/SPECS/wazuh-manager/debian/postinst @@ -16,6 +16,10 @@ case "$1" in SCRIPTS_DIR="${WAZUH_GLOBAL_TMP_DIR}/manager_installation_scripts" SCA_BASE_DIR="${SCRIPTS_DIR}/sca" + if [[ -d /run/systemd/system ]]; then + rm -f %{_initrddir}/wazuh-agent + fi + if [ ! -f ${OSMYSHELL} ]; then if [ -f "/bin/false" ]; then OSMYSHELL="/bin/false" From 2b1523ad2a40b8c68016d360148e41efcf879ded Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 9 Feb 2023 13:37:16 +0100 Subject: [PATCH 218/328] Change deb github actions to detect changes inside debs/SPECS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 2 +- .github/workflows/test-install-deb.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index a4f7277f80..1816c5832a 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -2,7 +2,7 @@ name: Build Wazuh Packages - DEB - amd64 and i386 on: pull_request: paths: - - 'debs/SPECS/*' + - 'debs/SPECS/**' - 'debs/generate_debian_package.sh' workflow_dispatch: workflow_call: diff --git a/.github/workflows/test-install-deb.yml b/.github/workflows/test-install-deb.yml index 7396c1b043..bd1fadc7fa 100644 --- a/.github/workflows/test-install-deb.yml +++ b/.github/workflows/test-install-deb.yml @@ -2,7 +2,7 @@ name: Test install Wazuh agent and manager - DEB on: pull_request: paths: - - 'debs/SPECS/*' + - 'debs/SPECS/**' - 'debs/generate_debian_package.sh' workflow_dispatch: workflow_call: From a402a1b297cead95a0fdb0e89bdb135f38301093 Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Thu, 9 Feb 2023 13:56:11 +0100 Subject: [PATCH 219/328] Added installCommon_installCheckDependencies function --- .../install_functions/installCommon.sh | 57 ++++++++++++++++++- .../install_functions/installMain.sh | 4 +- 2 files changed, 58 insertions(+), 3 deletions(-) diff --git a/unattended_installer/install_functions/installCommon.sh b/unattended_installer/install_functions/installCommon.sh index 198f27fb88..ba8066425a 100644 --- a/unattended_installer/install_functions/installCommon.sh +++ b/unattended_installer/install_functions/installCommon.sh @@ -270,10 +270,63 @@ function installCommon_getPass() { done } +function installCommon_installCheckDependencies() { + + if [ "${sys_type}" == "yum" ]; then + dependencies=( systemd grep tar coreutils sed procps gawk lsof curl openssl ) + not_installed=() + for dep in "${dependencies[@]}"; do + if [ "${dep}" == "openssl" ]; then + if ! yum list installed 2>/dev/null | grep -q -E ^"${dep}\.";then + not_installed+=("${dep}") + fi + elif ! yum list installed 2>/dev/null | grep -q -E ^"${dep}";then + not_installed+=("${dep}") + fi + done + + if [ "${#not_installed[@]}" -gt 0 ]; then + common_logger "--- Dependencies ---" + for dep in "${not_installed[@]}"; do + common_logger "Installing $dep." + eval "yum install ${dep} -y ${debug}" + if [ "${PIPESTATUS[0]}" != 0 ]; then + common_logger -e "Cannot install dependency: ${dep}." + exit 1 + fi + done + fi + + elif [ "${sys_type}" == "apt-get" ]; then + eval "apt-get update -q ${debug}" + dependencies=( systemd grep tar coreutils sed procps gawk lsof curl openssl ) + not_installed=() + + for dep in "${dependencies[@]}"; do + if ! apt list --installed 2>/dev/null | grep -q -E ^"${dep}"; then + not_installed+=("${dep}") + fi + done + + if [ "${#not_installed[@]}" -gt 0 ]; then + common_logger "--- Dependencies ----" + for dep in "${not_installed[@]}"; do + common_logger "Installing $dep." + installCommon_aptInstall "${dep}" + if [ "${install_result}" != 0 ]; then + common_logger -e "Cannot install dependency: ${dep}." + exit 1 + fi + done + fi + fi + +} + function installCommon_installPrerequisites() { if [ "${sys_type}" == "yum" ]; then - dependencies=( curl libcap tar gnupg openssl lsof ) + dependencies=( libcap gnupg ) not_installed=() for dep in "${dependencies[@]}"; do if [ "${dep}" == "openssl" ]; then @@ -299,7 +352,7 @@ function installCommon_installPrerequisites() { elif [ "${sys_type}" == "apt-get" ]; then eval "apt-get update -q ${debug}" - dependencies=( apt-transport-https curl libcap2-bin tar software-properties-common gnupg openssl lsof ) + dependencies=( apt-transport-https libcap2-bin software-properties-common gnupg ) not_installed=() for dep in "${dependencies[@]}"; do diff --git a/unattended_installer/install_functions/installMain.sh b/unattended_installer/install_functions/installMain.sh index 3909a73884..477a01f3c9 100755 --- a/unattended_installer/install_functions/installMain.sh +++ b/unattended_installer/install_functions/installMain.sh @@ -202,11 +202,13 @@ function main() { # -------------- Uninstall case ------------------------------------ + common_checkSystem + installCommon_installCheckDependencies + if [ -z "${download}" ]; then check_dist fi - common_checkSystem common_checkInstalled checks_arguments if [ -n "${uninstall}" ]; then From b225ede0464dc58d3b65118bf90df6013b469c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 9 Feb 2023 14:13:09 +0100 Subject: [PATCH 220/328] Change Upload docker images GitHub Actions so they are called when a pull request is merged MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-deb-images.yml | 14 +++++--------- .github/workflows/upload-rpm-images.yml | 14 +++++--------- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/.github/workflows/upload-deb-images.yml b/.github/workflows/upload-deb-images.yml index a216abd904..be855d3998 100644 --- a/.github/workflows/upload-deb-images.yml +++ b/.github/workflows/upload-deb-images.yml @@ -4,14 +4,10 @@ on: paths: - 'debs/Debian/**' - 'debs/build.sh' - push: - branches: - - master - - 4.5 - - 4.4 - paths: - - 'debs/Debian/*' - - 'debs/build.sh' + types: + - opened + - synchronize + - merged workflow_dispatch: jobs: @@ -49,7 +45,7 @@ jobs: - name: Set tag as version run: - if [ "${{ github.event_name }}" == "pull_request" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV; fi + if [ "${{ github.event.pull_request.merged }}" == "false" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV; fi - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} with tag ${{ env.TAG }} to Github Container Registry if: ( steps.changes.outputs.i386 == 'true' && matrix.CONTAINER_NAME == 'deb_builder_i386' ) || ( steps.changes.outputs.amd64 == 'true' && matrix.CONTAINER_NAME == 'deb_builder_amd64' ) diff --git a/.github/workflows/upload-rpm-images.yml b/.github/workflows/upload-rpm-images.yml index 0a340447f9..25d205aa0c 100644 --- a/.github/workflows/upload-rpm-images.yml +++ b/.github/workflows/upload-rpm-images.yml @@ -4,14 +4,10 @@ on: paths: - 'rpms/CentOS/**' - 'rpms/build.sh' - push: - branches: - - master - - 4.5 - - 4.4 - paths: - - 'rpms/CentOS/*' - - 'rpms/build.sh' + types: + - opened + - synchronize + - merged workflow_dispatch: jobs: @@ -49,7 +45,7 @@ jobs: - name: Set tag as version run: - if [ "${{ github.event_name }}" == "pull_request" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV; fi + if [ "${{ github.event.pull_request.merged }}" == "false" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV; fi - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} with tag ${{ env.TAG }} to Github Container Registry if: ( steps.changes.outputs.i386 == 'true' && matrix.CONTAINER_NAME == 'rpm_builder_i386' ) || ( steps.changes.outputs.amd64 == 'true' && matrix.CONTAINER_NAME == 'rpm_builder_x86' ) From cb59438eb9903d435f26661c568cedcbcd9e4834 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 9 Feb 2023 14:19:35 +0100 Subject: [PATCH 221/328] Force run of the GitHub Action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- debs/SPECS/wazuh-agent/debian/postinst | 2 +- rpms/SPECS/wazuh-agent.spec | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debs/SPECS/wazuh-agent/debian/postinst b/debs/SPECS/wazuh-agent/debian/postinst index d7b5538e9c..805b53cc33 100644 --- a/debs/SPECS/wazuh-agent/debian/postinst +++ b/debs/SPECS/wazuh-agent/debian/postinst @@ -205,4 +205,4 @@ case "$1" in esac -exit 0 \ No newline at end of file +exit 0 \ No newline at end of file diff --git a/rpms/SPECS/wazuh-agent.spec b/rpms/SPECS/wazuh-agent.spec index a6f44c6e8d..1676de6e34 100644 --- a/rpms/SPECS/wazuh-agent.spec +++ b/rpms/SPECS/wazuh-agent.spec @@ -814,3 +814,4 @@ rm -fr %{buildroot} - Fixed daemon list for service reloading at wazuh-control. - Fixed socket waiting issue on Windows agents. - Fixed PCI_DSS definitions grouping issue at Rootcheck controls. + \ No newline at end of file From 2bcaf51c6ec0b10be663864cf7a97b34fac43a46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 9 Feb 2023 16:48:10 +0100 Subject: [PATCH 222/328] Only build packages for necessary architectures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 3 +++ .github/workflows/build-rpm-packages.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index a4f7277f80..dbee70212f 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -48,6 +48,7 @@ jobs: - 'debs/generate_debian_package.sh' - name: Set tag and container name + if: steps.changes.outputs.deb_packages == 'true' || (steps.changes.outputs.deb_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.deb_images_amd64 == 'true' && matrix.ARCHITECTURE == 'amd64') run: | MAJOR=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION) if [ "${{ steps.changes.outputs.deb_images }}" == "true" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$MAJOR" >> $GITHUB_ENV ; fi @@ -55,6 +56,7 @@ jobs: echo "CONTAINER_NAME=deb_builder_${{ matrix.ARCHITECTURE }}" >> $GITHUB_ENV - name: Download docker image for package building + if: steps.changes.outputs.deb_packages == 'true' || (steps.changes.outputs.deb_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.deb_images_amd64 == 'true' && matrix.ARCHITECTURE == 'amd64') run: | bash $GITHUB_WORKSPACE/.github/actions/ghcr-pull-and-push/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ env.TAG }} @@ -67,6 +69,7 @@ jobs: echo "PACKAGE_NAME=$(ls ./output | grep .deb | head -n 1)" >> $GITHUB_ENV - name: Upload Wazuh ${{ matrix.TYPE }} ${{ matrix.ARCHITECTURE }} package as artifact + if: steps.changes.outputs.deb_packages == 'true' || (steps.changes.outputs.deb_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.deb_images_amd64 == 'true' && matrix.ARCHITECTURE == 'amd64') uses: actions/upload-artifact@v2 with: name: ${{ env.PACKAGE_NAME }} diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index b40536fc4f..ceca955345 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -49,6 +49,7 @@ jobs: - 'rpms/generate_rpm_package.sh' - name: Set tag and container name + if : steps.changes.outputs.rpm_packages == 'true' || (steps.changes.outputs.rpm_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.rpm_images_x86_64 == 'true' && matrix.ARCHITECTURE == 'x86_64') run: | MAJOR=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION) if [ "${{ steps.changes.outputs.rpm_images }}" == "true" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$MAJOR" >> $GITHUB_ENV ; fi @@ -56,6 +57,7 @@ jobs: if [ "${{ matrix.ARCHITECTURE }}" == "x86_64" ]; then echo "CONTAINER_NAME=rpm_builder_x86" >> $GITHUB_ENV ; else echo "CONTAINER_NAME=rpm_builder_${{ matrix.ARCHITECTURE }}" >> $GITHUB_ENV ; fi - name: Download docker image for package building + if : steps.changes.outputs.rpm_packages == 'true' || (steps.changes.outputs.rpm_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.rpm_images_x86_64 == 'true' && matrix.ARCHITECTURE == 'x86_64') run: | bash $GITHUB_WORKSPACE/.github/actions/ghcr-pull-and-push/pull_image_from_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} $CONTAINER_NAME ${{ env.TAG }} @@ -68,6 +70,7 @@ jobs: echo "PACKAGE_NAME=$(ls ./output | grep .rpm | head -n 1)" >> $GITHUB_ENV - name: Upload Wazuh ${{ matrix.TYPE }} ${{ matrix.ARCHITECTURE }} package as artifact + if : steps.changes.outputs.rpm_packages == 'true' || (steps.changes.outputs.rpm_images_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || (steps.changes.outputs.rpm_images_x86_64 == 'true' && matrix.ARCHITECTURE == 'x86_64') uses: actions/upload-artifact@v2 with: name: ${{ env.PACKAGE_NAME }} From 2e152871c12bfa50fc24d46d1e2ec614fbfc4a33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 9 Feb 2023 16:48:27 +0100 Subject: [PATCH 223/328] Create and upload images when PR is merged MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/upload-deb-images.yml | 4 ++-- .github/workflows/upload-rpm-images.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/upload-deb-images.yml b/.github/workflows/upload-deb-images.yml index be855d3998..a0da5b8eb7 100644 --- a/.github/workflows/upload-deb-images.yml +++ b/.github/workflows/upload-deb-images.yml @@ -7,7 +7,7 @@ on: types: - opened - synchronize - - merged + - closed workflow_dispatch: jobs: @@ -48,7 +48,7 @@ jobs: if [ "${{ github.event.pull_request.merged }}" == "false" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV; fi - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} with tag ${{ env.TAG }} to Github Container Registry - if: ( steps.changes.outputs.i386 == 'true' && matrix.CONTAINER_NAME == 'deb_builder_i386' ) || ( steps.changes.outputs.amd64 == 'true' && matrix.CONTAINER_NAME == 'deb_builder_amd64' ) + if: ( steps.changes.outputs.i386 == 'true' && matrix.image.CONTAINER_NAME == 'deb_builder_i386' ) || ( steps.changes.outputs.amd64 == 'true' && matrix.image.CONTAINER_NAME == 'deb_builder_amd64' ) run: bash $GITHUB_WORKSPACE/.github/actions/ghcr-pull-and-push/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }} diff --git a/.github/workflows/upload-rpm-images.yml b/.github/workflows/upload-rpm-images.yml index 25d205aa0c..c2392127da 100644 --- a/.github/workflows/upload-rpm-images.yml +++ b/.github/workflows/upload-rpm-images.yml @@ -7,7 +7,7 @@ on: types: - opened - synchronize - - merged + - closed workflow_dispatch: jobs: @@ -48,7 +48,7 @@ jobs: if [ "${{ github.event.pull_request.merged }}" == "false" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV; fi - name: Build and push image ${{ matrix.image.CONTAINER_NAME }} with tag ${{ env.TAG }} to Github Container Registry - if: ( steps.changes.outputs.i386 == 'true' && matrix.CONTAINER_NAME == 'rpm_builder_i386' ) || ( steps.changes.outputs.amd64 == 'true' && matrix.CONTAINER_NAME == 'rpm_builder_x86' ) + if: ( steps.changes.outputs.i386 == 'true' && matrix.image.CONTAINER_NAME == 'rpm_builder_i386' ) || ( steps.changes.outputs.x86_64 == 'true' && matrix.image.CONTAINER_NAME == 'rpm_builder_x86' ) run: bash $GITHUB_WORKSPACE/.github/actions/ghcr-pull-and-push/build_and_push_image_to_ghcr.sh ${{ secrets.GITHUB_TOKEN }} ${{ github.actor}} ${{matrix.image.CONTAINER_NAME}} ${{ matrix.image.DOCKERFILE_PATH }} ${{ env.TAG }} From ed102bf5547013ea0fd7f3017b51bc513d246000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 9 Feb 2023 16:50:22 +0100 Subject: [PATCH 224/328] Force a run of the Upload Images GitHub Action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- debs/Debian/i386/Dockerfile | 1 + rpms/CentOS/6/i386/Dockerfile | 1 + 2 files changed, 2 insertions(+) diff --git a/debs/Debian/i386/Dockerfile b/debs/Debian/i386/Dockerfile index c43803f4bf..d822f57faf 100644 --- a/debs/Debian/i386/Dockerfile +++ b/debs/Debian/i386/Dockerfile @@ -42,3 +42,4 @@ RUN chmod +x /usr/local/bin/build_package # Set the entrypoint ENTRYPOINT ["/usr/local/bin/build_package"] + \ No newline at end of file diff --git a/rpms/CentOS/6/i386/Dockerfile b/rpms/CentOS/6/i386/Dockerfile index 04cdb78fa5..9b0bb9f50a 100644 --- a/rpms/CentOS/6/i386/Dockerfile +++ b/rpms/CentOS/6/i386/Dockerfile @@ -64,3 +64,4 @@ RUN chmod +x /usr/local/bin/build_package # Set the entrypoint ENTRYPOINT ["/usr/local/bin/build_package"] + \ No newline at end of file From dca0596b1599781a0b485a20a7849135186329db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 9 Feb 2023 16:53:59 +0100 Subject: [PATCH 225/328] Modify necessary files to force the run of the action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- debs/Debian/i386/Dockerfile | 1 - debs/SPECS/wazuh-agent/debian/postinst | 2 +- debs/build.sh | 1 + rpms/CentOS/6/i386/Dockerfile | 1 - rpms/SPECS/wazuh-agent.spec | 1 - rpms/build.sh | 1 + 6 files changed, 3 insertions(+), 4 deletions(-) diff --git a/debs/Debian/i386/Dockerfile b/debs/Debian/i386/Dockerfile index d822f57faf..c43803f4bf 100644 --- a/debs/Debian/i386/Dockerfile +++ b/debs/Debian/i386/Dockerfile @@ -42,4 +42,3 @@ RUN chmod +x /usr/local/bin/build_package # Set the entrypoint ENTRYPOINT ["/usr/local/bin/build_package"] - \ No newline at end of file diff --git a/debs/SPECS/wazuh-agent/debian/postinst b/debs/SPECS/wazuh-agent/debian/postinst index 805b53cc33..d7b5538e9c 100644 --- a/debs/SPECS/wazuh-agent/debian/postinst +++ b/debs/SPECS/wazuh-agent/debian/postinst @@ -205,4 +205,4 @@ case "$1" in esac -exit 0 \ No newline at end of file +exit 0 \ No newline at end of file diff --git a/debs/build.sh b/debs/build.sh index 4291313e50..7a9090d9a8 100755 --- a/debs/build.sh +++ b/debs/build.sh @@ -125,3 +125,4 @@ if [[ "${checksum}" == "yes" ]]; then cd ${pkg_path} && sha512sum ${deb_file} > /var/local/checksum/${deb_file}.sha512 fi mv ${pkg_path}/${deb_file} /var/local/wazuh + \ No newline at end of file diff --git a/rpms/CentOS/6/i386/Dockerfile b/rpms/CentOS/6/i386/Dockerfile index 9b0bb9f50a..04cdb78fa5 100644 --- a/rpms/CentOS/6/i386/Dockerfile +++ b/rpms/CentOS/6/i386/Dockerfile @@ -64,4 +64,3 @@ RUN chmod +x /usr/local/bin/build_package # Set the entrypoint ENTRYPOINT ["/usr/local/bin/build_package"] - \ No newline at end of file diff --git a/rpms/SPECS/wazuh-agent.spec b/rpms/SPECS/wazuh-agent.spec index 1676de6e34..a6f44c6e8d 100644 --- a/rpms/SPECS/wazuh-agent.spec +++ b/rpms/SPECS/wazuh-agent.spec @@ -814,4 +814,3 @@ rm -fr %{buildroot} - Fixed daemon list for service reloading at wazuh-control. - Fixed socket waiting issue on Windows agents. - Fixed PCI_DSS definitions grouping issue at Rootcheck controls. - \ No newline at end of file diff --git a/rpms/build.sh b/rpms/build.sh index b6006f30af..036d941e0f 100755 --- a/rpms/build.sh +++ b/rpms/build.sh @@ -129,3 +129,4 @@ if [[ "${src}" == "yes" ]]; then fi find ${extract_path} -maxdepth 3 -type f -name "${file_name}*" -exec mv {} /var/local/wazuh \; + \ No newline at end of file From 8b94f1c7d083c7946eb5e398edf6abfc71a5812e Mon Sep 17 00:00:00 2001 From: Daniel Folch Date: Thu, 9 Feb 2023 18:11:07 +0100 Subject: [PATCH 226/328] Do not remove packages_files directory (#2087) --- alpine/SPECS/wazuh-agent/wazuh-agent.post-install | 2 -- 1 file changed, 2 deletions(-) diff --git a/alpine/SPECS/wazuh-agent/wazuh-agent.post-install b/alpine/SPECS/wazuh-agent/wazuh-agent.post-install index ce9615b0b7..7b581bb705 100644 --- a/alpine/SPECS/wazuh-agent/wazuh-agent.post-install +++ b/alpine/SPECS/wazuh-agent/wazuh-agent.post-install @@ -14,6 +14,4 @@ ${directory_base}/packages_files/gen_ossec.sh conf agent ${DIST_NAME} ${DIST_VER # Add default local_files to ossec.conf ${directory_base}/packages_files/add_localfiles.sh ${directory_base} >> ${directory_base}/etc/ossec.conf -rm -rf ${directory_base}/packages_files - exit 0 From 87852988fa24bbd1933b176c9255cff64131a3bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 9 Feb 2023 18:24:28 +0100 Subject: [PATCH 227/328] Remove changes in debs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- debs/SPECS/wazuh-agent/debian/postinst | 4 ---- debs/SPECS/wazuh-manager/debian/postinst | 4 ---- 2 files changed, 8 deletions(-) diff --git a/debs/SPECS/wazuh-agent/debian/postinst b/debs/SPECS/wazuh-agent/debian/postinst index e755febd75..d7b5538e9c 100644 --- a/debs/SPECS/wazuh-agent/debian/postinst +++ b/debs/SPECS/wazuh-agent/debian/postinst @@ -19,10 +19,6 @@ case "$1" in OSMYSHELL="/sbin/nologin" - if [[ -d /run/systemd/system ]]; then - rm -f %{_initrddir}/wazuh-agent - fi - if [ ! -f ${OSMYSHELL} ]; then if [ -f "/bin/false" ]; then OSMYSHELL="/bin/false" diff --git a/debs/SPECS/wazuh-manager/debian/postinst b/debs/SPECS/wazuh-manager/debian/postinst index dd4d507de8..c5c84fc29e 100644 --- a/debs/SPECS/wazuh-manager/debian/postinst +++ b/debs/SPECS/wazuh-manager/debian/postinst @@ -16,10 +16,6 @@ case "$1" in SCRIPTS_DIR="${WAZUH_GLOBAL_TMP_DIR}/manager_installation_scripts" SCA_BASE_DIR="${SCRIPTS_DIR}/sca" - if [[ -d /run/systemd/system ]]; then - rm -f %{_initrddir}/wazuh-agent - fi - if [ ! -f ${OSMYSHELL} ]; then if [ -f "/bin/false" ]; then OSMYSHELL="/bin/false" From 23f4f5ab52b918df2920ff019518d8c392717be9 Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Fri, 10 Feb 2023 11:30:15 +0100 Subject: [PATCH 228/328] Avoid installing dependencies in uninstallation --- unattended_installer/install_functions/installMain.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unattended_installer/install_functions/installMain.sh b/unattended_installer/install_functions/installMain.sh index 477a01f3c9..9689b7b5da 100755 --- a/unattended_installer/install_functions/installMain.sh +++ b/unattended_installer/install_functions/installMain.sh @@ -203,7 +203,10 @@ function main() { # -------------- Uninstall case ------------------------------------ common_checkSystem - installCommon_installCheckDependencies + + if [ -z "${uninstall}" ]; then + installCommon_installCheckDependencies + fi if [ -z "${download}" ]; then check_dist From 1349a42addd4e556b1647a32d2991a6f62d922cc Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Fri, 10 Feb 2023 13:57:24 +0100 Subject: [PATCH 229/328] Corrected names of the cert and password tools in builder.sh --- unattended_installer/builder.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unattended_installer/builder.sh b/unattended_installer/builder.sh index 14fdae8c21..36b05ff626 100755 --- a/unattended_installer/builder.sh +++ b/unattended_installer/builder.sh @@ -32,13 +32,13 @@ function getHelp() { echo -e " Builds the unattended installer single file wazuh-install.sh" echo -e "" echo -e " -c, --cert-tool" - echo -e " Builds the certificate creation tool cert-tool.sh" + echo -e " Builds the certificate creation tool wazuh-cert-tool.sh" echo -e "" echo -e " -d [staging], --development" echo -e " Use development repos. By default it uses pre-release. If staging is specified, it will be used" echo -e "" echo -e " -p, --password-tool" - echo -e " Builds the password creation and modification tool password-tool.sh" + echo -e " Builds the password creation and modification tool wazuh-password-tool.sh" echo -e "" echo -e " -h, --help" echo -e " Shows help." From 526c5c3e1bf5c5d5674b531d132a2dfe0e78cf40 Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Fri, 10 Feb 2023 13:58:25 +0100 Subject: [PATCH 230/328] Fixed adminkey and adminpem set --- .../passwords_tool/passwordsFunctions.sh | 10 ++-------- .../passwords_tool/passwordsVariables.sh | 5 ++++- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/unattended_installer/passwords_tool/passwordsFunctions.sh b/unattended_installer/passwords_tool/passwordsFunctions.sh index ee40bfb53b..8dd011cf7c 100644 --- a/unattended_installer/passwords_tool/passwordsFunctions.sh +++ b/unattended_installer/passwords_tool/passwordsFunctions.sh @@ -365,18 +365,12 @@ function passwords_getNetworkHost() { function passwords_readAdmincerts() { - if [[ -f /etc/wazuh-indexer/certs/admin.pem ]]; then - adminpem="/etc/wazuh-indexer/certs/admin.pem" - else + if [[ ! -f "${adminpem}" ]]; then common_logger -e "No admin certificate indicated. Please run the script with the option -c ." exit 1; fi - if [[ -f /etc/wazuh-indexer/certs/admin-key.pem ]]; then - adminkey="/etc/wazuh-indexer/certs/admin-key.pem" - elif [[ -f /etc/wazuh-indexer/certs/admin.key ]]; then - adminkey="/etc/wazuh-indexer/certs/admin.key" - else + if [[ ! -f "${adminkey}" ]]; then common_logger -e "No admin certificate key indicated. Please run the script with the option -k ." exit 1; fi diff --git a/unattended_installer/passwords_tool/passwordsVariables.sh b/unattended_installer/passwords_tool/passwordsVariables.sh index b3bef21909..1548c9fc5b 100644 --- a/unattended_installer/passwords_tool/passwordsVariables.sh +++ b/unattended_installer/passwords_tool/passwordsVariables.sh @@ -5,5 +5,8 @@ # and/or modify it under the terms of the GNU General Public # License (version 2) as published by the FSF - Free Software # Foundation. + readonly logfile="/var/log/wazuh-passwords-tool.log" -debug=">> ${logfile} 2>&1" \ No newline at end of file +debug=">> ${logfile} 2>&1" +adminpem="/etc/wazuh-indexer/certs/admin.pem" +adminkey="/etc/wazuh-indexer/certs/admin-key.pem" \ No newline at end of file From cfe67026d1b7eb353fef880d30576a635966256a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 13 Feb 2023 09:48:59 +0100 Subject: [PATCH 231/328] Remove init.d service when systemd is being used MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- debs/SPECS/wazuh-agent/debian/postinst | 4 ++++ debs/SPECS/wazuh-manager/debian/postinst | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/debs/SPECS/wazuh-agent/debian/postinst b/debs/SPECS/wazuh-agent/debian/postinst index d7b5538e9c..fd615e9c5d 100644 --- a/debs/SPECS/wazuh-agent/debian/postinst +++ b/debs/SPECS/wazuh-agent/debian/postinst @@ -19,6 +19,10 @@ case "$1" in OSMYSHELL="/sbin/nologin" + if [[ -d /run/systemd/system ]]; then + rm -f /etc/init.d/wazuh-agent + fi + if [ ! -f ${OSMYSHELL} ]; then if [ -f "/bin/false" ]; then OSMYSHELL="/bin/false" diff --git a/debs/SPECS/wazuh-manager/debian/postinst b/debs/SPECS/wazuh-manager/debian/postinst index c5c84fc29e..7c8b994d0b 100644 --- a/debs/SPECS/wazuh-manager/debian/postinst +++ b/debs/SPECS/wazuh-manager/debian/postinst @@ -16,6 +16,10 @@ case "$1" in SCRIPTS_DIR="${WAZUH_GLOBAL_TMP_DIR}/manager_installation_scripts" SCA_BASE_DIR="${SCRIPTS_DIR}/sca" + if [[ -d /run/systemd/system ]]; then + rm -f /etc/init.d/wazuh-agent + fi + if [ ! -f ${OSMYSHELL} ]; then if [ -f "/bin/false" ]; then OSMYSHELL="/bin/false" From 1fa36d401e5959743abdf9736d3ce3e791448d7a Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Mon, 13 Feb 2023 11:48:57 +0100 Subject: [PATCH 232/328] Added commonVariables.sh file --- unattended_installer/builder.sh | 7 +++++-- unattended_installer/cert_tool/certVariables.sh | 3 --- .../common_functions/commonVariables.sh | 14 ++++++++++++++ .../install_functions/installVariables.sh | 3 --- .../passwords_tool/passwordsVariables.sh | 2 -- 5 files changed, 19 insertions(+), 10 deletions(-) create mode 100644 unattended_installer/common_functions/commonVariables.sh diff --git a/unattended_installer/builder.sh b/unattended_installer/builder.sh index 36b05ff626..044c180844 100755 --- a/unattended_installer/builder.sh +++ b/unattended_installer/builder.sh @@ -85,6 +85,7 @@ function buildInstaller() { echo 'readonly repository="4.x"' >> "${output_script_path}" fi echo >> "${output_script_path}" + grep -Ev '^#|^\s*$' ${resources_common}/commonVariables.sh >> "${output_script_path}" grep -Ev '^#|^\s*$' ${resources_installer}/installVariables.sh >> "${output_script_path}" echo >> "${output_script_path}" @@ -150,7 +151,8 @@ function buildPasswordsTool() { # License (version 2) as published by the FSF - Free Software # Foundation." >> "${output_script_path}" - ## Passwords tool variables + ## Common and Passwords tool variables + grep -Ev '^#|^\s*$' ${resources_common}/commonVariables.sh >> "${output_script_path}" grep -Ev '^#|^\s*$' "${resources_passwords}/passwordsVariables.sh" >> "${output_script_path}" echo >> "${output_script_path}" @@ -190,7 +192,8 @@ function buildCertsTool() { # License (version 2) as published by the FSF - Free Software # Foundation." >> "${output_script_path}" - ## Certs tool variables + ## Common and Certs tool variables + grep -Ev '^#|^\s*$' ${resources_common}/commonVariables.sh >> "${output_script_path}" grep -Ev '^#|^\s*$' "${resources_certs}/certVariables.sh" >> "${output_script_path}" echo >> "${output_script_path}" diff --git a/unattended_installer/cert_tool/certVariables.sh b/unattended_installer/cert_tool/certVariables.sh index a40717b4f3..34a715f184 100644 --- a/unattended_installer/cert_tool/certVariables.sh +++ b/unattended_installer/cert_tool/certVariables.sh @@ -6,9 +6,6 @@ # License (version 2) as published by the FSF - Free Software # Foundation. -base_path="$(dirname "$(readlink -f "$0")")" -readonly base_path -readonly config_file="${base_path}/config.yml" readonly logfile="" cert_tmp_path="/tmp/wazuh-certificates" debug=">> /dev/null 2>&1" \ No newline at end of file diff --git a/unattended_installer/common_functions/commonVariables.sh b/unattended_installer/common_functions/commonVariables.sh new file mode 100644 index 0000000000..df557d43eb --- /dev/null +++ b/unattended_installer/common_functions/commonVariables.sh @@ -0,0 +1,14 @@ +# Common variables +# Copyright (C) 2015, Wazuh Inc. +# +# This program is a free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public +# License (version 2) as published by the FSF - Free Software +# Foundation. + +adminpem="/etc/wazuh-indexer/certs/admin.pem" +adminkey="/etc/wazuh-indexer/certs/admin-key.pem" + +base_path="$(dirname "$(readlink -f "$0")")" +readonly base_path +config_file="${base_path}/config.yml" diff --git a/unattended_installer/install_functions/installVariables.sh b/unattended_installer/install_functions/installVariables.sh index 07586ef064..d303a3519e 100644 --- a/unattended_installer/install_functions/installVariables.sh +++ b/unattended_installer/install_functions/installVariables.sh @@ -15,9 +15,6 @@ readonly wazuh_install_vesion="0.1" ## Links and paths to resources readonly resources="https://${bucket}/${wazuh_major}" readonly base_url="https://${bucket}/${repository}" -base_path="$(dirname "$(readlink -f "$0")")" -readonly base_path -config_file="${base_path}/config.yml" readonly tar_file_name="wazuh-install-files.tar" tar_file="${base_path}/${tar_file_name}" diff --git a/unattended_installer/passwords_tool/passwordsVariables.sh b/unattended_installer/passwords_tool/passwordsVariables.sh index 1548c9fc5b..201c6f6b94 100644 --- a/unattended_installer/passwords_tool/passwordsVariables.sh +++ b/unattended_installer/passwords_tool/passwordsVariables.sh @@ -8,5 +8,3 @@ readonly logfile="/var/log/wazuh-passwords-tool.log" debug=">> ${logfile} 2>&1" -adminpem="/etc/wazuh-indexer/certs/admin.pem" -adminkey="/etc/wazuh-indexer/certs/admin-key.pem" \ No newline at end of file From e9553b0732969717d490e440f5e048accc013bb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 13 Feb 2023 11:56:57 +0100 Subject: [PATCH 233/328] Fix bash condition in postinstall MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- debs/SPECS/wazuh-agent/debian/postinst | 2 +- debs/SPECS/wazuh-manager/debian/postinst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debs/SPECS/wazuh-agent/debian/postinst b/debs/SPECS/wazuh-agent/debian/postinst index fd615e9c5d..f415bbaf52 100644 --- a/debs/SPECS/wazuh-agent/debian/postinst +++ b/debs/SPECS/wazuh-agent/debian/postinst @@ -19,7 +19,7 @@ case "$1" in OSMYSHELL="/sbin/nologin" - if [[ -d /run/systemd/system ]]; then + if [ -d /run/systemd/system ]; then rm -f /etc/init.d/wazuh-agent fi diff --git a/debs/SPECS/wazuh-manager/debian/postinst b/debs/SPECS/wazuh-manager/debian/postinst index 7c8b994d0b..e127d68484 100644 --- a/debs/SPECS/wazuh-manager/debian/postinst +++ b/debs/SPECS/wazuh-manager/debian/postinst @@ -16,7 +16,7 @@ case "$1" in SCRIPTS_DIR="${WAZUH_GLOBAL_TMP_DIR}/manager_installation_scripts" SCA_BASE_DIR="${SCRIPTS_DIR}/sca" - if [[ -d /run/systemd/system ]]; then + if [ -d /run/systemd/system ]; then rm -f /etc/init.d/wazuh-agent fi From 72c57a91334163a9e7b7bc242d77f5a857fc31ae Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Mon, 13 Feb 2023 12:32:21 +0100 Subject: [PATCH 234/328] Reverted some variables in commonVariables.sh --- unattended_installer/cert_tool/certVariables.sh | 3 +++ unattended_installer/common_functions/commonVariables.sh | 4 ---- unattended_installer/install_functions/installVariables.sh | 3 +++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/unattended_installer/cert_tool/certVariables.sh b/unattended_installer/cert_tool/certVariables.sh index 34a715f184..a40717b4f3 100644 --- a/unattended_installer/cert_tool/certVariables.sh +++ b/unattended_installer/cert_tool/certVariables.sh @@ -6,6 +6,9 @@ # License (version 2) as published by the FSF - Free Software # Foundation. +base_path="$(dirname "$(readlink -f "$0")")" +readonly base_path +readonly config_file="${base_path}/config.yml" readonly logfile="" cert_tmp_path="/tmp/wazuh-certificates" debug=">> /dev/null 2>&1" \ No newline at end of file diff --git a/unattended_installer/common_functions/commonVariables.sh b/unattended_installer/common_functions/commonVariables.sh index df557d43eb..d43ffa892f 100644 --- a/unattended_installer/common_functions/commonVariables.sh +++ b/unattended_installer/common_functions/commonVariables.sh @@ -8,7 +8,3 @@ adminpem="/etc/wazuh-indexer/certs/admin.pem" adminkey="/etc/wazuh-indexer/certs/admin-key.pem" - -base_path="$(dirname "$(readlink -f "$0")")" -readonly base_path -config_file="${base_path}/config.yml" diff --git a/unattended_installer/install_functions/installVariables.sh b/unattended_installer/install_functions/installVariables.sh index d303a3519e..07586ef064 100644 --- a/unattended_installer/install_functions/installVariables.sh +++ b/unattended_installer/install_functions/installVariables.sh @@ -15,6 +15,9 @@ readonly wazuh_install_vesion="0.1" ## Links and paths to resources readonly resources="https://${bucket}/${wazuh_major}" readonly base_url="https://${bucket}/${repository}" +base_path="$(dirname "$(readlink -f "$0")")" +readonly base_path +config_file="${base_path}/config.yml" readonly tar_file_name="wazuh-install-files.tar" tar_file="${base_path}/${tar_file_name}" From 8ddb2d66604a1efa6db84ac90dac79c1dc9e77af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 13 Feb 2023 12:37:02 +0100 Subject: [PATCH 235/328] Add the fix for the Wazuh indexer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- debs/SPECS/wazuh-manager/debian/postinst | 2 +- stack/indexer/deb/debian/postinst | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/debs/SPECS/wazuh-manager/debian/postinst b/debs/SPECS/wazuh-manager/debian/postinst index e127d68484..b4c5fb6980 100644 --- a/debs/SPECS/wazuh-manager/debian/postinst +++ b/debs/SPECS/wazuh-manager/debian/postinst @@ -17,7 +17,7 @@ case "$1" in SCA_BASE_DIR="${SCRIPTS_DIR}/sca" if [ -d /run/systemd/system ]; then - rm -f /etc/init.d/wazuh-agent + rm -f /etc/init.d/wazuh-manager fi if [ ! -f ${OSMYSHELL} ]; then diff --git a/stack/indexer/deb/debian/postinst b/stack/indexer/deb/debian/postinst index 0ce951f7bf..0972bec1d9 100644 --- a/stack/indexer/deb/debian/postinst +++ b/stack/indexer/deb/debian/postinst @@ -35,6 +35,10 @@ fi export OPENSEARCH_PATH_CONF=${OPENSEARCH_PATH_CONF:-${CONFIG_DIR}} +if [ -d /run/systemd/system ]; then + rm -f /etc/init.d/wazuh-indexer +fi + # To pick up /usr/lib/sysctl.d/wazuh-indexer.conf if command -v systemctl > /dev/null 2>&1; then systemctl restart systemd-sysctl.service > /dev/null 2>&1 || true From b6dfb5332a97d8dce5038790a356d89e2e544d4e Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Mon, 13 Feb 2023 14:08:06 +0100 Subject: [PATCH 236/328] Removed passwords_readAdmincerts function --- .../passwords_tool/passwordsFunctions.sh | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/unattended_installer/passwords_tool/passwordsFunctions.sh b/unattended_installer/passwords_tool/passwordsFunctions.sh index 8dd011cf7c..75638fb43f 100644 --- a/unattended_installer/passwords_tool/passwordsFunctions.sh +++ b/unattended_installer/passwords_tool/passwordsFunctions.sh @@ -175,9 +175,6 @@ function passwords_createBackUp() { capem=$(grep "plugins.security.ssl.transport.pemtrustedcas_filepath: " /etc/wazuh-indexer/opensearch.yml ) rcapem="plugins.security.ssl.transport.pemtrustedcas_filepath: " capem="${capem//$rcapem}" - if [[ -z "${adminpem}" ]] || [[ -z "${adminkey}" ]]; then - passwords_readAdmincerts - fi fi fi @@ -363,20 +360,6 @@ function passwords_getNetworkHost() { fi } -function passwords_readAdmincerts() { - - if [[ ! -f "${adminpem}" ]]; then - common_logger -e "No admin certificate indicated. Please run the script with the option -c ." - exit 1; - fi - - if [[ ! -f "${adminkey}" ]]; then - common_logger -e "No admin certificate key indicated. Please run the script with the option -k ." - exit 1; - fi - -} - function passwords_readFileUsers() { filecorrect=$(grep -Ev '^#|^\s*$' "${p_file}" | grep -Pzc "\A(\s*(indexer_username|api_username|indexer_password|api_password):[ \t]+[\'\"]?[\w.*+?-]+[\'\"]?)+\Z") @@ -569,9 +552,6 @@ function passwords_runSecurityAdmin() { capem=$(grep "plugins.security.ssl.transport.pemtrustedcas_filepath: " /etc/wazuh-indexer/opensearch.yml ) rcapem="plugins.security.ssl.transport.pemtrustedcas_filepath: " capem="${capem//$rcapem}" - if [[ -z "${adminpem}" ]] || [[ -z "${adminkey}" ]]; then - passwords_readAdmincerts - fi fi fi From a3604574abbfee2311760e394b353015eb53ddc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Mon, 13 Feb 2023 16:31:51 +0100 Subject: [PATCH 237/328] Don't exit on error on indexer prerm MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- stack/indexer/deb/debian/prerm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/stack/indexer/deb/debian/prerm b/stack/indexer/deb/debian/prerm index 8004e9a316..863ddabea2 100644 --- a/stack/indexer/deb/debian/prerm +++ b/stack/indexer/deb/debian/prerm @@ -69,7 +69,7 @@ if [ "$STOP_REQUIRED" = "true" ]; then elif [ -x /etc/rc.d/init.d/wazuh-indexer ] ; then /etc/rc.d/init.d/wazuh-indexer stop > /dev/null 2>&1 else # Anything else - kill -15 `pgrep -f opensearch` > /dev/null 2>&1 + kill -15 `pgrep -f opensearch` > /dev/null 2>&1 || true fi echo " OK" fi @@ -87,4 +87,3 @@ if [ "$REMOVE_SERVICE" = "true" ]; then update-rc.d wazuh-indexer remove >/dev/null || true fi fi - From 11da984bcc86a9635049d7f9dc8a6ecdb0dbb96f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 14 Feb 2023 10:28:02 +0100 Subject: [PATCH 238/328] Redirect written output of commands in postrm for agent packages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- debs/SPECS/wazuh-agent/debian/postrm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debs/SPECS/wazuh-agent/debian/postrm b/debs/SPECS/wazuh-agent/debian/postrm index ee822e0e52..bb30d5af0a 100644 --- a/debs/SPECS/wazuh-agent/debian/postrm +++ b/debs/SPECS/wazuh-agent/debian/postrm @@ -40,10 +40,10 @@ case "$1" in purge) - if getent passwd wazuh ; then + if getent passwd wazuh >/dev/null 2>&1; then deluser wazuh > /dev/null 2>&1 fi - if getent group wazuh ; then + if getent group wazuh >/dev/null 2>&1; then delgroup wazuh > /dev/null 2>&1 fi rm -rf ${DIR}/* From f60dfa04387b4fd109eed128b1ee3019d07659a8 Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Tue, 14 Feb 2023 13:51:49 +0100 Subject: [PATCH 239/328] Modularized the installation of dependencies --- .../install_functions/installCommon.sh | 139 +++++++----------- 1 file changed, 57 insertions(+), 82 deletions(-) diff --git a/unattended_installer/install_functions/installCommon.sh b/unattended_installer/install_functions/installCommon.sh index ba8066425a..da2cc28205 100644 --- a/unattended_installer/install_functions/installCommon.sh +++ b/unattended_installer/install_functions/installCommon.sh @@ -98,6 +98,31 @@ function installCommon_aptInstall() { } +function installCommon_aptInstallList(){ + + dependencies=("$@") + not_installed=() + + for dep in "${dependencies[@]}"; do + if ! apt list --installed 2>/dev/null | grep -q -E ^"${dep}"; then + not_installed+=("${dep}") + fi + done + + if [ "${#not_installed[@]}" -gt 0 ]; then + common_logger "--- Dependencies ----" + for dep in "${not_installed[@]}"; do + common_logger "Installing $dep." + installCommon_aptInstall "${dep}" + if [ "${install_result}" != 0 ]; then + common_logger -e "Cannot install dependency: ${dep}." + exit 1 + fi + done + fi + +} + function installCommon_changePasswordApi() { #Change API password tool @@ -274,51 +299,12 @@ function installCommon_installCheckDependencies() { if [ "${sys_type}" == "yum" ]; then dependencies=( systemd grep tar coreutils sed procps gawk lsof curl openssl ) - not_installed=() - for dep in "${dependencies[@]}"; do - if [ "${dep}" == "openssl" ]; then - if ! yum list installed 2>/dev/null | grep -q -E ^"${dep}\.";then - not_installed+=("${dep}") - fi - elif ! yum list installed 2>/dev/null | grep -q -E ^"${dep}";then - not_installed+=("${dep}") - fi - done - - if [ "${#not_installed[@]}" -gt 0 ]; then - common_logger "--- Dependencies ---" - for dep in "${not_installed[@]}"; do - common_logger "Installing $dep." - eval "yum install ${dep} -y ${debug}" - if [ "${PIPESTATUS[0]}" != 0 ]; then - common_logger -e "Cannot install dependency: ${dep}." - exit 1 - fi - done - fi + installCommon_yumInstallList "${dependencies[@]}" elif [ "${sys_type}" == "apt-get" ]; then eval "apt-get update -q ${debug}" dependencies=( systemd grep tar coreutils sed procps gawk lsof curl openssl ) - not_installed=() - - for dep in "${dependencies[@]}"; do - if ! apt list --installed 2>/dev/null | grep -q -E ^"${dep}"; then - not_installed+=("${dep}") - fi - done - - if [ "${#not_installed[@]}" -gt 0 ]; then - common_logger "--- Dependencies ----" - for dep in "${not_installed[@]}"; do - common_logger "Installing $dep." - installCommon_aptInstall "${dep}" - if [ "${install_result}" != 0 ]; then - common_logger -e "Cannot install dependency: ${dep}." - exit 1 - fi - done - fi + installCommon_aptInstallList fi } @@ -327,51 +313,12 @@ function installCommon_installPrerequisites() { if [ "${sys_type}" == "yum" ]; then dependencies=( libcap gnupg ) - not_installed=() - for dep in "${dependencies[@]}"; do - if [ "${dep}" == "openssl" ]; then - if ! yum list installed 2>/dev/null | grep -q -E ^"${dep}\.";then - not_installed+=("${dep}") - fi - elif ! yum list installed 2>/dev/null | grep -q -E ^"${dep}";then - not_installed+=("${dep}") - fi - done - - if [ "${#not_installed[@]}" -gt 0 ]; then - common_logger "--- Dependencies ---" - for dep in "${not_installed[@]}"; do - common_logger "Installing $dep." - eval "yum install ${dep} -y ${debug}" - if [ "${PIPESTATUS[0]}" != 0 ]; then - common_logger -e "Cannot install dependency: ${dep}." - exit 1 - fi - done - fi + installCommon_yumInstallList "${dependencies[@]}" elif [ "${sys_type}" == "apt-get" ]; then eval "apt-get update -q ${debug}" dependencies=( apt-transport-https libcap2-bin software-properties-common gnupg ) - not_installed=() - - for dep in "${dependencies[@]}"; do - if ! apt list --installed 2>/dev/null | grep -q -E ^"${dep}"; then - not_installed+=("${dep}") - fi - done - - if [ "${#not_installed[@]}" -gt 0 ]; then - common_logger "--- Dependencies ----" - for dep in "${not_installed[@]}"; do - common_logger "Installing $dep." - installCommon_aptInstall "${dep}" - if [ "${install_result}" != 0 ]; then - common_logger -e "Cannot install dependency: ${dep}." - exit 1 - fi - done - fi + installCommon_aptInstallList "${dependencies[@]}" fi } @@ -670,4 +617,32 @@ function installCommon_startService() { exit 1 fi +} + +function installCommon_yumInstallList(){ + + dependencies=("$@") + not_installed=() + for dep in "${dependencies[@]}"; do + if [ "${dep}" == "openssl" ]; then + if ! yum list installed 2>/dev/null | grep -q -E ^"${dep}\.";then + not_installed+=("${dep}") + fi + elif ! yum list installed 2>/dev/null | grep -q -E ^"${dep}";then + not_installed+=("${dep}") + fi + done + + if [ "${#not_installed[@]}" -gt 0 ]; then + common_logger "--- Dependencies ---" + for dep in "${not_installed[@]}"; do + common_logger "Installing $dep." + eval "yum install ${dep} -y ${debug}" + if [ "${PIPESTATUS[0]}" != 0 ]; then + common_logger -e "Cannot install dependency: ${dep}." + exit 1 + fi + done + fi + } \ No newline at end of file From 3b4d1af93c001ef1401977df7a213e7c2f816866 Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Tue, 14 Feb 2023 13:56:14 +0100 Subject: [PATCH 240/328] Forgot adding dependencies array --- unattended_installer/install_functions/installCommon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unattended_installer/install_functions/installCommon.sh b/unattended_installer/install_functions/installCommon.sh index da2cc28205..602be5ae47 100644 --- a/unattended_installer/install_functions/installCommon.sh +++ b/unattended_installer/install_functions/installCommon.sh @@ -304,7 +304,7 @@ function installCommon_installCheckDependencies() { elif [ "${sys_type}" == "apt-get" ]; then eval "apt-get update -q ${debug}" dependencies=( systemd grep tar coreutils sed procps gawk lsof curl openssl ) - installCommon_aptInstallList + installCommon_aptInstallList "${dependencies[@]}" fi } From ff75f720e5999fef4515e7f2e984a864b630f05c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Turina?= Date: Tue, 14 Feb 2023 11:50:30 -0300 Subject: [PATCH 241/328] Remove var/db/agents directory (#2042) --- debs/SPECS/wazuh-manager/debian/postinst | 2 +- debs/SPECS/wazuh-manager/debian/preinst | 2 +- rpms/SPECS/wazuh-manager.spec | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/debs/SPECS/wazuh-manager/debian/postinst b/debs/SPECS/wazuh-manager/debian/postinst index 9d334e9cea..69166b6f54 100644 --- a/debs/SPECS/wazuh-manager/debian/postinst +++ b/debs/SPECS/wazuh-manager/debian/postinst @@ -54,7 +54,7 @@ case "$1" in # Remove/relocate existing SQLite databases rm -f ${DIR}/var/db/cluster.db* || true rm -f ${DIR}/var/db/.profile.db* || true - rm -f ${DIR}/var/db/agents/* || true + rm -rf ${DIR}/var/db/agents || true if [ -f ${DIR}/var/db/global.db ]; then mv ${DIR}/var/db/global.db ${DIR}/queue/db/ diff --git a/debs/SPECS/wazuh-manager/debian/preinst b/debs/SPECS/wazuh-manager/debian/preinst index 80ee3366ac..cdd048c4af 100644 --- a/debs/SPECS/wazuh-manager/debian/preinst +++ b/debs/SPECS/wazuh-manager/debian/preinst @@ -133,7 +133,7 @@ case "$1" in fi if [ -d ${DIR}/var/db/agents ]; then - rm -f ${DIR}/var/db/agents/* + rm -rf ${DIR}/var/db/agents fi # Remove plain-text agent information if exists diff --git a/rpms/SPECS/wazuh-manager.spec b/rpms/SPECS/wazuh-manager.spec index 2f6d7a6cbf..c3c5cfbafa 100644 --- a/rpms/SPECS/wazuh-manager.spec +++ b/rpms/SPECS/wazuh-manager.spec @@ -214,7 +214,7 @@ fi # Remove/relocate existing SQLite databases rm -f %{_localstatedir}/var/db/cluster.db* || true rm -f %{_localstatedir}/var/db/.profile.db* || true -rm -f %{_localstatedir}/var/db/agents/* || true +rm -rf %{_localstatedir}/var/db/agents || true if [ -f %{_localstatedir}/var/db/global.db ]; then mv %{_localstatedir}/var/db/global.db %{_localstatedir}/queue/db/ @@ -815,7 +815,6 @@ rm -fr %{buildroot} %attr(640, root, wazuh) %config(missingok) %{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/windows/* %dir %attr(750, root, wazuh) %{_localstatedir}/var %dir %attr(770, root, wazuh) %{_localstatedir}/var/db -%dir %attr(770, root, wazuh) %{_localstatedir}/var/db/agents %attr(660, root, wazuh) %{_localstatedir}/var/db/mitre.db %dir %attr(770, root, wazuh) %{_localstatedir}/var/download %dir %attr(770, wazuh, wazuh) %{_localstatedir}/var/multigroups From 59796931c8f2a499de258e4252deda0281579e24 Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Wed, 15 Feb 2023 13:59:12 +0100 Subject: [PATCH 242/328] Fixed Debian expired keys in Dockerfiles --- debs/Debian/amd64/Dockerfile | 2 +- debs/Debian/arm64/Dockerfile | 4 ++-- debs/Debian/armhf/Dockerfile | 4 ++-- debs/Debian/i386/Dockerfile | 2 +- debs/Debian/ppc64le/Dockerfile | 6 ++++-- stack/dashboard/deb/docker/amd64/Dockerfile | 4 ++-- stack/indexer/deb/docker/amd64/Dockerfile | 2 +- windows/Dockerfile | 2 +- wpk/common/Dockerfile | 2 +- 9 files changed, 15 insertions(+), 13 deletions(-) diff --git a/debs/Debian/amd64/Dockerfile b/debs/Debian/amd64/Dockerfile index c3734b3576..76198ac058 100644 --- a/debs/Debian/amd64/Dockerfile +++ b/debs/Debian/amd64/Dockerfile @@ -5,7 +5,7 @@ ENV DEBIAN_FRONTEND noninteractive # Installing necessary packages RUN echo "deb http://archive.debian.org/debian/ wheezy contrib main non-free" > /etc/apt/sources.list && \ echo "deb-src http://archive.debian.org/debian/ wheezy contrib main non-free" >> /etc/apt/sources.list && \ - apt-get update && apt-get install -y apt-utils && \ + apt-get update && apt-get install -y --force-yes apt-utils && \ apt-get install -y --force-yes \ curl gcc make sudo wget expect gnupg perl-base=5.14.2-21+deb7u3 perl \ libc-bin=2.13-38+deb7u10 libc6=2.13-38+deb7u10 libc6-dev build-essential \ diff --git a/debs/Debian/arm64/Dockerfile b/debs/Debian/arm64/Dockerfile index 7c4737fbe0..b2ab1ca813 100644 --- a/debs/Debian/arm64/Dockerfile +++ b/debs/Debian/arm64/Dockerfile @@ -5,7 +5,7 @@ ENV DEBIAN_FRONTEND noninteractive # Installing necessary packages RUN echo "deb http://deb.debian.org/debian stretch contrib non-free" >> /etc/apt/sources.list && \ echo "deb-src http://deb.debian.org/debian stretch main contrib non-free" >> /etc/apt/sources.list && \ - apt-get update && apt-get install -y apt apt-utils \ + apt-get update && apt-get install -y --allow-change-held-packages apt apt-utils \ curl gcc g++ make sudo expect gnupg \ perl-base perl wget libc-bin libc6 libc6-dev \ build-essential cdbs devscripts equivs automake \ @@ -15,7 +15,7 @@ RUN echo "deb http://deb.debian.org/debian stretch contrib non-free" >> /etc/apt # Add Debian's source repository and, Install NodeJS 12 RUN apt-get update && apt-get build-dep python3.5 -y RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - && \ - apt-get install -y nodejs + apt-get install --allow-change-held-packages -y nodejs RUN curl -OL http://packages.wazuh.com/utils/gcc/gcc-9.4.0.tar.gz && \ tar xzf gcc-9.4.0.tar.gz && cd gcc-9.4.0/ && \ diff --git a/debs/Debian/armhf/Dockerfile b/debs/Debian/armhf/Dockerfile index b9d5d8a015..d86967d1cb 100644 --- a/debs/Debian/armhf/Dockerfile +++ b/debs/Debian/armhf/Dockerfile @@ -5,7 +5,7 @@ ENV DEBIAN_FRONTEND noninteractive # Installing necessary packages RUN echo "deb http://deb.debian.org/debian stretch contrib non-free" >> /etc/apt/sources.list && \ echo "deb-src http://deb.debian.org/debian stretch main contrib non-free" >> /etc/apt/sources.list && \ - apt-get update && apt-get install -y apt-utils \ + apt-get update && apt-get install -y --allow-change-held-packages apt-utils \ curl gcc make wget sudo expect gnupg perl-base \ perl libc-bin libc6 libc6-dev \ build-essential cdbs devscripts equivs automake autoconf libtool \ @@ -15,7 +15,7 @@ RUN echo "deb http://deb.debian.org/debian stretch contrib non-free" >> /etc/apt # Add Debian's source repository and, Install NodeJS 12 RUN apt-get build-dep python3.5 -y RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - && \ - apt-get install -y nodejs + apt-get install -y --allow-change-held-packages nodejs RUN curl -OL http://packages.wazuh.com/utils/gcc/gcc-9.4.0.tar.gz && \ tar xzf gcc-9.4.0.tar.gz && cd gcc-9.4.0/ && \ diff --git a/debs/Debian/i386/Dockerfile b/debs/Debian/i386/Dockerfile index 99eef6c673..b2c9234fa2 100644 --- a/debs/Debian/i386/Dockerfile +++ b/debs/Debian/i386/Dockerfile @@ -5,7 +5,7 @@ ENV DEBIAN_FRONTEND noninteractive # Installing necessary packages RUN echo "deb http://archive.debian.org/debian/ wheezy contrib main non-free" > /etc/apt/sources.list && \ echo "deb-src http://archive.debian.org/debian/ wheezy contrib main non-free" >> /etc/apt/sources.list && \ - apt-get update && apt-get install -y apt-utils && \ + apt-get update && apt-get install -y --force-yes apt-utils && \ apt-get install -y --force-yes \ curl gcc-multilib make wget sudo expect gnupg perl-base=5.14.2-21+deb7u3 \ perl libc-bin=2.13-38+deb7u10 libc6=2.13-38+deb7u10 libc6-dev \ diff --git a/debs/Debian/ppc64le/Dockerfile b/debs/Debian/ppc64le/Dockerfile index cbdf066de4..7d9638ffa9 100644 --- a/debs/Debian/ppc64le/Dockerfile +++ b/debs/Debian/ppc64le/Dockerfile @@ -2,11 +2,13 @@ FROM ppc64le/debian:stretch ENV DEBIAN_FRONTEND noninteractive +RUN apt-get -v + # Installing necessary packages RUN echo "deb http://deb.debian.org/debian stretch main contrib non-free" >> /etc/apt/sources.list && \ echo "deb-src http://deb.debian.org/debian stretch main contrib non-free" >> /etc/apt/sources.list && \ - apt-get update && apt-get install -y apt-utils && \ - apt-get install -y --force-yes \ + apt-get update && apt-get install -y --allow-change-held-packages apt-utils && \ + apt-get install -y --allow-change-held-packages \ curl gcc make sudo expect gnupg perl-base perl wget \ libc-bin libc6 libc6-dev build-essential \ cdbs devscripts equivs automake autoconf libtool libaudit-dev selinux-basics \ diff --git a/stack/dashboard/deb/docker/amd64/Dockerfile b/stack/dashboard/deb/docker/amd64/Dockerfile index 77d3684396..f3ca3b9811 100644 --- a/stack/dashboard/deb/docker/amd64/Dockerfile +++ b/stack/dashboard/deb/docker/amd64/Dockerfile @@ -3,8 +3,8 @@ FROM debian:10 ENV DEBIAN_FRONTEND noninteractive # Installing necessary packages -RUN apt-get update && apt-get install -y apt-utils && \ - apt-get install -y \ +RUN apt-get update && apt-get install -y --allow-change-held-packages apt-utils && \ + apt-get install -y --allow-change-held-packages \ curl sudo wget expect gnupg build-essential \ devscripts equivs selinux-basics procps gawk diff --git a/stack/indexer/deb/docker/amd64/Dockerfile b/stack/indexer/deb/docker/amd64/Dockerfile index e9a5559425..b40740f3db 100644 --- a/stack/indexer/deb/docker/amd64/Dockerfile +++ b/stack/indexer/deb/docker/amd64/Dockerfile @@ -2,7 +2,7 @@ FROM debian:8 ENV DEBIAN_FRONTEND noninteractive -RUN apt-get update && apt-get install -y apt-utils && \ +RUN apt-get update && apt-get install -y --force-yes apt-utils && \ apt-get install -y --force-yes \ curl sudo wget expect gnupg build-essential \ devscripts equivs selinux-basics procps gawk diff --git a/windows/Dockerfile b/windows/Dockerfile index bf17600c83..79fd0b2f0f 100644 --- a/windows/Dockerfile +++ b/windows/Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:22.04 # Installing necessary packages RUN apt-get update && \ - apt-get install -y gcc g++ gcc-mingw-w64 g++-mingw-w64 nsis make wget unzip \ + apt-get install -y --allow-change-held-packages gcc g++ gcc-mingw-w64 g++-mingw-w64 nsis make wget unzip \ curl perl binutils zip libssl-dev RUN curl -OL http://packages.wazuh.com/utils/cmake/cmake-3.18.3.tar.gz && \ diff --git a/wpk/common/Dockerfile b/wpk/common/Dockerfile index 1597f882f1..eae449e527 100644 --- a/wpk/common/Dockerfile +++ b/wpk/common/Dockerfile @@ -1,7 +1,7 @@ FROM debian:9 RUN apt-get update && \ - apt-get -y install python git curl jq python3 python3-pip libffi-dev && \ + apt-get -y install --allow-change-held-packages python git curl jq python3 python3-pip libffi-dev && \ pip3 install --upgrade cryptography==2.9.2 awscli ADD wpkpack.py /usr/local/bin/wpkpack From fcbb1a12226b3a68eafb70fcfd81551a208f74af Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Thu, 16 Feb 2023 10:46:19 +0100 Subject: [PATCH 243/328] Fix check of dist-detect.sh curl --- unattended_installer/builder.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/unattended_installer/builder.sh b/unattended_installer/builder.sh index 14fdae8c21..2af53709f8 100755 --- a/unattended_installer/builder.sh +++ b/unattended_installer/builder.sh @@ -271,6 +271,25 @@ function builder_main() { fi } +function checkDistDetectURL() { + + retries=0 + eval "curl -s -o /dev/null 'https://raw.githubusercontent.com/wazuh/wazuh/${source_branch}/src/init/dist-detect.sh' --retry 5 --retry-delay 5 --max-time 300 --fail" + e_code="${PIPESTATUS[0]}" + while [ "${e_code}" -eq 7 ] && [ "${retries}" -ne 12 ]; do + retries=$((retries+1)) + sleep 5 + eval "curl -s -o /dev/null 'https://raw.githubusercontent.com/wazuh/wazuh/${source_branch}/src/init/dist-detect.sh' --retry 5 --retry-delay 5 --max-time 300 --fail" + e_code="${PIPESTATUS[0]}" + done + + if [[ "${retries}" -eq 12 ]] || [[ "${e_code}" -ne 0 ]]; then + echo -e "Error: Could not get the Filebeat Wazuh template. " + exit 1 + fi + +} + function checkFilebeatURL() { # Import variables From 26dc75ff445ea0449e0a987bb52ee973b3360263 Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Thu, 16 Feb 2023 10:47:11 +0100 Subject: [PATCH 244/328] Calling function in buildInstaller --- unattended_installer/builder.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/unattended_installer/builder.sh b/unattended_installer/builder.sh index 2af53709f8..7bf4eebc39 100755 --- a/unattended_installer/builder.sh +++ b/unattended_installer/builder.sh @@ -48,6 +48,7 @@ function getHelp() { function buildInstaller() { + checkDistDetectURL checkFilebeatURL output_script_path="${base_path_builder}/wazuh-install.sh" From 7e2e2f3e84fee74c722ec50cbc1f9e86f7ac866d Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Thu, 16 Feb 2023 11:02:49 +0100 Subject: [PATCH 245/328] Improved the error message --- unattended_installer/builder.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unattended_installer/builder.sh b/unattended_installer/builder.sh index 7bf4eebc39..6ddf3bcdb2 100755 --- a/unattended_installer/builder.sh +++ b/unattended_installer/builder.sh @@ -285,7 +285,7 @@ function checkDistDetectURL() { done if [[ "${retries}" -eq 12 ]] || [[ "${e_code}" -ne 0 ]]; then - echo -e "Error: Could not get the Filebeat Wazuh template. " + echo -e "Error: Could not get the dist-detect file." exit 1 fi From 5c9f33a7c0cd00b61c75afd826d6559afc8aeb07 Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Thu, 16 Feb 2023 11:07:11 +0100 Subject: [PATCH 246/328] Updated source_branch variable --- unattended_installer/builder.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unattended_installer/builder.sh b/unattended_installer/builder.sh index 044c180844..487cbcbf42 100755 --- a/unattended_installer/builder.sh +++ b/unattended_installer/builder.sh @@ -16,7 +16,7 @@ readonly resources_certs="${base_path_builder}/cert_tool" readonly resources_passwords="${base_path_builder}/passwords_tool" readonly resources_common="${base_path_builder}/common_functions" readonly resources_download="${base_path_builder}/downloader" -readonly source_branch="4.4" +readonly source_branch="4.5" function getHelp() { From b1247250314fdbc4db043c48b08379ddac0d8d56 Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Thu, 16 Feb 2023 11:43:35 +0100 Subject: [PATCH 247/328] Removed retry arguments in the loop --- unattended_installer/builder.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unattended_installer/builder.sh b/unattended_installer/builder.sh index 6ddf3bcdb2..3f1dd68b85 100755 --- a/unattended_installer/builder.sh +++ b/unattended_installer/builder.sh @@ -280,7 +280,7 @@ function checkDistDetectURL() { while [ "${e_code}" -eq 7 ] && [ "${retries}" -ne 12 ]; do retries=$((retries+1)) sleep 5 - eval "curl -s -o /dev/null 'https://raw.githubusercontent.com/wazuh/wazuh/${source_branch}/src/init/dist-detect.sh' --retry 5 --retry-delay 5 --max-time 300 --fail" + eval "curl -s -o /dev/null 'https://raw.githubusercontent.com/wazuh/wazuh/${source_branch}/src/init/dist-detect.sh' --fail" e_code="${PIPESTATUS[0]}" done From 86946a744f3df31f98992891ca549629515d6adf Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Thu, 16 Feb 2023 13:48:37 +0100 Subject: [PATCH 248/328] Fixed Debian dockerfiles --- debs/Debian/amd64/Dockerfile | 2 +- debs/Debian/arm64/Dockerfile | 2 +- debs/Debian/armhf/Dockerfile | 2 +- debs/Debian/ppc64le/Dockerfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/debs/Debian/amd64/Dockerfile b/debs/Debian/amd64/Dockerfile index 76198ac058..cab85b23cd 100644 --- a/debs/Debian/amd64/Dockerfile +++ b/debs/Debian/amd64/Dockerfile @@ -12,7 +12,7 @@ RUN echo "deb http://archive.debian.org/debian/ wheezy contrib main non-free" > cdbs devscripts equivs automake autoconf libtool libaudit-dev selinux-basics \ libdb5.1=5.1.29-5 libdb5.1-dev libssl1.0.0=1.0.1e-2+deb7u20 procps gawk libsigsegv2 -RUN apt-get update && apt-get build-dep python3.2 -y +RUN apt-get update && apt-get build-dep python3.2 -y --force-yes RUN curl -OL http://packages.wazuh.com/utils/gcc/gcc-9.4.0.tar.gz && \ tar xzf gcc-9.4.0.tar.gz && cd gcc-9.4.0/ && \ diff --git a/debs/Debian/arm64/Dockerfile b/debs/Debian/arm64/Dockerfile index b2ab1ca813..9e0be61006 100644 --- a/debs/Debian/arm64/Dockerfile +++ b/debs/Debian/arm64/Dockerfile @@ -13,7 +13,7 @@ RUN echo "deb http://deb.debian.org/debian stretch contrib non-free" >> /etc/apt libdb5.3 libdb5.3 libssl1.0.2 gawk libsigsegv2 # Add Debian's source repository and, Install NodeJS 12 -RUN apt-get update && apt-get build-dep python3.5 -y +RUN apt-get update && apt-get build-dep python3.5 -y --allow-change-held-packages RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - && \ apt-get install --allow-change-held-packages -y nodejs diff --git a/debs/Debian/armhf/Dockerfile b/debs/Debian/armhf/Dockerfile index d86967d1cb..c526d17cb8 100644 --- a/debs/Debian/armhf/Dockerfile +++ b/debs/Debian/armhf/Dockerfile @@ -13,7 +13,7 @@ RUN echo "deb http://deb.debian.org/debian stretch contrib non-free" >> /etc/apt libssl1.1 libssl-dev gawk libsigsegv2 procps libc6-armel-cross g++ # Add Debian's source repository and, Install NodeJS 12 -RUN apt-get build-dep python3.5 -y +RUN apt-get build-dep python3.5 -y --allow-change-held-packages RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - && \ apt-get install -y --allow-change-held-packages nodejs diff --git a/debs/Debian/ppc64le/Dockerfile b/debs/Debian/ppc64le/Dockerfile index 7d9638ffa9..f0fe23d3f9 100644 --- a/debs/Debian/ppc64le/Dockerfile +++ b/debs/Debian/ppc64le/Dockerfile @@ -14,7 +14,7 @@ RUN echo "deb http://deb.debian.org/debian stretch main contrib non-free" >> /et cdbs devscripts equivs automake autoconf libtool libaudit-dev selinux-basics \ libdb5.3 libdb5.3 libssl1.0.2 gawk libsigsegv2 -RUN apt-get update && apt-get build-dep python3.5 -y +RUN apt-get update && apt-get build-dep python3.5 -y --allow-change-held-packages RUN curl -OL http://packages.wazuh.com/utils/gcc/gcc-9.4.0.tar.gz && \ tar xzf gcc-9.4.0.tar.gz && cd gcc-9.4.0/ && \ From 42070909ceb9467a00c2daee1fd86d4e2a2aad8b Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Thu, 16 Feb 2023 13:50:23 +0100 Subject: [PATCH 249/328] Fixed Debian i386 dockerfile --- debs/Debian/i386/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debs/Debian/i386/Dockerfile b/debs/Debian/i386/Dockerfile index b2c9234fa2..c43803f4bf 100644 --- a/debs/Debian/i386/Dockerfile +++ b/debs/Debian/i386/Dockerfile @@ -14,7 +14,7 @@ RUN echo "deb http://archive.debian.org/debian/ wheezy contrib main non-free" > libssl1.0.0=1.0.1e-2+deb7u20 gawk libsigsegv2 procps # Add Debian's source repository -RUN apt-get update && apt-get build-dep python3.2 -y +RUN apt-get update && apt-get build-dep python3.2 -y --force-yes RUN sed -i "s;/\* To add :#define SO_REUSEPORT 15 \*/;#define SO_REUSEPORT 15;g" /usr/include/asm-generic/socket.h RUN curl -OL http://packages.wazuh.com/utils/gcc/gcc-9.4.0.tar.gz && \ From 57311272adad4aba12588bc9c232f0c696fd7834 Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Fri, 17 Feb 2023 14:02:00 +0100 Subject: [PATCH 250/328] Changed check of the installed packages --- .../install_functions/installCommon.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/unattended_installer/install_functions/installCommon.sh b/unattended_installer/install_functions/installCommon.sh index 602be5ae47..ba42cea0e6 100644 --- a/unattended_installer/install_functions/installCommon.sh +++ b/unattended_installer/install_functions/installCommon.sh @@ -104,7 +104,7 @@ function installCommon_aptInstallList(){ not_installed=() for dep in "${dependencies[@]}"; do - if ! apt list --installed 2>/dev/null | grep -q -E ^"${dep}"; then + if ! apt list --installed 2>/dev/null | grep -q -E ^"${dep}"\/; then not_installed+=("${dep}") fi done @@ -298,7 +298,7 @@ function installCommon_getPass() { function installCommon_installCheckDependencies() { if [ "${sys_type}" == "yum" ]; then - dependencies=( systemd grep tar coreutils sed procps gawk lsof curl openssl ) + dependencies=( systemd grep tar coreutils sed procps-ng gawk lsof curl openssl ) installCommon_yumInstallList "${dependencies[@]}" elif [ "${sys_type}" == "apt-get" ]; then @@ -312,7 +312,7 @@ function installCommon_installCheckDependencies() { function installCommon_installPrerequisites() { if [ "${sys_type}" == "yum" ]; then - dependencies=( libcap gnupg ) + dependencies=( libcap gnupg2 ) installCommon_yumInstallList "${dependencies[@]}" elif [ "${sys_type}" == "apt-get" ]; then @@ -624,11 +624,7 @@ function installCommon_yumInstallList(){ dependencies=("$@") not_installed=() for dep in "${dependencies[@]}"; do - if [ "${dep}" == "openssl" ]; then - if ! yum list installed 2>/dev/null | grep -q -E ^"${dep}\.";then - not_installed+=("${dep}") - fi - elif ! yum list installed 2>/dev/null | grep -q -E ^"${dep}";then + if ! yum list installed 2>/dev/null | grep -q -E ^"${dep}"\\.;then not_installed+=("${dep}") fi done From 1991c2374b0ae416dd2516d28df5218e2d67ea85 Mon Sep 17 00:00:00 2001 From: DFolchA Date: Thu, 16 Feb 2023 17:23:18 +0100 Subject: [PATCH 251/328] Remove logs at the end of provision --- ova/provision.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ova/provision.sh b/ova/provision.sh index 433894e6ac..21ff7021ae 100755 --- a/ova/provision.sh +++ b/ova/provision.sh @@ -42,5 +42,8 @@ bash ${RESOURCES_PATH}/${INSTALLER} ${INSTALL_ARGS} systemctl stop wazuh-dashboard filebeat wazuh-indexer wazuh-manager systemctl enable wazuh-manager +rm -f /var/log/wazuh-indexer/* +rm -f /var/log/filebeat/* +rm -rf /var/ossec/logs/* clean From d4c0f00d6a16acf2c3265fd10e0933c1c9411c4a Mon Sep 17 00:00:00 2001 From: DFolchA Date: Fri, 24 Feb 2023 14:33:13 +0100 Subject: [PATCH 252/328] Do not remove wazuh logs --- ova/provision.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ova/provision.sh b/ova/provision.sh index 21ff7021ae..4fec68fd37 100755 --- a/ova/provision.sh +++ b/ova/provision.sh @@ -44,6 +44,5 @@ systemctl stop wazuh-dashboard filebeat wazuh-indexer wazuh-manager systemctl enable wazuh-manager rm -f /var/log/wazuh-indexer/* rm -f /var/log/filebeat/* -rm -rf /var/ossec/logs/* clean From d96216ba293911f65801f8b35e577975e25995a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 28 Feb 2023 14:36:17 +0100 Subject: [PATCH 253/328] Calls to the dashboard api now use the port defined as a variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- unattended_installer/install_functions/dashboard.sh | 4 ++-- unattended_installer/install_functions/installMain.sh | 2 +- unattended_installer/install_functions/installVariables.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/unattended_installer/install_functions/dashboard.sh b/unattended_installer/install_functions/dashboard.sh index 9b1395775a..907e3759c6 100644 --- a/unattended_installer/install_functions/dashboard.sh +++ b/unattended_installer/install_functions/dashboard.sh @@ -98,7 +98,7 @@ function dashboard_initialize() { print_ip="${nodes_dashboard_ip}" fi - if [ "$(common_curl -XGET https://"${nodes_dashboard_ip}"/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null --max-time 300 --retry 12 --retry-delay 10 --fail)" -eq "200" ]; then + if [ "$(common_curl -XGET https://"${nodes_dashboard_ip}":"${wazuh_dashboard_port}"/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null --max-time 300 --retry 12 --retry-delay 10 --fail)" -eq "200" ]; then if [ "${#server_node_names[@]}" -eq 1 ]; then wazuh_api_address=${server_node_ips[0]} else @@ -158,7 +158,7 @@ function dashboard_initializeAIO() { common_logger "Initializing Wazuh dashboard web application." installCommon_getPass "admin" - if [ "$(common_curl -XGET https://localhost/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null --max-time 300 --retry 12 --retry-delay 10 --fail)" -ne "200" ]; then + if [ "$(common_curl -XGET https://localhost:"${wazuh_dashboard_port}"/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null --max-time 300 --retry 12 --retry-delay 10 --fail)" -ne "200" ]; then common_logger -e "Cannot connect to Wazuh dashboard." installCommon_rollBack exit 1 diff --git a/unattended_installer/install_functions/installMain.sh b/unattended_installer/install_functions/installMain.sh index 9689b7b5da..078fcd112d 100755 --- a/unattended_installer/install_functions/installMain.sh +++ b/unattended_installer/install_functions/installMain.sh @@ -244,7 +244,7 @@ function main() { fi if [ -n "${dashboard}" ]; then - checks_ports "${wazuh_dashboard_ports[@]}" + checks_ports "${wazuh_dashboard_port}" fi diff --git a/unattended_installer/install_functions/installVariables.sh b/unattended_installer/install_functions/installVariables.sh index 07586ef064..c827604bde 100644 --- a/unattended_installer/install_functions/installVariables.sh +++ b/unattended_installer/install_functions/installVariables.sh @@ -51,4 +51,4 @@ adminPassword="wazuh" readonly wazuh_aio_ports=( 9200 9300 1514 1515 1516 55000 443) readonly wazuh_indexer_ports=( 9200 9300 ) readonly wazuh_manager_ports=( 1514 1515 1516 55000 ) -readonly wazuh_dashboard_ports=( 443 ) +readonly wazuh_dashboard_port=443 From 8eeca7a198200963a88688c3e1811c85de683cd7 Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Thu, 2 Mar 2023 10:06:45 +0100 Subject: [PATCH 254/328] Added PDF reports dependencies --- .../install_functions/dashboard.sh | 15 +++++++++++++++ .../install_functions/installCommon.sh | 14 ++++++++++++++ .../install_functions/installMain.sh | 2 ++ 3 files changed, 31 insertions(+) diff --git a/unattended_installer/install_functions/dashboard.sh b/unattended_installer/install_functions/dashboard.sh index 9b1395775a..a43b1813c1 100644 --- a/unattended_installer/install_functions/dashboard.sh +++ b/unattended_installer/install_functions/dashboard.sh @@ -188,3 +188,18 @@ function dashboard_install() { fi } + +function dashboard_installDependencies() { + + installCommon_checkChromium + + if [ "${sys_type}" == "yum" ]; then + dependencies+=( nss xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-utils xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 xorg-x11-fonts-misc fontconfig freetype ) + installCommon_yumInstallList "${dependencies[@]}" + + elif [ "${sys_type}" == "apt-get" ]; then + dependencies+=( libnss3-dev fonts-liberation libfontconfig1 ) + installCommon_aptInstallList "${dependencies[@]}" + fi + +} diff --git a/unattended_installer/install_functions/installCommon.sh b/unattended_installer/install_functions/installCommon.sh index c9bf605806..dc1a28c022 100644 --- a/unattended_installer/install_functions/installCommon.sh +++ b/unattended_installer/install_functions/installCommon.sh @@ -235,6 +235,20 @@ function installCommon_changePasswords() { } +function installCommon_checkChromium() { + + if [ "${sys_type}" == "yum" ]; then + if (! yum list installed 2>/dev/null | grep -q -E ^"google-chrome-stable"\\.) && (yum list installed 2>/dev/null | grep -q -E ^"chromium"\\.); then + dependencies=(chromium) + fi + elif [ "${sys_type}" == "apt-get" ]; then + if (! apt list --installed 2>/dev/null | grep -q -E ^"google-chrome-stable"\/) && (apt list --installed 2>/dev/null | grep -q -E ^"chromium-browser"\/); then + dependencies=(chromium-browser) + fi + fi + +} + function installCommon_extractConfig() { if ! tar -tf "${tar_file}" | grep -q wazuh-install-files/config.yml; then diff --git a/unattended_installer/install_functions/installMain.sh b/unattended_installer/install_functions/installMain.sh index 3909a73884..9a1ca8e24c 100755 --- a/unattended_installer/install_functions/installMain.sh +++ b/unattended_installer/install_functions/installMain.sh @@ -290,6 +290,7 @@ function main() { if [ -n "${dashboard}" ]; then common_logger "--- Wazuh dashboard ----" + dashboard_installDependencies dashboard_install dashboard_configure installCommon_startService "wazuh-dashboard" @@ -329,6 +330,7 @@ function main() { filebeat_configure installCommon_startService "filebeat" common_logger "--- Wazuh dashboard ---" + dashboard_installDependencies dashboard_install dashboard_configure installCommon_startService "wazuh-dashboard" From ef30264ce94663de1b9faac48271f56f9f7d5e13 Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Thu, 2 Mar 2023 13:06:01 +0100 Subject: [PATCH 255/328] Fixed fetching chrome packages --- unattended_installer/install_functions/installCommon.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unattended_installer/install_functions/installCommon.sh b/unattended_installer/install_functions/installCommon.sh index 1b02ba6de7..5b946c479c 100644 --- a/unattended_installer/install_functions/installCommon.sh +++ b/unattended_installer/install_functions/installCommon.sh @@ -263,11 +263,11 @@ function installCommon_changePasswords() { function installCommon_checkChromium() { if [ "${sys_type}" == "yum" ]; then - if (! yum list installed 2>/dev/null | grep -q -E ^"google-chrome-stable"\\.) && (yum list installed 2>/dev/null | grep -q -E ^"chromium"\\.); then + if (! yum list installed 2>/dev/null | grep -q -E ^"google-chrome-stable"\\.) && (! yum list installed 2>/dev/null | grep -q -E ^"chromium"\\.); then dependencies=(chromium) fi elif [ "${sys_type}" == "apt-get" ]; then - if (! apt list --installed 2>/dev/null | grep -q -E ^"google-chrome-stable"\/) && (apt list --installed 2>/dev/null | grep -q -E ^"chromium-browser"\/); then + if (! apt list --installed 2>/dev/null | grep -q -E ^"google-chrome-stable"\/) && (! apt list --installed 2>/dev/null | grep -q -E ^"chromium-browser"\/); then dependencies=(chromium-browser) fi fi From a0bed4720f0825130c80522398d39c6415533d53 Mon Sep 17 00:00:00 2001 From: Daniel Folch Date: Thu, 9 Feb 2023 18:11:07 +0100 Subject: [PATCH 256/328] Do not remove packages_files directory (#2087) --- alpine/SPECS/wazuh-agent/wazuh-agent.post-install | 2 -- 1 file changed, 2 deletions(-) diff --git a/alpine/SPECS/wazuh-agent/wazuh-agent.post-install b/alpine/SPECS/wazuh-agent/wazuh-agent.post-install index ce9615b0b7..7b581bb705 100644 --- a/alpine/SPECS/wazuh-agent/wazuh-agent.post-install +++ b/alpine/SPECS/wazuh-agent/wazuh-agent.post-install @@ -14,6 +14,4 @@ ${directory_base}/packages_files/gen_ossec.sh conf agent ${DIST_NAME} ${DIST_VER # Add default local_files to ossec.conf ${directory_base}/packages_files/add_localfiles.sh ${directory_base} >> ${directory_base}/etc/ossec.conf -rm -rf ${directory_base}/packages_files - exit 0 From fedc4d2889d69df65e7afdff266b0fbc22cbb191 Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Wed, 15 Feb 2023 13:59:12 +0100 Subject: [PATCH 257/328] Fixed Debian expired keys in Dockerfiles --- debs/Debian/arm64/Dockerfile | 4 ++-- debs/Debian/armhf/Dockerfile | 4 ++-- debs/Debian/ppc64le/Dockerfile | 6 ++++-- stack/dashboard/deb/docker/amd64/Dockerfile | 4 ++-- stack/indexer/deb/docker/amd64/Dockerfile | 1 - windows/Dockerfile | 2 +- wpk/common/Dockerfile | 2 +- 7 files changed, 12 insertions(+), 11 deletions(-) diff --git a/debs/Debian/arm64/Dockerfile b/debs/Debian/arm64/Dockerfile index 3a24ee820f..29c502a3c3 100644 --- a/debs/Debian/arm64/Dockerfile +++ b/debs/Debian/arm64/Dockerfile @@ -5,7 +5,7 @@ ENV DEBIAN_FRONTEND noninteractive # Installing necessary packages RUN echo "deb http://deb.debian.org/debian stretch contrib non-free" >> /etc/apt/sources.list && \ echo "deb-src http://deb.debian.org/debian stretch main contrib non-free" >> /etc/apt/sources.list && \ - apt-get update && apt-get install -y apt apt-utils \ + apt-get update && apt-get install -y --allow-change-held-packages apt apt-utils \ curl gcc g++ make sudo expect gnupg \ perl-base perl wget libc-bin libc6 libc6-dev \ build-essential cdbs devscripts equivs automake \ @@ -15,7 +15,7 @@ RUN echo "deb http://deb.debian.org/debian stretch contrib non-free" >> /etc/apt # Add Debian's source repository and, Install NodeJS 12 RUN apt-get update && apt-get build-dep python3.5 -y RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - && \ - apt-get install -y nodejs + apt-get install --allow-change-held-packages -y nodejs RUN curl -OL http://packages.wazuh.com/utils/gcc/gcc-9.4.0.tar.gz && \ tar xzf gcc-9.4.0.tar.gz && cd gcc-9.4.0/ && \ diff --git a/debs/Debian/armhf/Dockerfile b/debs/Debian/armhf/Dockerfile index 4320d43498..47ae349897 100644 --- a/debs/Debian/armhf/Dockerfile +++ b/debs/Debian/armhf/Dockerfile @@ -5,7 +5,7 @@ ENV DEBIAN_FRONTEND noninteractive # Installing necessary packages RUN echo "deb http://deb.debian.org/debian stretch contrib non-free" >> /etc/apt/sources.list && \ echo "deb-src http://deb.debian.org/debian stretch main contrib non-free" >> /etc/apt/sources.list && \ - apt-get update && apt-get install -y apt-utils \ + apt-get update && apt-get install -y --allow-change-held-packages apt-utils \ curl gcc make wget sudo expect gnupg perl-base \ perl libc-bin libc6 libc6-dev \ build-essential cdbs devscripts equivs automake autoconf libtool \ @@ -15,7 +15,7 @@ RUN echo "deb http://deb.debian.org/debian stretch contrib non-free" >> /etc/apt # Add Debian's source repository and, Install NodeJS 12 RUN apt-get build-dep python3.5 -y RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - && \ - apt-get install -y nodejs + apt-get install -y --allow-change-held-packages nodejs RUN curl -OL http://packages.wazuh.com/utils/gcc/gcc-9.4.0.tar.gz && \ tar xzf gcc-9.4.0.tar.gz && cd gcc-9.4.0/ && \ diff --git a/debs/Debian/ppc64le/Dockerfile b/debs/Debian/ppc64le/Dockerfile index 2fa4fe311a..a72e7127c0 100644 --- a/debs/Debian/ppc64le/Dockerfile +++ b/debs/Debian/ppc64le/Dockerfile @@ -2,11 +2,13 @@ FROM ppc64le/debian:stretch ENV DEBIAN_FRONTEND noninteractive +RUN apt-get -v + # Installing necessary packages RUN echo "deb http://deb.debian.org/debian stretch main contrib non-free" >> /etc/apt/sources.list && \ echo "deb-src http://deb.debian.org/debian stretch main contrib non-free" >> /etc/apt/sources.list && \ - apt-get update && apt-get install -y apt-utils && \ - apt-get install -y --force-yes \ + apt-get update && apt-get install -y --allow-change-held-packages apt-utils && \ + apt-get install -y --allow-change-held-packages \ curl gcc make sudo expect gnupg perl-base perl wget \ libc-bin libc6 libc6-dev build-essential \ cdbs devscripts equivs automake autoconf libtool libaudit-dev selinux-basics \ diff --git a/stack/dashboard/deb/docker/amd64/Dockerfile b/stack/dashboard/deb/docker/amd64/Dockerfile index 77d3684396..f3ca3b9811 100644 --- a/stack/dashboard/deb/docker/amd64/Dockerfile +++ b/stack/dashboard/deb/docker/amd64/Dockerfile @@ -3,8 +3,8 @@ FROM debian:10 ENV DEBIAN_FRONTEND noninteractive # Installing necessary packages -RUN apt-get update && apt-get install -y apt-utils && \ - apt-get install -y \ +RUN apt-get update && apt-get install -y --allow-change-held-packages apt-utils && \ + apt-get install -y --allow-change-held-packages \ curl sudo wget expect gnupg build-essential \ devscripts equivs selinux-basics procps gawk diff --git a/stack/indexer/deb/docker/amd64/Dockerfile b/stack/indexer/deb/docker/amd64/Dockerfile index bfbed39da9..b40740f3db 100644 --- a/stack/indexer/deb/docker/amd64/Dockerfile +++ b/stack/indexer/deb/docker/amd64/Dockerfile @@ -2,7 +2,6 @@ FROM debian:8 ENV DEBIAN_FRONTEND noninteractive -# Installing necessary packages RUN apt-get update && apt-get install -y --force-yes apt-utils && \ apt-get install -y --force-yes \ curl sudo wget expect gnupg build-essential \ diff --git a/windows/Dockerfile b/windows/Dockerfile index bf17600c83..79fd0b2f0f 100644 --- a/windows/Dockerfile +++ b/windows/Dockerfile @@ -2,7 +2,7 @@ FROM ubuntu:22.04 # Installing necessary packages RUN apt-get update && \ - apt-get install -y gcc g++ gcc-mingw-w64 g++-mingw-w64 nsis make wget unzip \ + apt-get install -y --allow-change-held-packages gcc g++ gcc-mingw-w64 g++-mingw-w64 nsis make wget unzip \ curl perl binutils zip libssl-dev RUN curl -OL http://packages.wazuh.com/utils/cmake/cmake-3.18.3.tar.gz && \ diff --git a/wpk/common/Dockerfile b/wpk/common/Dockerfile index 1597f882f1..eae449e527 100644 --- a/wpk/common/Dockerfile +++ b/wpk/common/Dockerfile @@ -1,7 +1,7 @@ FROM debian:9 RUN apt-get update && \ - apt-get -y install python git curl jq python3 python3-pip libffi-dev && \ + apt-get -y install --allow-change-held-packages python git curl jq python3 python3-pip libffi-dev && \ pip3 install --upgrade cryptography==2.9.2 awscli ADD wpkpack.py /usr/local/bin/wpkpack From cba9143ebfb4e0e7082496ad4340d3d371d60131 Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Thu, 16 Feb 2023 13:48:37 +0100 Subject: [PATCH 258/328] Fixed Debian dockerfiles --- debs/Debian/arm64/Dockerfile | 2 +- debs/Debian/armhf/Dockerfile | 2 +- debs/Debian/ppc64le/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/debs/Debian/arm64/Dockerfile b/debs/Debian/arm64/Dockerfile index 29c502a3c3..4f66d330f9 100644 --- a/debs/Debian/arm64/Dockerfile +++ b/debs/Debian/arm64/Dockerfile @@ -13,7 +13,7 @@ RUN echo "deb http://deb.debian.org/debian stretch contrib non-free" >> /etc/apt libdb5.3 libdb5.3 libssl1.0.2 gawk libsigsegv2 # Add Debian's source repository and, Install NodeJS 12 -RUN apt-get update && apt-get build-dep python3.5 -y +RUN apt-get update && apt-get build-dep python3.5 -y --allow-change-held-packages RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - && \ apt-get install --allow-change-held-packages -y nodejs diff --git a/debs/Debian/armhf/Dockerfile b/debs/Debian/armhf/Dockerfile index 47ae349897..83cfb20e3b 100644 --- a/debs/Debian/armhf/Dockerfile +++ b/debs/Debian/armhf/Dockerfile @@ -13,7 +13,7 @@ RUN echo "deb http://deb.debian.org/debian stretch contrib non-free" >> /etc/apt libssl1.1 libssl-dev gawk libsigsegv2 procps libc6-armel-cross g++ # Add Debian's source repository and, Install NodeJS 12 -RUN apt-get build-dep python3.5 -y +RUN apt-get build-dep python3.5 -y --allow-change-held-packages RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - && \ apt-get install -y --allow-change-held-packages nodejs diff --git a/debs/Debian/ppc64le/Dockerfile b/debs/Debian/ppc64le/Dockerfile index a72e7127c0..8491f3590a 100644 --- a/debs/Debian/ppc64le/Dockerfile +++ b/debs/Debian/ppc64le/Dockerfile @@ -14,7 +14,7 @@ RUN echo "deb http://deb.debian.org/debian stretch main contrib non-free" >> /et cdbs devscripts equivs automake autoconf libtool libaudit-dev selinux-basics \ libdb5.3 libdb5.3 libssl1.0.2 gawk libsigsegv2 -RUN apt-get update && apt-get build-dep python3.5 -y +RUN apt-get update && apt-get build-dep python3.5 -y --allow-change-held-packages RUN curl -OL http://packages.wazuh.com/utils/gcc/gcc-9.4.0.tar.gz && \ tar xzf gcc-9.4.0.tar.gz && cd gcc-9.4.0/ && \ From d75baa57101ab1f2429d7db25ee79dd0709a2205 Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Tue, 7 Mar 2023 11:09:25 +0100 Subject: [PATCH 259/328] Added aptInstallChrome function --- .../install_functions/installCommon.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/unattended_installer/install_functions/installCommon.sh b/unattended_installer/install_functions/installCommon.sh index 5b946c479c..d5648f03bc 100644 --- a/unattended_installer/install_functions/installCommon.sh +++ b/unattended_installer/install_functions/installCommon.sh @@ -268,7 +268,13 @@ function installCommon_checkChromium() { fi elif [ "${sys_type}" == "apt-get" ]; then if (! apt list --installed 2>/dev/null | grep -q -E ^"google-chrome-stable"\/) && (! apt list --installed 2>/dev/null | grep -q -E ^"chromium-browser"\/); then - dependencies=(chromium-browser) + + # Report generation doesn't work with Chromium in Ubuntu 22 + if [ "${DIST_NAME}" == "ubuntu" ] && [ "${DIST_VER}" == "22" ]; then + installCommon_aptInstallChrome + else + dependencies=(chromium-browser) + fi fi fi @@ -323,6 +329,16 @@ function installCommon_installCheckDependencies() { } +function installCommon_aptInstallChrome() { + + chrome_package="/tmp/wazuh-install-files/chrome.deb" + curl -so "${chrome_package}" https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb + + common_logger "Installing chrome" + installCommon_aptInstall "${chrome_package}" + +} + function installCommon_installPrerequisites() { if [ "${sys_type}" == "yum" ]; then From 9a78def05f22aade29349f68bbcc49606212ca34 Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Tue, 7 Mar 2023 11:47:05 +0100 Subject: [PATCH 260/328] Added Ubuntu 20 in installing Chrome --- unattended_installer/install_functions/installCommon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unattended_installer/install_functions/installCommon.sh b/unattended_installer/install_functions/installCommon.sh index d5648f03bc..a7e2e7cf79 100644 --- a/unattended_installer/install_functions/installCommon.sh +++ b/unattended_installer/install_functions/installCommon.sh @@ -270,7 +270,7 @@ function installCommon_checkChromium() { if (! apt list --installed 2>/dev/null | grep -q -E ^"google-chrome-stable"\/) && (! apt list --installed 2>/dev/null | grep -q -E ^"chromium-browser"\/); then # Report generation doesn't work with Chromium in Ubuntu 22 - if [ "${DIST_NAME}" == "ubuntu" ] && [ "${DIST_VER}" == "22" ]; then + if [[ "${DIST_NAME}" == "ubuntu" ]] && [[ "${DIST_VER}" == "22" || "${DIST_VER}" == "20" ]]; then installCommon_aptInstallChrome else dependencies=(chromium-browser) From 0bf9b044b561168a809476390f8903237b059cb5 Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Tue, 7 Mar 2023 13:13:37 +0100 Subject: [PATCH 261/328] Enabled extra repos in AmazonLinux2 --- unattended_installer/install_functions/installCommon.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/unattended_installer/install_functions/installCommon.sh b/unattended_installer/install_functions/installCommon.sh index a7e2e7cf79..8d1d7137b1 100644 --- a/unattended_installer/install_functions/installCommon.sh +++ b/unattended_installer/install_functions/installCommon.sh @@ -266,6 +266,9 @@ function installCommon_checkChromium() { if (! yum list installed 2>/dev/null | grep -q -E ^"google-chrome-stable"\\.) && (! yum list installed 2>/dev/null | grep -q -E ^"chromium"\\.); then dependencies=(chromium) fi + if [ "${DIST_NAME}" == "amzn" ]; then + eval "amazon-linux-extras install epel -y ${debug}" + fi elif [ "${sys_type}" == "apt-get" ]; then if (! apt list --installed 2>/dev/null | grep -q -E ^"google-chrome-stable"\/) && (! apt list --installed 2>/dev/null | grep -q -E ^"chromium-browser"\/); then From bdbaadf719126542035728edc1d701eccd69c0c2 Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Thu, 9 Mar 2023 10:36:18 +0100 Subject: [PATCH 262/328] Fixed comment of Chrome installation --- unattended_installer/install_functions/installCommon.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/unattended_installer/install_functions/installCommon.sh b/unattended_installer/install_functions/installCommon.sh index 8d1d7137b1..af9f8f6567 100644 --- a/unattended_installer/install_functions/installCommon.sh +++ b/unattended_installer/install_functions/installCommon.sh @@ -271,8 +271,8 @@ function installCommon_checkChromium() { fi elif [ "${sys_type}" == "apt-get" ]; then if (! apt list --installed 2>/dev/null | grep -q -E ^"google-chrome-stable"\/) && (! apt list --installed 2>/dev/null | grep -q -E ^"chromium-browser"\/); then - - # Report generation doesn't work with Chromium in Ubuntu 22 + + # Report generation doesn't work with Chromium in Ubuntu 22 and Ubuntu 20 if [[ "${DIST_NAME}" == "ubuntu" ]] && [[ "${DIST_VER}" == "22" || "${DIST_VER}" == "20" ]]; then installCommon_aptInstallChrome else @@ -337,7 +337,7 @@ function installCommon_aptInstallChrome() { chrome_package="/tmp/wazuh-install-files/chrome.deb" curl -so "${chrome_package}" https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb - common_logger "Installing chrome" + common_logger "Installing chrome." installCommon_aptInstall "${chrome_package}" } From 053e1387a6ce55dd2bc5ad8ff4d9d6e30ecd0980 Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Thu, 9 Mar 2023 13:44:53 +0100 Subject: [PATCH 263/328] Added optional installation logic --- .../install_functions/dashboard.sh | 11 +++++++- .../install_functions/installCommon.sh | 27 +++++++++++++++---- .../install_functions/installMain.sh | 4 +-- 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/unattended_installer/install_functions/dashboard.sh b/unattended_installer/install_functions/dashboard.sh index a43b1813c1..163066294c 100644 --- a/unattended_installer/install_functions/dashboard.sh +++ b/unattended_installer/install_functions/dashboard.sh @@ -189,7 +189,11 @@ function dashboard_install() { } -function dashboard_installDependencies() { +function dashboard_installReportDependencies() { + + # Flags that indicates that is an optional installation. + optional_installation=1 + report_dependencies=1 installCommon_checkChromium @@ -202,4 +206,9 @@ function dashboard_installDependencies() { installCommon_aptInstallList "${dependencies[@]}" fi + if [ "${pdf_warning}" == 1 ]; then + common_logger -w "Dependencies skipped. PDF report generation may not work." + fi + optional_installation=0 + } diff --git a/unattended_installer/install_functions/installCommon.sh b/unattended_installer/install_functions/installCommon.sh index af9f8f6567..b9cde71ed9 100644 --- a/unattended_installer/install_functions/installCommon.sh +++ b/unattended_installer/install_functions/installCommon.sh @@ -115,8 +115,7 @@ function installCommon_aptInstallList(){ common_logger "Installing $dep." installCommon_aptInstall "${dep}" if [ "${install_result}" != 0 ]; then - common_logger -e "Cannot install dependency: ${dep}." - exit 1 + installCommon_checkOptionalInstallation fi done fi @@ -155,6 +154,20 @@ function installCommon_changePasswordApi() { } +function installCommon_checkOptionalInstallation() { + + if [ "${optional_installation}" != 1 ]; then + common_logger -e "Cannot install dependency: ${dep}." + exit 1 + else + common_logger -w "Cannot install optional dependency: ${dep}." + if [ "${report_dependencies}" == 1 ]; then + pdf_warning=1 + fi + fi + +} + function installCommon_createCertificates() { if [ -n "${AIO}" ]; then @@ -334,11 +347,16 @@ function installCommon_installCheckDependencies() { function installCommon_aptInstallChrome() { + dep="chrome" chrome_package="/tmp/wazuh-install-files/chrome.deb" curl -so "${chrome_package}" https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb - common_logger "Installing chrome." + common_logger "Installing ${dep}." installCommon_aptInstall "${chrome_package}" + + if [ "${install_result}" != 0 ]; then + installCommon_checkOptionalInstallation + fi } @@ -668,8 +686,7 @@ function installCommon_yumInstallList(){ common_logger "Installing $dep." eval "yum install ${dep} -y ${debug}" if [ "${PIPESTATUS[0]}" != 0 ]; then - common_logger -e "Cannot install dependency: ${dep}." - exit 1 + installCommon_checkOptionalInstallation fi done fi diff --git a/unattended_installer/install_functions/installMain.sh b/unattended_installer/install_functions/installMain.sh index 1220b7ea13..f3dcbbb4b3 100755 --- a/unattended_installer/install_functions/installMain.sh +++ b/unattended_installer/install_functions/installMain.sh @@ -295,7 +295,7 @@ function main() { if [ -n "${dashboard}" ]; then common_logger "--- Wazuh dashboard ----" - dashboard_installDependencies + dashboard_installReportDependencies dashboard_install dashboard_configure installCommon_startService "wazuh-dashboard" @@ -335,7 +335,7 @@ function main() { filebeat_configure installCommon_startService "filebeat" common_logger "--- Wazuh dashboard ---" - dashboard_installDependencies + dashboard_installReportDependencies dashboard_install dashboard_configure installCommon_startService "wazuh-dashboard" From 56ca8c3850effed7fc30e032ed693ffd1b336f3f Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Thu, 9 Mar 2023 14:54:11 +0100 Subject: [PATCH 264/328] Added Ubuntu 18 in installing Chrome --- unattended_installer/install_functions/installCommon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unattended_installer/install_functions/installCommon.sh b/unattended_installer/install_functions/installCommon.sh index b9cde71ed9..b7012fc7a0 100644 --- a/unattended_installer/install_functions/installCommon.sh +++ b/unattended_installer/install_functions/installCommon.sh @@ -286,7 +286,7 @@ function installCommon_checkChromium() { if (! apt list --installed 2>/dev/null | grep -q -E ^"google-chrome-stable"\/) && (! apt list --installed 2>/dev/null | grep -q -E ^"chromium-browser"\/); then # Report generation doesn't work with Chromium in Ubuntu 22 and Ubuntu 20 - if [[ "${DIST_NAME}" == "ubuntu" ]] && [[ "${DIST_VER}" == "22" || "${DIST_VER}" == "20" ]]; then + if [[ "${DIST_NAME}" == "ubuntu" ]] && [[ "${DIST_VER}" == "22" || "${DIST_VER}" == "20" || "${DIST_VER}" == "18" ]]; then installCommon_aptInstallChrome else dependencies=(chromium-browser) From 53f8b6be6d6244c53d2dbd5afb831ea74db67417 Mon Sep 17 00:00:00 2001 From: c-bordon Date: Thu, 9 Mar 2023 16:48:27 -0300 Subject: [PATCH 265/328] Updated python 3.4 to 3.7 --- wpk/linux/x86_64/Dockerfile | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/wpk/linux/x86_64/Dockerfile b/wpk/linux/x86_64/Dockerfile index a7a184192d..bf8bd969e4 100644 --- a/wpk/linux/x86_64/Dockerfile +++ b/wpk/linux/x86_64/Dockerfile @@ -1,10 +1,10 @@ FROM centos:6 RUN rm /etc/yum.repos.d/* && echo "exactarch=1" >> /etc/yum.conf -COPY CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo +COPY linux/x86_64/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo RUN yum -y install epel-release && \ - yum -y install gcc make git python34 python34-pip python34-devel python34-cffi \ + yum -y install gcc make git \ jq sudo gnupg automake \ autoconf wget libtool policycoreutils-python \ yum-utils epel-release redhat-rpm-config rpm-devel \ @@ -17,7 +17,26 @@ RUN yum -y install epel-release && \ libarchive-devel elfutils-libelf-devel \ elfutils-libelf patchelf elfutils-devel libgcrypt-devel -RUN yum-builddep python34 -y +RUN curl -OL http://packages.wazuh.com/utils/openssl/openssl-1.1.1a.tar.gz && \ + tar xf openssl-1.1.1a.tar.gz && cd openssl-1.1.1a && \ + ./config --prefix=/usr/ --openssldir=/usr/ shared zlib && \ + make -j$(nproc) && make install && echo "/usr/lib" > /etc/ld.so.conf.d/openssl-1.1.1a.conf && \ + ldconfig -v && cd / && rm -rf openssl-1.1.1a* + +RUN yum install zlib-devel libffi-devel -y + +RUN wget https://www.python.org/ftp/python/3.7.16/Python-3.7.16.tgz + +RUN tar xvf Python-3.7.16.tgz + +RUN cd Python-3.7.16 && \ + ./configure && \ + make && \ + make install + +RUN export PYTHONPATH=/usr/local/bin/python3.7 + +RUN pip3 install cffi RUN curl -OL http://packages.wazuh.com/utils/gcc/gcc-9.4.0.tar.gz && \ tar xzf gcc-9.4.0.tar.gz && cd gcc-9.4.0/ && \ @@ -37,12 +56,6 @@ RUN curl -OL http://packages.wazuh.com/utils/cmake/cmake-3.18.3.tar.gz && \ CXX=/usr/local/gcc-9.4.0/bin/g++ && \ make -j$(nproc) && make install && cd / && rm -rf cmake-* -RUN curl -OL http://packages.wazuh.com/utils/openssl/openssl-1.1.1a.tar.gz && \ - tar xf openssl-1.1.1a.tar.gz && cd openssl-1.1.1a && \ - ./config --prefix=/usr/ --openssldir=/usr/ shared zlib && \ - make -j$(nproc) && make install && echo "/usr/lib" > /etc/ld.so.conf.d/openssl-1.1.1a.conf && \ - ldconfig -v && cd / && rm -rf openssl-1.1.1a* - RUN pip3 install cryptography==2.9.2 typing awscli RUN pip3 install --upgrade botocore==1.20.54 From f8b5a15b0940fe21bd5b0e586ecd9c006a575a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Correa=20Rodr=C3=ADguez?= Date: Fri, 10 Mar 2023 10:52:50 +0100 Subject: [PATCH 266/328] Changed name of dashboard dependencies list --- unattended_installer/install_functions/dashboard.sh | 10 +++++----- .../install_functions/installCommon.sh | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/unattended_installer/install_functions/dashboard.sh b/unattended_installer/install_functions/dashboard.sh index 163066294c..66f0faa47a 100644 --- a/unattended_installer/install_functions/dashboard.sh +++ b/unattended_installer/install_functions/dashboard.sh @@ -198,16 +198,16 @@ function dashboard_installReportDependencies() { installCommon_checkChromium if [ "${sys_type}" == "yum" ]; then - dependencies+=( nss xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-utils xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 xorg-x11-fonts-misc fontconfig freetype ) - installCommon_yumInstallList "${dependencies[@]}" + dashboard_dependencies+=( nss xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-utils xorg-x11-fonts-cyrillic xorg-x11-fonts-Type1 xorg-x11-fonts-misc fontconfig freetype ) + installCommon_yumInstallList "${dashboard_dependencies[@]}" elif [ "${sys_type}" == "apt-get" ]; then - dependencies+=( libnss3-dev fonts-liberation libfontconfig1 ) - installCommon_aptInstallList "${dependencies[@]}" + dashboard_dependencies+=( libnss3-dev fonts-liberation libfontconfig1 ) + installCommon_aptInstallList "${dashboard_dependencies[@]}" fi if [ "${pdf_warning}" == 1 ]; then - common_logger -w "Dependencies skipped. PDF report generation may not work." + common_logger -w "Dashboard dependencies skipped. PDF report generation may not work." fi optional_installation=0 diff --git a/unattended_installer/install_functions/installCommon.sh b/unattended_installer/install_functions/installCommon.sh index b7012fc7a0..f5561a3c54 100644 --- a/unattended_installer/install_functions/installCommon.sh +++ b/unattended_installer/install_functions/installCommon.sh @@ -277,7 +277,7 @@ function installCommon_checkChromium() { if [ "${sys_type}" == "yum" ]; then if (! yum list installed 2>/dev/null | grep -q -E ^"google-chrome-stable"\\.) && (! yum list installed 2>/dev/null | grep -q -E ^"chromium"\\.); then - dependencies=(chromium) + dashboard_dependencies=(chromium) fi if [ "${DIST_NAME}" == "amzn" ]; then eval "amazon-linux-extras install epel -y ${debug}" @@ -289,7 +289,7 @@ function installCommon_checkChromium() { if [[ "${DIST_NAME}" == "ubuntu" ]] && [[ "${DIST_VER}" == "22" || "${DIST_VER}" == "20" || "${DIST_VER}" == "18" ]]; then installCommon_aptInstallChrome else - dependencies=(chromium-browser) + dashboard_dependencies=(chromium-browser) fi fi fi From 60192660f3ff5c1e3ef4b32ffe6f5cbca2e68913 Mon Sep 17 00:00:00 2001 From: c-bordon Date: Fri, 10 Mar 2023 09:22:29 -0300 Subject: [PATCH 267/328] Fixed aws cli issue in wpk build container --- wpk/linux/x86_64/Dockerfile | 40 ++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/wpk/linux/x86_64/Dockerfile b/wpk/linux/x86_64/Dockerfile index bf8bd969e4..1975260bf1 100644 --- a/wpk/linux/x86_64/Dockerfile +++ b/wpk/linux/x86_64/Dockerfile @@ -4,7 +4,7 @@ RUN rm /etc/yum.repos.d/* && echo "exactarch=1" >> /etc/yum.conf COPY linux/x86_64/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo RUN yum -y install epel-release && \ - yum -y install gcc make git \ + yum -y install gcc make git gcc-c++ \ jq sudo gnupg automake \ autoconf wget libtool policycoreutils-python \ yum-utils epel-release redhat-rpm-config rpm-devel \ @@ -17,6 +17,24 @@ RUN yum -y install epel-release && \ libarchive-devel elfutils-libelf-devel \ elfutils-libelf patchelf elfutils-devel libgcrypt-devel +RUN curl -OL http://packages.wazuh.com/utils/gcc/gcc-9.4.0.tar.gz && \ + tar xzf gcc-9.4.0.tar.gz && cd gcc-9.4.0/ && \ + ./contrib/download_prerequisites && \ + ./configure --prefix=/usr/local/gcc-9.4.0 --enable-languages=c,c++ \ + --disable-multilib --disable-libsanitizer && \ + make -j$(nproc) && make install && \ + ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && cd / && rm -rf gcc-* + +ENV CPLUS_INCLUDE_PATH "/usr/local/gcc-9.4.0/include/c++/9.4.0/" +ENV LD_LIBRARY_PATH "/usr/local/gcc-9.4.0/lib64/" +ENV PATH "/usr/local/gcc-9.4.0/bin:${PATH}" + +RUN curl -OL http://packages.wazuh.com/utils/cmake/cmake-3.18.3.tar.gz && \ + tar -zxf cmake-3.18.3.tar.gz && cd cmake-3.18.3 && \ + ./bootstrap --no-system-curl CC=/usr/local/gcc-9.4.0/bin/gcc \ + CXX=/usr/local/gcc-9.4.0/bin/g++ && \ + make -j$(nproc) && make install && cd / && rm -rf cmake-* + RUN curl -OL http://packages.wazuh.com/utils/openssl/openssl-1.1.1a.tar.gz && \ tar xf openssl-1.1.1a.tar.gz && cd openssl-1.1.1a && \ ./config --prefix=/usr/ --openssldir=/usr/ shared zlib && \ @@ -36,26 +54,6 @@ RUN cd Python-3.7.16 && \ RUN export PYTHONPATH=/usr/local/bin/python3.7 -RUN pip3 install cffi - -RUN curl -OL http://packages.wazuh.com/utils/gcc/gcc-9.4.0.tar.gz && \ - tar xzf gcc-9.4.0.tar.gz && cd gcc-9.4.0/ && \ - ./contrib/download_prerequisites && \ - ./configure --prefix=/usr/local/gcc-9.4.0 --enable-languages=c,c++ \ - --disable-multilib --disable-libsanitizer && \ - make -j$(nproc) && make install && \ - ln -fs /usr/local/gcc-9.4.0/bin/g++ /usr/bin/c++ && cd / && rm -rf gcc-* - -ENV CPLUS_INCLUDE_PATH "/usr/local/gcc-9.4.0/include/c++/9.4.0/" -ENV LD_LIBRARY_PATH "/usr/local/gcc-9.4.0/lib64/" -ENV PATH "/usr/local/gcc-9.4.0/bin:${PATH}" - -RUN curl -OL http://packages.wazuh.com/utils/cmake/cmake-3.18.3.tar.gz && \ - tar -zxf cmake-3.18.3.tar.gz && cd cmake-3.18.3 && \ - ./bootstrap --no-system-curl CC=/usr/local/gcc-9.4.0/bin/gcc \ - CXX=/usr/local/gcc-9.4.0/bin/g++ && \ - make -j$(nproc) && make install && cd / && rm -rf cmake-* - RUN pip3 install cryptography==2.9.2 typing awscli RUN pip3 install --upgrade botocore==1.20.54 From a477645509bb89cd77e56266fb9ceef427f231ab Mon Sep 17 00:00:00 2001 From: c-bordon Date: Fri, 10 Mar 2023 09:24:44 -0300 Subject: [PATCH 268/328] Removed path of Dockefile added to debug --- wpk/linux/x86_64/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wpk/linux/x86_64/Dockerfile b/wpk/linux/x86_64/Dockerfile index 1975260bf1..18318e7e8f 100644 --- a/wpk/linux/x86_64/Dockerfile +++ b/wpk/linux/x86_64/Dockerfile @@ -1,7 +1,7 @@ FROM centos:6 RUN rm /etc/yum.repos.d/* && echo "exactarch=1" >> /etc/yum.conf -COPY linux/x86_64/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo +COPY CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo RUN yum -y install epel-release && \ yum -y install gcc make git gcc-c++ \ From a53c1f183e57cfb67192f1d0726b11e1aebacefb Mon Sep 17 00:00:00 2001 From: c-bordon Date: Fri, 10 Mar 2023 10:06:36 -0300 Subject: [PATCH 269/328] Removed PYTHONPATH var --- wpk/linux/x86_64/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/wpk/linux/x86_64/Dockerfile b/wpk/linux/x86_64/Dockerfile index 18318e7e8f..9e4f1dd277 100644 --- a/wpk/linux/x86_64/Dockerfile +++ b/wpk/linux/x86_64/Dockerfile @@ -52,8 +52,6 @@ RUN cd Python-3.7.16 && \ make && \ make install -RUN export PYTHONPATH=/usr/local/bin/python3.7 - RUN pip3 install cryptography==2.9.2 typing awscli RUN pip3 install --upgrade botocore==1.20.54 From c72842ef3789f5b57ae2365fa2987ec8d5dc02dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 2 Mar 2023 18:39:29 +0100 Subject: [PATCH 270/328] Add some retries to the API Token downloading MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../passwords_tool/passwordsFunctions.sh | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/unattended_installer/passwords_tool/passwordsFunctions.sh b/unattended_installer/passwords_tool/passwordsFunctions.sh index 65442e620c..86d7bedae0 100644 --- a/unattended_installer/passwords_tool/passwordsFunctions.sh +++ b/unattended_installer/passwords_tool/passwordsFunctions.sh @@ -293,11 +293,25 @@ function passwords_generatePasswordFile() { function passwords_getApiToken() { - TOKEN_API=$(curl -s -u "${adminUser}":"${adminPassword}" -k -X GET "https://localhost:55000/security/user/authenticate?raw=true") - if [[ ${TOKEN_API} =~ "Invalid credentials" ]]; then + retries=0 + max_internal_error_retries=5 + + TOKEN_API=$(common_curl -s -u "${adminUser}":"${adminPassword}" -k -X POST "https://localhost:55000/security/user/authenticate?raw=true" --max-time 300 --retry 5 --retry-delay 5) + while [[ "${TOKEN_API}" =~ "Wazuh Internal Error" ]] && [ "${retries}" -lt "${max_internal_error_retries}" ] + do + TOKEN_API=$(common_curl -s -u "${adminUser}":"${adminPassword}" -k -X POST "https://localhost:55000/security/user/authenticate?raw=true" --max-time 300 --retry 5 --retry-delay 5) + retries=$((retries+1)) + done + if [[ ${TOKEN_API} =~ "Wazuh Internal Error" ]]; then + common_logger -e "There was an error while trying to get the API token." + if [[ $(type -t installCommon_rollBack) == "function" ]]; then + installCommon_rollBack + fi + exit 1 + elif [[ ${TOKEN_API} =~ "Invalid credentials" ]]; then common_logger -e "Invalid admin user credentials" if [[ $(type -t installCommon_rollBack) == "function" ]]; then - installCommon_rollBack + installCommon_rollBack fi exit 1 fi From 65cfd5cab77532c3ed7f8e14d4916a777e0110ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 3 Mar 2023 16:31:53 +0100 Subject: [PATCH 271/328] Add a retry for the dashboard initialization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../install_functions/dashboard.sh | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/unattended_installer/install_functions/dashboard.sh b/unattended_installer/install_functions/dashboard.sh index bff659ff3a..ba1db03ecf 100644 --- a/unattended_installer/install_functions/dashboard.sh +++ b/unattended_installer/install_functions/dashboard.sh @@ -162,21 +162,31 @@ function dashboard_initialize() { function dashboard_initializeAIO() { + set -ex common_logger "Initializing Wazuh dashboard web application." installCommon_getPass "admin" - until [ "$(curl -XGET https://localhost/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null)" -eq "200" ] || [ "${i}" -eq 12 ]; do - sleep 10 - i=$((i+1)) + echo "Before curl" + e_code="$(common_curl -XGET https://localhost/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null --max-time 300 --retry 12 --retry-delay 10 --fail)" + retries=0 + max_dashboard_initialize_retries=5 + read -p "Press enter to continue" + while [ "${e_code}" -ne "200" ] && [ "${retries}" -lt "${max_dashboard_initialize_retries}" ] + do + echo "Before retry" + e_code="$(common_curl -XGET https://localhost/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null --max-time 300 --retry 12 --retry-delay 10 --fail)" + echo "After retry" + retries=$((retries+1)) done - if [ ${i} -eq 12 ]; then - common_logger -e "Cannot connect to Wazuh dashboard." + if [ "${e_code}" -eq "200" ]; then + common_logger "Wazuh dashboard web application initialized." + common_logger -nl "--- Summary ---" + common_logger -nl "You can access the web interface https://\n User: admin\n Password: ${u_pass}" + else + common_logger -e "Wazuh dashboard installation failed." installCommon_rollBack exit 1 fi - - common_logger "Wazuh dashboard web application initialized." - common_logger -nl "--- Summary ---" - common_logger -nl "You can access the web interface https://\n User: admin\n Password: ${u_pass}" + set +ex } function dashboard_install() { From 78d3bedcbc2a402fb5ae37ad6f3afdfa6a7ae324 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 7 Mar 2023 13:07:26 +0100 Subject: [PATCH 272/328] Remove debug statements and add double-quotes to the TOKEN MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../install_functions/dashboard.sh | 15 +++++---------- .../passwords_tool/passwordsFunctions.sh | 7 ++++--- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/unattended_installer/install_functions/dashboard.sh b/unattended_installer/install_functions/dashboard.sh index ba1db03ecf..553e6eef90 100644 --- a/unattended_installer/install_functions/dashboard.sh +++ b/unattended_installer/install_functions/dashboard.sh @@ -162,22 +162,18 @@ function dashboard_initialize() { function dashboard_initializeAIO() { - set -ex common_logger "Initializing Wazuh dashboard web application." installCommon_getPass "admin" - echo "Before curl" - e_code="$(common_curl -XGET https://localhost/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null --max-time 300 --retry 12 --retry-delay 10 --fail)" + http_code="$(common_curl -XGET https://localhost/status -uadmin:\"${u_pass}\" -k -w %\"{http_code}\" -s -o /dev/null --max-time 300 --retry 12 --retry-delay 10 --fail)" retries=0 max_dashboard_initialize_retries=5 - read -p "Press enter to continue" - while [ "${e_code}" -ne "200" ] && [ "${retries}" -lt "${max_dashboard_initialize_retries}" ] + while [ "${http_code}" -ne "200" ] && [ "${retries}" -lt "${max_dashboard_initialize_retries}" ] do - echo "Before retry" - e_code="$(common_curl -XGET https://localhost/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null --max-time 300 --retry 12 --retry-delay 10 --fail)" - echo "After retry" + http_code="$(common_curl -XGET https://localhost/status -uadmin:\"${u_pass}\" -k -w %\"{http_code}\" -s -o /dev/null --max-time 300 --retry 12 --retry-delay 10 --fail)" retries=$((retries+1)) + sleep 1 done - if [ "${e_code}" -eq "200" ]; then + if [ "${http_code}" -eq "200" ]; then common_logger "Wazuh dashboard web application initialized." common_logger -nl "--- Summary ---" common_logger -nl "You can access the web interface https://\n User: admin\n Password: ${u_pass}" @@ -186,7 +182,6 @@ function dashboard_initializeAIO() { installCommon_rollBack exit 1 fi - set +ex } function dashboard_install() { diff --git a/unattended_installer/passwords_tool/passwordsFunctions.sh b/unattended_installer/passwords_tool/passwordsFunctions.sh index 86d7bedae0..e46fe34bb2 100644 --- a/unattended_installer/passwords_tool/passwordsFunctions.sh +++ b/unattended_installer/passwords_tool/passwordsFunctions.sh @@ -294,13 +294,14 @@ function passwords_generatePasswordFile() { function passwords_getApiToken() { retries=0 - max_internal_error_retries=5 + max_internal_error_retries=10 - TOKEN_API=$(common_curl -s -u "${adminUser}":"${adminPassword}" -k -X POST "https://localhost:55000/security/user/authenticate?raw=true" --max-time 300 --retry 5 --retry-delay 5) + TOKEN_API="$(common_curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X POST \"https://localhost:55000/security/user/authenticate?raw=true\" --max-time 300 --retry 5 --retry-delay 5)" while [[ "${TOKEN_API}" =~ "Wazuh Internal Error" ]] && [ "${retries}" -lt "${max_internal_error_retries}" ] do - TOKEN_API=$(common_curl -s -u "${adminUser}":"${adminPassword}" -k -X POST "https://localhost:55000/security/user/authenticate?raw=true" --max-time 300 --retry 5 --retry-delay 5) + TOKEN_API="$(common_curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X POST \"https://localhost:55000/security/user/authenticate?raw=true\" --max-time 300 --retry 5 --retry-delay 5)" retries=$((retries+1)) + sleep 1 done if [[ ${TOKEN_API} =~ "Wazuh Internal Error" ]]; then common_logger -e "There was an error while trying to get the API token." From c7d5830bb0eec95c2f9aa25bd280d8c7e4f4b94c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 7 Mar 2023 16:51:25 +0100 Subject: [PATCH 273/328] Adequate the changes to 4.3.10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- unattended_installer/install_functions/dashboard.sh | 5 +++-- unattended_installer/passwords_tool/passwordsFunctions.sh | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/unattended_installer/install_functions/dashboard.sh b/unattended_installer/install_functions/dashboard.sh index 553e6eef90..09640b0c2b 100644 --- a/unattended_installer/install_functions/dashboard.sh +++ b/unattended_installer/install_functions/dashboard.sh @@ -164,12 +164,13 @@ function dashboard_initializeAIO() { common_logger "Initializing Wazuh dashboard web application." installCommon_getPass "admin" - http_code="$(common_curl -XGET https://localhost/status -uadmin:\"${u_pass}\" -k -w %\"{http_code}\" -s -o /dev/null --max-time 300 --retry 12 --retry-delay 10 --fail)" + http_code="$(curl -XGET https://localhost/status -uadmin:\"${u_pass}\" -k -w %\"{http_code}\" -s -o /dev/null)" retries=0 max_dashboard_initialize_retries=5 while [ "${http_code}" -ne "200" ] && [ "${retries}" -lt "${max_dashboard_initialize_retries}" ] do - http_code="$(common_curl -XGET https://localhost/status -uadmin:\"${u_pass}\" -k -w %\"{http_code}\" -s -o /dev/null --max-time 300 --retry 12 --retry-delay 10 --fail)" + common_logger -w "Wazuh dashboard web application not yet initialized. Waiting..." + http_code="$(curl -XGET https://localhost/status -uadmin:\"${u_pass}\" -k -w %\"{http_code}\" -s -o /dev/null)" retries=$((retries+1)) sleep 1 done diff --git a/unattended_installer/passwords_tool/passwordsFunctions.sh b/unattended_installer/passwords_tool/passwordsFunctions.sh index e46fe34bb2..3520cc75d2 100644 --- a/unattended_installer/passwords_tool/passwordsFunctions.sh +++ b/unattended_installer/passwords_tool/passwordsFunctions.sh @@ -309,7 +309,8 @@ function passwords_getApiToken() { installCommon_rollBack fi exit 1 - elif [[ ${TOKEN_API} =~ "Invalid credentials" ]]; then + fi + if [[ ${TOKEN_API} =~ "Invalid credentials" ]]; then common_logger -e "Invalid admin user credentials" if [[ $(type -t installCommon_rollBack) == "function" ]]; then installCommon_rollBack From d801627500f42b3528a220286227d8680f5b6bb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 7 Mar 2023 17:24:06 +0100 Subject: [PATCH 274/328] Add logger to the getToken retrying MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- unattended_installer/passwords_tool/passwordsFunctions.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/unattended_installer/passwords_tool/passwordsFunctions.sh b/unattended_installer/passwords_tool/passwordsFunctions.sh index 3520cc75d2..d8205ddc26 100644 --- a/unattended_installer/passwords_tool/passwordsFunctions.sh +++ b/unattended_installer/passwords_tool/passwordsFunctions.sh @@ -299,6 +299,7 @@ function passwords_getApiToken() { TOKEN_API="$(common_curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X POST \"https://localhost:55000/security/user/authenticate?raw=true\" --max-time 300 --retry 5 --retry-delay 5)" while [[ "${TOKEN_API}" =~ "Wazuh Internal Error" ]] && [ "${retries}" -lt "${max_internal_error_retries}" ] do + common_logger -w "There was an error accessing the API. Retrying..." TOKEN_API="$(common_curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X POST \"https://localhost:55000/security/user/authenticate?raw=true\" --max-time 300 --retry 5 --retry-delay 5)" retries=$((retries+1)) sleep 1 From 96a126ba82f9169c7930aec3f09e52c3c9e9454a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 7 Mar 2023 17:27:09 +0100 Subject: [PATCH 275/328] Change retry logs to INFO and remove common_curl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- unattended_installer/install_functions/dashboard.sh | 2 +- unattended_installer/passwords_tool/passwordsFunctions.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/unattended_installer/install_functions/dashboard.sh b/unattended_installer/install_functions/dashboard.sh index 09640b0c2b..bb890267d1 100644 --- a/unattended_installer/install_functions/dashboard.sh +++ b/unattended_installer/install_functions/dashboard.sh @@ -169,7 +169,7 @@ function dashboard_initializeAIO() { max_dashboard_initialize_retries=5 while [ "${http_code}" -ne "200" ] && [ "${retries}" -lt "${max_dashboard_initialize_retries}" ] do - common_logger -w "Wazuh dashboard web application not yet initialized. Waiting..." + common_logger "Wazuh dashboard web application not yet initialized. Waiting..." http_code="$(curl -XGET https://localhost/status -uadmin:\"${u_pass}\" -k -w %\"{http_code}\" -s -o /dev/null)" retries=$((retries+1)) sleep 1 diff --git a/unattended_installer/passwords_tool/passwordsFunctions.sh b/unattended_installer/passwords_tool/passwordsFunctions.sh index d8205ddc26..066a989b44 100644 --- a/unattended_installer/passwords_tool/passwordsFunctions.sh +++ b/unattended_installer/passwords_tool/passwordsFunctions.sh @@ -296,11 +296,11 @@ function passwords_getApiToken() { retries=0 max_internal_error_retries=10 - TOKEN_API="$(common_curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X POST \"https://localhost:55000/security/user/authenticate?raw=true\" --max-time 300 --retry 5 --retry-delay 5)" + TOKEN_API="$(curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X POST \"https://localhost:55000/security/user/authenticate?raw=true\")" while [[ "${TOKEN_API}" =~ "Wazuh Internal Error" ]] && [ "${retries}" -lt "${max_internal_error_retries}" ] do - common_logger -w "There was an error accessing the API. Retrying..." - TOKEN_API="$(common_curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X POST \"https://localhost:55000/security/user/authenticate?raw=true\" --max-time 300 --retry 5 --retry-delay 5)" + common_logger "There was an error accessing the API. Retrying..." + TOKEN_API="$(curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X POST \"https://localhost:55000/security/user/authenticate?raw=true\")" retries=$((retries+1)) sleep 1 done From a76202354462af03a63bc0588883e487b80557c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 7 Mar 2023 17:28:57 +0100 Subject: [PATCH 276/328] Add the retries in the case of curl error for the token download MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- unattended_installer/passwords_tool/passwordsFunctions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unattended_installer/passwords_tool/passwordsFunctions.sh b/unattended_installer/passwords_tool/passwordsFunctions.sh index 066a989b44..377b873aee 100644 --- a/unattended_installer/passwords_tool/passwordsFunctions.sh +++ b/unattended_installer/passwords_tool/passwordsFunctions.sh @@ -296,11 +296,11 @@ function passwords_getApiToken() { retries=0 max_internal_error_retries=10 - TOKEN_API="$(curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X POST \"https://localhost:55000/security/user/authenticate?raw=true\")" + TOKEN_API="$(curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X POST \"https://localhost:55000/security/user/authenticate?raw=true\" --max-time 300 --retry 5 --retry-delay 5)" while [[ "${TOKEN_API}" =~ "Wazuh Internal Error" ]] && [ "${retries}" -lt "${max_internal_error_retries}" ] do common_logger "There was an error accessing the API. Retrying..." - TOKEN_API="$(curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X POST \"https://localhost:55000/security/user/authenticate?raw=true\")" + TOKEN_API="$(curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X POST \"https://localhost:55000/security/user/authenticate?raw=true\" --max-time 300 --retry 5 --retry-delay 5)" retries=$((retries+1)) sleep 1 done From 526668d167043dfc9aa943d9e58e3390bdf98020 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 7 Mar 2023 18:12:11 +0100 Subject: [PATCH 277/328] Change the type of http request used based on the version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- unattended_installer/passwords_tool/passwordsFunctions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unattended_installer/passwords_tool/passwordsFunctions.sh b/unattended_installer/passwords_tool/passwordsFunctions.sh index 377b873aee..fc1baf65fc 100644 --- a/unattended_installer/passwords_tool/passwordsFunctions.sh +++ b/unattended_installer/passwords_tool/passwordsFunctions.sh @@ -296,11 +296,11 @@ function passwords_getApiToken() { retries=0 max_internal_error_retries=10 - TOKEN_API="$(curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X POST \"https://localhost:55000/security/user/authenticate?raw=true\" --max-time 300 --retry 5 --retry-delay 5)" + TOKEN_API="$(curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X GET \"https://localhost:55000/security/user/authenticate?raw=true\" --max-time 300 --retry 5 --retry-delay 5)" while [[ "${TOKEN_API}" =~ "Wazuh Internal Error" ]] && [ "${retries}" -lt "${max_internal_error_retries}" ] do common_logger "There was an error accessing the API. Retrying..." - TOKEN_API="$(curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X POST \"https://localhost:55000/security/user/authenticate?raw=true\" --max-time 300 --retry 5 --retry-delay 5)" + TOKEN_API="$(curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X GET \"https://localhost:55000/security/user/authenticate?raw=true\" --max-time 300 --retry 5 --retry-delay 5)" retries=$((retries+1)) sleep 1 done From 5a11b3453a90ebb650660b72de8c2d2897e249ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 8 Mar 2023 10:17:46 +0100 Subject: [PATCH 278/328] Remove double-quotes in curls MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- unattended_installer/install_functions/dashboard.sh | 4 ++-- unattended_installer/passwords_tool/passwordsFunctions.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/unattended_installer/install_functions/dashboard.sh b/unattended_installer/install_functions/dashboard.sh index bb890267d1..5a27827c32 100644 --- a/unattended_installer/install_functions/dashboard.sh +++ b/unattended_installer/install_functions/dashboard.sh @@ -164,13 +164,13 @@ function dashboard_initializeAIO() { common_logger "Initializing Wazuh dashboard web application." installCommon_getPass "admin" - http_code="$(curl -XGET https://localhost/status -uadmin:\"${u_pass}\" -k -w %\"{http_code}\" -s -o /dev/null)" + http_code=$(curl -XGET https://localhost/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null) retries=0 max_dashboard_initialize_retries=5 while [ "${http_code}" -ne "200" ] && [ "${retries}" -lt "${max_dashboard_initialize_retries}" ] do common_logger "Wazuh dashboard web application not yet initialized. Waiting..." - http_code="$(curl -XGET https://localhost/status -uadmin:\"${u_pass}\" -k -w %\"{http_code}\" -s -o /dev/null)" + http_code=$(curl -XGET https://localhost/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null) retries=$((retries+1)) sleep 1 done diff --git a/unattended_installer/passwords_tool/passwordsFunctions.sh b/unattended_installer/passwords_tool/passwordsFunctions.sh index fc1baf65fc..d8f3dc73bf 100644 --- a/unattended_installer/passwords_tool/passwordsFunctions.sh +++ b/unattended_installer/passwords_tool/passwordsFunctions.sh @@ -296,11 +296,11 @@ function passwords_getApiToken() { retries=0 max_internal_error_retries=10 - TOKEN_API="$(curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X GET \"https://localhost:55000/security/user/authenticate?raw=true\" --max-time 300 --retry 5 --retry-delay 5)" + TOKEN_API=$(curl -s -u "${adminUser}":"${adminPassword}" -k -X GET "https://localhost:55000/security/user/authenticate?raw=true" --max-time 300 --retry 5 --retry-delay 5) while [[ "${TOKEN_API}" =~ "Wazuh Internal Error" ]] && [ "${retries}" -lt "${max_internal_error_retries}" ] do common_logger "There was an error accessing the API. Retrying..." - TOKEN_API="$(curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X GET \"https://localhost:55000/security/user/authenticate?raw=true\" --max-time 300 --retry 5 --retry-delay 5)" + TOKEN_API=$(curl -s -u "${adminUser}":"${adminPassword}" -k -X GET "https://localhost:55000/security/user/authenticate?raw=true" --max-time 300 --retry 5 --retry-delay 5) retries=$((retries+1)) sleep 1 done From 2864543052909d384949dd43776a30270660695b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 8 Mar 2023 12:57:15 +0100 Subject: [PATCH 279/328] Add the changes of 4.4 done to the installer builder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- unattended_installer/builder.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/unattended_installer/builder.sh b/unattended_installer/builder.sh index 867b5f541b..296dbd87e3 100755 --- a/unattended_installer/builder.sh +++ b/unattended_installer/builder.sh @@ -34,8 +34,8 @@ function getHelp() { echo -e " -c, --cert-tool" echo -e " Builds the certificate creation tool cert-tool.sh" echo -e "" - echo -e " -d, --development" - echo -e " Use development repos" + echo -e " -d [staging], --development" + echo -e " Use development repos. By default it uses pre-release. If staging is specified, it will be used" echo -e "" echo -e " -p, --password-tool" echo -e " Builds the password creation and modification tool password-tool.sh" @@ -68,11 +68,11 @@ function buildInstaller() { if [ -n "${development}" ]; then echo 'readonly development=1' >> "${output_script_path}" echo 'readonly repogpg="https://packages-dev.wazuh.com/key/GPG-KEY-WAZUH"' >> "${output_script_path}" - echo 'readonly repobaseurl="https://packages-dev.wazuh.com/pre-release"' >> "${output_script_path}" + echo 'readonly repobaseurl="https://packages-dev.wazuh.com/'${devrepo}'"' >> "${output_script_path}" echo 'readonly reporelease="unstable"' >> "${output_script_path}" echo 'readonly filebeat_wazuh_module="${repobaseurl}/filebeat/wazuh-filebeat-0.2.tar.gz"' >> "${output_script_path}" echo 'readonly bucket="packages-dev.wazuh.com"' >> "${output_script_path}" - echo 'readonly repository="pre-release"' >> "${output_script_path}" + echo 'readonly repository="'"${devrepo}"'"' >> "${output_script_path}" else echo 'readonly repogpg="https://packages.wazuh.com/key/GPG-KEY-WAZUH"' >> "${output_script_path}" echo 'readonly repobaseurl="https://packages.wazuh.com/4.x"' >> "${output_script_path}" @@ -228,7 +228,13 @@ function builder_main() { ;; "-d"|"--development") development=1 - shift 1 + if [ -n "${2}" ] && [ "${2}" = "staging" ]; then + devrepo="staging" + shift 2 + else + devrepo="pre-release" + shift 1 + fi ;; "-p"|"--password-tool") passwordsTool=1 From 1a2100a1e764a8252e82c92b0002a48bf41f8391 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 8 Mar 2023 15:50:57 +0100 Subject: [PATCH 280/328] Changed double-quoting on changes in the dashboard initialization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- unattended_installer/install_functions/dashboard.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unattended_installer/install_functions/dashboard.sh b/unattended_installer/install_functions/dashboard.sh index 5a27827c32..705d983685 100644 --- a/unattended_installer/install_functions/dashboard.sh +++ b/unattended_installer/install_functions/dashboard.sh @@ -164,13 +164,13 @@ function dashboard_initializeAIO() { common_logger "Initializing Wazuh dashboard web application." installCommon_getPass "admin" - http_code=$(curl -XGET https://localhost/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null) + http_code="$(curl -XGET https://localhost/status -uadmin:${u_pass} -k -w %{http_code} -s -o /dev/null )" retries=0 max_dashboard_initialize_retries=5 while [ "${http_code}" -ne "200" ] && [ "${retries}" -lt "${max_dashboard_initialize_retries}" ] do common_logger "Wazuh dashboard web application not yet initialized. Waiting..." - http_code=$(curl -XGET https://localhost/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null) + http_code="$(curl -XGET https://localhost/status -uadmin:${u_pass} -k -w %{http_code} -s -o /dev/null)" retries=$((retries+1)) sleep 1 done From 48e52e6c565542183c5b4addb47c325d81de9809 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 9 Mar 2023 09:30:39 +0100 Subject: [PATCH 281/328] Add option to specify pre-release repository on the builder and correct help commentary for argument --development MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- unattended_installer/builder.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/unattended_installer/builder.sh b/unattended_installer/builder.sh index 296dbd87e3..f8a67afdc4 100755 --- a/unattended_installer/builder.sh +++ b/unattended_installer/builder.sh @@ -34,8 +34,8 @@ function getHelp() { echo -e " -c, --cert-tool" echo -e " Builds the certificate creation tool cert-tool.sh" echo -e "" - echo -e " -d [staging], --development" - echo -e " Use development repos. By default it uses pre-release. If staging is specified, it will be used" + echo -e " -d [pre-release|staging], --development" + echo -e " Use development repositories. By default it uses the pre-release package repository. If staging is specified, it will use that repository." echo -e "" echo -e " -p, --password-tool" echo -e " Builds the password creation and modification tool password-tool.sh" @@ -231,6 +231,9 @@ function builder_main() { if [ -n "${2}" ] && [ "${2}" = "staging" ]; then devrepo="staging" shift 2 + elif [ -n "${2}" ] && [ "${2}" = "pre-release" ]; then + devrepo="pre-release" + shift 2 else devrepo="pre-release" shift 1 From 81675c76d451a9718f56ec86a9231377fb945444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 9 Mar 2023 10:33:14 +0100 Subject: [PATCH 282/328] Unify the use of double-quotes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- unattended_installer/install_functions/dashboard.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unattended_installer/install_functions/dashboard.sh b/unattended_installer/install_functions/dashboard.sh index 705d983685..5a27827c32 100644 --- a/unattended_installer/install_functions/dashboard.sh +++ b/unattended_installer/install_functions/dashboard.sh @@ -164,13 +164,13 @@ function dashboard_initializeAIO() { common_logger "Initializing Wazuh dashboard web application." installCommon_getPass "admin" - http_code="$(curl -XGET https://localhost/status -uadmin:${u_pass} -k -w %{http_code} -s -o /dev/null )" + http_code=$(curl -XGET https://localhost/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null) retries=0 max_dashboard_initialize_retries=5 while [ "${http_code}" -ne "200" ] && [ "${retries}" -lt "${max_dashboard_initialize_retries}" ] do common_logger "Wazuh dashboard web application not yet initialized. Waiting..." - http_code="$(curl -XGET https://localhost/status -uadmin:${u_pass} -k -w %{http_code} -s -o /dev/null)" + http_code=$(curl -XGET https://localhost/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null) retries=$((retries+1)) sleep 1 done From 8078c002ea48cd57f21a2bbfe5de3b41400274e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 9 Mar 2023 13:53:21 +0100 Subject: [PATCH 283/328] Increased retries and times for the sleep MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- unattended_installer/install_functions/dashboard.sh | 4 ++-- unattended_installer/passwords_tool/passwordsFunctions.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/unattended_installer/install_functions/dashboard.sh b/unattended_installer/install_functions/dashboard.sh index 5a27827c32..d11c74ce2f 100644 --- a/unattended_installer/install_functions/dashboard.sh +++ b/unattended_installer/install_functions/dashboard.sh @@ -166,13 +166,13 @@ function dashboard_initializeAIO() { installCommon_getPass "admin" http_code=$(curl -XGET https://localhost/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null) retries=0 - max_dashboard_initialize_retries=5 + max_dashboard_initialize_retries=20 while [ "${http_code}" -ne "200" ] && [ "${retries}" -lt "${max_dashboard_initialize_retries}" ] do common_logger "Wazuh dashboard web application not yet initialized. Waiting..." http_code=$(curl -XGET https://localhost/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null) retries=$((retries+1)) - sleep 1 + sleep 15 done if [ "${http_code}" -eq "200" ]; then common_logger "Wazuh dashboard web application initialized." diff --git a/unattended_installer/passwords_tool/passwordsFunctions.sh b/unattended_installer/passwords_tool/passwordsFunctions.sh index d8f3dc73bf..112b0ed34f 100644 --- a/unattended_installer/passwords_tool/passwordsFunctions.sh +++ b/unattended_installer/passwords_tool/passwordsFunctions.sh @@ -294,7 +294,7 @@ function passwords_generatePasswordFile() { function passwords_getApiToken() { retries=0 - max_internal_error_retries=10 + max_internal_error_retries=20 TOKEN_API=$(curl -s -u "${adminUser}":"${adminPassword}" -k -X GET "https://localhost:55000/security/user/authenticate?raw=true" --max-time 300 --retry 5 --retry-delay 5) while [[ "${TOKEN_API}" =~ "Wazuh Internal Error" ]] && [ "${retries}" -lt "${max_internal_error_retries}" ] @@ -302,7 +302,7 @@ function passwords_getApiToken() { common_logger "There was an error accessing the API. Retrying..." TOKEN_API=$(curl -s -u "${adminUser}":"${adminPassword}" -k -X GET "https://localhost:55000/security/user/authenticate?raw=true" --max-time 300 --retry 5 --retry-delay 5) retries=$((retries+1)) - sleep 1 + sleep 10 done if [[ ${TOKEN_API} =~ "Wazuh Internal Error" ]]; then common_logger -e "There was an error while trying to get the API token." From 4898085161959c579e33dfc67569ef46396eda5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 2 Mar 2023 18:39:29 +0100 Subject: [PATCH 284/328] Add some retries to the API Token downloading --- .../passwords_tool/passwordsFunctions.sh | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/unattended_installer/passwords_tool/passwordsFunctions.sh b/unattended_installer/passwords_tool/passwordsFunctions.sh index bd9e265303..5fe2e412ec 100644 --- a/unattended_installer/passwords_tool/passwordsFunctions.sh +++ b/unattended_installer/passwords_tool/passwordsFunctions.sh @@ -303,11 +303,25 @@ function passwords_generatePasswordFile() { function passwords_getApiToken() { - TOKEN_API=$(curl -s -u "${adminUser}":"${adminPassword}" -k -X POST "https://localhost:55000/security/user/authenticate?raw=true") - if [[ ${TOKEN_API} =~ "Invalid credentials" ]]; then + retries=0 + max_internal_error_retries=5 + + TOKEN_API=$(common_curl -s -u "${adminUser}":"${adminPassword}" -k -X POST "https://localhost:55000/security/user/authenticate?raw=true" --max-time 300 --retry 5 --retry-delay 5) + while [[ "${TOKEN_API}" =~ "Wazuh Internal Error" ]] && [ "${retries}" -lt "${max_internal_error_retries}" ] + do + TOKEN_API=$(common_curl -s -u "${adminUser}":"${adminPassword}" -k -X POST "https://localhost:55000/security/user/authenticate?raw=true" --max-time 300 --retry 5 --retry-delay 5) + retries=$((retries+1)) + done + if [[ ${TOKEN_API} =~ "Wazuh Internal Error" ]]; then + common_logger -e "There was an error while trying to get the API token." + if [[ $(type -t installCommon_rollBack) == "function" ]]; then + installCommon_rollBack + fi + exit 1 + elif [[ ${TOKEN_API} =~ "Invalid credentials" ]]; then common_logger -e "Invalid admin user credentials" if [[ $(type -t installCommon_rollBack) == "function" ]]; then - installCommon_rollBack + installCommon_rollBack fi exit 1 fi From 688dd85f79355b9b0789a0c33aed9144dbe52cdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Fri, 3 Mar 2023 16:31:53 +0100 Subject: [PATCH 285/328] Add a retry for the dashboard initialization MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../install_functions/dashboard.sh | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/unattended_installer/install_functions/dashboard.sh b/unattended_installer/install_functions/dashboard.sh index bff659ff3a..ba1db03ecf 100644 --- a/unattended_installer/install_functions/dashboard.sh +++ b/unattended_installer/install_functions/dashboard.sh @@ -162,21 +162,31 @@ function dashboard_initialize() { function dashboard_initializeAIO() { + set -ex common_logger "Initializing Wazuh dashboard web application." installCommon_getPass "admin" - until [ "$(curl -XGET https://localhost/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null)" -eq "200" ] || [ "${i}" -eq 12 ]; do - sleep 10 - i=$((i+1)) + echo "Before curl" + e_code="$(common_curl -XGET https://localhost/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null --max-time 300 --retry 12 --retry-delay 10 --fail)" + retries=0 + max_dashboard_initialize_retries=5 + read -p "Press enter to continue" + while [ "${e_code}" -ne "200" ] && [ "${retries}" -lt "${max_dashboard_initialize_retries}" ] + do + echo "Before retry" + e_code="$(common_curl -XGET https://localhost/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null --max-time 300 --retry 12 --retry-delay 10 --fail)" + echo "After retry" + retries=$((retries+1)) done - if [ ${i} -eq 12 ]; then - common_logger -e "Cannot connect to Wazuh dashboard." + if [ "${e_code}" -eq "200" ]; then + common_logger "Wazuh dashboard web application initialized." + common_logger -nl "--- Summary ---" + common_logger -nl "You can access the web interface https://\n User: admin\n Password: ${u_pass}" + else + common_logger -e "Wazuh dashboard installation failed." installCommon_rollBack exit 1 fi - - common_logger "Wazuh dashboard web application initialized." - common_logger -nl "--- Summary ---" - common_logger -nl "You can access the web interface https://\n User: admin\n Password: ${u_pass}" + set +ex } function dashboard_install() { From 08770c89e3d68d99846c2d6a35ef241bf10a5371 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 7 Mar 2023 13:07:26 +0100 Subject: [PATCH 286/328] Remove debug statements and add double-quotes to the TOKEN MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .../install_functions/dashboard.sh | 15 +++++---------- .../passwords_tool/passwordsFunctions.sh | 7 ++++--- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/unattended_installer/install_functions/dashboard.sh b/unattended_installer/install_functions/dashboard.sh index ba1db03ecf..553e6eef90 100644 --- a/unattended_installer/install_functions/dashboard.sh +++ b/unattended_installer/install_functions/dashboard.sh @@ -162,22 +162,18 @@ function dashboard_initialize() { function dashboard_initializeAIO() { - set -ex common_logger "Initializing Wazuh dashboard web application." installCommon_getPass "admin" - echo "Before curl" - e_code="$(common_curl -XGET https://localhost/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null --max-time 300 --retry 12 --retry-delay 10 --fail)" + http_code="$(common_curl -XGET https://localhost/status -uadmin:\"${u_pass}\" -k -w %\"{http_code}\" -s -o /dev/null --max-time 300 --retry 12 --retry-delay 10 --fail)" retries=0 max_dashboard_initialize_retries=5 - read -p "Press enter to continue" - while [ "${e_code}" -ne "200" ] && [ "${retries}" -lt "${max_dashboard_initialize_retries}" ] + while [ "${http_code}" -ne "200" ] && [ "${retries}" -lt "${max_dashboard_initialize_retries}" ] do - echo "Before retry" - e_code="$(common_curl -XGET https://localhost/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null --max-time 300 --retry 12 --retry-delay 10 --fail)" - echo "After retry" + http_code="$(common_curl -XGET https://localhost/status -uadmin:\"${u_pass}\" -k -w %\"{http_code}\" -s -o /dev/null --max-time 300 --retry 12 --retry-delay 10 --fail)" retries=$((retries+1)) + sleep 1 done - if [ "${e_code}" -eq "200" ]; then + if [ "${http_code}" -eq "200" ]; then common_logger "Wazuh dashboard web application initialized." common_logger -nl "--- Summary ---" common_logger -nl "You can access the web interface https://\n User: admin\n Password: ${u_pass}" @@ -186,7 +182,6 @@ function dashboard_initializeAIO() { installCommon_rollBack exit 1 fi - set +ex } function dashboard_install() { diff --git a/unattended_installer/passwords_tool/passwordsFunctions.sh b/unattended_installer/passwords_tool/passwordsFunctions.sh index 5fe2e412ec..a9ac321604 100644 --- a/unattended_installer/passwords_tool/passwordsFunctions.sh +++ b/unattended_installer/passwords_tool/passwordsFunctions.sh @@ -304,13 +304,14 @@ function passwords_generatePasswordFile() { function passwords_getApiToken() { retries=0 - max_internal_error_retries=5 + max_internal_error_retries=10 - TOKEN_API=$(common_curl -s -u "${adminUser}":"${adminPassword}" -k -X POST "https://localhost:55000/security/user/authenticate?raw=true" --max-time 300 --retry 5 --retry-delay 5) + TOKEN_API="$(common_curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X POST \"https://localhost:55000/security/user/authenticate?raw=true\" --max-time 300 --retry 5 --retry-delay 5)" while [[ "${TOKEN_API}" =~ "Wazuh Internal Error" ]] && [ "${retries}" -lt "${max_internal_error_retries}" ] do - TOKEN_API=$(common_curl -s -u "${adminUser}":"${adminPassword}" -k -X POST "https://localhost:55000/security/user/authenticate?raw=true" --max-time 300 --retry 5 --retry-delay 5) + TOKEN_API="$(common_curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X POST \"https://localhost:55000/security/user/authenticate?raw=true\" --max-time 300 --retry 5 --retry-delay 5)" retries=$((retries+1)) + sleep 1 done if [[ ${TOKEN_API} =~ "Wazuh Internal Error" ]]; then common_logger -e "There was an error while trying to get the API token." From daec2134d626b7baa8a7b24190470b69bd9a1c9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 7 Mar 2023 13:39:47 +0100 Subject: [PATCH 287/328] Log when a retry is done MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- unattended_installer/install_functions/dashboard.sh | 1 + unattended_installer/passwords_tool/passwordsFunctions.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/unattended_installer/install_functions/dashboard.sh b/unattended_installer/install_functions/dashboard.sh index 553e6eef90..db8d1ffdb1 100644 --- a/unattended_installer/install_functions/dashboard.sh +++ b/unattended_installer/install_functions/dashboard.sh @@ -170,6 +170,7 @@ function dashboard_initializeAIO() { while [ "${http_code}" -ne "200" ] && [ "${retries}" -lt "${max_dashboard_initialize_retries}" ] do http_code="$(common_curl -XGET https://localhost/status -uadmin:\"${u_pass}\" -k -w %\"{http_code}\" -s -o /dev/null --max-time 300 --retry 12 --retry-delay 10 --fail)" + common_logger -e "Wazuh dashboard installation failed. Retrying..." retries=$((retries+1)) sleep 1 done diff --git a/unattended_installer/passwords_tool/passwordsFunctions.sh b/unattended_installer/passwords_tool/passwordsFunctions.sh index a9ac321604..19ddd69601 100644 --- a/unattended_installer/passwords_tool/passwordsFunctions.sh +++ b/unattended_installer/passwords_tool/passwordsFunctions.sh @@ -310,6 +310,7 @@ function passwords_getApiToken() { while [[ "${TOKEN_API}" =~ "Wazuh Internal Error" ]] && [ "${retries}" -lt "${max_internal_error_retries}" ] do TOKEN_API="$(common_curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X POST \"https://localhost:55000/security/user/authenticate?raw=true\" --max-time 300 --retry 5 --retry-delay 5)" + common_logger -e "There was an error while trying to get the API token. Retrying..." retries=$((retries+1)) sleep 1 done From 4d810263c3cfa66621105d998977b395f58638f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Tue, 7 Mar 2023 15:26:01 +0100 Subject: [PATCH 288/328] Change common_curl for normal curl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- unattended_installer/install_functions/dashboard.sh | 4 ++-- unattended_installer/passwords_tool/passwordsFunctions.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/unattended_installer/install_functions/dashboard.sh b/unattended_installer/install_functions/dashboard.sh index db8d1ffdb1..1acb550161 100644 --- a/unattended_installer/install_functions/dashboard.sh +++ b/unattended_installer/install_functions/dashboard.sh @@ -164,12 +164,12 @@ function dashboard_initializeAIO() { common_logger "Initializing Wazuh dashboard web application." installCommon_getPass "admin" - http_code="$(common_curl -XGET https://localhost/status -uadmin:\"${u_pass}\" -k -w %\"{http_code}\" -s -o /dev/null --max-time 300 --retry 12 --retry-delay 10 --fail)" + http_code="$(curl -XGET https://localhost/status -uadmin:\"${u_pass}\" -k -w %\"{http_code}\" -s -o /dev/null --max-time 300 --retry 12 --retry-delay 10 --fail)" retries=0 max_dashboard_initialize_retries=5 while [ "${http_code}" -ne "200" ] && [ "${retries}" -lt "${max_dashboard_initialize_retries}" ] do - http_code="$(common_curl -XGET https://localhost/status -uadmin:\"${u_pass}\" -k -w %\"{http_code}\" -s -o /dev/null --max-time 300 --retry 12 --retry-delay 10 --fail)" + http_code="$(curl -XGET https://localhost/status -uadmin:\"${u_pass}\" -k -w %\"{http_code}\" -s -o /dev/null --max-time 300 --retry 12 --retry-delay 10 --fail)" common_logger -e "Wazuh dashboard installation failed. Retrying..." retries=$((retries+1)) sleep 1 diff --git a/unattended_installer/passwords_tool/passwordsFunctions.sh b/unattended_installer/passwords_tool/passwordsFunctions.sh index 19ddd69601..e256c5c982 100644 --- a/unattended_installer/passwords_tool/passwordsFunctions.sh +++ b/unattended_installer/passwords_tool/passwordsFunctions.sh @@ -306,10 +306,10 @@ function passwords_getApiToken() { retries=0 max_internal_error_retries=10 - TOKEN_API="$(common_curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X POST \"https://localhost:55000/security/user/authenticate?raw=true\" --max-time 300 --retry 5 --retry-delay 5)" + TOKEN_API="$(curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X POST \"https://localhost:55000/security/user/authenticate?raw=true\" --max-time 300 --retry 5 --retry-delay 5)" while [[ "${TOKEN_API}" =~ "Wazuh Internal Error" ]] && [ "${retries}" -lt "${max_internal_error_retries}" ] do - TOKEN_API="$(common_curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X POST \"https://localhost:55000/security/user/authenticate?raw=true\" --max-time 300 --retry 5 --retry-delay 5)" + TOKEN_API="$(curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X POST \"https://localhost:55000/security/user/authenticate?raw=true\" --max-time 300 --retry 5 --retry-delay 5)" common_logger -e "There was an error while trying to get the API token. Retrying..." retries=$((retries+1)) sleep 1 From ab949daa83de8077d82e332476a5b79a496a610f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 9 Mar 2023 09:30:39 +0100 Subject: [PATCH 289/328] Add option to specify pre-release repository on the builder and correct help commentary for argument --development MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- unattended_installer/builder.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/unattended_installer/builder.sh b/unattended_installer/builder.sh index a52204932e..e330a54167 100755 --- a/unattended_installer/builder.sh +++ b/unattended_installer/builder.sh @@ -34,8 +34,8 @@ function getHelp() { echo -e " -c, --cert-tool" echo -e " Builds the certificate creation tool cert-tool.sh" echo -e "" - echo -e " -d [staging], --development" - echo -e " Use development repos. By default it uses pre-release. If staging is specified, it will be used" + echo -e " -d [pre-release|staging], --development" + echo -e " Use development repositories. By default it uses the pre-release package repository. If staging is specified, it will use that repository." echo -e "" echo -e " -p, --password-tool" echo -e " Builds the password creation and modification tool password-tool.sh" @@ -231,6 +231,9 @@ function builder_main() { if [ -n "${2}" ] && [ "${2}" = "staging" ]; then devrepo="staging" shift 2 + elif [ -n "${2}" ] && [ "${2}" = "pre-release" ]; then + devrepo="pre-release" + shift 2 else devrepo="pre-release" shift 1 From f68a93f6becc7ec34b253439135b1da9f65429aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 9 Mar 2023 09:47:52 +0100 Subject: [PATCH 290/328] Update with the changes from the PR to 4.3.10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- unattended_installer/install_functions/dashboard.sh | 8 ++++---- unattended_installer/passwords_tool/passwordsFunctions.sh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/unattended_installer/install_functions/dashboard.sh b/unattended_installer/install_functions/dashboard.sh index 1acb550161..be2b719eeb 100644 --- a/unattended_installer/install_functions/dashboard.sh +++ b/unattended_installer/install_functions/dashboard.sh @@ -164,13 +164,13 @@ function dashboard_initializeAIO() { common_logger "Initializing Wazuh dashboard web application." installCommon_getPass "admin" - http_code="$(curl -XGET https://localhost/status -uadmin:\"${u_pass}\" -k -w %\"{http_code}\" -s -o /dev/null --max-time 300 --retry 12 --retry-delay 10 --fail)" + http_code="$(curl -XGET https://localhost/status -uadmin:\"${u_pass}\" -k -w %\"{http_code}\" -s -o /dev/null)" retries=0 - max_dashboard_initialize_retries=5 + max_dashboard_initialize_retries=10 while [ "${http_code}" -ne "200" ] && [ "${retries}" -lt "${max_dashboard_initialize_retries}" ] do - http_code="$(curl -XGET https://localhost/status -uadmin:\"${u_pass}\" -k -w %\"{http_code}\" -s -o /dev/null --max-time 300 --retry 12 --retry-delay 10 --fail)" - common_logger -e "Wazuh dashboard installation failed. Retrying..." + http_code="$(curl -XGET https://localhost/status -uadmin:\"${u_pass}\" -k -w %\"{http_code}\" -s -o /dev/null)" + common_logger "Wazuh dashboard web application not yet initialized. Waiting..." retries=$((retries+1)) sleep 1 done diff --git a/unattended_installer/passwords_tool/passwordsFunctions.sh b/unattended_installer/passwords_tool/passwordsFunctions.sh index e256c5c982..8b506edca6 100644 --- a/unattended_installer/passwords_tool/passwordsFunctions.sh +++ b/unattended_installer/passwords_tool/passwordsFunctions.sh @@ -309,8 +309,8 @@ function passwords_getApiToken() { TOKEN_API="$(curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X POST \"https://localhost:55000/security/user/authenticate?raw=true\" --max-time 300 --retry 5 --retry-delay 5)" while [[ "${TOKEN_API}" =~ "Wazuh Internal Error" ]] && [ "${retries}" -lt "${max_internal_error_retries}" ] do + common_logger "There was an error accessing the API. Retrying..." TOKEN_API="$(curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X POST \"https://localhost:55000/security/user/authenticate?raw=true\" --max-time 300 --retry 5 --retry-delay 5)" - common_logger -e "There was an error while trying to get the API token. Retrying..." retries=$((retries+1)) sleep 1 done From c74e8b20d202f54a9c0e68b1a4e63f21dea55c26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 9 Mar 2023 13:51:26 +0100 Subject: [PATCH 291/328] Increased waiting times for retries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- unattended_installer/install_functions/dashboard.sh | 8 ++++---- .../passwords_tool/passwordsFunctions.sh | 10 ++++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/unattended_installer/install_functions/dashboard.sh b/unattended_installer/install_functions/dashboard.sh index be2b719eeb..123b2ad90c 100644 --- a/unattended_installer/install_functions/dashboard.sh +++ b/unattended_installer/install_functions/dashboard.sh @@ -164,15 +164,15 @@ function dashboard_initializeAIO() { common_logger "Initializing Wazuh dashboard web application." installCommon_getPass "admin" - http_code="$(curl -XGET https://localhost/status -uadmin:\"${u_pass}\" -k -w %\"{http_code}\" -s -o /dev/null)" + http_code=$(curl -XGET https://localhost/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null) retries=0 - max_dashboard_initialize_retries=10 + max_dashboard_initialize_retries=20 while [ "${http_code}" -ne "200" ] && [ "${retries}" -lt "${max_dashboard_initialize_retries}" ] do - http_code="$(curl -XGET https://localhost/status -uadmin:\"${u_pass}\" -k -w %\"{http_code}\" -s -o /dev/null)" + http_code=$(curl -XGET https://localhost/status -uadmin:"${u_pass}" -k -w %"{http_code}" -s -o /dev/null) common_logger "Wazuh dashboard web application not yet initialized. Waiting..." retries=$((retries+1)) - sleep 1 + sleep 15 done if [ "${http_code}" -eq "200" ]; then common_logger "Wazuh dashboard web application initialized." diff --git a/unattended_installer/passwords_tool/passwordsFunctions.sh b/unattended_installer/passwords_tool/passwordsFunctions.sh index 8b506edca6..e867179021 100644 --- a/unattended_installer/passwords_tool/passwordsFunctions.sh +++ b/unattended_installer/passwords_tool/passwordsFunctions.sh @@ -304,15 +304,15 @@ function passwords_generatePasswordFile() { function passwords_getApiToken() { retries=0 - max_internal_error_retries=10 + max_internal_error_retries=20 - TOKEN_API="$(curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X POST \"https://localhost:55000/security/user/authenticate?raw=true\" --max-time 300 --retry 5 --retry-delay 5)" + TOKEN_API=$(curl -s -u "${adminUser}":"${adminPassword}" -k -X POST "https://localhost:55000/security/user/authenticate?raw=true" --max-time 300 --retry 5 --retry-delay 5) while [[ "${TOKEN_API}" =~ "Wazuh Internal Error" ]] && [ "${retries}" -lt "${max_internal_error_retries}" ] do common_logger "There was an error accessing the API. Retrying..." - TOKEN_API="$(curl -s -u \"${adminUser}\":\"${adminPassword}\" -k -X POST \"https://localhost:55000/security/user/authenticate?raw=true\" --max-time 300 --retry 5 --retry-delay 5)" + TOKEN_API=$(curl -s -u "${adminUser}":"${adminPassword}" -k -X POST "https://localhost:55000/security/user/authenticate?raw=true" --max-time 300 --retry 5 --retry-delay 5) retries=$((retries+1)) - sleep 1 + sleep 10 done if [[ ${TOKEN_API} =~ "Wazuh Internal Error" ]]; then common_logger -e "There was an error while trying to get the API token." @@ -344,6 +344,7 @@ function passwords_getApiIds() { function passwords_getApiUserId() { + set -x user_id="noid" for u in "${!api_users[@]}"; do if [ "${1}" == "${api_users[u]}" ]; then @@ -358,6 +359,7 @@ function passwords_getApiUserId() { fi exit 1 fi + set +x } From 9e3756a014f6510f39668154af94532e85b19f37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Thu, 9 Mar 2023 15:48:14 +0100 Subject: [PATCH 292/328] Remove debug statements --- unattended_installer/passwords_tool/passwordsFunctions.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/unattended_installer/passwords_tool/passwordsFunctions.sh b/unattended_installer/passwords_tool/passwordsFunctions.sh index e867179021..bfd0c4b2a3 100644 --- a/unattended_installer/passwords_tool/passwordsFunctions.sh +++ b/unattended_installer/passwords_tool/passwordsFunctions.sh @@ -344,7 +344,6 @@ function passwords_getApiIds() { function passwords_getApiUserId() { - set -x user_id="noid" for u in "${!api_users[@]}"; do if [ "${1}" == "${api_users[u]}" ]; then @@ -359,7 +358,6 @@ function passwords_getApiUserId() { fi exit 1 fi - set +x } From 2095105006b6f3e1965c387a4b89756cbf561dde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Correa=20Rodr=C3=ADguez?= Date: Mon, 13 Mar 2023 14:00:31 +0100 Subject: [PATCH 293/328] Added Chrome to Amazon Linux 2 --- .../install_functions/installCommon.sh | 31 +++++++++++++------ 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/unattended_installer/install_functions/installCommon.sh b/unattended_installer/install_functions/installCommon.sh index f5561a3c54..f9bd08e89c 100644 --- a/unattended_installer/install_functions/installCommon.sh +++ b/unattended_installer/install_functions/installCommon.sh @@ -280,14 +280,14 @@ function installCommon_checkChromium() { dashboard_dependencies=(chromium) fi if [ "${DIST_NAME}" == "amzn" ]; then - eval "amazon-linux-extras install epel -y ${debug}" + installCommon_installChrome fi elif [ "${sys_type}" == "apt-get" ]; then if (! apt list --installed 2>/dev/null | grep -q -E ^"google-chrome-stable"\/) && (! apt list --installed 2>/dev/null | grep -q -E ^"chromium-browser"\/); then # Report generation doesn't work with Chromium in Ubuntu 22 and Ubuntu 20 if [[ "${DIST_NAME}" == "ubuntu" ]] && [[ "${DIST_VER}" == "22" || "${DIST_VER}" == "20" || "${DIST_VER}" == "18" ]]; then - installCommon_aptInstallChrome + installCommon_installChrome else dashboard_dependencies=(chromium-browser) fi @@ -345,19 +345,30 @@ function installCommon_installCheckDependencies() { } -function installCommon_aptInstallChrome() { +function installCommon_installChrome() { dep="chrome" - chrome_package="/tmp/wazuh-install-files/chrome.deb" - curl -so "${chrome_package}" https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb - common_logger "Installing ${dep}." - installCommon_aptInstall "${chrome_package}" - if [ "${install_result}" != 0 ]; then - installCommon_checkOptionalInstallation + if [ "${sys_type}" == "yum" ]; then + chrome_package="/tmp/wazuh-install-files/chrome.rpm" + curl -so "${chrome_package}" https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm + eval "yum install ${chrome_package} -y ${debug}" + + if [ "${PIPESTATUS[0]}" != 0 ]; then + installCommon_checkOptionalInstallation + fi + + elif [ "${sys_type}" == "apt-get" ]; then + chrome_package="/tmp/wazuh-install-files/chrome.deb" + curl -so "${chrome_package}" https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb + installCommon_aptInstall "${chrome_package}" + + if [ "${install_result}" != 0 ]; then + installCommon_checkOptionalInstallation + fi fi - + } function installCommon_installPrerequisites() { From 372c835c095700ad29c123e59bd055a6b272fabb Mon Sep 17 00:00:00 2001 From: DFolchA Date: Thu, 2 Mar 2023 16:52:37 +0100 Subject: [PATCH 294/328] Add removal of indexer remaining files --- unattended_installer/install_functions/installCommon.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/unattended_installer/install_functions/installCommon.sh b/unattended_installer/install_functions/installCommon.sh index c9bf605806..94abea3bd7 100644 --- a/unattended_installer/install_functions/installCommon.sh +++ b/unattended_installer/install_functions/installCommon.sh @@ -21,6 +21,7 @@ function installCommon_cleanExit() { if [[ "${rollback_conf}" =~ [N|n] ]]; then exit 1 else + common_checkInstalled installCommon_rollBack exit 1 fi From f3c83e6957fb434dc0259a15bf4d11cfbd746c4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Correa=20Rodr=C3=ADguez?= Date: Wed, 15 Mar 2023 10:05:46 +0100 Subject: [PATCH 295/328] Added common_curl to the Chrome package --- .../install_functions/installCommon.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/unattended_installer/install_functions/installCommon.sh b/unattended_installer/install_functions/installCommon.sh index f9bd08e89c..c6a03b3862 100644 --- a/unattended_installer/install_functions/installCommon.sh +++ b/unattended_installer/install_functions/installCommon.sh @@ -277,11 +277,13 @@ function installCommon_checkChromium() { if [ "${sys_type}" == "yum" ]; then if (! yum list installed 2>/dev/null | grep -q -E ^"google-chrome-stable"\\.) && (! yum list installed 2>/dev/null | grep -q -E ^"chromium"\\.); then - dashboard_dependencies=(chromium) - fi - if [ "${DIST_NAME}" == "amzn" ]; then - installCommon_installChrome + if [ "${DIST_NAME}" == "amzn" ]; then + installCommon_installChrome + else + dashboard_dependencies=(chromium) + fi fi + elif [ "${sys_type}" == "apt-get" ]; then if (! apt list --installed 2>/dev/null | grep -q -E ^"google-chrome-stable"\/) && (! apt list --installed 2>/dev/null | grep -q -E ^"chromium-browser"\/); then @@ -352,7 +354,7 @@ function installCommon_installChrome() { if [ "${sys_type}" == "yum" ]; then chrome_package="/tmp/wazuh-install-files/chrome.rpm" - curl -so "${chrome_package}" https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm + common_curl -so "${chrome_package}" https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm --max-time 100 --retry 5 --retry-delay 5 --fail eval "yum install ${chrome_package} -y ${debug}" if [ "${PIPESTATUS[0]}" != 0 ]; then @@ -361,7 +363,7 @@ function installCommon_installChrome() { elif [ "${sys_type}" == "apt-get" ]; then chrome_package="/tmp/wazuh-install-files/chrome.deb" - curl -so "${chrome_package}" https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb + common_curl -so "${chrome_package}" https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb --max-time 100 --retry 5 --retry-delay 5 --fail installCommon_aptInstall "${chrome_package}" if [ "${install_result}" != 0 ]; then From ab70d44d097fc58b9e1ce59d2a3e2fe72522e915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Correa=20Rodr=C3=ADguez?= Date: Wed, 22 Mar 2023 17:20:35 +0100 Subject: [PATCH 296/328] Changed report generation warning --- unattended_installer/install_functions/dashboard.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unattended_installer/install_functions/dashboard.sh b/unattended_installer/install_functions/dashboard.sh index 66f0faa47a..a4ef2bbdf1 100644 --- a/unattended_installer/install_functions/dashboard.sh +++ b/unattended_installer/install_functions/dashboard.sh @@ -207,7 +207,7 @@ function dashboard_installReportDependencies() { fi if [ "${pdf_warning}" == 1 ]; then - common_logger -w "Dashboard dependencies skipped. PDF report generation may not work." + common_logger -w "Wazuh dashboard dependencies skipped. PDF report generation may not work." fi optional_installation=0 From af4063e5b2bc39bcce974249e9e2742b4599cebc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Turina?= Date: Tue, 14 Feb 2023 11:50:30 -0300 Subject: [PATCH 297/328] Remove var/db/agents directory (#2042) --- debs/SPECS/wazuh-manager/debian/postinst | 2 +- debs/SPECS/wazuh-manager/debian/preinst | 2 +- rpms/SPECS/wazuh-manager.spec | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/debs/SPECS/wazuh-manager/debian/postinst b/debs/SPECS/wazuh-manager/debian/postinst index 9d334e9cea..69166b6f54 100644 --- a/debs/SPECS/wazuh-manager/debian/postinst +++ b/debs/SPECS/wazuh-manager/debian/postinst @@ -54,7 +54,7 @@ case "$1" in # Remove/relocate existing SQLite databases rm -f ${DIR}/var/db/cluster.db* || true rm -f ${DIR}/var/db/.profile.db* || true - rm -f ${DIR}/var/db/agents/* || true + rm -rf ${DIR}/var/db/agents || true if [ -f ${DIR}/var/db/global.db ]; then mv ${DIR}/var/db/global.db ${DIR}/queue/db/ diff --git a/debs/SPECS/wazuh-manager/debian/preinst b/debs/SPECS/wazuh-manager/debian/preinst index 80ee3366ac..cdd048c4af 100644 --- a/debs/SPECS/wazuh-manager/debian/preinst +++ b/debs/SPECS/wazuh-manager/debian/preinst @@ -133,7 +133,7 @@ case "$1" in fi if [ -d ${DIR}/var/db/agents ]; then - rm -f ${DIR}/var/db/agents/* + rm -rf ${DIR}/var/db/agents fi # Remove plain-text agent information if exists diff --git a/rpms/SPECS/wazuh-manager.spec b/rpms/SPECS/wazuh-manager.spec index 2f6d7a6cbf..c3c5cfbafa 100644 --- a/rpms/SPECS/wazuh-manager.spec +++ b/rpms/SPECS/wazuh-manager.spec @@ -214,7 +214,7 @@ fi # Remove/relocate existing SQLite databases rm -f %{_localstatedir}/var/db/cluster.db* || true rm -f %{_localstatedir}/var/db/.profile.db* || true -rm -f %{_localstatedir}/var/db/agents/* || true +rm -rf %{_localstatedir}/var/db/agents || true if [ -f %{_localstatedir}/var/db/global.db ]; then mv %{_localstatedir}/var/db/global.db %{_localstatedir}/queue/db/ @@ -815,7 +815,6 @@ rm -fr %{buildroot} %attr(640, root, wazuh) %config(missingok) %{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/windows/* %dir %attr(750, root, wazuh) %{_localstatedir}/var %dir %attr(770, root, wazuh) %{_localstatedir}/var/db -%dir %attr(770, root, wazuh) %{_localstatedir}/var/db/agents %attr(660, root, wazuh) %{_localstatedir}/var/db/mitre.db %dir %attr(770, root, wazuh) %{_localstatedir}/var/download %dir %attr(770, wazuh, wazuh) %{_localstatedir}/var/multigroups From 8d7469e1f263001a4ebd7dc63ede661c05556835 Mon Sep 17 00:00:00 2001 From: DFolchA Date: Wed, 29 Mar 2023 09:50:50 +0200 Subject: [PATCH 298/328] Bump 4.4.1 --- CHANGELOG.md | 4 ++++ VERSION | 2 +- aix/SPECS/wazuh-agent-aix.spec | 4 +++- debs/SPECS/wazuh-agent/debian/changelog | 6 ++++++ debs/SPECS/wazuh-manager/debian/changelog | 6 ++++++ macos/specs/wazuh-agent.pkgproj | 4 ++-- rpms/SPECS/wazuh-agent.spec | 4 +++- rpms/SPECS/wazuh-manager.spec | 4 +++- solaris/solaris10/pkginfo | 6 +++--- stack/dashboard/deb/debian/changelog | 6 ++++++ stack/dashboard/rpm/wazuh-dashboard.spec | 2 ++ stack/indexer/deb/debian/changelog | 6 ++++++ stack/indexer/rpm/wazuh-indexer.spec | 2 ++ tests/unattended/unit/suites/test-common.sh | 4 ++-- tests/unattended/unit/suites/test-dashboard.sh | 2 +- unattended_installer/install_functions/installVariables.sh | 2 +- 16 files changed, 51 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a53a793b2..e50deafe1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log All notable changes to this project will be documented in this file. +## [v4.4.1] + +- https://github.com/wazuh/wazuh-packages/releases/tag/v4.4.1 + ## [v4.4.0] - https://github.com/wazuh/wazuh-packages/releases/tag/v4.4.0 diff --git a/VERSION b/VERSION index fdc6698807..cca25a93cd 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.4.0 +4.4.1 diff --git a/aix/SPECS/wazuh-agent-aix.spec b/aix/SPECS/wazuh-agent-aix.spec index b7f20146ba..937ce47f29 100644 --- a/aix/SPECS/wazuh-agent-aix.spec +++ b/aix/SPECS/wazuh-agent-aix.spec @@ -1,6 +1,6 @@ # Spec file for AIX systems Name: wazuh-agent -Version: 4.4.0 +Version: 4.4.1 Release: 1 License: GPL URL: https://www.wazuh.com/ @@ -290,6 +290,8 @@ rm -fr %{buildroot} %attr(750, root, wazuh) %{_localstatedir}/wodles/* %changelog +* Mon Apr 17 2023 support - 4.4.1 +- More info: https://documentation.wazuh.com/current/release-notes/ * Wed Jan 18 2023 support - 4.4.0 - More info: https://documentation.wazuh.com/current/release-notes/ * Thu Nov 10 2022 support - 4.3.10 diff --git a/debs/SPECS/wazuh-agent/debian/changelog b/debs/SPECS/wazuh-agent/debian/changelog index 7e15a89c8e..c6d2098849 100644 --- a/debs/SPECS/wazuh-agent/debian/changelog +++ b/debs/SPECS/wazuh-agent/debian/changelog @@ -1,3 +1,9 @@ +wazuh-agent (4.4.1-RELEASE) stable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/ + + -- Wazuh, Inc Mon, 17 Apr 2023 12:31:50 +0000 + wazuh-agent (4.4.0-RELEASE) stable; urgency=low * More info: https://documentation.wazuh.com/current/release-notes/ diff --git a/debs/SPECS/wazuh-manager/debian/changelog b/debs/SPECS/wazuh-manager/debian/changelog index 4a4b88017c..da8a25b747 100644 --- a/debs/SPECS/wazuh-manager/debian/changelog +++ b/debs/SPECS/wazuh-manager/debian/changelog @@ -1,3 +1,9 @@ +wazuh-manager (4.4.1-RELEASE) stable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/ + + -- Wazuh, Inc Mon, 17 Apr 2023 12:31:50 +0000 + wazuh-manager (4.4.0-RELEASE) stable; urgency=low * More info: https://documentation.wazuh.com/current/release-notes/ diff --git a/macos/specs/wazuh-agent.pkgproj b/macos/specs/wazuh-agent.pkgproj index 2193e709c7..074926ef93 100644 --- a/macos/specs/wazuh-agent.pkgproj +++ b/macos/specs/wazuh-agent.pkgproj @@ -812,7 +812,7 @@ USE_HFS+_COMPRESSION VERSION - 4.4.0-1 + 4.4.1-1 TYPE 0 @@ -1239,7 +1239,7 @@ NAME - wazuh-agent-4.4.0-1 + wazuh-agent-4.4.1-1 PAYLOAD_ONLY TREAT_MISSING_PRESENTATION_DOCUMENTS_AS_WARNING diff --git a/rpms/SPECS/wazuh-agent.spec b/rpms/SPECS/wazuh-agent.spec index 0d4a6bfb02..3a0de2dc8c 100644 --- a/rpms/SPECS/wazuh-agent.spec +++ b/rpms/SPECS/wazuh-agent.spec @@ -1,6 +1,6 @@ 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 -Version: 4.4.0 +Version: 4.4.1 Release: %{_release} License: GPL Group: System Environment/Daemons @@ -622,6 +622,8 @@ rm -fr %{buildroot} %changelog +* Mon Apr 17 2023 support - 4.4.1 +- More info: https://documentation.wazuh.com/current/release-notes/ * Wed Jan 18 2023 support - 4.4.0 - More info: https://documentation.wazuh.com/current/release-notes/ * Thu Nov 10 2022 support - 4.3.10 diff --git a/rpms/SPECS/wazuh-manager.spec b/rpms/SPECS/wazuh-manager.spec index c3c5cfbafa..854296bdfd 100644 --- a/rpms/SPECS/wazuh-manager.spec +++ b/rpms/SPECS/wazuh-manager.spec @@ -1,6 +1,6 @@ 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 -Version: 4.4.0 +Version: 4.4.1 Release: %{_release} License: GPL Group: System Environment/Daemons @@ -841,6 +841,8 @@ rm -fr %{buildroot} %changelog +* Mon Apr 17 2023 support - 4.4.1 +- More info: https://documentation.wazuh.com/current/release-notes/ * Wed Jan 18 2023 support - 4.4.0 - More info: https://documentation.wazuh.com/current/release-notes/ * Thu Nov 10 2022 support - 4.3.10 diff --git a/solaris/solaris10/pkginfo b/solaris/solaris10/pkginfo index 51597a91ea..56772f9a69 100644 --- a/solaris/solaris10/pkginfo +++ b/solaris/solaris10/pkginfo @@ -1,11 +1,11 @@ -NAME=Wazuh - Improved OSSEC agent for Intrusion Detection, File Integrity Monitoring, Policy Monitoring and Rootkits Detection. +NAME=Wazuh - Wazuh unifies historically separate functions into a single agent and platform architecture. Providing protection for public clouds, private clouds, and on-premise data centers. PKG="wazuh-agent" -VERSION="3.6.0" +VERSION="4.4.1" ARCH="i386" CLASSES="none" CATEGORY="system" VENDOR="Wazuh, Inc " -PSTAMP="31Aug2018" +PSTAMP="17March2023" EMAIL="info@wazuh.com" ISTATES="S s 1 2 3" RSTATES="S s 1 2 3" diff --git a/stack/dashboard/deb/debian/changelog b/stack/dashboard/deb/debian/changelog index 4bbab9becd..a010a57c4f 100644 --- a/stack/dashboard/deb/debian/changelog +++ b/stack/dashboard/deb/debian/changelog @@ -1,3 +1,9 @@ +wazuh-dashboard (4.4.1-RELEASE) stable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/ + + -- Wazuh, Inc Mon, 17 Apr 2023 12:31:50 +0000 + wazuh-dashboard (4.4.0-RELEASE) stable; urgency=low * More info: https://documentation.wazuh.com/current/release-notes/ diff --git a/stack/dashboard/rpm/wazuh-dashboard.spec b/stack/dashboard/rpm/wazuh-dashboard.spec index 7bd5126632..9802d8195e 100644 --- a/stack/dashboard/rpm/wazuh-dashboard.spec +++ b/stack/dashboard/rpm/wazuh-dashboard.spec @@ -397,6 +397,8 @@ rm -fr %{buildroot} %attr(640, root, root) "/etc/systemd/system/wazuh-dashboard.service" %changelog +* Mon Apr 17 2023 support - 4.4.1 +- More info: https://documentation.wazuh.com/current/release-notes/ * Wed Jan 18 2023 support - 4.4.0 - More info: https://documentation.wazuh.com/current/release-notes/ * Thu Nov 10 2022 support - 4.3.10 diff --git a/stack/indexer/deb/debian/changelog b/stack/indexer/deb/debian/changelog index d8f43a0fbc..8be4ebbd57 100644 --- a/stack/indexer/deb/debian/changelog +++ b/stack/indexer/deb/debian/changelog @@ -1,3 +1,9 @@ +wazuh-indexer (4.4.1-RELEASE) stable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/ + + -- Wazuh, Inc Mon, 17 Apr 2023 12:31:50 +0000 + wazuh-indexer (4.4.0-RELEASE) stable; urgency=low * More info: https://documentation.wazuh.com/current/release-notes/ diff --git a/stack/indexer/rpm/wazuh-indexer.spec b/stack/indexer/rpm/wazuh-indexer.spec index 9bfd35c114..724a019ceb 100755 --- a/stack/indexer/rpm/wazuh-indexer.spec +++ b/stack/indexer/rpm/wazuh-indexer.spec @@ -1364,6 +1364,8 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/jdk/lib/security/blocked.certs %changelog +* Mon Apr 17 2023 support - 4.4.1 +- More info: https://documentation.wazuh.com/current/release-notes/ * Wed Jan 18 2023 support - 4.4.0 - More info: https://documentation.wazuh.com/current/release-notes/ * Thu Nov 10 2022 support - 4.3.10 diff --git a/tests/unattended/unit/suites/test-common.sh b/tests/unattended/unit/suites/test-common.sh index eef4ea8053..f27c4ae714 100644 --- a/tests/unattended/unit/suites/test-common.sh +++ b/tests/unattended/unit/suites/test-common.sh @@ -61,7 +61,7 @@ test-04-common_checkInstalled-all-installed-yum() { @mocktrue yum list installed - @mock grep wazuh-manager === @echo wazuh-manager.x86_64 4.4.0-1 @wazuh + @mock grep wazuh-manager === @echo wazuh-manager.x86_64 4.4.1-1 @wazuh @mkdir /var/ossec @mock grep wazuh-indexer === @echo wazuh-indexer.x86_64 1.13.2-1 @wazuh @@ -105,7 +105,7 @@ test-04-common_checkInstalled-all-installed-yum() { } test-05-common_checkInstalled-all-installed-yum-assert() { - @echo "wazuh-manager.x86_64 4.4.0-1 @wazuh" + @echo "wazuh-manager.x86_64 4.4.1-1 @wazuh" @echo 1 @echo "wazuh-indexer.x86_64 1.13.2-1 @wazuh" diff --git a/tests/unattended/unit/suites/test-dashboard.sh b/tests/unattended/unit/suites/test-dashboard.sh index 236087f373..26be259fd7 100644 --- a/tests/unattended/unit/suites/test-dashboard.sh +++ b/tests/unattended/unit/suites/test-dashboard.sh @@ -6,7 +6,7 @@ source "${base_dir}"/bach.sh @setup-test { @ignore common_logger k_certs_path="/etc/wazuh-dashboard/certs/" - wazuh_version="4.4.0" + wazuh_version="4.4.1" elasticsearch_oss_version="7.10.2" wazuh_kibana_plugin_revision="1" repobaseurl="https://packages.wazuh.com/4.x" diff --git a/unattended_installer/install_functions/installVariables.sh b/unattended_installer/install_functions/installVariables.sh index 948de99da5..77a8c500a7 100644 --- a/unattended_installer/install_functions/installVariables.sh +++ b/unattended_installer/install_functions/installVariables.sh @@ -8,7 +8,7 @@ ## Package vars readonly wazuh_major="4.4" -readonly wazuh_version="4.4.0" +readonly wazuh_version="4.4.1" readonly filebeat_version="7.10.2" readonly wazuh_install_vesion="0.1" From de8e25767b2350bac98d2c65e9865406cdf13351 Mon Sep 17 00:00:00 2001 From: DFolchA Date: Fri, 31 Mar 2023 09:39:36 +0200 Subject: [PATCH 299/328] Add darwin 22 SCA files to specs --- debs/SPECS/wazuh-manager/debian/rules | 2 ++ macos/package_files/build.sh | 3 ++- rpms/SPECS/wazuh-manager.spec | 4 +++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/debs/SPECS/wazuh-manager/debian/rules b/debs/SPECS/wazuh-manager/debian/rules index a028f0be3a..4a1b9a340a 100644 --- a/debs/SPECS/wazuh-manager/debian/rules +++ b/debs/SPECS/wazuh-manager/debian/rules @@ -128,6 +128,7 @@ override_dh_install: mkdir -p ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/darwin/19 mkdir -p ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/darwin/20 mkdir -p ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/darwin/21 + mkdir -p ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/darwin/22 mkdir -p ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/debian/7 mkdir -p ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/debian/8 mkdir -p ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/debian/9 @@ -166,6 +167,7 @@ override_dh_install: cp etc/templates/config/darwin/18/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/darwin/19 cp etc/templates/config/darwin/20/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/darwin/20 cp etc/templates/config/darwin/21/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/darwin/21 + cp etc/templates/config/darwin/21/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/darwin/22 cp etc/templates/config/debian/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/debian cp etc/templates/config/debian/7/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/debian/7 diff --git a/macos/package_files/build.sh b/macos/package_files/build.sh index 82ce85de6a..9f256c285b 100755 --- a/macos/package_files/build.sh +++ b/macos/package_files/build.sh @@ -60,7 +60,7 @@ function build() { find ${SOURCES_PATH}/src/init/ -name *.sh -type f -exec install -m 0640 {} ${INSTALLATION_SCRIPTS_DIR}/src/init \; mkdir -p ${INSTALLATION_SCRIPTS_DIR}/sca/generic - mkdir -p ${INSTALLATION_SCRIPTS_DIR}/sca/darwin/{15,16,17,18,20,21} + mkdir -p ${INSTALLATION_SCRIPTS_DIR}/sca/darwin/{15,16,17,18,20,21,22} cp -r ${SOURCES_PATH}/ruleset/sca/darwin ${INSTALLATION_SCRIPTS_DIR}/sca cp -r ${SOURCES_PATH}/ruleset/sca/generic ${INSTALLATION_SCRIPTS_DIR}/sca @@ -72,6 +72,7 @@ function build() { cp ${SOURCES_PATH}/etc/templates/config/darwin/19/sca.files ${INSTALLATION_SCRIPTS_DIR}/sca/darwin/19/ cp ${SOURCES_PATH}/etc/templates/config/darwin/20/sca.files ${INSTALLATION_SCRIPTS_DIR}/sca/darwin/20/ cp ${SOURCES_PATH}/etc/templates/config/darwin/21/sca.files ${INSTALLATION_SCRIPTS_DIR}/sca/darwin/21/ + cp ${SOURCES_PATH}/etc/templates/config/darwin/21/sca.files ${INSTALLATION_SCRIPTS_DIR}/sca/darwin/22/ cp ${SOURCES_PATH}/src/VERSION ${INSTALLATION_SCRIPTS_DIR}/src/ cp ${SOURCES_PATH}/src/REVISION ${INSTALLATION_SCRIPTS_DIR}/src/ diff --git a/rpms/SPECS/wazuh-manager.spec b/rpms/SPECS/wazuh-manager.spec index 854296bdfd..5f5f0040c5 100644 --- a/rpms/SPECS/wazuh-manager.spec +++ b/rpms/SPECS/wazuh-manager.spec @@ -108,7 +108,7 @@ mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/packages_files/manager_installation_ mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/{applications,generic} mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/amzn/{1,2} mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/centos/{8,7,6,5} -mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/darwin/{15,16,17,18,19,20,21} +mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/darwin/{15,16,17,18,19,20,21,22} mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/debian/{7,8,9} mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/ubuntu/{12,14,16,18,20,22}/04 mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/rhel/{9,8,7,6,5} @@ -776,6 +776,8 @@ rm -fr %{buildroot} %attr(640, root, wazuh) %config(missingok) %{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/darwin/20/* %dir %attr(750, wazuh, wazuh) %config(missingok) %{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/darwin/21 %attr(640, root, wazuh) %config(missingok) %{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/darwin/21/* +%dir %attr(750, wazuh, wazuh) %config(missingok) %{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/darwin/22 +%attr(640, root, wazuh) %config(missingok) %{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/darwin/22/* %dir %attr(750, wazuh, wazuh) %config(missingok) %{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/debian %attr(640, root, wazuh) %config(missingok) %{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/debian/* %dir %attr(750, wazuh, wazuh) %config(missingok) %{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/rhel From 1a05c2822b0e42a01d5df34f7ffc232605666f37 Mon Sep 17 00:00:00 2001 From: DFolchA Date: Fri, 31 Mar 2023 12:00:24 +0200 Subject: [PATCH 300/328] Add debian 11 sca templates --- debs/SPECS/wazuh-agent/debian/rules | 4 ++++ debs/SPECS/wazuh-manager/debian/rules | 4 ++++ rpms/SPECS/wazuh-manager.spec | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/debs/SPECS/wazuh-agent/debian/rules b/debs/SPECS/wazuh-agent/debian/rules index 731df3ae6f..41fd65fabe 100644 --- a/debs/SPECS/wazuh-agent/debian/rules +++ b/debs/SPECS/wazuh-agent/debian/rules @@ -103,6 +103,8 @@ override_dh_install: mkdir -p ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/debian/7 mkdir -p ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/debian/8 mkdir -p ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/debian/9 + mkdir -p ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/debian/10 + mkdir -p ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/debian/11 mkdir -p ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/ubuntu/12/04 mkdir -p ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/ubuntu/14/04 mkdir -p ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/ubuntu/16/04 @@ -119,6 +121,8 @@ override_dh_install: cp etc/templates/config/debian/7/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/debian/7 cp etc/templates/config/debian/8/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/debian/8 cp etc/templates/config/debian/9/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/debian/9 + cp etc/templates/config/debian/10/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/debian/10 + cp etc/templates/config/debian/11/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/debian/11 cp etc/templates/config/ubuntu/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/ubuntu cp etc/templates/config/ubuntu/12/04/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/ubuntu/12/04 diff --git a/debs/SPECS/wazuh-manager/debian/rules b/debs/SPECS/wazuh-manager/debian/rules index a028f0be3a..639911f5e1 100644 --- a/debs/SPECS/wazuh-manager/debian/rules +++ b/debs/SPECS/wazuh-manager/debian/rules @@ -131,6 +131,8 @@ override_dh_install: mkdir -p ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/debian/7 mkdir -p ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/debian/8 mkdir -p ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/debian/9 + mkdir -p ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/debian/10 + mkdir -p ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/debian/11 mkdir -p ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/rhel/5 mkdir -p ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/rhel/6 mkdir -p ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/rhel/7 @@ -171,6 +173,8 @@ override_dh_install: cp etc/templates/config/debian/7/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/debian/7 cp etc/templates/config/debian/8/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/debian/8 cp etc/templates/config/debian/9/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/debian/9 + cp etc/templates/config/debian/10/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/debian/10 + cp etc/templates/config/debian/11/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/debian/11 cp etc/templates/config/centos/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/centos cp etc/templates/config/centos/5/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/centos/5 diff --git a/rpms/SPECS/wazuh-manager.spec b/rpms/SPECS/wazuh-manager.spec index 854296bdfd..537a4e0d64 100644 --- a/rpms/SPECS/wazuh-manager.spec +++ b/rpms/SPECS/wazuh-manager.spec @@ -109,7 +109,7 @@ mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/{a mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/amzn/{1,2} mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/centos/{8,7,6,5} mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/darwin/{15,16,17,18,19,20,21} -mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/debian/{7,8,9} +mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/debian/{7,8,9,10,11} mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/ubuntu/{12,14,16,18,20,22}/04 mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/rhel/{9,8,7,6,5} mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/sles/{11,12,15} From ea87e1b7e1cbae65a0ad77c09da80f4ca5f72302 Mon Sep 17 00:00:00 2001 From: c-bordon Date: Mon, 3 Apr 2023 11:49:01 -0300 Subject: [PATCH 301/328] Changed to Opensearch 2.6.0 --- stack/dashboard/base/builder.sh | 2 +- stack/dashboard/rpm/docker/x86_64/Dockerfile | 7 +- stack/indexer/base/builder.sh | 2 +- stack/indexer/deb/build_package.sh | 26 +- stack/indexer/deb/debian/rules | 447 ++++++++++--------- stack/indexer/deb/docker/amd64/Dockerfile | 4 + stack/indexer/rpm/build_package.sh | 26 +- stack/indexer/rpm/wazuh-indexer.spec | 442 +++++++++--------- 8 files changed, 503 insertions(+), 453 deletions(-) diff --git a/stack/dashboard/base/builder.sh b/stack/dashboard/base/builder.sh index 589291a4bf..9180c092ea 100755 --- a/stack/dashboard/base/builder.sh +++ b/stack/dashboard/base/builder.sh @@ -16,7 +16,7 @@ revision="$2" future="$3" repository="$4" reference="$5" -opensearch_version="2.4.1" +opensearch_version="2.6.0" base_dir=/opt/wazuh-dashboard-base # ----------------------------------------------------------------------------- diff --git a/stack/dashboard/rpm/docker/x86_64/Dockerfile b/stack/dashboard/rpm/docker/x86_64/Dockerfile index 169d380032..a41bd3c320 100644 --- a/stack/dashboard/rpm/docker/x86_64/Dockerfile +++ b/stack/dashboard/rpm/docker/x86_64/Dockerfile @@ -6,7 +6,12 @@ RUN yum install -y openssh-clients sudo gnupg \ yum-utils epel-release redhat-rpm-config rpm-devel \ zlib zlib-devel rpm-build autoconf automake \ glibc-devel libtool perl - + +RUN yum install -y https://repo.ius.io/ius-release-el$(rpm -E '%{rhel}').rpm + +RUN yum update -y && yum install -y python3 + +RUN ln -fs /usr/bin/python3.6 /usr/bin/python # Add the scripts to build the RPM package ADD builder.sh /usr/local/bin/builder diff --git a/stack/indexer/base/builder.sh b/stack/indexer/base/builder.sh index 304dfa9525..14c413e603 100644 --- a/stack/indexer/base/builder.sh +++ b/stack/indexer/base/builder.sh @@ -16,7 +16,7 @@ architecture="$1" revision="$2" future="$3" reference="$4" -opensearch_version="2.4.1" +opensearch_version="2.6.0" base_dir=/opt/wazuh-indexer-base # ----------------------------------------------------------------------------- diff --git a/stack/indexer/deb/build_package.sh b/stack/indexer/deb/build_package.sh index 1f7c9e1b3c..b5032d0760 100755 --- a/stack/indexer/deb/build_package.sh +++ b/stack/indexer/deb/build_package.sh @@ -17,6 +17,7 @@ deb_amd64_builder="deb_indexer_builder_amd64" deb_builder_dockerfile="${current_path}/docker" future="no" base_cmd="" +build_base="yes" trap ctrl_c INT @@ -40,14 +41,16 @@ build_deb() { # Copy the necessary files cp ${current_path}/builder.sh ${dockerfile_path} - # Base generation - if [ "${future}" == "yes" ];then - base_cmd+="--future " + if [ "${build_base}" == "yes" ];then + # Base generation + if [ "${future}" == "yes" ];then + base_cmd+="--future " + fi + if [ "${reference}" ];then + base_cmd+="--reference ${reference}" + fi + ../base/generate_base.sh -s ${outdir} -r ${revision} ${base_cmd} fi - if [ "${reference}" ];then - base_cmd+="--reference ${reference}" - fi - ../base/generate_base.sh -s ${outdir} -r ${revision} ${base_cmd} # Build the Docker image if [[ ${build_docker} == "yes" ]]; then @@ -94,6 +97,7 @@ help() { echo "Usage: $0 [OPTIONS]" echo echo " -a, --architecture [Optional] Target architecture of the package [amd64]." + echo " -b, --build-base [Optional] Build a new base or use a existing one. By default, yes." echo " -r, --revision [Optional] Package revision. By default: 1." echo " -s, --store [Optional] Set the destination path of package. By default, an output folder will be created." echo " --reference [Optional] wazuh-packages branch to download SPECs, not used by default." @@ -120,6 +124,14 @@ main() { help 1 fi ;; + "-b"|"--build-base") + if [ -n "${2}" ]; then + build_base="${2}" + shift 2 + else + help 1 + fi + ;; "-r"|"--revision") if [ -n "${2}" ]; then revision="${2}" diff --git a/stack/indexer/deb/debian/rules b/stack/indexer/deb/debian/rules index a00d30a45e..e23a8f3383 100644 --- a/stack/indexer/deb/debian/rules +++ b/stack/indexer/deb/debian/rules @@ -153,7 +153,7 @@ override_dh_fixperms: chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/bin/performance-analyzer-rca chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/bin/performance-analyzer-agent chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/performance-analyzer-rca-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/performance-analyzer-rca-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/sqlite-jdbc-3.32.3.2.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/log4j-api-2.17.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/j2objc-annotations-1.3.jar @@ -169,36 +169,36 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/bcpkix-jdk15on-1.70.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/bcprov-jdk15on-1.70.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/bcutil-jdk15on-1.70.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/grpc-api-1.49.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/grpc-context-1.49.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/grpc-core-1.49.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/grpc-netty-1.49.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/grpc-protobuf-1.49.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/grpc-protobuf-lite-1.49.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/grpc-stub-1.49.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/gson-2.9.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/guava-31.1-android.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/jackson-annotations-2.13.4.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/jackson-core-2.13.4.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/jackson-databind-2.13.4.2.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/netty-buffer-4.1.79.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/netty-codec-4.1.77.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/netty-codec-http-4.1.77.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/netty-codec-http2-4.1.77.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/netty-codec-socks-4.1.77.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/netty-common-4.1.79.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/netty-handler-4.1.77.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/netty-handler-proxy-4.1.77.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/netty-resolver-4.1.79.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/netty-transport-4.1.79.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/netty-transport-native-unix-common-4.1.79.Final.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/perfmark-api-0.25.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/performance-analyzer-rca-2.4.1.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/protobuf-java-3.21.8.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/performance-analyzer-rca-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/proto-google-common-protos-2.9.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/animal-sniffer-annotations-1.21.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/checker-qual-3.12.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/error_prone_annotations-2.14.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/grpc-api-1.52.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/grpc-context-1.52.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/grpc-core-1.52.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/grpc-netty-1.52.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/grpc-protobuf-1.52.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/grpc-protobuf-lite-1.52.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/grpc-stub-1.52.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/jackson-annotations-2.14.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/jackson-core-2.14.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/jackson-databind-2.14.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/netty-buffer-4.1.86.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/netty-codec-4.1.86.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/netty-codec-http-4.1.86.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/netty-codec-http2-4.1.86.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/netty-codec-socks-4.1.86.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/netty-common-4.1.86.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/netty-handler-4.1.86.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/netty-handler-proxy-4.1.86.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/netty-resolver-4.1.86.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/netty-transport-4.1.86.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/netty-transport-native-unix-common-4.1.86.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/protobuf-java-3.21.12.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/config chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/config/agent-stats-metadata chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/config/log4j2.xml @@ -226,56 +226,57 @@ override_dh_fixperms: chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/bin/opensearch-performance-analyzer/performance-analyzer-agent-cli chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/lib chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/hppc-0.8.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/opensearch-geo-2.4.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/opensearch-cli-2.4.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/java-version-checker-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/opensearch-geo-2.6.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/opensearch-cli-2.6.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/opensearch-common-2.6.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/java-version-checker-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/log4j-api-2.17.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/snakeyaml-1.32.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/opensearch-x-content-2.4.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/opensearch-plugin-classloader-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/opensearch-x-content-2.6.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/opensearch-plugin-classloader-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/jna-5.5.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/log4j-core-2.17.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/log4j-jul-2.17.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/opensearch-launchers-2.4.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/opensearch-secure-sm-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/opensearch-launchers-2.6.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/opensearch-secure-sm-2.6.0.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/tools chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/tools/plugin-cli - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/tools/plugin-cli/bcpg-fips-1.0.5.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/tools/plugin-cli/opensearch-plugin-cli-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/tools/plugin-cli/opensearch-plugin-cli-2.6.0.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/tools/upgrade-cli - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/tools/upgrade-cli/opensearch-upgrade-cli-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/tools/upgrade-cli/opensearch-upgrade-cli-2.6.0.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/tools/keystore-cli - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/tools/keystore-cli/keystore-cli-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/tools/keystore-cli/keystore-cli-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/jts-core-1.15.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/opensearch-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/opensearch-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/t-digest-3.2.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/opensearch-core-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/opensearch-core-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/spatial4j-0.7.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/jackson-core-2.14.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/jackson-dataformat-cbor-2.14.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/jackson-dataformat-smile-2.14.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/jackson-dataformat-yaml-2.14.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/joda-time-2.10.12.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/jackson-core-2.14.2.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/jackson-dataformat-cbor-2.14.2.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/jackson-dataformat-smile-2.14.2.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/jackson-dataformat-yaml-2.14.2.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/joda-time-2.12.2.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/jopt-simple-5.0.4.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/HdrHistogram-2.1.12.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-analysis-common-9.4.2.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-backward-codecs-9.4.2.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-core-9.4.2.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-grouping-9.4.2.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-highlighter-9.4.2.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-join-9.4.2.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-memory-9.4.2.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-misc-9.4.2.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-queries-9.4.2.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-queryparser-9.4.2.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-sandbox-9.4.2.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-spatial-extras-9.4.2.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-spatial3d-9.4.2.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-suggest-9.4.2.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-analysis-common-9.5.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-backward-codecs-9.5.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-core-9.5.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-grouping-9.5.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-highlighter-9.5.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-join-9.5.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-memory-9.5.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-misc-9.5.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-queries-9.5.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-queryparser-9.5.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-sandbox-9.5.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-spatial-extras-9.5.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-spatial3d-9.5.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/lucene-suggest-9.5.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/snakeyaml-1.33.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/tools/plugin-cli/bc-fips-1.0.2.3.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/tools/upgrade-cli/jackson-annotations-2.14.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/tools/upgrade-cli/jackson-core-2.14.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/tools/upgrade-cli/jackson-databind-2.14.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/tools/plugin-cli/bcpg-fips-1.0.7.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/tools/upgrade-cli/jackson-annotations-2.14.2.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/tools/upgrade-cli/jackson-core-2.14.2.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/lib/tools/upgrade-cli/jackson-databind-2.14.2.jar chmod 750 $(TARGET_DIR)$(CONFIG_DIR)/opensearch-observability chmod 660 $(TARGET_DIR)$(CONFIG_DIR)/opensearch-observability/observability.yml chmod 750 $(TARGET_DIR)$(CONFIG_DIR)/opensearch-reports-scheduler @@ -315,42 +316,49 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/LICENSE.txt chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-observability - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-observability/opensearch-observability-2.4.1.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-observability/common-utils-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-observability/opensearch-observability-2.6.0.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-observability/common-utils-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-observability/kotlinx-coroutines-core-jvm-1.3.9.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-observability/plugin-descriptor.properties chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-observability/plugin-security.policy chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-observability/guava-31.0.1-jre.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-observability/kotlin-stdlib-1.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-observability/kotlin-stdlib-common-1.6.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-observability/jackson-annotations-2.14.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-observability/jackson-databind-2.14.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-observability/json-20220924.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-observability/json-base-2.2.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-observability/json-flattener-0.15.1.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-reports-scheduler chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-reports-scheduler/jsoup-1.15.3.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-reports-scheduler/json-flattener-0.1.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-reports-scheduler/common-utils-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-reports-scheduler/common-utils-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-reports-scheduler/json-20180813.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-reports-scheduler/kotlinx-coroutines-core-jvm-1.3.9.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-reports-scheduler/plugin-descriptor.properties chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-reports-scheduler/plugin-security.policy - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-reports-scheduler/opensearch-reports-scheduler-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-reports-scheduler/opensearch-reports-scheduler-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-reports-scheduler/gson-2.8.9.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-reports-scheduler/guava-31.0.1-jre.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-reports-scheduler/kotlin-stdlib-1.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-reports-scheduler/kotlin-stdlib-common-1.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-reports-scheduler/kotlin-test-1.6.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-reports-scheduler/jackson-annotations-2.14.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-reports-scheduler/jackson-databind-2.14.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-reports-scheduler/json-base-2.2.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-reports-scheduler/json-flattener-0.15.1.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/geo-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/geo-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/httpcore-nio-4.4.15.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/resilience4j-core-1.5.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/core-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/core-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/httpcore-nio-4.4.15.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/httpasyncclient-4.1.5.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/protocol-2.4.1.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/slf4j-api-1.7.30.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/protocol-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/druid-1.0.15.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/sql-2.4.1.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/opensearch-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/sql-2.6.0.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/opensearch-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/commons-lang3-3.10.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/reindex-client-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/reindex-client-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/gson-2.8.9.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/j2objc-annotations-1.3.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/jsr305-3.0.2.jar @@ -362,21 +370,21 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/plugin-descriptor.properties chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/LICENSE.txt chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/vavr-match-0.10.2.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/parent-join-client-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/parent-join-client-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/vavr-0.10.2.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/presto-matching-0.240.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/opensearch-rest-client-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/opensearch-rest-client-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/plugin-security.policy chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/httpclient-4.5.13.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/legacy-2.4.1.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/opensearch-ssl-config-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/legacy-2.6.0.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/opensearch-ssl-config-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/commons-codec-1.13.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/opensearch-sql-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/opensearch-sql-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/commons-math3-3.6.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/ppl-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/ppl-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/httpcore-4.4.15.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/failureaccess-1.0.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/common-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/common-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/ST4-4.0.8.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/antlr-runtime-3.5.2.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/antlr4-4.7.1.jar @@ -384,10 +392,8 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/error_prone_annotations-2.7.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/guava-31.0.1-jre.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/icu4j-58.2.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/jackson-annotations-2.14.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/jackson-databind-2.14.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/javax.json-1.0.4.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/opensearch-ml-client-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/opensearch-ml-client-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/org.abego.treelayout.core-1.0.3.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/spring-aop-5.3.22.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/spring-beans-5.3.22.jar @@ -395,7 +401,7 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/spring-core-5.3.22.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/spring-expression-5.3.22.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/spring-jcl-5.3.22.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/sql-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/sql-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/annotations-13.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/kotlin-reflect-1.4.30.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/kotlin-stdlib-1.6.0.jar @@ -404,13 +410,16 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/okhttp-4.9.3.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/okhttp-aws-signer-1.0.2.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/okio-jvm-2.8.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/prometheus-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/prometheus-2.6.0.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/jackson-annotations-2.14.2.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/jackson-databind-2.14.2.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/slf4j-api-1.7.36.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-cross-cluster-replication chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-cross-cluster-replication/ipaddress-5.3.3.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-cross-cluster-replication/common-utils-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-cross-cluster-replication/common-utils-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-cross-cluster-replication/annotations-13.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-cross-cluster-replication/plugin-descriptor.properties - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-cross-cluster-replication/opensearch-cross-cluster-replication-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-cross-cluster-replication/opensearch-cross-cluster-replication-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-cross-cluster-replication/kotlin-stdlib-1.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-cross-cluster-replication/kotlin-stdlib-common-1.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-cross-cluster-replication/kotlin-stdlib-jdk7-1.6.0.jar @@ -418,7 +427,7 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-cross-cluster-replication/kotlinx-coroutines-core-jvm-1.6.0.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-knn chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-knn/commons-lang-2.6.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-knn/opensearch-knn-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-knn/opensearch-knn-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-knn/plugin-descriptor.properties chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-knn/plugin-security.policy chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-knn/failureaccess-1.0.1.jar @@ -432,11 +441,11 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-knn/lib/libopensearchknn_nmslib.so chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-index-management chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-index-management/ipaddress-5.3.3.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-index-management/common-utils-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-index-management/common-utils-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-index-management/annotations-13.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-index-management/kotlinx-coroutines-core-jvm-1.3.9.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-index-management/plugin-descriptor.properties - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-index-management/opensearch-index-management-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-index-management/opensearch-index-management-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-index-management/plugin-security.policy chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-index-management/commons-codec-1.13.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-index-management/httpclient-4.5.13.jar @@ -444,13 +453,13 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-index-management/kotlin-stdlib-1.6.10.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-index-management/kotlin-stdlib-common-1.6.10.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-index-management/kotlin-stdlib-jdk7-1.6.10.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-index-management/opensearch-index-management-spi-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-index-management/opensearch-index-management-spi-2.6.0.0.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/sqlite-jdbc-3.32.3.2.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/j2objc-annotations-1.3.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/jsr305-3.0.2.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/opensearch-performance-analyzer-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/opensearch-performance-analyzer-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/plugin-descriptor.properties chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/annotations-4.1.1.4.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/plugin-security.policy @@ -462,40 +471,41 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/bcpkix-jdk15on-1.70.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/bcprov-jdk15on-1.70.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/bcutil-jdk15on-1.70.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/checker-qual-3.5.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/commons-lang3-3.12.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/error_prone_annotations-2.9.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/grpc-api-1.49.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/grpc-context-1.49.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/grpc-core-1.49.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/grpc-netty-1.49.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/grpc-protobuf-1.49.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/grpc-protobuf-lite-1.49.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/grpc-stub-1.49.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/gson-2.9.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/guava-30.1-jre.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/jackson-annotations-2.13.4.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/jackson-databind-2.13.4.2.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/jackson-module-paranamer-2.13.4.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/netty-buffer-4.1.79.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/netty-codec-4.1.79.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/netty-codec-http-4.1.79.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/netty-codec-http2-4.1.79.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/netty-codec-socks-4.1.79.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/netty-common-4.1.79.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/netty-handler-4.1.79.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/netty-handler-proxy-4.1.79.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/netty-resolver-4.1.79.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/netty-transport-4.1.79.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/netty-transport-native-unix-common-4.1.79.Final.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/perfmark-api-0.25.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/performanceanalyzer-rca-2.4.1.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/protobuf-java-3.21.8.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/performanceanalyzer-rca-2.6.0.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/protobuf-java-3.21.12.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/proto-google-common-protos-2.9.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/checker-qual-3.29.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/grpc-api-1.52.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/grpc-context-1.52.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/grpc-core-1.52.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/grpc-netty-1.52.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/grpc-protobuf-1.52.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/grpc-protobuf-lite-1.52.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/grpc-stub-1.52.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/guava-31.1-jre.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/jackson-annotations-2.14.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/jackson-databind-2.14.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/jackson-module-paranamer-2.14.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/netty-buffer-4.1.87.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/netty-codec-4.1.87.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/netty-codec-http-4.1.87.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/netty-codec-http2-4.1.87.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/netty-codec-socks-4.1.87.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/netty-common-4.1.87.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/netty-handler-4.1.87.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/netty-handler-proxy-4.1.87.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/netty-resolver-4.1.87.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/netty-transport-4.1.87.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/netty-transport-native-unix-common-4.1.87.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/protobuf-java-3.21.12.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-job-scheduler - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-job-scheduler/opensearch-job-scheduler-spi-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-job-scheduler/opensearch-job-scheduler-spi-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-job-scheduler/plugin-descriptor.properties - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-job-scheduler/opensearch-job-scheduler-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-job-scheduler/opensearch-job-scheduler-2.6.0.0.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/opensaml-saml-api-3.4.5.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/commons-codec-1.14.jar @@ -505,23 +515,23 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/jakarta.activation-1.2.2.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/commons-logging-1.2.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/json-path-2.4.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/aggs-matrix-stats-client-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/aggs-matrix-stats-client-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/httpcore-nio-4.4.15.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/httpasyncclient-4.1.5.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/lang-mustache-client-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/lang-mustache-client-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/bcprov-jdk15on-1.67.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/json-flattener-0.5.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/cxf-rt-rs-json-basic-3.4.5.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/cxf-rt-rs-json-basic-3.5.5.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/opensaml-xmlsec-impl-3.4.5.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/txw2-2.3.4.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/cxf-core-3.4.5.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/cxf-core-3.5.5.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/metrics-core-3.1.2.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/opensaml-soap-impl-3.4.5.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/jsr305-3.0.2.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/opensaml-messaging-api-3.4.5.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/opensaml-storage-api-3.4.5.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/commons-lang-2.4.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/mapper-extras-client-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/mapper-extras-client-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/jakarta.xml.bind-api-2.3.3.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/opensaml-saml-impl-3.4.5.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/java-saml-core-2.5.0.jar @@ -530,14 +540,14 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/commons-lang3-3.4.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/lz4-java-1.7.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/plugin-descriptor.properties - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/rank-eval-client-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/rank-eval-client-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/ldaptive-1.2.3.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/opensearch-security-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/opensearch-security-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/woodstox-core-6.4.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/eventbus-3.2.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/istack-commons-runtime-3.0.12.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/asm-9.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/parent-join-client-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/parent-join-client-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/json-smart-2.4.7.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/xmlsec-2.2.3.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/tools @@ -550,18 +560,18 @@ override_dh_fixperms: chmod 740 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/tools/wazuh-passwords-tool.sh chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/xmlschema-core-2.2.5.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/httpclient-cache-4.5.13.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/transport-netty4-client-2.4.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/opensearch-rest-client-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/transport-netty4-client-2.6.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/opensearch-rest-client-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/plugin-security.policy chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/opensaml-xmlsec-api-3.4.5.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/httpclient-4.5.13.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/zjsonpatch-0.4.4.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/accessors-smart-2.4.7.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/opensearch-rest-high-level-client-2.4.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/cxf-rt-security-3.4.5.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/opensearch-rest-high-level-client-2.6.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/cxf-rt-security-3.5.5.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/java-support-7.5.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/stax2-api-4.2.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/cxf-rt-rs-security-jose-3.4.5.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/cxf-rt-rs-security-jose-3.5.5.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/opensaml-profile-api-3.4.5.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/jaxb-runtime-2.3.4.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/opensaml-security-impl-3.4.5.jar @@ -577,28 +587,28 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/failureaccess-1.0.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/guava-30.0-jre.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/j2objc-annotations-1.3.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/jackson-annotations-2.14.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/jackson-annotations-2.14.2.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/jjwt-api-0.10.8.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/jjwt-impl-0.10.8.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/jjwt-jackson-0.10.8.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/netty-buffer-4.1.84.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/netty-codec-4.1.84.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/netty-codec-http-4.1.84.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/netty-common-4.1.84.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/netty-handler-4.1.84.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/netty-resolver-4.1.84.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/netty-transport-4.1.84.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/netty-transport-native-unix-common-4.1.84.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/netty-buffer-4.1.87.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/netty-codec-4.1.87.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/netty-codec-http-4.1.87.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/netty-common-4.1.87.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/netty-handler-4.1.87.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/netty-resolver-4.1.87.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/netty-transport-4.1.87.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/netty-transport-native-unix-common-4.1.87.Final.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/slf4j-api-1.7.30.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/snappy-java-1.1.8.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/zstd-jni-1.5.0-2.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/jackson-databind-2.14.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/jackson-databind-2.14.2.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/kafka-clients-3.0.2.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security/bcpkix-jdk15on-1.70.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security-analytics chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security-analytics/antlr4-runtime-4.10.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security-analytics/common-utils-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security-analytics/common-utils-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security-analytics/commons-codec-1.15.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security-analytics/commons-lang3-3.12.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security-analytics/commons-logging-1.2.jar @@ -608,21 +618,21 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security-analytics/httpcore-4.4.15.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security-analytics/httpcore-nio-4.4.15.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security-analytics/kotlin-stdlib-1.6.10.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security-analytics/opensearch-rest-client-2.4.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security-analytics/opensearch-security-analytics-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security-analytics/opensearch-rest-client-2.6.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security-analytics/opensearch-security-analytics-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security-analytics/plugin-descriptor.properties chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-security-analytics/plugin-security.policy chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-neural-search chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-neural-search/LICENSE.txt chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-neural-search/NOTICE.txt chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-neural-search/commons-lang3-3.10.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-neural-search/opensearch-ml-client-2.4.1.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-neural-search/opensearch-neural-search-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-neural-search/opensearch-ml-client-2.6.0.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-neural-search/opensearch-neural-search-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-neural-search/plugin-descriptor.properties chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-neural-search/plugin-security.policy chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-asynchronous-search - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-asynchronous-search/opensearch-asynchronous-search-2.4.1.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-asynchronous-search/common-utils-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-asynchronous-search/opensearch-asynchronous-search-2.6.0.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-asynchronous-search/common-utils-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-asynchronous-search/plugin-descriptor.properties chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-asynchronous-search/plugin-security.policy chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection @@ -631,15 +641,15 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/httpcore-nio-4.4.15.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/httpasyncclient-4.1.5.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/gson-2.8.9.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/common-utils-2.4.1.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/opensearch-anomaly-detection-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/common-utils-2.6.0.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/opensearch-anomaly-detection-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/org.jacoco.ant-0.8.5.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/commons-pool2-2.10.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/sketches-core-0.13.4.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/org.jacoco.agent-0.8.5.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/plugin-descriptor.properties chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/memory-0.12.2.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/opensearch-rest-client-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/opensearch-rest-client-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/plugin-security.policy chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/httpclient-4.5.13.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/commons-codec-1.15.jar @@ -647,8 +657,8 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/httpcore-4.4.15.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/failureaccess-1.0.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/guava-31.0.1-jre.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/jackson-annotations-2.14.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/jackson-databind-2.14.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/jackson-annotations-2.14.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/jackson-databind-2.14.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/javassist-3.28.0-GA.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/protostuff-api-1.8.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-anomaly-detection/protostuff-collectionschema-1.8.0.jar @@ -662,10 +672,10 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-geospatial/LICENSE.txt chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-geospatial/NOTICE.txt chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-geospatial/commons-lang3-3.12.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-geospatial/opensearch-geospatial-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-geospatial/opensearch-geospatial-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-geospatial/plugin-descriptor.properties - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-geospatial/geo-2.4.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-geospatial/h3-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-geospatial/geo-2.6.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-geospatial/h3-2.6.0.0.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/error_prone_annotations-2.3.4.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/httpcore-nio-4.4.15.jar @@ -674,7 +684,7 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/slf4j-api-1.7.30.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/ipaddress-5.3.3.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/j2objc-annotations-1.3.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/common-utils-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/common-utils-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/jsr305-3.0.2.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/javax.el-3.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/javassist-3.27.0-GA.jar @@ -683,13 +693,13 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/annotations-13.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/guava-30.0-jre.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/plugin-descriptor.properties - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/alerting-core-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/alerting-core-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/google-java-format-1.10.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/checker-qual-3.5.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/opensearch-rest-client-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/opensearch-rest-client-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/plugin-security.policy chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/httpclient-4.5.13.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/opensearch-alerting-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/opensearch-alerting-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/kotlinx-coroutines-core-common-1.1.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/commons-codec-1.13.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/httpcore-4.4.15.jar @@ -702,10 +712,10 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/kotlin-stdlib-common-1.6.10.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/kotlin-stdlib-jdk7-1.6.10.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/kotlin-stdlib-jdk8-1.6.10.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/percolator-client-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/percolator-client-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-alerting/commons-logging-1.2.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/common-utils-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/common-utils-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/commons-beanutils-1.9.4.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/commons-codec-1.15.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/commons-collections-3.2.2.jar @@ -724,8 +734,8 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/httpclient-4.5.13.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/httpcore-4.4.15.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/httpcore-nio-4.4.15.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/jackson-annotations-2.14.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/jackson-databind-2.14.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/jackson-annotations-2.14.2.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/jackson-databind-2.14.2.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/jansi-2.4.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/javassist-3.26.0-GA.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/jline-builtins-3.21.0.jar @@ -737,10 +747,10 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/olcut-config-protobuf-5.2.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/olcut-core-5.2.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/opencsv-5.4.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/opensearch-ml-2.4.1.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/opensearch-ml-algorithms-2.4.1.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/opensearch-ml-common-2.4.1.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/opensearch-rest-client-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/opensearch-ml-2.6.0.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/opensearch-ml-algorithms-2.6.0.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/opensearch-ml-common-2.6.0.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/opensearch-rest-client-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/plugin-descriptor.properties chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/plugin-security.policy chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/protobuf-java-3.21.9.jar @@ -775,7 +785,7 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/jsr305-3.0.2.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/log4j-slf4j-impl-2.19.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/onnxruntime-1.12.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/onnxruntime_gpu-1.13.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/onnxruntime-engine-0.19.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/pytorch-engine-0.19.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-ml/pytorch-model-zoo-0.19.0.jar @@ -789,94 +799,94 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-notifications-core/aws-java-sdk-sts-1.12.48.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-notifications-core/httpclient-4.5.13.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-notifications-core/httpcore-4.4.15.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-notifications-core/jackson-annotations-2.14.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-notifications-core/jackson-databind-2.14.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-notifications-core/jackson-annotations-2.14.2.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-notifications-core/jackson-databind-2.14.2.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-notifications-core/javax.mail-1.6.2.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-notifications-core/kotlin-stdlib-1.6.10.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-notifications-core/kotlin-stdlib-common-1.6.10.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-notifications-core/opensearch-notifications-core-2.4.1.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-notifications-core/opensearch-notifications-core-spi-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-notifications-core/opensearch-notifications-core-2.6.0.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-notifications-core/opensearch-notifications-core-spi-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-notifications-core/commons-logging-1.2.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-notifications-core/plugin-descriptor.properties chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-notifications-core/plugin-security.policy chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-notifications - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-notifications/common-utils-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-notifications/common-utils-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-notifications/kotlin-stdlib-common-1.6.10.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-notifications/kotlinx-coroutines-core-jvm-1.4.3.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-notifications/opensearch-notifications-2.4.1.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-notifications/opensearch-notifications-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-notifications/plugin-descriptor.properties chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-notifications/plugin-security.policy chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/modules chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-common - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-common/jcodings-1.0.44.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-common/opensearch-grok-2.4.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-common/opensearch-dissect-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-common/opensearch-grok-2.6.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-common/opensearch-dissect-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-common/plugin-descriptor.properties - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-common/ingest-common-2.4.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-common/joni-2.1.43.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-common/ingest-common-2.6.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-common/jcodings-1.0.58.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-common/joni-2.1.44.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/geo chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/geo/plugin-descriptor.properties - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/geo/geo-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/geo/geo-2.6.0.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-geoip + chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-geoip/maxmind-db-2.1.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-geoip/GeoLite2-Country.mmdb chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-geoip/GeoLite2-City.mmdb - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-geoip/ingest-geoip-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-geoip/ingest-geoip-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-geoip/plugin-descriptor.properties chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-geoip/GeoLite2-ASN.mmdb chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-geoip/plugin-security.policy - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-geoip/geoip2-3.0.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-geoip/jackson-annotations-2.14.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-geoip/jackson-databind-2.14.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-geoip/maxmind-db-2.0.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-geoip/geoip2-3.0.2.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-geoip/jackson-annotations-2.14.2.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-geoip/jackson-databind-2.14.2.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/percolator chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/percolator/plugin-descriptor.properties - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/percolator/percolator-client-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/percolator/percolator-client-2.6.0.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/analysis-common chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/analysis-common/plugin-descriptor.properties - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/analysis-common/analysis-common-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/analysis-common/analysis-common-2.6.0.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/aggs-matrix-stats - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/aggs-matrix-stats/aggs-matrix-stats-client-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/aggs-matrix-stats/aggs-matrix-stats-client-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/aggs-matrix-stats/plugin-descriptor.properties chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/repository-url chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/repository-url/plugin-descriptor.properties chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/repository-url/plugin-security.policy - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/repository-url/repository-url-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/repository-url/repository-url-2.6.0.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-mustache - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-mustache/lang-mustache-client-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-mustache/lang-mustache-client-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-mustache/plugin-descriptor.properties chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-mustache/compiler-0.9.10.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-mustache/plugin-security.policy chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/systemd chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/systemd/plugin-descriptor.properties chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/systemd/plugin-security.policy - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/systemd/systemd-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/systemd/systemd-2.6.0.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/transport-netty4 chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/transport-netty4/plugin-descriptor.properties - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/transport-netty4/transport-netty4-client-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/transport-netty4/transport-netty4-client-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/transport-netty4/plugin-security.policy - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/transport-netty4/netty-buffer-4.1.84.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/transport-netty4/netty-codec-4.1.84.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/transport-netty4/netty-codec-http-4.1.84.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/transport-netty4/netty-common-4.1.84.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/transport-netty4/netty-handler-4.1.84.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/transport-netty4/netty-resolver-4.1.84.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/transport-netty4/netty-transport-4.1.84.Final.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/transport-netty4/netty-transport-native-unix-common-4.1.84.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/transport-netty4/netty-buffer-4.1.87.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/transport-netty4/netty-codec-4.1.87.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/transport-netty4/netty-codec-http-4.1.87.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/transport-netty4/netty-common-4.1.87.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/transport-netty4/netty-handler-4.1.87.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/transport-netty4/netty-resolver-4.1.87.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/transport-netty4/netty-transport-4.1.87.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/transport-netty4/netty-transport-native-unix-common-4.1.87.Final.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-expression - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-expression/lang-expression-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-expression/lang-expression-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-expression/plugin-descriptor.properties chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-expression/plugin-security.policy - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-expression/antlr4-runtime-4.9.3.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-expression/antlr4-runtime-4.11.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-expression/asm-9.4.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-expression/asm-commons-9.4.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-expression/asm-tree-9.4.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-expression/lucene-expressions-9.4.2.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-expression/lucene-expressions-9.5.0.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-painless chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-painless/plugin-descriptor.properties - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-painless/lang-painless-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-painless/lang-painless-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-painless/plugin-security.policy - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-painless/opensearch-scripting-painless-spi-2.4.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-painless/antlr4-runtime-4.9.3.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-painless/opensearch-scripting-painless-spi-2.6.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-painless/antlr4-runtime-4.11.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-painless/asm-9.4.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-painless/asm-analysis-9.4.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-painless/asm-commons-9.4.jar @@ -884,37 +894,37 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/lang-painless/asm-util-9.4.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/rank-eval chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/rank-eval/plugin-descriptor.properties - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/rank-eval/rank-eval-client-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/rank-eval/rank-eval-client-2.6.0.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/opensearch-dashboards chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/opensearch-dashboards/httpcore-nio-4.4.15.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/opensearch-dashboards/httpasyncclient-4.1.5.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/opensearch-dashboards/reindex-client-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/opensearch-dashboards/reindex-client-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/opensearch-dashboards/plugin-descriptor.properties - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/opensearch-dashboards/opensearch-rest-client-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/opensearch-dashboards/opensearch-rest-client-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/opensearch-dashboards/httpclient-4.5.13.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/opensearch-dashboards/opensearch-dashboards-2.4.1.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/opensearch-dashboards/opensearch-ssl-config-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/opensearch-dashboards/opensearch-dashboards-2.6.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/opensearch-dashboards/opensearch-ssl-config-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/opensearch-dashboards/commons-codec-1.15.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/opensearch-dashboards/httpcore-4.4.15.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/opensearch-dashboards/commons-logging-1.2.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-user-agent - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-user-agent/ingest-user-agent-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-user-agent/ingest-user-agent-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-user-agent/plugin-descriptor.properties chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/mapper-extras - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/mapper-extras/mapper-extras-client-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/mapper-extras/mapper-extras-client-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/mapper-extras/plugin-descriptor.properties chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/parent-join chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/parent-join/plugin-descriptor.properties - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/parent-join/parent-join-client-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/parent-join/parent-join-client-2.6.0.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/reindex chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/reindex/httpcore-nio-4.4.15.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/reindex/httpasyncclient-4.1.5.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/reindex/reindex-client-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/reindex/reindex-client-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/reindex/plugin-descriptor.properties - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/reindex/opensearch-rest-client-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/reindex/opensearch-rest-client-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/reindex/plugin-security.policy chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/reindex/httpclient-4.5.13.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/reindex/opensearch-ssl-config-2.4.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/reindex/opensearch-ssl-config-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/reindex/commons-codec-1.15.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/reindex/httpcore-4.4.15.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/reindex/commons-logging-1.2.jar @@ -1095,7 +1105,6 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/jdk/lib/jrt-fs.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/jdk/lib/libattach.so chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/jdk/include - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/jdk/include/sizecalc.h chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/jdk/include/jvmti.h chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/jdk/include/classfile_constants.h chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/jdk/include/jdwpTransport.h diff --git a/stack/indexer/deb/docker/amd64/Dockerfile b/stack/indexer/deb/docker/amd64/Dockerfile index b40740f3db..b93d24c9c8 100644 --- a/stack/indexer/deb/docker/amd64/Dockerfile +++ b/stack/indexer/deb/docker/amd64/Dockerfile @@ -2,6 +2,10 @@ FROM debian:8 ENV DEBIAN_FRONTEND noninteractive +RUN echo 'Acquire::Check-Valid-Until "false";' >> /etc/apt/apt.conf && \ + echo "deb http://archive.debian.org/debian jessie contrib main non-free" > /etc/apt/sources.list && \ + echo "deb http://archive.debian.org/debian-security jessie/updates main" >> /etc/apt/sources.list + RUN apt-get update && apt-get install -y --force-yes apt-utils && \ apt-get install -y --force-yes \ curl sudo wget expect gnupg build-essential \ diff --git a/stack/indexer/rpm/build_package.sh b/stack/indexer/rpm/build_package.sh index 2ef8076c31..d6adf0c399 100755 --- a/stack/indexer/rpm/build_package.sh +++ b/stack/indexer/rpm/build_package.sh @@ -19,6 +19,7 @@ rpm_x86_builder="rpm_indexer_builder_x86" rpm_builder_dockerfile="${current_path}/docker" future="no" base_cmd="" +build_base="yes" trap ctrl_c INT @@ -42,14 +43,16 @@ build_rpm() { # Copy the necessary files cp ${current_path}/builder.sh ${dockerfile_path} - # Base generation - if [ "${future}" == "yes" ];then - base_cmd+="--future " + if [ "${build_base}" == "yes" ];then + # Base generation + if [ "${future}" == "yes" ];then + base_cmd+="--future " + fi + if [ "${reference}" ];then + base_cmd+="--reference ${reference}" + fi + ../base/generate_base.sh -s ${outdir} -r ${revision} ${base_cmd} fi - if [ "${reference}" ];then - base_cmd+="--reference ${reference}" - fi - ../base/generate_base.sh -s ${outdir} -r ${revision} ${base_cmd} # Build the Docker image if [[ ${build_docker} == "yes" ]]; then @@ -95,6 +98,7 @@ help() { echo "Usage: $0 [OPTIONS]" echo echo " -a, --architecture [Optional] Target architecture of the package [x86_64]." + echo " -b, --build-base [Optional] Build a new base or use a existing one. By default, yes." echo " -r, --revision [Optional] Package revision. By default: 1." echo " -s, --store [Optional] Set the destination path of package. By default, an output folder will be created." echo " --reference [Optional] wazuh-packages branch to download SPECs, not used by default." @@ -121,6 +125,14 @@ main() { help 1 fi ;; + "-b"|"--build-base") + if [ -n "${2}" ]; then + build_base="${2}" + shift 2 + else + help 1 + fi + ;; "-r"|"--revision") if [ -n "$2" ]; then revision="$2" diff --git a/stack/indexer/rpm/wazuh-indexer.spec b/stack/indexer/rpm/wazuh-indexer.spec index 724a019ceb..2f305fee32 100755 --- a/stack/indexer/rpm/wazuh-indexer.spec +++ b/stack/indexer/rpm/wazuh-indexer.spec @@ -325,32 +325,32 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/bcpkix-jdk15on-1.70.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/bcprov-jdk15on-1.70.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/bcutil-jdk15on-1.70.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/grpc-api-1.49.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/grpc-context-1.49.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/grpc-core-1.49.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/grpc-netty-1.49.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/grpc-protobuf-1.49.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/grpc-protobuf-lite-1.49.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/grpc-stub-1.49.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/gson-2.9.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/guava-31.1-android.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/jackson-annotations-2.13.4.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/jackson-core-2.13.4.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/jackson-databind-2.13.4.2.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/netty-buffer-4.1.79.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/netty-codec-4.1.77.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/netty-codec-http-4.1.77.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/netty-codec-http2-4.1.77.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/netty-codec-socks-4.1.77.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/netty-common-4.1.79.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/netty-handler-4.1.77.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/netty-handler-proxy-4.1.77.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/netty-resolver-4.1.79.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/netty-transport-4.1.79.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/netty-transport-native-unix-common-4.1.79.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/grpc-api-1.52.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/grpc-context-1.52.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/grpc-core-1.52.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/grpc-netty-1.52.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/grpc-protobuf-1.52.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/grpc-protobuf-lite-1.52.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/grpc-stub-1.52.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/jackson-annotations-2.14.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/jackson-core-2.14.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/jackson-databind-2.14.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/netty-buffer-4.1.86.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/netty-codec-4.1.86.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/netty-codec-http-4.1.86.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/netty-codec-http2-4.1.86.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/netty-codec-socks-4.1.86.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/netty-common-4.1.86.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/netty-handler-4.1.86.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/netty-handler-proxy-4.1.86.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/netty-resolver-4.1.86.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/netty-transport-4.1.86.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/netty-transport-native-unix-common-4.1.86.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/protobuf-java-3.21.12.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/perfmark-api-0.25.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/performance-analyzer-rca-2.4.1.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/protobuf-java-3.21.8.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/performance-analyzer-rca-2.6.0.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/proto-google-common-protos-2.9.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/animal-sniffer-annotations-1.21.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/checker-qual-3.12.0.jar @@ -383,55 +383,56 @@ rm -fr %{buildroot} %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/hppc-0.8.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/log4j-api-2.17.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/snakeyaml-1.32.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/jna-5.5.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/log4j-core-2.17.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/log4j-jul-2.17.1.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/plugin-cli -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/plugin-cli/bcpg-fips-1.0.5.1.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/upgrade-cli %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/keystore-cli %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/jts-core-1.15.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/t-digest-3.2.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/spatial4j-0.7.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/jackson-core-2.14.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/jackson-dataformat-cbor-2.14.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/jackson-dataformat-smile-2.14.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/jackson-dataformat-yaml-2.14.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/java-version-checker-2.4.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/joda-time-2.10.12.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/java-version-checker-2.6.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/jackson-core-2.14.2.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/jackson-dataformat-cbor-2.14.2.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/jackson-dataformat-smile-2.14.2.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/jackson-dataformat-yaml-2.14.2.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/joda-time-2.12.2.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/jopt-simple-5.0.4.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/opensearch-2.4.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/opensearch-cli-2.4.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/opensearch-core-2.4.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/opensearch-geo-2.4.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/opensearch-launchers-2.4.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/opensearch-plugin-classloader-2.4.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/opensearch-secure-sm-2.4.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/opensearch-x-content-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/opensearch-2.6.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/opensearch-cli-2.6.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/opensearch-core-2.6.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/opensearch-geo-2.6.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/opensearch-launchers-2.6.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/opensearch-plugin-classloader-2.6.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/opensearch-secure-sm-2.6.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/opensearch-x-content-2.6.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/opensearch-common-2.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/HdrHistogram-2.1.12.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-analysis-common-9.4.2.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-backward-codecs-9.4.2.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-core-9.4.2.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-grouping-9.4.2.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-highlighter-9.4.2.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-join-9.4.2.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-memory-9.4.2.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-misc-9.4.2.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-queries-9.4.2.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-queryparser-9.4.2.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-sandbox-9.4.2.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-spatial-extras-9.4.2.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-spatial3d-9.4.2.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-suggest-9.4.2.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/keystore-cli/keystore-cli-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-analysis-common-9.5.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-backward-codecs-9.5.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-core-9.5.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-grouping-9.5.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-highlighter-9.5.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-join-9.5.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-memory-9.5.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-misc-9.5.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-queries-9.5.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-queryparser-9.5.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-sandbox-9.5.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-spatial-extras-9.5.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-spatial3d-9.5.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-suggest-9.5.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/snakeyaml-1.33.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/keystore-cli/keystore-cli-2.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/plugin-cli/bc-fips-1.0.2.3.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/plugin-cli/opensearch-plugin-cli-2.4.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/upgrade-cli/jackson-annotations-2.14.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/upgrade-cli/jackson-core-2.14.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/upgrade-cli/jackson-databind-2.14.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/upgrade-cli/opensearch-upgrade-cli-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/plugin-cli/bcpg-fips-1.0.7.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/plugin-cli/opensearch-plugin-cli-2.6.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/upgrade-cli/jackson-annotations-2.14.2.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/upgrade-cli/jackson-core-2.14.2.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/upgrade-cli/jackson-databind-2.14.2.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/upgrade-cli/opensearch-upgrade-cli-2.6.0.jar %dir %attr(750, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-observability %attr(660, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-observability/observability.yml %dir %attr(750, %{USER}, %{GROUP}) %{CONFIG_DIR}/opensearch-reports-scheduler @@ -474,31 +475,39 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-observability/kotlinx-coroutines-core-jvm-1.3.9.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-observability/plugin-descriptor.properties %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-observability/plugin-security.policy -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-observability/common-utils-2.4.1.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-observability/common-utils-2.6.0.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-observability/guava-31.0.1-jre.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-observability/kotlin-stdlib-1.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-observability/kotlin-stdlib-common-1.6.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-observability/opensearch-observability-2.4.1.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-observability/opensearch-observability-2.6.0.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-observability/jackson-annotations-2.14.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-observability/jackson-databind-2.14.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-observability/json-20220924.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-observability/json-base-2.2.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-observability/json-flattener-0.15.1.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/jsoup-1.15.3.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/json-flattener-0.1.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/jackson-annotations-2.14.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/jackson-databind-2.14.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/json-base-2.2.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/json-flattener-0.15.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/json-20180813.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/kotlinx-coroutines-core-jvm-1.3.9.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/plugin-descriptor.properties %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/plugin-security.policy -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/common-utils-2.4.1.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/common-utils-2.6.0.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/gson-2.8.9.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/guava-31.0.1-jre.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/kotlin-stdlib-1.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/kotlin-stdlib-common-1.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/kotlin-test-1.6.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/opensearch-reports-scheduler-2.4.1.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/opensearch-reports-scheduler-2.6.0.0.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/geo-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/geo-2.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/resilience4j-core-1.5.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/httpcore-nio-4.4.15.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/httpasyncclient-4.1.5.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/slf4j-api-1.7.30.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/slf4j-api-1.7.36.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/druid-1.0.15.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/commons-lang3-3.10.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/gson-2.8.9.jar @@ -524,32 +533,32 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/antlr-runtime-3.5.2.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/antlr4-4.7.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/checker-qual-3.12.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/common-2.4.1.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/core-2.4.1.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/common-2.6.0.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/core-2.6.0.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/error_prone_annotations-2.7.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/guava-31.0.1-jre.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/icu4j-58.2.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/jackson-annotations-2.14.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/jackson-databind-2.14.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/jackson-annotations-2.14.2.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/jackson-databind-2.14.2.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/javax.json-1.0.4.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/legacy-2.4.1.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/opensearch-2.4.1.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/opensearch-ml-client-2.4.1.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/opensearch-rest-client-2.4.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/opensearch-sql-2.4.1.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/opensearch-ssl-config-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/legacy-2.6.0.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/opensearch-2.6.0.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/opensearch-ml-client-2.6.0.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/opensearch-rest-client-2.6.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/opensearch-sql-2.6.0.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/opensearch-ssl-config-2.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/org.abego.treelayout.core-1.0.3.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/parent-join-client-2.4.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/ppl-2.4.1.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/protocol-2.4.1.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/reindex-client-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/parent-join-client-2.6.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/ppl-2.6.0.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/protocol-2.6.0.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/reindex-client-2.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/spring-aop-5.3.22.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/spring-beans-5.3.22.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/spring-context-5.3.22.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/spring-core-5.3.22.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/spring-expression-5.3.22.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/spring-jcl-5.3.22.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/sql-2.4.1.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/sql-2.6.0.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/annotations-13.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/kotlin-reflect-1.4.30.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/kotlin-stdlib-1.6.0.jar @@ -558,18 +567,18 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/okhttp-4.9.3.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/okhttp-aws-signer-1.0.2.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/okio-jvm-2.8.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/prometheus-2.4.1.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-sql/prometheus-2.6.0.0.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-cross-cluster-replication %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-cross-cluster-replication/ipaddress-5.3.3.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-cross-cluster-replication/annotations-13.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-cross-cluster-replication/plugin-descriptor.properties -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-cross-cluster-replication/common-utils-2.4.1.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-cross-cluster-replication/common-utils-2.6.0.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-cross-cluster-replication/kotlin-stdlib-1.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-cross-cluster-replication/kotlin-stdlib-common-1.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-cross-cluster-replication/kotlin-stdlib-jdk7-1.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-cross-cluster-replication/kotlin-stdlib-jdk8-1.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-cross-cluster-replication/kotlinx-coroutines-core-jvm-1.6.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-cross-cluster-replication/opensearch-cross-cluster-replication-2.4.1.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-cross-cluster-replication/opensearch-cross-cluster-replication-2.6.0.0.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-knn %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-knn/commons-lang-2.6.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-knn/plugin-descriptor.properties @@ -583,22 +592,22 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-knn/lib/libopensearchknn_common.so %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-knn/lib/libopensearchknn_faiss.so %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-knn/lib/libopensearchknn_nmslib.so -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-knn/opensearch-knn-2.4.1.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-knn/opensearch-knn-2.6.0.0.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-index-management %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-index-management/ipaddress-5.3.3.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-index-management/annotations-13.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-index-management/kotlinx-coroutines-core-jvm-1.3.9.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-index-management/plugin-descriptor.properties %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-index-management/plugin-security.policy -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-index-management/common-utils-2.4.1.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-index-management/common-utils-2.6.0.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-index-management/commons-codec-1.13.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-index-management/httpclient-4.5.13.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-index-management/httpcore-4.4.15.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-index-management/kotlin-stdlib-1.6.10.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-index-management/kotlin-stdlib-common-1.6.10.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-index-management/kotlin-stdlib-jdk7-1.6.10.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-index-management/opensearch-index-management-2.4.1.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-index-management/opensearch-index-management-spi-2.4.1.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-index-management/opensearch-index-management-2.6.0.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-index-management/opensearch-index-management-spi-2.6.0.0.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/sqlite-jdbc-3.32.3.2.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/j2objc-annotations-1.3.jar @@ -615,41 +624,41 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/bcpkix-jdk15on-1.70.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/bcprov-jdk15on-1.70.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/bcutil-jdk15on-1.70.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/checker-qual-3.5.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/checker-qual-3.29.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/commons-lang3-3.12.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/error_prone_annotations-2.9.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/grpc-api-1.49.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/grpc-context-1.49.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/grpc-core-1.49.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/grpc-netty-1.49.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/grpc-protobuf-1.49.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/grpc-protobuf-lite-1.49.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/grpc-stub-1.49.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/grpc-api-1.52.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/grpc-context-1.52.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/grpc-core-1.52.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/grpc-netty-1.52.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/grpc-protobuf-1.52.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/grpc-protobuf-lite-1.52.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/grpc-stub-1.52.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/gson-2.9.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/guava-30.1-jre.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/jackson-annotations-2.13.4.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/jackson-databind-2.13.4.2.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/jackson-module-paranamer-2.13.4.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/netty-buffer-4.1.79.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/netty-codec-4.1.79.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/netty-codec-http-4.1.79.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/netty-codec-http2-4.1.79.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/netty-codec-socks-4.1.79.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/netty-common-4.1.79.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/netty-handler-4.1.79.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/netty-handler-proxy-4.1.79.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/netty-resolver-4.1.79.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/netty-transport-4.1.79.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/netty-transport-native-unix-common-4.1.79.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/opensearch-performance-analyzer-2.4.1.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/guava-31.1-jre.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/jackson-annotations-2.14.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/jackson-databind-2.14.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/jackson-module-paranamer-2.14.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/netty-buffer-4.1.87.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/netty-codec-4.1.87.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/netty-codec-http-4.1.87.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/netty-codec-http2-4.1.87.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/netty-codec-socks-4.1.87.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/netty-common-4.1.87.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/netty-handler-4.1.87.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/netty-handler-proxy-4.1.87.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/netty-resolver-4.1.87.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/netty-transport-4.1.87.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/netty-transport-native-unix-common-4.1.87.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/opensearch-performance-analyzer-2.6.0.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/perfmark-api-0.25.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/performanceanalyzer-rca-2.4.1.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/protobuf-java-3.21.8.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/performanceanalyzer-rca-2.6.0.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/protobuf-java-3.21.12.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-performance-analyzer/proto-google-common-protos-2.9.0.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-job-scheduler %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-job-scheduler/plugin-descriptor.properties -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-job-scheduler/opensearch-job-scheduler-2.4.1.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-job-scheduler/opensearch-job-scheduler-spi-2.4.1.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-job-scheduler/opensearch-job-scheduler-2.6.0.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-job-scheduler/opensearch-job-scheduler-spi-2.6.0.0.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/opensaml-saml-api-3.4.5.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/commons-codec-1.14.jar @@ -663,10 +672,10 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/httpasyncclient-4.1.5.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/bcprov-jdk15on-1.67.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/json-flattener-0.5.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/cxf-rt-rs-json-basic-3.4.5.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/cxf-rt-rs-json-basic-3.5.5.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/opensaml-xmlsec-impl-3.4.5.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/txw2-2.3.4.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/cxf-core-3.4.5.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/cxf-core-3.5.5.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/metrics-core-3.1.2.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/opensaml-soap-impl-3.4.5.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/jsr305-3.0.2.jar @@ -704,10 +713,10 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/httpclient-4.5.13.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/zjsonpatch-0.4.4.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/accessors-smart-2.4.7.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/cxf-rt-security-3.4.5.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/cxf-rt-security-3.5.5.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/java-support-7.5.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/stax2-api-4.2.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/cxf-rt-rs-security-jose-3.4.5.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/cxf-rt-rs-security-jose-3.5.5.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/opensaml-profile-api-3.4.5.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/jaxb-runtime-2.3.4.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/opensaml-security-impl-3.4.5.jar @@ -715,7 +724,7 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/commons-text-1.10.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/jakarta.annotation-api-1.3.5.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/opensaml-soap-api-3.4.5.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/aggs-matrix-stats-client-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/aggs-matrix-stats-client-2.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/checker-qual-3.5.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/compiler-0.9.10.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/cryptacular-1.2.4.jar @@ -723,36 +732,36 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/failureaccess-1.0.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/guava-30.0-jre.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/j2objc-annotations-1.3.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/jackson-annotations-2.14.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/jackson-annotations-2.14.2.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/jjwt-api-0.10.8.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/jjwt-impl-0.10.8.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/jjwt-jackson-0.10.8.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/lang-mustache-client-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/lang-mustache-client-2.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/mapper-extras-client-2.4.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/netty-buffer-4.1.84.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/netty-codec-4.1.84.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/netty-codec-http-4.1.84.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/netty-common-4.1.84.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/netty-handler-4.1.84.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/netty-resolver-4.1.84.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/netty-transport-4.1.84.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/netty-transport-native-unix-common-4.1.84.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/opensearch-rest-client-2.4.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/opensearch-rest-high-level-client-2.4.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/opensearch-security-2.4.1.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/parent-join-client-2.4.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/rank-eval-client-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/mapper-extras-client-2.6.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/netty-buffer-4.1.87.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/netty-codec-4.1.87.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/netty-codec-http-4.1.87.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/netty-common-4.1.87.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/netty-handler-4.1.87.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/netty-resolver-4.1.87.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/netty-transport-4.1.87.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/netty-transport-native-unix-common-4.1.87.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/opensearch-rest-client-2.6.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/opensearch-rest-high-level-client-2.6.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/opensearch-security-2.6.0.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/parent-join-client-2.6.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/rank-eval-client-2.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/slf4j-api-1.7.30.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/snappy-java-1.1.8.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/transport-netty4-client-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/transport-netty4-client-2.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/zstd-jni-1.5.0-2.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/jackson-databind-2.14.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/jackson-databind-2.14.2.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/kafka-clients-3.0.2.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security/bcpkix-jdk15on-1.70.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security-analytics %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security-analytics/antlr4-runtime-4.10.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security-analytics/common-utils-2.4.1.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security-analytics/common-utils-2.6.0.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security-analytics/commons-codec-1.15.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security-analytics/commons-lang3-3.12.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security-analytics/commons-logging-1.2.jar @@ -762,23 +771,23 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security-analytics/httpcore-4.4.15.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security-analytics/httpcore-nio-4.4.15.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security-analytics/kotlin-stdlib-1.6.10.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security-analytics/opensearch-rest-client-2.4.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security-analytics/opensearch-security-analytics-2.4.1.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security-analytics/opensearch-rest-client-2.6.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security-analytics/opensearch-security-analytics-2.6.0.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security-analytics/plugin-descriptor.properties %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-security-analytics/plugin-security.policy %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-neural-search %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-neural-search/LICENSE.txt %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-neural-search/NOTICE.txt %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-neural-search/commons-lang3-3.10.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-neural-search/opensearch-ml-client-2.4.1.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-neural-search/opensearch-neural-search-2.4.1.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-neural-search/opensearch-ml-client-2.6.0.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-neural-search/opensearch-neural-search-2.6.0.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-neural-search/plugin-descriptor.properties %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-neural-search/plugin-security.policy %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-asynchronous-search %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-asynchronous-search/plugin-descriptor.properties %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-asynchronous-search/plugin-security.policy -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-asynchronous-search/common-utils-2.4.1.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-asynchronous-search/opensearch-asynchronous-search-2.4.1.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-asynchronous-search/common-utils-2.6.0.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-asynchronous-search/opensearch-asynchronous-search-2.6.0.0.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-anomaly-detection %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-anomaly-detection/commons-lang3-3.12.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-anomaly-detection/commons-lang-2.6.jar @@ -797,13 +806,13 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-anomaly-detection/commons-math3-3.6.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-anomaly-detection/httpcore-4.4.15.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-anomaly-detection/failureaccess-1.0.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-anomaly-detection/common-utils-2.4.1.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-anomaly-detection/common-utils-2.6.0.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-anomaly-detection/guava-31.0.1-jre.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-anomaly-detection/jackson-annotations-2.14.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-anomaly-detection/jackson-databind-2.14.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-anomaly-detection/jackson-annotations-2.14.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-anomaly-detection/jackson-databind-2.14.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-anomaly-detection/javassist-3.28.0-GA.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-anomaly-detection/opensearch-anomaly-detection-2.4.1.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-anomaly-detection/opensearch-rest-client-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-anomaly-detection/opensearch-anomaly-detection-2.6.0.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-anomaly-detection/opensearch-rest-client-2.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-anomaly-detection/protostuff-api-1.8.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-anomaly-detection/protostuff-collectionschema-1.8.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-anomaly-detection/protostuff-core-1.8.0.jar @@ -816,10 +825,10 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-geospatial/LICENSE.txt %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-geospatial/NOTICE.txt %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-geospatial/commons-lang3-3.12.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-geospatial/opensearch-geospatial-2.4.1.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-geospatial/opensearch-geospatial-2.6.0.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-geospatial/plugin-descriptor.properties -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-geospatial/geo-2.4.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-geospatial/h3-2.4.1.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-geospatial/geo-2.6.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-geospatial/h3-2.6.0.0.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-alerting %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-alerting/error_prone_annotations-2.3.4.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-alerting/httpcore-nio-4.4.15.jar @@ -844,8 +853,8 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-alerting/commons-codec-1.13.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-alerting/httpcore-4.4.15.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-alerting/failureaccess-1.0.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-alerting/alerting-core-2.4.1.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-alerting/common-utils-2.4.1.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-alerting/alerting-core-2.6.0.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-alerting/common-utils-2.6.0.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-alerting/commons-beanutils-1.9.4.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-alerting/commons-collections-3.2.2.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-alerting/commons-digester-2.1.jar @@ -854,12 +863,12 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-alerting/kotlin-stdlib-common-1.6.10.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-alerting/kotlin-stdlib-jdk7-1.6.10.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-alerting/kotlin-stdlib-jdk8-1.6.10.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-alerting/opensearch-alerting-2.4.1.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-alerting/opensearch-rest-client-2.4.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-alerting/percolator-client-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-alerting/opensearch-alerting-2.6.0.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-alerting/opensearch-rest-client-2.6.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-alerting/percolator-client-2.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-alerting/commons-logging-1.2.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/common-utils-2.4.1.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/common-utils-2.6.0.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/commons-beanutils-1.9.4.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/commons-codec-1.15.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/commons-collections-3.2.2.jar @@ -878,8 +887,8 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/httpclient-4.5.13.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/httpcore-4.4.15.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/httpcore-nio-4.4.15.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/jackson-annotations-2.14.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/jackson-databind-2.14.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/jackson-annotations-2.14.2.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/jackson-databind-2.14.2.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/jansi-2.4.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/javassist-3.26.0-GA.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/jline-builtins-3.21.0.jar @@ -891,10 +900,10 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/olcut-config-protobuf-5.2.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/olcut-core-5.2.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/opencsv-5.4.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/opensearch-ml-2.4.1.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/opensearch-ml-algorithms-2.4.1.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/opensearch-ml-common-2.4.1.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/opensearch-rest-client-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/opensearch-ml-2.6.0.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/opensearch-ml-algorithms-2.6.0.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/opensearch-ml-common-2.6.0.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/opensearch-rest-client-2.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/plugin-descriptor.properties %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/plugin-security.policy %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/protobuf-java-3.21.9.jar @@ -929,12 +938,12 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/jsr305-3.0.2.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/log4j-slf4j-impl-2.19.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/onnxruntime-1.12.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/onnxruntime-engine-0.19.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/pytorch-engine-0.19.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/pytorch-model-zoo-0.19.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/slf4j-api-1.7.36.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/tokenizers-0.19.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/onnxruntime_gpu-1.13.1.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications-core %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications-core/activation-1.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications-core/aws-java-sdk-core-1.12.48.jar @@ -943,94 +952,94 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications-core/aws-java-sdk-sts-1.12.48.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications-core/httpclient-4.5.13.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications-core/httpcore-4.4.15.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications-core/jackson-annotations-2.14.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications-core/jackson-databind-2.14.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications-core/jackson-annotations-2.14.2.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications-core/jackson-databind-2.14.2.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications-core/javax.mail-1.6.2.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications-core/kotlin-stdlib-1.6.10.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications-core/kotlin-stdlib-common-1.6.10.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications-core/opensearch-notifications-core-2.4.1.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications-core/opensearch-notifications-core-spi-2.4.1.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications-core/opensearch-notifications-core-2.6.0.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications-core/opensearch-notifications-core-spi-2.6.0.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications-core/commons-logging-1.2.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications-core/plugin-descriptor.properties %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications-core/plugin-security.policy %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications/common-utils-2.4.1.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications/common-utils-2.6.0.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications/kotlin-stdlib-common-1.6.10.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications/kotlinx-coroutines-core-jvm-1.4.3.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications/opensearch-notifications-2.4.1.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications/opensearch-notifications-2.6.0.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications/plugin-descriptor.properties %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications/plugin-security.policy %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-common -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-common/jcodings-1.0.44.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-common/jcodings-1.0.58.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-common/plugin-descriptor.properties -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-common/ingest-common-2.4.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-common/joni-2.1.43.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-common/opensearch-dissect-2.4.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-common/opensearch-grok-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-common/ingest-common-2.6.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-common/joni-2.1.44.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-common/opensearch-dissect-2.6.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-common/opensearch-grok-2.6.0.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/geo %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/geo/plugin-descriptor.properties -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/geo/geo-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/geo/geo-2.6.0.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-geoip %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-geoip/GeoLite2-Country.mmdb %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-geoip/GeoLite2-City.mmdb %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-geoip/plugin-descriptor.properties %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-geoip/GeoLite2-ASN.mmdb %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-geoip/plugin-security.policy -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-geoip/geoip2-3.0.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-geoip/ingest-geoip-2.4.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-geoip/jackson-annotations-2.14.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-geoip/jackson-databind-2.14.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-geoip/maxmind-db-2.0.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-geoip/ingest-geoip-2.6.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-geoip/geoip2-3.0.2.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-geoip/jackson-annotations-2.14.2.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-geoip/jackson-databind-2.14.2.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-geoip/maxmind-db-2.1.0.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/percolator %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/percolator/plugin-descriptor.properties -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/percolator/percolator-client-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/percolator/percolator-client-2.6.0.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/analysis-common %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/analysis-common/plugin-descriptor.properties -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/analysis-common/analysis-common-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/analysis-common/analysis-common-2.6.0.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/aggs-matrix-stats %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/aggs-matrix-stats/plugin-descriptor.properties -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/aggs-matrix-stats/aggs-matrix-stats-client-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/aggs-matrix-stats/aggs-matrix-stats-client-2.6.0.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/repository-url %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/repository-url/plugin-descriptor.properties %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/repository-url/plugin-security.policy -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/repository-url/repository-url-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/repository-url/repository-url-2.6.0.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-mustache %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-mustache/plugin-descriptor.properties %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-mustache/plugin-security.policy %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-mustache/compiler-0.9.10.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-mustache/lang-mustache-client-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-mustache/lang-mustache-client-2.6.0.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/systemd %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/systemd/plugin-descriptor.properties %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/systemd/plugin-security.policy -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/systemd/systemd-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/systemd/systemd-2.6.0.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/transport-netty4 %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/transport-netty4/plugin-descriptor.properties -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/transport-netty4/transport-netty4-client-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/transport-netty4/transport-netty4-client-2.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/transport-netty4/plugin-security.policy -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/transport-netty4/netty-buffer-4.1.84.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/transport-netty4/netty-codec-4.1.84.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/transport-netty4/netty-codec-http-4.1.84.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/transport-netty4/netty-common-4.1.84.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/transport-netty4/netty-handler-4.1.84.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/transport-netty4/netty-resolver-4.1.84.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/transport-netty4/netty-transport-4.1.84.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/transport-netty4/netty-transport-native-unix-common-4.1.84.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/transport-netty4/netty-buffer-4.1.87.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/transport-netty4/netty-codec-4.1.87.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/transport-netty4/netty-codec-http-4.1.87.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/transport-netty4/netty-common-4.1.87.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/transport-netty4/netty-handler-4.1.87.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/transport-netty4/netty-resolver-4.1.87.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/transport-netty4/netty-transport-4.1.87.Final.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/transport-netty4/netty-transport-native-unix-common-4.1.87.Final.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-expression -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-expression/lang-expression-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-expression/lang-expression-2.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-expression/plugin-descriptor.properties %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-expression/plugin-security.policy -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-expression/antlr4-runtime-4.9.3.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-expression/antlr4-runtime-4.11.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-expression/asm-9.4.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-expression/asm-commons-9.4.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-expression/asm-tree-9.4.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-expression/lucene-expressions-9.4.2.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-expression/lucene-expressions-9.5.0.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-painless %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-painless/plugin-descriptor.properties -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-painless/lang-painless-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-painless/lang-painless-2.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-painless/plugin-security.policy -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-painless/opensearch-scripting-painless-spi-2.4.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-painless/antlr4-runtime-4.9.3.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-painless/opensearch-scripting-painless-spi-2.6.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-painless/antlr4-runtime-4.11.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-painless/asm-9.4.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-painless/asm-analysis-9.4.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-painless/asm-commons-9.4.jar @@ -1038,37 +1047,37 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/lang-painless/asm-util-9.4.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/rank-eval %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/rank-eval/plugin-descriptor.properties -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/rank-eval/rank-eval-client-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/rank-eval/rank-eval-client-2.6.0.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/opensearch-dashboards %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/opensearch-dashboards/httpcore-nio-4.4.15.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/opensearch-dashboards/httpasyncclient-4.1.5.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/opensearch-dashboards/reindex-client-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/opensearch-dashboards/reindex-client-2.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/opensearch-dashboards/plugin-descriptor.properties -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/opensearch-dashboards/opensearch-rest-client-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/opensearch-dashboards/opensearch-rest-client-2.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/opensearch-dashboards/httpclient-4.5.13.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/opensearch-dashboards/opensearch-dashboards-2.4.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/opensearch-dashboards/opensearch-ssl-config-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/opensearch-dashboards/opensearch-dashboards-2.6.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/opensearch-dashboards/opensearch-ssl-config-2.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/opensearch-dashboards/commons-codec-1.15.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/opensearch-dashboards/httpcore-4.4.15.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/opensearch-dashboards/commons-logging-1.2.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-user-agent -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-user-agent/ingest-user-agent-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-user-agent/ingest-user-agent-2.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/ingest-user-agent/plugin-descriptor.properties %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/mapper-extras -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/mapper-extras/mapper-extras-client-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/mapper-extras/mapper-extras-client-2.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/mapper-extras/plugin-descriptor.properties %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/parent-join %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/parent-join/plugin-descriptor.properties -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/parent-join/parent-join-client-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/parent-join/parent-join-client-2.6.0.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/reindex %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/reindex/httpcore-nio-4.4.15.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/reindex/httpasyncclient-4.1.5.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/reindex/reindex-client-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/reindex/reindex-client-2.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/reindex/plugin-descriptor.properties -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/reindex/opensearch-rest-client-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/reindex/opensearch-rest-client-2.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/reindex/plugin-security.policy %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/reindex/httpclient-4.5.13.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/reindex/opensearch-ssl-config-2.4.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/reindex/opensearch-ssl-config-2.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/reindex/commons-codec-1.15.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/reindex/httpcore-4.4.15.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/modules/reindex/commons-logging-1.2.jar @@ -1255,7 +1264,6 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/jdk/lib/jrt-fs.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/jdk/lib/libattach.so %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/jdk/include -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/jdk/include/sizecalc.h %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/jdk/include/jvmti.h %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/jdk/include/classfile_constants.h %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/jdk/include/jdwpTransport.h From 8962e2f96c1ef172c8c1843e7071b3a6ad3a29fc Mon Sep 17 00:00:00 2001 From: c-bordon Date: Mon, 3 Apr 2023 17:55:59 -0300 Subject: [PATCH 302/328] Reordening files --- stack/indexer/deb/debian/rules | 36 ++++++++++++++-------------- stack/indexer/rpm/wazuh-indexer.spec | 14 +++++------ 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/stack/indexer/deb/debian/rules b/stack/indexer/deb/debian/rules index e23a8f3383..9759cd1907 100644 --- a/stack/indexer/deb/debian/rules +++ b/stack/indexer/deb/debian/rules @@ -169,14 +169,6 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/bcpkix-jdk15on-1.70.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/bcprov-jdk15on-1.70.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/bcutil-jdk15on-1.70.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/gson-2.9.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/guava-31.1-android.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/perfmark-api-0.25.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/performance-analyzer-rca-2.6.0.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/proto-google-common-protos-2.9.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/animal-sniffer-annotations-1.21.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/checker-qual-3.12.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/error_prone_annotations-2.14.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/grpc-api-1.52.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/grpc-context-1.52.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/grpc-core-1.52.1.jar @@ -184,6 +176,8 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/grpc-protobuf-1.52.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/grpc-protobuf-lite-1.52.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/grpc-stub-1.52.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/gson-2.9.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/guava-31.1-android.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/jackson-annotations-2.14.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/jackson-core-2.14.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/jackson-databind-2.14.1.jar @@ -198,7 +192,13 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/netty-resolver-4.1.86.Final.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/netty-transport-4.1.86.Final.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/netty-transport-native-unix-common-4.1.86.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/perfmark-api-0.25.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/performance-analyzer-rca-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/protobuf-java-3.21.12.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/proto-google-common-protos-2.9.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/animal-sniffer-annotations-1.21.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/checker-qual-3.12.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/lib/error_prone_annotations-2.14.0.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/config chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/config/agent-stats-metadata chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/performance-analyzer-rca/config/log4j2.xml @@ -354,6 +354,7 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/httpcore-nio-4.4.15.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/httpasyncclient-4.1.5.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/protocol-2.6.0.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/slf4j-api-1.7.36.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/druid-1.0.15.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/sql-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/opensearch-2.6.0.0.jar @@ -392,6 +393,8 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/error_prone_annotations-2.7.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/guava-31.0.1-jre.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/icu4j-58.2.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/jackson-annotations-2.14.2.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/jackson-databind-2.14.2.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/javax.json-1.0.4.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/opensearch-ml-client-2.6.0.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/org.abego.treelayout.core-1.0.3.jar @@ -411,9 +414,6 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/okhttp-aws-signer-1.0.2.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/okio-jvm-2.8.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/prometheus-2.6.0.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/jackson-annotations-2.14.2.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/jackson-databind-2.14.2.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-sql/slf4j-api-1.7.36.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-cross-cluster-replication chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-cross-cluster-replication/ipaddress-5.3.3.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-cross-cluster-replication/common-utils-2.6.0.0.jar @@ -471,14 +471,9 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/bcpkix-jdk15on-1.70.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/bcprov-jdk15on-1.70.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/bcutil-jdk15on-1.70.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/checker-qual-3.29.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/commons-lang3-3.12.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/error_prone_annotations-2.9.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/gson-2.9.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/perfmark-api-0.25.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/performanceanalyzer-rca-2.6.0.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/protobuf-java-3.21.12.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/proto-google-common-protos-2.9.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/checker-qual-3.29.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/grpc-api-1.52.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/grpc-context-1.52.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/grpc-core-1.52.1.jar @@ -486,6 +481,7 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/grpc-protobuf-1.52.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/grpc-protobuf-lite-1.52.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/grpc-stub-1.52.1.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/gson-2.9.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/guava-31.1-jre.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/jackson-annotations-2.14.1.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/jackson-databind-2.14.1.jar @@ -501,6 +497,10 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/netty-resolver-4.1.87.Final.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/netty-transport-4.1.87.Final.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/netty-transport-native-unix-common-4.1.87.Final.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/perfmark-api-0.25.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/performanceanalyzer-rca-2.6.0.0.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/protobuf-java-3.21.12.jar + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/proto-google-common-protos-2.9.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-performance-analyzer/protobuf-java-3.21.12.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-job-scheduler chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-job-scheduler/opensearch-job-scheduler-spi-2.6.0.0.jar @@ -818,11 +818,11 @@ override_dh_fixperms: chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/opensearch-notifications/plugin-security.policy chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/modules chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-common + chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-common/jcodings-1.0.58.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-common/opensearch-grok-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-common/opensearch-dissect-2.6.0.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-common/plugin-descriptor.properties chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-common/ingest-common-2.6.0.jar - chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-common/jcodings-1.0.58.jar chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/ingest-common/joni-2.1.44.jar chmod 750 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/geo chmod 640 $(TARGET_DIR)$(INSTALLATION_DIR)/modules/geo/plugin-descriptor.properties diff --git a/stack/indexer/rpm/wazuh-indexer.spec b/stack/indexer/rpm/wazuh-indexer.spec index 2f305fee32..7acca07b74 100755 --- a/stack/indexer/rpm/wazuh-indexer.spec +++ b/stack/indexer/rpm/wazuh-indexer.spec @@ -325,8 +325,6 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/bcpkix-jdk15on-1.70.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/bcprov-jdk15on-1.70.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/bcutil-jdk15on-1.70.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/gson-2.9.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/guava-31.1-android.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/grpc-api-1.52.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/grpc-context-1.52.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/grpc-core-1.52.1.jar @@ -334,6 +332,8 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/grpc-protobuf-1.52.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/grpc-protobuf-lite-1.52.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/grpc-stub-1.52.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/gson-2.9.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/guava-31.1-android.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/jackson-annotations-2.14.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/jackson-core-2.14.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/jackson-databind-2.14.1.jar @@ -348,9 +348,9 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/netty-resolver-4.1.86.Final.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/netty-transport-4.1.86.Final.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/netty-transport-native-unix-common-4.1.86.Final.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/protobuf-java-3.21.12.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/perfmark-api-0.25.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/performance-analyzer-rca-2.6.0.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/protobuf-java-3.21.12.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/proto-google-common-protos-2.9.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/animal-sniffer-annotations-1.21.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/performance-analyzer-rca/lib/checker-qual-3.12.0.jar @@ -383,11 +383,13 @@ rm -fr %{buildroot} %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/hppc-0.8.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/log4j-api-2.17.1.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/snakeyaml-1.33.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/jna-5.5.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/log4j-core-2.17.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/log4j-jul-2.17.1.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/plugin-cli +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/plugin-cli/bcpg-fips-1.0.7.1.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/upgrade-cli %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/keystore-cli %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/jts-core-1.15.0.jar @@ -424,10 +426,8 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-spatial-extras-9.5.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-spatial3d-9.5.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/lucene-suggest-9.5.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/snakeyaml-1.33.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/keystore-cli/keystore-cli-2.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/plugin-cli/bc-fips-1.0.2.3.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/plugin-cli/bcpg-fips-1.0.7.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/plugin-cli/opensearch-plugin-cli-2.6.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/upgrade-cli/jackson-annotations-2.14.2.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/lib/tools/upgrade-cli/jackson-core-2.14.2.jar @@ -487,10 +487,10 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-observability/json-flattener-0.15.1.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/jsoup-1.15.3.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/json-flattener-0.15.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/jackson-annotations-2.14.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/jackson-databind-2.14.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/json-base-2.2.1.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/json-flattener-0.15.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/json-20180813.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/kotlinx-coroutines-core-jvm-1.3.9.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-reports-scheduler/plugin-descriptor.properties @@ -938,12 +938,12 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/jsr305-3.0.2.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/log4j-slf4j-impl-2.19.0.jar +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/onnxruntime_gpu-1.13.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/onnxruntime-engine-0.19.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/pytorch-engine-0.19.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/pytorch-model-zoo-0.19.0.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/slf4j-api-1.7.36.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/tokenizers-0.19.0.jar -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-ml/onnxruntime_gpu-1.13.1.jar %dir %attr(750, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications-core %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications-core/activation-1.1.jar %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/plugins/opensearch-notifications-core/aws-java-sdk-core-1.12.48.jar From 55e54788cd21d99dca4a5f6060d882e2032c3d4c Mon Sep 17 00:00:00 2001 From: DFolchA Date: Fri, 14 Apr 2023 10:56:16 +0200 Subject: [PATCH 303/328] Update version to 4.4.2 --- CHANGELOG.md | 4 ++++ VERSION | 2 +- aix/SPECS/wazuh-agent-aix.spec | 4 +++- debs/SPECS/wazuh-agent/debian/changelog | 6 ++++++ debs/SPECS/wazuh-manager/debian/changelog | 7 +++++++ macos/specs/wazuh-agent.pkgproj | 4 ++-- rpms/SPECS/wazuh-agent.spec | 4 +++- rpms/SPECS/wazuh-manager.spec | 4 +++- solaris/solaris10/pkginfo | 4 ++-- stack/dashboard/deb/debian/changelog | 6 ++++++ stack/dashboard/rpm/wazuh-dashboard.spec | 2 ++ stack/indexer/deb/debian/changelog | 6 ++++++ tests/unattended/unit/suites/test-common.sh | 4 ++-- tests/unattended/unit/suites/test-dashboard.sh | 2 +- unattended_installer/install_functions/installVariables.sh | 2 +- 15 files changed, 49 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e50deafe1c..c5621534c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Change Log All notable changes to this project will be documented in this file. +## [v4.4.2] + +- https://github.com/wazuh/wazuh-packages/releases/tag/v4.4.2 + ## [v4.4.1] - https://github.com/wazuh/wazuh-packages/releases/tag/v4.4.1 diff --git a/VERSION b/VERSION index cca25a93cd..1d068c6ec6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.4.1 +4.4.2 diff --git a/aix/SPECS/wazuh-agent-aix.spec b/aix/SPECS/wazuh-agent-aix.spec index 937ce47f29..f8058508d8 100644 --- a/aix/SPECS/wazuh-agent-aix.spec +++ b/aix/SPECS/wazuh-agent-aix.spec @@ -1,6 +1,6 @@ # Spec file for AIX systems Name: wazuh-agent -Version: 4.4.1 +Version: 4.4.2 Release: 1 License: GPL URL: https://www.wazuh.com/ @@ -290,6 +290,8 @@ rm -fr %{buildroot} %attr(750, root, wazuh) %{_localstatedir}/wodles/* %changelog +* Mon Apr 24 2023 support - 4.4.2 +- More info: https://documentation.wazuh.com/current/release-notes/ * Mon Apr 17 2023 support - 4.4.1 - More info: https://documentation.wazuh.com/current/release-notes/ * Wed Jan 18 2023 support - 4.4.0 diff --git a/debs/SPECS/wazuh-agent/debian/changelog b/debs/SPECS/wazuh-agent/debian/changelog index c6d2098849..fe25f151c1 100644 --- a/debs/SPECS/wazuh-agent/debian/changelog +++ b/debs/SPECS/wazuh-agent/debian/changelog @@ -1,3 +1,9 @@ +wazuh-agent (4.4.2-RELEASE) stable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/ + + -- Wazuh, Inc Mon, 24 Apr 2023 12:31:50 +0000 + wazuh-agent (4.4.1-RELEASE) stable; urgency=low * More info: https://documentation.wazuh.com/current/release-notes/ diff --git a/debs/SPECS/wazuh-manager/debian/changelog b/debs/SPECS/wazuh-manager/debian/changelog index da8a25b747..933b10ddf1 100644 --- a/debs/SPECS/wazuh-manager/debian/changelog +++ b/debs/SPECS/wazuh-manager/debian/changelog @@ -1,3 +1,10 @@ + +wazuh-manager (4.4.2-RELEASE) stable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/ + + -- Wazuh, Inc Mon, 24 Apr 2023 12:31:50 +0000 + wazuh-manager (4.4.1-RELEASE) stable; urgency=low * More info: https://documentation.wazuh.com/current/release-notes/ diff --git a/macos/specs/wazuh-agent.pkgproj b/macos/specs/wazuh-agent.pkgproj index 074926ef93..afee59b2f7 100644 --- a/macos/specs/wazuh-agent.pkgproj +++ b/macos/specs/wazuh-agent.pkgproj @@ -812,7 +812,7 @@ USE_HFS+_COMPRESSION VERSION - 4.4.1-1 + 4.4.2-1 TYPE 0 @@ -1239,7 +1239,7 @@ NAME - wazuh-agent-4.4.1-1 + wazuh-agent-4.4.2-1 PAYLOAD_ONLY TREAT_MISSING_PRESENTATION_DOCUMENTS_AS_WARNING diff --git a/rpms/SPECS/wazuh-agent.spec b/rpms/SPECS/wazuh-agent.spec index 3a0de2dc8c..f348465325 100644 --- a/rpms/SPECS/wazuh-agent.spec +++ b/rpms/SPECS/wazuh-agent.spec @@ -1,6 +1,6 @@ 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 -Version: 4.4.1 +Version: 4.4.2 Release: %{_release} License: GPL Group: System Environment/Daemons @@ -622,6 +622,8 @@ rm -fr %{buildroot} %changelog +* Mon Apr 24 2023 support - 4.4.2 +- More info: https://documentation.wazuh.com/current/release-notes/ * Mon Apr 17 2023 support - 4.4.1 - More info: https://documentation.wazuh.com/current/release-notes/ * Wed Jan 18 2023 support - 4.4.0 diff --git a/rpms/SPECS/wazuh-manager.spec b/rpms/SPECS/wazuh-manager.spec index 537a4e0d64..db07715a93 100644 --- a/rpms/SPECS/wazuh-manager.spec +++ b/rpms/SPECS/wazuh-manager.spec @@ -1,6 +1,6 @@ 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 -Version: 4.4.1 +Version: 4.4.2 Release: %{_release} License: GPL Group: System Environment/Daemons @@ -841,6 +841,8 @@ rm -fr %{buildroot} %changelog +* Mon Apr 24 2023 support - 4.4.2 +- More info: https://documentation.wazuh.com/current/release-notes/ * Mon Apr 17 2023 support - 4.4.1 - More info: https://documentation.wazuh.com/current/release-notes/ * Wed Jan 18 2023 support - 4.4.0 diff --git a/solaris/solaris10/pkginfo b/solaris/solaris10/pkginfo index 56772f9a69..089fe1c6d5 100644 --- a/solaris/solaris10/pkginfo +++ b/solaris/solaris10/pkginfo @@ -1,11 +1,11 @@ NAME=Wazuh - Wazuh unifies historically separate functions into a single agent and platform architecture. Providing protection for public clouds, private clouds, and on-premise data centers. PKG="wazuh-agent" -VERSION="4.4.1" +VERSION="4.4.2" ARCH="i386" CLASSES="none" CATEGORY="system" VENDOR="Wazuh, Inc " -PSTAMP="17March2023" +PSTAMP="24Apr2023" EMAIL="info@wazuh.com" ISTATES="S s 1 2 3" RSTATES="S s 1 2 3" diff --git a/stack/dashboard/deb/debian/changelog b/stack/dashboard/deb/debian/changelog index a010a57c4f..ee7bf0a481 100644 --- a/stack/dashboard/deb/debian/changelog +++ b/stack/dashboard/deb/debian/changelog @@ -1,3 +1,9 @@ +wazuh-dashboard (4.4.2-RELEASE) stable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/ + + -- Wazuh, Inc Mon, 24 Apr 2023 12:31:50 +0000 + wazuh-dashboard (4.4.1-RELEASE) stable; urgency=low * More info: https://documentation.wazuh.com/current/release-notes/ diff --git a/stack/dashboard/rpm/wazuh-dashboard.spec b/stack/dashboard/rpm/wazuh-dashboard.spec index 9802d8195e..dad7091970 100644 --- a/stack/dashboard/rpm/wazuh-dashboard.spec +++ b/stack/dashboard/rpm/wazuh-dashboard.spec @@ -397,6 +397,8 @@ rm -fr %{buildroot} %attr(640, root, root) "/etc/systemd/system/wazuh-dashboard.service" %changelog +* Mon Apr 24 2023 support - 4.4.2 +- More info: https://documentation.wazuh.com/current/release-notes/ * Mon Apr 17 2023 support - 4.4.1 - More info: https://documentation.wazuh.com/current/release-notes/ * Wed Jan 18 2023 support - 4.4.0 diff --git a/stack/indexer/deb/debian/changelog b/stack/indexer/deb/debian/changelog index 8be4ebbd57..1d424002c9 100644 --- a/stack/indexer/deb/debian/changelog +++ b/stack/indexer/deb/debian/changelog @@ -1,3 +1,9 @@ +wazuh-indexer (4.4.2-RELEASE) stable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/ + + -- Wazuh, Inc Mon, 24 Apr 2023 12:31:50 +0000 + wazuh-indexer (4.4.1-RELEASE) stable; urgency=low * More info: https://documentation.wazuh.com/current/release-notes/ diff --git a/tests/unattended/unit/suites/test-common.sh b/tests/unattended/unit/suites/test-common.sh index f27c4ae714..8a28b02abc 100644 --- a/tests/unattended/unit/suites/test-common.sh +++ b/tests/unattended/unit/suites/test-common.sh @@ -61,7 +61,7 @@ test-04-common_checkInstalled-all-installed-yum() { @mocktrue yum list installed - @mock grep wazuh-manager === @echo wazuh-manager.x86_64 4.4.1-1 @wazuh + @mock grep wazuh-manager === @echo wazuh-manager.x86_64 4.4.2-1 @wazuh @mkdir /var/ossec @mock grep wazuh-indexer === @echo wazuh-indexer.x86_64 1.13.2-1 @wazuh @@ -105,7 +105,7 @@ test-04-common_checkInstalled-all-installed-yum() { } test-05-common_checkInstalled-all-installed-yum-assert() { - @echo "wazuh-manager.x86_64 4.4.1-1 @wazuh" + @echo "wazuh-manager.x86_64 4.4.2-1 @wazuh" @echo 1 @echo "wazuh-indexer.x86_64 1.13.2-1 @wazuh" diff --git a/tests/unattended/unit/suites/test-dashboard.sh b/tests/unattended/unit/suites/test-dashboard.sh index 26be259fd7..ec144850d4 100644 --- a/tests/unattended/unit/suites/test-dashboard.sh +++ b/tests/unattended/unit/suites/test-dashboard.sh @@ -6,7 +6,7 @@ source "${base_dir}"/bach.sh @setup-test { @ignore common_logger k_certs_path="/etc/wazuh-dashboard/certs/" - wazuh_version="4.4.1" + wazuh_version="4.4.2" elasticsearch_oss_version="7.10.2" wazuh_kibana_plugin_revision="1" repobaseurl="https://packages.wazuh.com/4.x" diff --git a/unattended_installer/install_functions/installVariables.sh b/unattended_installer/install_functions/installVariables.sh index 77a8c500a7..d323004fe9 100644 --- a/unattended_installer/install_functions/installVariables.sh +++ b/unattended_installer/install_functions/installVariables.sh @@ -8,7 +8,7 @@ ## Package vars readonly wazuh_major="4.4" -readonly wazuh_version="4.4.1" +readonly wazuh_version="4.4.2" readonly filebeat_version="7.10.2" readonly wazuh_install_vesion="0.1" From 83c09ad3418c61ee03c29e5f687f8a28d7948df8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Correa=20Rodr=C3=ADguez?= Date: Mon, 17 Apr 2023 15:59:26 +0200 Subject: [PATCH 304/328] Fixed conflicts - changelog --- stack/indexer/rpm/wazuh-indexer.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stack/indexer/rpm/wazuh-indexer.spec b/stack/indexer/rpm/wazuh-indexer.spec index 2bd5a3cfbe..6e117517e9 100755 --- a/stack/indexer/rpm/wazuh-indexer.spec +++ b/stack/indexer/rpm/wazuh-indexer.spec @@ -1376,7 +1376,7 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/jdk/lib/security/blocked.certs %changelog -* Fri May 05 2023 support - %{version} +* Mon Apr 17 2023 support - 4.4.1 - More info: https://documentation.wazuh.com/current/release-notes/ * Wed Jan 18 2023 support - 4.4.0 - More info: https://documentation.wazuh.com/current/release-notes/ From d61f1335d45b8b85dcd3190a8e29f01a09f8aa9a Mon Sep 17 00:00:00 2001 From: Raul Del Pozo Moreno Date: Mon, 17 Apr 2023 18:07:07 +0200 Subject: [PATCH 305/328] Fixed changelog separation --- CHANGELOG.md | 1 + debs/SPECS/wazuh-agent/debian/changelog | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85b0337598..47952e268f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file. ## [v4.5.0] - https://github.com/wazuh/wazuh-packages/releases/tag/v4.5.0 + ## [v4.4.2] - https://github.com/wazuh/wazuh-packages/releases/tag/v4.4.2 diff --git a/debs/SPECS/wazuh-agent/debian/changelog b/debs/SPECS/wazuh-agent/debian/changelog index 4968249684..15e9245d8f 100644 --- a/debs/SPECS/wazuh-agent/debian/changelog +++ b/debs/SPECS/wazuh-agent/debian/changelog @@ -3,6 +3,7 @@ wazuh-agent (4.5.0-RELEASE) stable; urgency=low * More info: https://documentation.wazuh.com/current/release-notes/ -- Wazuh, Inc Fri, 05 May 2023 11:56:07 +0000 + wazuh-agent (4.4.2-RELEASE) stable; urgency=low * More info: https://documentation.wazuh.com/current/release-notes/ From 9e408335216a5f2f494d1da4d476590efa3b020c Mon Sep 17 00:00:00 2001 From: dfolcha Date: Wed, 7 Sep 2022 16:08:30 +0200 Subject: [PATCH 306/328] Add debug symbols to debug packages binary --- rpms/SPECS/wazuh-agent.spec | 16 +++++++--------- rpms/SPECS/wazuh-manager.spec | 17 ++++++++--------- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/rpms/SPECS/wazuh-agent.spec b/rpms/SPECS/wazuh-agent.spec index 3d48266403..3316936b40 100644 --- a/rpms/SPECS/wazuh-agent.spec +++ b/rpms/SPECS/wazuh-agent.spec @@ -1,3 +1,10 @@ +%if %{_debugenabled} == yes + %global _enable_debug_package 0 + %global debug_package %{nil} + %global __os_install_post %{nil} + %define __strip /bin/true +%endif + 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 Version: 4.3.11 @@ -171,9 +178,6 @@ 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/ -if [ %{_debugenabled} = "yes" ]; then - %{_rpmconfigdir}/find-debuginfo.sh -fi exit 0 %pre @@ -610,12 +614,6 @@ rm -fr %{buildroot} %dir %attr(750, root, wazuh) %{_localstatedir}/wodles/gcloud %attr(750, root, wazuh) %{_localstatedir}/wodles/gcloud/* -%if %{_debugenabled} == "yes" -/usr/lib/debug/%{_localstatedir}/* -/usr/src/debug/%{name}-%{version}/* -%endif - - %changelog * Thu Dec 08 2022 support - 4.3.11 - More info: https://documentation.wazuh.com/current/release-notes/ diff --git a/rpms/SPECS/wazuh-manager.spec b/rpms/SPECS/wazuh-manager.spec index a1214465fa..a231772e4d 100644 --- a/rpms/SPECS/wazuh-manager.spec +++ b/rpms/SPECS/wazuh-manager.spec @@ -1,3 +1,10 @@ +%if %{_debugenabled} == yes + %global _enable_debug_package 0 + %global debug_package %{nil} + %global __os_install_post %{nil} + %define __strip /bin/true +%endif + 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 Version: 4.3.11 @@ -21,6 +28,7 @@ BuildRequires: coreutils glibc-devel automake autoconf libtool policycoreutils-p ExclusiveOS: linux + %description 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: @@ -166,9 +174,6 @@ 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/ -if [ %{_debugenabled} = "yes" ]; then - %{_rpmconfigdir}/find-debuginfo.sh -fi exit 0 %pre @@ -826,12 +831,6 @@ rm -fr %{buildroot} %dir %attr(750, root, wazuh) %{_localstatedir}/wodles/gcloud %attr(750, root, wazuh) %{_localstatedir}/wodles/gcloud/* -%if %{_debugenabled} == "yes" -/usr/lib/debug/%{_localstatedir}/* -/usr/src/debug/%{name}-%{version}/* -%endif - - %changelog * Thu Dec 08 2022 support - 4.3.11 - More info: https://documentation.wazuh.com/current/release-notes/ From f3a142772fd0cbe09d0769fb6f003037cc5ee522 Mon Sep 17 00:00:00 2001 From: dfolcha Date: Wed, 7 Sep 2022 16:08:30 +0200 Subject: [PATCH 307/328] Add debug symbols to debug packages binary --- rpms/SPECS/wazuh-agent.spec | 16 +++++++--------- rpms/SPECS/wazuh-manager.spec | 17 ++++++++--------- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/rpms/SPECS/wazuh-agent.spec b/rpms/SPECS/wazuh-agent.spec index f348465325..f7018f4548 100644 --- a/rpms/SPECS/wazuh-agent.spec +++ b/rpms/SPECS/wazuh-agent.spec @@ -1,3 +1,10 @@ +%if %{_debugenabled} == yes + %global _enable_debug_package 0 + %global debug_package %{nil} + %global __os_install_post %{nil} + %define __strip /bin/true +%endif + 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 Version: 4.4.2 @@ -171,9 +178,6 @@ 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/ -if [ %{_debugenabled} = "yes" ]; then - %{_rpmconfigdir}/find-debuginfo.sh -fi exit 0 %pre @@ -615,12 +619,6 @@ rm -fr %{buildroot} %dir %attr(750, root, wazuh) %{_localstatedir}/wodles/gcloud %attr(750, root, wazuh) %{_localstatedir}/wodles/gcloud/* -%if %{_debugenabled} == "yes" -/usr/lib/debug/%{_localstatedir}/* -/usr/src/debug/%{name}-%{version}/* -%endif - - %changelog * Mon Apr 24 2023 support - 4.4.2 - More info: https://documentation.wazuh.com/current/release-notes/ diff --git a/rpms/SPECS/wazuh-manager.spec b/rpms/SPECS/wazuh-manager.spec index db07715a93..c352f105e7 100644 --- a/rpms/SPECS/wazuh-manager.spec +++ b/rpms/SPECS/wazuh-manager.spec @@ -1,3 +1,10 @@ +%if %{_debugenabled} == yes + %global _enable_debug_package 0 + %global debug_package %{nil} + %global __os_install_post %{nil} + %define __strip /bin/true +%endif + 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 Version: 4.4.2 @@ -21,6 +28,7 @@ BuildRequires: coreutils glibc-devel automake autoconf libtool policycoreutils-p ExclusiveOS: linux + %description 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: @@ -170,9 +178,6 @@ 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/ -if [ %{_debugenabled} = "yes" ]; then - %{_rpmconfigdir}/find-debuginfo.sh -fi exit 0 %pre @@ -834,12 +839,6 @@ rm -fr %{buildroot} %dir %attr(750, root, wazuh) %{_localstatedir}/wodles/gcloud %attr(750, root, wazuh) %{_localstatedir}/wodles/gcloud/* -%if %{_debugenabled} == "yes" -/usr/lib/debug/%{_localstatedir}/* -/usr/src/debug/%{name}-%{version}/* -%endif - - %changelog * Mon Apr 24 2023 support - 4.4.2 - More info: https://documentation.wazuh.com/current/release-notes/ From 5822eff9451c93ac5e1b80fc7f0ec40a199cba62 Mon Sep 17 00:00:00 2001 From: Daniel Folch Date: Tue, 18 Apr 2023 12:12:14 +0200 Subject: [PATCH 308/328] Fix error in debian/rules Co-authored-by: Juan Nicolas Asselle --- debs/SPECS/wazuh-manager/debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debs/SPECS/wazuh-manager/debian/rules b/debs/SPECS/wazuh-manager/debian/rules index 4a1b9a340a..325d0a892d 100644 --- a/debs/SPECS/wazuh-manager/debian/rules +++ b/debs/SPECS/wazuh-manager/debian/rules @@ -167,7 +167,7 @@ override_dh_install: cp etc/templates/config/darwin/18/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/darwin/19 cp etc/templates/config/darwin/20/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/darwin/20 cp etc/templates/config/darwin/21/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/darwin/21 - cp etc/templates/config/darwin/21/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/darwin/22 + cp etc/templates/config/darwin/22/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/darwin/22 cp etc/templates/config/debian/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/debian cp etc/templates/config/debian/7/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/debian/7 From 7a4da777aaa1dd5ee29b25a07372b08763d9d670 Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Thu, 9 Feb 2023 13:56:11 +0100 Subject: [PATCH 309/328] Added installCommon_installCheckDependencies function --- .../install_functions/installCommon.sh | 59 ++++++++++++++++++- .../install_functions/installMain.sh | 4 +- 2 files changed, 59 insertions(+), 4 deletions(-) diff --git a/unattended_installer/install_functions/installCommon.sh b/unattended_installer/install_functions/installCommon.sh index 7710a87bbe..2a08d3063d 100644 --- a/unattended_installer/install_functions/installCommon.sh +++ b/unattended_installer/install_functions/installCommon.sh @@ -262,10 +262,10 @@ function installCommon_getPass() { done } -function installCommon_installPrerequisites() { +function installCommon_installCheckDependencies() { if [ "${sys_type}" == "yum" ]; then - dependencies=( curl libcap tar gnupg openssl lsof ) + dependencies=( systemd grep tar coreutils sed procps gawk lsof curl openssl ) not_installed=() for dep in "${dependencies[@]}"; do if [ "${dep}" == "openssl" ]; then @@ -291,7 +291,60 @@ function installCommon_installPrerequisites() { elif [ "${sys_type}" == "apt-get" ]; then eval "apt-get update -q ${debug}" - dependencies=( apt-transport-https curl libcap2-bin tar software-properties-common gnupg openssl lsof ) + dependencies=( systemd grep tar coreutils sed procps gawk lsof curl openssl ) + not_installed=() + + for dep in "${dependencies[@]}"; do + if ! apt list --installed 2>/dev/null | grep -q -E ^"${dep}"; then + not_installed+=("${dep}") + fi + done + + if [ "${#not_installed[@]}" -gt 0 ]; then + common_logger "--- Dependencies ----" + for dep in "${not_installed[@]}"; do + common_logger "Installing $dep." + installCommon_aptInstall "${dep}" + if [ "${install_result}" != 0 ]; then + common_logger -e "Cannot install dependency: ${dep}." + exit 1 + fi + done + fi + fi + +} + +function installCommon_installPrerequisites() { + + if [ "${sys_type}" == "yum" ]; then + dependencies=( libcap gnupg ) + not_installed=() + for dep in "${dependencies[@]}"; do + if [ "${dep}" == "openssl" ]; then + if ! yum list installed 2>/dev/null | grep -q -E ^"${dep}\.";then + not_installed+=("${dep}") + fi + elif ! yum list installed 2>/dev/null | grep -q -E ^"${dep}";then + not_installed+=("${dep}") + fi + done + + if [ "${#not_installed[@]}" -gt 0 ]; then + common_logger "--- Dependencies ---" + for dep in "${not_installed[@]}"; do + common_logger "Installing $dep." + eval "yum install ${dep} -y ${debug}" + if [ "${PIPESTATUS[0]}" != 0 ]; then + common_logger -e "Cannot install dependency: ${dep}." + exit 1 + fi + done + fi + + elif [ "${sys_type}" == "apt-get" ]; then + eval "apt-get update -q ${debug}" + dependencies=( apt-transport-https libcap2-bin software-properties-common gnupg ) not_installed=() for dep in "${dependencies[@]}"; do diff --git a/unattended_installer/install_functions/installMain.sh b/unattended_installer/install_functions/installMain.sh index c97dcfc366..0da0857a14 100755 --- a/unattended_installer/install_functions/installMain.sh +++ b/unattended_installer/install_functions/installMain.sh @@ -202,11 +202,13 @@ function main() { # -------------- Uninstall case ------------------------------------ + common_checkSystem + installCommon_installCheckDependencies + if [ -z "${download}" ]; then check_dist fi - common_checkSystem common_checkInstalled checks_arguments if [ -n "${uninstall}" ]; then From 060c3dc7006b06620e74015d10a983ffd5a888e4 Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Fri, 10 Feb 2023 11:30:15 +0100 Subject: [PATCH 310/328] Avoid installing dependencies in uninstallation --- unattended_installer/install_functions/installMain.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/unattended_installer/install_functions/installMain.sh b/unattended_installer/install_functions/installMain.sh index 0da0857a14..eb5a86cfef 100755 --- a/unattended_installer/install_functions/installMain.sh +++ b/unattended_installer/install_functions/installMain.sh @@ -203,7 +203,10 @@ function main() { # -------------- Uninstall case ------------------------------------ common_checkSystem - installCommon_installCheckDependencies + + if [ -z "${uninstall}" ]; then + installCommon_installCheckDependencies + fi if [ -z "${download}" ]; then check_dist From fbd22a2589e13fa8a6d8553d19fe71a9e737c8a6 Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Tue, 14 Feb 2023 13:51:49 +0100 Subject: [PATCH 311/328] Modularized the installation of dependencies --- .../install_functions/installCommon.sh | 139 +++++++----------- 1 file changed, 57 insertions(+), 82 deletions(-) diff --git a/unattended_installer/install_functions/installCommon.sh b/unattended_installer/install_functions/installCommon.sh index 2a08d3063d..e1169d894e 100644 --- a/unattended_installer/install_functions/installCommon.sh +++ b/unattended_installer/install_functions/installCommon.sh @@ -90,6 +90,31 @@ function installCommon_aptInstall() { } +function installCommon_aptInstallList(){ + + dependencies=("$@") + not_installed=() + + for dep in "${dependencies[@]}"; do + if ! apt list --installed 2>/dev/null | grep -q -E ^"${dep}"; then + not_installed+=("${dep}") + fi + done + + if [ "${#not_installed[@]}" -gt 0 ]; then + common_logger "--- Dependencies ----" + for dep in "${not_installed[@]}"; do + common_logger "Installing $dep." + installCommon_aptInstall "${dep}" + if [ "${install_result}" != 0 ]; then + common_logger -e "Cannot install dependency: ${dep}." + exit 1 + fi + done + fi + +} + function installCommon_changePasswordApi() { #Change API password tool @@ -266,51 +291,12 @@ function installCommon_installCheckDependencies() { if [ "${sys_type}" == "yum" ]; then dependencies=( systemd grep tar coreutils sed procps gawk lsof curl openssl ) - not_installed=() - for dep in "${dependencies[@]}"; do - if [ "${dep}" == "openssl" ]; then - if ! yum list installed 2>/dev/null | grep -q "${dep}\.";then - not_installed+=("${dep}") - fi - elif ! yum list installed 2>/dev/null | grep -q "${dep}";then - not_installed+=("${dep}") - fi - done - - if [ "${#not_installed[@]}" -gt 0 ]; then - common_logger "--- Dependencies ---" - for dep in "${not_installed[@]}"; do - common_logger "Installing $dep." - eval "yum install ${dep} -y ${debug}" - if [ "${PIPESTATUS[0]}" != 0 ]; then - common_logger -e "Cannot install dependency: ${dep}." - exit 1 - fi - done - fi + installCommon_yumInstallList "${dependencies[@]}" elif [ "${sys_type}" == "apt-get" ]; then eval "apt-get update -q ${debug}" dependencies=( systemd grep tar coreutils sed procps gawk lsof curl openssl ) - not_installed=() - - for dep in "${dependencies[@]}"; do - if ! apt list --installed 2>/dev/null | grep -q -E ^"${dep}"; then - not_installed+=("${dep}") - fi - done - - if [ "${#not_installed[@]}" -gt 0 ]; then - common_logger "--- Dependencies ----" - for dep in "${not_installed[@]}"; do - common_logger "Installing $dep." - installCommon_aptInstall "${dep}" - if [ "${install_result}" != 0 ]; then - common_logger -e "Cannot install dependency: ${dep}." - exit 1 - fi - done - fi + installCommon_aptInstallList fi } @@ -319,51 +305,12 @@ function installCommon_installPrerequisites() { if [ "${sys_type}" == "yum" ]; then dependencies=( libcap gnupg ) - not_installed=() - for dep in "${dependencies[@]}"; do - if [ "${dep}" == "openssl" ]; then - if ! yum list installed 2>/dev/null | grep -q -E ^"${dep}\.";then - not_installed+=("${dep}") - fi - elif ! yum list installed 2>/dev/null | grep -q -E ^"${dep}";then - not_installed+=("${dep}") - fi - done - - if [ "${#not_installed[@]}" -gt 0 ]; then - common_logger "--- Dependencies ---" - for dep in "${not_installed[@]}"; do - common_logger "Installing $dep." - eval "yum install ${dep} -y ${debug}" - if [ "${PIPESTATUS[0]}" != 0 ]; then - common_logger -e "Cannot install dependency: ${dep}." - exit 1 - fi - done - fi + installCommon_yumInstallList "${dependencies[@]}" elif [ "${sys_type}" == "apt-get" ]; then eval "apt-get update -q ${debug}" dependencies=( apt-transport-https libcap2-bin software-properties-common gnupg ) - not_installed=() - - for dep in "${dependencies[@]}"; do - if ! apt list --installed 2>/dev/null | grep -q "${dep}"; then - not_installed+=("${dep}") - fi - done - - if [ "${#not_installed[@]}" -gt 0 ]; then - common_logger "--- Dependencies ----" - for dep in "${not_installed[@]}"; do - common_logger "Installing $dep." - installCommon_aptInstall "${dep}" - if [ "${install_result}" != 0 ]; then - common_logger -e "Cannot install dependency: ${dep}." - exit 1 - fi - done - fi + installCommon_aptInstallList "${dependencies[@]}" fi } @@ -667,3 +614,31 @@ function installCommon_startService() { fi } + +function installCommon_yumInstallList(){ + + dependencies=("$@") + not_installed=() + for dep in "${dependencies[@]}"; do + if [ "${dep}" == "openssl" ]; then + if ! yum list installed 2>/dev/null | grep -q -E ^"${dep}\.";then + not_installed+=("${dep}") + fi + elif ! yum list installed 2>/dev/null | grep -q -E ^"${dep}";then + not_installed+=("${dep}") + fi + done + + if [ "${#not_installed[@]}" -gt 0 ]; then + common_logger "--- Dependencies ---" + for dep in "${not_installed[@]}"; do + common_logger "Installing $dep." + eval "yum install ${dep} -y ${debug}" + if [ "${PIPESTATUS[0]}" != 0 ]; then + common_logger -e "Cannot install dependency: ${dep}." + exit 1 + fi + done + fi + +} From 6efe776da74e8e2097afe7c76d83d21e2c24fab4 Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Tue, 14 Feb 2023 13:56:14 +0100 Subject: [PATCH 312/328] Forgot adding dependencies array --- unattended_installer/install_functions/installCommon.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unattended_installer/install_functions/installCommon.sh b/unattended_installer/install_functions/installCommon.sh index e1169d894e..8031b53fc8 100644 --- a/unattended_installer/install_functions/installCommon.sh +++ b/unattended_installer/install_functions/installCommon.sh @@ -296,7 +296,7 @@ function installCommon_installCheckDependencies() { elif [ "${sys_type}" == "apt-get" ]; then eval "apt-get update -q ${debug}" dependencies=( systemd grep tar coreutils sed procps gawk lsof curl openssl ) - installCommon_aptInstallList + installCommon_aptInstallList "${dependencies[@]}" fi } From 4458bcfe1b19f765193f18559a40f829f305a33c Mon Sep 17 00:00:00 2001 From: davidcr01 Date: Fri, 17 Feb 2023 14:02:00 +0100 Subject: [PATCH 313/328] Changed check of the installed packages --- .../install_functions/installCommon.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/unattended_installer/install_functions/installCommon.sh b/unattended_installer/install_functions/installCommon.sh index 8031b53fc8..6e6ada6f98 100644 --- a/unattended_installer/install_functions/installCommon.sh +++ b/unattended_installer/install_functions/installCommon.sh @@ -96,7 +96,7 @@ function installCommon_aptInstallList(){ not_installed=() for dep in "${dependencies[@]}"; do - if ! apt list --installed 2>/dev/null | grep -q -E ^"${dep}"; then + if ! apt list --installed 2>/dev/null | grep -q -E ^"${dep}"\/; then not_installed+=("${dep}") fi done @@ -290,7 +290,7 @@ function installCommon_getPass() { function installCommon_installCheckDependencies() { if [ "${sys_type}" == "yum" ]; then - dependencies=( systemd grep tar coreutils sed procps gawk lsof curl openssl ) + dependencies=( systemd grep tar coreutils sed procps-ng gawk lsof curl openssl ) installCommon_yumInstallList "${dependencies[@]}" elif [ "${sys_type}" == "apt-get" ]; then @@ -304,7 +304,7 @@ function installCommon_installCheckDependencies() { function installCommon_installPrerequisites() { if [ "${sys_type}" == "yum" ]; then - dependencies=( libcap gnupg ) + dependencies=( libcap gnupg2 ) installCommon_yumInstallList "${dependencies[@]}" elif [ "${sys_type}" == "apt-get" ]; then @@ -620,11 +620,7 @@ function installCommon_yumInstallList(){ dependencies=("$@") not_installed=() for dep in "${dependencies[@]}"; do - if [ "${dep}" == "openssl" ]; then - if ! yum list installed 2>/dev/null | grep -q -E ^"${dep}\.";then - not_installed+=("${dep}") - fi - elif ! yum list installed 2>/dev/null | grep -q -E ^"${dep}";then + if ! yum list installed 2>/dev/null | grep -q -E ^"${dep}"\\.;then not_installed+=("${dep}") fi done From 0f9f73017c35cbb7cacc806593b217e934e1d5a3 Mon Sep 17 00:00:00 2001 From: DFolchA Date: Wed, 19 Apr 2023 10:15:25 +0200 Subject: [PATCH 314/328] Install checks prerequisites just before executing the checks --- unattended_installer/install_functions/installMain.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/unattended_installer/install_functions/installMain.sh b/unattended_installer/install_functions/installMain.sh index eb5a86cfef..92dae05475 100755 --- a/unattended_installer/install_functions/installMain.sh +++ b/unattended_installer/install_functions/installMain.sh @@ -203,10 +203,6 @@ function main() { # -------------- Uninstall case ------------------------------------ common_checkSystem - - if [ -z "${uninstall}" ]; then - installCommon_installCheckDependencies - fi if [ -z "${download}" ]; then check_dist @@ -221,6 +217,10 @@ function main() { # -------------- Preliminary checks -------------------------------- + if [ -z "${uninstall}" ]; then + installCommon_installCheckDependencies + fi + if [ -z "${configurations}" ] && [ -z "${AIO}" ] && [ -z "${download}" ]; then checks_previousCertificate fi @@ -249,6 +249,7 @@ function main() { # -------------- Prerequisites and Wazuh repo ---------------------- + if [ -n "${AIO}" ] || [ -n "${indexer}" ] || [ -n "${dashboard}" ] || [ -n "${wazuh}" ]; then installCommon_installPrerequisites installCommon_addWazuhRepo From 7f7bc0a53788b49ae43ea7808eabd26c0e780841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Rodr=C3=ADguez?= Date: Tue, 29 Nov 2022 13:00:26 +0100 Subject: [PATCH 315/328] Merge pull request #1956 from wazuh/user-error-solaris Fix error when creating user in Solaris 10 --- solaris/solaris10/postremove.sh | 4 ++-- solaris/solaris10/preinstall.sh | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/solaris/solaris10/postremove.sh b/solaris/solaris10/postremove.sh index 0ce350c735..409142bd75 100755 --- a/solaris/solaris10/postremove.sh +++ b/solaris/solaris10/postremove.sh @@ -2,10 +2,10 @@ # postremove script for wazuh-agent # Wazuh, Inc 2015 -if getent passwd wazuh; then +if getent passwd wazuh > /dev/null 2>&1; then userdel wazuh fi -if getent group wazuh; then +if getent group wazuh > /dev/null 2>&1; then groupdel wazuh fi diff --git a/solaris/solaris10/preinstall.sh b/solaris/solaris10/preinstall.sh index 9b5e7d17f0..8fd757feec 100755 --- a/solaris/solaris10/preinstall.sh +++ b/solaris/solaris10/preinstall.sh @@ -34,13 +34,13 @@ if [ ! -f ${OSMYSHELL} ]; then fi fi -getent group | grep "^wazuh" -if [ "$?" -eq 1 ]; then +getent group wazuh > /dev/null 2>&1 +if [ "$?" -ne 0 ]; then groupadd ${GROUP} fi -getent passwd wazuh -if [ "$?" -eq 1 ]; then +getent passwd wazuh > /dev/null 2>&1 +if [ "$?" -ne 0 ]; then useradd -d ${DIR} -s ${OSMYSHELL} -g ${GROUP} ${USER} > /dev/null 2>&1 fi From 65fffab3776234b3dcf7d36bb11bd2038746b22a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Acu=C3=B1a?= Date: Mon, 24 Apr 2023 12:08:23 -0300 Subject: [PATCH 316/328] Distribution version matrix update --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5f6b21366f..ad8f5cde94 100644 --- a/README.md +++ b/README.md @@ -30,19 +30,21 @@ In this repository, you can find the necessary tools to build a Wazuh package fo The following table shows the references for the versions of each component. -### Dashboard +### Wazuh dashboard | Wazuh dashboard | Opensearch dashboards | |-----------------|-----------------------| | 4.3.x | 1.2.0 | -| 4.4.x | 2.4.1 | +| 4.4.0 | 2.4.1 | +| 4.4.1 - 4.4.2 | 2.6.0 | -### Indexer +### Wazuh indexer | Wazuh indexer | Opensearch | |-----------------|-----------------------| | 4.3.x | 1.2.4 | -| 4.4.x | 2.4.1 | +| 4.4.0 | 2.4.1 | +| 4.4.1 - 4.4.2 | 2.6.0 | ## Contribute From 5137183d78b5018fad3c4f4876027f60b835cab4 Mon Sep 17 00:00:00 2001 From: fcaffieri Date: Mon, 24 Apr 2023 18:17:39 -0300 Subject: [PATCH 317/328] Add fixes of hpd-ux package generation --- ...t => depothelper-2.20-ia64_64-11.31.depot} | Bin 92160 -> 102400 bytes hp-ux/generate_wazuh_packages.sh | 81 ++++++++++++++---- 2 files changed, 62 insertions(+), 19 deletions(-) rename hp-ux/{depothelper-2.10-hppa_32-11.31.depot => depothelper-2.20-ia64_64-11.31.depot} (84%) diff --git a/hp-ux/depothelper-2.10-hppa_32-11.31.depot b/hp-ux/depothelper-2.20-ia64_64-11.31.depot similarity index 84% rename from hp-ux/depothelper-2.10-hppa_32-11.31.depot rename to hp-ux/depothelper-2.20-ia64_64-11.31.depot index d41efd2181c1eb79d865ac4b15fd5d95823de0d0..49fcf2923a52659ff8981a89bca15a1218a66bb7 100644 GIT binary patch delta 2941 zcmbVOL2DC17|q5QH)#x68>7ZnhY&(7ZFgsPc1EL74~q68?V;eI(xz!rQ;G>m3YBf4 z1P>x!HdES5QRzXinw8>FFCN94-upvzCWTlq3p+cP*$mL?iJbTbc0@yNL`a z5PK?XD|f|dbPZ`D5~a&rAN0RI)Jmsi9cskzF3`b9sFQLBOmRR+kaxiD#boeIy;5B( zH&t7i7MBBJ0$Bo{E9RVg^iftX#K0o;l1v6^GCu37aGXP$nt;OHL?jqK)`J!8oDV^e zf!Po6EJ(B`$bkN#78isCFA{w$5~Pvvyh}?`E6gDwVg>BAClBOc2gH~bkNs%Dd`CbF zFk&kYeb8XSYu>Zu0NBbsA2bAOrU*^WR&I;a=o(8$fTlfeD|sI@kb9DM(c0KnrhL#C z#1zP8cT95YhdpadV*ZA(AyB=C;}VWiyra5y#16y68qvLXM0Xd5>DAE)z0=OQ!nPT# zX&NkbuZ`AyffIWeNp7L;S*VvkVh6cr&_gWcLUiLwg5rHQU~27iT?w}>&%wUQy$UT= zpRq&3XYC0TMF*6xvon;i+X|Zo++<8*vO}nMlff8bmWZYsL}#}F&-r9t>N9@^>&Euq94_%aA_G- zT6OlAjIESgY(o!`ze_rQ)bA2~pe5+*+F9oaP7jTOo8TW@A(QE^IiPc`@H^q0dh}(O z&MjPaeiaKcJ->RNzAasHTC1DU*^{3x_VUQ;U=x(qTVQfI4<;+dVkQdu<9ItqE@TF7 zN6t~pitXkl-{xYnj`HfrjE5DH>BC)gL*z2Xc--A3-|H>{1)SjhEotJz%$yYa3k*jc Am;e9( delta 1416 zcmbW1K}+L67>4`BDz+Q7)gnc!1SwHLa5720h^)9RdMO@uFCt4>P^{>|7EB9@7Z091 z2+bfpDg~E4S0rBcKkOd7_$L(4qE4b76z4F_Wirg<$&;6Na&Xpl@UPQTN`nR=Xju{R za=nfw+gFCViD4Sli4c~9b+zVJS9kdGPNh<)Ho?B0j^u2#B*!rgxjYU~ZFAC9m zfVNDurP0j^#Tyelr$aEcsWiBijVUaa37xIa;>ZMObZ8ss(EyzmqeE-7oi>slN-0d8 zO0aByE=c=R^L}nliDj7bp`_mMsu-_^cwQ7~e6u&|-IZpzw?oLs0=~{|huTJj_t3Ja zV<6>~A(X$27gn~F_ZYwU@vy0Y#*UxT?EmB6m%F~za;3btU8%X>vhG&3#BLrBFAH!E zp!v4|8(;id4_qe{P4f$*a5Vs0BRLMk{s@J+Za(=r3yXZ~=`5VYeQy!UD*FyiuOO~z zA&AU!Y?S|qB}_2PPYaJ$K0w>1VaTHwu#4fE7`+x+Q_@C{*7YN{n;2wYaZ+fGA)eUs qKZVu|#u*mH=EVSQBDQhBe(BMMz6|pM?Z*Bxgx Date: Tue, 25 Apr 2023 10:11:31 +0200 Subject: [PATCH 318/328] Fix incorrect macOS version --- macos/package_files/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macos/package_files/build.sh b/macos/package_files/build.sh index 9f256c285b..f94537efbd 100755 --- a/macos/package_files/build.sh +++ b/macos/package_files/build.sh @@ -72,7 +72,7 @@ function build() { cp ${SOURCES_PATH}/etc/templates/config/darwin/19/sca.files ${INSTALLATION_SCRIPTS_DIR}/sca/darwin/19/ cp ${SOURCES_PATH}/etc/templates/config/darwin/20/sca.files ${INSTALLATION_SCRIPTS_DIR}/sca/darwin/20/ cp ${SOURCES_PATH}/etc/templates/config/darwin/21/sca.files ${INSTALLATION_SCRIPTS_DIR}/sca/darwin/21/ - cp ${SOURCES_PATH}/etc/templates/config/darwin/21/sca.files ${INSTALLATION_SCRIPTS_DIR}/sca/darwin/22/ + cp ${SOURCES_PATH}/etc/templates/config/darwin/22/sca.files ${INSTALLATION_SCRIPTS_DIR}/sca/darwin/22/ cp ${SOURCES_PATH}/src/VERSION ${INSTALLATION_SCRIPTS_DIR}/src/ cp ${SOURCES_PATH}/src/REVISION ${INSTALLATION_SCRIPTS_DIR}/src/ From 7a4ac2321412526f3647b0c904c676267def5d8b Mon Sep 17 00:00:00 2001 From: fcaffieri Date: Tue, 25 Apr 2023 11:32:31 -0300 Subject: [PATCH 319/328] Remove exit if build_enviroment finish successfully --- hp-ux/generate_wazuh_packages.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hp-ux/generate_wazuh_packages.sh b/hp-ux/generate_wazuh_packages.sh index 5409a07848..735e2f8d43 100755 --- a/hp-ux/generate_wazuh_packages.sh +++ b/hp-ux/generate_wazuh_packages.sh @@ -309,7 +309,6 @@ main() { if [[ "${build_env}" = "yes" ]]; then build_environment || exit 1 - exit 0 fi if [ -z "${checksum_dir}" ]; then @@ -323,4 +322,4 @@ main() { return 0 } -main "$@" \ No newline at end of file +main "$@" From 4eea0417a4dfbd3a5bea144b9b4d237286c762a8 Mon Sep 17 00:00:00 2001 From: fcaffieri Date: Tue, 25 Apr 2023 11:57:16 -0300 Subject: [PATCH 320/328] Add exit if build_enviroment finish successfully only when it is provisioning --- hp-ux/generate_wazuh_packages.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/hp-ux/generate_wazuh_packages.sh b/hp-ux/generate_wazuh_packages.sh index 735e2f8d43..896808cc81 100755 --- a/hp-ux/generate_wazuh_packages.sh +++ b/hp-ux/generate_wazuh_packages.sh @@ -309,6 +309,7 @@ main() { if [[ "${build_env}" = "yes" ]]; then build_environment || exit 1 + exit 0 fi if [ -z "${checksum_dir}" ]; then From f79bd767804b4061a012c50a00d420cd4660a6d7 Mon Sep 17 00:00:00 2001 From: jnasselle Date: Wed, 26 Apr 2023 15:35:54 -0300 Subject: [PATCH 321/328] Fix generation of ARM64/ARM32/PPC64LE deb packages --- debs/Debian/arm64/Dockerfile | 5 +++-- debs/Debian/armhf/Dockerfile | 5 +++-- debs/Debian/ppc64le/Dockerfile | 7 +++---- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/debs/Debian/arm64/Dockerfile b/debs/Debian/arm64/Dockerfile index 9e0be61006..f2d641ed3c 100644 --- a/debs/Debian/arm64/Dockerfile +++ b/debs/Debian/arm64/Dockerfile @@ -3,8 +3,9 @@ FROM arm64v8/debian:stretch ENV DEBIAN_FRONTEND noninteractive # Installing necessary packages -RUN echo "deb http://deb.debian.org/debian stretch contrib non-free" >> /etc/apt/sources.list && \ - echo "deb-src http://deb.debian.org/debian stretch main contrib non-free" >> /etc/apt/sources.list && \ +RUN echo "deb http://archive.debian.org/debian stretch contrib main non-free" > /etc/apt/sources.list && \ + echo "deb http://archive.debian.org/debian-security stretch/updates main" >> /etc/apt/sources.list && \ + echo "deb-src http://archive.debian.org/debian stretch main" >> /etc/apt/sources.list && \ apt-get update && apt-get install -y --allow-change-held-packages apt apt-utils \ curl gcc g++ make sudo expect gnupg \ perl-base perl wget libc-bin libc6 libc6-dev \ diff --git a/debs/Debian/armhf/Dockerfile b/debs/Debian/armhf/Dockerfile index c526d17cb8..ae6aa76d71 100644 --- a/debs/Debian/armhf/Dockerfile +++ b/debs/Debian/armhf/Dockerfile @@ -3,8 +3,9 @@ FROM arm32v7/debian:stretch ENV DEBIAN_FRONTEND noninteractive # Installing necessary packages -RUN echo "deb http://deb.debian.org/debian stretch contrib non-free" >> /etc/apt/sources.list && \ - echo "deb-src http://deb.debian.org/debian stretch main contrib non-free" >> /etc/apt/sources.list && \ +RUN echo "deb http://archive.debian.org/debian stretch contrib main non-free" > /etc/apt/sources.list && \ + echo "deb http://archive.debian.org/debian-security stretch/updates main" >> /etc/apt/sources.list && \ + echo "deb-src http://archive.debian.org/debian stretch main" >> /etc/apt/sources.list && \ apt-get update && apt-get install -y --allow-change-held-packages apt-utils \ curl gcc make wget sudo expect gnupg perl-base \ perl libc-bin libc6 libc6-dev \ diff --git a/debs/Debian/ppc64le/Dockerfile b/debs/Debian/ppc64le/Dockerfile index f0fe23d3f9..2afa693182 100644 --- a/debs/Debian/ppc64le/Dockerfile +++ b/debs/Debian/ppc64le/Dockerfile @@ -2,11 +2,10 @@ FROM ppc64le/debian:stretch ENV DEBIAN_FRONTEND noninteractive -RUN apt-get -v - # Installing necessary packages -RUN echo "deb http://deb.debian.org/debian stretch main contrib non-free" >> /etc/apt/sources.list && \ - echo "deb-src http://deb.debian.org/debian stretch main contrib non-free" >> /etc/apt/sources.list && \ +RUN echo "deb http://archive.debian.org/debian stretch contrib main non-free" > /etc/apt/sources.list && \ + echo "deb http://archive.debian.org/debian-security stretch/updates main" >> /etc/apt/sources.list && \ + echo "deb-src http://archive.debian.org/debian stretch main" >> /etc/apt/sources.list && \ apt-get update && apt-get install -y --allow-change-held-packages apt-utils && \ apt-get install -y --allow-change-held-packages \ curl gcc make sudo expect gnupg perl-base perl wget \ From 316cf0c48aa5cae23846e3e7d16a024d3f51cd76 Mon Sep 17 00:00:00 2001 From: DFolchA Date: Thu, 27 Apr 2023 09:24:51 +0200 Subject: [PATCH 322/328] Add archives repository to Debian Stretch --- .github/actions/test-install-components/install_component.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/actions/test-install-components/install_component.sh b/.github/actions/test-install-components/install_component.sh index 9f507d1f53..2d8ea93cc5 100644 --- a/.github/actions/test-install-components/install_component.sh +++ b/.github/actions/test-install-components/install_component.sh @@ -7,6 +7,11 @@ if [ -f /etc/os-release ]; then find /etc/yum.repos.d/ -type f -exec sed -i 's/mirrorlist/#mirrorlist/g' {} \; find /etc/yum.repos.d/ -type f -exec sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' {} \; fi + + if [ "$ID" = "debian" ] && [ "$VERSION_ID" = "9" ]; then + echo "deb http://archive.debian.org/debian stretch contrib main non-free" > /etc/apt/sources.list + echo "deb http://archive.debian.org/debian-security stretch/updates main" >> /etc/apt/sources.list + fi fi if [ -f /etc/redhat-release ]; then From 96c4043c428e58537a315dcdaa095c6475514011 Mon Sep 17 00:00:00 2001 From: DFolchA Date: Thu, 27 Apr 2023 09:24:51 +0200 Subject: [PATCH 323/328] Add archives repository to Debian Stretch --- .github/actions/test-install-components/install_component.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/actions/test-install-components/install_component.sh b/.github/actions/test-install-components/install_component.sh index 9f507d1f53..2d8ea93cc5 100644 --- a/.github/actions/test-install-components/install_component.sh +++ b/.github/actions/test-install-components/install_component.sh @@ -7,6 +7,11 @@ if [ -f /etc/os-release ]; then find /etc/yum.repos.d/ -type f -exec sed -i 's/mirrorlist/#mirrorlist/g' {} \; find /etc/yum.repos.d/ -type f -exec sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' {} \; fi + + if [ "$ID" = "debian" ] && [ "$VERSION_ID" = "9" ]; then + echo "deb http://archive.debian.org/debian stretch contrib main non-free" > /etc/apt/sources.list + echo "deb http://archive.debian.org/debian-security stretch/updates main" >> /etc/apt/sources.list + fi fi if [ -f /etc/redhat-release ]; then From bdb17c7ef46967a0756972e255dfeaa2f6a07922 Mon Sep 17 00:00:00 2001 From: Raul Del Pozo Moreno Date: Fri, 28 Apr 2023 17:09:28 +0200 Subject: [PATCH 324/328] Fix 4.3.11 changelog date --- aix/SPECS/wazuh-agent-aix.spec | 2 +- debs/SPECS/wazuh-agent/debian/changelog | 2 +- debs/SPECS/wazuh-manager/debian/changelog | 2 +- rpms/SPECS/wazuh-agent.spec | 2 +- rpms/SPECS/wazuh-manager.spec | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/aix/SPECS/wazuh-agent-aix.spec b/aix/SPECS/wazuh-agent-aix.spec index fed874180c..a9bdc4d98e 100644 --- a/aix/SPECS/wazuh-agent-aix.spec +++ b/aix/SPECS/wazuh-agent-aix.spec @@ -290,7 +290,7 @@ rm -fr %{buildroot} %attr(750, root, wazuh) %{_localstatedir}/wodles/* %changelog -* Thu Dec 08 2022 support - 4.3.11 +* Mon Apr 24 2023 support - 4.3.11 - More info: https://documentation.wazuh.com/current/release-notes/ * Thu Nov 10 2022 support - 4.3.10 - More info: https://documentation.wazuh.com/current/release-notes/ diff --git a/debs/SPECS/wazuh-agent/debian/changelog b/debs/SPECS/wazuh-agent/debian/changelog index dc6fbd4b59..4996a8eb8b 100644 --- a/debs/SPECS/wazuh-agent/debian/changelog +++ b/debs/SPECS/wazuh-agent/debian/changelog @@ -2,7 +2,7 @@ wazuh-agent (4.3.11-RELEASE) stable; urgency=low * More info: https://documentation.wazuh.com/current/release-notes/ - -- Wazuh, Inc Thu, 08 Dec 2022 15:00:00 +0000 + -- Wazuh, Inc Mon, 24 Apr 2023 15:00:00 +0000 wazuh-agent (4.3.10-RELEASE) stable; urgency=low diff --git a/debs/SPECS/wazuh-manager/debian/changelog b/debs/SPECS/wazuh-manager/debian/changelog index d09eb8a733..d2b03f0354 100644 --- a/debs/SPECS/wazuh-manager/debian/changelog +++ b/debs/SPECS/wazuh-manager/debian/changelog @@ -2,7 +2,7 @@ wazuh-manager (4.3.11-RELEASE) stable; urgency=low * More info: https://documentation.wazuh.com/current/release-notes/ - -- Wazuh, Inc Thu, 08 Dec 2022 15:00:00 +0000 + -- Wazuh, Inc Mon, 24 Apr 2023 15:00:00 +0000 wazuh-manager (4.3.10-RELEASE) stable; urgency=low diff --git a/rpms/SPECS/wazuh-agent.spec b/rpms/SPECS/wazuh-agent.spec index 3316936b40..f15ba9885a 100644 --- a/rpms/SPECS/wazuh-agent.spec +++ b/rpms/SPECS/wazuh-agent.spec @@ -615,7 +615,7 @@ rm -fr %{buildroot} %attr(750, root, wazuh) %{_localstatedir}/wodles/gcloud/* %changelog -* Thu Dec 08 2022 support - 4.3.11 +* Mon Apr 24 2023 2022 support - 4.3.11 - More info: https://documentation.wazuh.com/current/release-notes/ * Thu Nov 10 2022 support - 4.3.10 - More info: https://documentation.wazuh.com/current/release-notes/ diff --git a/rpms/SPECS/wazuh-manager.spec b/rpms/SPECS/wazuh-manager.spec index a231772e4d..958e0f2aa2 100644 --- a/rpms/SPECS/wazuh-manager.spec +++ b/rpms/SPECS/wazuh-manager.spec @@ -832,7 +832,7 @@ rm -fr %{buildroot} %attr(750, root, wazuh) %{_localstatedir}/wodles/gcloud/* %changelog -* Thu Dec 08 2022 support - 4.3.11 +* Mon Apr 24 2023 support - 4.3.11 - More info: https://documentation.wazuh.com/current/release-notes/ * Thu Nov 10 2022 support - 4.3.10 - More info: https://documentation.wazuh.com/current/release-notes/ From ba90ffbca3b797b495490c5e0e83e004d6b5c304 Mon Sep 17 00:00:00 2001 From: Raul Del Pozo Moreno Date: Fri, 28 Apr 2023 20:06:32 +0200 Subject: [PATCH 325/328] Removed white-space --- debs/SPECS/wazuh-agent/debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debs/SPECS/wazuh-agent/debian/changelog b/debs/SPECS/wazuh-agent/debian/changelog index 007c91864e..5515f6285c 100644 --- a/debs/SPECS/wazuh-agent/debian/changelog +++ b/debs/SPECS/wazuh-agent/debian/changelog @@ -27,7 +27,7 @@ wazuh-agent (4.4.0-RELEASE) stable; urgency=low * More info: https://documentation.wazuh.com/current/release-notes/ -- Wazuh, Inc Wed, 18 Jan 2023 12:31:50 +0000 - + wazuh-agent (4.3.10-RELEASE) stable; urgency=low * More info: https://documentation.wazuh.com/current/release-notes/ From caf51256c11f9b24fd6f583107bfc517daf031da Mon Sep 17 00:00:00 2001 From: Raul Del Pozo Moreno Date: Fri, 28 Apr 2023 20:15:31 +0200 Subject: [PATCH 326/328] Update pkginfo to 4.5.0 --- solaris/solaris10/pkginfo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solaris/solaris10/pkginfo b/solaris/solaris10/pkginfo index 089fe1c6d5..a9f3fdefec 100644 --- a/solaris/solaris10/pkginfo +++ b/solaris/solaris10/pkginfo @@ -1,11 +1,11 @@ NAME=Wazuh - Wazuh unifies historically separate functions into a single agent and platform architecture. Providing protection for public clouds, private clouds, and on-premise data centers. PKG="wazuh-agent" -VERSION="4.4.2" +VERSION="4.5.0" ARCH="i386" CLASSES="none" CATEGORY="system" VENDOR="Wazuh, Inc " -PSTAMP="24Apr2023" +PSTAMP="30May2023" EMAIL="info@wazuh.com" ISTATES="S s 1 2 3" RSTATES="S s 1 2 3" From c9a3391988b664dda0f9e9c3480e90b1b2bb4cc6 Mon Sep 17 00:00:00 2001 From: Raul Del Pozo Moreno Date: Fri, 28 Apr 2023 20:39:17 +0200 Subject: [PATCH 327/328] Removed duplicated if statement --- .github/workflows/build-rpm-packages.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index 4e1de20544..ceca955345 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -53,7 +53,6 @@ jobs: run: | MAJOR=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION) if [ "${{ steps.changes.outputs.rpm_images }}" == "true" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$MAJOR" >> $GITHUB_ENV ; fi - if [ $MAJOR == "4.6" ]; then echo "VERSION=master" >> $GITHUB_ENV; else echo "VERSION=$MAJOR" >> $GITHUB_ENV; fi if [ $MAJOR == "4.6" ]; then echo "VERSION=master" >> $GITHUB_ENV $ ; else echo "VERSION=$MAJOR" >> $GITHUB_ENV; fi if [ "${{ matrix.ARCHITECTURE }}" == "x86_64" ]; then echo "CONTAINER_NAME=rpm_builder_x86" >> $GITHUB_ENV ; else echo "CONTAINER_NAME=rpm_builder_${{ matrix.ARCHITECTURE }}" >> $GITHUB_ENV ; fi From 7a6564a59f783455aef65103196ab4e08f45be6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Verdaguer=20Vel=C3=A1zquez?= Date: Wed, 3 May 2023 16:24:41 +0200 Subject: [PATCH 328/328] Remove unnecessary $ in the GitHub Actions tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Verdaguer Velázquez --- .github/workflows/build-deb-packages.yml | 2 +- .github/workflows/build-rpm-packages.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-deb-packages.yml b/.github/workflows/build-deb-packages.yml index febe83870d..96b22b5a98 100644 --- a/.github/workflows/build-deb-packages.yml +++ b/.github/workflows/build-deb-packages.yml @@ -52,7 +52,7 @@ jobs: run: | MAJOR=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION) if [ "${{ steps.changes.outputs.deb_images }}" == "true" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$MAJOR" >> $GITHUB_ENV ; fi - if [ $MAJOR == "4.6" ]; then echo "VERSION=master" >> $GITHUB_ENV $ ; else echo "VERSION=$MAJOR" >> $GITHUB_ENV; fi + if [ $MAJOR == "4.6" ]; then echo "VERSION=master" >> $GITHUB_ENV; else echo "VERSION=$MAJOR" >> $GITHUB_ENV; fi echo "CONTAINER_NAME=deb_builder_${{ matrix.ARCHITECTURE }}" >> $GITHUB_ENV - name: Download docker image for package building diff --git a/.github/workflows/build-rpm-packages.yml b/.github/workflows/build-rpm-packages.yml index ceca955345..4d8f26d3d9 100644 --- a/.github/workflows/build-rpm-packages.yml +++ b/.github/workflows/build-rpm-packages.yml @@ -53,7 +53,7 @@ jobs: run: | MAJOR=$(sed 's/\([0-9]*\.[0-9]*\)\.[0-9]*/\1/' $GITHUB_WORKSPACE/VERSION) if [ "${{ steps.changes.outputs.rpm_images }}" == "true" ]; then echo "TAG=${{ github.head_ref }}" >> $GITHUB_ENV; else echo "TAG=$MAJOR" >> $GITHUB_ENV ; fi - if [ $MAJOR == "4.6" ]; then echo "VERSION=master" >> $GITHUB_ENV $ ; else echo "VERSION=$MAJOR" >> $GITHUB_ENV; fi + if [ $MAJOR == "4.6" ]; then echo "VERSION=master" >> $GITHUB_ENV; else echo "VERSION=$MAJOR" >> $GITHUB_ENV; fi if [ "${{ matrix.ARCHITECTURE }}" == "x86_64" ]; then echo "CONTAINER_NAME=rpm_builder_x86" >> $GITHUB_ENV ; else echo "CONTAINER_NAME=rpm_builder_${{ matrix.ARCHITECTURE }}" >> $GITHUB_ENV ; fi - name: Download docker image for package building