Skip to content

Commit

Permalink
feat: enable arm64 packages building
Browse files Browse the repository at this point in the history
  • Loading branch information
mjcr99 committed Jan 18, 2025
1 parent 9cf8fe3 commit 7913526
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
7 changes: 4 additions & 3 deletions packages/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,15 @@ set_vcpkg_remote_binary_cache(){
if [[ $(mono --version 2>/dev/null) =~ [0-9] ]]; then
echo "mono already installed, proceeding"
export VCPKG_BINARY_SOURCES="clear;nuget,GitHub,readwrite"
$sources_dir/src/vcpkg/bootstrap-vcpkg.sh
mono `$sources_dir/src/vcpkg/vcpkg fetch nuget | tail -n 1` \
NUGET_PATH="/usr/local/bin/nuget"
curl -o $NUGET_PATH https://dist.nuget.org/win-x86-commandline/v6.10.2/nuget.exe
mono $NUGET_PATH \
sources add \
-source "https://nuget.pkg.github.com/wazuh/index.json" \
-name "GitHub" \
-username "wazuh" \
-password "$vcpkg_token"
mono `$sources_dir/src/vcpkg/vcpkg fetch nuget | tail -n 1` \
mono $NUGET_PATH \
setapikey "$vcpkg_token" \
-source "https://nuget.pkg.github.com/wazuh/index.json"
else
Expand Down
7 changes: 3 additions & 4 deletions packages/debs/arm64/agent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ RUN mkdir -p /usr/local/lib/pkgconfig && \

RUN git config --global --add safe.directory /wazuh-local-src

RUN apt update && apt install dirmngr gnupg apt-transport-https ca-certificates -y && \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \
sh -c 'echo "deb https://download.mono-project.com/repo/debian stable-buster main" > /etc/apt/sources.list.d/mono-official-stable.list' && \
apt update && apt install mono-complete -y
RUN git clone https://github.com/mono/mono.git && cd mono && \
./autogen.sh --prefix=/usr/local && make -j $(nproc) && make install -j $(nproc) && \
cd .. && rm -rf mono && update-ca-certificates && cert-sync /etc/ssl/certs/ca-certificates.crt
5 changes: 2 additions & 3 deletions packages/rpms/amd64/agent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ RUN yum install -y gcc make wget git \
openssl-devel libxml2-devel kexec-tools elfutils \
libarchive-devel elfutils-libelf-devel \
patchelf elfutils-devel libgcrypt-devel \
file-devel gettext-devel curl-devel systemd-devel
file-devel gettext-devel curl-devel systemd-devel \
ninja-build which python3

RUN yum-builddep python34 -y

Expand Down Expand Up @@ -91,5 +92,3 @@ RUN mkdir -p /usr/local/var/lib/rpm && \
RUN rpmkeys --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" && \
su -c 'curl https://download.mono-project.com/repo/centos7-stable.repo | tee /etc/yum.repos.d/mono-centos7-stable.repo' && \
yum install mono-devel -y

RUN curl -o /usr/local/bin/nuget https://dist.nuget.org/win-x86-commandline/v6.10.2/nuget.exe
12 changes: 7 additions & 5 deletions packages/rpms/arm64/agent/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@ RUN yum install -y gcc make wget git \
automake autoconf libtool policycoreutils-python \
yum-utils epel-release redhat-rpm-config rpm-devel \
autopoint gettext nspr nspr-devel \
nss nss-devel magic magic-devel ninja-build \
nss nss-devel magic magic-devel \
db4 db4-devel zlib zlib-devel rpm-build bison \
sharutils bzip2-devel xz-devel lzo-devel \
e2fsprogs-devel libacl-devel libattr-devel \
openssl-devel libxml2-devel kexec-tools elfutils \
libarchive-devel elfutils-libelf-devel \
patchelf elfutils-devel libgcrypt-devel \
file-devel gettext-devel curl-devel systemd-devel
file-devel gettext-devel curl-devel systemd-devel \
which python3

RUN yum-builddep python34 -y

Expand Down Expand Up @@ -86,6 +87,7 @@ RUN mkdir -p /usr/local/var/lib/rpm && \
cp /var/lib/rpm/Packages /usr/local/var/lib/rpm/Packages && \
/usr/local/bin/rpm --rebuilddb && rm -rf /root/rpmbuild

RUN rpmkeys --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" && \
su -c 'curl https://download.mono-project.com/repo/centos7-stable.repo | tee /etc/yum.repos.d/mono-centos7-stable.repo' && \
yum install mono-devel -y
RUN git clone https://github.com/mono/mono.git && cd mono && ./autogen.sh --prefix=/usr/local && \
make -j $(nproc) && make install -j $(nproc) && cd .. && rm -rf mono && cert-sync /etc/ssl/certs/ca-bundle.crt

RUN yum install ninja-build -y

0 comments on commit 7913526

Please sign in to comment.