From 1c3f44abb9f5c1a46800669f14171f63f0e0e51b Mon Sep 17 00:00:00 2001 From: Raven Date: Thu, 27 Feb 2025 10:14:28 +0600 Subject: [PATCH] dovecot: 2.3.21.1 --- extras/dovecot/dovecot-2.3-ph_optglob.patch | 48 + extras/dovecot/dovecot-2.3-ph_scriptcmp.patch | 12 + .../dovecot/dovecot-2.3.0.1-libxcrypt.patch | 11 - extras/dovecot/dovecot-2.3.21-noengine.patch | 932 ++++++++++++++++++ .../dovecot-2.3.21-test-socket-path.patch | 753 ++++++++++++++ extras/dovecot/dovecot-2.3.21.1-fixicu.patch | 13 + .../dovecot-2.3.21.1-fixtestdatastack.patch | 755 ++++++++++++++ extras/dovecot/dovecot.spec | 29 +- 8 files changed, 2535 insertions(+), 18 deletions(-) create mode 100644 extras/dovecot/dovecot-2.3-ph_optglob.patch create mode 100644 extras/dovecot/dovecot-2.3-ph_scriptcmp.patch delete mode 100644 extras/dovecot/dovecot-2.3.0.1-libxcrypt.patch create mode 100644 extras/dovecot/dovecot-2.3.21-noengine.patch create mode 100644 extras/dovecot/dovecot-2.3.21-test-socket-path.patch create mode 100644 extras/dovecot/dovecot-2.3.21.1-fixicu.patch create mode 100644 extras/dovecot/dovecot-2.3.21.1-fixtestdatastack.patch diff --git a/extras/dovecot/dovecot-2.3-ph_optglob.patch b/extras/dovecot/dovecot-2.3-ph_optglob.patch new file mode 100644 index 0000000..d31527c --- /dev/null +++ b/extras/dovecot/dovecot-2.3-ph_optglob.patch @@ -0,0 +1,48 @@ +diff -up dovecot-2.3.21/dovecot-pigeonhole/src/lib-sieve/plugins/include/cmd-include.c.ph_optglob dovecot-2.3.21/dovecot-pigeonhole/src/lib-sieve/plugins/include/cmd-include.c +--- dovecot-2.3.21/dovecot-pigeonhole/src/lib-sieve/plugins/include/cmd-include.c.ph_optglob 2024-06-04 09:11:28.514189662 +0200 ++++ dovecot-2.3.21/dovecot-pigeonhole/src/lib-sieve/plugins/include/cmd-include.c 2024-06-04 09:18:23.219809778 +0200 +@@ -368,11 +368,13 @@ static bool opc_include_dump + return FALSE; + + sieve_code_descend(denv); +- sieve_code_dumpf(denv, "script: `%s' from %s %s%s[ID: %d, BLOCK: %d]", ++ sieve_code_dumpf(denv, "script: `%s' from %s %s%s%s[ID: %d, BLOCK: %d]", + sieve_script_name(included->script), sieve_script_location(included->script), + ((flags & EXT_INCLUDE_FLAG_ONCE) != 0 ? "(once) " : ""), + ((flags & EXT_INCLUDE_FLAG_OPTIONAL) != 0 ? "(optional) " : ""), +- include_id, sieve_binary_block_get_id(included->block)); ++ (included->block == NULL ? "(missing) " : ""), ++ include_id, ++ (included->block == NULL ? -1 : sieve_binary_block_get_id(included->block))); + + return TRUE; + } +diff -up dovecot-2.3.21/dovecot-pigeonhole/src/lib-sieve/plugins/include/ext-include-common.c.ph_optglob dovecot-2.3.21/dovecot-pigeonhole/src/lib-sieve/plugins/include/ext-include-common.c +--- dovecot-2.3.21/dovecot-pigeonhole/src/lib-sieve/plugins/include/ext-include-common.c.ph_optglob 2023-09-14 15:18:26.000000000 +0200 ++++ dovecot-2.3.21/dovecot-pigeonhole/src/lib-sieve/plugins/include/ext-include-common.c 2024-06-04 09:10:45.187823805 +0200 +@@ -693,6 +693,25 @@ int ext_include_execute_include(const st + } + + ctx = ext_include_get_interpreter_context(this_ext, renv->interp); ++ if (included->block == NULL) { ++ if ((flags & EXT_INCLUDE_FLAG_OPTIONAL) != 0) { ++ sieve_runtime_trace( ++ renv, SIEVE_TRLVL_NONE, ++ "include: skipped include for script '%s' " ++ "[inc id: %d, block: NULL]; optional and unavailable", ++ sieve_script_name(included->script), ++ include_id); ++ return result; ++ } else { ++ sieve_runtime_trace( ++ renv, SIEVE_TRLVL_NONE, ++ "include: unavailable script '%s' " ++ "[inc id: %d, block: NULL]", ++ sieve_script_name(included->script), ++ include_id); ++ return SIEVE_EXEC_BIN_CORRUPT; ++ } ++ } + block_id = sieve_binary_block_get_id(included->block); + + /* If :once modifier is specified, check for duplicate include */ diff --git a/extras/dovecot/dovecot-2.3-ph_scriptcmp.patch b/extras/dovecot/dovecot-2.3-ph_scriptcmp.patch new file mode 100644 index 0000000..2bcaade --- /dev/null +++ b/extras/dovecot/dovecot-2.3-ph_scriptcmp.patch @@ -0,0 +1,12 @@ +diff -up dovecot-2.3.21/dovecot-pigeonhole/src/lib-sieve/storage/file/sieve-file-script.c.testfix4 dovecot-2.3.21/dovecot-pigeonhole/src/lib-sieve/storage/file/sieve-file-script.c +--- dovecot-2.3.21/dovecot-pigeonhole/src/lib-sieve/storage/file/sieve-file-script.c.testfix4 2024-06-03 13:35:24.408858593 +0200 ++++ dovecot-2.3.21/dovecot-pigeonhole/src/lib-sieve/storage/file/sieve-file-script.c 2024-06-03 13:35:24.434858849 +0200 +@@ -800,7 +800,7 @@ static bool sieve_file_script_equals + (struct sieve_file_script *)other; + + return ( CMP_DEV_T(fscript->st.st_dev, fother->st.st_dev) && +- fscript->st.st_ino == fother->st.st_ino ); ++ fscript->st.st_ino == fother->st.st_ino && (fscript->st.st_ino != 0 || script->location != NULL && other->location != NULL && strcmp(script->location, other->location) == 0)); + } + + /* diff --git a/extras/dovecot/dovecot-2.3.0.1-libxcrypt.patch b/extras/dovecot/dovecot-2.3.0.1-libxcrypt.patch deleted file mode 100644 index a8c33bf..0000000 --- a/extras/dovecot/dovecot-2.3.0.1-libxcrypt.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up dovecot-2.3.0.1/src/auth/mycrypt.c.libxcrypt dovecot-2.3.0.1/src/auth/mycrypt.c ---- dovecot-2.3.0.1/src/auth/mycrypt.c.libxcrypt 2018-02-28 15:28:58.000000000 +0100 -+++ dovecot-2.3.0.1/src/auth/mycrypt.c 2018-03-27 10:57:38.447769201 +0200 -@@ -14,6 +14,7 @@ - # define _XPG6 /* Some Solaris versions require this, some break with this */ - #endif - #include -+#include - - #include "mycrypt.h" - diff --git a/extras/dovecot/dovecot-2.3.21-noengine.patch b/extras/dovecot/dovecot-2.3.21-noengine.patch new file mode 100644 index 0000000..65f3779 --- /dev/null +++ b/extras/dovecot/dovecot-2.3.21-noengine.patch @@ -0,0 +1,932 @@ + + + + + + Tree - rpms/dovecot - src.fedoraproject.org + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+
+
+
+

+

+
+
+

+rpms / dovecot +

+
+
+
+
+
+
+ + + Clone + + + +
+
+
+
+ + +
+
+ +
+ +
+
+
+
+ + +
+
+ +
+ +
+
+
+ + +
+ + Blob + + Blame + + History + + Raw +
+ +
diff -up dovecot-2.3.21/m4/ssl.m4.noengine dovecot-2.3.21/m4/ssl.m4
+--- dovecot-2.3.21/m4/ssl.m4.noengine	2024-05-06 17:39:59.362886891 +0200
++++ dovecot-2.3.21/m4/ssl.m4	2024-05-06 17:42:17.945312656 +0200
+@@ -233,6 +233,27 @@ AC_DEFUN([DOVECOT_SSL], [
+       AC_CHECK_LIB(ssl, ECDSA_SIG_set0, [
+         AC_DEFINE(HAVE_ECDSA_SIG_SET0,, [Build with ECDSA_SIG_set0 support])
+       ],, $SSL_LIBS)
++      AC_CHECK_LIB(ssl, OSSL_PROVIDER_try_load, [
++        AC_DEFINE(HAVE_OSSL_PROVIDER_try_load,, [Build with OSSL_PROVIDER_try_load support])
++      ],, $SSL_LIBS)
++      AC_CHECK_LIB(ssl, OPENSSL_init_ssl, [
++        AC_DEFINE(HAVE_OPENSSL_init_ssl,, [Build with OPENSSL_init_ssl support])
++      ],, $SSL_LIBS)
++      AC_CHECK_LIB(ssl, OPENSSL_cleanup, [
++        AC_DEFINE(HAVE_OPENSSL_cleanup,, [OpenSSL supports OPENSSL_cleanup()])
++      ],, $SSL_LIBS)
++      AC_CHECK_LIB(ssl, OPENSSL_thread_stop, [
++        AC_DEFINE(HAVE_OPENSSL_thread_stop,, [OpenSSL supports OPENSSL_thread_stop()])
++      ],, $SSL_LIBS)
++      AC_CHECK_LIB(ssl, ERR_remove_thread_state, [
++        AC_DEFINE(HAVE_ERR_remove_thread_state,, [OpenSSL supports ERR_remove_thread_state()])
++      ],, $SSL_LIBS)
++      AC_CHECK_LIB(ssl, ERR_remove_state, [
++        AC_DEFINE(HAVE_ERR_remove_state,, [OpenSSL supports ERR_remove_state()])
++      ],, $SSL_LIBS)
++      AC_CHECK_LIB(ssl, ENGINE_by_id_DISABLED, [
++        AC_DEFINE(HAVE_ENGINE_by_id,, [OpenSSL supports ENGINE_by_id() - !!!EXPLICITELY DISABLED!!! ])
++      ],, $SSL_LIBS)
+       AC_CHECK_LIB(ssl, EC_GROUP_order_bits, [
+         AC_DEFINE(HAVE_EC_GROUP_order_bits,, [Build with EC_GROUP_order_bits support])
+       ],, $SSL_LIBS)
+diff --git dovecot-2.3.21/src/lib-dcrypt/dcrypt-openssl.c.noengine dovecot-2.3.21/src/lib-dcrypt/dcrypt-openssl.c
+index 1cbe352541..239a981251 100644
+--- dovecot-2.3.21/src/lib-dcrypt/dcrypt-openssl.c.noengine
++++ dovecot-2.3.21/src/lib-dcrypt/dcrypt-openssl.c
+@@ -20,7 +20,6 @@
+ #include <openssl/bio.h>
+ #include <openssl/pem.h>
+ #include <openssl/x509.h>
+-#include <openssl/engine.h>
+ #include <openssl/hmac.h>
+ #include <openssl/objects.h>
+ #include <openssl/bn.h>
+diff -up dovecot-2.3.21/src/lib-ssl-iostream/dovecot-openssl-common.c.noengine dovecot-2.3.21/src/lib-ssl-iostream/dovecot-openssl-common.c
+--- dovecot-2.3.21/src/lib-ssl-iostream/dovecot-openssl-common.c.noengine	2023-09-14 15:17:46.000000000 +0200
++++ dovecot-2.3.21/src/lib-ssl-iostream/dovecot-openssl-common.c	2024-05-06 17:39:59.363886901 +0200
+@@ -3,13 +3,23 @@
+ #include "lib.h"
+ #include "randgen.h"
+ #include "dovecot-openssl-common.h"
++#include "iostream-openssl.h"
+ 
+ #include <openssl/ssl.h>
+-#include <openssl/engine.h>
++#include <openssl/err.h>
++#ifdef HAVE_OSSL_PROVIDER_try_load
++#  include <openssl/provider.h>
++#else
++#  include <openssl/engine.h>
++#endif
+ #include <openssl/rand.h>
+ 
+ static int openssl_init_refcount = 0;
+-static ENGINE *dovecot_openssl_engine;
++#ifdef HAVE_OSSL_PROVIDER_try_load
++static OSSL_PROVIDER *dovecot_openssl_engine = NULL;
++#else
++static ENGINE *dovecot_openssl_engine = NULL;
++#endif
+ 
+ #ifdef HAVE_SSL_NEW_MEM_FUNCS
+ static void *dovecot_openssl_malloc(size_t size, const char *u0 ATTR_UNUSED, int u1 ATTR_UNUSED)
+@@ -17,12 +27,14 @@ static void *dovecot_openssl_malloc(size
+ static void *dovecot_openssl_malloc(size_t size)
+ #endif
+ {
++	if (size == 0)
++		return NULL;
+ 	/* this may be performance critical, so don't use
+ 	   i_malloc() or calloc() */
+ 	void *mem = malloc(size);
+-	if (mem == NULL) {
++	if (unlikely(mem == NULL)) {
+ 		i_fatal_status(FATAL_OUTOFMEM,
+-			"OpenSSL: malloc(%zu): Out of memory", size);
++			       "OpenSSL: malloc(%zu): Out of memory", size);
+ 	}
+ 	return mem;
+ }
+@@ -33,10 +45,14 @@ static void *dovecot_openssl_realloc(voi
+ static void *dovecot_openssl_realloc(void *ptr, size_t size)
+ #endif
+ {
++	if (size == 0) {
++		free(ptr);
++		return NULL;
++	}
+ 	void *mem = realloc(ptr, size);
+-	if (mem == NULL) {
++	if (unlikely(mem == NULL)) {
+ 		i_fatal_status(FATAL_OUTOFMEM,
+-			"OpenSSL: realloc(%zu): Out of memory", size);
++			       "OpenSSL: realloc(%zu): Out of memory", size);
+ 	}
+ 	return mem;
+ }
+@@ -63,9 +79,13 @@ void dovecot_openssl_common_global_ref(v
+ 		/*i_warning("CRYPTO_set_mem_functions() was called too late");*/
+ 	}
+ 
++#ifdef HAVE_OPENSSL_init_ssl
++	OPENSSL_init_ssl(0, NULL);
++#else
+ 	SSL_library_init();
+ 	SSL_load_error_strings();
+ 	OpenSSL_add_all_algorithms();
++#endif
+ }
+ 
+ bool dovecot_openssl_common_global_unref(void)
+@@ -76,30 +96,35 @@ bool dovecot_openssl_common_global_unref
+ 		return TRUE;
+ 
+ 	if (dovecot_openssl_engine != NULL) {
++#ifdef HAVE_OSSL_PROVIDER_try_load
++		OSSL_PROVIDER_unload(dovecot_openssl_engine);
++#else
+ 		ENGINE_finish(dovecot_openssl_engine);
++#endif
+ 		dovecot_openssl_engine = NULL;
+ 	}
++#ifdef HAVE_OPENSSL_cleanup
++	OPENSSL_cleanup();
++#else
+ 	/* OBJ_cleanup() is called automatically by EVP_cleanup() in
+ 	   newer versions. Doesn't hurt to call it anyway. */
+ 	OBJ_cleanup();
+-#ifdef HAVE_SSL_COMP_FREE_COMPRESSION_METHODS
++#  if !defined(OPENSSL_NO_COMP)
+ 	SSL_COMP_free_compression_methods();
+-#endif
++#  endif
+ 	ENGINE_cleanup();
+ 	EVP_cleanup();
+ 	CRYPTO_cleanup_all_ex_data();
+-#ifdef HAVE_OPENSSL_AUTO_THREAD_DEINIT
++#  ifdef HAVE_OPENSSL_thread_stop
+ 	/* no cleanup needed */
+-#elif defined(HAVE_OPENSSL_ERR_REMOVE_THREAD_STATE)
++#  elif defined(HAVE_ERR_remove_thread_state)
+ 	/* This was marked as deprecated in v1.1. */
+ 	ERR_remove_thread_state(NULL);
+-#else
++#  elif defined(HAVE_ERR_remove_state)
+ 	/* This was deprecated by ERR_remove_thread_state(NULL) in v1.0.0. */
+ 	ERR_remove_state(0);
+-#endif
++#  endif
+ 	ERR_free_strings();
+-#ifdef HAVE_OPENSSL_CLEANUP
+-	OPENSSL_cleanup();
+ #endif
+ 	return FALSE;
+ }
+@@ -110,6 +135,7 @@ int dovecot_openssl_common_global_set_en
+ 	if (dovecot_openssl_engine != NULL)
+ 		return 1;
+ 
++#ifdef HAVE_ENGINE_by_id
+ 	ENGINE_load_builtin_engines();
+ 	dovecot_openssl_engine = ENGINE_by_id(engine);
+ 	if (dovecot_openssl_engine == NULL) {
+@@ -128,5 +154,15 @@ int dovecot_openssl_common_global_set_en
+ 		dovecot_openssl_engine = NULL;
+ 		return -1;
+ 	}
++#elif defined(HAVE_OSSL_PROVIDER_try_load)
++	if ((dovecot_openssl_engine = OSSL_PROVIDER_try_load(NULL, engine, 1)) == NULL) {
++		*error_r = t_strdup_printf("Cannot load '%s': %s", engine,
++					   openssl_iostream_error());
++		return 0;
++	}
++	return 1;
++#else
++	*error_r = t_strdup_printf("Cannot load '%s': No engine/provider support available", engine);
++#endif
+ 	return 1;
+ }
+diff -up dovecot-2.3.21/src/lib-ssl-iostream/Makefile.am.noengine dovecot-2.3.21/src/lib-ssl-iostream/Makefile.am
+--- dovecot-2.3.21/src/lib-ssl-iostream/Makefile.am.noengine	2023-09-14 15:17:46.000000000 +0200
++++ dovecot-2.3.21/src/lib-ssl-iostream/Makefile.am	2024-05-06 17:39:59.363886901 +0200
+@@ -5,7 +5,8 @@ NOPLUGIN_LDFLAGS =
+ AM_CPPFLAGS = \
+ 	-I$(top_srcdir)/src/lib \
+ 	-I$(top_srcdir)/src/lib-test \
+-	-DMODULE_DIR=\""$(moduledir)"\"
++	-DMODULE_DIR=\""$(moduledir)"\" \
++	$(SSL_CFLAGS)
+ 
+ if BUILD_OPENSSL
+ module_LTLIBRARIES = libssl_iostream_openssl.la
+
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/extras/dovecot/dovecot-2.3.21-test-socket-path.patch b/extras/dovecot/dovecot-2.3.21-test-socket-path.patch new file mode 100644 index 0000000..554bf0a --- /dev/null +++ b/extras/dovecot/dovecot-2.3.21-test-socket-path.patch @@ -0,0 +1,753 @@ + + + + + + Tree - rpms/dovecot - src.fedoraproject.org + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+
+
+
+

+

+
+
+

+rpms / dovecot +

+
+
+
+
+
+
+ + + Clone + + + +
+
+
+
+ + +
+
+ +
+ +
+
+
+
+ + +
+
+ +
+ +
+
+
+ + +
+ + Blob + + Blame + + History + + Raw +
+ +
From 9a3e0d099044d3a7478c3a24ccb8990181767f7c Mon Sep 17 00:00:00 2001
+From: Duncan Bellamy <dunk@denkimushi.com>
+Date: Sat, 6 Mar 2021 14:25:29 +0000
+Subject: [PATCH] imap: Shorten test-imap-client-hibernate socket path length
+
+---
+ src/imap/test-imap-client-hibernate.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/imap/test-imap-client-hibernate.c b/src/imap/test-imap-client-hibernate.c
+index 9b90e1bd9a..c5392fa3fc 100644
+--- a/src/imap/test-imap-client-hibernate.c
++++ b/src/imap/test-imap-client-hibernate.c
+@@ -19,7 +19,7 @@
+ 
+ #include <sys/stat.h>
+ 
+-#define TEMP_DIRNAME ".test-imap-client-hibernate"
++#define TEMP_DIRNAME ".test-ich"
+ 
+ #define EVILSTR "\t\r\n\001"
+ 
+
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/extras/dovecot/dovecot-2.3.21.1-fixicu.patch b/extras/dovecot/dovecot-2.3.21.1-fixicu.patch new file mode 100644 index 0000000..19f0658 --- /dev/null +++ b/extras/dovecot/dovecot-2.3.21.1-fixicu.patch @@ -0,0 +1,13 @@ +diff -up dovecot-2.3.20/m4/want_icu.m4.fixicu dovecot-2.3.20/m4/want_icu.m4 +--- dovecot-2.3.20/m4/want_icu.m4.fixicu 2022-12-21 09:49:12.000000000 +0100 ++++ dovecot-2.3.20/m4/want_icu.m4 2025-01-29 10:47:25.765768562 +0100 +@@ -1,7 +1,7 @@ + AC_DEFUN([DOVECOT_WANT_ICU], [ + if test "$want_icu" != "no"; then +- if test "$PKG_CONFIG" != "" && $PKG_CONFIG --exists icu-i18n 2>/dev/null; then +- PKG_CHECK_MODULES(LIBICU, icu-i18n) ++ if test "$PKG_CONFIG" != "" && $PKG_CONFIG --exists icu-i18n icu-uc 2>/dev/null; then ++ PKG_CHECK_MODULES(LIBICU, icu-i18n icu-uc) + have_icu=yes + AC_DEFINE(HAVE_LIBICU,, [Define if you want ICU normalization support for FTS]) + elif test "$want_icu" = "yes"; then diff --git a/extras/dovecot/dovecot-2.3.21.1-fixtestdatastack.patch b/extras/dovecot/dovecot-2.3.21.1-fixtestdatastack.patch new file mode 100644 index 0000000..299c73d --- /dev/null +++ b/extras/dovecot/dovecot-2.3.21.1-fixtestdatastack.patch @@ -0,0 +1,755 @@ + + + + + + Tree - rpms/dovecot - src.fedoraproject.org + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+
+
+
+

+

+
+
+

+rpms / dovecot +

+
+
+
+
+
+
+ + + Clone + + + +
+
+
+
+ + +
+
+ +
+ +
+
+
+
+ + +
+
+ +
+ +
+
+
+ + +
+ + Blob + + Blame + + History + + Raw +
+ +
diff --git a/src/lib/test-data-stack.c b/src/lib/test-data-stack.c
+index 3c33597685..03f97b4a50 100644
+--- a/src/lib/test-data-stack.c
++++ b/src/lib/test-data-stack.c
+@@ -98,9 +98,9 @@ static void test_ds_get_bytes_available(void)
+ 			if (i > 0)
+ 				t_malloc_no0(i);
+ 			avail1 = t_get_bytes_available();
+-			t_malloc_no0(avail1);
++			(void)t_malloc_no0(avail1);
+ 			test_assert_idx(t_get_bytes_available() == 0, i);
+-			t_malloc_no0(1);
++			(void)t_malloc_no0(1);
+ 			test_assert_idx(t_get_bytes_available() > 0, i);
+ 		} T_END;
+ 		T_BEGIN {
+@@ -188,7 +188,6 @@ static void test_ds_buffers(void)
+ 		void *b = t_buffer_get(1000);
+ 		void *a = t_malloc_no0(1);
+ 		void *b2 = t_buffer_get(1001);
+-		test_assert(a == b); /* expected, not guaranteed */
+ 		test_assert(b2 != b);
+ 	} T_END;
+ 	test_end();
+
+
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/extras/dovecot/dovecot.spec b/extras/dovecot/dovecot.spec index 93af492..74b0852 100644 --- a/extras/dovecot/dovecot.spec +++ b/extras/dovecot/dovecot.spec @@ -3,11 +3,13 @@ Summary: Secure imap and pop3 server Name: dovecot Epoch: 1 + + +%global pigeonholever 0.5.21.1 %global major 2.3 -%global minor 21 -Version: %{major}.%{minor} +Version: %{major}.21.1 #global prever .rc1 -Release: 3%{?dist} +Release: 1%{?dist} #dovecot itself is MIT, a few sources are PD, pigeonhole is LGPLv2 License: MIT and LGPLv2 Group: System Environment/Daemons @@ -19,7 +21,7 @@ Source: http://www.dovecot.org/releases/%{major}/dovecot-%{version}%{?prever}.ta #global ce -ce Source1: dovecot.init Source2: dovecot.pam -%global pigeonholever 0.5.21 + Source8: http://pigeonhole.dovecot.org/releases/%{major}/dovecot-%{major}-pigeonhole-%{pigeonholever}.tar.gz Source9: dovecot.sysconfig Source10: dovecot.tmpfilesd @@ -40,7 +42,6 @@ Patch6: dovecot-2.1.10-waitonline.patch Patch8: dovecot-2.2.20-initbysystemd.patch Patch9: dovecot-2.2.22-systemd_w_protectsystem.patch -Patch10: dovecot-2.3.0.1-libxcrypt.patch Patch15: dovecot-2.3.11-bigkey.patch # do not use own implementation of HMAC, use OpenSSL for certification purposes @@ -58,6 +59,9 @@ Patch22: dovecot-configure-c99.patch # Fedora/RHEL specific, drop OTP which uses SHA1 so we dont use SHA1 for crypto purposes Patch23: dovecot-2.3.20-nolibotp.patch +Patch24: dovecot-2.3-ph_optglob.patch +Patch25: dovecot-2.3-ph_scriptcmp.patch +Patch28: dovecot-2.3.21.1-fixicu.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -70,6 +74,8 @@ BuildRequires: openldap-devel BuildRequires: krb5-devel BuildRequires: zlib-devel, bzip2-devel, libzstd-devel, xz-devel, lzo-devel, lz4-devel BuildRequires: pkgconfig(icu-i18n) +BuildRequires: pkgconfig(icu-uc) +BuildRequires: libunwind-devel %if 0%{?rhel} < 8 BuildRequires: tcp_wrappers-devel glibc-headers @@ -193,17 +199,18 @@ mv dovecot-2.3-pigeonhole-%{pigeonholever} dovecot-pigeonhole %patch2 -p1 -b .mkcert-permissions %patch3 -p1 -b .mkcert-paths %patch6 -p1 -b .waitonline - %patch8 -p1 -b .initbysystemd %patch9 -p1 -b .systemd_w_protectsystem %patch15 -p1 -b .bigkey - %patch17 -p1 -b .fixvalcond %patch18 -p1 -b .valbasherr %patch20 -p1 -b .opensslv3 %patch21 -p1 -b .7bad6a24 %patch22 -p1 -b .c99 %patch23 -p1 -b .nolibotp +%patch24 -p1 -b .ph_optglob +%patch25 -p1 -b .ph_scriptcmp +%patch28 -p1 -b .fixicu cp run-test-valgrind.supp dovecot-pigeonhole/ # valgrind would fail with shell wrapper @@ -223,6 +230,10 @@ sed -i '/DEFAULT_INCLUDES *=/s|$| '"$(pkg-config --cflags libclucene-core)|" src #export LDFLAGS="-L%{_libdir}/pgsql -Wl,-rpath=%{_libdir}/pgsql -lpq $LDFLAGS" %endif +%if 0%{?rhel} >= 8 +export LDFLAGS="$LDFLAGS -licuuc" +%endif + #required for fdpass.c line 125,190: dereferencing type-punned pointer will break strict-aliasing rules export CFLAGS="$RPM_OPT_FLAGS $CFLAGS -fno-strict-aliasing" %configure \ @@ -605,6 +616,10 @@ make check %{_libdir}/dovecot/auth/libauthdb_lua.so %changelog +* Thu Jan 30 2025 Raven - 1:2.3.21.1-1 +- Dovecot to 2.3.21.1 +- Import upstream patches + * Wed Feb 21 2024 Raven - 1:2.3.21-3 - add extra compression support