Gentoo Archives: gentoo-commits

From: "Pacho Ramos (pacho)" <pacho@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-analyzer/nrpe: nrpe-2.15-r1.ebuild ChangeLog
Date: Tue, 08 Jul 2014 15:59:31
Message-Id: 20140708155926.443322004C@flycatcher.gentoo.org
1 pacho 14/07/08 15:59:26
2
3 Modified: ChangeLog
4 Added: nrpe-2.15-r1.ebuild
5 Log:
6 Add unit file (#505764 by Markos Chandras and Stefan G. Weichinger)
7
8 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
9
10 Revision Changes Path
11 1.33 net-analyzer/nrpe/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/nrpe/ChangeLog?rev=1.33&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/nrpe/ChangeLog?rev=1.33&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/nrpe/ChangeLog?r1=1.32&r2=1.33
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-analyzer/nrpe/ChangeLog,v
20 retrieving revision 1.32
21 retrieving revision 1.33
22 diff -u -r1.32 -r1.33
23 --- ChangeLog 27 Jun 2014 08:22:54 -0000 1.32
24 +++ ChangeLog 8 Jul 2014 15:59:26 -0000 1.33
25 @@ -1,6 +1,12 @@
26 # ChangeLog for net-analyzer/nrpe
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nrpe/ChangeLog,v 1.32 2014/06/27 08:22:54 zlogene Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nrpe/ChangeLog,v 1.33 2014/07/08 15:59:26 pacho Exp $
30 +
31 +*nrpe-2.15-r1 (08 Jul 2014)
32 +
33 + 08 Jul 2014; Pacho Ramos <pacho@g.o> +files/nrpe.service,
34 + +nrpe-2.15-r1.ebuild:
35 + Add unit file (#505764 by Markos Chandras and Stefan G. Weichinger)
36
37 27 Jun 2014; Mikle Kolyada <zlogene@g.o> -nrpe-2.13-r4.ebuild,
38 -nrpe-2.14.ebuild:
39
40
41
42 1.1 net-analyzer/nrpe/nrpe-2.15-r1.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/nrpe/nrpe-2.15-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/nrpe/nrpe-2.15-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: nrpe-2.15-r1.ebuild
48 ===================================================================
49 # Copyright 1999-2014 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/nrpe/nrpe-2.15-r1.ebuild,v 1.1 2014/07/08 15:59:25 pacho Exp $
52
53 EAPI=5
54 inherit eutils systemd toolchain-funcs multilib user autotools
55
56 DESCRIPTION="Nagios Remote Plugin Executor"
57 HOMEPAGE="http://www.nagios.org/"
58 SRC_URI="mirror://sourceforge/nagios/${P}.tar.gz"
59
60 LICENSE="GPL-2+"
61 SLOT="0"
62 KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
63 IUSE="command-args ssl tcpd minimal"
64
65 DEPEND="ssl? ( dev-libs/openssl )
66 !minimal? ( tcpd? ( sys-apps/tcp-wrappers ) )"
67 RDEPEND="${DEPEND}
68 !minimal? ( >=net-analyzer/nagios-plugins-1.3.0 )"
69
70 pkg_setup() {
71 enewgroup nagios
72 enewuser nagios -1 /bin/bash /dev/null nagios
73
74 elog "If you plan to use \"nrpe_check_control\" then you may want to specify"
75 elog "different command and services files. You can override the defaults"
76 elog "through the \"NAGIOS_COMMAND_FILE\" and \"NAGIOS_SERVICES_FILE\" environment variables."
77 elog "NAGIOS_COMMAND_FILE=${NAGIOS_COMMAND_FILE:-/var/rw/nagios.cmd}"
78 elog "NAGIOS_SERVICES_FILE=${NAGIOS_SERVICES_FILE:-/etc/services.cfg}"
79 }
80
81 src_prepare() {
82 # Add support for large output,
83 # http://opsview-blog.opsera.com/dotorg/2008/08/enhancing-nrpe.html
84 epatch "${FILESDIR}"/${PN}-2.14-multiline.patch
85 # fix configure, among others #326367, #397603
86 epatch "${FILESDIR}"/${PN}-2.15-tcpd-et-al.patch
87 # otherwise autoconf will overwrite the custom include/config.h.in
88 epatch "${FILESDIR}"/${PN}-2.15-autoconf-header.patch
89 # improve handling of metachars for security
90 epatch "${FILESDIR}"/${PN}-2.15-metachar-security-fix.patch
91
92 sed -i -e '/define \(COMMAND\|SERVICES\)_FILE/d' contrib/nrpe_check_control.c || die
93
94 # change the default location of the pid file
95 sed -i -e '/pid_file/s:/var/run:/run:' sample-config/nrpe.cfg.in || die
96
97 # fix TFU handling of autoheader
98 sed -i -e '/#undef/d' include/config.h.in || die
99
100 eautoreconf
101 }
102
103 src_configure() {
104 local myconf
105 if use minimal; then
106 myconf="--disable-tcp-wrapper --disable-command-args"
107 else
108 myconf="$(use_enable tcpd tcp-wrapper) $(use_enable command-args)"
109 fi
110
111 econf \
112 --libexecdir=/usr/$(get_libdir)/nagios/plugins \
113 --localstatedir=/var/nagios \
114 --sysconfdir=/etc/nagios \
115 --with-nrpe-user=nagios \
116 --with-nrpe-group=nagios \
117 $(use_enable ssl) \
118 ${myconf}
119 }
120
121 src_compile() {
122 emake -C src check_nrpe $(use minimal || echo nrpe)
123
124 # Add nifty nrpe check tool
125 $(tc-getCC) ${CPPFLAGS} ${CFLAGS} \
126 -DCOMMAND_FILE=\"${NAGIOS_COMMAND_FILE:-/var/rw/nagios.cmd}\" \
127 -DSERVICES_FILE=\"${NAGIOS_SERVICES_FILE:-/etc/services.cfg}\" \
128 ${LDFLAGS} -o nrpe_check_control contrib/nrpe_check_control.c || die
129 }
130
131 src_install() {
132 dodoc LEGAL Changelog README SECURITY \
133 contrib/README.nrpe_check_control \
134 $(use ssl && echo README.SSL)
135
136 exeinto /usr/$(get_libdir)/nagios/plugins
137 doexe src/check_nrpe nrpe_check_control
138
139 use minimal && return 0
140
141 ## NON-MINIMAL INSTALL FOLLOWS ##
142
143 insinto /etc/nagios
144 newins sample-config/nrpe.cfg nrpe.cfg
145 fowners root:nagios /etc/nagios/nrpe.cfg
146 fperms 0640 /etc/nagios/nrpe.cfg
147
148 exeinto /usr/libexec
149 doexe src/nrpe
150
151 newinitd "${FILESDIR}"/nrpe.init nrpe
152 systemd_dounit "${FILESDIR}/${PN}.service"
153
154 insinto /etc/xinetd.d/
155 newins "${FILESDIR}/nrpe.xinetd.2" nrpe
156
157 if use tcpd; then
158 sed -i -e '/^reload()/, /^}/ d' -e '/extra_started_commands/s:reload::' \
159 "${D}"/etc/init.d/nrpe
160 fi
161 }
162
163 pkg_postinst() {
164 elog "If you are using the nrpe daemon, remember to edit"
165 elog "the config file /etc/nagios/nrpe.cfg"
166
167 if use command-args ; then
168 ewarn ""
169 ewarn "You have enabled command-args for NRPE. This enables"
170 ewarn "the ability for clients to supply arguments to commands"
171 ewarn "which should be run. "
172 ewarn "THIS IS CONSIDERED A SECURITY RISK!"
173 ewarn "Please read /usr/share/doc/${PF}/SECURITY.bz2 for more info"
174 fi
175 }