1 |
commit: 01be0da7e94079bca6b18567e6a81a4d1a7206b2 |
2 |
Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Nov 1 01:14:13 2015 +0000 |
4 |
Commit: Matt Thode <prometheanfire <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Nov 1 01:15:25 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01be0da7 |
7 |
|
8 |
net-analyzer/icinga: fixing CVE-2015-8010 bug 564242 |
9 |
|
10 |
Package-Manager: portage-2.2.20.1 |
11 |
|
12 |
net-analyzer/icinga/Manifest | 1 + |
13 |
net-analyzer/icinga/icinga-1.13.3.ebuild | 267 +++++++++++++++++++++++++++++++ |
14 |
2 files changed, 268 insertions(+) |
15 |
|
16 |
diff --git a/net-analyzer/icinga/Manifest b/net-analyzer/icinga/Manifest |
17 |
index 05af21b..60eb54f 100644 |
18 |
--- a/net-analyzer/icinga/Manifest |
19 |
+++ b/net-analyzer/icinga/Manifest |
20 |
@@ -4,4 +4,5 @@ DIST icinga-1.11.4.tar.gz 18657247 SHA256 34e923d8daac0235513ece5f54a2065b9166cc |
21 |
DIST icinga-1.11.7.tar.gz 18657763 SHA256 b6526dd44d42c70e50ebfb58608f1fec8ba6d805fda4fde57f1078c248e25045 SHA512 3c06771f83257afc9096078ba5304ad9a3fbd8d75f22ca62113c45b06f1a015ef3758936dcb3376b3a18584a360ca4a629e5b071570b7215f7b199e414946af1 WHIRLPOOL 4f66389b467f77e5544239c9c1553e185e37f115f057df83330118e2e8883efa5d73b05bc1c9b3801ff522947e098f3169185b71a172bf9ac26173a033ce30d6 |
22 |
DIST icinga-1.12.0.tar.gz 18670338 SHA256 6bcee5605d66a00444454514baeffd8084df6097cf8ebead2b8114387d5def14 SHA512 214eece3d5545f9157c25d83f1ed65eab82ae4508e713efa2aec83d69e0621ff53618a33c266e88f67b13e4734bd62d7e55cb2cbc547946d13e691f9b24c726b WHIRLPOOL 94fd7435f113e839e1d6a71a466060ab3e2f161a64643e011acb01f1a34bfe00a7313ea47434db6f74405b1b3fe7581c39bb39fd04887e4985fcd16f0cc0c827 |
23 |
DIST icinga-1.12.2.tar.gz 18745366 SHA256 3eb3e623070996fffe8ba1d5c0fe8081d3074bca5109de4ee597a9515507a4cc SHA512 eac3d354fa555d8374757a07cc84f028dcead71eb611245e16597b050f8f050d4b955cf7bc70ff0230a7fa8eb004541827c2686b60ccd683a0646c1d7707b264 WHIRLPOOL fc1251966dfce7377e6f4017281b3f35cca2241ee1fb31b654126d8f045a957a6835cdb45d622efaaf0cf0cd89d45969f6a4c81dd628174dc7a9c29cef137b51 |
24 |
+DIST icinga-1.13.3.tar.gz 18738204 SHA256 d6994bcc9e137f6639b781a78a55d29c51d74cdfce7f35c13c47e09f200acd84 SHA512 babdbb823c6d7241aa67c39c35f67bdf9a4963688b6edd1190af32e056639c1e592791071c90eae3daa44bcb63beee2ff260ce5a0d5e7edb0ed3c99d69ffdaed WHIRLPOOL 6886f98f44cf2aed3b1f2a23d905cbbf5ecf22055ba66d44b44c46942947103863e47e8ba889ba97d98a22f9364946cd3e725563d05df105be519486e2f4857d |
25 |
DIST icinga-1.9.6.tar.gz 17082621 SHA256 a70a54d49813f8ea1b58688d5d2b3ecd00a0470a900c84943c044669f582274c SHA512 f2489d6c898e754ca162304651e71e071e5f1d0ce396ecd87ba9e6fd0a14343cca24fd860e661250b2723a696045d45602ebf2fc9aa16dbaf126415ba109b3ff WHIRLPOOL 599b3a257e1ef9b9d713cfbde0233ab171f46ee5f2fffaa2e5a3ab95daaad2c9ee88e61def2420d60e9262fb57dc4a18ea168c0d9b1da52dc85792d2d1389cbf |
26 |
|
27 |
diff --git a/net-analyzer/icinga/icinga-1.13.3.ebuild b/net-analyzer/icinga/icinga-1.13.3.ebuild |
28 |
new file mode 100644 |
29 |
index 0000000..24f28f8 |
30 |
--- /dev/null |
31 |
+++ b/net-analyzer/icinga/icinga-1.13.3.ebuild |
32 |
@@ -0,0 +1,267 @@ |
33 |
+# Copyright 1999-2015 Gentoo Foundation |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+# $Id$ |
36 |
+ |
37 |
+EAPI=5 |
38 |
+ |
39 |
+inherit depend.apache eutils multilib pax-utils toolchain-funcs user versionator |
40 |
+ |
41 |
+DESCRIPTION="Nagios Fork - Check daemon, CGIs, docs, IDOutils" |
42 |
+HOMEPAGE="http://www.icinga.org/" |
43 |
+#MY_PV=$(delete_version_separator 3) |
44 |
+#SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.gz" |
45 |
+#S=${WORKDIR}/${PN}-${MY_PV} |
46 |
+#SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" |
47 |
+SRC_URI="https://github.com/${PN}/${PN}-core/releases/download/v${PV}/${P}.tar.gz" |
48 |
+ |
49 |
+LICENSE="GPL-2" |
50 |
+SLOT="0" |
51 |
+KEYWORDS="~amd64 ~hppa ~x86" |
52 |
+IUSE="+apache2 contrib eventhandler +idoutils lighttpd +mysql perl +plugins postgres ssl +vim-syntax +web" |
53 |
+DEPEND="idoutils? ( dev-db/libdbi-drivers[mysql?,postgres?] ) |
54 |
+ perl? ( dev-lang/perl ) |
55 |
+ virtual/mailx |
56 |
+ web? ( |
57 |
+ media-libs/gd[jpeg,png] |
58 |
+ lighttpd? ( www-servers/lighttpd ) |
59 |
+ ) |
60 |
+ !net-analyzer/nagios-core" |
61 |
+RDEPEND="${DEPEND} |
62 |
+ plugins? ( || ( |
63 |
+ net-analyzer/monitoring-plugins |
64 |
+ net-analyzer/nagios-plugins |
65 |
+ ) )" |
66 |
+RESTRICT="test" |
67 |
+ |
68 |
+want_apache2 |
69 |
+ |
70 |
+pkg_setup() { |
71 |
+ depend.apache_pkg_setup |
72 |
+ enewgroup icinga |
73 |
+ enewgroup nagios |
74 |
+ enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios" |
75 |
+} |
76 |
+ |
77 |
+src_prepare() { |
78 |
+ epatch "${FILESDIR}/fix-prestripped-binaries-1.7.0.patch" |
79 |
+} |
80 |
+ |
81 |
+src_configure() { |
82 |
+ local myconf |
83 |
+ |
84 |
+ myconf="$(use_enable perl embedded-perl) |
85 |
+ $(use_with perl perlcache) |
86 |
+ $(use_enable idoutils) |
87 |
+ $(use_enable ssl) |
88 |
+ --with-cgiurl=/icinga/cgi-bin |
89 |
+ --with-log-dir=/var/log/icinga |
90 |
+ --libdir=/usr/$(get_libdir) |
91 |
+ --bindir=/usr/sbin |
92 |
+ --sbindir=/usr/$(get_libdir)/icinga/cgi-bin |
93 |
+ --datarootdir=/usr/share/icinga/htdocs |
94 |
+ --localstatedir=/var/lib/icinga |
95 |
+ --sysconfdir=/etc/icinga |
96 |
+ --with-lockfile=/var/run/icinga/icinga.lock |
97 |
+ --with-temp-dir=/tmp/icinga |
98 |
+ --with-temp-file=/tmp/icinga/icinga.tmp" |
99 |
+ |
100 |
+ if use idoutils ; then |
101 |
+ myconf+=" --with-ido2db-lockfile=/var/run/icinga/ido2db.lock |
102 |
+ --with-icinga-chkfile=/var/lib/icinga/icinga.chk |
103 |
+ --with-ido-sockfile=/var/lib/icinga/ido.sock |
104 |
+ --with-idomod-tmpfile=/tmp/icinga/idomod.tmp" |
105 |
+ fi |
106 |
+ |
107 |
+ if use eventhandler ; then |
108 |
+ myconfig+=" --with-eventhandler-dir=/etc/icinga/eventhandlers" |
109 |
+ fi |
110 |
+ |
111 |
+ if use plugins ; then |
112 |
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins" |
113 |
+ else |
114 |
+ myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins" |
115 |
+ fi |
116 |
+ |
117 |
+ if use !apache2 && use !lighttpd ; then |
118 |
+ myconf+=" --with-command-group=icinga" |
119 |
+ else |
120 |
+ if use apache2 ; then |
121 |
+ myconf+=" --with-httpd-conf=/etc/apache2/conf.d" |
122 |
+ myconf+=" --with-command-group=apache" |
123 |
+ elif use lighttpd ; then |
124 |
+ myconf+=" --with-command-group=lighttpd" |
125 |
+ fi |
126 |
+ fi |
127 |
+ |
128 |
+ econf ${myconf} |
129 |
+} |
130 |
+ |
131 |
+src_compile() { |
132 |
+ tc-export CC |
133 |
+ |
134 |
+ emake icinga || die "make failed" |
135 |
+ |
136 |
+ if use web ; then |
137 |
+ emake DESTDIR="${D}" cgis || die |
138 |
+ fi |
139 |
+ |
140 |
+ if use contrib ; then |
141 |
+ emake DESTDIR="${D}" -C contrib || die |
142 |
+ fi |
143 |
+ |
144 |
+ if use idoutils ; then |
145 |
+ emake DESTDIR="${D}" idoutils || die |
146 |
+ fi |
147 |
+} |
148 |
+ |
149 |
+src_install() { |
150 |
+ dodoc Changelog README UPGRADING || die |
151 |
+ |
152 |
+ if ! use web ; then |
153 |
+ sed -i -e '/cd $(SRC_\(CGI\|HTM\))/d' Makefile || die |
154 |
+ fi |
155 |
+ |
156 |
+ emake DESTDIR="${D}" install{,-config,-commandmode} || die |
157 |
+ |
158 |
+ if use idoutils ; then |
159 |
+ emake DESTDIR="${D}" install-idoutils || die |
160 |
+ fi |
161 |
+ |
162 |
+ if use contrib ; then |
163 |
+ emake DESTDIR="${D}" -C contrib install || die |
164 |
+ fi |
165 |
+ |
166 |
+ if use eventhandler ; then |
167 |
+ emake DESTDIR="${D}" install-eventhandlers || die |
168 |
+ fi |
169 |
+ |
170 |
+ newinitd "${FILESDIR}"/icinga-init.d icinga || die |
171 |
+ newconfd "${FILESDIR}"/icinga-conf.d icinga || die |
172 |
+ if use idoutils ; then |
173 |
+ newinitd "${FILESDIR}"/ido2db-init.d ido2db || die |
174 |
+ newconfd "${FILESDIR}"/ido2db-conf.d ido2db || die |
175 |
+ insinto /usr/share/icinga/contrib/db |
176 |
+ doins -r module/idoutils/db/* || die |
177 |
+ fi |
178 |
+ # Apache Module |
179 |
+ if use web ; then |
180 |
+ if use apache2 ; then |
181 |
+ insinto "${APACHE_MODULES_CONFDIR}" |
182 |
+ newins "${FILESDIR}"/icinga-apache.conf 99_icinga.conf || die |
183 |
+ elif use lighttpd ; then |
184 |
+ insinto /etc/lighttpd |
185 |
+ newins "${FILESDIR}"/icinga-lighty.conf lighttpd_icinga.conf || die |
186 |
+ else |
187 |
+ ewarn "${CATEGORY}/${PF} only supports Apache-2.x or Lighttpd webserver" |
188 |
+ ewarn "out-of-the-box. Since you are not using one of them, you" |
189 |
+ ewarn "have to configure your webserver accordingly yourself." |
190 |
+ fi |
191 |
+ fowners -R root:root /usr/$(get_libdir)/icinga || die |
192 |
+ cd "${D}" || die |
193 |
+ find usr/$(get_libdir)/icinga -type d -exec fperms 755 {} + |
194 |
+ find usr/$(get_libdir)/icinga/cgi-bin -type f -exec fperms 755 {} + |
195 |
+ fi |
196 |
+ |
197 |
+ if use eventhandler ; then |
198 |
+ dodir /etc/icinga/eventhandlers || die |
199 |
+ fowners icinga:icinga /etc/icinga/eventhandlers || die |
200 |
+ fi |
201 |
+ |
202 |
+ keepdir /etc/icinga |
203 |
+ keepdir /var/lib/icinga |
204 |
+ keepdir /var/lib/icinga/archives |
205 |
+ keepdir /var/lib/icinga/rw |
206 |
+ keepdir /var/lib/icinga/spool/checkresults |
207 |
+ |
208 |
+ if use apache2 ; then |
209 |
+ webserver=apache |
210 |
+ elif use lighttpd ; then |
211 |
+ webserver=lighttpd |
212 |
+ else |
213 |
+ webserver=icinga |
214 |
+ fi |
215 |
+ |
216 |
+ fowners icinga:icinga /var/lib/icinga || die "Failed chown of /var/lib/icinga" |
217 |
+ fowners -R icinga:${webserver} /var/lib/icinga/rw || die "Failed chown of /var/lib/icinga/rw" |
218 |
+ |
219 |
+ fperms 6755 /var/lib/icinga/rw || die "Failed Chmod of ${D}/var/lib/icinga/rw" |
220 |
+ fperms 0750 /etc/icinga || die "Failed chmod of ${D}/etc/icinga" |
221 |
+ |
222 |
+ # paxmarks |
223 |
+ if use idoutils ; then |
224 |
+ pax-mark m usr/sbin/ido2db |
225 |
+ fi |
226 |
+} |
227 |
+ |
228 |
+pkg_postinst() { |
229 |
+ if use web ; then |
230 |
+ elog "This does not include cgis that are perl-dependent" |
231 |
+ elog "Currently traceroute.cgi is perl-dependent" |
232 |
+ elog "Note that the user your webserver is running as needs" |
233 |
+ elog "read-access to /etc/icinga." |
234 |
+ elog |
235 |
+ if use apache2 || use lighttpd ; then |
236 |
+ elog "There are several possible solutions to accomplish this," |
237 |
+ elog "choose the one you are most comfortable with:" |
238 |
+ elog |
239 |
+ if use apache2 ; then |
240 |
+ elog " usermod -G icinga apache" |
241 |
+ elog "or" |
242 |
+ elog " chown icinga:apache /etc/icinga" |
243 |
+ elog |
244 |
+ elog "Also edit /etc/conf.d/apache2 and add a line like" |
245 |
+ elog "APACHE2_OPTS=\"\$APACHE2_OPTS -D ICINGA\"" |
246 |
+ elog |
247 |
+ elog "Icinga web service needs user authentication. If you" |
248 |
+ elog "use the base configuration, you need a password file" |
249 |
+ elog "with a password for user \"icingaadmin\"" |
250 |
+ elog "You can create this file by executing:" |
251 |
+ elog "htpasswd -c /etc/icinga/htpasswd.users icingaadmin" |
252 |
+ elog |
253 |
+ elog "you may want to also add apache to the icinga group" |
254 |
+ elog "to allow it access to the AuthUserFile" |
255 |
+ elog |
256 |
+ elif use lighttpd ; then |
257 |
+ elog " usermod -G icinga lighttpd " |
258 |
+ elog "or" |
259 |
+ elog " chown icinga:lighttpd /etc/icinga" |
260 |
+ elog "Also edit /etc/lighttpd/lighttpd.conf and add 'include \"lighttpd_icinga.conf\"'" |
261 |
+ fi |
262 |
+ elog |
263 |
+ elog "That will make icinga's web front end visable via" |
264 |
+ elog "http://localhost/icinga/" |
265 |
+ elog |
266 |
+ else |
267 |
+ elog "IMPORTANT: Do not forget to add the user your webserver" |
268 |
+ elog "is running as to the icinga group!" |
269 |
+ fi |
270 |
+ else |
271 |
+ ewarn "Please note that you have installed Icinga without web interface." |
272 |
+ ewarn "Please don't file any bugs about having no web interface when you do this." |
273 |
+ ewarn "Thank you!" |
274 |
+ fi |
275 |
+ elog |
276 |
+ elog "If you want icinga to start at boot time" |
277 |
+ elog "remember to execute:" |
278 |
+ elog " rc-update add icinga default" |
279 |
+ elog |
280 |
+ elog "If your kernel has /proc protection, icinga" |
281 |
+ elog "will not be happy as it relies on accessing the proc" |
282 |
+ elog "filesystem. You can fix this by adding icinga into" |
283 |
+ elog "the group wheel, but this is not recomended." |
284 |
+ elog |
285 |
+ if [ -d "${ROOT}"/var/icinga ] ; then |
286 |
+ ewarn |
287 |
+ ewarn "/var/icinga was moved to /var/lib/icinga" |
288 |
+ ewarn "please move the files if this was an upgrade" |
289 |
+ if use idoutils ; then |
290 |
+ ewarn "and edit /etc/ido2db.cfg to change the location of the files" |
291 |
+ ewarn "it accesses" |
292 |
+ ewarn "update your db with the scripts under the directory" |
293 |
+ ewarn "/usr/share/icinga/contrib/db/" |
294 |
+ fi |
295 |
+ ewarn |
296 |
+ ewarn "The \"mv /var/icinga /var/lib/\" command works well to move the files" |
297 |
+ ewarn "remove /var/icinga afterwards to make this warning disappear" |
298 |
+ fi |
299 |
+} |