Skip to content

Commit

Permalink
Merge pull request #2809 from wazuh/dev-21615-update-rpm-to-4.19.1
Browse files Browse the repository at this point in the history
Upgrade to scripts to support building Wazuh with OpenSSL 3.0 - Backport to 4.8.0
  • Loading branch information
TomasTurina authored Feb 2, 2024
2 parents 4b91cef + 1812354 commit a8f78ef
Show file tree
Hide file tree
Showing 12 changed files with 68 additions and 22 deletions.
12 changes: 6 additions & 6 deletions aix/SPECS/wazuh-agent-aix.spec
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ rm -fr %{buildroot}
- More info: https://documentation.wazuh.com/current/release-notes/release-3-12-1.html
* Wed Mar 25 2020 support <[email protected]> - 3.12.0
- More info: https://documentation.wazuh.com/current/release-notes/release-3-12-0.html
* Thu Feb 24 2020 support <[email protected]> - 3.11.4
* Mon Feb 24 2020 support <[email protected]> - 3.11.4
- More info: https://documentation.wazuh.com/current/release-notes/release-3-11-4.html
* Wed Jan 22 2020 support <[email protected]> - 3.11.3
- More info: https://documentation.wazuh.com/current/release-notes/release-3-11-3.html
Expand All @@ -420,15 +420,15 @@ rm -fr %{buildroot}
- More info: https://documentation.wazuh.com/current/release-notes/release-3-10-1.html
* Mon Aug 26 2019 support <[email protected]> - 3.10.0
- More info: https://documentation.wazuh.com/current/release-notes/release-3-10-0.html
* Mon Aug 8 2019 support <[email protected]> - 3.9.5
* Thu Aug 8 2019 support <[email protected]> - 3.9.5
- More info: https://documentation.wazuh.com/current/release-notes/release-3-9-5.html
* Mon Jul 12 2019 support <[email protected]> - 3.9.4
* Fri Jul 12 2019 support <[email protected]> - 3.9.4
- More info: https://documentation.wazuh.com/current/release-notes/release-3-9-4.html
* Mon Jul 02 2019 support <[email protected]> - 3.9.3
* Tue Jul 02 2019 support <[email protected]> - 3.9.3
- More info: https://documentation.wazuh.com/current/release-notes/release-3-9-3.html
* Mon Jun 11 2019 support <[email protected]> - 3.9.2
* Tue Jun 11 2019 support <[email protected]> - 3.9.2
- More info: https://documentation.wazuh.com/current/release-notes/release-3-9-2.html
* Mon Jun 01 2019 support <[email protected]> - 3.9.1
* Sat Jun 01 2019 support <[email protected]> - 3.9.1
- More info: https://documentation.wazuh.com/current/release-notes/release-3-9-1.html
* Mon Feb 25 2019 support <[email protected]> - 3.9.0
- More info: https://documentation.wazuh.com/current/release-notes/release-3-9-0.html
Expand Down
2 changes: 1 addition & 1 deletion aix/generate_wazuh_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ build_perl() {

curl -LO http://www.cpan.org/src/5.0/perl-5.10.1.tar.gz -k -s
gunzip perl-5.10.1.tar.gz && tar -xf perl-5.10.1.tar
cd perl-5.10.1 && ./Configure -des -Dcc='gcc'
cd perl-5.10.1 && ./Configure -des -Dcc='gcc' -Dusethreads
make && make install
ln -fs /usr/local/bin/perl /bin/perl
ln -fs /usr/local/bin/perl /opt/freeware/bin/perl
Expand Down
6 changes: 3 additions & 3 deletions hp-ux/generate_wazuh_packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ 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
PATH=${build_tools_path}/bootstrap-gcc/gcc94_prefix/bin:${build_tools_path}/cmake_prefix_install/bin:/usr/local/bin:$PATH
LD_LIBRARY_PATH=${build_tools_path}/bootstrap-gcc/gcc94_prefix/lib
export LD_LIBRARY_PATH
CXX=${build_tools_path}/bootstrap-gcc/gcc94_prefix/bin/g++
Expand Down Expand Up @@ -71,6 +71,8 @@ build_environment() {
/usr/local/bin/depothelper $fpt_connection -f regex
/usr/local/bin/depothelper $fpt_connection -f python

rm -rf ${build_tools_path}

# Install GCC 9.4
mkdir ${build_tools_path}
cd ${build_tools_path}
Expand Down Expand Up @@ -201,8 +203,6 @@ clean() {
userdel wazuh
groupdel wazuh

rm -rf ${build_tools_path}

exit ${exit_code}
}

Expand Down
6 changes: 6 additions & 0 deletions rpms/CentOS/6/i386/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ RUN yum -y install util-linux-ng \

RUN yum-builddep python34 -y

RUN curl -OL http://packages.wazuh.com/utils/perl/perl-5.10.1.tar.gz && \
gunzip perl-5.10.1.tar.gz && tar -xf perl*.tar && \
cd /perl-5.10.1 && ./Configure -des -Dcc='gcc' -Dusethreads && \
make -j2 && make install && ln -fs /usr/local/bin/perl /bin/perl && \
cd / && rm -rf /perl-5.10.1*

# Update rpmbuild, rpm and autoconf
RUN curl -O http://packages.wazuh.com/utils/autoconf/autoconf-2.69.tar.gz && \
gunzip autoconf-2.69.tar.gz && tar xvf autoconf-2.69.tar && \
Expand Down
6 changes: 6 additions & 0 deletions rpms/CentOS/6/x86_64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ RUN yum-builddep python34 -y
RUN curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -
RUN yum install -y nodejs

RUN curl -OL http://packages.wazuh.com/utils/perl/perl-5.10.1.tar.gz && \
gunzip perl-5.10.1.tar.gz && tar -xf perl*.tar && \
cd /perl-5.10.1 && ./Configure -des -Dcc='gcc' -Dusethreads && \
make -j2 && make install && ln -fs /usr/local/bin/perl /bin/perl && \
cd / && rm -rf /perl-5.10.1*

# Update rpmbuild, rpm and autoconf
RUN curl -O http://packages.wazuh.com/utils/autoconf/autoconf-2.69.tar.gz && \
gunzip autoconf-2.69.tar.gz && tar xvf autoconf-2.69.tar && \
Expand Down
7 changes: 7 additions & 0 deletions rpms/CentOS/7/aarch64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@ 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-*

# Install Perl 5.10
RUN curl -OL http://packages.wazuh.com/utils/perl/perl-5.10.1.tar.gz && \
gunzip perl-5.10.1.tar.gz && tar -xf perl*.tar && \
cd /perl-5.10.1 && ./Configure -des -Dcc='gcc' -Dusethreads && \
make -j2 && make install && ln -fs /usr/local/bin/perl /bin/perl && \
cd / && rm -rf /perl-5.10.1*

RUN curl -O http://packages.wazuh.com/utils/openssl/openssl-1.1.1a.tar.gz && \
tar -xzf openssl-1.1.1a.tar.gz && cd openssl* && \
./config -Wl,--enable-new-dtags,-rpath,'$(LIBRPATH)' && \
Expand Down
7 changes: 7 additions & 0 deletions rpms/CentOS/7/armv7hl/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ RUN curl -OL http://packages.wazuh.com/utils/cmake/cmake-3.18.3.tar.gz && \
CXX=/usr/local/gcc-9.4.0/bin/g++ && \
linux32 make -j$(nproc) && linux32 make install && cd / && rm -rf cmake-*

# Install Perl 5.10
RUN curl -OL http://packages.wazuh.com/utils/perl/perl-5.10.1.tar.gz && \
gunzip perl-5.10.1.tar.gz && tar -xf perl*.tar && \
cd /perl-5.10.1 && ./Configure -des -Dcc='gcc' -Dusethreads && \
make -j2 && make install && ln -fs /usr/local/bin/perl /bin/perl && \
cd / && rm -rf /perl-5.10.1*

RUN curl -O http://packages.wazuh.com/utils/openssl/openssl-1.1.1a.tar.gz && \
tar -xzf openssl-1.1.1a.tar.gz && cd openssl* && \
linux32 ./config -Wl,--enable-new-dtags,-rpath,'$(LIBRPATH)' && \
Expand Down
7 changes: 7 additions & 0 deletions rpms/CentOS/7/ppc64le/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ RUN curl -OL http://packages.wazuh.com/utils/cmake/cmake-3.18.3.tar.gz && \
make -j$(nproc) && make install && cd / && rm -rf cmake-* && \
ln -sf /usr/bin/rpmbuild /usr/local/bin/rpmbuild

# Install Perl 5.10
RUN curl -OL http://packages.wazuh.com/utils/perl/perl-5.10.1.tar.gz && \
gunzip perl-5.10.1.tar.gz && tar -xf perl*.tar && \
cd /perl-5.10.1 && ./Configure -des -Dcc='gcc' -Dusethreads && \
make -j2 && make install && ln -fs /usr/local/bin/perl /bin/perl && \
cd / && rm -rf /perl-5.10.1*

# Add the scripts to build the RPM package
ADD build.sh /usr/local/bin/build_package
RUN chmod +x /usr/local/bin/build_package
Expand Down
7 changes: 7 additions & 0 deletions rpms/CentOS/7/x86_64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ RUN yum install -y gcc make wget git \
redhat-rpm-config sqlite-devel gdb tar tcl-devel tix-devel tk-devel \
valgrind-devel python-rpm-macros python3

# Install Perl 5.10
RUN curl -OL http://packages.wazuh.com/utils/perl/perl-5.10.1.tar.gz && \
gunzip perl-5.10.1.tar.gz && tar -xf perl*.tar && \
cd /perl-5.10.1 && ./Configure -des -Dcc='gcc' -Dusethreads && \
make -j2 && make install && ln -fs /usr/local/bin/perl /bin/perl && \
cd / && rm -rf /perl-5.10.1*

# Update rpmbuild, rpm and autoconf
RUN curl -O http://packages.wazuh.com/utils/autoconf/autoconf-2.69.tar.gz && \
gunzip autoconf-2.69.tar.gz && tar xvf autoconf-2.69.tar && \
Expand Down
12 changes: 6 additions & 6 deletions rpms/SPECS/wazuh-agent.spec
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ rm -fr %{buildroot}
- More info: https://documentation.wazuh.com/current/release-notes/release-3-12-1.html
* Wed Mar 25 2020 support <[email protected]> - 3.12.0
- More info: https://documentation.wazuh.com/current/release-notes/release-3-12-0.html
* Thu Feb 24 2020 support <[email protected]> - 3.11.4
* Mon Feb 24 2020 support <[email protected]> - 3.11.4
- More info: https://documentation.wazuh.com/current/release-notes/release-3-11-4.html
* Wed Jan 22 2020 support <[email protected]> - 3.11.3
- More info: https://documentation.wazuh.com/current/release-notes/release-3-11-3.html
Expand All @@ -755,15 +755,15 @@ rm -fr %{buildroot}
- More info: https://documentation.wazuh.com/current/release-notes/release-3-10-1.html
* Mon Aug 26 2019 support <[email protected]> - 3.10.0
- More info: https://documentation.wazuh.com/current/release-notes/release-3-10-0.html
* Mon Aug 8 2019 support <[email protected]> - 3.9.5
* Thu Aug 8 2019 support <[email protected]> - 3.9.5
- More info: https://documentation.wazuh.com/current/release-notes/release-3-9-5.html
* Mon Jul 12 2019 support <[email protected]> - 3.9.4
* Fri Jul 12 2019 support <[email protected]> - 3.9.4
- More info: https://documentation.wazuh.com/current/release-notes/release-3-9-4.html
* Mon Jul 02 2019 support <[email protected]> - 3.9.3
* Tue Jul 02 2019 support <[email protected]> - 3.9.3
- More info: https://documentation.wazuh.com/current/release-notes/release-3-9-3.html
* Mon Jun 11 2019 support <[email protected]> - 3.9.2
* Tue Jun 11 2019 support <[email protected]> - 3.9.2
- More info: https://documentation.wazuh.com/current/release-notes/release-3-9-2.html
* Mon Jun 01 2019 support <[email protected]> - 3.9.1
* Sat Jun 01 2019 support <[email protected]> - 3.9.1
- More info: https://documentation.wazuh.com/current/release-notes/release-3-9-1.html
* Mon Feb 25 2019 support <[email protected]> - 3.9.0
- More info: https://documentation.wazuh.com/current/release-notes/release-3-9-0.html
Expand Down
12 changes: 6 additions & 6 deletions rpms/SPECS/wazuh-manager.spec
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ rm -fr %{buildroot}
- More info: https://documentation.wazuh.com/current/release-notes/release-3-12-1.html
* Wed Mar 25 2020 support <[email protected]> - 3.12.0
- More info: https://documentation.wazuh.com/current/release-notes/release-3-12-0.html
* Thu Feb 24 2020 support <[email protected]> - 3.11.4
* Mon Feb 24 2020 support <[email protected]> - 3.11.4
- More info: https://documentation.wazuh.com/current/release-notes/release-3-11-4.html
* Wed Jan 22 2020 support <[email protected]> - 3.11.3
- More info: https://documentation.wazuh.com/current/release-notes/release-3-11-3.html
Expand All @@ -1006,15 +1006,15 @@ rm -fr %{buildroot}
- More info: https://documentation.wazuh.com/current/release-notes/release-3-10-1.html
* Mon Aug 26 2019 support <[email protected]> - 3.10.0
- More info: https://documentation.wazuh.com/current/release-notes/release-3-10-0.html
* Mon Aug 8 2019 support <[email protected]> - 3.9.5
* Thu Aug 8 2019 support <[email protected]> - 3.9.5
- More info: https://documentation.wazuh.com/current/release-notes/release-3-9-5.html
* Mon Jul 12 2019 support <[email protected]> - 3.9.4
* Fri Jul 12 2019 support <[email protected]> - 3.9.4
- More info: https://documentation.wazuh.com/current/release-notes/release-3-9-4.html
* Mon Jul 02 2019 support <[email protected]> - 3.9.3
* Tue Jul 02 2019 support <[email protected]> - 3.9.3
- More info: https://documentation.wazuh.com/current/release-notes/release-3-9-3.html
* Mon Jun 11 2019 support <[email protected]> - 3.9.2
* Tue Jun 11 2019 support <[email protected]> - 3.9.2
- More info: https://documentation.wazuh.com/current/release-notes/release-3-9-2.html
* Mon Jun 01 2019 support <[email protected]> - 3.9.1
* Sat Jun 01 2019 support <[email protected]> - 3.9.1
- More info: https://documentation.wazuh.com/current/release-notes/release-3-9-1.html
* Mon Feb 25 2019 support <[email protected]> - 3.9.0
- More info: https://documentation.wazuh.com/current/release-notes/release-3-9-0.html
Expand Down
6 changes: 6 additions & 0 deletions wpk/linux/x86_64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ 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/perl/perl-5.10.1.tar.gz && \
gunzip perl-5.10.1.tar.gz && tar -xf perl*.tar && \
cd /perl-5.10.1 && ./Configure -des -Dcc='gcc' -Dusethreads && \
make -j2 && make install && ln -fs /usr/local/bin/perl /bin/perl && \
cd / && rm -rf /perl-5.10.1*

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 && \
Expand Down

0 comments on commit a8f78ef

Please sign in to comment.