Skip to content

Commit d0972d2

Browse files
19245 Build Checkmk for Ubuntu 26.04 (resolute)
Change-Id: I42331c8640433b9eeabac46f5650c5056a52914c JIRA-Ref: CMK-24292
1 parent 0e313ca commit d0972d2

14 files changed

Lines changed: 332 additions & 6 deletions

File tree

.werks/19245.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[//]: # (werk v3)
2+
# Build Checkmk for Ubuntu 26.04 (Resolute Raccoon)
3+
4+
key | value
5+
---------- | ---
6+
date | 2026-04-08T12:28:59.987857+00:00
7+
version | 2.5.0b5
8+
class | feature
9+
edition | community
10+
component | omd
11+
level | 1
12+
compatible | yes

MODULE.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,7 @@ http_archive(
518518
"//omd/packages/heirloom-pkgtools/patches:0008-libfl.dif",
519519
"//omd/packages/heirloom-pkgtools/patches:0010-fix-missing-makedev.dif",
520520
"//omd/packages/heirloom-pkgtools/patches:0011-add-fcommon.dif",
521+
"//omd/packages/heirloom-pkgtools/patches:0012-fix-termio-glibc-2.42.dif",
521522
],
522523
sha256 = "aa94d33550847d57c62138cabd0f742d4af2f14aa2bfb9e9d4a9427bf498e6cc",
523524
strip_prefix = "heirloom-pkgtools-070227",

bazel/cmk/distro/BUILD.bazel

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ string_flag(
1717
"sles-16.0",
1818
"ubuntu-22.04",
1919
"ubuntu-24.04",
20+
"ubuntu-26.04",
2021
],
2122
)
2223

@@ -96,11 +97,17 @@ config_setting(
9697
flag_values = {":distro": "ubuntu-24.04"},
9798
)
9899

100+
config_setting(
101+
name = "ubuntu-26.04",
102+
flag_values = {":distro": "ubuntu-26.04"},
103+
)
104+
99105
selects.config_setting_group(
100106
name = "ubuntu",
101107
match_any = [
102108
":ubuntu-22.04",
103109
":ubuntu-24.04",
110+
":ubuntu-26.04",
104111
],
105112
)
106113

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM artifacts.lan.tribe29.com:4000/ubuntu@sha256:05f3f4c7e04894adff1e28ff84ea05a23477eeac6947824a46c957014752fbd0
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
source: ubuntu:26.04
2+
tag: artifacts.lan.tribe29.com:4000/ubuntu:26.04-image-alias-master-f38b25cf294

buildscripts/infrastructure/build-nodes/scripts/install-gnu-toolchain.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ BUILD_DIR="${TARGET_DIR}/src"
3434
GLIBC_VERSION=$(ldd --version | awk 'NR==1 {print $NF}')
3535

3636
# Increase this to enforce a recreation of the build cache
37-
BUILD_ID="binutils_${BINUTILS_VERSION}-glibc_${GLIBC_VERSION}-1"
37+
BUILD_ID="binutils_${BINUTILS_VERSION}-glibc_${GLIBC_VERSION}-3"
3838

3939
download_sources() {
4040
# Get the sources from nexus or upstream
@@ -69,8 +69,12 @@ build_binutils() {
6969
cd binutils-${BINUTILS_VERSION}-build
7070
# sles-12* had (we don't build it anymore anyways) ancient makeinfo versions, so let's just skip
7171
# info generation for all distros, we don't really need it.
72+
# --disable-gprofng: gprofng/libcollector/iolib.c fails to compile on glibc 2.43+
73+
# (Ubuntu 26.04) because strstr is wrapped in a _Generic expression there, which
74+
# breaks the CALL_UTIL(strstr)(...) macro.
7275
MAKEINFO=true ../binutils-${BINUTILS_VERSION}/configure \
73-
--prefix="${PREFIX}"
76+
--prefix="${PREFIX}" \
77+
--disable-gprofng
7478
make -j4 MAKEINFO=true
7579
make install MAKEINFO=true
7680
}
@@ -90,7 +94,8 @@ build_gcc() {
9094
--program-suffix=-"${GCC_MAJOR}" \
9195
--enable-linker-build-id \
9296
--disable-multilib \
93-
--enable-languages=c,c++
97+
--enable-languages=c,c++ \
98+
--disable-libsanitizer
9499
make -j4
95100
make install
96101
}
Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
1+
ARG DISTRO_IMAGE_BASE
2+
3+
# hadolint ignore=DL3006
4+
# Create base image
5+
FROM ${DISTRO_IMAGE_BASE} AS base
6+
7+
SHELL ["/bin/bash", "-c"]
8+
ENV \
9+
DEBIAN_FRONTEND=noninteractive \
10+
LC_ALL=C.UTF-8 \
11+
LANG=C.UTF-8 \
12+
PATH="/opt/bin:${PATH}"
13+
14+
RUN apt-get update
15+
16+
RUN apt-get install -y \
17+
dialog \
18+
gdebi \
19+
git \
20+
graphviz \
21+
libsasl2-dev \
22+
make \
23+
mbuffer \
24+
nullmailer \
25+
php-common \
26+
python3-dev \
27+
python3-pip \
28+
strace \
29+
sudo \
30+
vim
31+
32+
RUN apt-get install -y --fix-missing \
33+
apache2 \
34+
apache2-dev \
35+
autoconf \
36+
build-essential \
37+
bison \
38+
curl \
39+
devscripts \
40+
dnsutils \
41+
flex \
42+
gawk \
43+
gettext \
44+
git-buildpackage \
45+
gtk-doc-tools \
46+
iproute2 \
47+
iputils-ping \
48+
joe \
49+
jq \
50+
libc6-dbg \
51+
libcurl4-openssl-dev \
52+
libevent-dev \
53+
libffi-dev \
54+
libfreeradius-dev \
55+
libgd-dev \
56+
libglib2.0-dev \
57+
libgmp-dev \
58+
libgnutls28-dev \
59+
libgsf-1-dev \
60+
libkrb5-dev \
61+
libldap2-dev \
62+
libltdl-dev \
63+
libmcrypt-dev \
64+
libmpfr-dev \
65+
libmysqlclient-dev \
66+
libncurses5-dev \
67+
libpango1.0-dev \
68+
libpcap-dev \
69+
libperl-dev \
70+
libpq-dev \
71+
libreadline-dev \
72+
libsqlite3-dev \
73+
libssl-dev \
74+
libtool \
75+
libxml2-dev \
76+
libxmlsec1-dev \
77+
netcat-openbsd \
78+
openssh-client \
79+
patch \
80+
rpcbind \
81+
rsync \
82+
smbclient \
83+
software-properties-common \
84+
texinfo \
85+
tk-dev \
86+
uuid-dev
87+
88+
# remove apt service because we don't need it and we run into problems, see
89+
# https://jira.lan.tribe29.com/browse/CMK-16607
90+
RUN rm /etc/cron.daily/apt-compat
91+
92+
# Install our standard tool chain for building in seperate container
93+
# - gnu-toolchain is needed for compiling all the C++ stuff
94+
# - cmake is needed for e.g. building re2
95+
# - openssl is needed by Python 3.7+
96+
# - python is needed by our build / test chain
97+
FROM base AS builder
98+
ARG NEXUS_ARCHIVES_URL
99+
ARG NEXUS_USERNAME
100+
ARG NEXUS_PASSWORD
101+
ARG DISTRO
102+
ARG BRANCH_VERSION
103+
ENV \
104+
NEXUS_ARCHIVES_URL="${NEXUS_ARCHIVES_URL}" \
105+
NEXUS_USERNAME="${NEXUS_USERNAME}" \
106+
NEXUS_PASSWORD="${NEXUS_PASSWORD}" \
107+
DISTRO="${DISTRO}" \
108+
BRANCH_VERSION="${BRANCH_VERSION}"
109+
110+
# Copy over stuff that's needed by lots of scripts (has to be copied to context before)
111+
COPY \
112+
.bazelversion \
113+
package_versions.bzl \
114+
defines.make \
115+
/opt/
116+
117+
COPY \
118+
build_lib.sh \
119+
Check_MK-pubkey.gpg \
120+
/opt/
121+
122+
COPY install-gnu-toolchain.sh /opt/
123+
RUN /opt/install-gnu-toolchain.sh
124+
125+
COPY install-valgrind.sh /opt/
126+
RUN /opt/install-valgrind.sh
127+
128+
COPY install-cmake.sh /opt/
129+
RUN /opt/install-cmake.sh
130+
131+
COPY install-protobuf-cpp.sh /opt/
132+
RUN /opt/install-protobuf-cpp.sh
133+
134+
COPY install-openssl.sh /opt/
135+
RUN /opt/install-openssl.sh
136+
137+
COPY install-python.sh /opt/
138+
RUN /opt/install-python.sh
139+
140+
# install GDB after Python as it requires shared object files, see CMK-15854
141+
COPY install-gdb.sh /opt/
142+
RUN /opt/install-gdb.sh
143+
144+
# Now shrink all the binaries and libraries we produced to build a small image
145+
# in the next step
146+
COPY strip_binaries /opt/
147+
RUN /opt/strip_binaries /opt
148+
149+
# Run this AFTER strip_binaries!!
150+
COPY install-bazel.sh /opt/
151+
RUN /opt/install-bazel.sh
152+
153+
### Actual Build Image ###
154+
FROM base
155+
156+
# Copy our standard tool chain for building
157+
COPY --from=builder /opt /opt
158+
159+
ARG DISTRO
160+
ARG DISTRO_MK_FILE
161+
ARG BRANCH_VERSION
162+
ENV \
163+
DISTRO="${DISTRO}" \
164+
BRANCH_VERSION="${BRANCH_VERSION}"
165+
166+
# Set symlinks
167+
RUN /opt/install-gnu-toolchain.sh link-only
168+
RUN /opt/install-valgrind.sh link-only
169+
RUN /opt/install-cmake.sh link-only
170+
RUN /opt/install-protobuf-cpp.sh --link-only
171+
RUN /opt/install-python.sh link-only
172+
RUN /opt/install-bazel.sh link-only
173+
174+
# Install non cached dependencies
175+
COPY "${DISTRO_MK_FILE}" /opt/
176+
COPY install-cmk-dependencies.sh /opt/
177+
RUN /opt/install-cmk-dependencies.sh
178+
179+
COPY install-patchelf.sh /opt/
180+
RUN /opt/install-patchelf.sh
181+
182+
# lz4 is required to tar home cache folder
183+
COPY install-lz4-parallel.sh /opt/
184+
RUN /opt/install-lz4-parallel.sh
185+
186+
# Ubuntu 23.10 introduced a user group named "ubuntu" with the ID 1000
187+
# Jenkins is using this group ID everywhere, so lets move it
188+
RUN groupmod -g 3000 ubuntu
189+
190+
COPY ci.bazelrc /etc/
191+
RUN <<EOF cat >> /etc/ci.bazelrc
192+
common:ci --@cmk//distro="ubuntu-26.04"
193+
common:ci --action_env=DISTRO=${DISTRO}
194+
# We encountered false cache hits with remote caching due to environment variables
195+
# not being propagated to external dependeny builds
196+
# In that case "--host_action_env=..." (in addition to "--action_env") might help
197+
# Currently we don't use any external dependencies though.
198+
common:ci --host_action_env=DISTRO=${DISTRO}
199+
EOF
200+
201+
ARG VERS_TAG
202+
RUN echo "${VERS_TAG}" > /version.txt
203+
204+
LABEL \
205+
com.checkmk.image_type="build-image"
206+
207+
COPY entrypoint.sh /opt/
208+
ENTRYPOINT ["/opt/entrypoint.sh"]

buildscripts/scripts/get_distros.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,23 +75,23 @@ def test_distro_lists():
7575
"debian-12",
7676
"debian-13",
7777
"sles-15sp6", "sles-15sp7",
78-
"ubuntu-22.04", "ubuntu-24.04",
78+
"ubuntu-22.04", "ubuntu-24.04", "ubuntu-26.04"
7979
]
8080
assert distros_for_use_case(edition_distros, "pro", "daily") == [
8181
"almalinux-10", "almalinux-8", "almalinux-9",
8282
"cma-4",
8383
"debian-12",
8484
"debian-13",
8585
"sles-15sp6", "sles-15sp7",
86-
"ubuntu-22.04", "ubuntu-24.04",
86+
"ubuntu-22.04", "ubuntu-24.04", "ubuntu-26.04"
8787
]
8888
assert distros_for_use_case(edition_distros, "all", "all") == [
8989
"almalinux-10", "almalinux-8", "almalinux-9",
9090
"cma-4",
9191
"debian-12",
9292
"debian-13",
9393
"sles-15sp6", "sles-15sp7",
94-
"ubuntu-22.04", "ubuntu-24.04",
94+
"ubuntu-22.04", "ubuntu-24.04", "ubuntu-26.04"
9595
]
9696
# fmt: on
9797

editions.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ common: &common
44
- "debian-13"
55
- "ubuntu-22.04"
66
- "ubuntu-24.04"
7+
- "ubuntu-26.04"
78
- "almalinux-8"
89
- "almalinux-9"
910
- "almalinux-10"
@@ -19,6 +20,7 @@ daily_reduced: &daily_reduced
1920
- "debian-13"
2021
- "ubuntu-22.04"
2122
- "ubuntu-24.04"
23+
- "ubuntu-26.04"
2224
- "sles-16.0"
2325

2426
daily_saas: &daily_saas

omd/BUILD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ pkg_files(
329329
"@cmk//distro:sles-16.0": ["//omd/distros:SLES_16.0.mk"],
330330
"@cmk//distro:ubuntu-22.04": ["//omd/distros:UBUNTU_22.04.mk"],
331331
"@cmk//distro:ubuntu-24.04": ["//omd/distros:UBUNTU_24.04.mk"],
332+
"@cmk//distro:ubuntu-26.04": ["//omd/distros:UBUNTU_26.04.mk"],
332333
}),
333334
prefix = "share/omd",
334335
renames = select({
@@ -342,6 +343,7 @@ pkg_files(
342343
"@cmk//distro:sles-16.0": {"//omd/distros:SLES_16.0.mk": "distro.info"},
343344
"@cmk//distro:ubuntu-22.04": {"//omd/distros:UBUNTU_22.04.mk": "distro.info"},
344345
"@cmk//distro:ubuntu-24.04": {"//omd/distros:UBUNTU_24.04.mk": "distro.info"},
346+
"@cmk//distro:ubuntu-26.04": {"//omd/distros:UBUNTU_26.04.mk": "distro.info"},
345347
}),
346348
)
347349

@@ -624,6 +626,7 @@ pkg_tar(
624626
"@cmk//distro:sles-16.0": "sles16.0",
625627
"@cmk//distro:ubuntu-22.04": "0.jammy",
626628
"@cmk//distro:ubuntu-24.04": "0.noble",
629+
"@cmk//distro:ubuntu-26.04": "0.resolute",
627630
}),
628631
) for edition in [
629632
"community",

0 commit comments

Comments
 (0)