summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Zander <negril.nx+gentoo@gmail.com>2024-07-12 21:43:22 +0200
committerSam James <sam@gentoo.org>2024-12-01 11:52:14 +0000
commit5d8c4baefd5b01df441088b75b33b2848fe60772 (patch)
tree12dacf43927f0a0f4c711c492a5cefe89cce90b6 /net-mail/mailgraph
parentacct-user/nginx: add USE=mgraph (diff)
downloadgentoo-5d8c4baefd5b01df441088b75b33b2848fe60772.tar.gz
gentoo-5d8c4baefd5b01df441088b75b33b2848fe60772.tar.bz2
gentoo-5d8c4baefd5b01df441088b75b33b2848fe60772.zip
net-mail/mailgraph: BannedEapiCommand
Misses migration after acct-user got introduced. Add apache2 and nginx to IUSE. Use the new `mgraph` USE-flag for acct-user/apache and acct-user/nginx in RDEPEND. Adjust pkg_postinst() to match. BannedEapiCommand 'gpasswd' banned in EAPI 7, used on line 81 'gpasswd -a apache mgraph' Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/36445 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-mail/mailgraph')
-rw-r--r--net-mail/mailgraph/mailgraph-1.14-r4.ebuild (renamed from net-mail/mailgraph/mailgraph-1.14-r3.ebuild)35
-rw-r--r--net-mail/mailgraph/metadata.xml3
2 files changed, 14 insertions, 24 deletions
diff --git a/net-mail/mailgraph/mailgraph-1.14-r3.ebuild b/net-mail/mailgraph/mailgraph-1.14-r4.ebuild
index 3622c4e6396c..868fe0fd041a 100644
--- a/net-mail/mailgraph/mailgraph-1.14-r3.ebuild
+++ b/net-mail/mailgraph/mailgraph-1.14-r4.ebuild
@@ -1,18 +1,17 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
-
-inherit user-info
+EAPI=8
DESCRIPTION="A mail statistics RRDtool frontend for Postfix"
-HOMEPAGE="http://mailgraph.schweikert.ch/"
-SRC_URI="http://mailgraph.schweikert.ch//pub/${P}.tar.gz"
+HOMEPAGE="https://mailgraph.schweikert.ch/"
+SRC_URI="https://mailgraph.schweikert.ch/pub/${P}.tar.gz"
LICENSE="GPL-2"
# Change SLOT to 0 when appropriate
SLOT="1.14"
KEYWORDS="amd64 x86"
+IUSE="apache2 nginx"
# for the RRDs
DEPEND="
@@ -20,6 +19,8 @@ DEPEND="
acct-user/mgraph"
RDEPEND="
${DEPEND}
+ apache2? ( acct-user/apache[mgraph] )
+ nginx? ( acct-user/nginx[mgraph] )
dev-lang/perl
dev-perl/File-Tail
>=net-analyzer/rrdtool-1.2.2[graph,perl]"
@@ -73,25 +74,11 @@ pkg_postinst() {
ewarn "/etc/conf.d/mailgraph accordingly! Otherwise mailgraph won't get to know"
ewarn "the corresponding events (virus/spam mail found etc.)."
+ elog "If you are using neither apache nor nginx and the included CGI script"
+ elog "is unable to read the mailgraph RRD files, please add the user for"
+ elog "that webserver to the group mgraph manually:"
elog
- elog "Checking for user apache:"
- if egetent passwd apache >&/dev/null; then
- elog "Adding user apache to group mgraph so the included"
- elog "CGI script is able to read the mailgraph RRD files"
- 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"
- fi
+ elog "\tgpasswd -a <user> mgraph"
ewarn
ewarn "mailgraph.cgi is installed in /usr/share/${PN}/"
diff --git a/net-mail/mailgraph/metadata.xml b/net-mail/mailgraph/metadata.xml
index bef24d2c2337..e8707cb9b9a7 100644
--- a/net-mail/mailgraph/metadata.xml
+++ b/net-mail/mailgraph/metadata.xml
@@ -2,4 +2,7 @@
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
+ <use>
+ <flag name="nginx">Add nginx support</flag>
+ </use>
</pkgmetadata>