diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-12-29 06:30:44 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-12-29 06:30:44 +0000 |
commit | 0e12f8e53cdddba84b0eb27dca59153e2cf52309 (patch) | |
tree | 8dec970370295a71970b82457ae1db36dbbbd07c /net-mail | |
parent | 72fd2b48b7154274a1d2009cdaab54e7f49fb3aa (diff) |
gentoo auto-resync : 29:12:2024 - 06:30:44
Diffstat (limited to 'net-mail')
-rw-r--r-- | net-mail/Manifest.gz | bin | 14061 -> 14062 bytes | |||
-rw-r--r-- | net-mail/dbmail/Manifest | 3 | ||||
-rw-r--r-- | net-mail/dbmail/dbmail-3.4.1.ebuild | 100 | ||||
-rw-r--r-- | net-mail/dbmail/files/dbmail-3.4.1-fix-incompatible-pointer-type.patch | 13 | ||||
-rw-r--r-- | net-mail/dovecot/Manifest | 3 | ||||
-rw-r--r-- | net-mail/dovecot/dovecot-2.3.21.1-r1.ebuild | 309 | ||||
-rw-r--r-- | net-mail/dovecot/files/dovecot-2.3.21.1-gcc15-test.patch | 30 | ||||
-rw-r--r-- | net-mail/dovecot/files/dovecot-2.3.21.1-lto-tests.patch | 86 |
8 files changed, 544 insertions, 0 deletions
diff --git a/net-mail/Manifest.gz b/net-mail/Manifest.gz Binary files differindex 3a036df45212..86f9703da9a3 100644 --- a/net-mail/Manifest.gz +++ b/net-mail/Manifest.gz diff --git a/net-mail/dbmail/Manifest b/net-mail/dbmail/Manifest index ff623977ea17..3e22dc992bc1 100644 --- a/net-mail/dbmail/Manifest +++ b/net-mail/dbmail/Manifest @@ -1,5 +1,6 @@ AUX README.gentoo 1652 BLAKE2B beb9d27ac8de471d4ac8a3c4f626e7005d471477943b424b2603fe9ec92a6910bf0102c472e2d17dc1217d4bd6c286cd50da5d9b5fc6bd23c436cec8c0a84afd SHA512 0af8a295ce85260ca559f6491e8b7e318125b4f424639877a5744d0906023ccbd63c18b59f7fdb60da7994df9c3f62cef10a5db0ee940aa12c2382e33340f0a2 AUX dbmail-3.2.3-fno-common.patch 310 BLAKE2B 1166b001939b200e43b2dd048413e55bd53c9c385f93b40e95ee8306d3386eb365ee30c7ba26c853cc81ca231fd4d4551886f6760697ed40e1cdefd5617ecef3 SHA512 32f2524fdf0e6bf59bc0138d2fb62edad00c6700740fc21281de29dd3b455136bde4072ccf5017425cd417c5408498b688ee453f53166aa80eccba20382d736d +AUX dbmail-3.4.1-fix-incompatible-pointer-type.patch 430 BLAKE2B ee74bf34e7dcc51c7e190fff0ff03b396b65aaf61c38908a2e3685587e12a926806689d486797dc64d8ee918430375b87bf3142e310604644dce939ad70ec6b0 SHA512 43f64a01cadfbe69cd154e60451f7cbe1b7ad4b94fbfa63b61447dca2f6c7fd181d783284333dd315caa7a886a283f9914a177e4ec7556cf2ec834ed991a44f5 AUX dbmail-imapd.initd 865 BLAKE2B 91559b221dca0efb06c14c3b3b4f4fdeb40125694319c69610f56c0db44f33d4d173c21b1ac84961f57b5dc232d0e4be7c711cde667f52e3dae68abc75b05341 SHA512 e41e86a332d8862ea52b8884fc855985ba78ca060114943db70c4fe085f327fe160d8c41a8c4c1126f887d5250cc65ee2756d8e85e4d63a9bbc9dd307f2678a9 AUX dbmail-lmtpd.initd 865 BLAKE2B ad7b7aa8257bb7eaf221c73fdaf76b0e1d57c3156511ce7666f9211a8a3f04be2723003bcfbad109a033ba647905381f028105b9cf0f05b386ed3c808aeda7ce SHA512 ae6e83cda8e19b6e995783008732b6b005ae6732238d73dad784a1eb28ebdc542bddcec2cad48570231c535db5325983afaef2387a4bbd067030157694453d86 AUX dbmail-pop3d.initd 865 BLAKE2B ec5469bd57f8f2fff498999bf655923d2554f7142957da538f7951fbf8279a560234502b9fe42a4e26db23033875244bb5c80686bf9cdfd1759ca4a2ad3936a8 SHA512 bbdde37c66269b0e1815e6e80551f043f703884424cdebe8f04238e377292478dd4981c86c08a2a30ab1d458d10bc50ffd415ddd94062d725e13a2ac4bb1665e @@ -7,7 +8,9 @@ AUX dbmail-timsieved.initd 928 BLAKE2B 821d60be820e8a89887cd95c3fe2d35b02f4db184 DIST dbmail-3.2.3.tar.gz 2444227 BLAKE2B baa812fb3e925e6d896762596426208fc2ac5fcb01cb8100cfbd0464f1342f934c099ca52fd857e05fc82b97227155e9dcfc987d6c9b5c37e7daf21b167c9841 SHA512 29cc89830278f2ff28a4221fc81d4ff13cc371fbca7fb51d5376e9243234220b552cb4b6ec035c150e6cfa178435c4f36b9ce132fc02334bc6cdeb1a41c8ed85 DIST dbmail-3.2.5.tar.gz 2463966 BLAKE2B f4099c6f869dbb041d7eccdf20f3a34d36918237cc0386c71a1d339da8651b9301e676b25201856038045bb9590f880353c6ccafd57330f9cf48382c1b4c603c SHA512 6b0d7e1f6f7449869db1e094ffce9e1ef315c60784ea5ae5f814f2cf9a18c358b4c5d107a420c7317961ffa343fc59c9083789177514aee96523927688f276a0 DIST dbmail-3.3.1.tar.gz 2523029 BLAKE2B fd7bd7b6a40772c8c309b2bc9cf3cd907a8b885367fe6b1c23bdd1f4d6281b7f8878caf481171ec4ad71f2644f516100da5c6ee7dfa0d4d7139725a3181a8ef5 SHA512 d0324d79d4871cc46ce3bbc5c0d8c2f587d57f262a878f685b776d8e1b4a58a67e5a0f0cf0f48c939dc3424f8a44dd78e929ea2588ab10d0246a10b3ee5c55c5 +DIST dbmail-3.4.1.tar.gz 2531604 BLAKE2B bca7935b9a6b237cfd69afa72c895bdd393c5cd7875b856805f3534a818eecd5564c4e08c432b7f6d3a33bec0be3596169900025141596426542ad73844a4624 SHA512 bf9c55c796306008e957812c9fad6eb4e5ea35c749aafbf035d4e05f59db568f91f9857ad049f5d7b85107332764e030428203e6b67dbe82ad8a26fe6c3e0d6d EBUILD dbmail-3.2.3-r5.ebuild 4001 BLAKE2B 1a1edf93977316e24e7b853a86aeef46da994bd3e11e19503381849a20259878a75735de13435caa5b2f36df7b83d92e442aa23eed31ce9999e1a29fa9e22fdd SHA512 51efb4e87a3b84673ae3b3557af44cc7f4088e6e9aa33c70eabda09855c0601bac57c8fbe6a7ef30d0b7eb99f3239d2f5dfb74ff92404e8d6ce51f9b204681b5 EBUILD dbmail-3.2.5-r2.ebuild 2488 BLAKE2B deb48dba464ba50e6e622937eb67683f20b39b76a46627326d7e9afe9a9fa7b7a62b9b1d83c917c13ec96c058da24103e201da444e9727a98539682dd0d090c0 SHA512 85dda086404d1cd0005bd5a64c5d1d4615555308f8196be5b72833c2c59be91a7a5bde24473bab0fa104e26890e2b7e1d6e9ef514228223bc6669b8f2eb607d4 EBUILD dbmail-3.3.1.ebuild 2488 BLAKE2B 56a3dc9e85b3b0788cc4716604ad711da9936bbffb1f7809cd61327c554f22b3f2cc69509c1169d7c758f426bd555763a41f3d3cc31c833e773155106ca5c445 SHA512 a553adc4062b692ebf0a17f90268b58cbb04ebc7b0e71624ddb08983eec5bd337f3acc383c5cdb4533eaee11c892682ebd6a46a9e208aeb5fe749f09906e76ec +EBUILD dbmail-3.4.1.ebuild 2556 BLAKE2B a6ebf7178c9f0d4257c0483b46b41a1983c8e0ca1ca53476b8df94737ace482ab4bfd2445893fa8e7ceff4780053b0251b4edbcb8ebd8a6dbdeb2edb0b1287b5 SHA512 9281c254fca25dd54b689c25b129ea71b4f0bf7ec06cf74fbab9d2e999ea5ddd80459a2fec1543a276a05f45487633f039a5ffcfa8d21dc05e3a5523f2772b2a MISC metadata.xml 571 BLAKE2B 68a2a0a6d1b2cb2837c7589125f4895269d60588760a43d7b275619b5e7a01cd4625f754da41a7a377673d09ae097f53144d62c451a316a5cf1f786ee18ac74e SHA512 b3e72b2de1aa541129542f907b0a3b332402bd7f3d5d1029c36769834eae1e9e5f67fdedc40d024630d93fe766c5f346eb7e6e366b443a82a8a5bc12f1ace7e6 diff --git a/net-mail/dbmail/dbmail-3.4.1.ebuild b/net-mail/dbmail/dbmail-3.4.1.ebuild new file mode 100644 index 000000000000..58dc5e39dea6 --- /dev/null +++ b/net-mail/dbmail/dbmail-3.4.1.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit systemd readme.gentoo-r1 + +DESCRIPTION="Fast and scalable sql based email services" +HOMEPAGE="https://dbmail.org/" +SRC_URI="https://github.com/dbmail/dbmail/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+doc jemalloc ldap sieve ssl static systemd" + +DEPEND="dev-db/libzdb + sieve? ( >=mail-filter/libsieve-2.2.1 ) + ldap? ( >=net-nds/openldap-2.3.33:= ) + jemalloc? ( dev-libs/jemalloc:= ) + elibc_musl? ( sys-libs/queue-standalone ) + app-text/asciidoc + app-text/xmlto + app-crypt/mhash + sys-libs/zlib + dev-libs/gmime:3.0 + >=dev-libs/glib-2.16 + dev-libs/libevent:= + virtual/libcrypt:= + ssl? ( + dev-libs/openssl:= + )" +RDEPEND="${DEPEND} + acct-group/dbmail + acct-user/dbmail" +DEPEND+=" elibc_musl? ( sys-libs/queue-standalone )" +DOCS=( AUTHORS README.md INSTALL THANKS UPGRADING ) + +PATCHES=( "${FILESDIR}"/${P}-fix-incompatible-pointer-type.patch ) + +README_GENTOO_SUFFIX="" + +src_prepare() { + sed -i -e "s:nobody:dbmail: ; s:nogroup:dbmail: ; s:/var/run:/run/dbmail:" dbmail.conf || die + # change config path to our default and use the conf.d and init.d files from the contrib dir + sed -i -e "s:/etc/dbmail.conf:/etc/dbmail/dbmail.conf:" contrib/startup-scripts/gentoo/init.d-dbmail || die + + default +} + +src_configure() { + econf \ + --enable-manpages \ + --sysconfdir=/etc/dbmail \ + $(use_enable doc manpages) \ + $(use_enable static) \ + $(use_enable systemd) \ + $(use_with jemalloc) \ + $(use_with sieve) \ + $(use_with ldap auth-ldap) +} + +src_install() { + emake DESTDIR="${D}" SYSTEMD_UNIT_DIR="$(systemd_get_systemunitdir)" install + einstalldocs + + docompress -x /usr/share/doc/${PF}/sql + dodoc -r sql + dodoc -r test-scripts + dodoc -r contrib + ## TODO: install other contrib stuff + + insinto /etc/dbmail + newins dbmail.conf dbmail.conf.dist + + # use custom init scripts until updated in upstream contrib + newinitd "${FILESDIR}/dbmail-imapd.initd" dbmail-imapd + newinitd "${FILESDIR}/dbmail-lmtpd.initd" dbmail-lmtpd + newinitd "${FILESDIR}/dbmail-pop3d.initd" dbmail-pop3d + newinitd "${FILESDIR}/dbmail-timsieved.initd" dbmail-timsieved + + dobin contrib/mailbox2dbmail/mailbox2dbmail + doman contrib/mailbox2dbmail/mailbox2dbmail.1 + + # ldap schema + if use ldap; then + insinto /etc/openldap/schema + doins "${S}/dbmail.schema" + fi + + keepdir /var/lib/dbmail + fperms 750 /var/lib/dbmail + fowners dbmail:dbmail /var/lib/dbmail + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_print_elog +} diff --git a/net-mail/dbmail/files/dbmail-3.4.1-fix-incompatible-pointer-type.patch b/net-mail/dbmail/files/dbmail-3.4.1-fix-incompatible-pointer-type.patch new file mode 100644 index 000000000000..49ac4943f800 --- /dev/null +++ b/net-mail/dbmail/files/dbmail-3.4.1-fix-incompatible-pointer-type.patch @@ -0,0 +1,13 @@ +Take from: https://github.com/dbmail/dbmail/commit/01d5d422f88c5edd6f1f77787cd6459d756d00b4 + +--- a/src/dm_mailboxstate.c ++++ b/src/dm_mailboxstate.c +@@ -643,7 +643,7 @@ + + gboolean MailboxState_hasKeyword(T M, const char *keyword) + { +- if (g_list_find_custom(M->keywords, (gpointer)keyword, dm_strcmpdata)) ++ if (g_list_find_custom(M->keywords, (gpointer)keyword, (GCompareFunc) dm_strcmpdata)) + return TRUE; + return FALSE; + } diff --git a/net-mail/dovecot/Manifest b/net-mail/dovecot/Manifest index 0f35bb367404..07a9d1259143 100644 --- a/net-mail/dovecot/Manifest +++ b/net-mail/dovecot/Manifest @@ -1,5 +1,7 @@ AUX CVE-2022-30550.patch 5745 BLAKE2B ae48938734cceefa05473fa1d055e5d85c27f8a73ac4ed24debb631d83efbd1a1c94dd3629514d193abf5810d9adbf609c6cfc077d2a9de3e37d7429311ef86e SHA512 b2ff67fd8b6c5cea93877651a1168ef1a5d399cc5f1a61d1cce407c7624f5b6d758996084c6a5714b6880de0ce11ce5eac74a1e02918758cb6983caedb651c58 AUX dovecot-2.3.19.1-slibtool.patch 2935 BLAKE2B b54beb9364aba2e326249f41c77efd4633551498f420e7cfcd7da9c2409774d3caa3cd1df713332eaf2da1dd6f3bcec5e12947c25e536224ab21958a90f77103 SHA512 7c16efa35be9800061ae513117e2e8ed23cb81aa0db6dabf51c8e6c984ec317976fe97ceafda3387b7fe0c62bc5838240c6167003e0364548ead9aae40b91756 +AUX dovecot-2.3.21.1-gcc15-test.patch 1085 BLAKE2B 766cd155da6bf7e51d85dc49f7d60f618be41d41762a7b460130929cbe0fcf5127e7a89539f831451eafc02d545d824e6c884af00684a021b6522432a9aaa4ec SHA512 06e9cf80dbdfaa3f1d942ed50b0eeaebe34ef636f1905525f51945e1c599b5d488580236fbd6f6285cf0f7d17492ab325240e0ee6c15b7c925ba3de5f570efd2 +AUX dovecot-2.3.21.1-lto-tests.patch 2567 BLAKE2B 30328c6ca2c1072289585a7af240101c37da6aa52e8541fa66a1fc6a84fea548b76cad69692822bbe044847b3776ad1e52c8f9162dfe65ee1c203ed53a63fddd SHA512 f4f9b068b27b4c917218aeb924b34233dfec665083c009e48fc904a2ad659867373f1c72750ad6346faacd00c6dac8fc799e73fec1eca50c11c4f24e547f8860 AUX dovecot-autoconf-lua-version-v2.patch 524 BLAKE2B a0cb51a21169e55fe0ae92ed7fad3ccc898585ed4b0c9ed3db243b6f41165d5a4ad6470a6a76f5a04a44d450068da1b7173707f272f65a72265d4b49a630ac2e SHA512 cc9319926f90a4c4aaf1d1e77944bfa5df9f7f15ee9581469ff8c1a069ef18e55addb69fcfe88e024cad8544c0efb90f5b83c2b6d803e0c68770467849d31f78 AUX dovecot-openssl-3.patch 1345 BLAKE2B 282d18622d3a7eaab800ffda97a7bb72c242a505b228cd0f233394bb6d65bf5facc8f7576e73ba043bef11c8389da9f9bd211803819e5825c14843d8ba29b81d SHA512 b24db39cce6c388ab85eab7a9c161eb10ee871f5d78c7778e40a43acc3711486b4259dbbaef40c54efce55d3c8ca7cc8841adbe8528d75c6e8d60ba08b75df79 AUX dovecot-socket-name-too-long.patch 356 BLAKE2B ada5007b620cd5eef5a950d64add7d83ac366f126e1a9a70268e528d44a0a036fec096015bee2421caeca8a052d118011c5911b3c432fa73e846c66781df4da9 SHA512 f362bad725c9e408830dc9d5908a2b35b8ee82cb05f3d58795079b32d5ac4712779e71bd0f479fe072906fcaf01e4e08f08cedb9fd5ee08931409887480b8349 @@ -7,5 +9,6 @@ AUX dovecot-typo-push.patch 1217 BLAKE2B 813fcaf232fab6579aff27d636a902156d5a302 AUX dovecot.init-r6 1573 BLAKE2B 206318cbf7a6ef0276cb93237b091dd34dc2603a00f13ed288c787dc81f8902e770f7774c54eba90de49e9634eb93873046a043bd7825cfb65bab5b2ea9ce108 SHA512 982f9897e4a0a5a3957bb12785961c9cde72a2c941f55efdb23e9a26cec19efe89e3be4effe79522c297ea2b258d201db78c19b6e3f9cd5e68d3736c2a0f0063 DIST dovecot-2.3-pigeonhole-0.5.21.1.tar.gz 1956404 BLAKE2B ad0ea5c2c181aa9cdf12a7b58141a9812cad11e6ead4d4f38366e13589a84135db1998da179192a6e66a53240647906d96bb330982e7f2f204ba8c402f14cbbd SHA512 7387b417611599fe70d1a83d3b408321e66f5a883bf78a9d55c7496b1a17220677daebaefde2061e0d7064fe07c410ecfc64662878bb253ddcd9e128dd83fbaa DIST dovecot-2.3.21.1.tar.gz 7842044 BLAKE2B 3f4238a2f6a73bce1ed37d0def7dc2e61823173836879ed8b4ef5806b4403300335d551215fc4fb2ee8b4106276f84d16b24c2be53148b92da3f946a3b904e46 SHA512 9de6ce3a579ef2040248b692874a6d64a732bb735a9cee3144604927cad49690c4b0e29f7ecf3af23190d56f30956d955d13acd5d352534df62fbdfde4b60f9f +EBUILD dovecot-2.3.21.1-r1.ebuild 9015 BLAKE2B c3b63159d7d069fd83aef2035589cdc53bfdff14b65426c9c220fc3e9aa3f2436b6f87f34449431929a0c4cd4ce30ee4d1b787e368d8c5af5645184b947c7aac SHA512 6bc2f1c315c3d63d39572ef4e43fa52bb13f8b3a85ec1e11e99c7ffc8dd8810cd57a665696d7830032384c16402b335dc5bb5b4e7afc361490f60afcfcd4bfaf EBUILD dovecot-2.3.21.1.ebuild 8709 BLAKE2B c3a3e9885cd2813901239e45b96a816a05e797bb0f89ee1547472d765fa65a38759b4858886eec1dd7716ad27c0ed015f44cc6ed7b93b30c8728515bc0a7bfc5 SHA512 749a2a735b9dca423765214fc704fb8c161913b0128f2cd128cb947bf8dbfabaa9365a8b5bb323be8e6e902a0820995a48910d5643b0ee2eae9f9151a710727b MISC metadata.xml 901 BLAKE2B fdc5511093672f5f3d685b6b9f3e8f6da2c5d39b86ce9a7407cce420d4333863f9a17ded8e6e89a78af1b5567f1a575a1fe7b5e9276640a3e0d8f0b9ffcb6316 SHA512 288a5812cc4880a10fa615c860649fe7809a0ebc8a6cc4e13352c1f21f94264bd2700241cb479891b84660b9f5202cdcd4a2c28c2da70980bffa191583571fd7 diff --git a/net-mail/dovecot/dovecot-2.3.21.1-r1.ebuild b/net-mail/dovecot/dovecot-2.3.21.1-r1.ebuild new file mode 100644 index 000000000000..2378c7ca8d93 --- /dev/null +++ b/net-mail/dovecot/dovecot-2.3.21.1-r1.ebuild @@ -0,0 +1,309 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-1 lua5-3 ) +# do not add a ssl USE flag. ssl is mandatory +SSL_DEPS_SKIP=1 +inherit autotools flag-o-matic lua-single ssl-cert systemd toolchain-funcs + +MY_P="${P/_/.}" +#MY_S="${PN}-ce-${PV}" +major_minor="$(ver_cut 1-2)" +sieve_version="0.5.21.1" +if [[ ${PV} == *_rc* ]]; then + rc_dir="rc/" +else + rc_dir="" +fi + +DESCRIPTION="An IMAP and POP3 server written with security primarily in mind" +HOMEPAGE="https://www.dovecot.org/" +SRC_URI="https://dovecot.org/releases/${major_minor}/${rc_dir}${MY_P}.tar.gz + sieve? ( + https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz + ) + managesieve? ( + https://pigeonhole.dovecot.org/releases/${major_minor}/${rc_dir}${PN}-${major_minor}-pigeonhole-${sieve_version}.tar.gz + ) " +S="${WORKDIR}/${MY_P}" +LICENSE="LGPL-2.1 MIT" +SLOT="0/${PV}" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" + +IUSE_DOVECOT_AUTH="kerberos ldap lua mysql pam postgres sqlite" +IUSE_DOVECOT_COMPRESS="lz4 zstd" +IUSE_DOVECOT_OTHER="argon2 caps doc lucene managesieve rpc + selinux sieve solr static-libs stemmer suid systemd tcpd textcat unwind" + +IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}" + +REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )" + +DEPEND=" + app-arch/bzip2 + app-arch/xz-utils + dev-libs/icu:= + dev-libs/openssl:0= + sys-libs/zlib:= + virtual/libiconv + argon2? ( dev-libs/libsodium:= ) + caps? ( sys-libs/libcap ) + kerberos? ( virtual/krb5 ) + ldap? ( net-nds/openldap:= ) + lua? ( ${LUA_DEPS} ) + lucene? ( >=dev-cpp/clucene-2.3 ) + lz4? ( app-arch/lz4 ) + mysql? ( dev-db/mysql-connector-c:0= ) + pam? ( sys-libs/pam:= ) + postgres? ( dev-db/postgresql:* ) + rpc? ( net-libs/libtirpc:= net-libs/rpcsvc-proto ) + selinux? ( sec-policy/selinux-dovecot ) + solr? ( net-misc/curl dev-libs/expat ) + sqlite? ( dev-db/sqlite:* ) + stemmer? ( dev-libs/snowball-stemmer:= ) + suid? ( acct-group/mail ) + systemd? ( sys-apps/systemd:= ) + tcpd? ( sys-apps/tcp-wrappers ) + textcat? ( app-text/libexttextcat ) + unwind? ( sys-libs/libunwind:= ) + zstd? ( app-arch/zstd:= ) + virtual/libcrypt:= + " + +RDEPEND=" + ${DEPEND} + acct-group/dovecot + acct-group/dovenull + acct-user/dovecot + acct-user/dovenull + net-mail/mailbase[pam?] + " + +PATCHES=( + "${FILESDIR}/${PN}"-autoconf-lua-version-v2.patch + "${FILESDIR}/${PN}"-socket-name-too-long.patch + "${FILESDIR}/${PN}"-2.3.19.1-slibtool.patch # 782631 + "${FILESDIR}"/CVE-2022-30550.patch + "${FILESDIR}/${PN}"-openssl-3.patch + "${FILESDIR}/${PN}"-typo-push.patch + "${FILESDIR}/${PN}"-2.3.21.1-lto-tests.patch + "${FILESDIR}/${PN}"-2.3.21.1-gcc15-test.patch +) + +pkg_setup() { + use lua && lua-single_pkg_setup + if use managesieve && ! use sieve; then + ewarn "managesieve USE flag selected but sieve USE flag unselected" + ewarn "sieve USE flag will be turned on" + fi +} + +src_prepare() { + default + # bug 657108, 782631 + #elibtoolize + eautoreconf + + # Bug #727244 + append-cflags -fasynchronous-unwind-tables +} + +src_configure() { + local conf="" + + if use postgres || use mysql || use sqlite; then + conf="${conf} --with-sql" + fi + + # --disable-hardening because our toolchain already defaults to + # these bits on, and it actually regresses the default _FORTIFY_SOURCE + # level for hardened at least from 3 to 2. + # + # turn valgrind tests off. Bug #340791 + VALGRIND=no \ + LUAPC="${ELUA}" \ + systemdsystemunitdir="$(systemd_get_systemunitdir)" \ + econf \ + --with-rundir="${EPREFIX}/run/dovecot" \ + --with-statedir="${EPREFIX}/var/lib/dovecot" \ + --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \ + --disable-hardening \ + --disable-rpath \ + --with-bzlib \ + --without-libbsd \ + --with-lzma \ + --with-icu \ + --with-ssl \ + --with-zlib \ + $( use_with argon2 sodium ) \ + $( use_with caps libcap ) \ + $( use_with kerberos gssapi ) \ + $( use_with lua ) \ + $( use_with ldap ) \ + $( use_with lucene ) \ + $( use_with lz4 ) \ + $( use_with mysql ) \ + $( use_with pam ) \ + $( use_with postgres pgsql ) \ + $( use_with sqlite ) \ + $( use_with solr ) \ + $( use_with stemmer ) \ + $( use_with systemd ) \ + $( use_with tcpd libwrap ) \ + $( use_with textcat ) \ + $( use_with unwind libunwind ) \ + $( use_with zstd ) \ + $( use_enable static-libs static ) \ + ${conf} + + if use sieve || use managesieve; then + # The sieve plugin needs this file to be build to determine the plugin + # directory and the list of libraries to link to. + emake dovecot-config + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" + econf \ + $( use_enable static-libs static ) \ + --localstatedir="${EPREFIX}/var" \ + --enable-shared \ + --with-dovecot="${S}" \ + $( use_with ldap ) \ + $( use_with managesieve ) + fi +} + +src_compile() { + default + if use sieve || use managesieve; then + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" + fi +} + +src_test() { + # bug #340791 and bug #807178 + local -x NOVALGRIND=true + + default + if use sieve || use managesieve; then + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" + default + fi +} + +src_install() { + default + + if use suid; then + einfo "Changing perms to allow deliver to be suided" + fowners root:mail "/usr/libexec/dovecot/dovecot-lda" + fperms 4750 "/usr/libexec/dovecot/dovecot-lda" + fi + + newinitd "${FILESDIR}"/dovecot.init-r6 dovecot + + rm -rf "${ED}"/usr/share/doc/dovecot + + dodoc AUTHORS NEWS README TODO + dodoc doc/*.{txt,cnf,xml,sh} + docinto example-config + dodoc doc/example-config/*.{conf,ext} + docinto example-config/conf.d + dodoc doc/example-config/conf.d/*.{conf,ext} + docinto wiki + dodoc doc/wiki/* + doman doc/man/*.{1,7} + + # Create the dovecot.conf file from the dovecot-example.conf file that + # the dovecot folks nicely left for us.... + local conf="${ED}/etc/dovecot/dovecot.conf" + local confd="${ED}/etc/dovecot/conf.d" + + insinto /etc/dovecot + doins doc/example-config/*.{conf,ext} + insinto /etc/dovecot/conf.d + doins doc/example-config/conf.d/*.{conf,ext} + fperms 0600 /etc/dovecot/dovecot-{ldap,sql}.conf.ext + rm -f "${confd}/../README" + + # .maildir is the Gentoo default + local mail_location="maildir:~/.maildir" + sed -i -e \ + "s|#mail_location =|mail_location = ${mail_location}|" \ + "${confd}/10-mail.conf" \ + || die "failed to update mail location settings in 10-mail.conf" + + # We're using pam files (imap and pop3) provided by mailbase + if use pam; then + sed -i -e '/driver = pam/,/^[ \t]*}/ s|#args = dovecot|args = "\*"|' \ + "${confd}/auth-system.conf.ext" \ + || die "failed to update PAM settings in auth-system.conf.ext" + # mailbase does not provide a sieve pam file + use managesieve && dosym imap /etc/pam.d/sieve + sed -i -e \ + 's/#!include auth-system.conf.ext/!include auth-system.conf.ext/' \ + "${confd}/10-auth.conf" \ + || die "failed to update PAM settings in 10-auth.conf" + fi + + # Update ssl cert locations + sed -i -e 's:^#ssl = yes:ssl = yes:' "${confd}/10-ssl.conf" \ + || die "ssl conf failed" + sed -i -e 's:^ssl_cert =.*:ssl_cert = </etc/ssl/dovecot/server.pem:' \ + -e 's:^ssl_key =.*:ssl_key = </etc/ssl/dovecot/server.key:' \ + "${confd}/10-ssl.conf" || die "failed to update SSL settings in 10-ssl.conf" + + # Install SQL configuration + if use mysql || use postgres; then + sed -i -e \ + 's/#!include auth-sql.conf.ext/!include auth-sql.conf.ext/' \ + "${confd}/10-auth.conf" || die "failed to update SQL settings in \ + 10-auth.conf" + fi + + # Install LDAP configuration + if use ldap; then + sed -i -e \ + 's/#!include auth-ldap.conf.ext/!include auth-ldap.conf.ext/' \ + "${confd}/10-auth.conf" \ + || die "failed to update ldap settings in 10-auth.conf" + fi + + if use sieve || use managesieve; then + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" + emake DESTDIR="${ED}" install + sed -i -e \ + 's/^[[:space:]]*#mail_plugins = $mail_plugins/mail_plugins = sieve/' "${confd}/15-lda.conf" \ + || die "failed to update sieve settings in 15-lda.conf" + rm -rf "${ED}"/usr/share/doc/dovecot + docinto example-config/conf.d + dodoc doc/example-config/conf.d/*.conf + insinto /etc/dovecot/conf.d + doins doc/example-config/conf.d/90-sieve{,-extprograms}.conf + use managesieve && doins doc/example-config/conf.d/20-managesieve.conf + docinto sieve/rfc + dodoc doc/rfc/*.txt + docinto sieve/devel + dodoc doc/devel/DESIGN + docinto plugins + dodoc doc/plugins/*.txt + docinto extensions + dodoc doc/extensions/*.txt + docinto locations + dodoc doc/locations/*.txt + doman doc/man/*.{1,7} + fi + + use static-libs || find "${ED}"/usr/lib* -name '*.la' -delete +} + +pkg_postinst() { + # Let's not make a new certificate if we already have one + if ! [[ -e "${ROOT}"/etc/ssl/dovecot/server.pem && \ + -e "${ROOT}"/etc/ssl/dovecot/server.key ]]; then + einfo "Creating SSL certificate" + SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}" + install_cert /etc/ssl/dovecot/server + fi +} diff --git a/net-mail/dovecot/files/dovecot-2.3.21.1-gcc15-test.patch b/net-mail/dovecot/files/dovecot-2.3.21.1-gcc15-test.patch new file mode 100644 index 000000000000..774fe67f9659 --- /dev/null +++ b/net-mail/dovecot/files/dovecot-2.3.21.1-gcc15-test.patch @@ -0,0 +1,30 @@ +https://github.com/dovecot/core/pull/229 + +From aaeabfec1abd0d4f2b68819a1afee51defd62e3c Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Sat, 28 Dec 2024 13:17:24 +0000 +Subject: [PATCH] lib: test-data-stack - Drop bogus assertion + +This assertion goes back to 992a1726a41b42fa47204565ff17f7c635fcb421 when +test-data-stack.c was added. + +It starts to fail with (upcoming) GCC 15 which has improvements for +optimising out redundant pointer-vs-pointer comparisons, specifically +r15-580-gf3e5f4c58591f5 for gcc bug PR13962. + +Anyway, this is a problem for this assertion because t_malloc_no0 +is marked with `__attribute__((malloc))` which guarantees that the +returned pointer doesn't alias, hence a == b must be false. + +Bug: https://bugs.gentoo.org/939857 +--- a/src/lib/test-data-stack.c ++++ b/src/lib/test-data-stack.c +@@ -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(); + diff --git a/net-mail/dovecot/files/dovecot-2.3.21.1-lto-tests.patch b/net-mail/dovecot/files/dovecot-2.3.21.1-lto-tests.patch new file mode 100644 index 000000000000..9173674ef1a1 --- /dev/null +++ b/net-mail/dovecot/files/dovecot-2.3.21.1-lto-tests.patch @@ -0,0 +1,86 @@ +https://github.com/dovecot/core/pull/230 + +From 33cda8cbbc445d27ce38234b17442a9abe66167f Mon Sep 17 00:00:00 2001 +From: Martin Liska <mliska@suse.cz> +Date: Fri, 24 Mar 2023 13:33:13 +0100 +Subject: [PATCH 1/2] lib: md4 - Fix violation of strict aliasing. + +Fix miscompilation when LTO is enabled. + +(cherry picked from commit f0c1cf42ea78d22e2674b03fe65f0ee6545c5b99) +--- a/src/lib/md4.c ++++ b/src/lib/md4.c +@@ -34,23 +34,6 @@ + (a) = ((a) << (s)) | ((a) >> (32 - (s))) + + +-/* +- * SET reads 4 input bytes in little-endian byte order and stores them +- * in a properly aligned word in host byte order. +- * +- * The check for little-endian architectures which tolerate unaligned +- * memory accesses is just an optimization. Nothing will break if it +- * doesn't work. +- */ +-#if defined(__i386__) || defined(__x86_64__) || defined(__vax__) +-/* uint_fast32_t might be 64 bit, and thus may read 4 more bytes +- * beyond the end of the buffer. So only read precisely 32 bits +- */ +-#define SET(n) \ +- (*(const uint32_t *)&ptr[(n) * 4]) +-#define GET(n) \ +- SET(n) +-#else + #define SET(n) \ + (ctx->block[(n)] = \ + (uint_fast32_t)ptr[(n) * 4] | \ +@@ -59,7 +42,6 @@ + ((uint_fast32_t)ptr[(n) * 4 + 3] << 24)) + #define GET(n) \ + (ctx->block[(n)]) +-#endif + + /* + * This processes one or more 64-byte data blocks, but does NOT update + +From 6cdd0b1428ab393ec5996ed10a98e7a7043c501f Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Mon, 27 Mar 2023 02:25:12 +0100 +Subject: [PATCH 2/2] lib: md5: Fix strict aliasing violation + +Followup to f0c1cf42ea78d22e2674b03fe65f0ee6545c5b99. It's exactly the +same code as in md4, so let's rip it out here too. + +(cherry picked from commit 6de2e4ac0b9abd4ab09b68f1f7e5f032705080b1) +--- a/src/lib/md5.c ++++ b/src/lib/md5.c +@@ -38,20 +38,6 @@ + (a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); \ + (a) += (b); + +-/* +- * SET reads 4 input bytes in little-endian byte order and stores them +- * in a properly aligned word in host byte order. +- * +- * The check for little-endian architectures which tolerate unaligned +- * memory accesses is just an optimization. Nothing will break if it +- * doesn't work. +- */ +-#if defined(__i386__) || defined(__x86_64__) || defined(__vax__) +-#define SET(n) \ +- (*(const uint32_t *)&ptr[(n) * 4]) +-#define GET(n) \ +- SET(n) +-#else + #define SET(n) \ + (ctx->block[(n)] = \ + (uint_fast32_t)ptr[(n) * 4] | \ +@@ -60,7 +46,6 @@ + ((uint_fast32_t)ptr[(n) * 4 + 3] << 24)) + #define GET(n) \ + (ctx->block[(n)]) +-#endif + + /* + * This processes one or more 64-byte data blocks, but does NOT update + |