Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
130f53d
test: ensure we use correct shell during ubuntu image builds
patrick-stephens Jul 3, 2026
bf37fa6
fix: resolve CentOS 6 git issue in tests
patrick-stephens Jul 6, 2026
c29078c
test: handle local retests
patrick-stephens Jul 10, 2026
653ba1b
Merge remote-tracking branch 'origin/main' into 341_resolve_git_confi…
patrick-stephens Jul 10, 2026
92bbeeb
ci: format YAML files
patrick-stephens Jul 10, 2026
1204702
fix: resolve libgit2 version for older targets
patrick-stephens Jul 10, 2026
acfa8ee
fix: resolve AL 2 failures by building libgit2 from source
patrick-stephens Jul 10, 2026
a22c768
fix: resolve libgit2 version for older targets
patrick-stephens Jul 10, 2026
c588c77
fix: revert cmake check
patrick-stephens Jul 10, 2026
f985dc0
fix: guard against root deletion
patrick-stephens Jul 10, 2026
4fdd557
fix: resolve libgit2 version for CentOS 7
patrick-stephens Jul 10, 2026
df1dc21
fix: resolve libgit2 version for CentOS 7
patrick-stephens Jul 10, 2026
6c3be59
test: update local build for functional package testing
patrick-stephens Jul 10, 2026
ca0f98d
test: fix failure on AL2
patrick-stephens Jul 10, 2026
cbf2a02
fix: build libssh2 from source for centos 7
patrick-stephens Jul 10, 2026
4867cfc
docs: update testing info
patrick-stephens Jul 10, 2026
2a6ee6d
fix: static linkage for libssh2 on centos 7
patrick-stephens Jul 10, 2026
ac5d6a1
ci: ensure we always build ubuntu-24 if running package tests
patrick-stephens Jul 10, 2026
1dd2414
Merge remote-tracking branch 'origin/main' into 341_resolve_git_confi…
patrick-stephens Jul 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,8 @@ The main CI/CD pipeline is split across three workflow files based on trigger co
3. **pr-build-containers** - Builds requested container architectures (`amd64`, `arm64`, `s390x`, or `all`)
4. **pr-build-windows** - Builds Windows packages when requested
5. **pr-build-macos** - Builds macOS packages when requested
6. **pr-build-linux** - Builds Linux packages for requested distro targets (or full target set with `linux=all`)
7. **test-packages** - Runs Linux package tests for the selected Linux build matrix
6. **pr-build-linux** - Builds Linux packages for requested distro targets (or full target set with `linux=all`). For explicit `linux=...` comments, `ubuntu/24.04` is always included if linux targets are built as it is required for integration tests.
7. **test-packages** - Runs Linux package tests for the selected Linux build matrix (including required `ubuntu/24.04` for explicit `linux=...` comments)
8. **pr-build-comment-response** - Posts a summary comment with per-job status and links

**Comment Syntax Examples:**
Expand All @@ -171,6 +171,7 @@ The main CI/CD pipeline is split across three workflow files based on trigger co
- `/build container=arm64,s390x`
- `/build container=all`
- `/build linux=ubuntu/24.04,centos/9`
- `/build linux=centos/9`
- `/build linux=all`
- `/build container=amd64 linux=all windows`

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/call-get-metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ jobs:
env:
JSON_FILE_NAME: build-config.json


- name: Get the OSS version
id: set-oss-version
run: |
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/pr-comment-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ name: Trigger build on PR comment
# e.g. /build container=all windows
#
# Linux targets can be comma-separated list of distros, or 'all' to use full build-config targets
# e.g. /build linux=ubuntu/20.04,centos/7 windows
# e.g. /build linux=ubuntu/20.04 macos
# e.g. /build linux=ubuntu/20.04,centos/7 windows (ubuntu/24.04 is auto-included for integration testing)
# e.g. /build linux=ubuntu/20.04 macos (ubuntu/24.04 is auto-included)
# e.g. /build linux=all windows
# e.g. /build macos windows
# e.g. /build linux=centos/7
# e.g. /build linux=centos/7 (ubuntu/24.04 is auto-included)
#
# If no platform is specified then nothing is done
on:
Expand Down Expand Up @@ -119,7 +119,7 @@ jobs:
}
// Deduplicate
out.containerPlatforms = [...new Set(out.containerPlatforms)];
} else if (lower.startsWith('linux=')) {
} else if (lower.startsWith('linux=')) {
// Parse linux targets: e.g. linux=ubuntu/20.04 or linux=ubuntu/20.04,centos/7 or linux=all
const rhs = raw.slice(raw.indexOf('=') + 1);
const arr = rhs.split(',').map(s => s.trim()).filter(Boolean);
Expand All @@ -129,6 +129,10 @@ jobs:
out.linuxTargets = ['all'];
} else {
out.linuxTargets.push(...arr);
// Ensure package testing always includes the required ubuntu/24.04 target for integration testing, even if not specified in the comment
if (!out.linuxTargets.some(t => t.toLowerCase() === 'ubuntu/24.04')) {
out.linuxTargets.push('ubuntu/24.04');
}
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions source/packaging/distros/almalinux/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ RUN sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/almalinux-powertools.repo
ARG CACHE_ID
# hadolint ignore=DL3033,DL3032
RUN --mount=type=cache,target=/var/cache/yum,sharing=locked,id=almalinux-8-${CACHE_ID} yum -y update && \
yum install -y epel-release && \
yum install -y rpm-build curl ca-certificates gcc gcc-c++ cmake make bash \
wget unzip systemd-devel wget flex bison \
cyrus-sasl-lib cyrus-sasl-devel openssl openssl-libs openssl-devel libyaml-devel libgit2-devel pkgconf-pkg-config
cyrus-sasl-lib cyrus-sasl-devel openssl openssl-libs openssl-devel libyaml-devel libgit2_1.7-devel pkgconf-pkg-config

# Split into separate layer to allow us to cache above
RUN yum clean all
Expand All @@ -40,9 +41,10 @@ RUN sed -i 's/enabled=0/enabled=1/g' /etc/yum.repos.d/almalinux-powertools.repo
ARG CACHE_ID
# hadolint ignore=DL3033,DL3032
RUN --mount=type=cache,target=/var/cache/yum,sharing=locked,id=almalinux-8-arm64-${CACHE_ID} yum -y update && \
yum install -y epel-release && \
yum install -y rpm-build curl ca-certificates gcc gcc-c++ cmake make bash \
wget unzip systemd-devel wget flex bison \
cyrus-sasl-lib cyrus-sasl-devel openssl openssl-libs openssl-devel libyaml-devel libgit2-devel pkgconf-pkg-config
cyrus-sasl-lib cyrus-sasl-devel openssl openssl-libs openssl-devel libyaml-devel libgit2_1.7-devel pkgconf-pkg-config

# Split into separate layer to allow us to cache above
RUN yum clean all
Expand Down
143 changes: 143 additions & 0 deletions source/packaging/distros/amazonlinux/2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
# Set this to the base image to use in each case, so if we want to build for amazonlinux/2.arm64v8
# we would set BASE_BUILDER=amazonlinux-2.arm64v8-base.
ARG BASE_BUILDER=amazonlinux-2-base
# Lookup the name to use below but should follow the '<distro>-base' convention with slashes replaced.
# Use buildkit to skip unused base images: DOCKER_BUILDKIT=1

# Used to differentiate in CI from main/PR builds
ARG CACHE_ID=main

# Multiarch support
FROM multiarch/qemu-user-static:x86_64-aarch64 AS multiarch-aarch64

# amazonlinux/2 base image
FROM amazonlinux:2 AS amazonlinux-2-base

ENV CMAKE_HOME="/opt/cmake"
ARG CMAKE_VERSION="3.31.6"
ARG CMAKE_URL="https://github.com/Kitware/CMake/releases/download"

ARG CACHE_ID
# hadolint ignore=DL3033,DL3032
RUN --mount=type=cache,target=/var/cache/yum,sharing=locked,id=amazonlinux-2-${CACHE_ID} yum -y update && \
yum install -y rpm-build curl ca-certificates make bash \
gcc gcc-c++ \
wget unzip systemd-devel wget flex bison \
cyrus-sasl-lib cyrus-sasl-devel openssl openssl-libs openssl-devel \
glibc-devel \
libyaml-devel zlib-devel libcurl-devel pkgconf-pkg-config \
Comment thread
patrick-stephens marked this conversation as resolved.
tar gzip perl-core
# Split into separate layer to allow us to cache above
RUN yum clean all

# hadolint ignore=DL4006
RUN 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
Comment thread
patrick-stephens marked this conversation as resolved.

ENV PATH="${CMAKE_HOME}/bin:${PATH}"

# amazonlinux/2.arm64v8 base image
FROM arm64v8/amazonlinux:2 AS amazonlinux-2.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"

ARG CACHE_ID
# hadolint ignore=DL3033,DL3032
RUN --mount=type=cache,target=/var/cache/yum,sharing=locked,id=amazonlinux-2-arm64-${CACHE_ID} yum -y update && \
yum install -y rpm-build curl ca-certificates gcc gcc-c++ make bash \
wget unzip systemd-devel wget flex bison \
cyrus-sasl-lib cyrus-sasl-devel openssl openssl-libs openssl-devel \
libyaml-devel zlib-devel libcurl-devel pkgconf-pkg-config \
tar gzip perl-core
# Split into separate layer to allow us to cache above
RUN yum clean all

# hadolint ignore=DL4006
RUN 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}"

# hadolint ignore=DL3006
FROM $BASE_BUILDER AS base-builder

ARG TELEMETRY_FORGE_AGENT_DISTRO
ENV TELEMETRY_FORGE_AGENT_DISTRO=$TELEMETRY_FORGE_AGENT_DISTRO
ARG TELEMETRY_FORGE_AGENT_PACKAGE_TYPE
ENV TELEMETRY_FORGE_AGENT_PACKAGE_TYPE=$TELEMETRY_FORGE_AGENT_PACKAGE_TYPE

ARG FLB_NIGHTLY_BUILD
ENV FLB_NIGHTLY_BUILD=$FLB_NIGHTLY_BUILD

# We need a more recent OpenSSL as well so build from source
ADD https://github.com/openssl/openssl/releases/download/openssl-3.5.2/openssl-3.5.2.tar.gz /openssl/
RUN tar -xzvf /openssl/openssl-3.5.2.tar.gz -C /openssl
Comment thread
patrick-stephens marked this conversation as resolved.
WORKDIR /openssl/openssl-3.5.2
RUN ./Configure && make -j "$(getconf _NPROCESSORS_ONLN)" && make install

# Build libssh2 from source as static library with -fPIC (required for libgit2)
ARG LIBSSH2_VER=1.11.1
WORKDIR /tmp
RUN curl -LO https://www.libssh2.org/download/libssh2-${LIBSSH2_VER}.tar.gz && \
tar xf libssh2-${LIBSSH2_VER}.tar.gz
Comment thread
patrick-stephens marked this conversation as resolved.
WORKDIR /tmp/libssh2-${LIBSSH2_VER}
RUN CFLAGS="-fPIC" \
LDFLAGS="-L/openssl/openssl-3.5.2 -L/usr/local/lib64" \
CPPFLAGS="-I/openssl/openssl-3.5.2/include" \
./configure --prefix=/usr/local --enable-static --disable-shared --disable-examples-build \
--with-openssl --with-libssl-prefix=/openssl/openssl-3.5.2 && \
make -j "$(getconf _NPROCESSORS_ONLN)" && \
make install

# Build libgit2 from source (required for git_config plugin)
ARG LIBGIT2_VER=1.9.1
WORKDIR /tmp
RUN curl -LO https://github.com/libgit2/libgit2/archive/refs/tags/v${LIBGIT2_VER}.tar.gz && \
tar xf v${LIBGIT2_VER}.tar.gz
Comment thread
patrick-stephens marked this conversation as resolved.
WORKDIR /tmp/libgit2-${LIBGIT2_VER}
RUN cmake -B build -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \
-DLINK_WITH_STATIC_LIBRARIES=ON \
-DUSE_SSH=ON \
-DBUILD_TESTS=OFF \
-DBUILD_CLI=OFF \
-DOPENSSL_ROOT_DIR=/openssl/openssl-3.5.2 && \
cmake --build build --target install -- -j "$(getconf _NPROCESSORS_ONLN)" && \
echo "/usr/local/lib64" > /etc/ld.so.conf.d/libgit2.conf && \
ldconfig

# Docker context must be the 'source' directory of the repo
WORKDIR /tmp/fluent-bit/
COPY . ./

WORKDIR /tmp/fluent-bit/build/
FROM base-builder AS builder

# CMake configuration variables
ARG CMAKE_INSTALL_PREFIX=/opt/telemetryforge-agent/
ARG CMAKE_INSTALL_SYSCONFDIR=/etc/

RUN PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:$PKG_CONFIG_PATH" \
cmake -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \
-DCMAKE_RULE_MESSAGES:BOOL=OFF -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCMAKE_INSTALL_SYSCONFDIR="$CMAKE_INSTALL_SYSCONFDIR" \
-DFLB_NIGHTLY_BUILD="$FLB_NIGHTLY_BUILD" \
-DFLB_JEMALLOC_OPTIONS="$FLB_JEMALLOC_OPTIONS" \
-DTELEMETRY_FORGE_AGENT_DISTRO="${TELEMETRY_FORGE_AGENT_DISTRO}" \
-DTELEMETRY_FORGE_AGENT_PACKAGE_TYPE="${TELEMETRY_FORGE_AGENT_PACKAGE_TYPE}" \
-DOPENSSL_ROOT_DIR=/openssl/openssl-3.5.2 \
-DOPENSSL_USE_STATIC_LIBS=On \
-DLIBSSH2_USE_STATIC_LIBS=On \
-DLIBSSH2_LIBRARY_PATH=/usr/local/lib/libssh2.a \
../

VOLUME [ "/output" ]
CMD [ "/bin/bash", "-c", "make -j 4 && cpack -G RPM && cp *.rpm /output/" ]
63 changes: 3 additions & 60 deletions source/packaging/distros/amazonlinux/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Special Dockerfile to build all Ubuntu targets, the only difference is
# Special Dockerfile to build all targets, the only difference is
# the packages in the base image.
# Set this to the base image to use in each case, so if we want to build for amazonlinux/2.arm64v8
# we would set BASE_BUILDER=amazonlinux-2.arm64v8-base.
# Set this to the base image to use in each case, so if we want to build for amazonlinux/2023.arm64v8
# we would set BASE_BUILDER=amazonlinux-2023.arm64v8-base.
ARG BASE_BUILDER
# Lookup the name to use below but should follow the '<distro>-base' convention with slashes replaced.
# Use buildkit to skip unused base images: DOCKER_BUILDKIT=1
Expand All @@ -12,63 +12,6 @@ ARG CACHE_ID=main
# Multiarch support
FROM multiarch/qemu-user-static:x86_64-aarch64 AS multiarch-aarch64

# amazonlinux/2 base image
FROM amazonlinux:2 AS amazonlinux-2-base

ENV CMAKE_HOME="/opt/cmake"
ARG CMAKE_VERSION="3.31.6"
ARG CMAKE_URL="https://github.com/Kitware/CMake/releases/download"

ARG CACHE_ID
# hadolint ignore=DL3033,DL3032
RUN --mount=type=cache,target=/var/cache/yum,sharing=locked,id=amazonlinux-2-${CACHE_ID} yum -y update && \
yum install -y rpm-build curl ca-certificates make bash \
gcc gcc-c++ \
wget unzip systemd-devel wget flex bison \
cyrus-sasl-lib cyrus-sasl-devel openssl openssl-libs openssl-devel \
glibc-devel \
libyaml-devel zlib-devel libcurl-devel libgit2-devel pkgconf-pkg-config \
tar gzip
# Split into separate layer to allow us to cache above
RUN yum clean all

# hadolint ignore=DL4006
RUN 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}"

# amazonlinux/2.arm64v8 base image
FROM arm64v8/amazonlinux:2 AS amazonlinux-2.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"

ARG CACHE_ID
# hadolint ignore=DL3033,DL3032
RUN --mount=type=cache,target=/var/cache/yum,sharing=locked,id=amazonlinux-2-arm64-${CACHE_ID} yum -y update && \
yum install -y rpm-build curl ca-certificates gcc gcc-c++ make bash \
wget unzip systemd-devel wget flex bison \
cyrus-sasl-lib cyrus-sasl-devel openssl openssl-libs openssl-devel \
postgresql-devel postgresql-libs \
libyaml-devel zlib-devel libcurl-devel libgit2-devel pkgconf-pkg-config \
tar gzip
# Split into separate layer to allow us to cache above
RUN yum clean all

# hadolint ignore=DL4006
RUN 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}"

FROM amazonlinux:2023 AS amazonlinux-2023-base

ENV CMAKE_HOME="/opt/cmake"
Expand Down
37 changes: 35 additions & 2 deletions source/packaging/distros/centos/7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN --mount=type=cache,target=/var/cache/yum,sharing=locked,id=centos-7-${CACHE_
yum install -y rpm-build curl ca-certificates gcc gcc-c++ make bash \
wget unzip systemd-devel wget flex bison \
cyrus-sasl-lib cyrus-sasl-devel openssl openssl-libs openssl-devel libcurl-devel pkgconf-pkg-config \
libyaml-devel libgit2-devel \
libyaml-devel \
tar gzip && \
yum install -y epel-release && \
yum install -y cmake3 && \
Expand Down Expand Up @@ -65,7 +65,7 @@ RUN --mount=type=cache,target=/var/cache/yum,sharing=locked,id=centos-7-arm64-${
yum install -y rpm-build curl ca-certificates gcc gcc-c++ make bash \
wget unzip systemd-devel wget flex bison \
cyrus-sasl-lib cyrus-sasl-devel openssl openssl-libs openssl-devel libcurl-devel pkgconf-pkg-config \
libyaml-devel libgit2-devel \
libyaml-devel \
tar gzip && \
yum install -y epel-release && \
yum install -y cmake3 && \
Expand Down Expand Up @@ -102,6 +102,37 @@ RUN tar -xzvf /openssl/openssl-3.5.2.tar.gz -C /openssl
WORKDIR /openssl/openssl-3.5.2
RUN ./Configure && make -j "$(getconf _NPROCESSORS_ONLN)" && make install

# Build libssh2 from source as static library with -fPIC (required for libgit2)
ARG LIBSSH2_VER=1.11.1
WORKDIR /tmp
RUN curl -LO https://www.libssh2.org/download/libssh2-${LIBSSH2_VER}.tar.gz && \
tar xf libssh2-${LIBSSH2_VER}.tar.gz
WORKDIR /tmp/libssh2-${LIBSSH2_VER}
RUN CFLAGS="-fPIC" \
LDFLAGS="-L/openssl/openssl-3.5.2 -L/usr/local/lib64" \
CPPFLAGS="-I/openssl/openssl-3.5.2/include" \
./configure --prefix=/usr/local --enable-static --disable-shared --disable-examples-build \
--with-openssl --with-libssl-prefix=/openssl/openssl-3.5.2 && \
make -j "$(getconf _NPROCESSORS_ONLN)" && \
make install

# Build libgit2 from source to ensure >= 0.27.0 support for git_config plugin behavior
ARG LIBGIT2_VER=1.9.1
WORKDIR /tmp
RUN curl -LO https://github.com/libgit2/libgit2/archive/refs/tags/v${LIBGIT2_VER}.tar.gz && \
tar xf v${LIBGIT2_VER}.tar.gz
WORKDIR /tmp/libgit2-${LIBGIT2_VER}
RUN cmake -B build -DCMAKE_BUILD_TYPE=Release \
-DBUILD_SHARED_LIBS=OFF \

@cubic-dev-ai cubic-dev-ai Bot Jul 10, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: CentOS 7 package builds can fail at final link once only libgit2.a is available, because CMake still uses non-static LIBGIT2_LIBRARIES and this Dockerfile only adds libssh2.a. Consider switching the libgit2 CMake lookup to static pkg-config/link flags for this build or explicitly passing all private deps required by the static libgit2 archive.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At source/packaging/distros/centos/7/Dockerfile, line 126:

<comment>CentOS 7 package builds can fail at final link once only `libgit2.a` is available, because CMake still uses non-static `LIBGIT2_LIBRARIES` and this Dockerfile only adds `libssh2.a`. Consider switching the libgit2 CMake lookup to static pkg-config/link flags for this build or explicitly passing all private deps required by the static libgit2 archive.</comment>

<file context>
@@ -102,6 +102,37 @@ RUN tar -xzvf /openssl/openssl-3.5.2.tar.gz -C /openssl
+    tar xf v${LIBGIT2_VER}.tar.gz
+WORKDIR /tmp/libgit2-${LIBGIT2_VER}
+RUN cmake -B build -DCMAKE_BUILD_TYPE=Release \
+        -DBUILD_SHARED_LIBS=OFF \
+        -DLINK_WITH_STATIC_LIBRARIES=ON \
+        -DUSE_SSH=ON \
</file context>
Fix with cubic

-DLINK_WITH_STATIC_LIBRARIES=ON \
-DUSE_SSH=ON \
-DBUILD_TESTS=OFF \
-DBUILD_CLI=OFF \
-DOPENSSL_ROOT_DIR=/openssl/openssl-3.5.2 && \
cmake --build build --target install -- -j "$(getconf _NPROCESSORS_ONLN)" && \
echo "/usr/local/lib64" > /etc/ld.so.conf.d/libgit2.conf && \
ldconfig

ARG FLB_NIGHTLY_BUILD
ENV FLB_NIGHTLY_BUILD=$FLB_NIGHTLY_BUILD

Expand All @@ -121,6 +152,8 @@ RUN PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CON
-DFLB_JEMALLOC_OPTIONS="$FLB_JEMALLOC_OPTIONS" \
-DOPENSSL_ROOT_DIR=/openssl/openssl-3.5.2 \
-DOPENSSL_USE_STATIC_LIBS=On \
-DLIBSSH2_USE_STATIC_LIBS=On \
-DLIBSSH2_LIBRARY_PATH=/usr/local/lib/libssh2.a \
-DTELEMETRY_FORGE_AGENT_DISTRO="$TELEMETRY_FORGE_AGENT_DISTRO" \
-DTELEMETRY_FORGE_AGENT_PACKAGE_TYPE="$TELEMETRY_FORGE_AGENT_PACKAGE_TYPE" \
../
Expand Down
6 changes: 4 additions & 2 deletions source/packaging/distros/centos/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ ARG CACHE_ID
# hadolint ignore=DL3033,DL3032
RUN --mount=type=cache,target=/var/cache/yum,sharing=locked,id=centos-8-${CACHE_ID} \
yum -y update && \
yum install -y epel-release && \
yum install -y rpm-build curl ca-certificates gcc gcc-c++ make bash \
wget unzip systemd-devel wget flex bison \
cyrus-sasl-lib cyrus-sasl-devel openssl openssl-libs openssl-devel libcurl-devel pkgconf-pkg-config \
libyaml-devel zlib-devel libgit2-devel \
libyaml-devel zlib-devel libgit2_1.7-devel \
tar gzip
# Split into separate layer to allow us to cache above
RUN yum clean all
Expand Down Expand Up @@ -66,10 +67,11 @@ ARG CACHE_ID
# hadolint ignore=DL3033,DL3032
RUN --mount=type=cache,target=/var/cache/yum,sharing=locked,id=centos-8-arm64-${CACHE_ID} \
yum -y update && \
yum install -y epel-release && \
yum install -y rpm-build curl ca-certificates gcc gcc-c++ make bash \
wget unzip systemd-devel wget flex bison \
cyrus-sasl-lib cyrus-sasl-devel openssl openssl-libs openssl-devel libcurl-devel pkgconf-pkg-config \
libyaml-devel zlib-devel libgit2-devel \
libyaml-devel zlib-devel libgit2_1.7-devel \
tar gzip
# Split into separate layer to allow us to cache above
RUN yum clean all
Expand Down
Loading
Loading