From 80f43b2d084af75d435626d60e8899e08a949955 Mon Sep 17 00:00:00 2001 From: arlington1985 Date: Tue, 5 Nov 2024 09:39:16 +0100 Subject: [PATCH] Make compatiable with v2.34.2 --- scripts/dockerfiles/Dockerfile.build | 1 - scripts/dockerfiles/Dockerfile.build-fips | 16 +++++++--------- scripts/dockerfiles/Dockerfile.fips-release | 3 +-- scripts/dockerfiles/Dockerfile.plugins | 2 +- scripts/dockerfiles/Dockerfile.plugins-fips | 2 +- scripts/dockerfiles/Dockerfile.plugins-windows | 2 +- 6 files changed, 11 insertions(+), 15 deletions(-) diff --git a/scripts/dockerfiles/Dockerfile.build b/scripts/dockerfiles/Dockerfile.build index bf4571022..58db0b08d 100644 --- a/scripts/dockerfiles/Dockerfile.build +++ b/scripts/dockerfiles/Dockerfile.build @@ -1,4 +1,3 @@ - FROM public.ecr.aws/amazonlinux/amazonlinux:2 as builder # Fluent Bit version; update these for each release diff --git a/scripts/dockerfiles/Dockerfile.build-fips b/scripts/dockerfiles/Dockerfile.build-fips index 71dd7b171..56221c3bd 100644 --- a/scripts/dockerfiles/Dockerfile.build-fips +++ b/scripts/dockerfiles/Dockerfile.build-fips @@ -18,8 +18,6 @@ RUN amazon-linux-extras install -y epel && yum install -y libASL --skip-broken RUN yum install -y \ glibc-devel \ libyaml-devel \ - openssl \ - openssl-devel \ cmake3 \ gcc \ gcc-c++ \ @@ -28,6 +26,7 @@ RUN yum install -y \ unzip \ tar \ git \ + openssl11-devel \ cyrus-sasl-devel \ pkgconfig \ systemd-devel \ @@ -42,12 +41,11 @@ RUN yum install -y \ --slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake3 \ --family cmake ENV HOME /home -ENV GO_STABLE_VERSION 1.20.7 # Lock Go Lang version to stable -# RUN export GO_STABLE_OUTPUT=`curl --silent https://go.dev/VERSION?m=text | cut -d "o" -f 2`; \ -# IFS=$'\n' GO_STABLE_VERSION=($GO_STABLE_OUTPUT); \ -RUN echo "Using go:stable version ${GO_STABLE_VERSION}"; \ +RUN export GO_STABLE_OUTPUT=`curl --silent https://go.dev/VERSION?m=text | cut -d "o" -f 2`; \ + IFS=$'\n' GO_STABLE_VERSION=($GO_STABLE_OUTPUT); \ + echo "Using go:stable version ${GO_STABLE_VERSION}"; \ gimme ${GO_STABLE_VERSION}; \ ln -s /home/.gimme/versions/go${GO_STABLE_VERSION}.linux.arm64 /home/.gimme/versions/gostable.linux.arm64; \ ln -s /home/.gimme/versions/go${GO_STABLE_VERSION}.linux.amd64 /home/.gimme/versions/gostable.linux.amd64 @@ -81,9 +79,9 @@ FROM builder as compile # Get Fluent Bit source code WORKDIR /tmp/fluent-bit-$FLB_VERSION/ -RUN git clone https://github.com/fluent/fluent-bit.git /tmp/fluent-bit-$FLB_VERSION/ +RUN git clone https://github.com/amazon-contributing/upstream-to-fluent-bit.git /tmp/fluent-bit-$FLB_VERSION/ WORKDIR /tmp/fluent-bit-$FLB_VERSION/build/ -RUN git fetch --all --tags && git checkout tags/v${FLB_VERSION} -b v${FLB_VERSION} && git describe --tags +RUN git checkout $FLB_VERSION # Apply Fluent Bit patches to base version COPY AWS_FLB_CHERRY_PICKS \ @@ -96,7 +94,7 @@ RUN AWS_FLB_CHERRY_PICKS_COUNT=`awk '{print $0 }' /AWS_FLB_CHERRY_PICKS | sed '/ if [ $AWS_FLB_CHERRY_PICKS_COUNT -gt 0 ]; \ then \ cat /AWS_FLB_CHERRY_PICKS | sed '/^#/d' \ - | xargs -l bash -c 'git fetch $0 $1 && git cherry-pick $2 || exit 255' && \ + | xargs -L1 bash -c 'git fetch $0 $1 && git cherry-pick $2 || exit 255' && \ \ (echo "Cherry Pick Patch Summary:"; \ echo -n "Base "; \ diff --git a/scripts/dockerfiles/Dockerfile.fips-release b/scripts/dockerfiles/Dockerfile.fips-release index 02255674a..7281603a1 100644 --- a/scripts/dockerfiles/Dockerfile.fips-release +++ b/scripts/dockerfiles/Dockerfile.fips-release @@ -20,8 +20,7 @@ RUN install bin/fluent-bit /fluent-bit/bin/ FROM public.ecr.aws/amazonlinux/amazonlinux:2 RUN yum upgrade -y \ && yum install -y \ - openssl \ - openssl-devel \ + openssl11-devel \ cyrus-sasl-devel \ pkgconfig \ systemd-devel \ diff --git a/scripts/dockerfiles/Dockerfile.plugins b/scripts/dockerfiles/Dockerfile.plugins index 77951b3b4..0f1b7cd3c 100644 --- a/scripts/dockerfiles/Dockerfile.plugins +++ b/scripts/dockerfiles/Dockerfile.plugins @@ -4,7 +4,7 @@ RUN chmod +x /bin/gimme RUN yum upgrade -y && yum install -y tar gzip git make gcc ENV HOME /home ARG GO_STABLE_VERSION -env GO_STABLE_VERSION=$GO_STABLE_VERSION +ENV GO_STABLE_VERSION=$GO_STABLE_VERSION # Lock Go Lang version to stable RUN gimme ${GO_STABLE_VERSION}; \ diff --git a/scripts/dockerfiles/Dockerfile.plugins-fips b/scripts/dockerfiles/Dockerfile.plugins-fips index 8d2d25fda..f0afd6155 100644 --- a/scripts/dockerfiles/Dockerfile.plugins-fips +++ b/scripts/dockerfiles/Dockerfile.plugins-fips @@ -1,7 +1,7 @@ FROM public.ecr.aws/amazonlinux/amazonlinux:2 RUN curl -sL -o /bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/master/gimme RUN chmod +x /bin/gimme -RUN yum upgrade -y && yum install -y tar gzip git make gcc dracut-fips openssl-devel +RUN yum upgrade -y && yum install -y tar gzip git make gcc dracut-fips openssl11-devel ENV HOME /home ENV GOEXPERIMENT=boringcrypto ENV CGO_ENABLED=1 diff --git a/scripts/dockerfiles/Dockerfile.plugins-windows b/scripts/dockerfiles/Dockerfile.plugins-windows index a851c7621..72056bddb 100644 --- a/scripts/dockerfiles/Dockerfile.plugins-windows +++ b/scripts/dockerfiles/Dockerfile.plugins-windows @@ -5,7 +5,7 @@ RUN curl -sL -o /bin/gimme https://raw.githubusercontent.com/travis-ci/gimme/mas RUN chmod +x /bin/gimme ENV HOME /home ARG GO_STABLE_VERSION -env GO_STABLE_VERSION=$GO_STABLE_VERSION +ENV GO_STABLE_VERSION=$GO_STABLE_VERSION # Lock Go Lang version to stable RUN gimme ${GO_STABLE_VERSION}; \