!26 update postfix to 3.7.2 and switch from pcre to pcre2

#I4HME2
#I4ZWPU

没有其他包依赖postfix,此包升级不会影响其他软件包的编译 
From: @eaglegai 
Reviewed-by: @seuzw 
Signed-off-by: @seuzw
This commit is contained in:
openeuler-ci-bot 2022-07-04 09:36:10 +00:00 committed by Gitee
commit f77e397886
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
9 changed files with 32 additions and 173 deletions

View File

@ -0,0 +1,13 @@
diff --git a/src/cleanup/cleanup_message.c b/src/cleanup/cleanup_message.c
index 391c711..be5ce42 100644
--- a/src/cleanup/cleanup_message.c
+++ b/src/cleanup/cleanup_message.c
@@ -773,6 +773,8 @@ static void cleanup_header_done_callback(void *context)
/* Normalize whitespace. */
token = tok822_scan_limit(state->fullname, &dummy_token,
var_token_limit);
+ if (!token)
+ token = tok822_alloc(TOK822_QSTRING, state->fullname);
} else {
token = tok822_alloc(TOK822_QSTRING, state->fullname);
}

View File

@ -1,51 +0,0 @@
Description: fix build with glibc 2.30
glibc 2.30 release notes at
https://savannah.gnu.org/forum/forum.php?forum_id=9515 states:
"""
Support for the "inet6" option in /etc/resolv.conf and the RES_USE_INET6
resolver flag (deprecated in glibc 2.25) have been removed.
...
The obsolete RES_INSECURE1 and RES_INSECURE2 option flags for the DNS stub
resolver have been removed from <resolv.h>.
"""
And RES_AAONLY and RES_PRIMARY are already flagged as deprecated and are
being guarded with the same fix.
Origin: upstream, https://github.com/vdukhovni/postfix/commit/3274c3cea9d739f86e84b65664aabb692e37e83f#diff-777bfb681a1cd539ddc8e1e606959ffa
Bug: http://postfix.1071664.n5.nabble.com/build-failure-with-glibc-2-30-td102511.html
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/postfix/+bug/1842923
Last-Update: 2019-09-05
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
diff --git a/postfix/src/dns/dns_str_resflags.c b/postfix/src/dns/dns_str_resflags.c
index 5f2cce5e..472394c3 100644
--- a/src/dns/dns_str_resflags.c
+++ b/src/dns/dns_str_resflags.c
@@ -52,18 +52,28 @@
static const LONG_NAME_MASK resflag_table[] = {
"RES_INIT", RES_INIT,
"RES_DEBUG", RES_DEBUG,
+#ifdef RES_AAONLY
"RES_AAONLY", RES_AAONLY,
+#endif
"RES_USEVC", RES_USEVC,
+#ifdef RES_PRIMARY
"RES_PRIMARY", RES_PRIMARY,
+#endif
"RES_IGNTC", RES_IGNTC,
"RES_RECURSE", RES_RECURSE,
"RES_DEFNAMES", RES_DEFNAMES,
"RES_STAYOPEN", RES_STAYOPEN,
"RES_DNSRCH", RES_DNSRCH,
+#ifdef RES_INSECURE1
"RES_INSECURE1", RES_INSECURE1,
+#endif
+#ifdef RES_INSECURE2
"RES_INSECURE2", RES_INSECURE2,
+#endif
"RES_NOALIASES", RES_NOALIASES,
+#ifdef RES_USE_INET6
"RES_USE_INET6", RES_USE_INET6,
+#endif
#ifdef RES_ROTATE
"RES_ROTATE", RES_ROTATE,
#endif

View File

@ -1,52 +0,0 @@
From d40744a7c85af615d5a3bf3db382d35c50f1c508 Mon Sep 17 00:00:00 2001
From: Wietse Venema <wietse@porcupine.org>
Date: Sun, 26 Jan 2020 00:00:00 -0500
Subject: [PATCH] postfix-3.5-20200126
Cleanup: missing 'extern' declarations in some header files.
Eray Aslan. Files: postconf/postconf.h,smtpd/smtpd_expand.h,
trivial-rewrite/trivial-rewrite.h
---
postfix/src/postconf/postconf.h | 2 +-
postfix/src/smtpd/smtpd_expand.h | 2 +-
postfix/src/trivial-rewrite/trivial-rewrite.h | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/postconf/postconf.h b/src/postconf/postconf.h
index 0f4764875..7b23380a5 100644
--- a/src/postconf/postconf.h
+++ b/src/postconf/postconf.h
@@ -152,7 +152,7 @@ typedef struct {
* Lookup table for master.cf entries. The table is terminated with an entry
* that has a null argv member.
*/
-PCF_MASTER_ENT *pcf_master_table;
+extern PCF_MASTER_ENT *pcf_master_table;
/*
* Line-wrapping support.
diff --git a/src/smtpd/smtpd_expand.h b/src/smtpd/smtpd_expand.h
index 71d705c01..3680036a0 100644
--- a/src/smtpd/smtpd_expand.h
+++ b/src/smtpd/smtpd_expand.h
@@ -18,7 +18,7 @@
/*
* External interface.
*/
-VSTRING *smtpd_expand_filter;
+extern VSTRING *smtpd_expand_filter;
void smtpd_expand_init(void);
const char *smtpd_expand_lookup(const char *, int, void *);
int smtpd_expand(SMTPD_STATE *, VSTRING *, const char *, int);
diff --git a/src/trivial-rewrite/trivial-rewrite.h b/src/trivial-rewrite/trivial-rewrite.h
index bf0dd4a08..42016efb0 100644
--- a/src/trivial-rewrite/trivial-rewrite.h
+++ b/src/trivial-rewrite/trivial-rewrite.h
@@ -23,7 +23,7 @@
/*
* Connection management.
*/
-int server_flags;
+extern int server_flags;
/*
* rewrite.c

View File

@ -1,38 +0,0 @@
From 2df63f7b64035cf33c6c4a27ce11a496abd54d24 Mon Sep 17 00:00:00 2001
From: zhuchengliang4 <zhuchengliang4@huawei.com>
Date: Tue, 10 Dec 2019 22:15:50 +0800
Subject: [PATCH] fix postfix build faild
---
makedefs | 2 +-
src/util/sys_defs.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/makedefs b/makedefs
index 227fdd5..c575685 100644
--- a/makedefs
+++ b/makedefs
@@ -546,7 +546,7 @@ EOF
: ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"}
: ${PLUGIN_LD="${CC-gcc} -shared"}
;;
- Linux.[34].*) SYSTYPE=LINUX$RELEASE_MAJOR
+ Linux.[345].*) SYSTYPE=LINUX$RELEASE_MAJOR
case "$CCARGS" in
*-DNO_DB*) ;;
*-DHAS_DB*) ;;
diff --git a/src/util/sys_defs.h b/src/util/sys_defs.h
index b16763e..ad1bc04 100644
--- a/src/util/sys_defs.h
+++ b/src/util/sys_defs.h
@@ -748,7 +748,7 @@ extern int initgroups(const char *, int);
/*
* LINUX.
*/
-#if defined(LINUX2) || defined(LINUX3) || defined(LINUX4)
+#if defined(LINUX2) || defined(LINUX3) || defined(LINUX4) || defined(LINUX5)
#define SUPPORTED
#define UINT32_TYPE unsigned int
#define UINT16_TYPE unsigned short
--
2.19.1

View File

@ -130,8 +130,8 @@ index b67ed59..a9633ba 100644
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus unix - n n - - pipe
-# user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
+# user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
-# flags=DRX user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
+# flags=DRX user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
#
# ====================================================================
#

Binary file not shown.

View File

@ -1,14 +0,0 @@
diff --git a/src/util/sys_defs.h b/src/util/sys_defs.h
index 99bec9b..95c78ec 100644
--- a/src/util/sys_defs.h
+++ b/src/util/sys_defs.h
@@ -802,6 +803,9 @@ extern int initgroups(const char *, int);
#define _PATH_PROCNET_IFINET6 "/proc/net/if_inet6"
#endif
#endif
+#if HAVE_GLIBC_API_VERSION_SUPPORT(2, 34)
+#define HAS_CLOSEFROM
+#endif
#include <linux/version.h>
#if !defined(KERNEL_VERSION)
#define KERNEL_VERSION(a,b,c) (LINUX_VERSION_CODE + 1)

BIN
postfix-3.7.2.tar.gz Normal file

Binary file not shown.

View File

@ -22,8 +22,8 @@
Name: postfix
Summary: Postfix Mail Transport Agent
Version: 3.3.1
Release: 19
Version: 3.7.2
Release: 1
Epoch: 2
URL: http://www.postfix.org
License: (IPL-1.0 and GPLv2+) or (EPL-2.0 and GPLv2+)
@ -41,22 +41,19 @@ Patch2: postfix-3.1.0-files.patch
Patch3: postfix-3.1.0-alternatives.patch
Patch4: postfix-3.2.0-large-fs.patch
Patch5: pflogsumm-1.1.5-datecalc.patch
Patch6: pflogsumm-1.1.5-ipv6-warnings-fix.patch
Patch7: fix-postfix-build-failed.patch
Patch8: fix-build-error-with_glibc2.30-ftbfs.patch
Patch9: fix-multiple-definition-error-with-gcc-10.patch
Patch10: postfix-3.6.2-glibc-234-build-fix.patch
Patch6: pflogsumm-1.1.5-ipv6-warnings-fix.patch
Patch11: postfix-use-lmdb-by-default-instead-of-libdb.patch
Patch12: postfix-set-default_data_type-to-lmdb.patch
Patch13: backport-postfix-3.6.2-whitespace-name-fix.patch
BuildRequires: lmdb-devel perl-generators pkgconfig zlib-devel systemd-units libicu-devel libnsl2-devel gcc m4 openldap-devel
BuildRequires: cyrus-sasl-devel pcre-devel mariadb-connector-c-devel postgresql-devel sqlite-devel openssl-devel procps-ng
BuildRequires: chrpath
BuildRequires: cyrus-sasl-devel pcre2-devel mariadb-connector-c-devel postgresql-devel sqlite-devel openssl-devel procps-ng
BuildRequires: chrpath findutils
Requires(post): systemd-sysv %{_sbindir}/alternatives %{_bindir}/openssl
Requires(pre): %{_sbindir}/groupadd %{_sbindir}/useradd
Requires(preun): %{_sbindir}/alternatives
%{?systemd_requires}
Requires: diffutils
Requires: diffutils findutils
Provides: MTA smtpd smtpdaemon server(smtp)
Provides: %{name}-mysql %{name}-sqlite %{name}-ldap %{name}-pcre
@ -108,12 +105,9 @@ PostgreSQL maps with Postfix, you need this.
%patch3 -p1 -b .alternatives
%patch4 -p1 -b .large-fs
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
sed -i \
's|^\(\s*#define\s\+DEF_SHLIB_DIR\s\+\)"/usr/lib/postfix"|\1"%{_libdir}/postfix"|' \
@ -140,8 +134,8 @@ CCARGS="${CCARGS} -DHAS_LDAP -DLDAP_DEPRECATED=1 %{?with_sasl:-DUSE_LDAP_SASL}"
AUXLIBS_LDAP="-lldap -llber"
CCARGS="${CCARGS} -DHAS_LMDB"
AUXLIBS_LMDB="-llmdb"
CCARGS="${CCARGS} -DHAS_PCRE -I%{_includedir}/pcre"
AUXLIBS_PCRE="-lpcre"
CCARGS="${CCARGS} -DHAS_PCRE=2 `pcre2-config --cflags`"
AUXLIBS_PCRE="`pcre2-config --libs8`"
CCARGS="${CCARGS} -DHAS_MYSQL -I%{_includedir}/mysql"
AUXLIBS_MYSQL="-L%{_libdir}/mariadb -lmysqlclient -lm"
CCARGS="${CCARGS} -DHAS_PGSQL -I%{_includedir}/pgsql"
@ -556,6 +550,13 @@ fi
%{postfix_doc_dir}/README_FILES/*
%changelog
* Mon Jul 04 2022 gaihuiying <eaglegai@163.com> - 2:3.7.2-1
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:update postfix to 3.7.2
switch from pcre to pcre2
* Thu Mar 03 2022 gaihuiying <eaglegai@163.com> - 2:3.3.1-19
- Type:bugfix
- ID:NA