diff options
author | Michael Orlitzky <mjo@gentoo.org> | 2017-03-27 01:06:18 -0400 |
---|---|---|
committer | Michael Orlitzky <mjo@gentoo.org> | 2017-03-27 01:07:38 -0400 |
commit | da8c6dde5207a230c73ad433e417f1772697a81a (patch) | |
tree | 99c376b756315dace8c08ceab1fe3991003b8eee /net-mail | |
parent | app-emulation/qemu: require app-accessibility/brltty[api], bug #613138 (diff) | |
download | gentoo-da8c6dde5207a230c73ad433e417f1772697a81a.tar.gz gentoo-da8c6dde5207a230c73ad433e417f1772697a81a.tar.bz2 gentoo-da8c6dde5207a230c73ad433e417f1772697a81a.zip |
net-mail/courier-imap: new EAPI=6 version to fix a few bugs.
This new version contains upstream fixes for the ongoing removal of
the SSL3 protocol. That should fix bug 593064, which otherwise would
require SSL3 support in OpenSSL. The new version also renames
"maildirmake" (and its man page) to "courier-maildirmake" to avoid a
collision with mail-mta/netqmail (bug 482098).
During the upgrade, the ebuild was updated to use EAPI=6. The patches
it uses were bumped to be -p1 compatible, and now the PATCHES array
and eapply are used in src_prepare. The eutils and multilib eclasses
were dropped, since they were only used for epatch and get_libdir.
I also tried to clean up a few bits in src_install. I changed one use
of $WORKDIR/tmp to $T, and tried to avoid changing directories so much
(by spelling out the target paths). I removed a recursive dohtml, and
replaced it with a few calls to dodoc. I also fixed a bare "chmod" to
use fperms.
Gentoo-Bug: 482098
Gentoo-Bug: 593064
Package-Manager: Portage-2.3.3, Repoman-2.3.1
Diffstat (limited to 'net-mail')
6 files changed, 337 insertions, 0 deletions
diff --git a/net-mail/courier-imap/Manifest b/net-mail/courier-imap/Manifest index 19a6b5b20ed7..55a35f8242a4 100644 --- a/net-mail/courier-imap/Manifest +++ b/net-mail/courier-imap/Manifest @@ -1,2 +1,3 @@ DIST courier-imap-4.15.tar.bz2 3266353 SHA256 6c34107e7ba9e5396d50b58fb414a495806335cab7135c96ad85a3816785b109 SHA512 7829662282db5e6f414a1d34f06a94c2dd028e263510f01b49ebd3a1a4994055ecc08604568f5a44a30f6411e3a34e0d6c38807c29eaf255752191e885f82e1a WHIRLPOOL 1b5e42bd1f72e3205030b54e9564ce45c4eccb394b31c64a616f225def5a5df05f74ef62c59fbea63b18ce336d77cc2368170a982abb7a6e94d309d0c6ee4dd2 DIST courier-imap-4.16.2.tar.bz2 3028445 SHA256 3be244b3c4d3d5c5e33efb37e4cf712ae83cbe21e43c31725e0d996ab4acc387 SHA512 42a685324b630835fe0c8735a67879e099f96eadf091c803368a9dd478a80b4ab47225fda6142942569c96b21355b5dac5e174ff434bcdc78784a810d2088609 WHIRLPOOL d1d8af441a8c6f13f81705489deded11fdd8f66bf79a66f9076ed4e7b6e0644d9f9034887a043d8c9c9a55031db9c2c9a2ca0ac53cbbef96c5ed25275c50e9e3 +DIST courier-imap-4.17.3.tar.bz2 3202534 SHA256 6dcbd913344634c8d7bde573c5fd55c86307181798df1192b7d777ec567898fc SHA512 3166cc703cdc09a71d33257671a662d95cfdb8977bc3b19e0218a4d25eb99a1a108d2868a6eb593106e6538aadf684f11ff0426cd58d522e3ca4b2988f0a88f1 WHIRLPOOL edc8249f2eb923121978bde8f2895add4d74e3e54839bbf63f4b2e8506d162796f91550d63e7491afbc6e589fe034aa9b91ce8789ec5bd64b0e48a6472243a8c diff --git a/net-mail/courier-imap/courier-imap-4.17.3.ebuild b/net-mail/courier-imap/courier-imap-4.17.3.ebuild new file mode 100644 index 000000000000..8bdfa5a4f4bc --- /dev/null +++ b/net-mail/courier-imap/courier-imap-4.17.3.ebuild @@ -0,0 +1,231 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools libtool systemd + +DESCRIPTION="An IMAP daemon designed specifically for maildirs" +HOMEPAGE="http://www.courier-mta.org/" +SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="berkdb debug fam +gdbm gnutls ipv6 libressl selinux trashquota" + +REQUIRED_USE="|| ( berkdb gdbm )" + +CDEPEND=" + gnutls? ( net-libs/gnutls ) + !gnutls? ( + !libressl? ( dev-libs/openssl:0= ) + libressl? ( dev-libs/libressl:0= ) + ) + >=net-libs/courier-authlib-0.61 + >=net-libs/courier-unicode-1.3 + >=net-mail/mailbase-0.00-r8 + berkdb? ( sys-libs/db:= ) + fam? ( virtual/fam ) + gdbm? ( >=sys-libs/gdbm-1.8.0 )" +DEPEND="${CDEPEND} + dev-lang/perl + !mail-mta/courier + userland_GNU? ( sys-process/procps )" +RDEPEND="${CDEPEND} + selinux? ( sec-policy/selinux-courier )" + +# get rid of old style virtual - bug 350792 +# all blockers really needed? +RDEPEND="${RDEPEND} + !mail-mta/courier + !net-mail/bincimap + !net-mail/cyrus-imapd + !net-mail/uw-imap" + +RC_VER="4.0.6-r1" +INITD_VER="4.0.6-r1" + +PATCHES=( + "${FILESDIR}/${PN}-4.17-disable-fam-configure.ac.patch" + "${FILESDIR}/${PN}-4.17-aclocal-fix.patch" +) + +src_prepare() { + default + + # These patches should fix problems detecting BerkeleyDB. + # We now can compile with db4 support. + if use berkdb ; then + eapply "${FILESDIR}/${PN}-4.17-db4-bdbobj_configure.ac.patch" + eapply "${FILESDIR}/${PN}-4.17-db4-configure.ac.patch" + fi + + eautoreconf +} + +src_configure() { + local myconf="" + + # Default to gdbm if both berkdb and gdbm are present. + if use gdbm ; then + einfo "Building with GDBM support" + myconf="${myconf} --with-db=gdbm" + elif use berkdb ; then + einfo "Building with BerkeleyDB support" + myconf="${myconf} --with-db=db" + fi + + if use trashquota ; then + einfo "Building with Trash Quota Support" + myconf="${myconf} --with-trashquota" + fi + + use debug && myconf="${myconf} debug=true" + + econf \ + --disable-root-check \ + --bindir=/usr/sbin \ + --sysconfdir="/etc/${PN}" \ + --libexecdir="/usr/$(get_libdir)/${PN}" \ + --localstatedir="/var/lib/${PN}" \ + --with-authdaemonvar="/var/lib/${PN}/authdaemon" \ + --enable-workarounds-for-imap-client-bugs \ + --with-mailuser=mail \ + --with-mailgroup=mail \ + $(use_with fam) \ + $(use_with ipv6) \ + $(use_with gnutls) \ + ${myconf} + + # Change the pem file location. + sed -i -e "s:^\(TLS_CERTFILE=\).*:\1/etc/courier-imap/imapd.pem:" \ + libs/imap/imapd-ssl.dist || \ + die "sed failed" + + sed -i -e "s:^\(TLS_CERTFILE=\).*:\1/etc/courier-imap/pop3d.pem:" \ + libs/imap/pop3d-ssl.dist || \ + die "sed failed" +} + +src_compile() { + # spurious failures with parallel compiles + emake -j1 +} + +src_install() { + dodir "/var/lib/${PN}" /etc/pam.d + default + rm -r "${D}/etc/pam.d" || die + + # Avoid name collisions in /usr/sbin wrt imapd and pop3d + for name in imapd pop3d ; do + mv "${D}/usr/sbin/"{,courier-}${name} \ + || die "failed to rename ${name} to courier-${name}" + done + + # Hack /usr/lib/courier-imap/foo.rc to use ${MAILDIR} instead of + # 'Maildir', and to use /usr/sbin/courier-foo names. + for service in {imapd,pop3d}{,-ssl} ; do + sed -e 's/Maildir/${MAILDIR}/' \ + -i "${D}/usr/$(get_libdir)/${PN}/${service}.rc" \ + || die "sed failed" + sed -e "s/\/usr\/sbin\/${service}/\/usr\/sbin\/courier-${service}/" \ + -i "${D}/usr/$(get_libdir)/${PN}/${service}.rc" \ + || die "sed failed" + done + + # Rename the config files correctly and add a value for ${MAILDIR} + # to them. + for service in {imapd,pop3d}{,-ssl} ; do + mv "${D}/etc/${PN}/${service}"{.dist,} \ + || die "failed to rename ${service}.dist to ${service}" + echo -e '\n# Hardwire a value for ${MAILDIR}' \ + >> "${D}/etc/${PN}/${service}" + echo 'MAILDIR=.maildir' >> "${D}/etc/${PN}/${service}" + echo 'MAILDIRPATH=.maildir' >> "${D}/etc/${PN}/${service}" + done + + for service in imapd pop3d ; do + echo -e '# Put any program for ${PRERUN} here' \ + >> "${D}/etc/${PN}/${service}" + echo 'PRERUN=' >> "${D}/etc/${PN}/${service}" + echo -e '# Put any program for ${LOGINRUN} here' \ + >> "${D}/etc/${PN}/${service}" + echo -e '# this is for relay-ctrl-allow in 4*' \ + >> "${D}/etc/${PN}/${service}" + echo 'LOGINRUN=' >> "${D}/etc/${PN}/${service}" + done + + for x in "${D}/usr/sbin"/* ; do + if [[ -L "${x}" ]] ; then + rm "${x}" || die "failed to remove ${x}" + fi + done + + mv "${D}/usr/share"/* "${D}/usr/sbin/" || die + mv "${D}/usr/sbin/man" "${D}/usr/share/" || die + + rm "${D}/usr/sbin/"{mkimapdcert,mkpop3dcert} || die + + dosbin "${FILESDIR}/mkimapdcert" "${FILESDIR}/mkpop3dcert" + + dosym /usr/sbin/courierlogger "/usr/$(get_libdir)/${PN}/courierlogger" + + for initd in courier-{imapd,pop3d}{,-ssl} ; do + sed -e "s:GENTOO_LIBDIR:$(get_libdir):g" \ + "${FILESDIR}/${PN}-${INITD_VER}-${initd}.rc6" \ + > "${T}/${initd}" \ + || die "initd libdir-sed failed" + doinitd "${T}/${initd}" + done + + systemd_newunit "${FILESDIR}"/courier-authdaemond-r1.service \ + courier-authdaemond.service + systemd_newunit "${FILESDIR}"/courier-imapd-ssl-r1.service \ + courier-imapd-ssl.service + systemd_newunit "${FILESDIR}"/courier-imapd-r1.service \ + courier-imapd.service + + exeinto "/usr/$(get_libdir)/${PN}" + for exe in gentoo-{imapd,pop3d}{,-ssl}.rc courier-{imapd,pop3d}.indirect ; do + sed -e "s:GENTOO_LIBDIR:$(get_libdir):g" \ + "${FILESDIR}/${PN}-${RC_VER}-${exe}" \ + > "${T}/${exe}" \ + || die "exe libdir-sed failed" + doexe "${T}/${exe}" + done + + # Avoid a collision with mail-mta/netqmail, bug 482098. + mv "${D}/usr/sbin/"{,courier-}maildirmake \ + || die "failed to rename maildirmake to courier-maildirmake" + mv "${D}/usr/share/man/man1/"{,courier-}maildirmake.1 \ + || die "failed to rename maildirmake.1 to courier-maildirmake.1" + + dodoc AUTHORS INSTALL NEWS README ChangeLog + dodoc "${FILESDIR}/${PN}-gentoo.readme" + docinto imap + dodoc libs/imap/ChangeLog libs/imap/BUGS* libs/imap/README* + docinto maildir + dodoc libs/maildir/AUTHORS libs/maildir/*.html libs/maildir/README* + docinto rfc2045 + dodoc libs/rfc2045/*.html + docinto tcpd + dodoc libs/tcpd/README* libs/tcpd/*.html +} + +pkg_postinst() { + elog "Please read http://www.courier-mta.org/imap/INSTALL.html#upgrading" + elog "and remove TLS_DHPARAMS from configuration files or run mkdhparams" + + elog "For a quick-start howto please refer to" + elog "${PN}-gentoo.readme in /usr/share/doc/${PF}" + # Some users have been reporting that permissions on this directory were + # getting scrambled, so let's ensure that they are sane. + fperms 0755 "${ROOT}/usr/$(get_libdir)/${PN}" +} + +src_test() { + ewarn "make check is not supported by this package due to the" + ewarn "--enable-workarounds-for-imap-client-bugs option." +} diff --git a/net-mail/courier-imap/files/courier-imap-4.17-aclocal-fix.patch b/net-mail/courier-imap/files/courier-imap-4.17-aclocal-fix.patch new file mode 100644 index 000000000000..9f88646b223a --- /dev/null +++ b/net-mail/courier-imap/files/courier-imap-4.17-aclocal-fix.patch @@ -0,0 +1,12 @@ +Kill unneeded call to AC_PROG_SYSCONFTOOL (bug #168206). + +--- a/configure.ac.orig 2006-12-30 09:28:52.000000000 -0500 ++++ b/configure.ac 2007-02-27 12:13:38.000000000 -0500 +@@ -15,7 +15,6 @@ + AC_PROG_INSTALL + AC_PROG_LN_S + AC_PROG_MAKE_SET +-AC_PROG_SYSCONFTOOL + AC_LIBTOOL_DLOPEN + AM_PROG_LIBTOOL + diff --git a/net-mail/courier-imap/files/courier-imap-4.17-db4-bdbobj_configure.ac.patch b/net-mail/courier-imap/files/courier-imap-4.17-db4-bdbobj_configure.ac.patch new file mode 100644 index 000000000000..1f9b7747a7f8 --- /dev/null +++ b/net-mail/courier-imap/files/courier-imap-4.17-db4-bdbobj_configure.ac.patch @@ -0,0 +1,33 @@ +--- a/libs/bdbobj/configure.ac.orig 2013-08-25 20:52:10.000000000 +0200 ++++ b/libs/bdbobj/configure.ac 2013-11-22 10:39:25.787861774 +0100 +@@ -23,15 +23,22 @@ + dnl Checks for libraries. + + saveLIBS="$LIBS" +-AC_CHECK_LIB(db, dbopen, [ LIBDB=-ldb ; LIBS="-ldb $LIBS" ], +- AC_CHECK_LIB(db, db_open, [ LIBDB=-ldb ; LIBS="-ldb $LIBS"], +- AC_CHECK_LIB(db, db_env_create, [ LIBDB=-ldb; LIBS="-ldb $LIBS"]) +- )) +- ++for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db ++ do ++ AC_CHECK_LIB($dbname, db_create_4004, [ LIBDB=-l$dbname ; LIBS="-l$dbname $LIBS"; break ], ++ AC_CHECK_LIB($dbname, db_create_4003, [ LIBDB=-l$dbname ; LIBS="-l$dbname $LIBS"; break ], ++ AC_CHECK_LIB($dbname, db_create_4002, [ LIBDB=-l$dbname ; LIBS="-l$dbname $LIBS"; break ], ++ AC_CHECK_LIB($dbname, db_create_4001, [ LIBDB=-l$dbname ; LIBS="-l$dbname $LIBS"; break ], ++ AC_CHECK_LIB($dbname, db_create_4000, [ LIBDB=-l$dbname ; LIBS="-l$dbname $LIBS"; break ], ++ AC_CHECK_LIB($dbname, db_create, [ LIBDB=-l$dbname ; LIBS="-l$dbname $LIBS"; break ])))))) ++ done + FOUND_DB=0 +-AC_CHECK_FUNC(dbopen, FOUND_DB=1) +-AC_CHECK_FUNC(db_open, FOUND_DB=1) +-AC_CHECK_FUNC(db_env_create, FOUND_DB=1) ++AC_CHECK_FUNC(db_create_4004, FOUND_DB=1) ++AC_CHECK_FUNC(db_create_4003, FOUND_DB=1) ++AC_CHECK_FUNC(db_create_4002, FOUND_DB=1) ++AC_CHECK_FUNC(db_create_4001, FOUND_DB=1) ++AC_CHECK_FUNC(db_create_4000, FOUND_DB=1) ++AC_CHECK_FUNC(db_create, FOUND_DB=1) + + LIBS="$saveLIBS" + diff --git a/net-mail/courier-imap/files/courier-imap-4.17-db4-configure.ac.patch b/net-mail/courier-imap/files/courier-imap-4.17-db4-configure.ac.patch new file mode 100644 index 000000000000..e89c5618f842 --- /dev/null +++ b/net-mail/courier-imap/files/courier-imap-4.17-db4-configure.ac.patch @@ -0,0 +1,33 @@ +--- a/configure.ac.orig 2013-09-28 19:44:24.000000000 +0200 ++++ b/configure.ac 2013-11-22 10:46:34.910990069 +0100 +@@ -180,15 +180,21 @@ + if test "$db" != "gdbm" + then + +- AC_CHECK_LIB(db, dbopen, [ LIBDB=-ldb ; LIBS="-ldb $LIBS" ], +- AC_CHECK_LIB(db, db_open, [ LIBDB=-ldb ; LIBS="-ldb $LIBS"], +- AC_CHECK_LIB(db, db_env_create, +- [ LIBDB=-ldb; LIBS="-ldb $LIBS"]) +- )) +- +- AC_CHECK_FUNC(dbopen, HAVE_BDB=1) +- AC_CHECK_FUNC(db_open, HAVE_BDB=1) +- AC_CHECK_FUNC(db_env_create, HAVE_BDB=1) ++for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db ++ do ++ AC_CHECK_LIB($dbname, db_create_4004, [ LIBDB=-l$dbname ; LIBS="-l$dbname $LIBS"; break ], ++ AC_CHECK_LIB($dbname, db_create_4003, [ LIBDB=-l$dbname ; LIBS="-l$dbname $LIBS"; break ], ++ AC_CHECK_LIB($dbname, db_create_4002, [ LIBDB=-l$dbname ; LIBS="-l$dbname $LIBS"; break ], ++ AC_CHECK_LIB($dbname, db_create_4001, [ LIBDB=-l$dbname ; LIBS="-l$dbname $LIBS"; break ], ++ AC_CHECK_LIB($dbname, db_create_4000, [ LIBDB=-l$dbname ; LIBS="-l$dbname $LIBS"; break ], ++ AC_CHECK_LIB($dbname, db_create, [ LIBDB=-l$dbname ; LIBS="-l$dbname $LIBS"; break ])))))) ++ done ++AC_CHECK_FUNC(db_create_4004, HAVE_BDB=1) ++AC_CHECK_FUNC(db_create_4003, HAVE_BDB=1) ++AC_CHECK_FUNC(db_create_4002, HAVE_BDB=1) ++AC_CHECK_FUNC(db_create_4001, HAVE_BDB=1) ++AC_CHECK_FUNC(db_create_4000, HAVE_BDB=1) ++AC_CHECK_FUNC(db_create, HAVE_BDB=1) + fi + + LIBS="$saveLIBS" diff --git a/net-mail/courier-imap/files/courier-imap-4.17-disable-fam-configure.ac.patch b/net-mail/courier-imap/files/courier-imap-4.17-disable-fam-configure.ac.patch new file mode 100644 index 000000000000..6d26895c0d7b --- /dev/null +++ b/net-mail/courier-imap/files/courier-imap-4.17-disable-fam-configure.ac.patch @@ -0,0 +1,27 @@ +Bug #48838. Patch to enable/disable FAM support (20 Aug 2004 +langthang@gentoo.org). This patch should fix bug #51540. The fam USE +flag is not needed for shared folder support. + +--- a/libs/maildir/configure.ac.orig 2004-06-08 15:44:23.000000000 -0700 ++++ b/libs/maildir/configure.ac 2004-08-14 15:28:20.525714876 -0700 +@@ -73,6 +73,12 @@ + dnl Checks for library functions. + AC_CHECK_HEADER(fam.h, :, :) + AC_CHECK_FUNCS(symlink readlink strcasecmp utime utimes) ++AC_ARG_WITH(fam, [ --with-fam Compile with FAM support], ++ fam="$withval", ++ fam="no") ++ ++if test "$fam" != "no" ++then + AC_CHECK_LIB(fam, FAMOpen, [ + LIBFAM=-lfam + AC_DEFINE_UNQUOTED(HAVE_FAM,1, +@@ -87,6 +93,7 @@ + AC_MSG_ERROR([[FAM development libraries not found.]]) ] + ) + ]) ++fi + + AC_SUBST(LIBFAM) + |