diff options
author | Jeremy Olexa <darkside@gentoo.org> | 2009-02-20 04:26:16 +0000 |
---|---|---|
committer | Jeremy Olexa <darkside@gentoo.org> | 2009-02-20 04:26:16 +0000 |
commit | 90b58f65cdf9bd9b515933ea5e779f0911c1a191 (patch) | |
tree | 846a77e8f2261c2c9341c46a3d6e9bf6a37c4e4c /net-mail/fetchmail | |
parent | Check for USE=dbus net-dns/avahi. Bug #256190. (diff) | |
download | gentoo-2-90b58f65cdf9bd9b515933ea5e779f0911c1a191.tar.gz gentoo-2-90b58f65cdf9bd9b515933ea5e779f0911c1a191.tar.bz2 gentoo-2-90b58f65cdf9bd9b515933ea5e779f0911c1a191.zip |
(non maintainer commit) don't run fetchmail as root - create new fetchmail user instead, long standing bug in Gentoo. Fixed by Brian Verkley in bug 124387
(Portage version: 2.2_rc23/cvs/Linux x86_64)
Diffstat (limited to 'net-mail/fetchmail')
-rw-r--r-- | net-mail/fetchmail/ChangeLog | 10 | ||||
-rw-r--r-- | net-mail/fetchmail/fetchmail-6.3.9-r1.ebuild | 112 | ||||
-rw-r--r-- | net-mail/fetchmail/files/fetchmail.new | 33 |
3 files changed, 154 insertions, 1 deletions
diff --git a/net-mail/fetchmail/ChangeLog b/net-mail/fetchmail/ChangeLog index c0c9012dcbbc..90066049be1e 100644 --- a/net-mail/fetchmail/ChangeLog +++ b/net-mail/fetchmail/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-mail/fetchmail # Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-mail/fetchmail/ChangeLog,v 1.154 2009/01/11 15:56:08 dertobi123 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-mail/fetchmail/ChangeLog,v 1.155 2009/02/20 04:26:15 darkside Exp $ + +*fetchmail-6.3.9-r1 (20 Feb 2009) + + 20 Feb 2009; Jeremy Olexa <darkside@gentoo.org> +files/fetchmail.new, + +fetchmail-6.3.9-r1.ebuild: + (non maintainer commit) don't run fetchmail as root - create new fetchmail + user instead, long standing bug in Gentoo. Fixed by Brian Verkley in bug + 124387 11 Jan 2009; Tobias Scherbaum <dertobi123@gentoo.org> -files/fetchmail-6.3.7-poll-again.patch, -fetchmail-6.3.6.ebuild, diff --git a/net-mail/fetchmail/fetchmail-6.3.9-r1.ebuild b/net-mail/fetchmail/fetchmail-6.3.9-r1.ebuild new file mode 100644 index 000000000000..fc5062ef52b7 --- /dev/null +++ b/net-mail/fetchmail/fetchmail-6.3.9-r1.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-mail/fetchmail/fetchmail-6.3.9-r1.ebuild,v 1.1 2009/02/20 04:26:15 darkside Exp $ + +inherit multilib python eutils + +DESCRIPTION="the legendary remote-mail retrieval and forwarding utility" +HOMEPAGE="http://fetchmail.berlios.de" +SRC_URI="mirror://berlios/${PN}/${P}.tar.bz2" + +LICENSE="GPL-2 public-domain" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd" +IUSE="ssl nls ipv6 kerberos krb4 hesiod" + +RDEPEND="hesiod? ( net-dns/hesiod ) + ssl? ( >=dev-libs/openssl-0.9.6 ) + kerberos? ( app-crypt/mit-krb5 ) + nls? ( virtual/libintl ) + elibc_FreeBSD? ( sys-libs/com_err ) + virtual/python" +DEPEND="${RDEPEND} + nls? ( sys-devel/gettext )" + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 -1 /var/lib/${PN} ${PN} +} + +src_unpack() { + unpack ${A} + cd "${S}" + + # this patch fixes bug #34788 (ticho@gentoo.org 2004-09-03) + epatch "${FILESDIR}"/${PN}-6.2.5-broken-headers.patch + + # dont compile during src_install + : > "${S}"/py-compile +} + +src_compile() { +# PYTHON=: \ + econf \ + --disable-dependency-tracking \ + --enable-RPA \ + --enable-NTLM \ + --enable-SDPS \ + $(use_enable nls) \ + $(use_enable ipv6 inet6) \ + $(use_with kerberos gssapi) \ + $(use_with kerberos kerberos5) \ + $(use_with krb4 kerberos) \ + $(use_with ssl) \ + $(use_with hesiod) \ + ${myconf} || die "Configuration failed." + # wont compile reliably on smp (mkennedy@gentoo.org 2003-11-12) + emake || die "Compilation failed." +} + +src_install() { + # dir for pidfile + dodir /var/run/${PN} || die "dodir failed" + keepdir /var/run/${PN} + fowners ${PN}:${PN} /var/run/${PN} || die "fowners failed" + + # fetchmail's homedir (holds fetchmail's .fetchids) + dodir /var/lib/${PN} || die "dodir failed" + keepdir /var/lib/${PN} + fowners ${PN}:${PN} /var/lib/${PN} || die "fowners failed" + fperms 700 /var/lib/${PN} || die "fperms failed" + + emake DESTDIR="${D}" install || die + python_need_rebuild + + dohtml *.html + + dodoc FAQ FEATURES NEWS NOTES README README.NTLM README.SSL TODO || die + + newinitd "${FILESDIR}"/fetchmail.new fetchmail || die + newconfd "${FILESDIR}"/conf.d-fetchmail fetchmail || die + + docinto contrib + local f + for f in contrib/* ; do + [ -f "${f}" ] && dodoc "${f}" + done +} + +pkg_postinst() { + python_version + python_mod_optimize /usr/$(get_libdir)/python${PYVER}/site-packages + + if ! python -c "import Tkinter" >/dev/null 2>&1 + then + elog + elog "You will not be able to use fetchmailconf(1), because you" + elog "don't seem to have Python with tkinter support." + elog + elog "If you want to be able to use fetchmailconf(1), do the following:" + elog " 1. Add 'tk' to the USE variable in /etc/make.conf." + elog " 2. (Re-)merge Python." + elog + fi + + elog "Please see /etc/conf.d/fetchmail if you want to adjust" + elog "the polling delay used by the fetchmail init script." +} + +pkg_postrm() { + python_version + python_mod_cleanup /usr/$(get_libdir)/python${PYVER}/site-packages +} diff --git a/net-mail/fetchmail/files/fetchmail.new b/net-mail/fetchmail/files/fetchmail.new new file mode 100644 index 000000000000..4646fa4ccaf3 --- /dev/null +++ b/net-mail/fetchmail/files/fetchmail.new @@ -0,0 +1,33 @@ +#!/sbin/runscript + +pidfile=/var/run/fetchmail/fetchmail.pid + +depend() { + need net + use mta +} + +checkconfig() { + if [ ! -f /etc/fetchmailrc ]; then + eerror "Configuration file /etc/fetchmailrc not found" + return 1 + fi +} + +start() { + checkconfig || return 1 + + ebegin "Starting fetchmail" + start-stop-daemon --start --quiet \ + --chuid fetchmail --exec /usr/bin/fetchmail \ + -- -d ${polling_period} -f /etc/fetchmailrc \ + --pidfile ${pidfile} -i /var/lib/fetchmail/.fetchids + eend ${?} +} + +stop() { + ebegin "Stopping fetchmail" + start-stop-daemon --stop --quiet --pidfile ${pidfile} + eend ${?} +} + |