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