postfix: update to 3.5.8 14384/head
authorRosen Penev <rosenp@gmail.com>
Thu, 31 Dec 2020 10:27:25 +0000 (02:27 -0800)
committerRosen Penev <rosenp@gmail.com>
Thu, 31 Dec 2020 10:29:46 +0000 (02:29 -0800)
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 <rosenp@gmail.com>
mail/postfix/Makefile
mail/postfix/patches/300-bdb_hash_segfault.patch
mail/postfix/patches/400-cdb.patch
mail/postfix/patches/500-crosscompile.patch
mail/postfix/patches/950-dns_lookup-Fix-compilation-with-uClibc-ng.patch [deleted file]

index 744ce331d4b68e926e34b2f46fdcc4aecf30ad94..0f044822a2fe0dbf6e1f118a764848bf45f3d0e0 100644 (file)
@@ -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 <Shulyaka@gmail.com>
 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 \
index e991577054da98b956c9e0ad1523c5449cb88500..1ae9359fbbeb21ac8c7a31fd57dd514eae83f850 100644 (file)
@@ -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");
index 2b25a33e01fb71f548104a7d70472bb05998bf57..074d03095de80e7a39ff48f7e185a85d1d722156 100644 (file)
@@ -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
index dc10774487c1a0d2a87341a1b9f5cd88e8584e50..c7448a3a1a3b7a36737eaa780bd1a63aec52447e 100644 (file)
@@ -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 (file)
index 2bc874f..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-From 4fe5b1f216f1643080299bdb35e07f07b9c2caae Mon Sep 17 00:00:00 2001
-From: Rosen Penev <rosenp@gmail.com>
-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
-