Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-analyzer/nrpe/
Date: Tue, 01 Nov 2022 22:54:45
Message-Id: 1667343268.b2ce25ee2b1c9b6a2b3c63dbaa4eb512b8566773.sam@gentoo
1 commit: b2ce25ee2b1c9b6a2b3c63dbaa4eb512b8566773
2 Author: Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Tue Nov 1 17:13:06 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Tue Nov 1 22:54:28 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2ce25ee
7
8 net-analyzer/nrpe: add 4.1.0
9
10 Closes: https://bugs.gentoo.org/805080
11 Closes: https://bugs.gentoo.org/865705
12 Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
13 Closes: https://github.com/gentoo/gentoo/pull/28084
14 Signed-off-by: Sam James <sam <AT> gentoo.org>
15
16 net-analyzer/nrpe/Manifest | 1 +
17 net-analyzer/nrpe/nrpe-4.1.0.ebuild | 100 ++++++++++++++++++++++++++++++++++++
18 2 files changed, 101 insertions(+)
19
20 diff --git a/net-analyzer/nrpe/Manifest b/net-analyzer/nrpe/Manifest
21 index b156a0375137..f81d01f00913 100644
22 --- a/net-analyzer/nrpe/Manifest
23 +++ b/net-analyzer/nrpe/Manifest
24 @@ -1,3 +1,4 @@
25 DIST nrpe-4.0.0.tar.gz 523846 BLAKE2B 850a420f0550e1dfe6b0ea98a9d9cafec0ec583c115be89b3ba8e88a309c40226c87f6ae880d12c582822e492c5991e3d2444b68f5644750fc74ad75596c96fd SHA512 8773102f28f3e7e96f3637e77489eb12ffe88fe839abfe3f150d2eb3d2efe05f7f812ab4d52a64cbd8d0a5e491aed93d5300b7ce9a8dd072b3a00d885b91276b
26 DIST nrpe-4.0.2.tar.gz 524146 BLAKE2B dc100579420eeccaaa2a913f56c76b86b6ebdce8d1afdddcc428bfd4a8c12ad19050ab0395e7a109d4e8b43ca7d6a11e13ec4a4250a91483e37725c184382ca2 SHA512 4d7cf6abc974bc79df54afc42644418e3f086a279c8c17d0fd104f19e3c21c0f3dae4fb4268dd134446ff9fe505159b0446372c5cac71cfe03a97479ed41c09b
27 DIST nrpe-4.0.3.tar.gz 524160 BLAKE2B d2c99cadf718e7049c911388b105fb4f5248307c733d94a73fd02ac69c49be230dad58be0a182af9c8d7e0d1f34e8dba6b8fc46a7c01eb15d845f2b3a54499ed SHA512 31d932c481c8a53bd0f8865fb3cfeeb1466b9b05fa89382aa056aa9343a09843b51fe5398fd0388e6bba99e9c3d8093f6033799fd83afd43012bfe8fdc5a33e3
28 +DIST nrpe-4.1.0.tar.gz 528228 BLAKE2B a8890eef9f32e43417270eb80dcb9eedf1272d70d2dad73fecd855565358fbe9cb1d716fe0b79270310c2c5097eba3ffc7f786c89eecae9f6b84d2fbb43d3e0f SHA512 a47935eecc65d646737166f98f5f160e3d1d5bbd245e006e8cd0758af75db083f870db6c02c1edd0d44cf9a91909ba26df8eee1620a7ac4d9f98032f2cce8981
29
30 diff --git a/net-analyzer/nrpe/nrpe-4.1.0.ebuild b/net-analyzer/nrpe/nrpe-4.1.0.ebuild
31 new file mode 100644
32 index 000000000000..88306182ea63
33 --- /dev/null
34 +++ b/net-analyzer/nrpe/nrpe-4.1.0.ebuild
35 @@ -0,0 +1,100 @@
36 +# Copyright 1999-2022 Gentoo Authors
37 +# Distributed under the terms of the GNU General Public License v2
38 +
39 +EAPI=8
40 +
41 +inherit autotools systemd
42 +
43 +DESCRIPTION="Nagios Remote Plugin Executor"
44 +HOMEPAGE="https://github.com/NagiosEnterprises/nrpe"
45 +SRC_URI="https://github.com/NagiosEnterprises/nrpe/releases/download/${P}/${P}.tar.gz"
46 +
47 +LICENSE="GPL-2+"
48 +SLOT="0"
49 +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
50 +IUSE="command-args selinux ssl tcpd"
51 +
52 +DEPEND="acct-group/nagios
53 + acct-user/nagios
54 + tcpd? (
55 + sys-apps/tcp-wrappers
56 + )
57 + ssl? (
58 + dev-libs/openssl:=
59 + )"
60 +RDEPEND="${DEPEND}
61 + || ( net-analyzer/nagios-plugins net-analyzer/monitoring-plugins )
62 + selinux? ( sec-policy/selinux-nagios )"
63 +
64 +PATCHES=(
65 + "${FILESDIR}/nrpe-3.2.1-eliminate-systemd-pid.patch"
66 +)
67 +
68 +src_prepare() {
69 + default
70 + eautoreconf
71 +}
72 +
73 +src_configure() {
74 + # The configure script tries to detect what OS, distribution, and
75 + # init system you're running and changes the build/install process
76 + # depending on what it comes up with. We specify fixed values
77 + # because we don't want it guessing, for example, whether or not
78 + # to install the tmpfiles.d entry based on whether or not systemd
79 + # is currently running (OpenRC uses them too).
80 + #
81 + # Note: upstream defaults to using "nagios" as the default NRPE
82 + # user and group. I have a feeling that this isn't quite correct
83 + # on a system where "nagios" is also the user running the nagios
84 + # server daemon. In the future, it would be nice if someone who
85 + # actually uses NRPE could test with an unprivileged "nrpe" as
86 + # the user and group.
87 + econf \
88 + --libexecdir=/usr/$(get_libdir)/nagios/plugins \
89 + --localstatedir=/var/lib/nagios \
90 + --sysconfdir=/etc/nagios \
91 + --with-nrpe-user=nagios \
92 + --with-nrpe-group=nagios \
93 + --with-piddir=/run \
94 + --with-opsys=unknown \
95 + --with-dist-type=unknown \
96 + --with-init-type=unknown \
97 + --with-inetd-type=unknown \
98 + $(use_enable command-args) \
99 + $(use_enable ssl) \
100 + $(use_enable tcpd)
101 +}
102 +
103 +src_compile() {
104 + emake all
105 +}
106 +
107 +src_install() {
108 + default
109 +
110 + dodoc CHANGELOG.md SECURITY.md
111 + insinto /etc/nagios
112 + newins sample-config/nrpe.cfg nrpe.cfg
113 + fowners root:nagios /etc/nagios/nrpe.cfg
114 + fperms 0640 /etc/nagios/nrpe.cfg
115 +
116 + newinitd "startup/openrc-init" nrpe
117 + newconfd "startup/openrc-conf" nrpe
118 + systemd_newunit "startup/default-service" "${PN}.service"
119 +
120 + insinto /etc/xinetd.d/
121 + newins "${FILESDIR}/nrpe.xinetd.2" nrpe
122 +
123 + rm "${ED}/usr/bin/nrpe-uninstall" || die 'failed to remove uninstall tool'
124 + rm -r "${ED}/run" || die 'failed to remove /run'
125 +}
126 +
127 +pkg_postinst() {
128 + if use command-args ; then
129 + ewarn ''
130 + ewarn 'You have enabled command-args for NRPE. That lets clients'
131 + ewarn 'supply arguments to the commands that are run, and IS A'
132 + ewarn 'SECURITY RISK!'
133 + ewarn ''
134 + fi
135 +}