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