Gentoo Archives: gentoo-commits

From: "Diego Petteno (flameeyes)" <flameeyes@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-analyzer/nagios-plugins: metadata.xml nagios-plugins-1.4.16-r2.ebuild ChangeLog
Date: Thu, 23 Aug 2012 22:04:13
Message-Id: 20120823220356.A4E75204D2@flycatcher.gentoo.org
1 flameeyes 12/08/23 22:03:56
2
3 Modified: metadata.xml ChangeLog
4 Added: nagios-plugins-1.4.16-r2.ebuild
5 Log:
6 Revision bump: cleanup contrib plugins install; add a sudo and smartctl USE flag so that plugins using sudo have a way to be configured.
7
8 (Portage version: 2.2.0_alpha121/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.9 net-analyzer/nagios-plugins/metadata.xml
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/nagios-plugins/metadata.xml?rev=1.9&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/nagios-plugins/metadata.xml?rev=1.9&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/nagios-plugins/metadata.xml?r1=1.8&r2=1.9
16
17 Index: metadata.xml
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-analyzer/nagios-plugins/metadata.xml,v
20 retrieving revision 1.8
21 retrieving revision 1.9
22 diff -u -r1.8 -r1.9
23 --- metadata.xml 19 Aug 2012 18:57:13 -0000 1.8
24 +++ metadata.xml 23 Aug 2012 22:03:56 -0000 1.9
25 @@ -37,6 +37,23 @@
26 Install <pkg>dev-perl/Net-SNMP</pkg> required for monitoring
27 SNMP values. Disabling the flag does not remove any plugin file.
28 </flag>
29 + <flag name='suid'>
30 + Give root privileges to the ICMP, DHCP and IDE S.M.A.R.T. check
31 + binaries. This allows them to ignore the access controls that
32 + would disallow the nagios user from running the check.
33 + </flag>
34 + <flag name='sudo'>
35 + Install a file to allow the nagios user to execute some commands
36 + via <pkg>app-admin/sudo</pkg>, so that the scripts can access
37 + devices and features that wouldn't be otherwise allowed by
38 + nagios.
39 + </flag>
40 + <flag name='smart'>
41 + Install <pkg>sys-apps/smartmontools</pkg> required for
42 + S.M.A.R.T. disk monitoring. Disabling the flag removes the
43 + plugin file. This plugin also requires the sudo flag to be
44 + enable.
45 + </flag>
46 </use>
47 </pkgmetadata>
48
49
50
51
52 1.151 net-analyzer/nagios-plugins/ChangeLog
53
54 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/nagios-plugins/ChangeLog?rev=1.151&view=markup
55 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/nagios-plugins/ChangeLog?rev=1.151&content-type=text/plain
56 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/nagios-plugins/ChangeLog?r1=1.150&r2=1.151
57
58 Index: ChangeLog
59 ===================================================================
60 RCS file: /var/cvsroot/gentoo-x86/net-analyzer/nagios-plugins/ChangeLog,v
61 retrieving revision 1.150
62 retrieving revision 1.151
63 diff -u -r1.150 -r1.151
64 --- ChangeLog 19 Aug 2012 18:57:13 -0000 1.150
65 +++ ChangeLog 23 Aug 2012 22:03:56 -0000 1.151
66 @@ -1,6 +1,13 @@
67 # ChangeLog for net-analyzer/nagios-plugins
68 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
69 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-plugins/ChangeLog,v 1.150 2012/08/19 18:57:13 flameeyes Exp $
70 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-plugins/ChangeLog,v 1.151 2012/08/23 22:03:56 flameeyes Exp $
71 +
72 +*nagios-plugins-1.4.16-r2 (23 Aug 2012)
73 +
74 + 23 Aug 2012; Diego E. Pettenò <flameeyes@g.o>
75 + +nagios-plugins-1.4.16-r2.ebuild, metadata.xml:
76 + Revision bump: cleanup contrib plugins install; add a sudo and smartctl USE
77 + flag so that plugins using sudo have a way to be configured.
78
79 19 Aug 2012; Diego E. Pettenò <flameeyes@g.o> metadata.xml,
80 nagios-plugins-1.4.16-r1.ebuild:
81
82
83
84 1.1 net-analyzer/nagios-plugins/nagios-plugins-1.4.16-r2.ebuild
85
86 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/nagios-plugins/nagios-plugins-1.4.16-r2.ebuild?rev=1.1&view=markup
87 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/nagios-plugins/nagios-plugins-1.4.16-r2.ebuild?rev=1.1&content-type=text/plain
88
89 Index: nagios-plugins-1.4.16-r2.ebuild
90 ===================================================================
91 # Copyright 1999-2012 Gentoo Foundation
92 # Distributed under the terms of the GNU General Public License v2
93 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-plugins/nagios-plugins-1.4.16-r2.ebuild,v 1.1 2012/08/23 22:03:56 flameeyes Exp $
94
95 EAPI=4
96
97 PATCHSET=2
98
99 inherit autotools eutils multilib user
100
101 DESCRIPTION="Nagios $PV plugins - Pack of plugins to make Nagios work properly"
102 HOMEPAGE="http://www.nagios.org/"
103 SRC_URI="mirror://sourceforge/nagiosplug/${P}.tar.gz
104 http://dev.gentoo.org/~flameeyes/${PN}/${P}-patches-${PATCHSET}.tar.xz"
105
106 LICENSE="GPL-2"
107 SLOT="0"
108 KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
109 IUSE="+ssl samba mysql postgres ldap snmp nagios-dns nagios-ntp nagios-ping nagios-ssh nagios-game ups ipv6 radius +suid jabber gnutls sudo smart"
110
111 DEPEND="ldap? ( >=net-nds/openldap-2.0.25 )
112 mysql? ( virtual/mysql )
113 postgres? ( dev-db/postgresql-base )
114 ssl? (
115 !gnutls? ( >=dev-libs/openssl-0.9.6g )
116 gnutls? ( net-libs/gnutls )
117 )
118 radius? ( >=net-dialup/radiusclient-0.3.2 )"
119
120 # tests try to ssh into the box itself
121 RESTRICT="test"
122
123 RDEPEND="${DEPEND}
124 >=dev-lang/perl-5.6.1-r7
125 samba? ( >=net-fs/samba-2.2.5-r1 )
126 snmp? ( >=dev-perl/Net-SNMP-4.0.1-r1 )
127 mysql? ( dev-perl/DBI
128 dev-perl/DBD-mysql )
129 nagios-dns? ( >=net-dns/bind-tools-9.2.2_rc1 )
130 nagios-ntp? ( >=net-misc/ntp-4.1.1a )
131 nagios-ping? ( >=net-analyzer/fping-2.4_beta2-r1 )
132 nagios-ssh? ( >=net-misc/openssh-3.5_p1 )
133 ups? ( >=sys-power/nut-1.4 )
134 nagios-game? ( >=games-util/qstat-2.6 )
135 jabber? ( >=dev-perl/Net-Jabber-2.0 )
136 sudo? ( >=app-admin/sudo-1.8.5 )
137 smart? ( sys-apps/smartmontools )"
138
139 REQUIRED_USE="smart? ( sudo )"
140
141 pkg_setup() {
142 enewgroup nagios
143 enewuser nagios -1 /bin/bash /var/nagios/home nagios
144 }
145
146 src_prepare() {
147 epatch "${WORKDIR}"/patches/*.patch
148
149 eautoreconf
150 }
151
152 src_configure() {
153 local myconf
154 if use ssl; then
155 myconf+="
156 $(use_with !gnutls openssl /usr)
157 $(use_with gnutls gnutls /usr)"
158 else
159 myconf+=" --without-openssl --without-gnutls"
160 fi
161
162 econf \
163 $(use_with mysql) \
164 $(use_with ipv6) \
165 $(use_with ldap) \
166 $(use_with radius) \
167 $(use_with postgres pgsql /usr) \
168 ${myconf} \
169 --libexecdir=/usr/$(get_libdir)/nagios/plugins \
170 --sysconfdir=/etc/nagios
171 }
172
173 DOCS=( ACKNOWLEDGEMENTS AUTHORS BUGS CODING ChangeLog FAQ NEWS README REQUIREMENTS SUPPORT THANKS )
174
175 src_install() {
176 default
177
178 local nagiosplugindir=/usr/$(get_libdir)/nagios/plugins
179
180 use suid && fperms 04710 ${nagiosplugindir}/check_{icmp,ide_smart,dhcp}
181
182 if use sudo; then
183 cat - > "${T}"/50${PN} <<EOF
184 # we add /bin/false so that we don't risk causing syntax errors if all USE flags
185 # are off as we'd end up with an empty set
186 Cmnd_Alias NAGIOS_PLUGINS_CMDS = /bin/false, $(usex smart /usr/sbin/smartctl)
187 User_Alias NAGIOS_PLUGINS_USERS = nagios, icinga
188
189 NAGIOS_PLUGINS_USERS ALL=(root) NOPASSWD: NAGIOS_PLUGINS_CMDS
190 EOF
191 fi
192 insinto /etc/sudoers.d
193 doins "${T}"/50${PN}
194
195 cd contrib/
196 dodoc *README*
197
198 # remove stuff that is way too broken to fix, or for which the USE
199 # flag has been removed.
200 rm -r tarballs aix \
201 check_compaq_insight.pl *.c *README* \
202 $(usex !jabber nagios_sendim.pl) \
203 $(usex !smart check_smart.pl)
204
205 # fix perl interpreter
206 sed -i -e '1s:/usr/local/bin/perl:/usr/bin/perl:' \
207 "${S}"/contrib/* || die
208
209 exeinto ${nagiosplugindir}/contrib
210 doexe *
211
212 dosym ../utils.sh ${nagiosplugindir}/contrib/utils.sh
213 dosym ../utils.pm ${nagiosplugindir}/contrib/utils.pm
214 }
215
216 pkg_postinst() {
217 elog "This ebuild has a number of USE flags which determines what nagios is able to monitor."
218 elog "Depending on what you want to monitor with nagios, some or all of these USE"
219 elog "flags need to be set for nagios to function correctly."
220 elog "contrib plugins are installed into /usr/$(get_libdir)/nagios/plugins/contrib"
221 }