diff options
| author | root <root@alpha.trunkmasters.com> | 2026-09-05 19:11:59 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-09-05 19:11:59 -0500 |
| commit | 5f278372030aad6db0f73700a9780b84a004d5ff (patch) | |
| tree | 027a42b585c1678d4fa9fb9ab464e9df3bcdc71f /net-mail | |
| parent | d1f18a9f11dde5cf862fd7c32c6d33a0a9114736 (diff) | |
| download | baldeagleos-repo-5f278372030aad6db0f73700a9780b84a004d5ff.tar.gz baldeagleos-repo-5f278372030aad6db0f73700a9780b84a004d5ff.tar.xz baldeagleos-repo-5f278372030aad6db0f73700a9780b84a004d5ff.zip | |
Adding metadata
Diffstat (limited to 'net-mail')
| -rw-r--r-- | net-mail/dovecot/dovecot-2.4.5-r1.ebuild | 292 | ||||
| -rw-r--r-- | net-mail/dovecot/files/dovecot-32bit-test.patch | 31 | ||||
| -rw-r--r-- | net-mail/dovecot/files/dovecot-32bit-time-t.patch | 20 | ||||
| -rw-r--r-- | net-mail/getmail/Manifest | 1 | ||||
| -rw-r--r-- | net-mail/getmail/getmail-6.20.01.ebuild | 36 |
5 files changed, 380 insertions, 0 deletions
diff --git a/net-mail/dovecot/dovecot-2.4.5-r1.ebuild b/net-mail/dovecot/dovecot-2.4.5-r1.ebuild new file mode 100644 index 000000000000..231674aefb3b --- /dev/null +++ b/net-mail/dovecot/dovecot-2.4.5-r1.ebuild @@ -0,0 +1,292 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( lua5-{1,3,4} luajit ) +# do not add a ssl USE flag. ssl is mandatory +SSL_DEPS_SKIP=1 +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/dovecot.asc +inherit autotools dot-a eapi9-ver flag-o-matic lua-single ssl-cert systemd +inherit toolchain-funcs verify-sig + +MY_P="${P/_/.}" +MY_PV="${PV}" +major_minor="$(ver_cut 1-2)" + +DESCRIPTION="An IMAP and POP3 server written with security primarily in mind" +HOMEPAGE="https://www.dovecot.org/" +SRC_URI="https://www.dovecot.org/releases/${major_minor}/${MY_P}.tar.gz + sieve? ( + https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz + verify-sig? ( + https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz.sig + ) + ) + managesieve? ( + https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz + verify-sig? ( + https://pigeonhole.dovecot.org/releases/${major_minor}/${PN}-pigeonhole-${MY_PV}.tar.gz.sig + ) + ) + verify-sig? ( + https://www.dovecot.org/releases/${major_minor}/${MY_P}.tar.gz.sig + ) " +S="${WORKDIR}/${MY_P}" +PIEGONHOLE_S="../dovecot-pigeonhole-${MY_PV}" +LICENSE="LGPL-2.1 MIT" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~mips ~ppc ~ppc64 ~riscv ~sparc ~x86" + +IUSE_DOVECOT_AUTH_DICT="cdb kerberos ldap lua mysql pam postgres sqlite" +IUSE_DOVECOT_COMPRESS="lz4 zstd" +IUSE_DOVECOT_FTS="solr stemmer textcat xapian" +IUSE_DOVECOT_OTHER="argon2 managesieve selinux sieve static-libs suid systemd system-icu test unwind" + +IUSE="${IUSE_DOVECOT_AUTH_DICT} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_FTS} ${IUSE_DOVECOT_OTHER}" + +REQUIRED_USE="lua? ( ${LUA_REQUIRED_USE} )" +RESTRICT="!test? ( test )" + +DEPEND=" + app-arch/bzip2 + dev-libs/openssl:0= + net-libs/libtirpc:= + dev-libs/libpcre2:0[pcre32] + net-libs/rpcsvc-proto + sys-libs/libcap + virtual/zlib:= + virtual/libcrypt:= + virtual/libiconv + argon2? ( dev-libs/libsodium:= ) + cdb? ( dev-db/tinycdb ) + kerberos? ( virtual/krb5 ) + ldap? ( net-nds/openldap:= ) + lua? ( ${LUA_DEPS} ) + xapian? ( dev-libs/xapian:= ) + lz4? ( app-arch/lz4 ) + mysql? ( dev-db/mysql-connector-c:0= ) + pam? ( sys-libs/pam:= ) + postgres? ( dev-db/postgresql:* ) + selinux? ( sec-policy/selinux-dovecot ) + solr? ( net-misc/curl dev-libs/expat ) + sqlite? ( dev-db/sqlite:* ) + stemmer? ( dev-libs/snowball-stemmer:= ) + system-icu? ( dev-libs/icu:= ) + suid? ( acct-group/mail ) + systemd? ( sys-apps/systemd:= ) + textcat? ( app-text/libexttextcat:= ) + unwind? ( sys-libs/libunwind:= ) + zstd? ( app-arch/zstd:= ) + " + +RDEPEND=" + ${DEPEND} + acct-group/dovecot + acct-group/dovenull + acct-user/dovecot + acct-user/dovenull + net-mail/mailbase[pam?] + " + +BDEPEND="virtual/pkgconfig + test? ( + lua? ( + $(lua_gen_cond_dep ' + dev-lua/luajson[${LUA_USEDEP}] + ') + ) + ) + verify-sig? ( sec-keys/openpgp-keys-dovecot ) + " + +PATCHES=( + "${FILESDIR}/${PN}-autoconf-lua-version-v3.patch" + "${FILESDIR}/${PN}-32bit-test.patch" + "${FILESDIR}/${PN}-32bit-time-t.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_unpack() { + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/${MY_P}.tar.gz{,.sig} + use sieve && verify-sig_verify_detached "${DISTDIR}"/${PN}-pigeonhole-${MY_PV}.tar.gz{,.sig} + use managesieve && verify-sig_verify_detached "${DISTDIR}"/${PN}-pigeonhole-${MY_PV}.tar.gz{,.sig} + fi + + default +} + +src_prepare() { + default + + # unix socket path too long under portage build dir + sed -i '/^TEST_IMAP_CLIENT_HIBERNATE/s/test-imap-client-hibernate//' src/imap/Makefile.am || die + + # rename default cert files + sed -i -e "s:ssl-cert.pem:server.pem:" \ + -e "s:ssl-key.pem:server.key:" \ + doc/dovecot.conf.in || die "sed failed" + + # bug 657108, 782631 + #elibtoolize + eautoreconf + + # Bug #727244 + append-cflags -fasynchronous-unwind-tables + # Bug #971191 + append-cflags -fno-strict-aliasing +} + +src_configure() { + use static-libs && lto-guarantee-fat + + if tc-is-cross-compiler; then + # runtime checks cannot be executed on the host + # m4/gmtime_max.m4: 40 or 31 bits + local maxtime=31 + tc-has-64bit-time_t && maxtime=40 + export i_cv_gmtime_max_time_t=${maxtime} + export i_cv_epoll_works=yes + export i_cv_fd_passing=yes + export i_cv_mmap_plays_with_write=yes + export i_cv_posix_fallocate_works=yes + export lib_cv_va_copy=yes + export lib_cv___va_copy=no + 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 \ + --with-bzlib \ + --without-libbsd \ + --with-libcap \ + --enable-experimental-mail-utf8 \ + $( use_with argon2 sodium ) \ + $( use_with cdb) \ + $( use_with system-icu icu) \ + $( use_with kerberos gssapi ) \ + $( use_with lua ) \ + $( use_with ldap ) \ + $( use_with xapian flatcurve ) \ + $( 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 textcat ) \ + $( use_with unwind libunwind ) \ + $( use_with zstd ) \ + $( use_enable static-libs static ) + + 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 + pushd "${PIEGONHOLE_S}" > /dev/null || die + econf \ + $( use_enable static-libs static ) \ + --localstatedir="${EPREFIX}/var" \ + --enable-shared \ + --disable-hardening \ + --with-dovecot="${S}" \ + $( use_with ldap ) \ + $( use_with managesieve ) + popd > /dev/null || die + fi +} + +src_compile() { + default + if use sieve || use managesieve; then + pushd "${PIEGONHOLE_S}" > /dev/null || die + emake CC="$(tc-getCC)" CFLAGS="${CFLAGS}" + popd > /dev/null || die + fi +} + +src_test() { + # bug #340791 and bug #807178 + local -x NOVALGRIND=true + + # don't fail if dovecot is not installed + local -x DOVECONF_PATH="${S}/src/config/doveconf" + + default + if use sieve || use managesieve; then + pushd "${PIEGONHOLE_S}" > /dev/null || die + default + popd > /dev/null || die + 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 + + use pam && dosym imap /etc/pam.d/dovecot + + insinto /etc/dovecot/conf.d + doins "${FILESDIR}/50-misc.conf" + + dodoc AUTHORS NEWS README.md TODO + + if use sieve || use managesieve; then + pushd "${PIEGONHOLE_S}" > /dev/null || die + emake DESTDIR="${ED}" install + + newdoc README README.pigeonhole + popd > /dev/null || die + fi + + if use static-libs; then + strip-lto-bytecode + else + find "${ED}"/usr/lib* -name '*.la' -delete + fi +} + +pkg_postinst() { + if ver_replacing -lt 2.4 ; then + # This is an upgrade which requires user review + ewarn "Dovecot-2.4.x has new settings and WILL NOT work" + ewarn "unless the configuration files are updated." + ewarn "Please read the migration guide at:" + ewarn " https://doc.dovecot.org/2.4.1/installation/upgrade/2.3-to-2.4.html" + fi + + # Let's not make a new certificate if we already have one + if ! [[ -e "${ROOT}"/etc/dovecot/server.pem && \ + -e "${ROOT}"/etc/dovecot/server.key ]]; then + einfo "Creating SSL certificate" + SSL_ORGANIZATION="${SSL_ORGANIZATION:-Dovecot IMAP Server}" + install_cert /etc/dovecot/server + fi +} diff --git a/net-mail/dovecot/files/dovecot-32bit-test.patch b/net-mail/dovecot/files/dovecot-32bit-test.patch new file mode 100644 index 000000000000..c8c9532edfb1 --- /dev/null +++ b/net-mail/dovecot/files/dovecot-32bit-test.patch @@ -0,0 +1,31 @@ +From 25a1010e7c36b205f0d51335059ea0e5e2bd4e22 Mon Sep 17 00:00:00 2001 +From: Paul Howarth <paul@city-fan.org> +Date: Fri, 17 Jul 2026 17:59:50 +0100 +Subject: [PATCH] lib: Fix fatal_array test for 32-bit systems + +On 64-bit systems, SIZE_MAX is much bigger than UINT_MAX so an +allocation of UINT_MAX objects is not unreasonable. + +On 32-bit systems, SIZE_MAX and UINT_MAX are the same so an +allocation of UINT_MAX objects fails malloc checks before reaching +buffer size limit checks. +--- + src/lib/test-array.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/lib/test-array.c b/src/lib/test-array.c +index d6bebbae348..556d0106988 100644 +--- a/src/lib/test-array.c ++++ b/src/lib/test-array.c +@@ -461,7 +461,11 @@ enum fatal_test_state fatal_array(unsigned int stage) + + t_array_init(&arr, 2); + array_push_back(&arr, value); ++#if SIZEOF_SIZE_T > 4 /* MALLOC_MULTIPLY will fail before buffer_check_limits with 32bit */ + test_expect_fatal_string("Buffer write out of range"); ++#else ++ test_expect_fatal_string("memory allocation overflow"); ++#endif + /* this is supposed to assert-crash before it even attempts to + access value */ + array_append(&arr, value, UINT_MAX); diff --git a/net-mail/dovecot/files/dovecot-32bit-time-t.patch b/net-mail/dovecot/files/dovecot-32bit-time-t.patch new file mode 100644 index 000000000000..2c733ea4be9e --- /dev/null +++ b/net-mail/dovecot/files/dovecot-32bit-time-t.patch @@ -0,0 +1,20 @@ +Fix TIME_T_MAX_BITS on 32-bit systems with a 32-bit signed time_t. +https://github.com/dovecot/core/pull/316 + +diff --git a/m4/gmtime_max.m4 b/m4/gmtime_max.m4 +index d2501c1776..a0d8e06780 100644 +--- a/m4/gmtime_max.m4 ++++ b/m4/gmtime_max.m4 +@@ -21,12 +21,10 @@ AC_DEFUN([DOVECOT_GMTIME_MAX], [ + Let's just do the same as Cyrus folks and limit it to 40 bits. */ + bits = 40; + } +- #ifdef TIME_T_SIGNED + if (bits == 32) { + /* Signed 32-bit time_t is essentially the same as unsigned 31-bit time_t */ + bits = 31; + } +- #endif + + f = fopen("conftest.temp", "w"); + if (f == NULL) { diff --git a/net-mail/getmail/Manifest b/net-mail/getmail/Manifest index ab24e2b9b6f9..021d9c623fae 100644 --- a/net-mail/getmail/Manifest +++ b/net-mail/getmail/Manifest @@ -1 +1,2 @@ DIST getmail-6.20.00.gh.tar.gz 220011 BLAKE2B 2677acc2aff9dfe1d50e48a07bc575841f47db2ec43dd0c38948742a27b58ac77bf6d5fb0d2035a18da40547544436b051b7e96877aa64b9979b30c53b61acf1 SHA512 1222e53182f7d59ef874fb0e1231f24fe22308ff1abb2b4efd79252f7458b42e4efc81a5a747f682c3043679745520e6e77fb8af54351b74595edc6466749c1f +DIST getmail-6.20.01.gh.tar.gz 219497 BLAKE2B a6e24eb5dc7e7a0597d1f0eb2475d7f2fd4bc3b8c8680a975cfe66f6cda8e163fc1692e8d0b788b04eecfe88cefbb0ec467779ba7b9a39feb9041f0a75b0ac46 SHA512 69e5c12d08017bfcca21dc84b1589ea47128bb642e7e850f42446dcef31e24bf172938c505572123292435324c96ce72218c245603357bc96c911db7d7ccbb0e diff --git a/net-mail/getmail/getmail-6.20.01.ebuild b/net-mail/getmail/getmail-6.20.01.ebuild new file mode 100644 index 000000000000..873677ce2554 --- /dev/null +++ b/net-mail/getmail/getmail-6.20.01.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_SINGLE_IMPL=1 +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{13..14} ) +PYTHON_REQ_USE="ssl" +inherit distutils-r1 + +DESCRIPTION="A mail retriever with reliable Maildir and mbox delivery" +HOMEPAGE="https://www.getmail6.org/ https://github.com/getmail6/getmail6" +SRC_URI="https://github.com/getmail6/getmail6/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz" +S="${WORKDIR}/getmail6-${PV}" + +# getmail is under GPLv2 +# getmail-gmail-xoauth-tokens is under Apache 2.0 +LICENSE="GPL-2 Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +PATCHES=( + "${FILESDIR}/${PN}-revert-doc-path.patch" +) + +# tests require a mail server +RESTRICT="test" + +python_prepare_all() { + # Use gentoo version number (including revision) for doc dir and remove COPYING file + sed -i -e "s,'getmail-%s' % __version__,'${PF}'," \ + -e "/docs\/COPYING/d" "${S}"/setup.py || die + + distutils-r1_python_prepare_all +} |
