summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEray Aslan <eras@gentoo.org>2011-07-07 15:08:14 +0000
committerEray Aslan <eras@gentoo.org>2011-07-07 15:08:14 +0000
commitee5a3a053f075abbf885e4d3adcbe07b9cabf82b (patch)
treeb22167d495f669f29064256606a8a17c713b8988 /net-mail/mailgraph
parentFix SRC_URI. Remove "useless" restricts and instead use QA_PRESTRIPPED. Get a... (diff)
downloadhistorical-ee5a3a053f075abbf885e4d3adcbe07b9cabf82b.tar.gz
historical-ee5a3a053f075abbf885e4d3adcbe07b9cabf82b.tar.bz2
historical-ee5a3a053f075abbf885e4d3adcbe07b9cabf82b.zip
Fix depreciation warning and crashed status in init script - bugs #366581 #374311. EAPI bump.
Package-Manager: portage-2.1.10.4/cvs/Linux x86_64
Diffstat (limited to 'net-mail/mailgraph')
-rw-r--r--net-mail/mailgraph/ChangeLog11
-rw-r--r--net-mail/mailgraph/Manifest25
-rw-r--r--net-mail/mailgraph/files/mailgraph.initd-new12
-rw-r--r--net-mail/mailgraph/mailgraph-1.14-r1.ebuild142
4 files changed, 178 insertions, 12 deletions
diff --git a/net-mail/mailgraph/ChangeLog b/net-mail/mailgraph/ChangeLog
index b81e73b4b0cc..6c64c8bb1b60 100644
--- a/net-mail/mailgraph/ChangeLog
+++ b/net-mail/mailgraph/ChangeLog
@@ -1,6 +1,13 @@
# 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 $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-mail/mailgraph/ChangeLog,v 1.36 2011/07/07 15:08:14 eras Exp $
+
+*mailgraph-1.14-r1 (07 Jul 2011)
+
+ 07 Jul 2011; Eray Aslan <eras@gentoo.org> +mailgraph-1.14-r1.ebuild,
+ files/mailgraph.initd-new:
+ Fix depreciation warning and crashed status in init script - bugs #366581
+ #374311. EAPI bump.
15 Jun 2008; Zac Medico <zmedico@gentoo.org> mailgraph-1.14.ebuild:
Bug #226505 - For compatibility with phase execution order in
diff --git a/net-mail/mailgraph/Manifest b/net-mail/mailgraph/Manifest
index f1afcf5116be..62f59e360451 100644
--- a/net-mail/mailgraph/Manifest
+++ b/net-mail/mailgraph/Manifest
@@ -1,17 +1,28 @@
-----BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
+Hash: SHA256
AUX mailgraph.confd-new 764 RMD160 579dd58dd2c2a2103236ed3b5b3dccdbdd8d3ba7 SHA1 3ab3f965e25e70853d7631314c3c1826156a188a SHA256 86b970df1bbb3a4e85226ce6036a228b2ff155db88124b49bc07e08f022ac1d2
-AUX mailgraph.initd-new 911 RMD160 b893043eb3f975a3d2a6b3bb29378bd0bd938b7f SHA1 00ae6bc55428b6af4950dbd99d621830aadbaf73 SHA256 ebae0c40b7b917df084d9825358035c10e0e997e7d7922490c507db41b55c2c2
+AUX mailgraph.initd-new 1100 RMD160 f055e723d7435805632ce5244d39828494f3923a SHA1 fcf531447a84b465d3fde75993e0dd83b7e41b4b SHA256 53b1fc00835bf377caf354611065a03c7318fe7fc35774adc6543e3f397073dc
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-r1.ebuild 4010 RMD160 ecef6d26524a91ca353b97cfb67a0132e2ae23b3 SHA1 5138e4c7c3885f3b2643e2da222a323f71f67dd0 SHA256 d429c5caa3bd6305787c32f461633268894618dea30b67a481230589dcf7472f
EBUILD mailgraph-1.14.ebuild 4174 RMD160 82025cc4d8ced0e7a1e62d43add6dc80c8a40186 SHA1 c11da4c6e8ae425ff0be27b87fc0dee6bcfde174 SHA256 1ab3656eb424a0c332c5246c53e8f923231eb0bf9e3b25078b20880eb3014dd6
-MISC ChangeLog 5037 RMD160 cbc54b6a35913c80e899014db1aedac0137aaea1 SHA1 ca1c20042d85408e719c4f290155be970ed4205a SHA256 78b0088d9b46cc4d815529c22b4466528497eb59fd6b45d2edaa59bb4e153f1c
+MISC ChangeLog 5267 RMD160 3c2f6054865d84dfe2a28b5da6cecf9720f69f26 SHA1 d5c60df3a2a5da81c1a0d1ca8e68d05edf0bb288 SHA256 d6ad3da0715e987bbb232272d7e97953cd494ba19cd16f87024eb7418cecb1c4
MISC metadata.xml 163 RMD160 9d7831690071ef6a890ce066c38c9c4e851a2107 SHA1 6dcd4fa8a9b5cfcc7c0ae80c09e43395fe8e71a7 SHA256 38427b537ef2f561a685876ae3a7799382a1bf7fabef6c2d8765ca9d05056aa2
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.9 (GNU/Linux)
+Version: GnuPG v2.0.17 (GNU/Linux)
-iEYEARECAAYFAkhU7J8ACgkQ/ejvha5XGaMwagCdHkMS9mC5Zj4HTaXc6Kegr3f6
-PnkAoLJTyTz6Nxa+asw3edVoARqmJ+Aj
-=nuSx
+iQIcBAEBCAAGBQJOFcvsAAoJEHfx8XVYajsfqR0P/2cOPi1imHz61UPLqsbULZYb
+WcB8aVNywp2wGWXHdpU1jDBUSEUBtSC/d4TQsj6nm7E6Jm+pjIkn8fSeBFJBGnSU
+bnlEUAUkpjNoQxOAKQrBm3FCE7+lI5ywPQyBDY5Xr46XdYuQsh+qU1EXkBPpLJCF
+LisqdWzJqk+syISL7vTNHPwOupNsMlddhqnKW7QRAw5wZ9/skNxJifbsMf/ZQFlE
+/esbfYJCN+7bAg9rW0m+oiM0FOz00Bgvk5l2L2GYbj9EnYO2gsgUdtfwzC1rFedP
+eiygXdymrkiVW4BtrXu6sZdHT26ROJVHGakNVbBJYpCdQ42lJmLCdo1M76kbruPk
+CkG8Jt7iStvtWLPMnVgtMKPf+57HJGuueYY1n1dRa/55R9wS/RfiUa4YhuH33/lr
+lcv94cdoT929TY4GYoE16S4jwWOhq5UTtk/2SCTGAf2OdIiLH4diS2YHMr6lWNqu
+gFKFUKpktednmtQDd4ya2OkGiC9oley/wV2CGd3X59XHnjlk4v4SuJ9F4ueQxRR+
+05AZebQruGmGhUtYTkTMBgFVIoUgxwZx7HoN1A9DRHRAAseYlcZUCtwQsyf+1r8x
+xN2t5UiZqoNo9BPzJqSc9AyGEyJ7AodU91Qk4TBpsDW78P2Kjwft5BxZGqmALHFl
+gUZwo4nz288rcCUcJi/x
+=H6iX
-----END PGP SIGNATURE-----
diff --git a/net-mail/mailgraph/files/mailgraph.initd-new b/net-mail/mailgraph/files/mailgraph.initd-new
index a80bea9dbe22..4ba72fe7dd53 100644
--- a/net-mail/mailgraph/files/mailgraph.initd-new
+++ b/net-mail/mailgraph/files/mailgraph.initd-new
@@ -1,7 +1,7 @@
#!/sbin/runscript
-# Copyright 1999-2008 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-mail/mailgraph/files/mailgraph.initd-new,v 1.3 2008/05/14 21:38:13 sbriesen Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-mail/mailgraph/files/mailgraph.initd-new,v 1.4 2011/07/07 15:08:14 eras Exp $
start() {
ebegin "Starting mailgraph"
@@ -9,12 +9,18 @@ start() {
# read mail log messages somewhere other than /var/log/syslog?
[[ -n "${MG_LOGFILE}" ]] && MG_DAEMON_OPTS="${MG_DAEMON_OPTS} -l ${MG_LOGFILE}"
+ # create /var/run/mailgraph if necessary
+ if [ ! -d /var/run/mailgraph ] ; then
+ checkpath -q -d -o mgraph:adm -m 0775 /var/run/mailgraph || return 1
+ fi
+
UMASK=$(umask)
umask ${MG_DAEMON_UMASK:-0077}
start-stop-daemon --start \
--name mailgraph \
- -c "${MG_DAEMON_UID}:${MG_DAEMON_GID}" \
+ --user "${MG_DAEMON_UID}:${MG_DAEMON_GID}" \
--name mailgraph \
+ --pidfile ${MG_DAEMON_PID} \
--exec /usr/bin/mailgraph -- -v --daemon \
--daemon-log="${MG_DAEMON_LOG}" \
--daemon-pid="${MG_DAEMON_PID}" \
diff --git a/net-mail/mailgraph/mailgraph-1.14-r1.ebuild b/net-mail/mailgraph/mailgraph-1.14-r1.ebuild
new file mode 100644
index 000000000000..c5da4e5af860
--- /dev/null
+++ b/net-mail/mailgraph/mailgraph-1.14-r1.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-mail/mailgraph/mailgraph-1.14-r1.ebuild,v 1.1 2011/07/07 15:08:14 eras Exp $
+
+EAPI=4
+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[perl]"
+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
+ user_group_setup
+}
+
+src_prepare() {
+ 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
+
+ # 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 <user> mgraph"
+ elog
+ fi
+}