Skip to content

Commit

Permalink
Merge pull request #2548 from wazuh/merge-4.7.1-into-4.8.0
Browse files Browse the repository at this point in the history
Merge 4.7.1 into 4.8.0
  • Loading branch information
vikman90 authored Oct 24, 2023
2 parents 5fb3814 + 55f5480 commit 9a03238
Show file tree
Hide file tree
Showing 14 changed files with 67 additions and 21 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 @@ -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.8" ]; then echo "VERSION=master" >> $GITHUB_ENV ; else echo "VERSION=$(cat $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV; fi
if [ $MAJOR == "4.9" ]; then echo "VERSION=master" >> $GITHUB_ENV ; else echo "VERSION=$(cat $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV; fi
echo "CONTAINER_NAME=deb_builder_${{ matrix.ARCHITECTURE }}" >> $GITHUB_ENV
- name: Download docker image for package building
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 @@ -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.8" ]; then echo "VERSION=master" >> $GITHUB_ENV ; else echo "VERSION=$(cat $GITHUB_WORKSPACE/VERSION)" >> $GITHUB_ENV; fi
if [ $MAJOR == "4.9" ]; then echo "VERSION=master" >> $GITHUB_ENV ; else echo "VERSION=$(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
Expand Down
10 changes: 5 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ All notable changes to this project will be documented in this file.

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

## [4.5.3]
## [v4.5.4]

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

## [4.5.2]
## [v4.5.3]

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

## [v4.5.1]
## [v4.5.2]

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

Expand Down
4 changes: 3 additions & 1 deletion aix/SPECS/wazuh-agent-aix.spec
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,12 @@ rm -fr %{buildroot}
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-0.html
* Tue Nov 14 2023 support <[email protected]> - 4.7.1
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-1.html
* Sat Oct 28 2023 support <[email protected]> - 4.7.0
* Wed Nov 08 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
- 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
* Tue Oct 10 2023 support <[email protected]> - 4.5.3
- More info: https://documentation.wazuh.com/current/release-notes/release-4-5-3.html
* Thu Aug 31 2023 support <[email protected]> - 4.5.2
Expand Down
22 changes: 18 additions & 4 deletions bump_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
test_files=glob.glob('**/test-*.sh', recursive=True)
install_variables_files=glob.glob('**/installVariables.sh', recursive=True)
changelog_md_files=glob.glob('**/CHANGELOG.md', recursive=True)
VERSION_files=glob.glob('**/VERSION', recursive=True)

## Bump version in .spec files
SPEC_FORMAT_STRING="%a %b %d %Y"
Expand Down Expand Up @@ -72,7 +73,7 @@
filedata=file.read()
install_type=re.search(r'(wazuh-(agent|manager|indexer|dashboard))',
filedata).group(1)
changelog_string=(f"wazuh-{install_type} ({version}-RELEASE) stable; "
changelog_string=(f"{install_type} ({version}-RELEASE) stable; "
"urgency=low\n\n * More info: https://documentation.wazuh.com/"
f"current/release-notes/release-{version.major}-{version.minor}-"
f"{version.micro}.html\n\n -- "
Expand Down Expand Up @@ -128,9 +129,9 @@
REGEX=r'<string>(\d+\.\d+\.\d+)-(\d+)</string>'
filedata=re.sub(REGEX, f'<string>{version}-{args.revision}</string>',
filedata)
REGEX=r'<string>wazuh-agent-(\d+\.\d+\.\d+)-(\d+)</string>'
REGEX=r'<string>wazuh-agent-(\d+\.\d+\.\d+)-(\d+)'
filedata=re.sub(REGEX,
f'<string>wazuh-agent-{version}-{args.revision}</string>',
f'<string>wazuh-agent-{version}-{args.revision}',
filedata)

with open(pkgproj_file, 'w', encoding="utf-8") as file:
Expand Down Expand Up @@ -180,9 +181,22 @@
REGEX=(r'All notable changes to this project '
r'will be documented in this file.')
changelog_string=(f"## [{version}]\n\n- https://github.com/wazuh/"
f"wazuh-packages/releases/tag/v{version}")
f"wazuh-packages/releases/tag/v{version}\n")
filedata=re.sub(REGEX, REGEX + '\n' + changelog_string,
filedata)

with open(changelog_md_file, 'w', encoding="utf-8") as file:
file.write(filedata)

## Bump version in VERSION files

for VERSION_file in VERSION_files:
with open(VERSION_file, 'r', encoding="utf-8") as file:
print('Bumping version in ' + VERSION_file)
filedata=file.read()
# Replace version and revision
REGEX=r'(\d+\.\d+\.\d+)'
filedata=re.sub(REGEX, f'{version}', filedata)

with open(VERSION_file, 'w', encoding="utf-8") as file:
file.write(filedata)
8 changes: 7 additions & 1 deletion debs/SPECS/wazuh-agent/debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@ 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, 07 Nov 2023 00:00:00 +0000
-- Wazuh, Inc <[email protected]> Wed, 08 Nov 2023 00:00:00 +0000

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

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

-- Wazuh, Inc <[email protected]> Tue, 31 Oct 2023 00:00:00 +0000

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

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

-- Wazuh, Inc <[email protected]> Tue, 24 Oct 2023 00:00:00 +0000

wazuh-agent (4.5.3-RELEASE) stable; urgency=low
Expand Down
8 changes: 7 additions & 1 deletion debs/SPECS/wazuh-manager/debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@ 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, 07 Nov 2023 00:00:00 +0000
-- Wazuh, Inc <[email protected]> Wed, 08 Nov 2023 00:00:00 +0000

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

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

-- Wazuh, Inc <[email protected]> Tue, 31 Oct 2023 00:00:00 +0000

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

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

-- Wazuh, Inc <[email protected]> Tue, 24 Oct 2023 00:00:00 +0000

wazuh-manager (4.5.3-RELEASE) stable; urgency=low
Expand Down
4 changes: 3 additions & 1 deletion rpms/SPECS/wazuh-agent.spec
Original file line number Diff line number Diff line change
Expand Up @@ -626,10 +626,12 @@ rm -fr %{buildroot}
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-0.html
* Tue Nov 14 2023 support <[email protected]> - 4.7.1
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-1.html
* Tue Nov 07 2023 support <[email protected]> - 4.7.0
* Wed Nov 08 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
- 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
* Tue Oct 10 2023 support <[email protected]> - 4.5.3
- More info: https://documentation.wazuh.com/current/release-notes/release-4-5-3.html
* Thu Aug 31 2023 support <[email protected]> - 4.5.2
Expand Down
4 changes: 3 additions & 1 deletion rpms/SPECS/wazuh-manager.spec
Original file line number Diff line number Diff line change
Expand Up @@ -849,10 +849,12 @@ rm -fr %{buildroot}
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-0.html
* Tue Nov 14 2023 support <[email protected]> - 4.7.1
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-1.html
* Tue Nov 07 2023 support <[email protected]> - 4.7.0
* Wed Nov 08 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
- 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
* Tue Oct 10 2023 support <[email protected]> - 4.5.3
- More info: https://documentation.wazuh.com/current/release-notes/release-4-5-3.html
* Thu Aug 31 2023 support <[email protected]> - 4.5.2
Expand Down
6 changes: 5 additions & 1 deletion stack/dashboard/deb/debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ wazuh-dashboard (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, 07 Nov 2023 00:00:00 +0000
-- Wazuh, Inc <[email protected]> Wed, 08 Nov 2023 00:00:00 +0000

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

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

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

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

-- Wazuh, Inc <[email protected]> Tue, 24 Oct 2023 00:00:00 +0000

wazuh-dashboard (4.5.3-RELEASE) stable; urgency=low
Expand Down
4 changes: 3 additions & 1 deletion stack/dashboard/rpm/wazuh-dashboard.spec
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 +412,12 @@ rm -fr %{buildroot}
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-0.html
* Tue Nov 14 2023 support <[email protected]> - 4.7.1
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-1.html
* Tue Nov 07 2023 support <[email protected]> - 4.7.0
* Wed Nov 08 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
- 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
* Tue Oct 10 2023 support <[email protected]> - 4.5.3
- More info: https://documentation.wazuh.com/current/release-notes/release-4-5-3.html
* Thu Aug 31 2023 support <[email protected]> - 4.5.2
Expand Down
8 changes: 7 additions & 1 deletion stack/indexer/deb/debian/changelog
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,18 @@ wazuh-indexer (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, 07 Nov 2023 00:00:00 +0000
-- Wazuh, Inc <[email protected]> Wed, 08 Nov 2023 00:00:00 +0000

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

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

-- Wazuh, Inc <[email protected]> Tue, 31 Oct 2023 00:00:00 +0000

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

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

-- Wazuh, Inc <[email protected]> Tue, 24 Oct 2023 00:00:00 +0000

wazuh-indexer (4.5.3-RELEASE) stable; urgency=low
Expand Down
2 changes: 1 addition & 1 deletion stack/indexer/rpm/build_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ build_rpm() {
fi
../base/generate_base.sh -s ${outdir} -r ${revision} ${base_cmd}
else
if ! [ "${reference}" ];then
if [ "${reference}" ];then
version=$(curl -sL https://raw.githubusercontent.com/wazuh/wazuh-packages/${reference}/VERSION | cat)
else
version=$(cat ${current_path}/../../../VERSION)
Expand Down
4 changes: 3 additions & 1 deletion stack/indexer/rpm/wazuh-indexer.spec
Original file line number Diff line number Diff line change
Expand Up @@ -1448,10 +1448,12 @@ rm -fr %{buildroot}
- More info: https://documentation.wazuh.com/current/release-notes/release-4-8-0.html
* Tue Nov 14 2023 support <[email protected]> - 4.7.1
- More info: https://documentation.wazuh.com/current/release-notes/release-4-7-1.html
* Tue Nov 07 2023 support <[email protected]> - 4.7.0
* Wed Nov 08 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
- 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
* Tue Oct 10 2023 support <[email protected]> - 4.5.3
- More info: https://documentation.wazuh.com/current/release-notes/release-4-5-3.html
* Thu Aug 31 2023 support <[email protected]> - 4.5.2
Expand Down

0 comments on commit 9a03238

Please sign in to comment.