1 |
dertobi123 10/04/02 17:03:52 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: nagios-core-3.2.1.ebuild |
5 |
Removed: nagios-core-2.12-r1.ebuild |
6 |
Log: |
7 |
Version bump, plus remove old 2.x series |
8 |
(Portage version: 2.2_rc67/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.159 net-analyzer/nagios-core/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/nagios-core/ChangeLog?rev=1.159&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/nagios-core/ChangeLog?rev=1.159&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/nagios-core/ChangeLog?r1=1.158&r2=1.159 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/ChangeLog,v |
20 |
retrieving revision 1.158 |
21 |
retrieving revision 1.159 |
22 |
diff -u -r1.158 -r1.159 |
23 |
--- ChangeLog 28 Sep 2009 10:30:10 -0000 1.158 |
24 |
+++ ChangeLog 2 Apr 2010 17:03:52 -0000 1.159 |
25 |
@@ -1,6 +1,13 @@ |
26 |
# ChangeLog for net-analyzer/nagios-core |
27 |
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/ChangeLog,v 1.158 2009/09/28 10:30:10 dertobi123 Exp $ |
29 |
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
30 |
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/ChangeLog,v 1.159 2010/04/02 17:03:52 dertobi123 Exp $ |
31 |
+ |
32 |
+*nagios-core-3.2.1 (02 Apr 2010) |
33 |
+ |
34 |
+ 02 Apr 2010; Tobias Scherbaum <dertobi123@g.o> |
35 |
+ -files/2.x-series-nsca.patch, -nagios-core-2.12-r1.ebuild, |
36 |
+ +nagios-core-3.2.1.ebuild, -files/99_nagios.conf, -files/nagios: |
37 |
+ Version bump, plus remove old 2.x series |
38 |
|
39 |
28 Sep 2009; Tobias Scherbaum <dertobi123@g.o> |
40 |
-files/lighttpd_nagios3.conf: |
41 |
|
42 |
|
43 |
|
44 |
1.1 net-analyzer/nagios-core/nagios-core-3.2.1.ebuild |
45 |
|
46 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/nagios-core/nagios-core-3.2.1.ebuild?rev=1.1&view=markup |
47 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/nagios-core/nagios-core-3.2.1.ebuild?rev=1.1&content-type=text/plain |
48 |
|
49 |
Index: nagios-core-3.2.1.ebuild |
50 |
=================================================================== |
51 |
# Copyright 1999-2010 Gentoo Foundation |
52 |
# Distributed under the terms of the GNU General Public License v2 |
53 |
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/nagios-core-3.2.1.ebuild,v 1.1 2010/04/02 17:03:52 dertobi123 Exp $ |
54 |
|
55 |
EAPI="2" |
56 |
|
57 |
inherit eutils depend.apache toolchain-funcs |
58 |
|
59 |
MY_P=${PN/-core}-${PV} |
60 |
DESCRIPTION="Nagios Core - Check daemon, CGIs, docs" |
61 |
HOMEPAGE="http://www.nagios.org/" |
62 |
SRC_URI="mirror://sourceforge/nagios/${MY_P}.tar.gz" |
63 |
|
64 |
LICENSE="GPL-2" |
65 |
SLOT="0" |
66 |
KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86" |
67 |
IUSE="debug lighttpd perl +web vim-syntax" |
68 |
DEPEND="virtual/mailx |
69 |
web? ( |
70 |
>=media-libs/gd-1.8.3-r5[jpeg,png] |
71 |
lighttpd? ( www-servers/lighttpd dev-lang/php[cgi] ) |
72 |
apache2? ( || ( dev-lang/php[apache2] dev-lang/php[cgi] ) ) |
73 |
) |
74 |
perl? ( >=dev-lang/perl-5.6.1-r7 )" |
75 |
RDEPEND="${DEPEND} |
76 |
vim-syntax? ( app-vim/nagios-syntax )" |
77 |
|
78 |
want_apache2 |
79 |
|
80 |
S="${WORKDIR}/${MY_P}" |
81 |
|
82 |
pkg_setup() { |
83 |
depend.apache_pkg_setup |
84 |
|
85 |
enewgroup nagios |
86 |
enewuser nagios -1 /bin/bash /var/nagios/home nagios |
87 |
} |
88 |
|
89 |
src_prepare() { |
90 |
local strip="$(echo '$(MAKE) strip-post-install')" |
91 |
sed -i -e "s:${strip}::" {cgi,base}/Makefile.in || die "sed failed in Makefile.in" |
92 |
} |
93 |
|
94 |
src_configure() { |
95 |
local myconf |
96 |
|
97 |
if use perl ; then |
98 |
myconf="${myconf} --enable-embedded-perl --with-perlcache" |
99 |
fi |
100 |
|
101 |
if use debug; then |
102 |
myconf="${myconf} --enable-DEBUG0" |
103 |
myconf="${myconf} --enable-DEBUG1" |
104 |
myconf="${myconf} --enable-DEBUG2" |
105 |
myconf="${myconf} --enable-DEBUG3" |
106 |
myconf="${myconf} --enable-DEBUG4" |
107 |
myconf="${myconf} --enable-DEBUG5" |
108 |
fi |
109 |
|
110 |
if use !apache2 && use !lighttpd ; then |
111 |
myconf="${myconf} --with-command-group=nagios" |
112 |
else |
113 |
if use apache2 ; then |
114 |
myconf="${myconf} --with-command-group=apache" |
115 |
myconf="${myconf} --with-httpd-conf=/etc/apache2/conf.d" |
116 |
elif use lighttpd ; then |
117 |
myconf="${myconf} --with-command-group=lighttpd" |
118 |
fi |
119 |
fi |
120 |
|
121 |
econf ${myconf} \ |
122 |
--prefix=/usr \ |
123 |
--bindir=/usr/sbin \ |
124 |
--sbindir=/usr/$(get_libdir)/nagios/cgi-bin \ |
125 |
--datadir=/usr/share/nagios/htdocs \ |
126 |
--localstatedir=/var/nagios \ |
127 |
--sysconfdir=/etc/nagios \ |
128 |
--libexecdir=/usr/$(get_libdir)/nagios/plugins \ |
129 |
|| die "./configure failed" |
130 |
} |
131 |
|
132 |
src_compile() { |
133 |
emake CC=$(tc-getCC) nagios || die "make failed" |
134 |
|
135 |
if use web ; then |
136 |
# Only compile the CGI's if "web" useflag is set. |
137 |
emake CC=$(tc-getCC) DESTDIR="${D}" cgis || die |
138 |
fi |
139 |
} |
140 |
|
141 |
src_install() { |
142 |
dodoc Changelog INSTALLING LEGAL README UPGRADING |
143 |
|
144 |
if ! use web ; then |
145 |
sed -i -e 's/cd $(SRC_CGI) && $(MAKE) $@/# line removed due missing web use flag/' \ |
146 |
-e 's/cd $(SRC_HTM) && $(MAKE) $@/# line removed due missing web use flag/' \ |
147 |
Makefile |
148 |
fi |
149 |
|
150 |
sed -i -e 's/^contactgroups$//g' Makefile |
151 |
|
152 |
emake DESTDIR="${D}" install |
153 |
emake DESTDIR="${D}" install-config |
154 |
emake DESTDIR="${D}" install-commandmode |
155 |
|
156 |
newinitd "${FILESDIR}"/nagios3 nagios |
157 |
newconfd "${FILESDIR}"/conf.d nagios |
158 |
|
159 |
# Apache Module |
160 |
if use web ; then |
161 |
if use apache2 ; then |
162 |
insinto "${APACHE_MODULES_CONFDIR}" |
163 |
doins "${FILESDIR}"/99_nagios3.conf |
164 |
elif use lighttpd ; then |
165 |
insinto /etc/lighttpd |
166 |
newins "${FILESDIR}/lighttpd_nagios3-r1.conf" nagios.conf |
167 |
else |
168 |
ewarn "${CATEGORY}/${PF} only supports Apache-2.x or Lighttpd webserver" |
169 |
ewarn "out-of-the-box. Since you are not using one of them, you" |
170 |
ewarn "have to configure your webserver accordingly yourself." |
171 |
fi |
172 |
|
173 |
fi |
174 |
|
175 |
for dir in etc/nagios var/nagios ; do |
176 |
chown -R nagios:nagios "${D}/${dir}" || die "Failed chown of ${D}/${dir}" |
177 |
done |
178 |
|
179 |
chown -R root:root "${D}"/usr/$(get_libdir)/nagios |
180 |
find "${D}"/usr/$(get_libdir)/nagios -type d -print0 | xargs -0 chmod 755 |
181 |
find "${D}"/usr/$(get_libdir)/nagios/cgi-bin -type f -print0 | xargs -0 chmod 755 |
182 |
|
183 |
keepdir /etc/nagios |
184 |
keepdir /var/nagios |
185 |
keepdir /var/nagios/archives |
186 |
keepdir /var/nagios/rw |
187 |
keepdir /var/nagios/spool/checkresults |
188 |
|
189 |
if use !apache2 && use !lighttpd; then |
190 |
chown -R nagios:nagios "${D}"/var/nagios/rw || die "Failed chown of ${D}/var/nagios/rw" |
191 |
else |
192 |
if use apache2 ; then |
193 |
chown -R nagios:apache "${D}"/var/nagios/rw || die "Failed chown of ${D}/var/nagios/rw" |
194 |
elif use lighttpd ; then |
195 |
chown -R nagios:lighttpd "${D}"/var/nagios/rw || die "Failed chown of ${D}/var/nagios/rw" |
196 |
fi |
197 |
fi |
198 |
|
199 |
chmod ug+s "${D}"/var/nagios/rw || die "Failed Chmod of ${D}/var/nagios/rw" |
200 |
chmod 0750 "${D}"/etc/nagios || die "Failed chmod of ${D}/etc/nagios" |
201 |
} |
202 |
|
203 |
pkg_postinst() { |
204 |
elog "If you want nagios to start at boot time" |
205 |
elog "remember to execute:" |
206 |
elog " rc-update add nagios default" |
207 |
elog |
208 |
|
209 |
if use web ; then |
210 |
elog "This does not include cgis that are perl-dependent" |
211 |
elog "Currently traceroute.cgi is perl-dependent" |
212 |
elog "To have ministatus.cgi requires copying of ministatus.c" |
213 |
elog "to cgi directory for compiling." |
214 |
|
215 |
elog "Note that the user your webserver is running at needs" |
216 |
elog "read-access to /etc/nagios." |
217 |
elog |
218 |
|
219 |
if use apache2 || use lighttpd ; then |
220 |
elog "There are several possible solutions to accomplish this," |
221 |
elog "choose the one you are most comfortable with:" |
222 |
elog |
223 |
if use apache2 ; then |
224 |
elog " usermod -G nagios apache" |
225 |
elog "or" |
226 |
elog " chown nagios:apache /etc/nagios" |
227 |
elog |
228 |
elog "Also edit /etc/conf.d/apache2 and add \"-D NAGIOS\"" |
229 |
elif use lighttpd ; then |
230 |
elog " usermod -G nagios lighttpd " |
231 |
elog "or" |
232 |
elog " chown nagios:lighttpd /etc/nagios" |
233 |
fi |
234 |
elog |
235 |
elog "That will make nagios's web front end visable via" |
236 |
elog "http://localhost/nagios/" |
237 |
elog |
238 |
else |
239 |
elog "IMPORTANT: Do not forget to add the user your webserver" |
240 |
elog "is running as to the nagios group!" |
241 |
fi |
242 |
|
243 |
else |
244 |
elog "Please note that you have installed Nagios without web interface." |
245 |
elog "Please don't file any bugs about having no web interface when you do this." |
246 |
elog "Thank you!" |
247 |
fi |
248 |
|
249 |
elog |
250 |
elog "If your kernel has /proc protection, nagios" |
251 |
elog "will not be happy as it relies on accessing the proc" |
252 |
elog "filesystem. You can fix this by adding nagios into" |
253 |
elog "the group wheel, but this is not recomended." |
254 |
elog |
255 |
} |
256 |
|
257 |
pkg_postinst() { |
258 |
einfo "Fixing permissions" |
259 |
chown nagios:nagios "${ROOT}"var/nagios |
260 |
} |