diff --git a/net-mail/dovecot/Manifest b/net-mail/dovecot/Manifest index 306e32b..6eae433 100644 --- a/net-mail/dovecot/Manifest +++ b/net-mail/dovecot/Manifest @@ -1,7 +1,11 @@ AUX dovecot-10-ssl.patch 550 BLAKE2B 5317b802113e6dd711056684bb2de8167113c95ea28ea805fd3a1f688878505d02d85bd9ab69fc222cb2debdc1b5186f48f3c2cbea2f1df24714482939284f46 SHA512 7acc31dd4a3f51a9c13d590fd2803c2cb98c281e0595ca2a800539a143f89b95f923a3678beb0aa2b254a54385522329e0f3e1e8ba4c5852e7b51f8f111122a9 AUX dovecot-2.2.34-glibc226.patch 1089 BLAKE2B ce04a939e2c59dab536ef469a0e105c359190c511ef05a15eb080d172bad282272735b3e70296364d7fb5e227896aa19cdd02c78a3d907051c1886f18a206b5e SHA512 518d67fedda41ec01d50a5e09a925f698d9b7be42238ddd6035b2b5ea2ca50d4e5acd38f0391aa819dface61ffa404aa551d27ad58c2161571f5c9a364b909b6 +AUX dovecot-glibc226.patch 2838 BLAKE2B 522fd7552faf88cba7c48f5074d264ca4450d1f72113eba9a7cf23317402b76a53874998bc0eb6cadb4580935dca061314b7c6bd355a6ce618c43465a7c8c5d2 SHA512 5ed7a19941cec35a8edace588bedac7d6d12903bf5ece2a224a61f021ae663352dd668c81cebe2c9b132fd0614998c77f1d19de2f48b2d3794c453b9ae333693 AUX dovecot.init-r4 1499 BLAKE2B 9c05fd7da0409b0944b0204bdcd683ab889190effc8cb7b072dcab140f52e2f39336a344deb74b63ef184152604412ca4c2b3d79c3d63341386e7952c54b0a26 SHA512 8fbc80bc0efa6b83685da19b6a5c2a2d2ca7e59be7f1f7352984fe30004175330e53f3db1c4c2471f1d7d5e088bef0b4dced97d29d32be8b50d000987b6eeb09 DIST dovecot-2.2-pigeonhole-0.4.21.tar.gz 1774887 BLAKE2B ebf2601e7b087d655713f985b72442496e36543ec32881d3bc84d2c6b132f58082aee6c5fae3747f756b72a3c9a2e11f78350bc34c398214de13dfc83cffdef1 SHA512 4751f449ede1b05173c706b414ebf9f7f670ff78589ce6f0b687c32c9abe6dae8b3064ed1b20e893d9ec0147b0139ce479e1d74ebe94747c33f2d8ca177912de DIST dovecot-2.2.34.tar.gz 6181270 BLAKE2B dfdb1e6812574e79595202e830167400569adf61155aa5ddaae443e798c4a05ccec2acd2975e00e9e7ffc63ee1dcf7e4e2a9288b1e6e1e1427d1e89790a8fa13 SHA512 9f08a7116a08a08495aa0e7b4cb6b11a924ea61006970487946e338bc79bba7fd7619c345cbf278a74de285d548af04fc66eaaee508185b8b9d7335cf5612055 +DIST dovecot-2.3-pigeonhole-0.5.2.tar.gz 1814618 BLAKE2B b1187021673429bee1b45a1f657bea995e9881257919ff55bac63106d65963294ee2b3829167c6d50e351c4bc3c7e88a5ccfb757308d2500c5d4146246145074 SHA512 6bc24d9241f94db795a012346d9bc94b5cc7d7ce0175c03213c2b5d179d80dec95e9bdbd50bed628c8f9f7c51639e692ba5e429212a3b4a654c1e4764ac4f11c +DIST dovecot-2.3.2.1.tar.gz 6797491 BLAKE2B 92b88fd0f0cb8ed6c418bf27c2e1fc4efe13f1ccfb4948ce5eed1a4e76a4e96f0d6770d9841026ec5a515310ebaa4b335063e3516de454db8ba06cc4ee5a00ec SHA512 c085a0d04925485423086736a3c7d919ad0ca9efeff005890382da5333edb68c7d23ccb89fbe2ac44f8f016fc993bf2c669e450794c3ab13463676cbb47c7bf7 EBUILD dovecot-2.2.34-r1.ebuild 8744 BLAKE2B 987e971e567e9cef5a13e029ba4c9c738f02a869a340af224914e21a6fe540c490cee83fb7704c33e5adcfe4ce0ad36a8ed02f6c3cc0c020e18a900585a7e7c3 SHA512 1325e3cb6b9b3fa46edf2539c24469a608a808fd9eddc43e1481e397f40e1d092aed7c161a427f94fcbbf5b24152f0be5125d5770bf26eef53eb9154900d1425 +EBUILD dovecot-2.3.2.1.ebuild 8790 BLAKE2B f09fcbd5e0ff483de073cd5d14ee386da202a52a2074913a267e5a33a30419a1946f4e584f09e272049ab510698340f3459e3be65765f306caa03e18fecb8973 SHA512 1f18e49ade11e6c7f7cc4964eb302e5e89d05e35c5384d2be690da847805c4a1cde48479d9ebed63a4a19dc13c5cf08a201870b9844519f6af944477949c7506 MISC metadata.xml 1374 BLAKE2B 629969318c5bcbdf0521d2293c6ead5e735ba5a113db3166e4df82103a3a84cbc62f3a2843082c9d5bdb635f25353ac7d3a4fcdf80d45e07b11b98754e744506 SHA512 16bdf15120dd8c957cd6e4957910acf21440dd0b8774cac9d9c5a48635cd46c7093850974b592ebbcd49085607fff2051691a42112f4ab9df44c51b9fea6d180 diff --git a/net-mail/dovecot/dovecot-2.3.2.1.ebuild b/net-mail/dovecot/dovecot-2.3.2.1.ebuild new file mode 100644 index 0000000..2b6f787 --- /dev/null +++ b/net-mail/dovecot/dovecot-2.3.2.1.ebuild @@ -0,0 +1,291 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +# do not add a ssl USE flag. ssl is mandatory +SSL_DEPS_SKIP=1 +inherit autotools ssl-cert systemd user versionator + +MY_P="${P/_/.}" +#MY_S="${PN}-ce-${PV}" +major_minor="$(get_version_component_range 1-2)" +sieve_version="0.5.2" +if [[ ${PV} == *_rc* ]] ; then + rc_dir="rc/" +else + rc_dir="" +fi +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 + ) " +DESCRIPTION="An IMAP and POP3 server written with security primarily in mind" +HOMEPAGE="https://www.dovecot.org/" + +SLOT="0" +LICENSE="LGPL-2.1 MIT" +KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc x86" + +IUSE_DOVECOT_AUTH="kerberos ldap lua mysql pam postgres sqlite vpopmail" +IUSE_DOVECOT_COMPRESS="bzip2 lzma lz4 zlib" +IUSE_DOVECOT_OTHER="argon2 caps doc ipv6 libressl lucene managesieve selinux sieve solr static-libs suid tcpd textcat" + +IUSE="${IUSE_DOVECOT_AUTH} ${IUSE_DOVECOT_STORAGE} ${IUSE_DOVECOT_COMPRESS} ${IUSE_DOVECOT_OTHER}" + +DEPEND="argon2? ( dev-libs/libsodium ) + bzip2? ( app-arch/bzip2 ) + caps? ( sys-libs/libcap ) + kerberos? ( virtual/krb5 ) + ldap? ( net-nds/openldap ) + lua? ( dev-lang/lua:* ) + lucene? ( >=dev-cpp/clucene-2.3 ) + lzma? ( app-arch/xz-utils ) + lz4? ( app-arch/lz4 ) + mysql? ( virtual/mysql ) + pam? ( virtual/pam ) + postgres? ( dev-db/postgresql:* !dev-db/postgresql[ldap,threads] ) + selinux? ( sec-policy/selinux-dovecot ) + solr? ( net-misc/curl dev-libs/expat ) + sqlite? ( dev-db/sqlite:* ) + !libressl? ( dev-libs/openssl:0 ) + libressl? ( dev-libs/libressl ) + tcpd? ( sys-apps/tcp-wrappers ) + textcat? ( app-text/libexttextcat ) + vpopmail? ( net-mail/vpopmail ) + zlib? ( sys-libs/zlib ) + virtual/libiconv + dev-libs/icu:=" + +RDEPEND="${DEPEND} + net-mail/mailbase" + +PATCHES=( "${FILESDIR}/${PN}-glibc226.patch" ) + +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 + # default internal user + enewgroup dovecot 97 + enewuser dovecot 97 -1 /dev/null dovecot + # default login user + enewuser dovenull -1 -1 /dev/null + # add "mail" group for suid'ing. Better security isolation. + if use suid; then + enewgroup mail + fi +} + +src_prepare() { + default + # bug 657108 + # elibtoolize + eautoreconf +} + +src_configure() { + local conf="" + + if use postgres || use mysql || use sqlite; then + conf="${conf} --with-sql" + fi + + # turn valgrind tests off. Bug #340791 + VALGRIND=no econf \ + --with-rundir="${EPREFIX}/run/dovecot" \ + --with-statedir="${EPREFIX}/var/lib/dovecot" \ + --with-moduledir="${EPREFIX}/usr/$(get_libdir)/dovecot" \ + --without-stemmer \ + --disable-rpath \ + --without-libbsd \ + --with-icu \ + --with-ssl \ + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" \ + $( use_with argon2 sodium ) \ + $( use_with bzip2 bzlib ) \ + $( use_with caps libcap ) \ + $( use_with kerberos gssapi ) \ + $( use_with lua ) \ + $( use_with ldap ) \ + $( use_with lucene ) \ + $( use_with lz4 ) \ + $( use_with lzma ) \ + $( use_with mysql ) \ + $( use_with pam ) \ + $( use_with postgres pgsql ) \ + $( use_with sqlite ) \ + $( use_with solr ) \ + $( use_with tcpd libwrap ) \ + $( use_with textcat ) \ + $( use_with vpopmail ) \ + $( use_with zlib ) \ + $( 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 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() { + default + if use sieve || use managesieve ; then + cd "../dovecot-${major_minor}-pigeonhole-${sieve_version}" || die "cd failed" + default + fi +} + +src_install () { + default + + # insecure: + # use suid && fperms u+s /usr/libexec/dovecot/deliver + # better: + if use suid;then + einfo "Changing perms to allow deliver to be suided" + fowners root:mail "${EPREFIX}/usr/libexec/dovecot/dovecot-lda" + fperms 4750 "${EPREFIX}/usr/libexec/dovecot/dovecot-lda" + fi + + newinitd "${FILESDIR}"/dovecot.init-r4 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 "${EPREFIX}"/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 + + # Disable ipv6 if necessary + if ! use ipv6; then + sed -i -e 's/^#listen = \*, ::/listen = \*/g' "${conf}" \ + || die "failed to update listen settings in dovecot.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 = +Date: Mon, 9 Jul 2018 11:33:23 +0300 +Subject: [PATCH] m4: Enable rquota only if rpc/rpc.h exists + +It's been removed in glibc 2.26 +--- + m4/quota.m4 | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/m4/quota.m4 b/m4/quota.m4 +index 5840e3af89..0695b1e021 100644 +--- a/m4/quota.m4 ++++ b/m4/quota.m4 +@@ -7,8 +7,10 @@ AC_DEFUN([DOVECOT_RPCGEN], [ + + have_rquota=no + if test -f /usr/include/rpcsvc/rquota.x && test -n "$RPCGEN"; then +- AC_DEFINE(HAVE_RQUOTA,, [Define if you wish to retrieve quota of NFS mounted mailboxes]) +- have_rquota=yes ++ AC_CHECK_HEADER([rpc/rpc.h], [ ++ AC_DEFINE(HAVE_RQUOTA,, [Define if you wish to retrieve quota of NFS mounted mailboxes]) ++ have_rquota=yes ++ ]) + fi + AM_CONDITIONAL(HAVE_RQUOTA, test "$have_rquota" = "yes") + ]) +From 5803ae4bbd420def0072e1660ea7061c0e5dbcb9 Mon Sep 17 00:00:00 2001 +From: Timo Sirainen +Date: Mon, 9 Jul 2018 11:39:59 +0300 +Subject: [PATCH] m4, quota: Support rquota using libtirpc + +--- + m4/quota.m4 | 13 ++++++++++--- + src/plugins/quota/Makefile.am | 3 ++- + 2 files changed, 12 insertions(+), 4 deletions(-) + +diff --git a/m4/quota.m4 b/m4/quota.m4 +index 0695b1e021..d75af447e1 100644 +--- a/m4/quota.m4 ++++ b/m4/quota.m4 +@@ -7,18 +7,25 @@ AC_DEFUN([DOVECOT_RPCGEN], [ + + have_rquota=no + if test -f /usr/include/rpcsvc/rquota.x && test -n "$RPCGEN"; then +- AC_CHECK_HEADER([rpc/rpc.h], [ +- AC_DEFINE(HAVE_RQUOTA,, [Define if you wish to retrieve quota of NFS mounted mailboxes]) ++ PKG_CHECK_MODULES(LIBTIRPC, libtirpc, [ + have_rquota=yes ++ QUOTA_LIBS="$QUOTA_LIBS \$(LIBTIRPC_LIBS)" ++ ], [ ++ AC_CHECK_HEADER([rpc/rpc.h], [ ++ have_rquota=yes ++ ]) + ]) + fi ++ if test "$have_rquota" = yes; then ++ AC_DEFINE(HAVE_RQUOTA,, [Define if you wish to retrieve quota of NFS mounted mailboxes]) ++ fi + AM_CONDITIONAL(HAVE_RQUOTA, test "$have_rquota" = "yes") + ]) + + AC_DEFUN([DOVECOT_QUOTA], [ + AC_SEARCH_LIBS(quota_open, quota, [ + AC_DEFINE(HAVE_QUOTA_OPEN,, [Define if you have quota_open()]) +- QUOTA_LIBS="-lquota" ++ QUOTA_LIBS="$QUOTA_LIBS -lquota" + ]) + AC_SUBST(QUOTA_LIBS) + ]) +diff --git a/src/plugins/quota/Makefile.am b/src/plugins/quota/Makefile.am +index f220d4f075..ffebc67404 100644 +--- a/src/plugins/quota/Makefile.am ++++ b/src/plugins/quota/Makefile.am +@@ -19,7 +19,8 @@ AM_CPPFLAGS = \ + -I$(top_srcdir)/src/lib-storage/index/imapc \ + -I$(top_srcdir)/src/lib-storage/index/maildir \ + -I$(top_srcdir)/src/lib-program-client \ +- -I$(top_srcdir)/src/doveadm ++ -I$(top_srcdir)/src/doveadm \ ++ $(LIBTIRPC_CFLAGS) + + NOPLUGIN_LDFLAGS = + lib10_doveadm_quota_plugin_la_LDFLAGS = -module -avoid-version