public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-mail/courier-imap/, net-mail/courier-imap/files/
@ 2016-05-02 22:24 Austin English
  0 siblings, 0 replies; 6+ messages in thread
From: Austin English @ 2016-05-02 22:24 UTC (permalink / raw
  To: gentoo-commits

commit:     90ed5084795deceaf8f77100072807d0fb4432a8
Author:     Austin English <wizardedit <AT> gentoo <DOT> org>
AuthorDate: Mon May  2 21:26:15 2016 +0000
Commit:     Austin English <wizardedit <AT> gentoo <DOT> org>
CommitDate: Mon May  2 22:21:47 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90ed5084

net-mail/courier-imap: use #!/sbin/openrc-run instead of #!/sbin/runscript

Gentoo-Bug: https://bugs.gentoo.org/573846

Package-Manager: portage-2.2.26

 net-mail/courier-imap/courier-imap-4.15-r2.ebuild  | 230 +++++++++++++++++++++
 .../courier-imap/courier-imap-4.16.0-r1.ebuild     | 219 ++++++++++++++++++++
 .../courier-imap/courier-imap-4.16.2-r1.ebuild     | 219 ++++++++++++++++++++
 .../courier-imap-4.0.6-r1-courier-imapd-ssl.rc6    |   4 +-
 .../files/courier-imap-4.0.6-r1-courier-imapd.rc6  |   4 +-
 .../courier-imap-4.0.6-r1-courier-pop3d-ssl.rc6    |   4 +-
 .../files/courier-imap-4.0.6-r1-courier-pop3d.rc6  |   4 +-
 7 files changed, 676 insertions(+), 8 deletions(-)

diff --git a/net-mail/courier-imap/courier-imap-4.15-r2.ebuild b/net-mail/courier-imap/courier-imap-4.15-r2.ebuild
new file mode 100644
index 0000000..f58f093
--- /dev/null
+++ b/net-mail/courier-imap/courier-imap-4.15-r2.ebuild
@@ -0,0 +1,230 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils multilib 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 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd"
+IUSE="berkdb debug fam +gdbm ipv6 selinux gnutls trashquota"
+
+REQUIRED_USE="|| ( berkdb gdbm )"
+
+CDEPEND="
+	gnutls? ( net-libs/gnutls )
+	!gnutls? ( >=dev-libs/openssl-0.9.6:0= )
+	>=net-libs/courier-authlib-0.61
+	>=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"
+
+src_prepare() {
+	# Bug #48838. Patch to enable/disable FAM support.
+	# 20 Aug 2004 langthang@gentoo.org
+	# This patch should fix bug #51540. fam USE flag is not needed for shared folder support.
+	epatch "${FILESDIR}"/${P}-disable-fam-configure.ac.patch
+
+	# Kill unneeded call to AC_PROG_SYSCONFTOOL (bug #168206).
+	epatch "${FILESDIR}"/${P}-aclocal-fix.patch
+
+	# These patches should fix problems detecting BerkeleyDB.
+	# We now can compile with db4 support.
+	if use berkdb ; then
+		epatch \
+			"${FILESDIR}"/${P}-db4-bdbobj_configure.ac.patch \
+			"${FILESDIR}"/${P}-db4-configure.ac.patch
+	fi
+
+	eautoreconf
+}
+
+src_configure() {
+	local myconf=""
+
+	# 19 Aug 2004 langthang@gentoo.org
+	# 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
+
+	# Disabling unicode is no longer supported
+	# By default all available character sets are included
+	# Set ENABLE_UNICODE=iso-8859-1,utf-8,iso-8859-10
+	# to include only specified translation tables.
+	if [[ -z "${ENABLE_UNICODE}" ]] ; then
+		einfo "ENABLE_UNICODE is not set, building with all available character sets"
+		myconf="${myconf} --enable-unicode"
+	else
+		einfo "ENABLE_UNICODE is set, building with unicode=${ENABLE_UNICODE}"
+		myconf="${myconf} --enable-unicode=${ENABLE_UNICODE}"
+	fi
+
+	if use trashquota ; then
+		einfo "Building with Trash Quota Support"
+		myconf="${myconf} --with-trashquota"
+	fi
+
+	use debug && myconf="${myconf} debug=true"
+
+	# Do the actual build now
+	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 -Rf "${D}/etc/pam.d" || die
+
+	# Avoid name collisions in /usr/sbin wrt imapd and pop3d
+	cd "${D}/usr/sbin" || die
+	for name in imapd pop3d ; do
+		mv -f "${name}" "courier-${name}" || die "Failed to mv ${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.
+	cd "${D}/usr/$(get_libdir)/${PN}" || die
+	for service in {imapd,pop3d}{,-ssl} ; do
+		sed -i -e 's/Maildir/${MAILDIR}/' "${service}.rc" || die "sed failed"
+		sed -i -e "s/\/usr\/sbin\/${service}/\/usr\/sbin\/courier-${service}/" "${service}.rc" || die "sed failed"
+	done
+
+	# Rename the config files correctly and add a value for ${MAILDIR} to them.
+	cd "${D}/etc/${PN}" || die
+	for service in {imapd,pop3d}{,-ssl} ; do
+		mv -f "${service}.dist" "${service}" || die "Failed to mv ${service}.dist to ${service}"
+		echo -e '\n# Hardwire a value for ${MAILDIR}' >> "${service}"
+		echo 'MAILDIR=.maildir' >> "${service}"
+		echo 'MAILDIRPATH=.maildir' >> "${service}"
+	done
+	for service in imapd pop3d ; do
+		echo -e '# Put any program for ${PRERUN} here' >> "${service}"
+		echo 'PRERUN=' >> "${service}"
+		echo -e '# Put any program for ${LOGINRUN} here' >> "${service}"
+		echo -e '# this is for relay-ctrl-allow in 4*' >> "${service}"
+		echo 'LOGINRUN=' >> "${service}"
+	done
+
+	cd "${D}/usr/sbin" || die
+	for x in * ; do
+		if [[ -L "${x}" ]] ; then
+			rm -f "${x}" || die "Failed to rm ${x}"
+		fi
+	done
+
+	cd ../share || die
+	mv -f * ../sbin || die
+	mv -f ../sbin/man . || die
+	cd .. || die
+
+	for x in mkimapdcert mkpop3dcert ; do
+		mv -f "${D}/usr/sbin/${x}" "${D}/usr/sbin/${x}.orig" || die "Failed to mv /usr/sbin/${x} to /usr/sbin/${x}.orig"
+	done
+
+	dosbin "${FILESDIR}/mkimapdcert" "${FILESDIR}/mkpop3dcert"
+
+	dosym /usr/sbin/courierlogger /usr/$(get_libdir)/${PN}/courierlogger
+
+	mkdir "${WORKDIR}/tmp" && cd "${WORKDIR}/tmp" || die
+
+	for initd in courier-{imapd,pop3d}{,-ssl} ; do
+		sed -e "s:GENTOO_LIBDIR:$(get_libdir):g" "${FILESDIR}/${PN}-${INITD_VER}-${initd}.rc6" > "${initd}" || die "initd libdir-sed failed"
+		doinitd "${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}" > "${exe}" || die "exe libdir-sed failed"
+		doexe "${exe}"
+	done
+
+	dodir /usr/bin
+	mv -f "${D}/usr/sbin/maildirmake" "${D}/usr/bin/maildirmake" || die "Failed to mv /usr/sbin/maildirmake to /usr/bin/maildirmake"
+
+	# Bug #45953, more docs.
+	cd "${S}" || die
+	dohtml -r "${S}"/*
+	dodoc "${S}"/{AUTHORS,INSTALL,NEWS,README,ChangeLog} "${FILESDIR}"/${PN}-gentoo.readme
+	docinto imap
+	dodoc "${S}"/libs/imap/{ChangeLog,BUGS,BUGS.html,README}
+	docinto maildir
+	dodoc "${S}"/libs/maildir/{AUTHORS,INSTALL,README.maildirquota.txt,README.sharedfolders.txt}
+	docinto tcpd
+	dodoc "${S}"/libs/tcpd/README.couriertls
+}
+
+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.
+	chmod 0755 "${ROOT}/usr/$(get_libdir)/${PN}" || die "Failed to ensure sane permissions on ${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/courier-imap-4.16.0-r1.ebuild b/net-mail/courier-imap/courier-imap-4.16.0-r1.ebuild
new file mode 100644
index 0000000..698cd89
--- /dev/null
+++ b/net-mail/courier-imap/courier-imap-4.16.0-r1.ebuild
@@ -0,0 +1,219 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils multilib 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="~amd64 ~hppa ~ppc64 ~x86"
+IUSE="berkdb debug fam +gdbm ipv6 selinux gnutls trashquota"
+
+REQUIRED_USE="|| ( berkdb gdbm )"
+
+CDEPEND="
+	gnutls? ( net-libs/gnutls )
+	!gnutls? ( >=dev-libs/openssl-0.9.6:0= )
+	>=net-libs/courier-authlib-0.61
+	~net-libs/courier-unicode-1.1
+	>=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"
+
+src_prepare() {
+	# Bug #48838. Patch to enable/disable FAM support.
+	# 20 Aug 2004 langthang@gentoo.org
+	# This patch should fix bug #51540. fam USE flag is not needed for shared folder support.
+	epatch "${FILESDIR}"/${PN}-4.15-disable-fam-configure.ac.patch
+
+	# Kill unneeded call to AC_PROG_SYSCONFTOOL (bug #168206).
+	epatch "${FILESDIR}"/${PN}-4.15-aclocal-fix.patch
+
+	# These patches should fix problems detecting BerkeleyDB.
+	# We now can compile with db4 support.
+	if use berkdb ; then
+		epatch \
+			"${FILESDIR}"/${PN}-4.15-db4-bdbobj_configure.ac.patch \
+			"${FILESDIR}"/${PN}-4.15-db4-configure.ac.patch
+	fi
+
+	eautoreconf
+}
+
+src_configure() {
+	local myconf=""
+
+	# 19 Aug 2004 langthang@gentoo.org
+	# 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"
+
+	# Do the actual build now
+	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 -Rf "${D}/etc/pam.d" || die
+
+	# Avoid name collisions in /usr/sbin wrt imapd and pop3d
+	cd "${D}/usr/sbin" || die
+	for name in imapd pop3d ; do
+		mv -f "${name}" "courier-${name}" || die "Failed to mv ${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.
+	cd "${D}/usr/$(get_libdir)/${PN}" || die
+	for service in {imapd,pop3d}{,-ssl} ; do
+		sed -i -e 's/Maildir/${MAILDIR}/' "${service}.rc" || die "sed failed"
+		sed -i -e "s/\/usr\/sbin\/${service}/\/usr\/sbin\/courier-${service}/" "${service}.rc" || die "sed failed"
+	done
+
+	# Rename the config files correctly and add a value for ${MAILDIR} to them.
+	cd "${D}/etc/${PN}" || die
+	for service in {imapd,pop3d}{,-ssl} ; do
+		mv -f "${service}.dist" "${service}" || die "Failed to mv ${service}.dist to ${service}"
+		echo -e '\n# Hardwire a value for ${MAILDIR}' >> "${service}"
+		echo 'MAILDIR=.maildir' >> "${service}"
+		echo 'MAILDIRPATH=.maildir' >> "${service}"
+	done
+	for service in imapd pop3d ; do
+		echo -e '# Put any program for ${PRERUN} here' >> "${service}"
+		echo 'PRERUN=' >> "${service}"
+		echo -e '# Put any program for ${LOGINRUN} here' >> "${service}"
+		echo -e '# this is for relay-ctrl-allow in 4*' >> "${service}"
+		echo 'LOGINRUN=' >> "${service}"
+	done
+
+	cd "${D}/usr/sbin"
+	for x in * ; do
+		if [[ -L "${x}" ]] ; then
+			rm -f "${x}" || die "Failed to rm ${x}"
+		fi
+	done
+
+	cd ../share
+	mv -f * ../sbin
+	mv -f ../sbin/man .
+	cd ..
+
+	for x in mkimapdcert mkpop3dcert ; do
+		mv -f "${D}/usr/sbin/${x}" "${D}/usr/sbin/${x}.orig" || die "Failed to mv /usr/sbin/${x} to /usr/sbin/${x}.orig"
+	done
+
+	dosbin "${FILESDIR}/mkimapdcert" "${FILESDIR}/mkpop3dcert"
+
+	dosym /usr/sbin/courierlogger /usr/$(get_libdir)/${PN}/courierlogger
+
+	mkdir "${WORKDIR}/tmp" ; cd "${WORKDIR}/tmp"
+
+	for initd in courier-{imapd,pop3d}{,-ssl} ; do
+		sed -e "s:GENTOO_LIBDIR:$(get_libdir):g" "${FILESDIR}/${PN}-${INITD_VER}-${initd}.rc6" > "${initd}" || die "initd libdir-sed failed"
+		doinitd "${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}" > "${exe}" || die "exe libdir-sed failed"
+		doexe "${exe}"
+	done
+
+	dodir /usr/bin
+	mv -f "${D}/usr/sbin/maildirmake" "${D}/usr/bin/maildirmake" || die "Failed to mv /usr/sbin/maildirmake to /usr/bin/maildirmake"
+
+	# Bug #45953, more docs.
+	cd "${S}" || die
+	dohtml -r "${S}"/*
+	dodoc "${S}"/{AUTHORS,INSTALL,NEWS,README,ChangeLog} "${FILESDIR}"/${PN}-gentoo.readme
+	docinto imap
+	dodoc "${S}"/libs/imap/{ChangeLog,BUGS,BUGS.html,README}
+	docinto maildir
+	dodoc "${S}"/libs/maildir/{AUTHORS,INSTALL,README.maildirquota.txt,README.sharedfolders.txt}
+	docinto tcpd
+	dodoc "${S}"/libs/tcpd/README.couriertls
+}
+
+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.
+	chmod 0755 "${ROOT}/usr/$(get_libdir)/${PN}" || die "Failed to ensure sane permissions on ${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/courier-imap-4.16.2-r1.ebuild b/net-mail/courier-imap/courier-imap-4.16.2-r1.ebuild
new file mode 100644
index 0000000..8a7c2b4
--- /dev/null
+++ b/net-mail/courier-imap/courier-imap-4.16.2-r1.ebuild
@@ -0,0 +1,219 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit autotools eutils multilib 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="~amd64 ~hppa ~mips ~ppc64 ~x86"
+IUSE="berkdb debug fam +gdbm ipv6 selinux gnutls trashquota"
+
+REQUIRED_USE="|| ( berkdb gdbm )"
+
+CDEPEND="
+	gnutls? ( net-libs/gnutls )
+	!gnutls? ( >=dev-libs/openssl-0.9.6: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"
+
+src_prepare() {
+	# Bug #48838. Patch to enable/disable FAM support.
+	# 20 Aug 2004 langthang@gentoo.org
+	# This patch should fix bug #51540. fam USE flag is not needed for shared folder support.
+	epatch "${FILESDIR}"/${PN}-4.15-disable-fam-configure.ac.patch
+
+	# Kill unneeded call to AC_PROG_SYSCONFTOOL (bug #168206).
+	epatch "${FILESDIR}"/${PN}-4.15-aclocal-fix.patch
+
+	# These patches should fix problems detecting BerkeleyDB.
+	# We now can compile with db4 support.
+	if use berkdb ; then
+		epatch \
+			"${FILESDIR}"/${PN}-4.15-db4-bdbobj_configure.ac.patch \
+			"${FILESDIR}"/${PN}-4.15-db4-configure.ac.patch
+	fi
+
+	eautoreconf
+}
+
+src_configure() {
+	local myconf=""
+
+	# 19 Aug 2004 langthang@gentoo.org
+	# 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"
+
+	# Do the actual build now
+	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 -Rf "${D}/etc/pam.d" || die
+
+	# Avoid name collisions in /usr/sbin wrt imapd and pop3d
+	cd "${D}/usr/sbin" || die
+	for name in imapd pop3d ; do
+		mv -f "${name}" "courier-${name}" || die "Failed to mv ${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.
+	cd "${D}/usr/$(get_libdir)/${PN}" || die
+	for service in {imapd,pop3d}{,-ssl} ; do
+		sed -i -e 's/Maildir/${MAILDIR}/' "${service}.rc" || die "sed failed"
+		sed -i -e "s/\/usr\/sbin\/${service}/\/usr\/sbin\/courier-${service}/" "${service}.rc" || die "sed failed"
+	done
+
+	# Rename the config files correctly and add a value for ${MAILDIR} to them.
+	cd "${D}/etc/${PN}" || die
+	for service in {imapd,pop3d}{,-ssl} ; do
+		mv -f "${service}.dist" "${service}" || die "Failed to mv ${service}.dist to ${service}"
+		echo -e '\n# Hardwire a value for ${MAILDIR}' >> "${service}"
+		echo 'MAILDIR=.maildir' >> "${service}"
+		echo 'MAILDIRPATH=.maildir' >> "${service}"
+	done
+	for service in imapd pop3d ; do
+		echo -e '# Put any program for ${PRERUN} here' >> "${service}"
+		echo 'PRERUN=' >> "${service}"
+		echo -e '# Put any program for ${LOGINRUN} here' >> "${service}"
+		echo -e '# this is for relay-ctrl-allow in 4*' >> "${service}"
+		echo 'LOGINRUN=' >> "${service}"
+	done
+
+	cd "${D}/usr/sbin"
+	for x in * ; do
+		if [[ -L "${x}" ]] ; then
+			rm -f "${x}" || die "Failed to rm ${x}"
+		fi
+	done
+
+	cd ../share
+	mv -f * ../sbin
+	mv -f ../sbin/man .
+	cd ..
+
+	for x in mkimapdcert mkpop3dcert ; do
+		mv -f "${D}/usr/sbin/${x}" "${D}/usr/sbin/${x}.orig" || die "Failed to mv /usr/sbin/${x} to /usr/sbin/${x}.orig"
+	done
+
+	dosbin "${FILESDIR}/mkimapdcert" "${FILESDIR}/mkpop3dcert"
+
+	dosym /usr/sbin/courierlogger /usr/$(get_libdir)/${PN}/courierlogger
+
+	mkdir "${WORKDIR}/tmp" ; cd "${WORKDIR}/tmp"
+
+	for initd in courier-{imapd,pop3d}{,-ssl} ; do
+		sed -e "s:GENTOO_LIBDIR:$(get_libdir):g" "${FILESDIR}/${PN}-${INITD_VER}-${initd}.rc6" > "${initd}" || die "initd libdir-sed failed"
+		doinitd "${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}" > "${exe}" || die "exe libdir-sed failed"
+		doexe "${exe}"
+	done
+
+	dodir /usr/bin
+	mv -f "${D}/usr/sbin/maildirmake" "${D}/usr/bin/maildirmake" || die "Failed to mv /usr/sbin/maildirmake to /usr/bin/maildirmake"
+
+	# Bug #45953, more docs.
+	cd "${S}" || die
+	dohtml -r "${S}"/*
+	dodoc "${S}"/{AUTHORS,INSTALL,NEWS,README,ChangeLog} "${FILESDIR}"/${PN}-gentoo.readme
+	docinto imap
+	dodoc "${S}"/libs/imap/{ChangeLog,BUGS,BUGS.html,README}
+	docinto maildir
+	dodoc "${S}"/libs/maildir/{AUTHORS,INSTALL,README.maildirquota.txt,README.sharedfolders.txt}
+	docinto tcpd
+	dodoc "${S}"/libs/tcpd/README.couriertls
+}
+
+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.
+	chmod 0755 "${ROOT}/usr/$(get_libdir)/${PN}" || die "Failed to ensure sane permissions on ${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.0.6-r1-courier-imapd-ssl.rc6 b/net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-imapd-ssl.rc6
index 1d62b80..38f69b1 100644
--- a/net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-imapd-ssl.rc6
+++ b/net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-imapd-ssl.rc6
@@ -1,5 +1,5 @@
-#!/sbin/runscript
-# Copyright 1999-2014 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 

diff --git a/net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-imapd.rc6 b/net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-imapd.rc6
index 8d78d9a..2c336d7 100644
--- a/net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-imapd.rc6
+++ b/net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-imapd.rc6
@@ -1,5 +1,5 @@
-#!/sbin/runscript
-# Copyright 1999-2014 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 

diff --git a/net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-pop3d-ssl.rc6 b/net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-pop3d-ssl.rc6
index edd157b..ba32da5 100644
--- a/net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-pop3d-ssl.rc6
+++ b/net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-pop3d-ssl.rc6
@@ -1,5 +1,5 @@
-#!/sbin/runscript
-# Copyright 1999-2014 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 

diff --git a/net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-pop3d.rc6 b/net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-pop3d.rc6
index 7f3da57..9a4ecf6 100644
--- a/net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-pop3d.rc6
+++ b/net-mail/courier-imap/files/courier-imap-4.0.6-r1-courier-pop3d.rc6
@@ -1,5 +1,5 @@
-#!/sbin/runscript
-# Copyright 1999-2014 Gentoo Foundation
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-mail/courier-imap/, net-mail/courier-imap/files/
@ 2017-03-27  5:10 Michael Orlitzky
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Orlitzky @ 2017-03-27  5:10 UTC (permalink / raw
  To: gentoo-commits

commit:     da8c6dde5207a230c73ad433e417f1772697a81a
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 27 05:06:18 2017 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Mon Mar 27 05:07:38 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da8c6dde

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

 net-mail/courier-imap/Manifest                     |   1 +
 net-mail/courier-imap/courier-imap-4.17.3.ebuild   | 231 +++++++++++++++++++++
 .../files/courier-imap-4.17-aclocal-fix.patch      |  12 ++
 ...courier-imap-4.17-db4-bdbobj_configure.ac.patch |  33 +++
 .../files/courier-imap-4.17-db4-configure.ac.patch |  33 +++
 ...ourier-imap-4.17-disable-fam-configure.ac.patch |  27 +++
 6 files changed, 337 insertions(+)

diff --git a/net-mail/courier-imap/Manifest b/net-mail/courier-imap/Manifest
index 19a6b5b20ed..55a35f8242a 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 00000000000..8bdfa5a4f4b
--- /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 00000000000..9f88646b223
--- /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 00000000000..1f9b7747a7f
--- /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 00000000000..e89c5618f84
--- /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 00000000000..6d26895c0d7
--- /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)
+ 


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-mail/courier-imap/, net-mail/courier-imap/files/
@ 2019-07-05  7:14 Alfredo Tupone
  0 siblings, 0 replies; 6+ messages in thread
From: Alfredo Tupone @ 2019-07-05  7:14 UTC (permalink / raw
  To: gentoo-commits

commit:     e8b5e3f3a2b90e9cabacd6aa453261b88567bf9f
Author:     Tupone Alfredo <tupone <AT> gentoo <DOT> org>
AuthorDate: Fri Jul  5 07:14:20 2019 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Fri Jul  5 07:14:20 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8b5e3f3

net-mail/courier-imap: Install a monthly cron job for dhparams

Closes: https://bugs.gentoo.org/517682
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>
Package-Manager: Portage-2.3.66, Repoman-2.3.11

 net-mail/courier-imap/courier-imap-5.0.7.ebuild | 2 ++
 net-mail/courier-imap/files/courier-imap.cron   | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/net-mail/courier-imap/courier-imap-5.0.7.ebuild b/net-mail/courier-imap/courier-imap-5.0.7.ebuild
index c109323e7fa..859c7b600a2 100644
--- a/net-mail/courier-imap/courier-imap-5.0.7.ebuild
+++ b/net-mail/courier-imap/courier-imap-5.0.7.ebuild
@@ -233,6 +233,8 @@ src_install() {
 	dodoc libs/rfc2045/*.html
 	docinto tcpd
 	dodoc libs/tcpd/README* libs/tcpd/*.html
+	exeinto /etc/cron.monthly
+	newexe "${FILESDIR}"/${PN}.cron ${PN}
 }
 
 pkg_postinst() {

diff --git a/net-mail/courier-imap/files/courier-imap.cron b/net-mail/courier-imap/files/courier-imap.cron
new file mode 100644
index 00000000000..c1c517d5554
--- /dev/null
+++ b/net-mail/courier-imap/files/courier-imap.cron
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+/usr/sbin/mkdhparams


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-mail/courier-imap/, net-mail/courier-imap/files/
@ 2020-05-08  6:39 Alfredo Tupone
  0 siblings, 0 replies; 6+ messages in thread
From: Alfredo Tupone @ 2020-05-08  6:39 UTC (permalink / raw
  To: gentoo-commits

commit:     59f6afac11c7acc7530a6b34e7ccff45f5d5acf3
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Fri May  8 06:38:27 2020 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Fri May  8 06:39:17 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59f6afac

net-mail/courier-imap: Not calling ar directly

Closes: https://bugs.gentoo.org/721240
Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 net-mail/courier-imap/courier-imap-5.0.8.ebuild             |  1 +
 net-mail/courier-imap/files/courier-imap-5.0.8-ar-fix.patch | 11 +++++++++++
 2 files changed, 12 insertions(+)

diff --git a/net-mail/courier-imap/courier-imap-5.0.8.ebuild b/net-mail/courier-imap/courier-imap-5.0.8.ebuild
index f12cb6999da..2241aa00f31 100644
--- a/net-mail/courier-imap/courier-imap-5.0.8.ebuild
+++ b/net-mail/courier-imap/courier-imap-5.0.8.ebuild
@@ -68,6 +68,7 @@ and rerun mkdhparams if needed. Location has changed
 PATCHES=(
 	"${FILESDIR}/${PN}-4.17-disable-fam-configure.ac.patch"
 	"${FILESDIR}/${PN}-4.17-aclocal-fix.patch"
+	"${FILESDIR}/${P}-ar-fix.patch"
 )
 
 src_prepare() {

diff --git a/net-mail/courier-imap/files/courier-imap-5.0.8-ar-fix.patch b/net-mail/courier-imap/files/courier-imap-5.0.8-ar-fix.patch
new file mode 100644
index 00000000000..b21de6d904c
--- /dev/null
+++ b/net-mail/courier-imap/files/courier-imap-5.0.8-ar-fix.patch
@@ -0,0 +1,11 @@
+--- a/libs/soxwrap/configure.ac	2020-05-08 08:23:11.243813555 +0200
++++ b/libs/soxwrap/configure.ac	2020-05-08 08:23:26.255575196 +0200
+@@ -18,7 +18,7 @@
+ dnl Checks for programs.
+ AC_PROG_AWK
+ AC_PROG_INSTALL
+-AC_PROG_RANLIB
++LT_INIT
+ AC_PROG_LN_S
+ AC_PROG_CC
+ 


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-mail/courier-imap/, net-mail/courier-imap/files/
@ 2022-11-05 21:58 Alfredo Tupone
  0 siblings, 0 replies; 6+ messages in thread
From: Alfredo Tupone @ 2022-11-05 21:58 UTC (permalink / raw
  To: gentoo-commits

commit:     97d77f1a2112fee595e5b3b3fa825cb71ca1f740
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Sat Nov  5 21:56:59 2022 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Sat Nov  5 21:58:21 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97d77f1a

net-mail/courier-imap: add 5.1.8

Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 net-mail/courier-imap/Manifest                     |   1 +
 net-mail/courier-imap/courier-imap-5.1.8.ebuild    | 251 +++++++++++++++++++++
 .../files/courier-imap-5.1.8-aclocal-fix.patch     |  12 +
 3 files changed, 264 insertions(+)

diff --git a/net-mail/courier-imap/Manifest b/net-mail/courier-imap/Manifest
index a95f15f53850..fed636f29f98 100644
--- a/net-mail/courier-imap/Manifest
+++ b/net-mail/courier-imap/Manifest
@@ -2,3 +2,4 @@ DIST courier-imap-5.1.2.tar.bz2 3361084 BLAKE2B 0b42ec3a765c1adf425408f72b34beb7
 DIST courier-imap-5.1.3.tar.bz2 3361334 BLAKE2B 750a0fdca6882b26a7f9eef062b516a2d9271e6f73b8cd999653fc37947ffcfcbe7bb88c246be0e662f235b04c5a6f7d5dc7e06010075353670ecb1a2ca413ff SHA512 6685fe596eefcdc976f23aa115b3bc3d13e14421b1d430eb59a4bbee419ba86cb190e536871b42cbebba96160a3894cdef86571ae10bd7ee052cb7e7f8552dca
 DIST courier-imap-5.1.4.tar.bz2 3363196 BLAKE2B 272548fcbc560ebf39e63170702de30970bee1e0026c31e0c8f0a6dcf86271565cda1e83e9fe50174aa2db2f9172cfc78132746ca8eb2e6749f16c7e994d0db9 SHA512 33e54e3b369335f5bc234c638c9bf4f68bc39dc9cb6cc5e3e3ba200f72a7b2fcdca6a4f7e35f32f494406f8757749ccf5204be93ecd2edbfabab4b6316d5957c
 DIST courier-imap-5.1.7.tar.bz2 3364221 BLAKE2B 8a34595879b6ab249db8d90d0a7845b63503c7e9f1ff449e90311fdc086b6a1486fa9ed748d4eba7541265b958ea58514bafd6c90c88cc21f579705e33e5fe55 SHA512 15f64ea78f34d4a3af9f82a8247907324b26a8c550f5e97930548449fc2e9b649d2b5511de063cf3e449843516e681232a3197f2afb40e18be0f36fd8e05e66d
+DIST courier-imap-5.1.8.tar.bz2 3395074 BLAKE2B 1d563d49d61f3ab89297afdc9dd2947280ea5d2d21e0b1e91ec4fa1f54b9385ee41d32b7488236f3492fa41349d7f35c1dc84ee30e07a1752db424391f871db0 SHA512 c939c82e81f8ae98dc52279ee8fffabfee78db7792fdd3bd14ad0e60f7c5bd2c581cffcc3b7f6e2271f250556e9e80713cfcd1834653d59698d51d91435d28f3

diff --git a/net-mail/courier-imap/courier-imap-5.1.8.ebuild b/net-mail/courier-imap/courier-imap-5.1.8.ebuild
new file mode 100644
index 000000000000..46c3b04b3b1a
--- /dev/null
+++ b/net-mail/courier-imap/courier-imap-5.1.8.ebuild
@@ -0,0 +1,251 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools readme.gentoo-r1 systemd
+
+DESCRIPTION="An IMAP daemon designed specifically for maildirs"
+HOMEPAGE="https://www.courier-mta.org/imap/"
+SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+
+IUSE="berkdb debug fam +gdbm gnutls ipv6 selinux trashquota"
+REQUIRED_USE="|| ( berkdb gdbm )"
+
+CDEPEND="
+	gnutls? ( net-libs/gnutls:=[tools] )
+	!gnutls? (
+		dev-libs/openssl:0=
+	)
+	>=net-libs/courier-authlib-0.71
+	>=net-libs/courier-unicode-2:=
+	>=net-mail/mailbase-0.00-r8
+	net-dns/libidn:=
+	berkdb? ( sys-libs/db:= )
+	fam? ( virtual/fam )
+	gdbm? ( >=sys-libs/gdbm-1.8.0:= )
+"
+DEPEND="${CDEPEND}
+	dev-lang/perl
+	!mail-mta/courier
+	sys-process/procps
+"
+RDEPEND="${CDEPEND}
+	selinux? ( sec-policy/selinux-courier )
+"
+
+# get rid of old style virtual - bug 350792
+RDEPEND="${RDEPEND}
+	!mail-mta/courier
+	!net-mail/cyrus-imapd
+"
+
+RC_VER="4.0.6-r1"
+INITD_VER="4.0.6-r1"
+
+# make check is not supported by this package due to the
+# --enable-workarounds-for-imap-client-bugs option.
+RESTRICT="test"
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="
+Please read http://www.courier-mta.org/imap/INSTALL.html#upgrading
+and remove TLS_DHPARAMS from configuration files or run mkdhparams
+
+For a quick-start howto please refer to
+${PN}-gentoo.readme in /usr/share/doc/${PF}
+
+Please convert maildir to utf8
+and rerun mkdhparams if needed. Location has changed
+"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-5.1.8-aclocal-fix.patch"
+	"${FILESDIR}/${PN}-5.0.8-ar-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 \
+		--with-notice=unicode \
+		--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 \
+		--with-certsdir="/etc/courier-imap" \
+		$(use_with fam) \
+		$(use_with ipv6) \
+		$(use_with gnutls) \
+		${myconf}
+}
+
+#src_compile() {
+	# spurious failures with parallel compiles, bug #????
+#	emake -j1
+#}
+
+src_install() {
+	dodir "/var/lib/${PN}" /etc/pam.d
+	keepdir /var/lib/courier-imap
+
+	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 ../../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
+
+	cp "${FILESDIR}"/courier-*-r1.service .
+
+	sed -i \
+		-e "s:/usr/lib/:/usr/$(get_libdir)/:" \
+		courier-*-r1.service \
+		|| die
+
+	systemd_newunit courier-authdaemond-r1.service \
+					courier-authdaemond.service
+	systemd_newunit courier-imapd-ssl-r1.service \
+					courier-imapd-ssl.service
+	systemd_newunit 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
+	readme.gentoo_create_doc
+	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
+	exeinto /etc/cron.monthly
+	newexe "${FILESDIR}"/${PN}.cron ${PN}
+}
+
+pkg_postinst() {
+	# 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}"
+
+	readme.gentoo_print_elog
+
+	elog ""
+	elog "Courier Imap now run as user mail:mail."
+	elog ""
+	elog "This require you to enable read/write access to the caches:"
+	elog "/var/lib/courier-imap/courierssl*cache (chown mail:mail)"
+	elog "and read access to the certificates (e.g. /etc/courier-imap/pop3d.pem )"
+}

diff --git a/net-mail/courier-imap/files/courier-imap-5.1.8-aclocal-fix.patch b/net-mail/courier-imap/files/courier-imap-5.1.8-aclocal-fix.patch
new file mode 100644
index 000000000000..0ab4ca0f5403
--- /dev/null
+++ b/net-mail/courier-imap/files/courier-imap-5.1.8-aclocal-fix.patch
@@ -0,0 +1,12 @@
+Kill unneeded call to AC_PROG_SYSCONFTOOL (bug #168206).
+
+--- a/configure.ac	2022-11-05 19:37:21.629552607 +0100
++++ b/configure.ac	2022-11-05 19:37:31.622405720 +0100
+@@ -14,7 +14,6 @@
+ AC_PROG_INSTALL
+ AC_PROG_LN_S
+ AC_PROG_MAKE_SET
+-AC_PROG_SYSCONFTOOL
+ LT_INIT
+ 
+ AC_PATH_PROGS(PERL, perl5 perl, perl)


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-mail/courier-imap/, net-mail/courier-imap/files/
@ 2023-01-23 22:07 Alfredo Tupone
  0 siblings, 0 replies; 6+ messages in thread
From: Alfredo Tupone @ 2023-01-23 22:07 UTC (permalink / raw
  To: gentoo-commits

commit:     5fdc644d9281aa4db34c108420ab24481e11c8ee
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 23 22:07:20 2023 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Mon Jan 23 22:07:20 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5fdc644d

net-mail/courier-imap: use courier-makedat

Closes: https://bugs.gentoo.org/884591
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 net-mail/courier-imap/courier-imap-5.2.1-r1.ebuild | 258 +++++++++++++++++++++
 .../files/courier-imap-5.2.1-makedat.patch         |  34 +++
 2 files changed, 292 insertions(+)

diff --git a/net-mail/courier-imap/courier-imap-5.2.1-r1.ebuild b/net-mail/courier-imap/courier-imap-5.2.1-r1.ebuild
new file mode 100644
index 000000000000..e49fb6eb3694
--- /dev/null
+++ b/net-mail/courier-imap/courier-imap-5.2.1-r1.ebuild
@@ -0,0 +1,258 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit autotools readme.gentoo-r1 systemd
+
+DESCRIPTION="An IMAP daemon designed specifically for maildirs"
+HOMEPAGE="https://www.courier-mta.org/imap/"
+SRC_URI="mirror://sourceforge/courier/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+
+IUSE="berkdb debug fam +gdbm gnutls ipv6 selinux trashquota"
+REQUIRED_USE="|| ( berkdb gdbm )"
+
+CDEPEND="
+	gnutls? ( net-libs/gnutls:=[tools] )
+	!gnutls? (
+		dev-libs/openssl:0=
+	)
+	>=net-libs/courier-authlib-0.71
+	>=net-libs/courier-unicode-2:=
+	>=net-mail/mailbase-0.00-r8
+	net-dns/libidn:=
+	berkdb? (
+		sys-libs/db:=
+		net-mail/courier-makedat[berkdb?,gdbm?]
+	)
+	fam? ( virtual/fam )
+	gdbm? (
+		>=sys-libs/gdbm-1.8.0:=
+		net-mail/courier-makedat[berkdb?,gdbm?]
+	)
+"
+DEPEND="${CDEPEND}
+	dev-lang/perl
+	!mail-mta/courier
+	sys-process/procps
+"
+RDEPEND="${CDEPEND}
+	selinux? ( sec-policy/selinux-courier )
+"
+
+# get rid of old style virtual - bug 350792
+RDEPEND="${RDEPEND}
+	!mail-mta/courier
+	!net-mail/cyrus-imapd
+"
+
+RC_VER="4.0.6-r1"
+INITD_VER="4.0.6-r1"
+
+# make check is not supported by this package due to the
+# --enable-workarounds-for-imap-client-bugs option.
+RESTRICT="test"
+
+DISABLE_AUTOFORMATTING="yes"
+DOC_CONTENTS="
+Please read http://www.courier-mta.org/imap/INSTALL.html#upgrading
+and remove TLS_DHPARAMS from configuration files or run mkdhparams
+
+For a quick-start howto please refer to
+${PN}-gentoo.readme in /usr/share/doc/${PF}
+
+Please convert maildir to utf8
+and rerun mkdhparams if needed. Location has changed
+"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-5.1.8-aclocal-fix.patch"
+	"${FILESDIR}/${PN}-5.0.8-ar-fix.patch"
+	"${FILESDIR}/${P}-makedat.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 \
+		--with-notice=unicode \
+		--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 \
+		--with-certsdir="/etc/courier-imap" \
+		$(use_with fam) \
+		$(use_with ipv6) \
+		$(use_with gnutls) \
+		${myconf}
+}
+
+#src_compile() {
+	# spurious failures with parallel compiles, bug #????
+#	emake -j1
+#}
+
+src_install() {
+	dodir "/var/lib/${PN}" /etc/pam.d
+	keepdir /var/lib/courier-imap
+
+	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 ../../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
+
+	cp "${FILESDIR}"/courier-*-r1.service .
+
+	sed -i \
+		-e "s:/usr/lib/:/usr/$(get_libdir)/:" \
+		courier-*-r1.service \
+		|| die
+
+	systemd_newunit courier-authdaemond-r1.service \
+					courier-authdaemond.service
+	systemd_newunit courier-imapd-ssl-r1.service \
+					courier-imapd-ssl.service
+	systemd_newunit 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
+	readme.gentoo_create_doc
+	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
+	exeinto /etc/cron.monthly
+	newexe "${FILESDIR}"/${PN}.cron ${PN}
+}
+
+pkg_postinst() {
+	# 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}"
+
+	readme.gentoo_print_elog
+
+	elog ""
+	elog "Courier Imap now run as user mail:mail."
+	elog ""
+	elog "This require you to enable read/write access to the caches:"
+	elog "/var/lib/courier-imap/courierssl*cache (chown mail:mail)"
+	elog "and read access to the certificates (e.g. /etc/courier-imap/pop3d.pem )"
+}

diff --git a/net-mail/courier-imap/files/courier-imap-5.2.1-makedat.patch b/net-mail/courier-imap/files/courier-imap-5.2.1-makedat.patch
new file mode 100644
index 000000000000..374bc8f045f8
--- /dev/null
+++ b/net-mail/courier-imap/files/courier-imap-5.2.1-makedat.patch
@@ -0,0 +1,34 @@
+--- a/Makefile.am	2023-01-23 22:58:11.644686431 +0100
++++ b/Makefile.am	2023-01-23 22:58:34.812309175 +0100
+@@ -13,7 +13,7 @@
+ SUBDIRS=libs/numlib libs/bdbobj libs/gdbmobj libs/soxwrap \
+ 	libs/rfc822 libs/rfc2045 \
+ 	libs/md5 libs/sha1 libs/random128 libs/rfc1035 libs/liblock \
+-	libs/maildir libs/makedat libs/libhmac \
++	libs/maildir libs/libhmac \
+ 	libs/waitlib libs/tcpd libs/rootcerts libs/imap
+ 
+ sbin_SCRIPTS=sharedindexinstall sharedindexsplit
+@@ -22,9 +22,9 @@
+ databin_SCRIPTS=mkimapdcert mkpop3dcert mkdhparams
+ 
+ binPROGRAMS=imapd pop3d maildirmake maildiracl deliverquota maildirkw \
+-	makeimapaccess makedat
++	makeimapaccess
+ sbinPROGRAMS=imaplogin pop3login
+-libexecPROGRAMS=makedatprog couriertcpd
++libexecPROGRAMS=couriertcpd
+ 
+ bin_PROGRAMS= @binPROGRAMS_exec@
+ sbin_PROGRAMS=@sbinPROGRAMS_exec@
+--- a/configure.ac	2023-01-23 22:59:15.960638991 +0100
++++ b/configure.ac	2023-01-23 22:59:29.744414452 +0100
+@@ -213,7 +213,7 @@
+ AC_CONFIG_SUBDIRS(libs/numlib libs/bdbobj libs/gdbmobj libs/soxwrap
+ 	libs/rfc822 libs/rfc1035 libs/rfc2045
+ 	libs/md5 libs/sha1 libs/random128 libs/liblock
+-	libs/maildir libs/makedat libs/libhmac
++	libs/maildir libs/libhmac
+ 	libs/waitlib libs/tcpd libs/rootcerts libs/imap)
+ 
+ # Courier-IMAP standalone does not use SOCKSv5


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-01-23 22:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-27  5:10 [gentoo-commits] repo/gentoo:master commit in: net-mail/courier-imap/, net-mail/courier-imap/files/ Michael Orlitzky
  -- strict thread matches above, loose matches on Subject: below --
2023-01-23 22:07 Alfredo Tupone
2022-11-05 21:58 Alfredo Tupone
2020-05-08  6:39 Alfredo Tupone
2019-07-05  7:14 Alfredo Tupone
2016-05-02 22:24 Austin English

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox