From a7bbb60ec4a380cc36d5ba327633fbb8995519f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lex=20Ruiz?= Date: Tue, 5 Nov 2024 12:44:27 +0100 Subject: [PATCH] Merge 4.10.1 into 4.10.2 (#513) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Merge 4.10.0 into 4.10.1 (#470) * Upgrade integrations to the last version (#447) * Upgrade third-party integrations to latest product versions (#368) * Upgrade third-party integrations to latest product versions * Improve comtability matrix * Change versions in /integrations/.env Signed-off-by: Malena Casas * Fix Splunk integrations (#362) * Add table with the version of the integrations * Update CHANGELOG.md Signed-off-by: Álex Ruiz --------- Signed-off-by: Malena Casas Signed-off-by: Álex Ruiz Co-authored-by: Álex Ruiz Co-authored-by: JuanGarriuz * Merge 4.9.1 into 4.10.0 (#454) * Prepare 4.9.1-rc2 (#436) * Update docker/README.md (#438) * Support new stage 4.9.1-rc3 (#443) * Update operational--integrations_maintenance_request.md (#449) Signed-off-by: Álex Ruiz --------- Signed-off-by: Álex Ruiz * Fix Github Actions build process dependency errors (#457) * Switch from latest to 22.04 runner * Remove non-existant packages from workflow provisioner * Remove freeglut3 from provision.sh * Update calendarTime and scan_date fields type (#458) * Merge 4.9.1 into 4.10.0 (#469) * Support for v4.9.1-alpha4 (#461) * Prepare final release notes for 4.9.1 --------- Signed-off-by: Malena Casas Signed-off-by: Álex Ruiz Co-authored-by: Malena Casas Co-authored-by: JuanGarriuz Co-authored-by: Fede Galland <99492720+f-galland@users.noreply.github.com> Co-authored-by: Kevin Ledesma * Fix release date for 4.10.0 in RPM spec file Signed-off-by: Álex Ruiz * Merge 4.10.0 into 4.10.1 (#511) * Upgrade integrations to the last version (#447) * Upgrade third-party integrations to latest product versions (#368) * Upgrade third-party integrations to latest product versions * Improve comtability matrix * Change versions in /integrations/.env Signed-off-by: Malena Casas * Fix Splunk integrations (#362) * Add table with the version of the integrations * Update CHANGELOG.md Signed-off-by: Álex Ruiz --------- Signed-off-by: Malena Casas Signed-off-by: Álex Ruiz Co-authored-by: Álex Ruiz Co-authored-by: JuanGarriuz * Merge 4.9.1 into 4.10.0 (#454) * Prepare 4.9.1-rc2 (#436) * Update docker/README.md (#438) * Support new stage 4.9.1-rc3 (#443) * Update operational--integrations_maintenance_request.md (#449) Signed-off-by: Álex Ruiz --------- Signed-off-by: Álex Ruiz * Fix Github Actions build process dependency errors (#457) * Switch from latest to 22.04 runner * Remove non-existant packages from workflow provisioner * Remove freeglut3 from provision.sh * Update calendarTime and scan_date fields type (#458) * Merge 4.9.1 into 4.10.0 (#469) * Support for v4.9.1-alpha4 (#461) * Prepare final release notes for 4.9.1 * Fix release date for 4.10.0 in RPM spec file (#471) * Preserve status of wazuh-indexer on upgrade (#498) * Update pre and post inst scripts for deb and rpm to store and restore service status * Update prerm script to avoid stopping the service on upgrade * Remove extra spaces and update rpm restart command * Merge 4.9.2 into 4.10.0 (#510) * Support for v4.9.1-alpha4 (#461) * Prepare final release notes for 4.9.1 * Support new version 4.9.2 (#494) * Support new version 4.9.2 * Add estimated release date for 4.9.2 * Fix estimates release date for 4.9.2 * Fix 4.9.1 release notes title --------- Signed-off-by: Álex Ruiz --------- Signed-off-by: Malena Casas Signed-off-by: Álex Ruiz Co-authored-by: Malena Casas Co-authored-by: JuanGarriuz Co-authored-by: Fede Galland <99492720+f-galland@users.noreply.github.com> Co-authored-by: Kevin Ledesma Signed-off-by: Álex Ruiz --------- Signed-off-by: Malena Casas Signed-off-by: Álex Ruiz Co-authored-by: Malena Casas Co-authored-by: JuanGarriuz Co-authored-by: Fede Galland <99492720+f-galland@users.noreply.github.com> Co-authored-by: Kevin Ledesma --- distribution/packages/src/deb/debian/postinst | 13 ++++++-- distribution/packages/src/deb/debian/preinst | 4 +++ distribution/packages/src/deb/debian/prerm | 33 ++++++++++++------- .../packages/src/rpm/wazuh-indexer.rpm.spec | 14 +++++++- release-notes/wazuh.release-notes-4.9.1.md | 2 +- 5 files changed, 50 insertions(+), 16 deletions(-) diff --git a/distribution/packages/src/deb/debian/postinst b/distribution/packages/src/deb/debian/postinst index 4541f924534df..c523ffa260091 100644 --- a/distribution/packages/src/deb/debian/postinst +++ b/distribution/packages/src/deb/debian/postinst @@ -19,7 +19,7 @@ data_dir=/var/lib/wazuh-indexer log_dir=/var/log/wazuh-indexer pid_dir=/run/wazuh-indexer tmp_dir=/var/log/wazuh-indexer/tmp - +restart_service=/tmp/wazuh-indexer.restart # Create needed directories mkdir -p ${tmp_dir} @@ -46,6 +46,15 @@ if command -v systemd-tmpfiles > /dev/null; then systemd-tmpfiles --create wazuh-indexer.conf fi +if [ -f $restart_service ]; then + rm -f $restart_service + echo "Restarting wazuh-indexer service..." + if command -v systemctl > /dev/null; then + systemctl restart wazuh-indexer.service > /dev/null 2>&1 + fi + exit 0 +fi + # Messages echo "### NOT starting on installation, please execute the following statements to configure wazuh-indexer service to start automatically using systemd" echo " sudo systemctl daemon-reload" @@ -54,5 +63,3 @@ echo "### You can start wazuh-indexer service by executing" echo " sudo systemctl start wazuh-indexer.service" exit 0 - - diff --git a/distribution/packages/src/deb/debian/preinst b/distribution/packages/src/deb/debian/preinst index 2cf7ea70a7466..e36f94b197b5d 100644 --- a/distribution/packages/src/deb/debian/preinst +++ b/distribution/packages/src/deb/debian/preinst @@ -13,10 +13,14 @@ set -e echo "Running Wazuh Indexer Pre-Installation Script" +# Reference to restore actual service status +restart_service=/tmp/wazuh-indexer.restart + # Stop existing service if command -v systemctl >/dev/null && systemctl is-active wazuh-indexer.service >/dev/null; then echo "Stop existing wazuh-indexer.service" systemctl --no-reload stop wazuh-indexer.service + touch $restart_service fi if command -v systemctl >/dev/null && systemctl is-active wazuh-indexer-performance-analyzer.service >/dev/null; then echo "Stop existing wazuh-indexer-performance-analyzer.service" diff --git a/distribution/packages/src/deb/debian/prerm b/distribution/packages/src/deb/debian/prerm index a5222b2caae40..f92bbfcf3b69f 100644 --- a/distribution/packages/src/deb/debian/prerm +++ b/distribution/packages/src/deb/debian/prerm @@ -11,16 +11,27 @@ set -e -echo "Running Wazuh Indexer Pre-Removal Script" - -# Stop existing service -if command -v systemctl >/dev/null && systemctl is-active wazuh-indexer.service >/dev/null; then - echo "Stop existing wazuh-indexer.service" - systemctl --no-reload stop wazuh-indexer.service -fi -if command -v systemctl >/dev/null && systemctl is-active wazuh-indexer-performance-analyzer.service >/dev/null; then - echo "Stop existing wazuh-indexer-performance-analyzer.service" - systemctl --no-reload stop wazuh-indexer-performance-analyzer.service -fi +case "$1" in + upgrade|deconfigure) + ;; + remove) + echo "Running Wazuh Indexer Pre-Removal Script" + # Stop existing service + if command -v systemctl >/dev/null && systemctl is-active wazuh-indexer.service >/dev/null; then + echo "Stop existing wazuh-indexer.service" + systemctl --no-reload stop wazuh-indexer.service + fi + if command -v systemctl >/dev/null && systemctl is-active wazuh-indexer-performance-analyzer.service >/dev/null; then + echo "Stop existing wazuh-indexer-performance-analyzer.service" + systemctl --no-reload stop wazuh-indexer-performance-analyzer.service + fi + ;; + failed-upgrade) + ;; + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 0 + ;; +esac exit 0 diff --git a/distribution/packages/src/rpm/wazuh-indexer.rpm.spec b/distribution/packages/src/rpm/wazuh-indexer.rpm.spec index 2ad1c0e3cf36f..34152b66de44f 100644 --- a/distribution/packages/src/rpm/wazuh-indexer.rpm.spec +++ b/distribution/packages/src/rpm/wazuh-indexer.rpm.spec @@ -162,6 +162,7 @@ set -e if command -v systemctl >/dev/null && systemctl is-active %{name}.service >/dev/null; then echo "Stop existing %{name}.service" systemctl --no-reload stop %{name}.service + touch %{tmp_dir}/wazuh-indexer.restart fi if command -v systemctl >/dev/null && systemctl is-active %{name}-performance-analyzer.service >/dev/null; then echo "Stop existing %{name}-performance-analyzer.service" @@ -204,6 +205,15 @@ if command -v systemd-tmpfiles > /dev/null; then systemd-tmpfiles --create %{name}.conf fi +if [ -f %{tmp_dir}/wazuh-indexer.restart ]; then + rm -f %{tmp_dir}/wazuh-indexer.restart + if command -v systemctl > /dev/null; then + echo "Restarting wazuh-indexer service..." + systemctl restart wazuh-indexer.service > /dev/null 2>&1 + exit 0 + fi +fi + # Messages echo "### NOT starting on installation, please execute the following statements to configure wazuh-indexer service to start automatically using systemd" echo " sudo systemctl daemon-reload" @@ -270,8 +280,10 @@ exit 0 - More info: https://documentation.wazuh.com/current/release-notes/release-4-10-2.html * Tue Jan 28 2025 support - 4.10.1 - More info: https://documentation.wazuh.com/current/release-notes/release-4-10-1.html -* Tue Nov 26 2024 support - 4.10.0 +* Thu Nov 28 2024 support - 4.10.0 - More info: https://documentation.wazuh.com/current/release-notes/release-4-10-0.html +* Mon Nov 04 2024 support - 4.9.2 +- More info: https://documentation.wazuh.com/current/release-notes/release-4-9-2.html * Tue Oct 15 2024 support - 4.9.1 - More info: https://documentation.wazuh.com/current/release-notes/release-4-9-1.html * Thu Aug 15 2024 support - 4.9.0 diff --git a/release-notes/wazuh.release-notes-4.9.1.md b/release-notes/wazuh.release-notes-4.9.1.md index 1ba2f5478f08d..16a3f82a18226 100644 --- a/release-notes/wazuh.release-notes-4.9.1.md +++ b/release-notes/wazuh.release-notes-4.9.1.md @@ -1,4 +1,4 @@ -## 2024-09-27 Version 4.9.1-rc2 Release Notes +## 2024-10-15 Version 4.9.1 Release Notes ## [4.9.1] ### Added