Skip to contentSkip to conversation

postfix: fix build on hosts with Linux 7.x kernel

PATCH In review Himani Ramesh Barde 2 participants 3 messages Sep 23 – Sep 24

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 postfix: fix build on hosts with Linux 7.x kernel

makedefs only recognizes kernel majors 3-6. Hosts running a 7.x kernel get "Unknown system type: Linux 7.0.0-..." and the native build fails. Add 7 to the version match in makedefs and sys_defs.h.

Already fixed in postfix 3.11.

Upstream-Status: Backport [postfix 3.11]

---
 ...kedefs-Account-for-linux-7.x-version.patch | 47 +++++++++++++++++++
 .../recipes-daemons/postfix/postfix_3.8.19.bb |  1 +
 2 files changed, 48 insertions(+)
 create mode 100644 meta-networking/recipes-daemons/postfix/files/0001-makedefs-Account-for-linux-7.x-version.patch
meta-networking/recipes-daemons/postfix/files/0001-makedefs-Account-for-linux-7.x-version.patch new file +47 -0
new file mode 100644
index 0000000000..4bc59ace7d
@@ -0,0 +1,47 @@
+From 5466d510dfbc2b7a81dcf766f83d2c89066c0446 Mon Sep 17 00:00:00 2001
+From: Changqing Li <[email protected]>
+Date: Mon, 11 May 2026 18:16:07 +0000
+Subject: [PATCH] makedefs: Account for linux 7.x version
+
+Major version has bumped to 7, update the scripts
+
+Upstream-Status: Backport [The latest stable version 3.11 already fixed]
+
+Refer:
+https://www.ftp.saix.net/MTA/postfix/index.html
+
+Signed-off-by: Changqing Li <[email protected]>
+---
+ makedefs            | 2 +-
+ src/util/sys_defs.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/makedefs b/makedefs
+index 74b103d..fe8c618 100644
+--- a/makedefs
++++ b/makedefs
+@@ -625,7 +625,7 @@ EOF
+ 		: ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
+ 		: ${PLUGIN_LD="${CC-gcc} -shared"}
+ 		;;
+-    Linux.[3456].*)
++    Linux.[34567].*)
+ 		SYSTYPE=LINUX$RELEASE_MAJOR
+ 		case "$CCARGS" in
+ 		 *-DNO_DB*) ;;
+diff --git a/src/util/sys_defs.h b/src/util/sys_defs.h
+index 70aab23..c5472eb 100644
+--- a/src/util/sys_defs.h
++++ b/src/util/sys_defs.h
+@@ -763,7 +763,7 @@ extern int initgroups(const char *, int);
+   * LINUX.
+   */
+ #if defined(LINUX2) || defined(LINUX3) || defined(LINUX4) || defined(LINUX5) \
+-	|| defined(LINUX6)
++	|| defined(LINUX6) || defined(LINUX7)
+ #define SUPPORTED
+ #define UINT32_TYPE	unsigned int
+ #define UINT16_TYPE	unsigned short
+-- 
+2.53.0
+
meta-networking/recipes-daemons/postfix/postfix_3.8.19.bb +1 -0
index 018e8d89bb..ad770651d8 100644
@@ -26,6 +26,7 @@ SRC_URI = "http://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${P
            file://0003-makedefs-Use-native-compiler-to-build-makedefs.test.patch \
            file://0004-Fix-icu-config.patch \
            file://0005-makedefs-add-lnsl-and-lresolv-to-SYSLIBS-by-default.patch \
+           file://0001-makedefs-Account-for-linux-7.x-version.patch \
            "
 
 SRC_URI[sha256sum] = "1ebaec340fea1b80a9c88d276f07bed0886cc4f000753cf310223affb427754b"
Signature · 1 line
2.53.0
#1 lore raw
Quoted 5 lines · Himani Ramesh Barde

makedefs only recognizes kernel majors 3-6. Hosts running a 7.x kernel get "Unknown system type: Linux 7.0.0-..." and the native build fails. Add 7 to the version match in makedefs and sys_defs.h.

Already fixed in postfix 3.11.

What about wrynose which has postfix 3.10.x?
https://layers.openembedded.org/layerindex/branch/wrynose/recipes/?q=postfix

../Randy

Quoted 70 lines

Upstream-Status: Backport [postfix 3.11]

---
  ...kedefs-Account-for-linux-7.x-version.patch | 47 +++++++++++++++++++
  .../recipes-daemons/postfix/postfix_3.8.19.bb |  1 +
  2 files changed, 48 insertions(+)

create mode 100644 meta-networking/recipes-daemons/postfix/files/0001-makedefs-Account-for-linux-7.x-version.patch

meta-networking/recipes-daemons/postfix/files/0001-makedefs-Account-for-linux-7.x-version.patch new file +47 -0
new file mode 100644
index 0000000000..4bc59ace7d
@@ -0,0 +1,47 @@
+From 5466d510dfbc2b7a81dcf766f83d2c89066c0446 Mon Sep 17 00:00:00 2001
+From: Changqing Li<[email protected]>
+Date: Mon, 11 May 2026 18:16:07 +0000
+Subject: [PATCH] makedefs: Account for linux 7.x version
+
+Major version has bumped to 7, update the scripts
+
+Upstream-Status: Backport [The latest stable version 3.11 already fixed]
+
+Refer:
+https://www.ftp.saix.net/MTA/postfix/index.html
+
+Signed-off-by: Changqing Li<[email protected]>
+---
+ makedefs            | 2 +-
+ src/util/sys_defs.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/makedefs b/makedefs
+index 74b103d..fe8c618 100644
+--- a/makedefs
++++ b/makedefs
+@@ -625,7 +625,7 @@ EOF
+ 		: ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
+ 		: ${PLUGIN_LD="${CC-gcc} -shared"}
+ 		;;
+-    Linux.[3456].*)
++    Linux.[34567].*)
+ 		SYSTYPE=LINUX$RELEASE_MAJOR
+ 		case "$CCARGS" in
+ 		 *-DNO_DB*) ;;
+diff --git a/src/util/sys_defs.h b/src/util/sys_defs.h
+index 70aab23..c5472eb 100644
+--- a/src/util/sys_defs.h
++++ b/src/util/sys_defs.h
+@@ -763,7 +763,7 @@ extern int initgroups(const char *, int);
+   * LINUX.
+   */
+ #if defined(LINUX2) || defined(LINUX3) || defined(LINUX4) || defined(LINUX5) \
+-	|| defined(LINUX6)
++	|| defined(LINUX6) || defined(LINUX7)
+ #define SUPPORTED
+ #define UINT32_TYPE	unsigned int
+ #define UINT16_TYPE	unsigned short
+--
+2.53.0
+
meta-networking/recipes-daemons/postfix/postfix_3.8.19.bb +0 -0
index 018e8d89bb..ad770651d8 100644
@@ -26,6 +26,7 @@ SRC_URI ="http://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${P 

file://0003-makedefs-Use-native-compiler-to-build-makedefs.test.patch \ file://0004-Fix-icu-config.patch \ file://0005-makedefs-add-lnsl-and-lresolv-to-SYSLIBS-by-default.patch \ + file://0001-makedefs-Account-for-linux-7.x-version.patch \ "

SRC_URI[sha256sum] = "1ebaec340fea1b80a9c88d276f07bed0886cc4f000753cf310223affb427754b"

Signature · 2 lines
# Randy MacLeod
# Wind River Linux
#2 lore raw

Hello @MacLeod, Randy<mailto:[email protected]>

wrynose already has it - Changqing Li's "postfix: make it can compile with linux 7.x" landed there on May 15 (postfix 3.10.x).

This patch backports the same change to scarthgap's 3.8.19.

Thanks,
Himani

________________________________
From: MacLeod, Randy <[email protected]>
Sent: Wednesday, September 23, 2026 6:29 PM
To: Barde, Himani Ramesh <[email protected]>; [email protected] <[email protected]>
Subject: Re: [meta-oe][scarthgap][PATCH] postfix: fix build on hosts with Linux 7.x kernel

On 2026-09-23 02:57, Himani Ramesh Barde wrote:

makedefs only recognizes kernel majors 3-6. Hosts running a 7.x kernel get "Unknown system type: Linux 7.0.0-..." and the native build fails. Add 7 to the version match in makedefs and sys_defs.h.

Already fixed in postfix 3.11.

What about wrynose which has postfix 3.10.x?
https://layers.openembedded.org/layerindex/branch/wrynose/recipes/?q=postfix

../Randy

Upstream-Status: Backport [postfix 3.11]

---
 ...kedefs-Account-for-linux-7.x-version.patch | 47 +++++++++++++++++++
 .../recipes-daemons/postfix/postfix_3.8.19.bb |  1 +
 2 files changed, 48 insertions(+)
 create mode 100644 meta-networking/recipes-daemons/postfix/files/0001-makedefs-Account-for-linux-7.x-version.patch
meta-networking/recipes-daemons/postfix/files/0001-makedefs-Account-for-linux-7.x-version.patch new file +47 -0
new file mode 100644
index 0000000000..4bc59ace7d
@@ -0,0 +1,47 @@
+From 5466d510dfbc2b7a81dcf766f83d2c89066c0446 Mon Sep 17 00:00:00 2001
+From: Changqing Li <[email protected]><mailto:[email protected]>
+Date: Mon, 11 May 2026 18:16:07 +0000
+Subject: [PATCH] makedefs: Account for linux 7.x version
+
+Major version has bumped to 7, update the scripts
+
+Upstream-Status: Backport [The latest stable version 3.11 already fixed]
+
+Refer:
+https://www.ftp.saix.net/MTA/postfix/index.html
+
+Signed-off-by: Changqing Li <[email protected]><mailto:[email protected]>
+---
+ makedefs            | 2 +-
+ src/util/sys_defs.h | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/makedefs b/makedefs
+index 74b103d..fe8c618 100644
+--- a/makedefs
++++ b/makedefs
+@@ -625,7 +625,7 @@ EOF
+               : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
+               : ${PLUGIN_LD="${CC-gcc} -shared"}
+               ;;
+-    Linux.[3456].*)
++    Linux.[34567].*)
+               SYSTYPE=LINUX$RELEASE_MAJOR
+               case "$CCARGS" in
+                *-DNO_DB*) ;;
+diff --git a/src/util/sys_defs.h b/src/util/sys_defs.h
+index 70aab23..c5472eb 100644
+--- a/src/util/sys_defs.h
++++ b/src/util/sys_defs.h
+@@ -763,7 +763,7 @@ extern int initgroups(const char *, int);
+   * LINUX.
+   */
+ #if defined(LINUX2) || defined(LINUX3) || defined(LINUX4) || defined(LINUX5) \
+-      || defined(LINUX6)
++      || defined(LINUX6) || defined(LINUX7)
+ #define SUPPORTED
+ #define UINT32_TYPE   unsigned int
+ #define UINT16_TYPE   unsigned short
+--
+2.53.0
+
meta-networking/recipes-daemons/postfix/postfix_3.8.19.bb +1 -0
index 018e8d89bb..ad770651d8 100644
@@ -26,6 +26,7 @@ SRC_URI = "http://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${P
            file://0003-makedefs-Use-native-compiler-to-build-makedefs.test.patch \
            file://0004-Fix-icu-config.patch \
            file://0005-makedefs-add-lnsl-and-lresolv-to-SYSLIBS-by-default.patch \
+           file://0001-makedefs-Account-for-linux-7.x-version.patch \
            "<http://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${Pfile://0003-makedefs-Use-native-compiler-to-build-makedefs.test.patch\file://0004-Fix-icu-config.patch\file://0005-makedefs-add-lnsl-and-lresolv-to-SYSLIBS-by-default.patch\+file://0001-makedefs-Account-for-linux-7.x-version.patch\>
 
 SRC_URI[sha256sum] = "1ebaec340fea1b80a9c88d276f07bed0886cc4f000753cf310223affb427754b"

--
# Randy MacLeod
# Wind River Linux