Skip to content

Commit b488f2e

Browse files
committed
Packaging attempt for Opensuse v15.6 and SLES v15.7. opensuse build is not working. Currently testing ./build.sh -d opensuse/leap:15.6
1 parent d21e8de commit b488f2e

File tree

5 files changed

+206
-0
lines changed

5 files changed

+206
-0
lines changed

packaging/build-config.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,14 @@
9696
"target": "almalinux/10.arm64v8",
9797
"type": "rpm"
9898
},
99+
{
100+
"target": "opensuse/leap",
101+
"type": "rpm"
102+
},
103+
{
104+
"target": "sles/15.7",
105+
"type": "rpm"
106+
},
99107
{
100108
"target": "debian/bookworm",
101109
"type": "deb"
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Special Dockerfile to build all targets, the only difference is
2+
# the packages in the base image.
3+
# Set this to the base image to use in each case, so if we want to build for opensuse/leap
4+
# we would set BASE_BUILDER=opensuse-leap-base.
5+
ARG BASE_BUILDER
6+
# Lookup the name to use below but should follow the '<distro>-base' convention with slashes replaced.
7+
# Use buildkit to skip unused base images: DOCKER_BUILDKIT=1
8+
9+
# Multiarch support
10+
FROM multiarch/qemu-user-static:x86_64-aarch64 as multiarch-aarch64
11+
12+
# opensuse/leap base image
13+
FROM opensuse/leap:15.6 as opensuse_leap
14+
15+
# hadolint ignore=DL3033
16+
RUN zypper up -y && \
17+
zypper install -y --no-recommends \
18+
rpm-build \
19+
curl ca-certificates wget unzip flex bison \
20+
gcc gcc-c++ \
21+
cmake3-full \
22+
make \
23+
bash \
24+
systemd-devel \
25+
postgresql postgresql-devel postgresql-server \
26+
cyrus-sasl cyrus-sasl-devel \
27+
libopenssl3 libopenssl-3-devel \
28+
libyaml-devel && \
29+
zypper clean -a && rm -rf /var/cache/zypp/*
30+
31+
# opensuse/leap.arm64v8 base image
32+
# hadolint ignore=DL3029
33+
FROM --platform=arm64 opensuse/leap:15.6 AS opensuse_leap.arm64v8
34+
35+
COPY --from=multiarch-aarch64 /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static
36+
37+
# hadolint ignore=DL3033
38+
RUN zypper up -y && \
39+
zypper install -y --no-recommends \
40+
rpm-build \
41+
curl ca-certificates wget unzip flex bison \
42+
gcc gcc-c++ \
43+
cmake3-full \
44+
make \
45+
bash \
46+
systemd-devel \
47+
postgresql postgresql-devel postgresql-server \
48+
cyrus-sasl cyrus-sasl-devel \
49+
libopenssl3 libopenssl-3-devel \
50+
libyaml-devel && \
51+
zypper clean -a && rm -rf /var/cache/zypp/*
52+
53+
# Need larger page size
54+
ARG FLB_JEMALLOC_OPTIONS="--with-lg-page=16 --with-lg-quantum=3"
55+
ENV FLB_JEMALLOC_OPTIONS=$FLB_JEMALLOC_OPTIONS
56+
57+
# Common build for all distributions now
58+
# hadolint ignore=DL3006
59+
FROM $BASE_BUILDER as builder
60+
61+
ARG FLB_NIGHTLY_BUILD
62+
ENV FLB_NIGHTLY_BUILD=$FLB_NIGHTLY_BUILD
63+
64+
# Docker context must be the base of the repo
65+
WORKDIR /source/fluent-bit/
66+
COPY . ./
67+
68+
WORKDIR /source/fluent-bit/build/
69+
# CMake configuration variables
70+
# Unused
71+
ARG CFLAGS
72+
ARG CMAKE_INSTALL_PREFIX=/opt/fluent-bit/
73+
ARG CMAKE_INSTALL_SYSCONFDIR=/etc/
74+
ARG FLB_SIMD=On
75+
ARG FLB_RELEASE=On
76+
ARG FLB_TRACE=On
77+
ARG FLB_SQLDB=On
78+
ARG FLB_HTTP_SERVER=On
79+
ARG FLB_OUT_KAFKA=On
80+
ARG FLB_JEMALLOC=On
81+
ARG FLB_CHUNK_TRACE=On
82+
ARG FLB_UNICODE_ENCODER=On
83+
ARG FLB_KAFKA=On
84+
ARG FLB_OUT_PGSQL=On
85+
ARG SYSTEMD_UNITDIR=/usr/lib/systemd/system
86+
87+
RUN cmake -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \
88+
-DCMAKE_INSTALL_SYSCONFDIR="$CMAKE_INSTALL_SYSCONFDIR" \
89+
-DFLB_SIMD="$FLB_SIMD" \
90+
-DFLB_RELEASE="$FLB_RELEASE" \
91+
-DFLB_TRACE="$FLB_TRACE" \
92+
-DFLB_SQLDB="$FLB_SQLDB" \
93+
-DFLB_HTTP_SERVER="$FLB_HTTP_SERVER" \
94+
-DFLB_KAFKA="$FLB_KAFKA" \
95+
-DFLB_OUT_PGSQL="$FLB_OUT_PGSQL" \
96+
-DFLB_NIGHTLY_BUILD="$FLB_NIGHTLY_BUILD" \
97+
-DFLB_JEMALLOC_OPTIONS="$FLB_JEMALLOC_OPTIONS" \
98+
-DFLB_JEMALLOC="${FLB_JEMALLOC}" \
99+
-DFLB_CHUNK_TRACE="${FLB_CHUNK_TRACE}" \
100+
-DFLB_UNICODE_ENCODER="${FLB_UNICODE_ENCODER}" \
101+
-DSYSTEMD_UNITDIR="$SYSTEMD_UNITDIR" \
102+
../
103+
104+
VOLUME [ "/output" ]
105+
CMD [ "/bin/bash", "-c", "make --no-print-directory -j 4 && cpack -G RPM && cp *.rpm /output/" ]

packaging/distros/sles/Dockerfile

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
ARG BASE_BUILDER
2+
# Lookup the name to use below but should follow the '<distro>-base' convention with slashes replaced.
3+
# Use buildkit to skip unused base images: DOCKER_BUILDKIT=1
4+
5+
# Multiarch support
6+
FROM multiarch/qemu-user-static:x86_64-aarch64 as multiarch-aarch64
7+
8+
# opensuse/leap base image
9+
FROM registry.suse.com/bci/bci-base:15.7 as sles-15.7-base
10+
11+
# hadolint ignore=DL3033
12+
RUN zypper up -y && \
13+
zypper install -y --no-recommends \
14+
rpm-build curl ca-certificates gcc gcc-c++ cmake-full make bash \
15+
wget unzip systemd-devel flex bison \
16+
postgresql-server postgresql-devel cyrus-sasl-devel \
17+
libopenssl-devel libyaml-devel && \
18+
rm -rf /var/log/{lastlog,tallylog,zypper.log,zypp/history,YaST2} && \
19+
zypper clean -a
20+
21+
# opensuse/leap.arm64v8 base image
22+
# hadolint ignore=DL3029
23+
FROM --platform=arm64 registry.suse.com/bci/bci-base:15.7 as sles-15.7.arm64v8-base
24+
25+
COPY --from=multiarch-aarch64 /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static
26+
27+
# hadolint ignore=DL3033
28+
RUN zypper up -y && \
29+
zypper install -y --no-recommends \
30+
rpm-build curl ca-certificates gcc gcc-c++ cmake-full make bash \
31+
wget unzip systemd-devel flex bison \
32+
postgresql-server postgresql-devel cyrus-sasl-devel \
33+
libopenssl-devel libyaml-devel && \
34+
rm -rf /var/log/{lastlog,tallylog,zypper.log,zypp/history,YaST2} && \
35+
zypper clean -a
36+
37+
# Need larger page size
38+
ARG FLB_JEMALLOC_OPTIONS="--with-lg-page=16 --with-lg-quantum=3"
39+
ENV FLB_JEMALLOC_OPTIONS=$FLB_JEMALLOC_OPTIONS
40+
41+
# Common build for all distributions now
42+
# hadolint ignore=DL3006
43+
FROM $BASE_BUILDER as builder
44+
45+
ARG FLB_NIGHTLY_BUILD
46+
ENV FLB_NIGHTLY_BUILD=$FLB_NIGHTLY_BUILD
47+
48+
# Docker context must be the base of the repo
49+
WORKDIR /source/fluent-bit/
50+
COPY . ./
51+
52+
WORKDIR /source/fluent-bit/build/
53+
# CMake configuration variables
54+
# Unused
55+
ARG CFLAGS
56+
ARG CMAKE_INSTALL_PREFIX=/opt/fluent-bit/
57+
ARG CMAKE_INSTALL_SYSCONFDIR=/etc/
58+
ARG FLB_SIMD=On
59+
ARG FLB_RELEASE=On
60+
ARG FLB_TRACE=On
61+
ARG FLB_SQLDB=On
62+
ARG FLB_HTTP_SERVER=On
63+
ARG FLB_OUT_KAFKA=On
64+
ARG FLB_JEMALLOC=On
65+
ARG FLB_CHUNK_TRACE=On
66+
ARG FLB_UNICODE_ENCODER=On
67+
ARG FLB_KAFKA=On
68+
ARG FLB_OUT_PGSQL=On
69+
ARG SYSTEMD_UNITDIR=/usr/lib/systemd/system
70+
71+
RUN cmake -DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \
72+
-DCMAKE_INSTALL_SYSCONFDIR="$CMAKE_INSTALL_SYSCONFDIR" \
73+
-DFLB_SIMD="$FLB_SIMD" \
74+
-DFLB_RELEASE="$FLB_RELEASE" \
75+
-DFLB_TRACE="$FLB_TRACE" \
76+
-DFLB_SQLDB="$FLB_SQLDB" \
77+
-DFLB_HTTP_SERVER="$FLB_HTTP_SERVER" \
78+
-DFLB_KAFKA="$FLB_KAFKA" \
79+
-DFLB_OUT_PGSQL="$FLB_OUT_PGSQL" \
80+
-DFLB_NIGHTLY_BUILD="$FLB_NIGHTLY_BUILD" \
81+
-DFLB_JEMALLOC_OPTIONS="$FLB_JEMALLOC_OPTIONS" \
82+
-DFLB_JEMALLOC="${FLB_JEMALLOC}" \
83+
-DFLB_CHUNK_TRACE="${FLB_CHUNK_TRACE}" \
84+
-DFLB_UNICODE_ENCODER="${FLB_UNICODE_ENCODER}" \
85+
-DSYSTEMD_UNITDIR="$SYSTEMD_UNITDIR" \
86+
../
87+
88+
VOLUME [ "/output" ]
89+
CMD [ "/bin/bash", "-c", "make --no-print-directory -j 4 && cpack -G RPM && cp *.rpm /output/" ]

packaging/test-release-packages.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ YUM_TARGETS=(
5858
"quay.io/centos/centos:stream10"
5959
"amazonlinux:2"
6060
"amazonlinux:2023"
61+
"opensuse/leap"
62+
"sles/15.7"
6163
)
6264

6365
for IMAGE in "${YUM_TARGETS[@]}"

packaging/update-repos.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ RPM_REPO_PATHS=( "amazonlinux/2"
4343
"almalinux/8"
4444
"almalinux/9"
4545
"almalinux/10"
46+
"opensuse/leap"
47+
"sles/15.7"
4648
)
4749

4850
if [[ "${AWS_SYNC:-false}" != "false" ]]; then

0 commit comments

Comments
 (0)