From d67310b37fc5a64f1e9ab7110b6c60b6516693c3 Mon Sep 17 00:00:00 2001 From: fcaffieri Date: Tue, 28 Jun 2022 18:32:20 -0300 Subject: [PATCH 1/8] Add remove performanceanalyzer directory insto deb and rpm --- stack/indexer/deb/debian/postrm | 7 +++++++ stack/indexer/rpm/wazuh-indexer.spec | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) mode change 100644 => 100755 stack/indexer/rpm/wazuh-indexer.spec diff --git a/stack/indexer/deb/debian/postrm b/stack/indexer/deb/debian/postrm index cc1b090a47..21e35f805f 100644 --- a/stack/indexer/deb/debian/postrm +++ b/stack/indexer/deb/debian/postrm @@ -79,6 +79,13 @@ if [ "$REMOVE_DIRS" = "true" ]; then if [ -d "${LOG_DIR}" ]; then rmdir --ignore-fail-on-non-empty "${LOG_DIR}" fi + + # Delete performanceanalyzer directory + if [ -d "/dev/shm/performanceanalyzer" ]; then + echo -n "Deleting performanceanalyzer directory..." + rm -rf "/dev/shm/performanceanalyzer" > /dev/null 2>&1 + echo " OK" + fi fi diff --git a/stack/indexer/rpm/wazuh-indexer.spec b/stack/indexer/rpm/wazuh-indexer.spec old mode 100644 new mode 100755 index facea9ed59..b529c349f9 --- a/stack/indexer/rpm/wazuh-indexer.spec +++ b/stack/indexer/rpm/wazuh-indexer.spec @@ -222,6 +222,9 @@ if [ $1 = 0 ];then fi # Remove lingering folders and files + if [ -d /dev/shm/performanceanalyzer ]; then + rm -rf /dev/shm/performanceanalyzer + fi rm -rf %{INSTALL_DIR} fi @@ -1179,4 +1182,4 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/jdk/jmods/jdk.zipfs.jmod %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/jdk/jmods/jdk.aot.jmod %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/jdk/jmods/jdk.jconsole.jmod -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/jdk/jmods/java.instrument.jmod +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/jdk/jmods/java.instrument.jmod \ No newline at end of file From 7d952c6778177d7c38c139bad4fea193bf0d0620 Mon Sep 17 00:00:00 2001 From: fcaffieri Date: Tue, 28 Jun 2022 18:40:26 -0300 Subject: [PATCH 2/8] Add remove performanceanalyzer directory insto deb and rpm --- 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 b529c349f9..13a8ea696d 100755 --- a/stack/indexer/rpm/wazuh-indexer.spec +++ b/stack/indexer/rpm/wazuh-indexer.spec @@ -1182,4 +1182,4 @@ rm -fr %{buildroot} %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/jdk/jmods/jdk.zipfs.jmod %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/jdk/jmods/jdk.aot.jmod %attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/jdk/jmods/jdk.jconsole.jmod -%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/jdk/jmods/java.instrument.jmod \ No newline at end of file +%attr(640, %{USER}, %{GROUP}) %{INSTALL_DIR}/jdk/jmods/java.instrument.jmod From 98de2573e1f08b2298b4f19d5af46543ef112515 Mon Sep 17 00:00:00 2001 From: fcaffieri Date: Wed, 29 Jun 2022 09:22:27 -0300 Subject: [PATCH 3/8] Remove echo into deb spec --- stack/indexer/deb/debian/postrm | 2 -- 1 file changed, 2 deletions(-) diff --git a/stack/indexer/deb/debian/postrm b/stack/indexer/deb/debian/postrm index 21e35f805f..dd58f38a27 100644 --- a/stack/indexer/deb/debian/postrm +++ b/stack/indexer/deb/debian/postrm @@ -82,9 +82,7 @@ if [ "$REMOVE_DIRS" = "true" ]; then # Delete performanceanalyzer directory if [ -d "/dev/shm/performanceanalyzer" ]; then - echo -n "Deleting performanceanalyzer directory..." rm -rf "/dev/shm/performanceanalyzer" > /dev/null 2>&1 - echo " OK" fi fi From 81f5a6ee69860dd72342c4e07609b26097715637 Mon Sep 17 00:00:00 2001 From: dfolcha Date: Wed, 29 Jun 2022 14:58:53 +0200 Subject: [PATCH 4/8] Bump 4.3.5 to 4.3.6 --- CHANGELOG.md | 3 +++ 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 +++- tests/unattended/install/test_unattended.py | 4 ++-- tests/unattended/unit/suites/test-common.sh | 8 ++++---- tests/unattended/unit/suites/test-dashboard.sh | 2 +- .../install_functions/installVariables.sh | 2 +- 12 files changed, 35 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6dbe43ebeb..dee00a3927 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ # Change Log All notable changes to this project will be documented in this file. +## [v4.3.6] + +- https://github.com/wazuh/wazuh-packages/releases/tag/v4.3.6 ## [v4.3.5] - https://github.com/wazuh/wazuh-packages/releases/tag/v4.3.5 diff --git a/VERSION b/VERSION index e198586e42..43270543f7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.3.5 +4.3.6 diff --git a/aix/SPECS/wazuh-agent-aix.spec b/aix/SPECS/wazuh-agent-aix.spec index eae4f28631..3c8472ed36 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.3.5 +Version: 4.3.6 Release: 1 License: GPL URL: https://www.wazuh.com/ @@ -290,6 +290,8 @@ rm -fr %{buildroot} %attr(750, root, wazuh) %{_localstatedir}/wodles/* %changelog +* Thu Jul 07 2022 support - 4.3.6 +- More info: https://documentation.wazuh.com/current/release-notes/ * Wed Jun 29 2022 support - 4.3.5 - More info: https://documentation.wazuh.com/current/release-notes/ * Tue Jun 07 2022 support - 4.3.4 diff --git a/debs/SPECS/wazuh-agent/debian/changelog b/debs/SPECS/wazuh-agent/debian/changelog index 88f1f27da4..0fe01a0a29 100644 --- a/debs/SPECS/wazuh-agent/debian/changelog +++ b/debs/SPECS/wazuh-agent/debian/changelog @@ -1,3 +1,9 @@ +wazuh-agent (4.3.6-RELEASE) stable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/ + + -- Wazuh, Inc Thu, 07 Jul 2022 15:00:00 +0000 + wazuh-agent (4.3.5-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 268da3abbe..876f340ba4 100644 --- a/debs/SPECS/wazuh-manager/debian/changelog +++ b/debs/SPECS/wazuh-manager/debian/changelog @@ -1,3 +1,9 @@ +wazuh-manager (4.3.6-RELEASE) stable; urgency=low + + * More info: https://documentation.wazuh.com/current/release-notes/ + + -- Wazuh, Inc Thu, 07 Jul 2022 15:00:00 +0000 + wazuh-manager (4.3.5-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 9a36a324d0..4148d19e3f 100644 --- a/macos/specs/wazuh-agent.pkgproj +++ b/macos/specs/wazuh-agent.pkgproj @@ -812,7 +812,7 @@ USE_HFS+_COMPRESSION VERSION - 4.3.5-1 + 4.3.6-1 TYPE 0 @@ -1239,7 +1239,7 @@ NAME - wazuh-agent-4.3.5-1 + wazuh-agent-4.3.6-1 PAYLOAD_ONLY TREAT_MISSING_PRESENTATION_DOCUMENTS_AS_WARNING diff --git a/rpms/SPECS/wazuh-agent.spec b/rpms/SPECS/wazuh-agent.spec index 75858329d2..0b837ce1f1 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.3.5 +Version: 4.3.6 Release: %{_release} License: GPL Group: System Environment/Daemons @@ -612,6 +612,8 @@ rm -fr %{buildroot} %changelog +* Thu Jul 07 2022 support - 4.3.6 +- More info: https://documentation.wazuh.com/current/release-notes/ * Wed Jun 29 2022 support - 4.3.5 - More info: https://documentation.wazuh.com/current/release-notes/ * Tue Jun 07 2022 support - 4.3.4 diff --git a/rpms/SPECS/wazuh-manager.spec b/rpms/SPECS/wazuh-manager.spec index df82719e0a..4a19ee7b46 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.3.5 +Version: 4.3.6 Release: %{_release} License: GPL Group: System Environment/Daemons @@ -826,6 +826,8 @@ rm -fr %{buildroot} %changelog +* Thu Jul 07 2022 support - 4.3.6 +- More info: https://documentation.wazuh.com/current/release-notes/ * Wed Jun 29 2022 support - 4.3.5 - More info: https://documentation.wazuh.com/current/release-notes/ * Tue Jun 07 2022 support - 4.3.4 diff --git a/tests/unattended/install/test_unattended.py b/tests/unattended/install/test_unattended.py index 16ada4ca62..974239cfac 100644 --- a/tests/unattended/install/test_unattended.py +++ b/tests/unattended/install/test_unattended.py @@ -196,7 +196,7 @@ def test_check_log_errors(): for line in f.readlines(): if 'ERROR' in line: found_error = True - if get_wazuh_version() == 'v4.3.5': + if get_wazuh_version() == 'v4.3.6': if 'ERROR: Cluster error detected' in line or 'agent-upgrade: ERROR: (8123): There has been an error executing the request in the tasks manager.' in line: found_error = False else: @@ -220,7 +220,7 @@ def test_check_cluster_log_errors(): for line in f.readlines(): if 'ERROR' in line: found_error = True - if get_wazuh_version() == 'v4.3.5': + if get_wazuh_version() == 'v4.3.6': if 'Could not connect to master' in line or 'Worker node is not connected to master' in line or 'Connection reset by peer' in line: found_error = False else: diff --git a/tests/unattended/unit/suites/test-common.sh b/tests/unattended/unit/suites/test-common.sh index 4f84848b7f..aa646b3f3a 100644 --- a/tests/unattended/unit/suites/test-common.sh +++ b/tests/unattended/unit/suites/test-common.sh @@ -80,7 +80,7 @@ test-05-common_checkInstalled-all-installed-yum() { @mocktrue yum list installed - @mock grep wazuh-manager === @echo wazuh-manager.x86_64 4.3.5-1 @wazuh + @mock grep wazuh-manager === @echo wazuh-manager.x86_64 4.3.6-1 @wazuh @mkdir /var/ossec @mock grep wazuh-indexer === @echo wazuh-indexer.x86_64 1.13.2-1 @wazuh @@ -124,7 +124,7 @@ test-05-common_checkInstalled-all-installed-yum() { } test-05-common_checkInstalled-all-installed-yum-assert() { - @echo "wazuh-manager.x86_64 4.3.5-1 @wazuh" + @echo "wazuh-manager.x86_64 4.3.6-1 @wazuh" @echo 1 @echo "wazuh-indexer.x86_64 1.13.2-1 @wazuh" @@ -144,7 +144,7 @@ test-06-common_checkInstalled-all-installed-zypper() { @mocktrue zypper packages @mock grep i+ - @mock grep wazuh-manager === @echo "i+ | EL-20211102 - Wazuh | wazuh-manager | 4.3.5-1 | x86_64" + @mock grep wazuh-manager === @echo "i+ | EL-20211102 - Wazuh | wazuh-manager | 4.3.6-1 | x86_64" @mkdir /var/ossec @mock grep wazuh-indexer === @echo "i+ | EL-20211102 - Wazuh | wazuh-indexer | 1.13.2-1 | x86_64" @@ -189,7 +189,7 @@ test-06-common_checkInstalled-all-installed-zypper() { } test-06-common_checkInstalled-all-installed-zypper-assert() { - @echo "i+ | EL-20211102 - Wazuh | wazuh-manager | 4.3.5-1 | x86_64" + @echo "i+ | EL-20211102 - Wazuh | wazuh-manager | 4.3.6-1 | x86_64" @echo 1 @echo "i+ | EL-20211102 - Wazuh | wazuh-indexer | 1.13.2-1 | x86_64" diff --git a/tests/unattended/unit/suites/test-dashboard.sh b/tests/unattended/unit/suites/test-dashboard.sh index 5a2e3ecc11..8ff28ef6bb 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.3.5" + wazuh_version="4.3.6" 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 d019f571ca..528291e970 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.3" -readonly wazuh_version="4.3.5" +readonly wazuh_version="4.3.6" readonly wazuh_revision_deb="1" readonly wazuh_revision_rpm="1" readonly indexer_revision_deb="1" From bf9686a23f4a73446e548425f48399954c21e4fa Mon Sep 17 00:00:00 2001 From: dfolcha Date: Wed, 29 Jun 2022 15:05:23 +0200 Subject: [PATCH 5/8] Add eol --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dee00a3927..aa22eb6954 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file. ## [v4.3.6] - https://github.com/wazuh/wazuh-packages/releases/tag/v4.3.6 + ## [v4.3.5] - https://github.com/wazuh/wazuh-packages/releases/tag/v4.3.5 From 860c07fcaa6fc3539c3c5999fbbac567fa1e111a Mon Sep 17 00:00:00 2001 From: dfolcha Date: Tue, 28 Jun 2022 10:00:28 +0200 Subject: [PATCH 6/8] Rename passwords.wazuh --- .gitignore | 2 +- tests/unattended/install/test_unattended.py | 4 ++-- .../unit/suites/test-installCommon.sh | 18 +++++++++--------- .../install_functions/installCommon.sh | 6 +++--- .../passwords_tool/passwordsMain.sh | 4 ++-- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/.gitignore b/.gitignore index 06622ad57b..822b7b01b9 100644 --- a/.gitignore +++ b/.gitignore @@ -37,5 +37,5 @@ unattended_installer/wazuh-install-files* unattended_installer/wazuh-install.sh unattended_installer/wazuh-certs-tool.sh unattended_installer/wazuh-passwords-tool.sh -unattended_installer/passwords.wazuh +unattended_installer/wazuh-passwords.txt tests/unattended/unit/*.log diff --git a/tests/unattended/install/test_unattended.py b/tests/unattended/install/test_unattended.py index 16ada4ca62..d99f0f7b0c 100644 --- a/tests/unattended/install/test_unattended.py +++ b/tests/unattended/install/test_unattended.py @@ -30,9 +30,9 @@ def get_password(username): tmp_yaml="" with tarfile.open("../../../unattended_installer/wazuh-install-files.tar") as configurations: - configurations.extract("wazuh-install-files/passwords.wazuh") + configurations.extract("wazuh-install-files/wazuh-passwords.txt") - with open("wazuh-install-files/passwords.wazuh", 'r') as pass_file: + with open("wazuh-install-files/wazuh-passwords.txt", 'r') as pass_file: while pass_dict["username"] != username: for i in range(4): tmp_yaml+=pass_file.readline() diff --git a/tests/unattended/unit/suites/test-installCommon.sh b/tests/unattended/unit/suites/test-installCommon.sh index 933f434016..07ef8047c3 100644 --- a/tests/unattended/unit/suites/test-installCommon.sh +++ b/tests/unattended/unit/suites/test-installCommon.sh @@ -957,17 +957,17 @@ test-48-installCommon_changePasswords-with-tarfile() { tar_file=tarfile.tar base_path=/tmp @touch $tar_file - @mock tar -xf tarfile.tar -C /tmp wazuh-install-files/passwords.wazuh === @touch /tmp/passwords.wazuh + @mock tar -xf tarfile.tar -C /tmp wazuh-install-files/wazuh-passwords.txt === @touch /tmp/wazuh-passwords.txt installCommon_changePasswords @echo $changeall - @rm /tmp/passwords.wazuh + @rm /tmp/wazuh-passwords.txt } test-48-installCommon_changePasswords-with-tarfile-assert() { common_checkInstalled installCommon_readPasswordFileUsers passwords_changePassword - rm -rf /tmp/passwords.wazuh + rm -rf /tmp/wazuh-passwords.txt @echo } @@ -977,10 +977,10 @@ test-49-installCommon_changePasswords-with-tarfile-aio() { base_path=/tmp AIO=1 @touch $tar_file - @mock tar -xf tarfile.tar -C /tmp wazuh-install-files/passwords.wazuh === @touch /tmp/passwords.wazuh + @mock tar -xf tarfile.tar -C /tmp wazuh-install-files/wazuh-passwords.txt === @touch /tmp/wazuh-passwords.txt installCommon_changePasswords @echo $changeall - @rm /tmp/passwords.wazuh + @rm /tmp/wazuh-passwords.txt } test-49-installCommon_changePasswords-with-tarfile-aio-assert() { @@ -992,7 +992,7 @@ test-49-installCommon_changePasswords-with-tarfile-aio-assert() { passwords_generateHash passwords_changePassword passwords_runSecurityAdmin - rm -rf /tmp/passwords.wazuh + rm -rf /tmp/wazuh-passwords.txt @echo 1 } @@ -1002,10 +1002,10 @@ test-50-installCommon_changePasswords-with-tarfile-start-elastic-cluster() { base_path=/tmp AIO=1 @touch $tar_file - @mock tar -xf tarfile.tar -C /tmp wazuh-install-files/passwords.wazuh === @touch /tmp/passwords.wazuh + @mock tar -xf tarfile.tar -C /tmp wazuh-install-files/wazuh-passwords.txt === @touch /tmp/wazuh-passwords.txt installCommon_changePasswords @echo $changeall - @rm /tmp/passwords.wazuh + @rm /tmp/wazuh-passwords.txt } test-50-installCommon_changePasswords-with-tarfile-start-elastic-cluster-assert() { @@ -1017,7 +1017,7 @@ test-50-installCommon_changePasswords-with-tarfile-start-elastic-cluster-assert( passwords_generateHash passwords_changePassword passwords_runSecurityAdmin - rm -rf /tmp/passwords.wazuh + rm -rf /tmp/wazuh-passwords.txt @echo 1 } diff --git a/unattended_installer/install_functions/installCommon.sh b/unattended_installer/install_functions/installCommon.sh index 1a4304f812..5214ff5973 100644 --- a/unattended_installer/install_functions/installCommon.sh +++ b/unattended_installer/install_functions/installCommon.sh @@ -175,7 +175,7 @@ function installCommon_createInstallFiles() { if [ -n "${server_node_types[*]}" ]; then installCommon_createClusterKey fi - gen_file="/tmp/wazuh-install-files/passwords.wazuh" + gen_file="/tmp/wazuh-install-files/wazuh-passwords.txt" passwords_generatePasswordFile # Using cat instead of simple cp because OpenSUSE unknown error. eval "cat '${config_file}' > '/tmp/wazuh-install-files/config.yml'" @@ -193,8 +193,8 @@ function installCommon_changePasswords() { common_logger -d "Setting Wazuh indexer cluster passwords." if [ -f "${tar_file}" ]; then - eval "tar -xf ${tar_file} -C /tmp wazuh-install-files/passwords.wazuh ${debug}" - p_file="/tmp/wazuh-install-files/passwords.wazuh" + eval "tar -xf ${tar_file} -C /tmp wazuh-install-files/wazuh-passwords.txt ${debug}" + p_file="/tmp/wazuh-install-files/wazuh-passwords.txt" common_checkInstalled if [ -n "${start_indexer_cluster}" ] || [ -n "${AIO}" ]; then changeall=1 diff --git a/unattended_installer/passwords_tool/passwordsMain.sh b/unattended_installer/passwords_tool/passwordsMain.sh index 90b9b8896b..d2bc4268f1 100644 --- a/unattended_installer/passwords_tool/passwordsMain.sh +++ b/unattended_installer/passwords_tool/passwordsMain.sh @@ -46,7 +46,7 @@ function getHelp() { echo -e " -v, --verbose" echo -e " Shows the complete script execution output." echo -e "" - echo -e " -f, --file " + echo -e " -f, --file " echo -e " Changes the passwords for the ones given in the file." echo -e "" echo -e " Wazuh indexer users must have this format:" @@ -61,7 +61,7 @@ function getHelp() { echo -e " api_username: " echo -e " api_password: " echo -e "" - echo -e " -gf, --generate-file " + echo -e " -gf, --generate-file " echo -e " Generate password file with random passwords for standard users." echo -e "" echo -e " -h, --help" From 0b5279351afbda8693ecb0453f2bec8bfe2c785a Mon Sep 17 00:00:00 2001 From: c-bordon Date: Wed, 29 Jun 2022 16:53:48 -0300 Subject: [PATCH 7/8] Add validation for future app --- stack/dashboard/deb/debian/rules | 7 ++++++- stack/dashboard/rpm/wazuh-dashboard.spec | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/stack/dashboard/deb/debian/rules b/stack/dashboard/deb/debian/rules index 5ac7e3b16f..eeb7b7c23c 100644 --- a/stack/dashboard/deb/debian/rules +++ b/stack/dashboard/deb/debian/rules @@ -91,7 +91,12 @@ override_dh_install: chown $(USER):$(GROUP) $(TARGET_DIR)/etc/systemd/system/$(NAME) chown $(USER):$(GROUP) $(TARGET_DIR)/etc/default/$(NAME) - runuser $(USER) --shell="/bin/bash" --command="$(TARGET_DIR)$(INSTALLATION_DIR)/bin/opensearch-dashboards-plugin install https://packages-dev.wazuh.com/pre-release/ui/dashboard/wazuh-$(BASE_VERSION)-${BASE_REVISION}.zip" + + if [ "$(BASE_VERSION)" = "99.99.0" ]; then \ + runuser $(USER) --shell="/bin/bash" --command="$(TARGET_DIR)$(INSTALLATION_DIR)/bin/opensearch-dashboards-plugin install https://packages-dev.wazuh.com/futures/ui/dashboard/wazuh-99.99.0-1.zip" ;\ + else \ + runuser $(USER) --shell="/bin/bash" --command="$(TARGET_DIR)$(INSTALLATION_DIR)/bin/opensearch-dashboards-plugin install https://packages-dev.wazuh.com/pre-release/ui/dashboard/wazuh-$(BASE_VERSION)-${BASE_REVISION}.zip" ;\ + fi find $(TARGET_DIR)$(INSTALLATION_DIR)/plugins/wazuh/ -exec chown $(USER):$(GROUP) {} \; diff --git a/stack/dashboard/rpm/wazuh-dashboard.spec b/stack/dashboard/rpm/wazuh-dashboard.spec index 11c2cd8bcf..2473bd036d 100644 --- a/stack/dashboard/rpm/wazuh-dashboard.spec +++ b/stack/dashboard/rpm/wazuh-dashboard.spec @@ -93,7 +93,11 @@ find %{buildroot}%{CONFIG_DIR} -exec chown %{USER}:%{GROUP} {} \; chown %{USER}:%{GROUP} %{buildroot}/etc/systemd/system/wazuh-dashboard.service chown %{USER}:%{GROUP} %{buildroot}/etc/init.d/wazuh-dashboard -runuser %{USER} --shell="/bin/bash" --command="%{buildroot}%{INSTALL_DIR}/bin/opensearch-dashboards-plugin install https://packages-dev.wazuh.com/pre-release/ui/dashboard/wazuh-%{version}-%{release}.zip" +if [ "%{version}" = "99.99.0" ];then + runuser %{USER} --shell="/bin/bash" --command="%{buildroot}%{INSTALL_DIR}/bin/opensearch-dashboards-plugin install https://packages-dev.wazuh.com/futures/ui/dashboard/wazuh-99.99.0-1.zip" +else + runuser %{USER} --shell="/bin/bash" --command="%{buildroot}%{INSTALL_DIR}/bin/opensearch-dashboards-plugin install https://packages-dev.wazuh.com/pre-release/ui/dashboard/wazuh-%{version}-%{release}.zip" +fi find %{buildroot}%{INSTALL_DIR}/plugins/wazuh/ -exec chown %{USER}:%{GROUP} {} \; find %{buildroot}%{INSTALL_DIR}/plugins/wazuh/ -type f -perm 644 -exec chmod 640 {} \; From f80d0ceae70e858d955c01429c5bbd0763e85e2d Mon Sep 17 00:00:00 2001 From: c-bordon Date: Wed, 29 Jun 2022 16:56:40 -0300 Subject: [PATCH 8/8] remove space --- stack/dashboard/deb/debian/rules | 1 - 1 file changed, 1 deletion(-) diff --git a/stack/dashboard/deb/debian/rules b/stack/dashboard/deb/debian/rules index eeb7b7c23c..2413e95f53 100644 --- a/stack/dashboard/deb/debian/rules +++ b/stack/dashboard/deb/debian/rules @@ -91,7 +91,6 @@ override_dh_install: chown $(USER):$(GROUP) $(TARGET_DIR)/etc/systemd/system/$(NAME) chown $(USER):$(GROUP) $(TARGET_DIR)/etc/default/$(NAME) - if [ "$(BASE_VERSION)" = "99.99.0" ]; then \ runuser $(USER) --shell="/bin/bash" --command="$(TARGET_DIR)$(INSTALLATION_DIR)/bin/opensearch-dashboards-plugin install https://packages-dev.wazuh.com/futures/ui/dashboard/wazuh-99.99.0-1.zip" ;\ else \