1 |
prometheanfire 12/07/09 20:44:38 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: icinga-1.7.1-r2.ebuild |
5 |
Log: |
6 |
removed debug (not used anymore) and fixed emerging with web use flag bug \#424795 |
7 |
|
8 |
(Portage version: 2.1.10.65/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.19 net-analyzer/icinga/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/icinga/ChangeLog?rev=1.19&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/icinga/ChangeLog?rev=1.19&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/icinga/ChangeLog?r1=1.18&r2=1.19 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/net-analyzer/icinga/ChangeLog,v |
20 |
retrieving revision 1.18 |
21 |
retrieving revision 1.19 |
22 |
diff -u -r1.18 -r1.19 |
23 |
--- ChangeLog 25 Jun 2012 18:58:02 -0000 1.18 |
24 |
+++ ChangeLog 9 Jul 2012 20:44:38 -0000 1.19 |
25 |
@@ -1,6 +1,13 @@ |
26 |
# ChangeLog for net-analyzer/icinga |
27 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/icinga/ChangeLog,v 1.18 2012/06/25 18:58:02 prometheanfire Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/icinga/ChangeLog,v 1.19 2012/07/09 20:44:38 prometheanfire Exp $ |
30 |
+ |
31 |
+*icinga-1.7.1-r2 (09 Jul 2012) |
32 |
+ |
33 |
+ 09 Jul 2012; Matthew Thode <prometheanfire@g.o> |
34 |
+ +icinga-1.7.1-r2.ebuild: |
35 |
+ removed debug (not used anymore) and fixed emerging without web use flag bug |
36 |
+ #424795 |
37 |
|
38 |
*icinga-1.7.1-r1 (25 Jun 2012) |
39 |
|
40 |
|
41 |
|
42 |
|
43 |
1.1 net-analyzer/icinga/icinga-1.7.1-r2.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/icinga/icinga-1.7.1-r2.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/icinga/icinga-1.7.1-r2.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: icinga-1.7.1-r2.ebuild |
49 |
=================================================================== |
50 |
# Copyright 1999-2012 Gentoo Foundation |
51 |
# Distributed under the terms of the GNU General Public License v2 |
52 |
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/icinga/icinga-1.7.1-r2.ebuild,v 1.1 2012/07/09 20:44:38 prometheanfire Exp $ |
53 |
|
54 |
EAPI=2 |
55 |
|
56 |
inherit depend.apache eutils multilib toolchain-funcs user versionator |
57 |
|
58 |
DESCRIPTION="Nagios Fork - Check daemon, CGIs, docs, IDOutils" |
59 |
HOMEPAGE="http://www.icinga.org/" |
60 |
#MY_PV=$(delete_version_separator 3) |
61 |
#SRC_URI="mirror://sourceforge/${PN}/${PN}-${MY_PV}.tar.gz" |
62 |
#S=${WORKDIR}/${PN}-${MY_PV} |
63 |
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" |
64 |
|
65 |
LICENSE="GPL-2" |
66 |
SLOT="0" |
67 |
KEYWORDS="~amd64 ~x86" |
68 |
IUSE="+apache2 eventhandler +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 |
RESTRICT="test" |
81 |
|
82 |
want_apache2 |
83 |
|
84 |
pkg_setup() { |
85 |
depend.apache_pkg_setup |
86 |
enewgroup icinga |
87 |
enewgroup nagios |
88 |
enewuser icinga -1 -1 /var/lib/icinga "icinga,nagios" |
89 |
} |
90 |
|
91 |
src_prepare() { |
92 |
epatch "${FILESDIR}/fix-prestripped-binaries-1.7.0.patch" |
93 |
} |
94 |
|
95 |
src_configure() { |
96 |
local myconf |
97 |
|
98 |
myconf="$(use_enable perl embedded-perl) |
99 |
$(use_with perl perlcache) |
100 |
$(use_enable idoutils) |
101 |
$(use_enable ssl) |
102 |
--disable-statuswrl |
103 |
--with-cgiurl=/icinga/cgi-bin |
104 |
--with-log-dir=/var/log/icinga |
105 |
--libdir=/usr/$(get_libdir) |
106 |
--bindir=/usr/sbin |
107 |
--sbindir=/usr/$(get_libdir)/icinga/cgi-bin |
108 |
--datarootdir=/usr/share/icinga/htdocs |
109 |
--localstatedir=/var/lib/icinga |
110 |
--sysconfdir=/etc/icinga |
111 |
--with-lockfile=/var/run/icinga/icinga.lock |
112 |
--with-temp-dir=/tmp/icinga |
113 |
--with-temp-file=/tmp/icinga/icinga.tmp" |
114 |
|
115 |
if use idoutils ; then |
116 |
myconf+=" --with-ido2db-lockfile=/var/run/icinga/ido2db.lock |
117 |
--with-icinga-chkfile=/var/lib/icinga/icinga.chk |
118 |
--with-ido-sockfile=/var/lib/icinga/ido.sock |
119 |
--with-idomod-tmpfile=/tmp/icinga/idomod.tmp" |
120 |
fi |
121 |
|
122 |
if use eventhandler ; then |
123 |
myconfig+=" --with-eventhandler-dir=/etc/icinga/eventhandlers" |
124 |
fi |
125 |
|
126 |
if use plugins ; then |
127 |
myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins" |
128 |
else |
129 |
myconf+=" --with-plugin-dir=/usr/$(get_libdir)/nagios/plugins" |
130 |
fi |
131 |
|
132 |
if use !apache2 && use !lighttpd ; then |
133 |
myconf+=" --with-command-group=icinga" |
134 |
else |
135 |
if use apache2 ; then |
136 |
myconf+=" --with-httpd-conf=/etc/apache2/conf.d" |
137 |
myconf+=" --with-command-group=apache" |
138 |
elif use lighttpd ; then |
139 |
myconf+=" --with-command-group=lighttpd" |
140 |
fi |
141 |
fi |
142 |
|
143 |
econf ${myconf} |
144 |
} |
145 |
|
146 |
src_compile() { |
147 |
tc-export CC |
148 |
|
149 |
emake icinga || die "make failed" |
150 |
|
151 |
if use web ; then |
152 |
emake DESTDIR="${D}" cgis || die |
153 |
fi |
154 |
|
155 |
if use idoutils ; then |
156 |
emake DESTDIR="${D}" idoutils || die |
157 |
fi |
158 |
} |
159 |
|
160 |
src_install() { |
161 |
dodoc Changelog README UPGRADING || die |
162 |
|
163 |
if ! use web ; then |
164 |
sed -i -e '/cd $(SRC_\(CGI\|HTM\))/d' Makefile || die |
165 |
fi |
166 |
|
167 |
emake DESTDIR="${D}" install{,-config,-commandmode} || die |
168 |
|
169 |
if use idoutils ; then |
170 |
emake DESTDIR="${D}" install-idoutils || die |
171 |
fi |
172 |
|
173 |
if use eventhandler ; then |
174 |
emake DESTDIR="${D}" install-eventhandlers || die |
175 |
fi |
176 |
|
177 |
newinitd "${FILESDIR}"/icinga-init.d icinga || die |
178 |
newconfd "${FILESDIR}"/icinga-conf.d icinga || die |
179 |
if use idoutils ; then |
180 |
newinitd "${FILESDIR}"/ido2db-init.d ido2db || die |
181 |
newconfd "${FILESDIR}"/ido2db-conf.d ido2db || die |
182 |
insinto /usr/share/icinga/contrib/db |
183 |
doins -r module/idoutils/db/* || die |
184 |
fi |
185 |
# Apache Module |
186 |
if use web ; then |
187 |
if use apache2 ; then |
188 |
insinto "${APACHE_MODULES_CONFDIR}" |
189 |
newins "${FILESDIR}"/icinga-apache.conf 99_icinga.conf || die |
190 |
elif use lighttpd ; then |
191 |
insinto /etc/lighttpd |
192 |
newins "${FILESDIR}"/icinga-lighty.conf lighttpd_icinga.conf || die |
193 |
else |
194 |
ewarn "${CATEGORY}/${PF} only supports Apache-2.x or Lighttpd webserver" |
195 |
ewarn "out-of-the-box. Since you are not using one of them, you" |
196 |
ewarn "have to configure your webserver accordingly yourself." |
197 |
fi |
198 |
fowners -R root:root /usr/$(get_libdir)/icinga || die |
199 |
cd "${D}" || die |
200 |
find usr/$(get_libdir)/icinga -type d -exec fperms 755 {} + |
201 |
find usr/$(get_libdir)/icinga/cgi-bin -type f -exec fperms 755 {} + |
202 |
fi |
203 |
|
204 |
if use eventhandler ; then |
205 |
dodir /etc/icinga/eventhandlers || die |
206 |
fowners icinga:icinga /etc/icinga/eventhandlers || die |
207 |
fi |
208 |
|
209 |
dodir /var/run/icinga || die |
210 |
fowners icinga:icinga /var/run/icinga || die |
211 |
|
212 |
keepdir /etc/icinga |
213 |
keepdir /var/lib/icinga |
214 |
keepdir /var/lib/icinga/archives |
215 |
keepdir /var/lib/icinga/rw |
216 |
keepdir /var/lib/icinga/spool/checkresults |
217 |
|
218 |
if use apache2 ; then |
219 |
webserver=apache |
220 |
elif use lighttpd ; then |
221 |
webserver=lighttpd |
222 |
else |
223 |
webserver=icinga |
224 |
fi |
225 |
|
226 |
fowners icinga:icinga /var/lib/icinga || die "Failed chown of /var/lib/icinga" |
227 |
fowners -R icinga:${webserver} /var/lib/icinga/rw || die "Failed chown of /var/lib/icinga/rw" |
228 |
|
229 |
fperms 6755 /var/lib/icinga/rw || die "Failed Chmod of ${D}/var/lib/icinga/rw" |
230 |
fperms 0750 /etc/icinga || die "Failed chmod of ${D}/etc/icinga" |
231 |
} |
232 |
|
233 |
pkg_postinst() { |
234 |
if use web ; then |
235 |
elog "This does not include cgis that are perl-dependent" |
236 |
elog "Currently traceroute.cgi is perl-dependent" |
237 |
elog "Note that the user your webserver is running as needs" |
238 |
elog "read-access to /etc/icinga." |
239 |
elog |
240 |
if use apache2 || use lighttpd ; then |
241 |
elog "There are several possible solutions to accomplish this," |
242 |
elog "choose the one you are most comfortable with:" |
243 |
elog |
244 |
if use apache2 ; then |
245 |
elog " usermod -G icinga apache" |
246 |
elog "or" |
247 |
elog " chown icinga:apache /etc/icinga" |
248 |
elog |
249 |
elog "Also edit /etc/conf.d/apache2 and add a line like" |
250 |
elog "APACHE2_OPTS=\"\$APACHE2_OPTS -D ICINGA\"" |
251 |
elog |
252 |
elog "Icinga web service needs user authentication. If you" |
253 |
elog "use the base configuration, you need a password file" |
254 |
elog "with a password for user \"icingaadmin\"" |
255 |
elog "You can create this file by executing:" |
256 |
elog "htpasswd -c /etc/icinga/htpasswd.users icingaadmin" |
257 |
elif use lighttpd ; then |
258 |
elog " usermod -G icinga lighttpd " |
259 |
elog "or" |
260 |
elog " chown icinga:lighttpd /etc/icinga" |
261 |
elog "Also edit /etc/lighttpd/lighttpd.conf and add 'include \"lighttpd_icinga.conf\"'" |
262 |
fi |
263 |
elog |
264 |
elog "That will make icinga's web front end visable via" |
265 |
elog "http://localhost/icinga/" |
266 |
elog |
267 |
else |
268 |
elog "IMPORTANT: Do not forget to add the user your webserver" |
269 |
elog "is running as to the icinga group!" |
270 |
fi |
271 |
else |
272 |
ewarn "Please note that you have installed Icinga without web interface." |
273 |
ewarn "Please don't file any bugs about having no web interface when you do this." |
274 |
ewarn "Thank you!" |
275 |
fi |
276 |
elog |
277 |
elog "If you want icinga to start at boot time" |
278 |
elog "remember to execute:" |
279 |
elog " rc-update add icinga default" |
280 |
elog |
281 |
elog "If your kernel has /proc protection, icinga" |
282 |
elog "will not be happy as it relies on accessing the proc" |
283 |
elog "filesystem. You can fix this by adding icinga into" |
284 |
elog "the group wheel, but this is not recomended." |
285 |
elog |
286 |
if [ -d "${ROOT}"/var/icinga ] ; then |
287 |
ewarn |
288 |
ewarn "/var/icinga was moved to /var/lib/icinga" |
289 |
ewarn "please move the files if this was an upgrade" |
290 |
if use idoutils ; then |
291 |
ewarn "and edit /etc/ido2db.cfg to change the location of the files" |
292 |
ewarn "it accesses" |
293 |
fi |
294 |
ewarn |
295 |
ewarn "The \"mv /var/icinga /var/lib/\" command works well to move the files" |
296 |
ewarn "remove /var/icinga afterwards to make this warning disappear" |
297 |
fi |
298 |
} |