[meta-networking,2/4] postfix: upgrade 3.6.4 -> 3.6.5

Message ID 20220322044616.867009-2-yi.zhao@windriver.com
State New
Headers show
Series [meta-networking,1/4] nftables: upgrade 1.0.1 -> 1.0.2 | expand

Commit Message

Yi Zhao March 22, 2022, 4:46 a.m. UTC
ChangeLog:
https://www.postfix.org/announcements/postfix-3.6.5.html

* Drop 0006-correct-signature-of-closefrom-API.patch as the issue has
been fixed upstream.

* Update main.cf to eliminate startup warning:
postfix: Postfix is running with backwards-compatible default settings
postfix: See http://www.postfix.org/COMPATIBILITY_README.html for details
postfix: To disable backwards compatibility use "postconf compatibility_level=3.6" and "postfix reload"

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
---
 ...6-correct-signature-of-closefrom-API.patch | 104 ------------------
 .../recipes-daemons/postfix/files/main.cf     |   2 +-
 .../{postfix_3.6.4.bb => postfix_3.6.5.bb}    |   3 +-
 3 files changed, 2 insertions(+), 107 deletions(-)
 delete mode 100644 meta-networking/recipes-daemons/postfix/files/0006-correct-signature-of-closefrom-API.patch
 rename meta-networking/recipes-daemons/postfix/{postfix_3.6.4.bb => postfix_3.6.5.bb} (82%)

Patch

diff --git a/meta-networking/recipes-daemons/postfix/files/0006-correct-signature-of-closefrom-API.patch b/meta-networking/recipes-daemons/postfix/files/0006-correct-signature-of-closefrom-API.patch
deleted file mode 100644
index 95ca03b22..000000000
--- a/meta-networking/recipes-daemons/postfix/files/0006-correct-signature-of-closefrom-API.patch
+++ /dev/null
@@ -1,104 +0,0 @@ 
-From 56bec31c4117fddee3a141bcca6c585aa8ddbbe2 Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Wed, 14 Jul 2021 18:08:30 -0700
-Subject: [PATCH] correct signature of closefrom() API
-
-glibc 2.34 introduced this function and finds this error which has been
-all along.
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- src/util/sys_compat.c |  6 +++---
- src/util/sys_defs.h   | 12 ++++++------
- 2 files changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/src/util/sys_compat.c b/src/util/sys_compat.c
-index 8bf8e58..c87f043 100644
---- a/src/util/sys_compat.c
-+++ b/src/util/sys_compat.c
-@@ -286,7 +286,7 @@ int     dup2_pass_on_exec(int oldd, int newd)
- 
- /* closefrom() - closes all file descriptors from the given one up */
- 
--int     closefrom(int lowfd)
-+void     closefrom(int lowfd)
- {
-     int     fd_limit = open_limit(0);
-     int     fd;
-@@ -298,14 +298,14 @@ int     closefrom(int lowfd)
-      */
-     if (lowfd < 0) {
- 	errno = EBADF;
--	return (-1);
-+	return;
-     }
-     if (fd_limit > 500)
- 	fd_limit = 500;
-     for (fd = lowfd; fd < fd_limit; fd++)
- 	(void) close(fd);
- 
--    return (0);
-+    return;
- }
- 
- #endif
-diff --git a/src/util/sys_defs.h b/src/util/sys_defs.h
-index 2e1c953..515de6c 100644
---- a/src/util/sys_defs.h
-+++ b/src/util/sys_defs.h
-@@ -1509,7 +1509,7 @@ extern int setsid(void);
- #endif
- 
- #ifndef HAS_CLOSEFROM
--extern int closefrom(int);
-+extern void closefrom(int);
- 
- #endif
- 
-@@ -1563,7 +1563,7 @@ typedef int pid_t;
- 
-  /*
-   * Clang-style attribute tests.
--  * 
-+  *
-   * XXX Without the unconditional test below, gcc 4.6 will barf on ``elif
-   * defined(__clang__) && __has_attribute(__whatever__)'' with error message
-   * ``missing binary operator before token "("''.
-@@ -1577,7 +1577,7 @@ typedef int pid_t;
-   * warn for missing initializations and other trouble. However, OPENSTEP4
-   * gcc 2.7.x cannot handle this so we define this only if NORETURN isn't
-   * already defined above.
--  * 
-+  *
-   * Data point: gcc 2.7.2 has __attribute__ (Wietse Venema) but gcc 2.6.3 does
-   * not (Clive Jones). So we'll set the threshold at 2.7.
-   */
-@@ -1653,12 +1653,12 @@ typedef int pid_t;
-   * write to output parameters (for example, stat- or scanf-like functions)
-   * or from functions that have other useful side effects (for example,
-   * fseek- or rename-like functions).
--  * 
-+  *
-   * DO NOT use this for functions that write to a stream; it is entirely
-   * legitimate to detect write errors with fflush() or fclose() only. On the
-   * other hand most (but not all) functions that read from a stream must
-   * never ignore result values.
--  * 
-+  *
-   * XXX Prepending "(void)" won't shut up GCC. Clang behaves as expected.
-   */
- #if ((__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || __GNUC__ > 3)
-@@ -1739,7 +1739,7 @@ typedef const char *CONST_CHAR_STAR;
-   * Safety. On some systems, ctype.h misbehaves with non-ASCII or negative
-   * characters. More importantly, Postfix uses the ISXXX() macros to ensure
-   * protocol compliance, so we have to rule out non-ASCII characters.
--  * 
-+  *
-   * XXX The (unsigned char) casts in isalnum() etc arguments are unnecessary
-   * because the ISASCII() guard already ensures that the values are
-   * non-negative; the casts are done anyway to shut up chatty compilers.
--- 
-2.17.1
-
diff --git a/meta-networking/recipes-daemons/postfix/files/main.cf b/meta-networking/recipes-daemons/postfix/files/main.cf
index e75c6fc0d..22c57485d 100644
--- a/meta-networking/recipes-daemons/postfix/files/main.cf
+++ b/meta-networking/recipes-daemons/postfix/files/main.cf
@@ -1,4 +1,4 @@ 
-compatibility_level = 2
+compatibility_level = 3.6
 smtputf8_enable = no
 
 # Configure your domain and accounts
diff --git a/meta-networking/recipes-daemons/postfix/postfix_3.6.4.bb b/meta-networking/recipes-daemons/postfix/postfix_3.6.5.bb
similarity index 82%
rename from meta-networking/recipes-daemons/postfix/postfix_3.6.4.bb
rename to meta-networking/recipes-daemons/postfix/postfix_3.6.5.bb
index 54c8eab5c..343a8b2df 100644
--- a/meta-networking/recipes-daemons/postfix/postfix_3.6.4.bb
+++ b/meta-networking/recipes-daemons/postfix/postfix_3.6.5.bb
@@ -12,7 +12,6 @@  SRC_URI += "ftp://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://0006-correct-signature-of-closefrom-API.patch \
            "
-SRC_URI[sha256sum] = "8de0619dcf2fa7c215a80cf84b82ab71631d4d4722cba0949725ce3e18031d4e"
+SRC_URI[sha256sum] = "300fa8811cea20d01d25c619d359bffab82656e704daa719e0c9afc4ecff4808"
 UPSTREAM_CHECK_REGEX = "postfix\-(?P<pver>3\.6(\.\d+)+).tar.gz"