From 4d1835731da8035c61dd1a8cb4bc18d11db3f916 Mon Sep 17 00:00:00 2001 From: maneesha Date: Fri, 30 Oct 2026 17:41:45 +0530 Subject: [PATCH] fix(smtp): build Postfix on Linux 7.x kernel hosts GitHub runners now run kernel 7.0. Postfix 3.7's makedefs derives SYSTYPE from the host `uname -r` and only knows Linux 1-6, so the rebuild aborted with "Unknown system type: Linux 7.0.0-1017-azure". Accept 7.x in makedefs and add LINUX7 to the sys_defs.h Linux block. Co-Authored-By: Claude Opus 5.5 --- mail-infra/images/pingmailer-smtp-rootless/Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mail-infra/images/pingmailer-smtp-rootless/Dockerfile b/mail-infra/images/pingmailer-smtp-rootless/Dockerfile index 14b92f7..00ccfdf 100644 --- a/mail-infra/images/pingmailer-smtp-rootless/Dockerfile +++ b/mail-infra/images/pingmailer-smtp-rootless/Dockerfile @@ -61,6 +61,14 @@ RUN set -eux; \ # null because every master.cf service has chroot=n). --- sed -i 's/if (user_name != 0)/if (user_name != 0 \&\& getuid() == 0)/' src/util/chroot_uid.c; \ test "$(grep -c 'getuid() == 0' src/util/chroot_uid.c)" = "2"; \ + # --- (4) Kernel 7.x build hosts: makedefs derives SYSTYPE from `uname -r` + # (the host kernel, even inside docker build) and Postfix 3.7 only knows + # Linux 1-6, so it aborts with "Unknown system type". Teach makedefs and + # sys_defs.h about LINUX7; it uses the same definitions as LINUX3-6. --- + sed -i 's/^Linux\.\[3456\]\.\*)/Linux.[34567].*)/' makedefs; \ + sed -i 's/|| defined(LINUX6)/|| defined(LINUX6) || defined(LINUX7)/' src/util/sys_defs.h; \ + grep -q '^Linux\.\[34567\]\.\*)' makedefs; \ + grep -q 'defined(LINUX7)' src/util/sys_defs.h; \ dpkg-buildpackage -us -uc -b # ----------------------------------------------------------------------------