From 2ea64a501f1af80a7fb047fd39a537dd0357bd0f Mon Sep 17 00:00:00 2001 From: Denys Fedoryshchenko Date: Mon, 16 Nov 2026 17:59:03 +0200 Subject: [PATCH] docker: use distribution kmod package Remove the custom kmod build stage and its zlib patch. The source build hardcodes kmod-34.2, which breaks the GCC 15 images now that Forky provides kmod 34.3. Keep installing kmod through apt with the other host tools. This drops custom gzip module support while retaining the compression support provided by the distribution package. Signed-off-by: Denys Fedoryshchenko --- config/docker/base/host-tools.jinja2 | 49 ------------------------ config/docker/data/kmod_kci_trixie.patch | 43 --------------------- 2 files changed, 92 deletions(-) delete mode 100644 config/docker/data/kmod_kci_trixie.patch diff --git a/config/docker/base/host-tools.jinja2 b/config/docker/base/host-tools.jinja2 index 21ab216a47..c79fe8eb53 100644 --- a/config/docker/base/host-tools.jinja2 +++ b/config/docker/base/host-tools.jinja2 @@ -1,55 +1,6 @@ {%- extends 'base/debian.jinja2' -%} -{% block multistage %} -# Build custom kmod package with compression enabled - -# Add retries and deb-src entries -RUN echo 'Acquire::Retries "5";' > /etc/apt/apt.conf.d/80-retries && \ - echo "deb-src http://deb.debian.org/debian {{ debian_release | default('trixie') }} main non-free contrib" \ - >> /etc/apt/sources.list && \ - echo "deb-src http://deb.debian.org/debian-security/ {{ debian_release | default('trixie') }}-security main contrib non-free" \ - >> /etc/apt/sources.list - -# Prepare environment for building packages -RUN apt-get update && apt-get install -y --no-install-recommends \ - apt-transport-https \ - build-essential \ - ca-certificates \ - devscripts \ - equivs \ - fakeroot - -# Prepare kmod sources, patch, install dependencies, build -RUN mkdir -p /root/patches -# Workaround for apt-get source _apt permissions -RUN chmod 777 /root/patches -WORKDIR /root/patches - -# Get patch to enable compression -#ADD https://raw.githubusercontent.com/kernelci/kernelci-core/\ -#kernelci.org/\ -#config/docker/data/kmod_kci_trixie.patch \ -#. -ADD https://raw.githubusercontent.com/kernelci/kernelci-core/main/config/docker/data/kmod_kci_trixie.patch \ -. - -RUN apt-get source kmod -WORKDIR /root/patches/kmod-34.2 -RUN patch -p1 < ../kmod_kci_trixie.patch -RUN mk-build-deps -ir \ - -t "apt-get -o Debug::pkgProblemResolver=yes -y --no-install-recommends" -RUN debuild -b -uc -us - -FROM mirror.gcr.io/debian:{{ debian_release | default('trixie') }} -MAINTAINER "KernelCI TSC" -ENV DEBIAN_FRONTEND=noninteractive -{%- endblock %} - {%- block packages %} -# Fetch kmod deb package from previous stage -COPY --from=0 /root/patches/*.deb /root/ -RUN dpkg -i /root/*.deb && rm /root/*.deb - # Host build tools RUN apt-get update && apt-get install --no-install-recommends -y \ bash \ diff --git a/config/docker/data/kmod_kci_trixie.patch b/config/docker/data/kmod_kci_trixie.patch deleted file mode 100644 index 7cdf239552..0000000000 --- a/config/docker/data/kmod_kci_trixie.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff -Naur kmod-34.2/debian/changelog kmod-34.2_new/debian/changelog ---- kmod-34.2/debian/changelog 2025-04-25 12:50:41.000000000 +0300 -+++ kmod-34.2_new/debian/changelog 2025-11-16 23:25:34.103792800 +0200 -@@ -1,3 +1,9 @@ -+kmod (34.2-3000) unstable; urgency=medium -+ -+ * Add zlib support -+ -+ -- Denys Fedoryshchenko Fri, 16 Nov 2025 11:37:04 +0300 -+ - kmod (34.2-2) unstable; urgency=medium - - * kmod.initramfs-hook: if compressed modules have been copied to the -diff -Naur kmod-34.2/debian/control kmod-34.2_new/debian/control ---- kmod-34.2/debian/control 2025-04-25 12:47:10.000000000 +0300 -+++ kmod-34.2_new/debian/control 2025-11-16 23:25:57.571523159 +0200 -@@ -9,6 +9,7 @@ - liblzma-dev (>= 5.4.5-0.2), - libssl-dev, - libzstd-dev, zstd , -+ zlib1g-dev, - linux-headers-generic [!armel !i386 !mips64el !sh4 !x32] , - linux-headers-mips64r6el [mips64el] , - linux-headers-rpi [armel] , -diff -Naur kmod-34.2/debian/rules kmod-34.2_new/debian/rules ---- kmod-34.2/debian/rules 2025-04-25 12:47:10.000000000 +0300 -+++ kmod-34.2_new/debian/rules 2025-11-16 23:27:04.158101565 +0200 -@@ -27,13 +27,13 @@ - -D docs=$(KMOD_ENABLE_DOCS) \ - -D openssl=enabled \ - -D dlopen=all \ -- -D zlib=disabled \ -+ -D zlib=enabled \ - -D xz=enabled \ - -D zstd=enabled - CONFFLAGS_udeb = $(CONFFLAGS) \ - -D docs=false \ - -D openssl=disabled \ -- -D zlib=disabled \ -+ -D zlib=enabled \ - -D xz=enabled \ - -D zstd=disabled -