ChangeLog

# ChangeLog for net-mail/mailgraph
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: /var/cvsroot/gentoo-x86/net-mail/mailgraph/ChangeLog,v 1.35 2008/06/15 10:19:03 zmedico Exp $

15 Jun 2008; Zac Medico mailgraph-1.14.ebuild:
Bug #226505 - For compatibility with phase execution order in
>=portage-2.1.5, call has_version inside pkg_preinst instead of
pkg_postinst.

14 May 2008; Stefan Briesenick
files/mailgraph.initd-new:
fixed init-script for openrc.

27 Apr 2008; Tobias Scherbaum
files/mailgraph.initd-new:
Fix initscript for OpenRC, #218212

29 Dec 2007; Tobias Scherbaum
-files/mailgraph.confd, -files/mailgraph.initd, -mailgraph-1.13.ebuild:
Cleanup

27 Dec 2007; Richard Freeman mailgraph-1.14.ebuild:
amd64 stable - bug 203171

24 Dec 2007; Brent Baude mailgraph-1.14.ebuild:
Marking mailgraph-1.14 ppc64 for bug 203171

24 Dec 2007; nixnut mailgraph-1.14.ebuild:
Stable on ppc wrt bug 203171

24 Dec 2007; Dawid Węgliński mailgraph-1.14.ebuild:
Stable on x86 (bug #203171)

23 Dec 2007; Ferris McCormick mailgraph-1.14.ebuild:
Sparc stable, Bug #203171.

14 Nov 2007; Andrej Kacian -mailgraph-1.12.ebuild,
mailgraph-1.13.ebuild, mailgraph-1.14.ebuild:
Version cleanup. Get rid of logrotate USE flag - bug #198901.

22 Oct 2007; Raúl Porcel mailgraph-1.14.ebuild:
Add ~sparc wrt #192992

22 Oct 2007; Tobias Scherbaum
mailgraph-1.14.ebuild:
Remove unnecessary pkg_preinst() and fix has_version usage, thanks to Donnie
Berkholz

*mailgraph-1.14 (22 Oct 2007)

22 Oct 2007; Tobias Scherbaum
+mailgraph-1.14.ebuild:
Version bump

15 Oct 2007; Markus Rothe mailgraph-1.13.ebuild:
Stable on ppc64

12 Jun 2007; Marius Mauch mailgraph-1.13.ebuild:
Replacing einfo with elog

24 May 2007; Andrej Kacian mailgraph-1.13.ebuild:
Stable on x86.

01 Apr 2007; Andrej Kacian +files/mailgraph.confd-new,
+files/mailgraph.initd-new, +files/mailgraph.logrotate-new,
mailgraph-1.13.ebuild:
Use ebuild by Wolfram Schlich , bug #149175 for
1.13. This makes mailgraph not run as root.

*mailgraph-1.13 (01 Apr 2007)

01 Apr 2007; Andrej Kacian
-files/mailgraph-1.11-regexp.patch, -mailgraph-1.11.ebuild,
-mailgraph-1.11-r1.ebuild, +mailgraph-1.13.ebuild:
Removed obsolete ebuilds. Version bump to 1.13. Changed URL in HOMEPAGE and
SRC_URI to follow upstream.

01 Apr 2007; Andrej Kacian mailgraph-1.11.ebuild,
mailgraph-1.11-r1.ebuild, mailgraph-1.12.ebuild:
Do not install boilerplate COPYING file - it's generic GPL-2.

22 Feb 2007; Piotr Jaroszyński ChangeLog:
Transition to Manifest2.

27 Dec 2006; Andrej Kacian mailgraph-1.12.ebuild:
Revert my last change of install location for mailgraph.cgi. Solves bug
#159187.

20 Dec 2006; Fernando J. Pereda mailgraph-1.12.ebuild:
Fix bug #152499

07 May 2006; Markus Rothe mailgraph-1.12.ebuild:
Stable on ppc64

18 Mar 2006; mailgraph-1.12.ebuild:
Install mailgraph.cgi to correct place. Stable on x86.

24 Jan 2006; Mark Loeser metadata.xml:
Removing myself as the maintainer

23 Jan 2006; Markus Rothe mailgraph-1.12.ebuild:
Added ~ppc64; bug #117851

*mailgraph-1.12 (21 Oct 2005)

21 Oct 2005; Mark Loeser +mailgraph-1.12.ebuild:
Version bump; bug #110055

31 Jul 2005; Mark Loeser mailgraph-1.11-r1.ebuild:
Stable on x86.

23 Jul 2005; Mark Loeser files/mailgraph.initd:
Small fix to get the mailgraph log working.

*mailgraph-1.11-r1 (27 Jun 2005)

27 Jun 2005; Mark Loeser
+files/mailgraph-1.11-regexp.patch, +mailgraph-1.11-r1.ebuild:
Revision bump to get the patch from bug #97151. Thanks to Andrej Kacian
for the patch.

26 Jun 2005; Andrej Kacian mailgraph-1.11.ebuild:
Added ~amd64 keyword.

25 Jun 2005; Mark Loeser files/mailgraph.confd,
mailgraph-1.11.ebuild:
Added a comment to the conf.d file, and fixed the DEPEND on rrdtool. Also
removed a deprecated function from the webapp eclass.

25 Jun 2005; David Holm mailgraph-1.11.ebuild:
Added to ~ppc.

*mailgraph-1.11 (25 Jun 2005)

25 Jun 2005; Mark Loeser +files/mailgraph.confd,
+files/mailgraph.initd, +metadata.xml, +mailgraph-1.11.ebuild:
Initial commit of mailgraph. Thanks to Aaron Walker for
the init scripts and ebuild. More info on bug #74372

Manifest

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

AUX mailgraph.confd-new 764 RMD160 579dd58dd2c2a2103236ed3b5b3dccdbdd8d3ba7 SHA1 3ab3f965e25e70853d7631314c3c1826156a188a SHA256 86b970df1bbb3a4e85226ce6036a228b2ff155db88124b49bc07e08f022ac1d2
AUX mailgraph.initd-new 911 RMD160 b893043eb3f975a3d2a6b3bb29378bd0bd938b7f SHA1 00ae6bc55428b6af4950dbd99d621830aadbaf73 SHA256 ebae0c40b7b917df084d9825358035c10e0e997e7d7922490c507db41b55c2c2
AUX mailgraph.logrotate-new 895 RMD160 62bac0366f91949747b2234b56d9a7bf61e5e47d SHA1 b7e4741bfac3021b6fcf5ce8911ec5a25b11c7f8 SHA256 3e1241e1d209a4679fe1f2f3d45716858acb1c0f1daac4b6709d9cb9d8564504
DIST mailgraph-1.14.tar.gz 22014 RMD160 928969a4bdc3b9ff39a7fe16b98789f07b02e5f8 SHA1 6a2ead01ffd8fe49e520057daf97072e106b6c69 SHA256 50ea6ea8a33f5015926edd8b70a4d954ac27df4863514bddc5e69c948a7aac81
EBUILD mailgraph-1.14.ebuild 4174 RMD160 82025cc4d8ced0e7a1e62d43add6dc80c8a40186 SHA1 c11da4c6e8ae425ff0be27b87fc0dee6bcfde174 SHA256 1ab3656eb424a0c332c5246c53e8f923231eb0bf9e3b25078b20880eb3014dd6
MISC ChangeLog 5037 RMD160 cbc54b6a35913c80e899014db1aedac0137aaea1 SHA1 ca1c20042d85408e719c4f290155be970ed4205a SHA256 78b0088d9b46cc4d815529c22b4466528497eb59fd6b45d2edaa59bb4e153f1c
MISC metadata.xml 163 RMD160 9d7831690071ef6a890ce066c38c9c4e851a2107 SHA1 6dcd4fa8a9b5cfcc7c0ae80c09e43395fe8e71a7 SHA256 38427b537ef2f561a685876ae3a7799382a1bf7fabef6c2d8765ca9d05056aa2
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkhU7J8ACgkQ/ejvha5XGaMwagCdHkMS9mC5Zj4HTaXc6Kegr3f6
PnkAoLJTyTz6Nxa+asw3edVoARqmJ+Aj
=nuSx
-----END PGP SIGNATURE-----

files

mailgraph-1.14.ebuild

# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-mail/mailgraph/mailgraph-1.14.ebuild,v 1.10 2008/06/15 10:19:03 zmedico Exp $

inherit eutils webapp

DESCRIPTION="A mail statistics RRDtool frontend for Postfix"
HOMEPAGE="http://mailgraph.schweikert.ch/"
SRC_URI="http://mailgraph.schweikert.ch//pub/${P}.tar.gz"

LICENSE="GPL-2"
KEYWORDS="amd64 ppc ppc64 sparc x86"
IUSE=""

RDEPEND="dev-lang/perl
dev-perl/File-Tail
>=net-analyzer/rrdtool-1.2.2"
DEPEND=">=sys-apps/sed-4"

user_group_setup() {
# add user and group for mailgraph daemon
# also add mgraph to the group adm so it's able to
# read syslog logfile /var/log/messages (should be owned by
# root:adm with permission 0640)
enewgroup mgraph
enewuser mgraph -1 -1 /var/empty mgraph,adm
}

pkg_setup() {
webapp_pkg_setup
built_with_use net-analyzer/rrdtool perl \
|| die "net-analyzer/rrdtool must be built with USE=perl"
user_group_setup
}

src_unpack() {
unpack ${A}
cd "${S}"
sed -i \
-e "s|\(my \$rrd = '\).*'|\1/var/lib/mailgraph/mailgraph.rrd'|" \
-e "s|\(my \$rrd_virus = '\).*'|\1/var/lib/mailgraph/mailgraph_virus.rrd'|" \
mailgraph.cgi || die "sed mailgraph.cgi failed"
}

src_install() {
webapp_src_preinst
# be sure to run webapp_src_install *before* doing the directories below
# because it cripples all other permissions :-(
webapp_src_install

# for the RRDs
dodir /var/lib
diropts -omgraph -gmgraph -m0750
dodir /var/lib/mailgraph
keepdir /var/lib/mailgraph

# log and pid file
diropts ""
dodir /var/log
dodir /var/run
diropts -omgraph -gadm -m0750
dodir /var/log/mailgraph
keepdir /var/log/mailgraph
dodir /var/run/mailgraph
keepdir /var/run/mailgraph

# logrotate config for mailgraph log
diropts ""
dodir /etc/logrotate.d
insopts -m0644
insinto /etc/logrotate.d
newins "${FILESDIR}"/mailgraph.logrotate-new mailgraph

# mailgraph daemon
newbin mailgraph.pl mailgraph

# mailgraph CGI script
exeinto ${MY_CGIBINDIR}
doexe mailgraph.cgi

# init/conf files for mailgraph daemon
newinitd "${FILESDIR}"/mailgraph.initd-new mailgraph
newconfd "${FILESDIR}"/mailgraph.confd-new mailgraph

# docs
dodoc README CHANGES
}

pkg_preinst() {
has_version "<=${CATEGORY}/${PN}-1.12"
previous_less_or_equal_to_1_12=$?
}

pkg_postinst() {
# Fix ownerships - previous versions installed these with
# root as owner
if [[ $previous_less_or_equal_to_1_12 = 0 ]] ; then
if [[ -d /var/lib/mailgraph ]] ; then
chown mgraph:mgraph /var/lib/mailgraph
fi
if [[ -d /var/log/mailgraph ]] ; then
chown mgraph:adm /var/log/mailgraph
fi
if [[ -d /var/run/mailgraph ]] ; then
chown mgraph:adm /var/run/mailgraph
fi
fi
elog
elog "Mailgraph will run as user mgraph with group adm by default."
elog "This can be changed in /etc/conf.d/mailgraph if it doesn't fit."
elog "Remember to adjust MG_DAEMON_LOG, MG_DAEMON_PID and MG_DAEMON_RRD"
elog "as well!"
elog
elog
ewarn
ewarn "Please make sure the MG_LOGFILE (default: /var/log/messages) is readable"
ewarn "by group adm or change MG_DAEMON_GID in /etc/conf.d/mailgraph accordingly!"
ewarn
ewarn "Please make sure *all* mail related logs (MTA, spamfilter, virus scanner)"
ewarn "go to the file /var/log/messages or change MG_LOGFILE in"
ewarn "/etc/conf.d/mailgraph accordingly! Otherwise mailgraph won't get to know"
ewarn "the corresponding events (virus/spam mail found etc.)."
ewarn
ewarn
elog
elog "Checking for user apache"
if egetent passwd apache >&/dev/null; then
elog
elog "Adding user apache to group mgraph so the included"
elog "CGI script is able to read the mailgraph RRD files"
elog
if ! gpasswd -a apache mgraph >&/dev/null; then
eerror "Failed to add user apache to group mgraph!"
eerror "Please check manually."
fi
else
elog
elog "User apache not found, maybe we will be running a"
elog "webserver with a different UID?"
elog "If that's the case, please add that user to the"
elog "group mgraph manually to enable the included"
elog "CGI script to read the mailgraph RRD files:"
elog
elog "\tgpasswd -a mgraph"
elog
fi
}

metadata.xml




net-mail