Skip to content

Commit

Permalink
Merge pull request #2651 from wazuh/merge-4.8.0-into-4.8.1
Browse files Browse the repository at this point in the history
Merge 4.8.0 into 4.8.1
  • Loading branch information
vikman90 authored Nov 28, 2023
2 parents c27ace0 + 1a1ecfc commit 08f6704
Show file tree
Hide file tree
Showing 31 changed files with 455 additions and 304 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-deb-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
if: steps.changes.outputs.deb_packages == 'true' || (steps.changes.outputs.deb_images_agent_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || ((steps.changes.outputs.deb_images_manager_amd64 == 'true' || steps.changes.outputs.deb_images_agent_amd64 == 'true') && matrix.ARCHITECTURE == 'amd64')
working-directory: ./debs
run: |
REVISION="${{ github.head_ref }}"
REVISION=$( echo ${{ github.head_ref }} | sed 's/-/./g; s/\//./g' )
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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-rpm-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
if : steps.changes.outputs.rpm_packages == 'true' || (steps.changes.outputs.rpm_images_agent_i386 == 'true' && matrix.ARCHITECTURE == 'i386') || ((steps.changes.outputs.rpm_images_manager_x86_64 == 'true' || steps.changes.outputs.rpm_images_agent_x86_64 == 'true') && matrix.ARCHITECTURE == 'x86_64')
working-directory: ./rpms
run: |
REVISION=$( echo ${{ github.head_ref }} | sed 's/-/./g' )
REVISION=$( echo ${{ github.head_ref }} | sed 's/-/./g; s/\//./g' )
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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-install-deb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
skip_after_successful_duplicate: 'false'

- name: Wait for the package to be built
uses: ArcticLampyrid/[email protected].3
uses: ArcticLampyrid/[email protected].4
id: wait-for-build
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
if: steps.changes.outputs.deb_packages == 'true' || (steps.changes.outputs.deb_images_agent_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 }})
REVISION=$( echo ${{ github.head_ref }} | sed 's/-/./g; s/\//./g' )
echo "PACKAGE_NAME=wazuh-${{ matrix.type }}_${VERSION}-${REVISION}_${{ matrix.arch }}.deb" >> $GITHUB_ENV
- name: Download the Wazuh ${{ matrix.type }} package for ${{ matrix.system.NAME }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-install-rpm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
skip_after_successful_duplicate: 'false'

- name: Wait for the package to be built
uses: ArcticLampyrid/[email protected].3
uses: ArcticLampyrid/[email protected].4
id: wait-for-build
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
if : steps.changes.outputs.rpm_packages == 'true' || (steps.changes.outputs.rpm_images_agent_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' )
REVISION=$( echo ${{ github.head_ref }} | sed 's/-/./g; 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 }}
Expand Down
4 changes: 2 additions & 2 deletions aix/SPECS/wazuh-agent-aix.spec
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,11 @@ rm -fr %{buildroot}
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-1.html
* Fri Dec 15 2023 support <[email protected]> - 4.8.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-0.html
* Thu Dec 07 2023 support <[email protected]> - 4.7.1
* Tue Dec 05 2023 support <[email protected]> - 4.7.1
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-1.html
* Tue Nov 21 2023 support <[email protected]> - 4.7.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-0.html
* Tue Oct 24 2023 support <[email protected]> - 4.6.0
* Tue Oct 31 2023 support <[email protected]> - 4.6.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-6-0.html
* Tue Oct 24 2023 support <[email protected]> - 4.5.4
- More info: https://documentation.wazuh.com/current/release-notes/release-4-5-4.html
Expand Down
4 changes: 2 additions & 2 deletions debs/SPECS/wazuh-agent/debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ wazuh-agent (4.7.1-RELEASE) stable; urgency=low

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

-- Wazuh, Inc <[email protected]> Thu, 07 Dec 2023 00:00:00 +0000
-- Wazuh, Inc <[email protected]> Tue, 05 Dec 2023 00:00:00 +0000

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

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

-- Wazuh, Inc <[email protected]> Tue, 21 Nov 2023 00:00:00 +0000
-- Wazuh, Inc <[email protected]> Tue, 05 Nov 2023 00:00:00 +0000

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

Expand Down
4 changes: 2 additions & 2 deletions debs/SPECS/wazuh-manager/debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ wazuh-manager (4.7.1-RELEASE) stable; urgency=low

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

-- Wazuh, Inc <[email protected]> Thu, 07 Dec 2023 00:00:00 +0000
-- Wazuh, Inc <[email protected]> Tue, 05 Dec 2023 00:00:00 +0000

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

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

-- Wazuh, Inc <[email protected]> Tue, 21 Nov 2023 00:00:00 +0000
-- Wazuh, Inc <[email protected]> Tue, 05 Nov 2023 00:00:00 +0000

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

Expand Down
2 changes: 2 additions & 0 deletions debs/SPECS/wazuh-manager/debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ case "$1" in
chmod 0660 ${DIR}/logs/active-responses.log
chmod 0640 ${DIR}/logs/integrations.log

# Set merged.mg permissions to new ones
find ${DIR}/etc/shared/ -type f -name 'merged.mg' -exec chmod 644 {} \;

if [ -f ${DIR}/etc/shared/ar.conf ]; then
chown root:wazuh ${DIR}/etc/shared/ar.conf
Expand Down
2 changes: 2 additions & 0 deletions debs/SPECS/wazuh-manager/debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ override_dh_install:
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/darwin/23
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
Expand Down Expand Up @@ -173,6 +174,7 @@ override_dh_install:
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/22/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/darwin/22
cp etc/templates/config/darwin/23/sca.files ${TARGET_DIR}$(INSTALLATION_SCRIPTS_DIR)/sca/darwin/23

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
Expand Down
9 changes: 5 additions & 4 deletions macos/package_files/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ function build() {
configure

if [ -z "${USER_BINARYINSTALL}" ]; then
make -C ${SOURCES_PATH}/src deps TARGET=agent
make -C ${SOURCES_PATH}/src deps TARGET=agent

echo "Generating Wazuh executables"
make -j$JOBS -C ${SOURCES_PATH}/src DYLD_FORCE_FLAT_NAMESPACE=1 TARGET=agent build
echo "Generating Wazuh executables"
make -j$JOBS -C ${SOURCES_PATH}/src DYLD_FORCE_FLAT_NAMESPACE=1 TARGET=agent build
fi

echo "Running install script"
Expand All @@ -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,22}
mkdir -p ${INSTALLATION_SCRIPTS_DIR}/sca/darwin/{15,16,17,18,20,21,22,23}

cp -r ${SOURCES_PATH}/ruleset/sca/darwin ${INSTALLATION_SCRIPTS_DIR}/sca
cp -r ${SOURCES_PATH}/ruleset/sca/generic ${INSTALLATION_SCRIPTS_DIR}/sca
Expand All @@ -73,6 +73,7 @@ function build() {
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/22/sca.files ${INSTALLATION_SCRIPTS_DIR}/sca/darwin/22/
cp ${SOURCES_PATH}/etc/templates/config/darwin/23/sca.files ${INSTALLATION_SCRIPTS_DIR}/sca/darwin/23/

cp ${SOURCES_PATH}/src/VERSION ${INSTALLATION_SCRIPTS_DIR}/src/
cp ${SOURCES_PATH}/src/REVISION ${INSTALLATION_SCRIPTS_DIR}/src/
Expand Down
4 changes: 2 additions & 2 deletions rpms/SPECS/wazuh-agent.spec
Original file line number Diff line number Diff line change
Expand Up @@ -629,11 +629,11 @@ rm -fr %{buildroot}
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-1.html
* Fri Dec 15 2023 support <[email protected]> - 4.8.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-0.html
* Thu Dec 07 2023 support <[email protected]> - 4.7.1
* Tue Dec 05 2023 support <[email protected]> - 4.7.1
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-1.html
* Tue Nov 21 2023 support <[email protected]> - 4.7.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-0.html
* Tue Oct 24 2023 support <[email protected]> - 4.6.0
* Tue Oct 31 2023 support <[email protected]> - 4.6.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-6-0.html
* Tue Oct 24 2023 support <[email protected]> - 4.5.4
- More info: https://documentation.wazuh.com/current/release-notes/release-4-5-4.html
Expand Down
11 changes: 8 additions & 3 deletions rpms/SPECS/wazuh-manager.spec
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,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,2023}
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,22}
mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/darwin/{15,16,17,18,19,20,21,22,23}
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}
Expand Down Expand Up @@ -334,6 +334,9 @@ fi
rm -f %{_localstatedir}/etc/shared/ar.conf >/dev/null 2>&1
rm -f %{_localstatedir}/etc/shared/merged.mg >/dev/null 2>&1

# Set merged.mg permissions to new ones
find %{_localstatedir}/etc/shared/ -type f -name 'merged.mg' -exec chmod 644 {} \;

#AlmaLinux
if [ -r "/etc/almalinux-release" ]; then
DIST_NAME=almalinux
Expand Down Expand Up @@ -787,6 +790,8 @@ rm -fr %{buildroot}
%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/darwin/23
%attr(640, root, wazuh) %config(missingok) %{_localstatedir}/tmp/sca-%{version}-%{release}-tmp/darwin/23/*
%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
Expand Down Expand Up @@ -852,11 +857,11 @@ rm -fr %{buildroot}
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-1.html
* Fri Dec 15 2023 support <[email protected]> - 4.8.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-0.html
* Thu Dec 07 2023 support <[email protected]> - 4.7.1
* Tue Dec 05 2023 support <[email protected]> - 4.7.1
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-1.html
* Tue Nov 21 2023 support <[email protected]> - 4.7.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-0.html
* Tue Oct 24 2023 support <[email protected]> - 4.6.0
* Tue Oct 31 2023 support <[email protected]> - 4.6.0
- More info: https://documentation.wazuh.com/current/release-notes/release-4-6-0.html
* Tue Oct 24 2023 support <[email protected]> - 4.5.4
- More info: https://documentation.wazuh.com/current/release-notes/release-4-5-4.html
Expand Down
2 changes: 1 addition & 1 deletion stack/dashboard/base/builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ sed -i "90s|defaultValue: true|defaultValue: false|g" ./src/core/server/opensear
## Remove OpenSearch from the upper bar with empty svg
cp ./etc/custom_welcome/Assets/default_branding/logo_full_alpha.svg ./src/core/server/core_app/assets/logos/opensearch_dashboards.svg
cp ./etc/custom_welcome/Assets/default_branding/logo_full_alpha.svg ./src/core/server/core_app/assets/logos/opensearch_dashboards_on_light.svg
cp ./etc/custom_welcome/Assets/default_branding/logo_full_alpha.svg ./src/core/server/core_app/assets/logos/opensearch_dashboards_on_darke.svg
cp ./etc/custom_welcome/Assets/default_branding/logo_full_alpha.svg ./src/core/server/core_app/assets/logos/opensearch_dashboards_on_dark.svg

# Remove the `home` button from the sidebar menu
sed -i 's|\["EuiHorizontalRule"\],{margin:"none"})),external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_\["EuiFlexItem"\],{grow:false,style:{flexShrink:0}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_\["EuiCollapsibleNavGroup"\]|["EuiHorizontalRule"],{margin:"none"})),false\&\&external_osdSharedDeps_React_default.a.createElem(external_osdSharedDeps_ElasticEui_["EuiFlexItem"],{grow:false,style:{flexShrink:0}},external_osdSharedDeps_React_default.a.createElement(external_osdSharedDeps_ElasticEui_["EuiCollapsibleNavGroup"]|' ./src/core/target/public/core.entry.js
Expand Down
36 changes: 26 additions & 10 deletions stack/dashboard/base/generate_base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,32 @@ build() {
# -----------------------------------------------------------------------------

help() {
echo
echo "Usage: $0 [OPTIONS]"
echo
echo " --app-url <url> [Optional] Set the repository from where the Wazuh plugin should be downloaded. By default, will be used pre-release."
echo " -s, --store <path> [Optional] Set the destination path of package. By default, an output folder will be created."
echo " --reference <ref> [Optional] wazuh-packages branch or tag"
echo " --future [Optional] Build test future package 99.99.0 Used for development purposes."
echo " -r, --revision <rev> [Optional] Package revision. By default ${revision}"
echo " -h, --help Show this help."
echo
echo -e ""
echo -e "NAME"
echo -e " $(basename "$0") - Build Wazuh dashboard base file."
echo -e ""
echo -e "SYNOPSIS"
echo -e " $(basename "$0") -a | -s | -b | -f | -r | -h"
echo -e ""
echo -e "DESCRIPTION"
echo -e " --app-url <url>"
echo -e " [Optional] Set the repository from where the Wazuh plugin should be downloaded."
echo -e ""
echo -e " -s, --store <path>"
echo -e " [Optional] Set the destination path of package. By default, an output folder will be created."
echo -e ""
echo -e " --reference <ref>"
echo -e " [Optional] wazuh-packages branch or tag."
echo -e ""
echo -e " --future"
echo -e " [Optional] Build test future package. Used for development purposes."
echo -e ""
echo -e " -r, --revision <rev>"
echo -e " [Optional] Package revision."
echo -e ""
echo -e " -h, --help"
echo -e " Show this help."
echo -e ""
exit $1
}

Expand Down
Loading

0 comments on commit 08f6704

Please sign in to comment.