commit:     5d8c4baefd5b01df441088b75b33b2848fe60772
Author:     Paul Zander <negril.nx+gentoo <AT> gmail <DOT> com>
AuthorDate: Fri Jul 12 19:43:22 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Dec  1 11:52:14 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5d8c4bae

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 <AT> gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/36445
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...aph-1.14-r3.ebuild => mailgraph-1.14-r4.ebuild} | 35 +++++++---------------
 net-mail/mailgraph/metadata.xml                    |  3 ++
 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
similarity index 70%
rename from net-mail/mailgraph/mailgraph-1.14-r3.ebuild
rename to 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>

Reply via email to