diff --git a/.github/workflows/call-build-linux-packages.yaml b/.github/workflows/call-build-linux-packages.yaml index 37d8f3d7dd5..97d187cd635 100644 --- a/.github/workflows/call-build-linux-packages.yaml +++ b/.github/workflows/call-build-linux-packages.yaml @@ -163,7 +163,9 @@ jobs: # For ubuntu map to codename using the disto-info list (CSV) run: | sudo apt-get update - sudo apt-get install -y distro-info awscli + sudo apt-get install -y distro-info + sudo apt-get install -y awscli || sudo snap install aws-cli --classic + TARGET=${DISTRO%*.arm64v8} if [[ "$TARGET" == "ubuntu/"* ]]; then UBUNTU_CODENAME=$(cut -d ',' -f 1,3 < "/usr/share/distro-info/ubuntu.csv"|grep "${TARGET##*/}"|cut -d ',' -f 2) @@ -224,7 +226,9 @@ jobs: timeout-minutes: 10 run: | sudo apt-get update - sudo apt-get install -y createrepo-c aptly awscli + sudo apt-get install -y createrepo-c aptly + sudo apt-get install -y awscli || sudo snap install aws-cli --classic + shell: bash env: DEBIAN_FRONTEND: noninteractive diff --git a/packaging/README.md b/packaging/README.md index b726c0a6817..4066f30b15f 100644 --- a/packaging/README.md +++ b/packaging/README.md @@ -11,10 +11,18 @@ The [`distros`](./distros/) directory contains OCI container definitions used to | Distro | Version / Code Name | Arch | Target Option | |---------------|---------------------------|---------|--------------------------| -| AmazonLinux | 2 | x86_64 | amazonlinux/2 | -| AmazonLinux | 2 | arm64v8 | amazonlinux/2.arm64v8 | +| AlmaLinux | 10 | x86_64 | almalinux/10 | +| AlmaLinux | 10 | arm64v8 | almalinux/10.arm64v8 | +| AlmaLinux | 9 | x86_64 | almalinux/9 | +| AlmaLinux | 9 | arm64v8 | almalinux/9.arm64v8 | +| AlmaLinux | 8 | x86_64 | almalinux/8 | +| AlmaLinux | 8 | arm64v8 | almalinux/8.arm64v8 | | AmazonLinux | 2023 | x86_64 | amazonlinux/2023 | | AmazonLinux | 2023 | arm64v8 | amazonlinux/2023.arm64v8 | +| AmazonLinux | 2 | x86_64 | amazonlinux/2 | +| AmazonLinux | 2 | arm64v8 | amazonlinux/2.arm64v8 | +| CentOS Stream | 10 | x86_64 | centos/10 | +| CentOS Stream | 10 | arm64v8 | centos/10.arm64v8 | | CentOS Stream | 9 | x86_64 | centos/9 | | CentOS Stream | 9 | arm64v8 | centos/9.arm64v8 | | CentOS | 8 | x86_64 | centos/8 | @@ -41,6 +49,12 @@ The [`distros`](./distros/) directory contains OCI container definitions used to | Raspbian | 12 / Bookworm | arm32v7 | raspbian/bookworm | | Raspbian | 11 / Bullseye | arm32v7 | raspbian/bullseye | | Raspbian | 10 / Buster | arm32v7 | raspbian/buster | +| Rocky Linux | 10 | x86_64 | rockylinux/10 | +| Rocky Linux | 10 | arm64v8 | rockylinux/10.arm64v8 | +| Rocky Linux | 9 | x86_64 | rockylinux/9 | +| Rocky Linux | 9 | arm64v8 | rockylinux/9.arm64v8 | +| Rocky Linux | 8 | x86_64 | rockylinux/8 | +| Rocky Linux | 8 | arm64v8 | rockylinux/8.arm64v8 | These container images are intended to be built from the root of this repo to build the locally checked out/updated version of the source easily for any target. diff --git a/packaging/build-config.json b/packaging/build-config.json index ab669256b1f..4ca4f44df99 100644 --- a/packaging/build-config.json +++ b/packaging/build-config.json @@ -40,6 +40,14 @@ "target": "centos/9.arm64v8", "type": "rpm" }, + { + "target": "centos/10", + "type": "rpm" + }, + { + "target": "centos/10.arm64v8", + "type": "rpm" + }, { "target": "rockylinux/8", "type": "rpm" @@ -56,6 +64,14 @@ "target": "rockylinux/9.arm64v8", "type": "rpm" }, + { + "target": "rockylinux/10", + "type": "rpm" + }, + { + "target": "rockylinux/10.arm64v8", + "type": "rpm" + }, { "target": "almalinux/8", "type": "rpm" @@ -72,6 +88,14 @@ "target": "almalinux/9.arm64v8", "type": "rpm" }, + { + "target": "almalinux/10", + "type": "rpm" + }, + { + "target": "almalinux/10.arm64v8", + "type": "rpm" + }, { "target": "debian/bookworm", "type": "deb" diff --git a/packaging/distros/almalinux/Dockerfile b/packaging/distros/almalinux/Dockerfile index 5d5b93fd5c6..a17dbd43bf3 100644 --- a/packaging/distros/almalinux/Dockerfile +++ b/packaging/distros/almalinux/Dockerfile @@ -7,10 +7,10 @@ ARG BASE_BUILDER # Use buildkit to skip unused base images: DOCKER_BUILDKIT=1 # Multiarch support -FROM multiarch/qemu-user-static:x86_64-aarch64 as multiarch-aarch64 +FROM multiarch/qemu-user-static:x86_64-aarch64 AS multiarch-aarch64 # almalinux/8 base image -FROM almalinux:8 as almalinux-8-base +FROM almalinux:8 AS almalinux-8-base # Add for the YAML development libraries RUN sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/almalinux-powertools.repo @@ -25,7 +25,7 @@ RUN yum -y update && \ # almalinux/8.arm64v8 base image # hadolint ignore=DL3029 -FROM --platform=arm64 almalinux:8 as almalinux-8.arm64v8-base +FROM --platform=arm64 almalinux:8 AS almalinux-8.arm64v8-base COPY --from=multiarch-aarch64 /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static @@ -44,7 +44,7 @@ RUN yum -y update && \ ARG FLB_JEMALLOC_OPTIONS="--with-lg-page=16 --with-lg-quantum=3" ENV FLB_JEMALLOC_OPTIONS=$FLB_JEMALLOC_OPTIONS -FROM almalinux:9 as almalinux-9-base +FROM almalinux:9 AS almalinux-9-base # Add for the YAML development libraries RUN sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/almalinux-crb.repo @@ -59,7 +59,41 @@ RUN yum -y update && \ # almalinux/8.arm64v8 base image # hadolint ignore=DL3029 -FROM --platform=arm64 almalinux:9 as almalinux-9.arm64v8-base +FROM --platform=arm64 almalinux:9 AS almalinux-9.arm64v8-base + +COPY --from=multiarch-aarch64 /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static + +# Add for the YAML development libraries +RUN sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/almalinux-crb.repo + +# hadolint ignore=DL3033 +RUN yum -y update && \ + yum install -y --allowerasing rpm-build curl ca-certificates gcc gcc-c++ cmake make bash \ + wget unzip systemd-devel wget flex bison \ + postgresql-libs postgresql-devel postgresql-server postgresql \ + cyrus-sasl-lib openssl openssl-libs openssl-devel libyaml-devel pkgconf-pkg-config && \ + yum clean all + +# Need larger page size +ARG FLB_JEMALLOC_OPTIONS="--with-lg-page=16 --with-lg-quantum=3" +ENV FLB_JEMALLOC_OPTIONS=$FLB_JEMALLOC_OPTIONS + +FROM almalinux:10 AS almalinux-10-base + +# Add for the YAML development libraries +RUN sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/almalinux-crb.repo + +# hadolint ignore=DL3033 +RUN yum -y update && \ + yum install -y --allowerasing rpm-build curl ca-certificates gcc gcc-c++ cmake make bash \ + wget unzip systemd-devel wget flex bison \ + postgresql-libs postgresql-devel postgresql-server postgresql \ + cyrus-sasl-lib openssl openssl-libs openssl-devel libyaml-devel pkgconf-pkg-config && \ + yum clean all + +# almalinux/8.arm64v8 base image +# hadolint ignore=DL3029 +FROM --platform=arm64 almalinux:10 AS almalinux-10.arm64v8-base COPY --from=multiarch-aarch64 /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static @@ -80,7 +114,7 @@ ENV FLB_JEMALLOC_OPTIONS=$FLB_JEMALLOC_OPTIONS # Common build for all distributions now # hadolint ignore=DL3006 -FROM $BASE_BUILDER as builder +FROM $BASE_BUILDER AS builder ARG FLB_NIGHTLY_BUILD ENV FLB_NIGHTLY_BUILD=$FLB_NIGHTLY_BUILD diff --git a/packaging/distros/centos/Dockerfile b/packaging/distros/centos/Dockerfile index b581d5aa1f5..fc427764455 100644 --- a/packaging/distros/centos/Dockerfile +++ b/packaging/distros/centos/Dockerfile @@ -225,6 +225,69 @@ ENV FLB_KAFKA=$FLB_KAFKA ARG FLB_JEMALLOC_OPTIONS="--with-lg-page=16 --with-lg-quantum=3" ENV FLB_JEMALLOC_OPTIONS=$FLB_JEMALLOC_OPTIONS +FROM quay.io/centos/centos:stream10 AS centos-10-base + +ENV CMAKE_HOME="/opt/cmake" +ARG CMAKE_VERSION="3.31.6" +ARG CMAKE_URL="https://github.com/Kitware/CMake/releases/download" + +# Add for the YAML development libraries +# hadolint ignore=DL3033,DL3041 +RUN dnf -y install 'dnf-command(config-manager)' && dnf -y config-manager --set-enabled crb && \ + dnf -y install rpm-build ca-certificates gcc gcc-c++ make bash \ + wget unzip systemd-devel wget flex bison \ + postgresql-libs postgresql-devel postgresql-server postgresql \ + cyrus-sasl-lib cyrus-sasl-devel openssl openssl-libs openssl-devel libcurl-devel pkgconf-pkg-config \ + libyaml-devel zlib-devel \ + tar gzip && \ + dnf clean all && \ + mkdir -p "${CMAKE_HOME}" && \ + cmake_download_url="${CMAKE_URL}/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-$(uname -m).tar.gz" && \ + echo "Downloading CMake ${CMAKE_VERSION}: ${cmake_download_url} -> ${CMAKE_HOME}" && \ + curl -jksSL "${cmake_download_url}" | tar -xzf - -C "${CMAKE_HOME}" --strip-components 1 + +ENV PATH="${CMAKE_HOME}/bin:${PATH}" + +ARG FLB_OUT_PGSQL=On +ENV FLB_OUT_PGSQL=$FLB_OUT_PGSQL + +# hadolint ignore=DL3029 +FROM --platform=arm64 quay.io/centos/centos:stream10 AS centos-10.arm64v8-base + +COPY --from=multiarch-aarch64 /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static + +ENV CMAKE_HOME="/opt/cmake" +ARG CMAKE_VERSION="3.31.6" +ARG CMAKE_URL="https://github.com/Kitware/CMake/releases/download" + +# Add for the YAML development libraries +# hadolint ignore=DL3033,DL3041 +RUN dnf -y install 'dnf-command(config-manager)' && dnf -y config-manager --set-enabled crb && \ + dnf -y install rpm-build ca-certificates gcc gcc-c++ make bash \ + wget unzip systemd-devel wget flex bison \ + postgresql-libs postgresql-devel postgresql-server postgresql \ + cyrus-sasl-lib cyrus-sasl-devel openssl openssl-libs openssl-devel libcurl-devel pkgconf-pkg-config \ + libyaml-devel zlib-devel \ + tar gzip && \ + dnf clean all && \ + mkdir -p "${CMAKE_HOME}" && \ + cmake_download_url="${CMAKE_URL}/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-linux-$(uname -m).tar.gz" && \ + echo "Downloading CMake ${CMAKE_VERSION}: ${cmake_download_url} -> ${CMAKE_HOME}" && \ + curl -jksSL "${cmake_download_url}" | tar -xzf - -C "${CMAKE_HOME}" --strip-components 1 + +ENV PATH="${CMAKE_HOME}/bin:${PATH}" + +ARG FLB_OUT_PGSQL=On +ENV FLB_OUT_PGSQL=$FLB_OUT_PGSQL +ARG FLB_UNICODE_ENCODER=On +ENV FLB_UNICODE_ENCODER=$FLB_UNICODE_ENCODER +ARG FLB_KAFKA=On +ENV FLB_KAFKA=$FLB_KAFKA + +# Need larger page size +ARG FLB_JEMALLOC_OPTIONS="--with-lg-page=16 --with-lg-quantum=3" +ENV FLB_JEMALLOC_OPTIONS=$FLB_JEMALLOC_OPTIONS + # Common build for all distributions now # hadolint ignore=DL3006 FROM $BASE_BUILDER AS builder diff --git a/packaging/distros/rockylinux/Dockerfile b/packaging/distros/rockylinux/Dockerfile index b9e2c242120..9b4f5100989 100644 --- a/packaging/distros/rockylinux/Dockerfile +++ b/packaging/distros/rockylinux/Dockerfile @@ -7,10 +7,10 @@ ARG BASE_BUILDER # Use buildkit to skip unused base images: DOCKER_BUILDKIT=1 # Multiarch support -FROM multiarch/qemu-user-static:x86_64-aarch64 as multiarch-aarch64 +FROM multiarch/qemu-user-static:x86_64-aarch64 AS multiarch-aarch64 # rockylinux/8 base image -FROM rockylinux:8 as rockylinux-8-base +FROM rockylinux/rockylinux:8 AS rockylinux-8-base # Add for the YAML development libraries RUN sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/Rocky-PowerTools.repo @@ -25,7 +25,7 @@ RUN yum -y update && \ # rockylinux/8.arm64v8 base image # hadolint ignore=DL3029 -FROM --platform=arm64 rockylinux:8 as rockylinux-8.arm64v8-base +FROM --platform=arm64 rockylinux/rockylinux:8 AS rockylinux-8.arm64v8-base COPY --from=multiarch-aarch64 /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static @@ -44,7 +44,7 @@ RUN yum -y update && \ ARG FLB_JEMALLOC_OPTIONS="--with-lg-page=16 --with-lg-quantum=3" ENV FLB_JEMALLOC_OPTIONS=$FLB_JEMALLOC_OPTIONS -FROM rockylinux:9 as rockylinux-9-base +FROM rockylinux/rockylinux:9 AS rockylinux-9-base # Add for the YAML development libraries RUN sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/rocky-devel.repo @@ -57,9 +57,43 @@ RUN yum -y update && \ cyrus-sasl-lib openssl openssl-libs openssl-devel libyaml-devel pkgconf-pkg-config && \ yum clean all -# rockylinux/8.arm64v8 base image +# rockylinux/9.arm64v8 base image +# hadolint ignore=DL3029 +FROM --platform=arm64 rockylinux/rockylinux:9 AS rockylinux-9.arm64v8-base + +COPY --from=multiarch-aarch64 /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static + +# Add for the YAML development libraries +RUN sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/rocky-devel.repo + +# hadolint ignore=DL3033 +RUN yum -y update && \ + yum install -y --allowerasing rpm-build curl ca-certificates gcc gcc-c++ cmake make bash \ + wget unzip systemd-devel wget flex bison \ + postgresql-libs postgresql-devel postgresql-server postgresql \ + cyrus-sasl-lib openssl openssl-libs openssl-devel libyaml-devel pkgconf-pkg-config && \ + yum clean all + +# Need larger page size +ARG FLB_JEMALLOC_OPTIONS="--with-lg-page=16 --with-lg-quantum=3" +ENV FLB_JEMALLOC_OPTIONS=$FLB_JEMALLOC_OPTIONS + +FROM rockylinux/rockylinux:10 AS rockylinux-10-base + +# Add for the YAML development libraries +RUN sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/rocky-devel.repo + +# hadolint ignore=DL3033 +RUN yum -y update && \ + yum install -y --allowerasing rpm-build curl ca-certificates gcc gcc-c++ cmake make bash \ + wget unzip systemd-devel wget flex bison \ + postgresql-libs postgresql-devel postgresql-server postgresql \ + cyrus-sasl-lib openssl openssl-libs openssl-devel libyaml-devel pkgconf-pkg-config && \ + yum clean all + +# rockylinux/10.arm64v8 base image # hadolint ignore=DL3029 -FROM --platform=arm64 rockylinux:9 as rockylinux-9.arm64v8-base +FROM --platform=arm64 rockylinux/rockylinux:10 AS rockylinux-10.arm64v8-base COPY --from=multiarch-aarch64 /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static @@ -80,7 +114,7 @@ ENV FLB_JEMALLOC_OPTIONS=$FLB_JEMALLOC_OPTIONS # Common build for all distributions now # hadolint ignore=DL3006 -FROM $BASE_BUILDER as builder +FROM $BASE_BUILDER AS builder ARG FLB_NIGHTLY_BUILD ENV FLB_NIGHTLY_BUILD=$FLB_NIGHTLY_BUILD diff --git a/packaging/test-release-packages.sh b/packaging/test-release-packages.sh index 310364738c4..37719d7a2c6 100755 --- a/packaging/test-release-packages.sh +++ b/packaging/test-release-packages.sh @@ -37,18 +37,28 @@ function check_version() { fi } -APT_TARGETS=("ubuntu:22.04" +APT_TARGETS=( + "ubuntu:22.04" + "ubuntu:24.04" "debian:10" - "debian:11") + "debian:11" + "debian:12" + "debian:13" +) -YUM_TARGETS=("centos:7" +YUM_TARGETS=( + "centos:7" "almalinux:8" "almalinux:9" + "almalinux:10" "rockylinux:8" "rockylinux:9" + "rockylinux:10" "quay.io/centos/centos:stream9" + "quay.io/centos/centos:stream10" "amazonlinux:2" - "amazonlinux:2023") + "amazonlinux:2023" +) for IMAGE in "${YUM_TARGETS[@]}" do diff --git a/packaging/update-repos.sh b/packaging/update-repos.sh index 4667bfe793f..aff62af7d64 100755 --- a/packaging/update-repos.sh +++ b/packaging/update-repos.sh @@ -31,7 +31,19 @@ fi # AWS_S3_BUCKET_STAGING=fluentbit-staging export AWS_REGION=${AWS_REGION:-us-east-1} -RPM_REPO_PATHS=("amazonlinux/2" "amazonlinux/2023" "centos/7" "centos/8" "centos/9" "rockylinux/8" "rockylinux/9" "almalinux/8" "almalinux/9" ) +RPM_REPO_PATHS=( "amazonlinux/2" + "amazonlinux/2023" + "centos/7" + "centos/8" + "centos/9" + "centos/10" + "rockylinux/8" + "rockylinux/9" + "rockylinux/10" + "almalinux/8" + "almalinux/9" + "almalinux/10" + ) if [[ "${AWS_SYNC:-false}" != "false" ]]; then aws s3 sync s3://"${AWS_S3_BUCKET_RELEASE:?}" "${BASE_PATH:?}"