From 788afe757d88aa6f8df3d56ccd3659f0dca5e8dd Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 31 Dec 2020 02:27:25 -0800 Subject: [PATCH] postfix: update to 3.5.8 Pass TARGET_[C/LD]FLAGS to reduce filesize. Fix glibc compilation by adding lresolv. Remove uClibc-ng patch as that's now gone. Refreshed other patches. Signed-off-by: Rosen Penev --- mail/postfix/Makefile | 9 ++--- .../patches/300-bdb_hash_segfault.patch | 2 +- mail/postfix/patches/400-cdb.patch | 2 +- mail/postfix/patches/500-crosscompile.patch | 2 +- ...ookup-Fix-compilation-with-uClibc-ng.patch | 36 ------------------- 5 files changed, 8 insertions(+), 43 deletions(-) delete mode 100644 mail/postfix/patches/950-dns_lookup-Fix-compilation-with-uClibc-ng.patch diff --git a/mail/postfix/Makefile b/mail/postfix/Makefile index 744ce331d..0f044822a 100644 --- a/mail/postfix/Makefile +++ b/mail/postfix/Makefile @@ -8,14 +8,14 @@ include $(TOPDIR)/rules.mk PKG_NAME:=postfix -PKG_VERSION:=3.5.7 -PKG_RELEASE:=2 +PKG_VERSION:=3.5.8 +PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:= \ https://cdn.postfix.johnriley.me/mirrors/postfix-release/official/ \ http://ftp.porcupine.org/mirrors/postfix-release/official/ -PKG_HASH:=b7a474f14e153dc7cbf6af38419729bc5af5c3c37aecf6b327a8f962158f0961 +PKG_HASH:=22582628cf3edc18c5155c9ff44543dd95a9435fb68135d76a99f572cb07456f PKG_MAINTAINER:=Denis Shulyaka PKG_LICENSE:=IPL-1.0 @@ -179,6 +179,7 @@ else endif CCARGS+=-DDEF_DB_TYPE=\"$(default_database_type)\" +TARGET_LDFLAGS += $(if $(CONFIG_USE_GLIBC),-lresolv) # prevent postfix-install from executing postconf at build time # by explicitly providing the default values to postfix-install @@ -216,7 +217,7 @@ endef define Build/Compile # Currently postfix has a bug with Makefiles that CCARGS are not passed to the compiler, so we are copying them to CC as a workaround - cd $(PKG_BUILD_DIR); $(MAKE) $(TARGET_CONFIGURE_OPTS) CC='$(TARGET_CC) $(CCARGS)' + cd $(PKG_BUILD_DIR); $(MAKE) $(TARGET_CONFIGURE_OPTS) CC='$(TARGET_CC) $(CCARGS) $(TARGET_CFLAGS) $(TARGET_LDFLAGS)' $(foreach p, \ default_database_type config_directory command_directory daemon_directory \ shlib_directory manpage_directory data_directory queue_directory \ diff --git a/mail/postfix/patches/300-bdb_hash_segfault.patch b/mail/postfix/patches/300-bdb_hash_segfault.patch index e99157705..1ae9359fb 100644 --- a/mail/postfix/patches/300-bdb_hash_segfault.patch +++ b/mail/postfix/patches/300-bdb_hash_segfault.patch @@ -1,6 +1,6 @@ --- a/src/util/dict_db.c +++ b/src/util/dict_db.c -@@ -750,8 +750,8 @@ static DICT *dict_db_open(const char *class, const char *path, int open_flags, +@@ -750,8 +750,8 @@ static DICT *dict_db_open(const char *cl msg_fatal("create DB database: %m"); if (db == 0) msg_panic("db_create null result"); diff --git a/mail/postfix/patches/400-cdb.patch b/mail/postfix/patches/400-cdb.patch index 2b25a33e0..074d03095 100644 --- a/mail/postfix/patches/400-cdb.patch +++ b/mail/postfix/patches/400-cdb.patch @@ -1,6 +1,6 @@ --- a/src/util/sys_defs.h +++ b/src/util/sys_defs.h -@@ -760,9 +760,8 @@ extern int initgroups(const char *, int); +@@ -760,9 +760,8 @@ extern int initgroups(const char *, int) #define INTERNAL_LOCK MYFLOCK_STYLE_FLOCK #define DEF_MAILBOX_LOCK "fcntl, dotlock" /* RedHat >= 4.x */ #define HAS_FSYNC diff --git a/mail/postfix/patches/500-crosscompile.patch b/mail/postfix/patches/500-crosscompile.patch index dc1077448..c7448a3a1 100644 --- a/mail/postfix/patches/500-crosscompile.patch +++ b/mail/postfix/patches/500-crosscompile.patch @@ -9,7 +9,7 @@ RELEASE=`(uname -r) 2>/dev/null` # No ${x%%y} support in Solaris 11 /bin/sh RELEASE_MAJOR=`expr "$RELEASE" : '\([0-9]*\)'` || exit 1 -@@ -229,6 +229,15 @@ case $# in +@@ -242,6 +242,15 @@ case "$SYSTEM" in esac case "$SYSTEM.$RELEASE" in diff --git a/mail/postfix/patches/950-dns_lookup-Fix-compilation-with-uClibc-ng.patch b/mail/postfix/patches/950-dns_lookup-Fix-compilation-with-uClibc-ng.patch deleted file mode 100644 index 2bc874fc2..000000000 --- a/mail/postfix/patches/950-dns_lookup-Fix-compilation-with-uClibc-ng.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 4fe5b1f216f1643080299bdb35e07f07b9c2caae Mon Sep 17 00:00:00 2001 -From: Rosen Penev -Date: Thu, 2 May 2019 22:28:57 -0700 -Subject: [PATCH] dns_lookup: Fix compilation with uClibc-ng - -uClibc-ng does not have res_send or res_nsend. ifdef the entire function. ---- - src/dns/dns_lookup.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/src/dns/dns_lookup.c b/src/dns/dns_lookup.c -index 1ea98b3..d7771d4 100644 ---- a/src/dns/dns_lookup.c -+++ b/src/dns/dns_lookup.c -@@ -311,6 +311,10 @@ typedef struct DNS_REPLY { - static int dns_res_query(const char *name, int class, int type, - unsigned char *answer, int anslen) - { -+#ifdef __UCLIBC__ -+ msg_info("dns_res_query() is not supported under uClibc"); -+ return 0; -+#else - unsigned char msg_buf[MAX_DNS_QUERY_SIZE]; - HEADER *reply_header = (HEADER *) answer; - int len; -@@ -369,6 +373,7 @@ static int dns_res_query(const char *name, int class, int type, - } - return (len); - } -+#endif - } - - /* dns_res_search - res_search() that can return negative replies */ --- -2.17.1 -