From 9c046033c120f2a5f68e78b1e581150fdf45ae05 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Fri, 4 Jul 2025 15:20:34 +0200 Subject: [PATCH] dovecot: update to 2.4.1r4. --- common/shlibs | 1 + ...plugin-lucene => dovecot-plugin-flatcurve} | 0 srcpkgs/dovecot/INSTALL | 9 ---- srcpkgs/dovecot/INSTALL.msg | 6 --- srcpkgs/dovecot/patches/musl.patch | 13 ++++++ srcpkgs/dovecot/patches/openssl3.patch | 45 ------------------ srcpkgs/dovecot/template | 46 +++++++++---------- 7 files changed, 36 insertions(+), 84 deletions(-) rename srcpkgs/{dovecot-plugin-lucene => dovecot-plugin-flatcurve} (100%) delete mode 100644 srcpkgs/dovecot/INSTALL delete mode 100644 srcpkgs/dovecot/INSTALL.msg create mode 100644 srcpkgs/dovecot/patches/musl.patch delete mode 100644 srcpkgs/dovecot/patches/openssl3.patch diff --git a/common/shlibs b/common/shlibs index 67d38af4163..c3cb904b1a1 100644 --- a/common/shlibs +++ b/common/shlibs @@ -1572,6 +1572,7 @@ libdovecot-compression.so.0 dovecot-2.3.13_3 libdovecot-sql.so.0 dovecot-2.3.13_3 libdovecot-storage.so.0 dovecot-2.3.13_3 libdovecot-lda.so.0 dovecot-2.3.13_3 +libdovecot-ldap.so.0 dovecot-plugin-ldap-2.4.1r4_1 libKPim6AkonadiContactCore.so.6 akonadi-contacts-24.02.0_1 libKPim6AkonadiContactWidgets.so.6 akonadi-contacts-24.02.0_1 libKPim6AkonadiMime.so.6 akonadi-mime-24.02.0_1 diff --git a/srcpkgs/dovecot-plugin-lucene b/srcpkgs/dovecot-plugin-flatcurve similarity index 100% rename from srcpkgs/dovecot-plugin-lucene rename to srcpkgs/dovecot-plugin-flatcurve diff --git a/srcpkgs/dovecot/INSTALL b/srcpkgs/dovecot/INSTALL deleted file mode 100644 index 3c5ade70de6..00000000000 --- a/srcpkgs/dovecot/INSTALL +++ /dev/null @@ -1,9 +0,0 @@ -case "${ACTION}" in -post) - if [ -f etc/ssl/private/dovecot.pem -a -f etc/ssl/certs/dovecot.pem ]; then - exit 0 - fi - echo "Creating self-signed certificate..." - usr/bin/dovecot-mkcert.sh - ;; -esac diff --git a/srcpkgs/dovecot/INSTALL.msg b/srcpkgs/dovecot/INSTALL.msg deleted file mode 100644 index 2dc5444d4df..00000000000 --- a/srcpkgs/dovecot/INSTALL.msg +++ /dev/null @@ -1,6 +0,0 @@ -A self-signed certificate for SSL has been created automatically, but -this should be created again with proper settings in dovecot-openssl.cnf: - - $ rm -f /etc/ssl/{certs,private}/dovecot.pem - $ [edit /etc/ssl/dovecot-openssl.cnf] - $ /usr/bin/dovecot-mkcert.sh diff --git a/srcpkgs/dovecot/patches/musl.patch b/srcpkgs/dovecot/patches/musl.patch new file mode 100644 index 00000000000..55414f0cba2 --- /dev/null +++ b/srcpkgs/dovecot/patches/musl.patch @@ -0,0 +1,13 @@ +--- a/src/lib/cpu-count.c ++++ b/src/lib/cpu-count.c +@@ -1,8 +1,9 @@ ++#define _GNU_SOURCE ++ + #include "lib.h" + #include "cpu-count.h" + + #ifdef HAVE_SCHED_H +-# define __USE_GNU + # include + # ifdef HAVE_SYS_CPUSET_H + # include diff --git a/srcpkgs/dovecot/patches/openssl3.patch b/srcpkgs/dovecot/patches/openssl3.patch deleted file mode 100644 index 8f39a7ddfe2..00000000000 --- a/srcpkgs/dovecot/patches/openssl3.patch +++ /dev/null @@ -1,45 +0,0 @@ -From: =?utf-8?q?Christian_G=C3=B6ttsche?= -Date: Wed, 11 May 2022 20:27:53 +0200 -Author: Michal Hlavinka -Origin: https://bugzilla.redhat.com/show_bug.cgi?id=1962035 -Subject: Support openssl 3.0 - ---- - src/lib-dcrypt/dcrypt-openssl.c | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) - -diff --git a/src/lib-dcrypt/dcrypt-openssl.c b/src/lib-dcrypt/dcrypt-openssl.c -index 1cbe352..5570d62 100644 ---- a/src/lib-dcrypt/dcrypt-openssl.c -+++ b/src/lib-dcrypt/dcrypt-openssl.c -@@ -73,10 +73,30 @@ - 2key algo oid1symmetric algo namesalthash algoroundsE(RSA = i2d_PrivateKey, EC=Private Point)key id - **/ - -+#if OPENSSL_VERSION_MAJOR == 3 -+static EC_KEY *EVP_PKEY_get0_EC_KEYv3(EVP_PKEY *key) -+{ -+ EC_KEY *eck = EVP_PKEY_get1_EC_KEY(key); -+ EVP_PKEY_set1_EC_KEY(key, eck); -+ EC_KEY_free(eck); -+ return eck; -+} -+ -+static EC_KEY *EVP_PKEY_get1_EC_KEYv3(EVP_PKEY *key) -+{ -+ EC_KEY *eck = EVP_PKEY_get1_EC_KEY(key); -+ EVP_PKEY_set1_EC_KEY(key, eck); -+ return eck; -+} -+ -+#define EVP_PKEY_get0_EC_KEY EVP_PKEY_get0_EC_KEYv3 -+#define EVP_PKEY_get1_EC_KEY EVP_PKEY_get1_EC_KEYv3 -+#else - #ifndef HAVE_EVP_PKEY_get0 - #define EVP_PKEY_get0_EC_KEY(x) x->pkey.ec - #define EVP_PKEY_get0_RSA(x) x->pkey.rsa - #endif -+#endif - - #ifndef HAVE_OBJ_LENGTH - #define OBJ_length(o) ((o)->length) diff --git a/srcpkgs/dovecot/template b/srcpkgs/dovecot/template index 811cc543434..107eb73f7d2 100644 --- a/srcpkgs/dovecot/template +++ b/srcpkgs/dovecot/template @@ -1,25 +1,25 @@ # Template file for 'dovecot' # revbump dovecot-plugin-pigeonhole when updating dovecot! pkgname=dovecot -version=2.3.21.1 +version=2.4.1r4 revision=1 build_style=gnu-configure configure_args="--with-moduledir=/usr/lib/dovecot/modules --with-sql=plugin - --disable-static --with-pam --with-mysql --with-pgsql --with-lucene + --disable-static --with-pam --with-mysql --with-pgsql --with-sqlite --with-ssl=openssl --with-ssldir=/etc/dovecot/ssl - --with-gssapi --with-ldap=plugin --with-zlib --with-bzlib --with-lzma - --with-lz4 --with-libcap --with-solr --with-docs --sbindir=/usr/bin" -hostmakedepends="pkg-config perl" + --with-gssapi --with-ldap=plugin --with-bzlib --with-lz4 --with-libcap + --with-stemmer --with-solr --with-flatcurve --sbindir=/usr/bin" +hostmakedepends="pkg-config perl libmariadbclient-devel" makedepends=" liblz4-devel zlib-devel bzip2-devel liblzma-devel openssl-devel mit-krb5-devel libmariadbclient-devel postgresql-libs-devel sqlite-devel - clucene-devel libldap-devel libcap-devel pam-devel libcurl-devel expat-devel - libsodium-devel" + libldap-devel libcap-devel pam-devel libcurl-devel expat-devel + libsodium-devel xapian-core-devel libstemmer-devel" short_desc="IMAP and POP3 server written with security primarily in mind" maintainer="Leah Neukirchen " license="LGPL-2.1-or-later" homepage="https://dovecot.org/" -distfiles="${homepage}/releases/2.3/${pkgname}-${version}.tar.gz" -checksum=2d90a178c4297611088bf7daae5492a3bc3d5ab6328c3a032eb425d2c249097e +distfiles="https://dovecot.org/releases/2.4/dovecot-${version//r/-}.tar.gz" +checksum=fb188603f419ed7aaa07794a8692098c3ec2660bb9c67d0efe24948cbb32ae00 keep_libtool_archives=yes if [ "$XBPS_TARGET_LIBC" = "glibc" ]; then @@ -51,13 +51,11 @@ depends="ca-certificates" system_accounts="_dovecot _dovenull" post_install() { + rm -f ${DESTDIR}/etc/dovecot/dovecot.conf + + vsconf doc/dovecot.conf vsconf doc/dovecot-openssl.cnf vsconf doc/mkcert.sh - mv ${DESTDIR}/usr/share/doc/dovecot/example-config/* \ - ${DESTDIR}/usr/share/examples/dovecot - mv ${DESTDIR}/usr/share/examples/dovecot/*.ext \ - ${DESTDIR}/usr/share/examples/dovecot/conf.d - rm ${DESTDIR}/etc/dovecot/README vsv dovecot } @@ -71,6 +69,14 @@ dovecot-devel_package() { vmove usr/lib/dovecot/dovecot-config } } +dovecot-plugin-flatcurve_package() { + depends="dovecot>=${version}" + short_desc+=" - Full Text Search plugin (Xapian)" + pkg_install() { + vmove usr/lib/dovecot/modules/doveadm/libdoveadm_fts_flatcurve_plugin.* + vmove usr/lib/dovecot/modules/lib21_fts_flatcurve_plugin.* + } +} dovecot-plugin-ldap_package() { depends="dovecot>=${version}" short_desc+=" - LDAP plugin" @@ -78,16 +84,8 @@ dovecot-plugin-ldap_package() { vmove usr/lib/dovecot/libdovecot-ldap.* vmove usr/lib/dovecot/modules/dict/libdict_ldap.so vmove usr/lib/dovecot/modules/auth/libauthdb_ldap.so - vmove usr/share/examples/dovecot/conf.d/auth-ldap.conf.ext - vmove usr/share/examples/dovecot/conf.d/dovecot-ldap.conf.ext - } -} -dovecot-plugin-lucene_package() { - depends="dovecot>=${version}" - short_desc+=" - Full Text Search plugin (Lucene)" - pkg_install() { - vmove usr/lib/dovecot/modules/doveadm/lib20_doveadm_fts_lucene_plugin.so - vmove usr/lib/dovecot/modules/lib21_fts_lucene_plugin.so + #vmove usr/share/examples/dovecot/conf.d/auth-ldap.conf.ext + #vmove usr/share/examples/dovecot/conf.d/dovecot-ldap.conf.ext } } dovecot-plugin-mysql_package() {