commit:     3c1e0b85b784dfe8f23fee6921c37164303129f8
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 24 17:18:37 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Oct 24 17:18:37 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c1e0b85

net-analyzer/nagios-check_glsa2: Port to EAPI 7

Closes: https://bugs.gentoo.org/742212
Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../nagios-check_glsa2-20120930-CACHEDIR.patch     | 11 +++++++
 .../nagios-check_glsa2-20120930-r1.ebuild          | 35 +++++++++-------------
 2 files changed, 25 insertions(+), 21 deletions(-)

diff --git 
a/net-analyzer/nagios-check_glsa2/files/nagios-check_glsa2-20120930-CACHEDIR.patch
 
b/net-analyzer/nagios-check_glsa2/files/nagios-check_glsa2-20120930-CACHEDIR.patch
new file mode 100644
index 00000000000..3e02afe6e00
--- /dev/null
+++ 
b/net-analyzer/nagios-check_glsa2/files/nagios-check_glsa2-20120930-CACHEDIR.patch
@@ -0,0 +1,11 @@
+--- a/check_glsa2_cached.sh
++++ b/check_glsa2_cached.sh
+@@ -8,7 +8,7 @@
+ # Caches the result of check_glsa2.sh
+ # First line is the return code, rest of the file is the message
+ NAME=$(basename $0 .sh)
+-CACHEDIR=/var/lib/gentoo/
++CACHEDIR=/var/cache/check_glsa2
+ CACHEFILE=${CACHEDIR}/check_glsa2.cache
+ SCRIPT=/usr/lib/nagios/plugins/check_glsa2.sh
+ ret=0

diff --git 
a/net-analyzer/nagios-check_glsa2/nagios-check_glsa2-20120930-r1.ebuild 
b/net-analyzer/nagios-check_glsa2/nagios-check_glsa2-20120930-r1.ebuild
index 5b6ab2dd057..aba3bf1143f 100644
--- a/net-analyzer/nagios-check_glsa2/nagios-check_glsa2-20120930-r1.ebuild
+++ b/net-analyzer/nagios-check_glsa2/nagios-check_glsa2-20120930-r1.ebuild
@@ -1,38 +1,31 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=4
-
-inherit multilib user
-
-DESCRIPTION="Nagios check script for GLSAs (Gentoo Linux Security Advisories)"
-HOMEPAGE="https://github.com/craig/check_glsa2";
+EAPI=7
 
 MY_PN="${PN/nagios-/}"
 MY_P="${MY_PN}-${PV}"
-S="${WORKDIR}/${MY_P}"
 
+DESCRIPTION="Nagios check script for GLSAs (Gentoo Linux Security Advisories)"
+HOMEPAGE="https://github.com/craig/check_glsa2";
 SRC_URI="https://dev.gentoo.org/~flameeyes/${MY_PN}/${MY_P}.tar.xz";
+
 LICENSE="GPL-2 BSD-2"
 SLOT="0"
-
 KEYWORDS="amd64"
 
-RDEPEND="app-portage/gentoolkit"
-DEPEND=""
-
-pkg_setup() {
-       enewgroup nagios
-       enewuser nagios -1 /bin/bash /dev/null nagios
-}
+DEPEND="
+       acct-group/nagios
+       acct-user/nagios"
+RDEPEND="
+       ${DEPEND}
+       app-portage/gentoolkit"
 
-src_prepare() {
-       sed -i -e '/CACHEDIR=/s:=.*:=/var/cache/check_glsa2:' 
${MY_PN}_cached.sh || die
-}
+S="${WORKDIR}/${MY_P}"
+PATCHES=( "${FILESDIR}"/${PN}-20120930-CACHEDIR.patch )
 
 src_install() {
-       local nagiosplugindir=/usr/$(get_libdir)/nagios/plugins
-       exeinto ${nagiosplugindir}
+       exeinto /usr/$(get_libdir)/nagios/plugins
        doexe *.sh
 
        dodoc README

Reply via email to