From 7479e3b1d89ba1422d311515e72b5fa74825d411 Mon Sep 17 00:00:00 2001 From: lyn1001 Date: Wed, 27 May 2020 16:12:34 +0800 Subject: [PATCH 1/3] Add yaml file and Fix building with GCC9 --- 0001-Fix-building-with-GCC9.patch | 48 +++++++++++++++++++++++++++++++ dovecot.spec | 6 +++- dovecot.yaml | 4 +++ 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-building-with-GCC9.patch create mode 100644 dovecot.yaml diff --git a/0001-Fix-building-with-GCC9.patch b/0001-Fix-building-with-GCC9.patch new file mode 100644 index 0000000..818e58d --- /dev/null +++ b/0001-Fix-building-with-GCC9.patch @@ -0,0 +1,48 @@ +From cddc8f4bc21e2fc92b2570d24129d1c0bacd1cce Mon Sep 17 00:00:00 2001 +From: lyn1001 +Date: Wed, 27 May 2020 14:50:08 +0800 +Subject: [PATCH] Fix building with GCC9 + +--- + dovecot-2.3.3/src/lib-smtp/smtp-address.c | 10 ++++++++++ + dovecot-2.3.3/src/lib-smtp/smtp-address.h | 3 +-- + 2 files changed, 11 insertions(+), 2 deletions(-) + +diff --git a/src/lib-smtp/smtp-address.c b/src/lib-smtp/smtp-address.c +index bb31d34..9bb5313 100644 +--- a/src/lib-smtp/smtp-address.c ++++ b/src/lib-smtp/smtp-address.c +@@ -297,6 +297,16 @@ smtp_parse_username(struct smtp_address_parser *aparser) + return ret; + } + ++struct smtp_address *SMTP_ADDRESS_LITERAL(const char *localpart,const char *domain) ++{ ++ static struct smtp_address sa; ++ ++ sa.localpart = localpart; ++ sa.domain = domain; ++ ++ return &sa; ++} ++ + int smtp_address_parse_mailbox(pool_t pool, + const char *mailbox, enum smtp_address_parse_flags flags, + struct smtp_address **address_r, const char **error_r) +diff --git a/src/lib-smtp/smtp-address.h b/src/lib-smtp/smtp-address.h +index 2556e4f..8828e01 100644 +--- a/src/lib-smtp/smtp-address.h ++++ b/src/lib-smtp/smtp-address.h +@@ -25,8 +25,7 @@ ARRAY_DEFINE_TYPE(smtp_address, struct smtp_address *); + ARRAY_DEFINE_TYPE(smtp_address_const, const struct smtp_address *); + + /* Not const! Never return this as a result directly! */ +-#define SMTP_ADDRESS_LITERAL(localpart, domain) \ +- &((struct smtp_address){ (localpart), (domain) }) ++struct smtp_address *SMTP_ADDRESS_LITERAL(const char *localpart,const char *domain); + + /* + * SMTP address parsing +-- +2.23.0 + diff --git a/dovecot.spec b/dovecot.spec index 2720448..29e22b8 100644 --- a/dovecot.spec +++ b/dovecot.spec @@ -6,7 +6,7 @@ Name: dovecot Version: 2.3.3 -Release: 5 +Release: 6 Summary: Dovecot Secure imap server License: MIT and LGPLv2 URL: http://www.dovecot.org/ @@ -19,6 +19,7 @@ Source9: dovecot.sysconfig Source10: dovecot.tmpfilesd Patch0001: dovecot-2.3.0.1-libxcrypt.patch +Patch0002: 0001-Fix-building-with-GCC9.patch Patch6000: CVE-2019-7524.patch Patch6001: CVE-2019-3814-1.patch Patch6002: CVE-2019-3814-2.patch @@ -280,6 +281,9 @@ make check %changelog +* Thu May 21 2020 yanan li - 2.3.3-6 +- Fix building with GCC9. + * Sun Mar 16 2020 gulining - 2.3.3-5 - Type:cves - ID:CVE-2015-3420 CVE-2016-8652 diff --git a/dovecot.yaml b/dovecot.yaml new file mode 100644 index 0000000..5c00661 --- /dev/null +++ b/dovecot.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: dovecot/core +tag_prefix: ^ +seperator: . -- Gitee From 168f0ab3fa08d003d1ee1bc75d3065156fda204c Mon Sep 17 00:00:00 2001 From: lyn1001 Date: Wed, 27 May 2020 16:42:07 +0800 Subject: [PATCH 2/3] Add yaml file and Fix building with GCC9 --- 0001-Fix-building-with-GCC9.patch => Fix-building-with-GCC9.patch | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename 0001-Fix-building-with-GCC9.patch => Fix-building-with-GCC9.patch (100%) diff --git a/0001-Fix-building-with-GCC9.patch b/Fix-building-with-GCC9.patch similarity index 100% rename from 0001-Fix-building-with-GCC9.patch rename to Fix-building-with-GCC9.patch -- Gitee From dd0595442aabffd26e074edc6435258f023c5ce3 Mon Sep 17 00:00:00 2001 From: lyn1001 Date: Wed, 27 May 2020 16:43:49 +0800 Subject: [PATCH 3/3] Add yaml file and Fix building with GCC9 --- dovecot.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dovecot.spec b/dovecot.spec index 29e22b8..bbf85c0 100644 --- a/dovecot.spec +++ b/dovecot.spec @@ -19,7 +19,7 @@ Source9: dovecot.sysconfig Source10: dovecot.tmpfilesd Patch0001: dovecot-2.3.0.1-libxcrypt.patch -Patch0002: 0001-Fix-building-with-GCC9.patch +Patch0002: Fix-building-with-GCC9.patch Patch6000: CVE-2019-7524.patch Patch6001: CVE-2019-3814-1.patch Patch6002: CVE-2019-3814-2.patch -- Gitee