1 |
commit: 41fd5199166502416d53932adb6a25f442499779 |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Aug 31 20:44:54 2019 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Aug 31 21:34:55 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=41fd5199 |
7 |
|
8 |
net-analyzer/nrpe: new revision to match nagios-core. |
9 |
|
10 |
The "nagios" user data and its localstatedir changed in the latest |
11 |
revision of nagios-core. This revision synchronizes the same bits for |
12 |
nrpe. |
13 |
|
14 |
Package-Manager: Portage-2.3.69, Repoman-2.3.16 |
15 |
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org> |
16 |
|
17 |
net-analyzer/nrpe/nrpe-3.2.1-r2.ebuild | 89 ++++++++++++++++++++++++++++++++++ |
18 |
1 file changed, 89 insertions(+) |
19 |
|
20 |
diff --git a/net-analyzer/nrpe/nrpe-3.2.1-r2.ebuild b/net-analyzer/nrpe/nrpe-3.2.1-r2.ebuild |
21 |
new file mode 100644 |
22 |
index 00000000000..430050c49b1 |
23 |
--- /dev/null |
24 |
+++ b/net-analyzer/nrpe/nrpe-3.2.1-r2.ebuild |
25 |
@@ -0,0 +1,89 @@ |
26 |
+# Copyright 1999-2019 Gentoo Authors |
27 |
+# Distributed under the terms of the GNU General Public License v2 |
28 |
+ |
29 |
+EAPI=6 |
30 |
+inherit systemd user |
31 |
+ |
32 |
+DESCRIPTION="Nagios Remote Plugin Executor" |
33 |
+HOMEPAGE="https://github.com/NagiosEnterprises/nrpe" |
34 |
+SRC_URI="${HOMEPAGE}/releases/download/${P}/${P}.tar.gz" |
35 |
+ |
36 |
+LICENSE="GPL-2+" |
37 |
+SLOT="0" |
38 |
+KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86" |
39 |
+IUSE="command-args libressl selinux ssl" |
40 |
+ |
41 |
+DEPEND="sys-apps/tcp-wrappers |
42 |
+ ssl? ( |
43 |
+ !libressl? ( dev-libs/openssl:0= ) |
44 |
+ libressl? ( dev-libs/libressl:0= ) |
45 |
+ )" |
46 |
+RDEPEND="${DEPEND} |
47 |
+ || ( net-analyzer/nagios-plugins net-analyzer/monitoring-plugins ) |
48 |
+ selinux? ( sec-policy/selinux-nagios )" |
49 |
+ |
50 |
+PATCHES=( "${FILESDIR}/nrpe-3.2.1-eliminate-systemd-pid.patch" ) |
51 |
+ |
52 |
+pkg_setup() { |
53 |
+ enewgroup nagios |
54 |
+ enewuser nagios -1 -1 -1 nagios |
55 |
+} |
56 |
+ |
57 |
+src_configure() { |
58 |
+ # The configure script tries to detect what OS, distribution, and |
59 |
+ # init system you're running and changes the build/install process |
60 |
+ # depending on what it comes up with. We specify fixed values |
61 |
+ # because we don't want it guessing, for example, whether or not |
62 |
+ # to install the tmpfiles.d entry based on whether or not systemd |
63 |
+ # is currently running (OpenRC uses them too). |
64 |
+ econf \ |
65 |
+ --libexecdir=/usr/$(get_libdir)/nagios/plugins \ |
66 |
+ --localstatedir=/var/lib/nagios \ |
67 |
+ --sysconfdir=/etc/nagios \ |
68 |
+ --with-nrpe-user=nagios \ |
69 |
+ --with-nrpe-group=nagios \ |
70 |
+ --with-piddir=/run \ |
71 |
+ --with-opsys=unknown \ |
72 |
+ --with-dist-type=unknown \ |
73 |
+ --with-init-type=unknown \ |
74 |
+ --with-inetd-type=unknown \ |
75 |
+ $(use_enable command-args) \ |
76 |
+ $(use_enable ssl) |
77 |
+} |
78 |
+ |
79 |
+src_compile() { |
80 |
+ emake all |
81 |
+} |
82 |
+ |
83 |
+src_install() { |
84 |
+ default |
85 |
+ |
86 |
+ dodoc CHANGELOG.md SECURITY.md |
87 |
+ insinto /etc/nagios |
88 |
+ newins sample-config/nrpe.cfg nrpe.cfg |
89 |
+ fowners root:nagios /etc/nagios/nrpe.cfg |
90 |
+ fperms 0640 /etc/nagios/nrpe.cfg |
91 |
+ |
92 |
+ newinitd "startup/openrc-init" nrpe |
93 |
+ newconfd "startup/openrc-conf" nrpe |
94 |
+ systemd_newunit "startup/default-service" "${PN}.service" |
95 |
+ |
96 |
+ insinto /etc/xinetd.d/ |
97 |
+ newins "${FILESDIR}/nrpe.xinetd.2" nrpe |
98 |
+ |
99 |
+ rm "${D}/usr/bin/nrpe-uninstall" || die 'failed to remove uninstall tool' |
100 |
+} |
101 |
+ |
102 |
+pkg_postinst(){ |
103 |
+ elog 'Some users have reported incompatibilities between nrpe-2.x and' |
104 |
+ elog 'nrpe-3.x. We recommend that you use the same major version for' |
105 |
+ elog 'both your server and clients.' |
106 |
+ |
107 |
+ if use command-args ; then |
108 |
+ ewarn '' |
109 |
+ ewarn 'You have enabled command-args for NRPE. That lets clients' |
110 |
+ ewarn 'supply arguments to the commands that are run, and IS A' |
111 |
+ ewarn 'SECURITY RISK!' |
112 |
+ ewarn'' |
113 |
+ fi |
114 |
+} |