Skip to content

Commit 28be02a

Browse files
19245 Build Checkmk for Ubuntu 26.04 (resolute)
Change-Id: I42331c8640433b9eeabac46f5650c5056a52914c JIRA-Ref: CMK-24292
1 parent 559dc48 commit 28be02a

File tree

13 files changed

+313
-7
lines changed

13 files changed

+313
-7
lines changed

.werks/19245.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[//]: # (werk v2)
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.4.0p27
8+
class | feature
9+
edition | cre
10+
component | omd
11+
level | 1
12+
compatible | yes
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: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
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+
nullmailer \
24+
php-common \
25+
python3-dev \
26+
python3-pip \
27+
strace \
28+
sudo \
29+
vim
30+
31+
RUN apt-get install -y --fix-missing \
32+
apache2 \
33+
apache2-dev \
34+
autoconf \
35+
build-essential \
36+
bison \
37+
curl \
38+
devscripts \
39+
dnsutils \
40+
flex \
41+
gawk \
42+
gettext \
43+
git-buildpackage \
44+
gtk-doc-tools \
45+
iproute2 \
46+
iputils-ping \
47+
joe \
48+
jq \
49+
libc6-dbg \
50+
libcurl4-openssl-dev \
51+
libevent-dev \
52+
libffi-dev \
53+
libfreeradius-dev \
54+
libgd-dev \
55+
libglib2.0-dev \
56+
libgmp-dev \
57+
libgnutls28-dev \
58+
libgsf-1-dev \
59+
libkrb5-dev \
60+
libldap2-dev \
61+
libltdl-dev \
62+
libmcrypt-dev \
63+
libmpfr-dev \
64+
libmysqlclient-dev \
65+
libncurses5-dev \
66+
libpango1.0-dev \
67+
libpcap-dev \
68+
libperl-dev \
69+
libpq-dev \
70+
libreadline-dev \
71+
libsqlite3-dev \
72+
libssl-dev \
73+
libtool \
74+
libxml2-dev \
75+
libxmlsec1-dev \
76+
netcat-openbsd \
77+
openssh-client \
78+
patch \
79+
rpcbind \
80+
rsync \
81+
smbclient \
82+
software-properties-common \
83+
texinfo \
84+
tk-dev \
85+
uuid-dev
86+
87+
# remove apt service because we don't need it and we run into problems, see
88+
# https://jira.lan.tribe29.com/browse/CMK-16607
89+
RUN rm /etc/cron.daily/apt-compat
90+
91+
# Install our standard tool chain for building in seperate container
92+
# - gnu-toolchain is needed for compiling all the C++ stuff
93+
# - cmake is needed for e.g. building re2
94+
# - openssl is needed by Python 3.7+
95+
# - python is needed by our build / test chain
96+
FROM base AS builder
97+
ARG NEXUS_ARCHIVES_URL
98+
ARG NEXUS_USERNAME
99+
ARG NEXUS_PASSWORD
100+
ARG DISTRO
101+
ARG BRANCH_VERSION
102+
ENV \
103+
NEXUS_ARCHIVES_URL="${NEXUS_ARCHIVES_URL}" \
104+
NEXUS_USERNAME="${NEXUS_USERNAME}" \
105+
NEXUS_PASSWORD="${NEXUS_PASSWORD}" \
106+
DISTRO="${DISTRO}" \
107+
BRANCH_VERSION="${BRANCH_VERSION}"
108+
109+
# Copy over stuff that's needed by lots of scripts (has to be copied to context before)
110+
COPY \
111+
.bazelversion \
112+
package_versions.bzl \
113+
defines.make \
114+
/opt/
115+
116+
COPY \
117+
build_lib.sh \
118+
Check_MK-pubkey.gpg \
119+
/opt/
120+
121+
COPY install-gnu-toolchain.sh /opt/
122+
RUN /opt/install-gnu-toolchain.sh
123+
124+
COPY install-valgrind.sh /opt/
125+
RUN /opt/install-valgrind.sh
126+
127+
COPY install-cmake.sh /opt/
128+
RUN /opt/install-cmake.sh
129+
130+
COPY install-protobuf-cpp.sh /opt/
131+
RUN /opt/install-protobuf-cpp.sh
132+
133+
COPY install-openssl.sh /opt/
134+
RUN /opt/install-openssl.sh
135+
136+
COPY install-python.sh /opt/
137+
RUN /opt/install-python.sh
138+
139+
# install GDB after Python as it requires shared object files, see CMK-15854
140+
COPY install-gdb.sh /opt/
141+
RUN /opt/install-gdb.sh
142+
143+
COPY install-rust-cargo.sh /opt/
144+
RUN /opt/install-rust-cargo.sh
145+
146+
# Now shrink all the binaries and libraries we produced to build a small image
147+
# in the next step
148+
COPY strip_binaries /opt/
149+
RUN /opt/strip_binaries /opt
150+
151+
# Run this AFTER strip_binaries!!
152+
COPY install-bazel.sh /opt/
153+
RUN /opt/install-bazel.sh
154+
155+
### Actual Build Image ###
156+
FROM base
157+
158+
# Copy our standard tool chain for building
159+
COPY --from=builder /opt /opt
160+
161+
ARG DISTRO
162+
ARG DISTRO_MK_FILE
163+
ARG BRANCH_VERSION
164+
ENV \
165+
DISTRO="${DISTRO}" \
166+
BRANCH_VERSION="${BRANCH_VERSION}"
167+
168+
# Set symlinks
169+
RUN /opt/install-gnu-toolchain.sh link-only
170+
RUN /opt/install-valgrind.sh link-only
171+
RUN /opt/install-cmake.sh link-only
172+
RUN /opt/install-protobuf-cpp.sh --link-only
173+
RUN /opt/install-python.sh link-only
174+
RUN /opt/install-bazel.sh link-only
175+
RUN /opt/install-rust-cargo.sh link-only
176+
177+
# Install non cached dependencies
178+
COPY "${DISTRO_MK_FILE}" /opt/
179+
COPY install-cmk-dependencies.sh /opt/
180+
RUN /opt/install-cmk-dependencies.sh
181+
182+
COPY install-patchelf.sh /opt/
183+
RUN /opt/install-patchelf.sh
184+
185+
# Ubuntu 23.10 introduced a user group named "ubuntu" with the ID 1000
186+
# Jenkins is using this group ID everywhere, so lets move it
187+
RUN groupmod -g 3000 ubuntu
188+
189+
COPY ci.bazelrc /etc/
190+
RUN echo "common:ci --@//:filesystem_layout=lsb" >> /etc/ci.bazelrc
191+
192+
ARG VERS_TAG
193+
RUN echo "${VERS_TAG}" > /version.txt
194+
195+
ENV RUSTUP_HOME=/opt/rust/rustup
196+
LABEL \
197+
com.checkmk.image_type="build-image"
198+
199+
COPY entrypoint.sh /opt/
200+
ENTRYPOINT ["/opt/entrypoint.sh"]

buildscripts/scripts/get_distros.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,21 +71,21 @@ def test_distro_lists():
7171
"cma-4",
7272
"debian-11", "debian-12", "debian-13",
7373
"sles-15sp3", "sles-15sp4", "sles-15sp5", "sles-15sp6", "sles-15sp7", "sles-16.0",
74-
"ubuntu-22.04", "ubuntu-24.04",
74+
"ubuntu-22.04", "ubuntu-24.04", "ubuntu-26.04",
7575
]
7676
assert distros_for_use_case(edition_distros, "enterprise", "daily") == [
7777
"almalinux-8", "almalinux-9", "almalinux-10"
7878
"cma-4",
7979
"debian-11", "debian-12", "debian-13",
8080
"sles-15sp3", "sles-15sp4", "sles-15sp5", "sles-15sp6", "sles-15sp7", "sles-16.0",
81-
"ubuntu-22.04", "ubuntu-23.10", "ubuntu-24.04",
81+
"ubuntu-22.04", "ubuntu-23.10", "ubuntu-24.04", "ubuntu-26.04",
8282
]
8383
assert distros_for_use_case(edition_distros, "all", "all") == [
8484
"almalinux-8", "almalinux-9", "almalinux-10"
8585
"cma-4",
8686
"debian-11", "debian-12", "debian-13",
8787
"sles-15sp3", "sles-15sp4", "sles-15sp5", "sles-15sp6", "sles-15sp7", "sles-16.0",
88-
"ubuntu-22.04", "ubuntu-23.10", "ubuntu-24.04"
88+
"ubuntu-22.04", "ubuntu-23.10", "ubuntu-24.04", "ubuntu-26.04",
8989
]
9090
# fmt: on
9191

editions.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ common: &common
55
- "debian-13"
66
- "ubuntu-22.04"
77
- "ubuntu-24.04"
8+
- "ubuntu-26.04"
89
- "almalinux-8"
910
- "almalinux-9"
1011
- "almalinux-10"
@@ -22,6 +23,7 @@ daily_reduced: &daily_reduced
2223
- "almalinux-10"
2324
- "ubuntu-22.04"
2425
- "ubuntu-24.04"
26+
- "ubuntu-26.04"
2527
- "debian-12"
2628
- "sles-15sp7"
2729
- "sles-16.0"

omd/distros/BUILD

Whitespace-only changes.

omd/distros/UBUNTU_26.04.mk

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
DISTRO_CODE = resolute
2+
#
3+
# Checkmk build specific packages below
4+
#
5+
OS_PACKAGES =
6+
OS_PACKAGES += libcap2-bin # needed for setting special file permissions
7+
OS_PACKAGES += cron # needed for sites cron jobs
8+
OS_PACKAGES += time # needed for mk-job
9+
OS_PACKAGES += traceroute # needed for Checkmk parent scan
10+
OS_PACKAGES += curl
11+
OS_PACKAGES += dialog
12+
OS_PACKAGES += dnsutils
13+
OS_PACKAGES += graphviz
14+
OS_PACKAGES += apache2
15+
OS_PACKAGES += apache2-utils # contains htpasswd2
16+
OS_PACKAGES += libevent-2.1-7
17+
OS_PACKAGES += libltdl7
18+
OS_PACKAGES += libnl-3-200
19+
OS_PACKAGES += libpango-1.0-0
20+
OS_PACKAGES += libperl5.40
21+
OS_PACKAGES += libreadline8
22+
OS_PACKAGES += libuuid1
23+
OS_PACKAGES += libxml2-16
24+
OS_PACKAGES += logrotate
25+
OS_PACKAGES += php-cli
26+
OS_PACKAGES += php-cgi
27+
OS_PACKAGES += php-gd
28+
OS_PACKAGES += php-sqlite3
29+
OS_PACKAGES += php-json
30+
OS_PACKAGES += php-pear
31+
OS_PACKAGES += rsync
32+
OS_PACKAGES += smbclient
33+
OS_PACKAGES += rpcbind # otherwise missing path in util.pm
34+
OS_PACKAGES += unzip
35+
OS_PACKAGES += xinetd
36+
OS_PACKAGES += freeradius-utils
37+
OS_PACKAGES += bc # Needed by some third-party check plugins
38+
OS_PACKAGES += file # Needed by some third-party check plugins
39+
#
40+
# Checkmk build specific packages below
41+
#
42+
OS_PACKAGES += libpcap0.8 # needed for cmc
43+
OS_PACKAGES += rpm # needed by msitools/Agent Bakery
44+
OS_PACKAGES += binutils # needed by msitools/Agent Bakery
45+
OS_PACKAGES += libgsf-1-114 # needed by msitools/Agent Bakery
46+
OS_PACKAGES += libglib2.0-0 # needed by msitools/Agent Bakery
47+
OS_PACKAGES += cpio # needed for Agent bakery (solaris pkgs)
48+
OS_PACKAGES += libfl2 # needed by heirloom-pkgtools
49+
OS_PACKAGES += poppler-utils # needed for preview of PDF in reporting
50+
OS_PACKAGES += libffi8ubuntu1 # needed for pyOpenSSL and dependant
51+
OS_PACKAGES += libpq5
52+
USERADD_OPTIONS =
53+
ADD_USER_TO_GROUP = gpasswd -a %(user)s %(group)s
54+
APACHE_CONF_DIR = /etc/apache2/conf.d
55+
APACHE_INIT_NAME = apache2
56+
APACHE_USER = www-data
57+
APACHE_CTL = /usr/sbin/apache2ctl
58+
APACHE_MODULE_DIR_64 = /usr/lib/apache2/modules
59+
HTPASSWD_BIN = /usr/bin/htpasswd
60+
ARCH = $(shell dpkg --print-architecture)
61+
MOUNT_OPTIONS =
62+
INIT_CMD = /etc/init.d/%(name)s %(action)s

omd/packages/heirloom-pkgtools/heirloom-pkgtools_http.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def heirloom_pkgtools_workspace():
2121
"//omd/packages/heirloom-pkgtools/patches:0008-libfl.dif",
2222
"//omd/packages/heirloom-pkgtools/patches:0010-fix-missing-makedev.dif",
2323
"//omd/packages/heirloom-pkgtools/patches:0011-add-fcommon.dif",
24+
"//omd/packages/heirloom-pkgtools/patches:0012-fix-termio-glibc-2.42.dif",
2425
],
2526
patch_args = ["-p1"],
2627
patch_tool = "patch",

0 commit comments

Comments
 (0)