1 |
commit: fa4af4e332ac14404297401fc3cca08cf73ccdd2 |
2 |
Author: Matthew Thode <prometheanfire <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 27 04:10:25 2012 +0000 |
4 |
Commit: Matt Thode <prometheanfire <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 27 04:10:25 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/prometheanfire.git;a=commit;h=fa4af4e3 |
7 |
|
8 |
first test of readding the API (statically) |
9 |
|
10 |
--- |
11 |
net-analyzer/icinga/ChangeLog | 5 + |
12 |
net-analyzer/icinga/Manifest | 3 +- |
13 |
net-analyzer/icinga/icinga-1.6.1-r3.ebuild | 235 ++++++++++++++++++++++++++++ |
14 |
3 files changed, 242 insertions(+), 1 deletions(-) |
15 |
|
16 |
diff --git a/net-analyzer/icinga/ChangeLog b/net-analyzer/icinga/ChangeLog |
17 |
index 9a69915..e3fb007 100644 |
18 |
--- a/net-analyzer/icinga/ChangeLog |
19 |
+++ b/net-analyzer/icinga/ChangeLog |
20 |
@@ -2,6 +2,11 @@ |
21 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
22 |
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/icinga/ChangeLog,v 1.5 2011/11/22 19:53:37 prometheanfire Exp $ |
23 |
|
24 |
+*icinga-1.6.1-r3 (27 Feb 2012) |
25 |
+ |
26 |
+ 27 Feb 2012; mthode <mthode@g.o> +icinga-1.6.1-r3.ebuild: |
27 |
+ adding API back into the build (should have been statically in it) |
28 |
+ |
29 |
12 Jan 2012; mthode <mthode@g.o> files/icinga-init.d-2: |
30 |
fixed initscript reload reload |
31 |
|
32 |
|
33 |
diff --git a/net-analyzer/icinga/Manifest b/net-analyzer/icinga/Manifest |
34 |
index a339146..b573862 100644 |
35 |
--- a/net-analyzer/icinga/Manifest |
36 |
+++ b/net-analyzer/icinga/Manifest |
37 |
@@ -8,6 +8,7 @@ AUX ido2db-init.d 990 RMD160 505b54e4ca4cc7ce4771680837a937c0416d9394 SHA1 a2e73 |
38 |
DIST icinga-1.5.1.tar.gz 16518659 RMD160 972d1e4dd49fdddf32970868bd16964c7e3cd87d SHA1 61bd47535e9f49e63e0ee1ef2bb56d62e6893418 SHA256 b2cc23ab8b96e9409ce3e7ed4a0e1aabea7f9b4e9d521f5ed23a99ea1c9ec37b |
39 |
DIST icinga-1.6.1.tar.gz 12880538 RMD160 f755d1499c9794fb9a60e0e35dbc091758e72dc1 SHA1 b14cc8be0a8b49ccd41018223d34600db7bc4f3d SHA256 80b980272dd45bcd14b79d98b1125d6aa4184c20644863f71d9f3e00fbced89b |
40 |
EBUILD icinga-1.5.1-r3.ebuild 6840 RMD160 a619b1670b32792f011efe65d4bac172c685a438 SHA1 c009a6d39997bdb5666d0184f4452a4f68727265 SHA256 7dfd94ad786388f8d6a9d732dd654ef5de1fb0ee321622880f16725e25e27c3b |
41 |
+EBUILD icinga-1.6.1-r3.ebuild 7056 RMD160 d06e230ec69c3bd0df5c8d4d8088334ff09008c7 SHA1 1ee629636a6a25216340437c9adb9707a7aefa9c SHA256 16a2096e32c800f5107333ba6cc719ccc5ab06877a5b7d13ee0f046ef8383374 |
42 |
EBUILD icinga-1.6.1.ebuild 6963 RMD160 a18fc79282f187a14f7eb40caee44bbf7f02c601 SHA1 a9c071619cfb8e7990aa203881ccd4d3fb0d4f5e SHA256 35437f349927e334cab3a824072dd93edbf6721ebd48091d4c38c613e92d93d3 |
43 |
-MISC ChangeLog 1362 RMD160 ccdcbf450ebec3d8f4d9c094f3ca7f7ea97aa4cb SHA1 6dc9074a6656350d3e978b5527395d6208fa1e2f SHA256 48bb0a8b9ec3732dc21ea7478b4df6f4442db5a49771e2ea86f394c3ad38e4cd |
44 |
+MISC ChangeLog 1531 RMD160 92a982a934275a38a0e8b559dab10de35e2d25bb SHA1 de93dbf1e18dfee1b00c47b23e3d68f3c078a72a SHA256 d4921b473368eb142816442114347176b410823974e180e3ab7c0660ee8e3f29 |
45 |
MISC metadata.xml 614 RMD160 bd86f9fb8e1911deaedaf6e7983e9de3a9e749d4 SHA1 b0ab4641480b5342c67a00edb4bc0bdc1745ca81 SHA256 3814e6b4e6f2d2b42cd82f090136270e834057a170435670c156435e9188ec2d |
46 |
|
47 |
diff --git a/net-analyzer/icinga/icinga-1.6.1-r3.ebuild b/net-analyzer/icinga/icinga-1.6.1-r3.ebuild |
48 |
new file mode 100644 |
49 |
index 0000000..3ae74dc |
50 |
--- /dev/null |
51 |
+++ b/net-analyzer/icinga/icinga-1.6.1-r3.ebuild |
52 |
@@ -0,0 +1,235 @@ |
53 |
+# Copyright 1999-2012 Gentoo Foundation |
54 |
+# Distributed under the terms of the GNU General Public License v2 |
55 |
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/icinga/icinga-1.6.1-r2.ebuild,v 1.1 2011/12/29 15:54:57 prometheanfire Exp $ |
56 |
+ |
57 |
+EAPI=2 |
58 |
+ |
59 |
+inherit depend.apache eutils multilib toolchain-funcs |
60 |
+ |
61 |
+DESCRIPTION="Nagios Fork - Check daemon, CGIs, docs, IDOutils" |
62 |
+HOMEPAGE="http://www.icinga.org/" |
63 |
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" |
64 |
+ |
65 |
+LICENSE="GPL-2" |
66 |
+SLOT="0" |
67 |
+KEYWORDS="~amd64 ~x86" |
68 |
+IUSE="+apache2 debug +idoutils lighttpd +mysql perl +plugins postgres ssl +vim-syntax +web" |
69 |
+DEPEND="idoutils? ( dev-db/libdbi-drivers[mysql?,postgres?] ) |
70 |
+ perl? ( dev-lang/perl ) |
71 |
+ virtual/mailx |
72 |
+ web? ( |
73 |
+ media-libs/gd[jpeg,png] |
74 |
+ lighttpd? ( www-servers/lighttpd dev-lang/php[cgi] ) |
75 |
+ apache2? ( || ( dev-lang/php[apache2] dev-lang/php[cgi] ) ) |
76 |
+ ) |
77 |
+ !net-analyzer/nagios-core" |
78 |
+RDEPEND="${DEPEND} |
79 |
+ plugins? ( net-analyzer/nagios-plugins )" |
80 |
+ |
81 |
+want_apache2 |
82 |
+ |
83 |
+pkg_setup() { |
84 |
+ depend.apache_pkg_setup |
85 |
+ enewgroup icinga |
86 |
+ enewgroup nagios |
87 |
+ enewuser icinga -1 -1 /var/spool/icinga "icinga,nagios" |
88 |
+} |
89 |
+ |
90 |
+src_prepare() { |
91 |
+ epatch "${FILESDIR}/fix-prestripped-binaries.patch" |
92 |
+} |
93 |
+ |
94 |
+src_configure() { |
95 |
+ local myconf |
96 |
+ |
97 |
+ myconf="$(use_enable perl embedded-perl) |
98 |
+ $(use_with perl perlcache) |
99 |
+ $(use_enable idoutils) |
100 |
+ $(use_enable ssl) |
101 |
+ $(use_enable debug DEBUG0) |
102 |
+ $(use_enable debug DEBUG1) |
103 |
+ $(use_enable debug DEBUG2) |
104 |
+ $(use_enable debug DEBUG3) |
105 |
+ $(use_enable debug DEBUG4) |
106 |
+ $(use_enable debug DEBUG5) |
107 |
+ --disable-statuswrl |
108 |
+ --with-cgiurl=/icinga/cgi-bin |
109 |
+ --with-log-dir=/var/log/icinga |
110 |
+ --bindir=/usr/sbin |
111 |
+ --sbindir=/usr/$(get_libdir)/icinga/cgi-bin |
112 |
+ --datarootdir=/usr/share/icinga/htdocs |
113 |
+ --localstatedir=/var/lib/icinga |
114 |
+ --sysconfdir=/etc/icinga |
115 |
+ --with-lockfile=/var/run/icinga/icinga.lock |
116 |
+ --with-temp-dir=/tmp/icinga" |
117 |
+ |
118 |
+ if use plugins ; then |
119 |
+ myconf+=" --libexecdir=/usr/$(get_libdir)/nagios/plugins" |
120 |
+ else |
121 |
+ myconf+=" --libexecdir=/usr/$(get_libdir)/icinga/plugins" |
122 |
+ fi |
123 |
+ |
124 |
+ if use !apache2 && use !lighttpd ; then |
125 |
+ myconf+=" --with-command-group=icinga" |
126 |
+ else |
127 |
+ if use apache2 ; then |
128 |
+ myconf+=" --with-httpd-conf=/etc/apache2/conf.d" |
129 |
+ myconf+=" --with-command-group=apache" |
130 |
+ elif use lighttpd ; then |
131 |
+ myconf+=" --with-command-group=lighttpd" |
132 |
+ fi |
133 |
+ fi |
134 |
+ |
135 |
+ econf ${myconf} |
136 |
+ |
137 |
+ cd module/icinga-api || die |
138 |
+ econf ${myconf2} |
139 |
+} |
140 |
+ |
141 |
+src_compile() { |
142 |
+ tc-export CC |
143 |
+ |
144 |
+ emake icinga || die "make failed" |
145 |
+ |
146 |
+ if use web ; then |
147 |
+ emake DESTDIR="${D}" cgis || die |
148 |
+ fi |
149 |
+ |
150 |
+ if use idoutils ; then |
151 |
+ emake DESTDIR="${D}" idoutils || die |
152 |
+ fi |
153 |
+} |
154 |
+ |
155 |
+src_install() { |
156 |
+ dodoc Changelog README UPGRADING || die |
157 |
+ |
158 |
+ if ! use web ; then |
159 |
+ sed -i -e '/cd $(SRC_\(CGI\|HTM\))/d' Makefile || die |
160 |
+ fi |
161 |
+ |
162 |
+ emake DESTDIR="${D}" install{,-config,-commandmode} || die |
163 |
+ |
164 |
+ sed -i -e 's/var\/lib\/icinga\/icinga.tmp/tmp\/icinga\/icinga.tmp/g' "${D}"/etc/icinga/icinga.cfg || die |
165 |
+ |
166 |
+ if use idoutils ; then |
167 |
+ emake DESTDIR="${D}" install-idoutils || die |
168 |
+ fi |
169 |
+ emake DESTDIR="${D}" install-api || die |
170 |
+ |
171 |
+ newinitd "${FILESDIR}"/icinga-init.d-2 icinga || die |
172 |
+ newconfd "${FILESDIR}"/icinga-conf.d icinga || die |
173 |
+ if use idoutils ; then |
174 |
+ newinitd "${FILESDIR}"/ido2db-init.d ido2db || die |
175 |
+ newconfd "${FILESDIR}"/ido2db-conf.d ido2db || die |
176 |
+ insinto /usr/share/icinga/contrib/db |
177 |
+ doins -r module/idoutils/db/* || die |
178 |
+ fi |
179 |
+ # Apache Module |
180 |
+ if use web ; then |
181 |
+ if use apache2 ; then |
182 |
+ insinto "${APACHE_MODULES_CONFDIR}" |
183 |
+ newins "${FILESDIR}"/icinga-apache.conf 99_icinga.conf || die |
184 |
+ elif use lighttpd ; then |
185 |
+ insinto /etc/lighttpd |
186 |
+ newins "${FILESDIR}"/icinga-lighty.conf lighttpd_icinga.conf || die |
187 |
+ else |
188 |
+ ewarn "${CATEGORY}/${PF} only supports Apache-2.x or Lighttpd webserver" |
189 |
+ ewarn "out-of-the-box. Since you are not using one of them, you" |
190 |
+ ewarn "have to configure your webserver accordingly yourself." |
191 |
+ fi |
192 |
+ fi |
193 |
+ |
194 |
+ fowners -R root:root /usr/$(get_libdir)/icinga || die |
195 |
+ cd "${D}" || die |
196 |
+ find usr/$(get_libdir)/icinga -type d -exec fperms 755 {} + |
197 |
+ find usr/$(get_libdir)/icinga/cgi-bin -type f -exec fperms 755 {} + |
198 |
+ dodir /var/run/icinga || die |
199 |
+ fowners icinga:icinga /var/run/icinga || die |
200 |
+ |
201 |
+ keepdir /etc/icinga |
202 |
+ keepdir /var/lib/icinga |
203 |
+ keepdir /var/lib/icinga/archives |
204 |
+ keepdir /var/lib/icinga/rw |
205 |
+ keepdir /var/lib/icinga/spool/checkresults |
206 |
+ |
207 |
+ if use apache2 ; then |
208 |
+ webserver=apache |
209 |
+ elif use lighttpd ; then |
210 |
+ webserver=lighttpd |
211 |
+ else |
212 |
+ webserver=icinga |
213 |
+ fi |
214 |
+ |
215 |
+ fowners icinga:icinga /var/lib/icinga || die "Failed chown of /var/lib/icinga" |
216 |
+ fowners -R icinga:${webserver} /var/lib/icinga/rw || die "Failed chown of /var/lib/icinga/rw" |
217 |
+ |
218 |
+ fperms 6755 /var/lib/icinga/rw || die "Failed Chmod of ${D}/var/lib/icinga/rw" |
219 |
+ fperms 0750 /etc/icinga || die "Failed chmod of ${D}/etc/icinga" |
220 |
+} |
221 |
+ |
222 |
+pkg_postinst() { |
223 |
+ if use web ; then |
224 |
+ elog "This does not include cgis that are perl-dependent" |
225 |
+ elog "Currently traceroute.cgi is perl-dependent" |
226 |
+ elog "Note that the user your webserver is running as needs" |
227 |
+ elog "read-access to /etc/icinga." |
228 |
+ elog |
229 |
+ if use apache2 || use lighttpd ; then |
230 |
+ elog "There are several possible solutions to accomplish this," |
231 |
+ elog "choose the one you are most comfortable with:" |
232 |
+ elog |
233 |
+ if use apache2 ; then |
234 |
+ elog " usermod -G icinga apache" |
235 |
+ elog "or" |
236 |
+ elog " chown icinga:apache /etc/icinga" |
237 |
+ elog |
238 |
+ elog "Also edit /etc/conf.d/apache2 and add a line like" |
239 |
+ elog "APACHE2_OPTS=\"\$APACHE2_OPTS -D ICINGA\"" |
240 |
+ elog |
241 |
+ elog "Icinga web service needs user authentication. If you" |
242 |
+ elog "use the base configuration, you need a password file" |
243 |
+ elog "with a password for user \"icingaadmin\"" |
244 |
+ elog "You can create this file by executing:" |
245 |
+ elog "htpasswd -c /etc/icinga/htpasswd.users icingaadmin" |
246 |
+ elif use lighttpd ; then |
247 |
+ elog " usermod -G icinga lighttpd " |
248 |
+ elog "or" |
249 |
+ elog " chown icinga:lighttpd /etc/icinga" |
250 |
+ elog "Also edit /etc/lighttpd/lighttpd.conf and add 'include \"lighttpd_icinga.conf\"'" |
251 |
+ fi |
252 |
+ elog |
253 |
+ elog "That will make icinga's web front end visable via" |
254 |
+ elog "http://localhost/icinga/" |
255 |
+ elog |
256 |
+ else |
257 |
+ elog "IMPORTANT: Do not forget to add the user your webserver" |
258 |
+ elog "is running as to the icinga group!" |
259 |
+ fi |
260 |
+ else |
261 |
+ ewarn "Please note that you have installed Icinga without web interface." |
262 |
+ ewarn "Please don't file any bugs about having no web interface when you do this." |
263 |
+ ewarn "Thank you!" |
264 |
+ fi |
265 |
+ elog |
266 |
+ elog "If you want icinga to start at boot time" |
267 |
+ elog "remember to execute:" |
268 |
+ elog " rc-update add icinga default" |
269 |
+ elog |
270 |
+ elog "If your kernel has /proc protection, icinga" |
271 |
+ elog "will not be happy as it relies on accessing the proc" |
272 |
+ elog "filesystem. You can fix this by adding icinga into" |
273 |
+ elog "the group wheel, but this is not recomended." |
274 |
+ elog |
275 |
+ if [ -d "${ROOT}"/var/icinga ] ; then |
276 |
+ ewarn |
277 |
+ ewarn "/var/icinga was moved to /var/lib/icinga" |
278 |
+ ewarn "please move the files if this was an upgrade" |
279 |
+ if use idoutils ; then |
280 |
+ ewarn "and edit /etc/ido2db.cfg to change the location of the files" |
281 |
+ ewarn "it accesses" |
282 |
+ fi |
283 |
+ ewarn |
284 |
+ ewarn "The \"mv /var/icinga /var/lib/\" command works well to move the files" |
285 |
+ ewarn "remove /var/icinga afterwards to make this warning disappear" |
286 |
+ fi |
287 |
+} |