1 |
creffett 14/09/02 14:29:10 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: nagios-core-3.5.1.ebuild |
5 |
Log: |
6 |
Bump to 3.5.1 and add patch wrt security bugs 501200, 495132, 447802 |
7 |
|
8 |
(Portage version: 2.2.12-r1/cvs/Linux x86_64, signed Manifest commit with key 28DB029C) |
9 |
|
10 |
Revision Changes Path |
11 |
1.192 net-analyzer/nagios-core/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/nagios-core/ChangeLog?rev=1.192&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/nagios-core/ChangeLog?rev=1.192&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/nagios-core/ChangeLog?r1=1.191&r2=1.192 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/ChangeLog,v |
20 |
retrieving revision 1.191 |
21 |
retrieving revision 1.192 |
22 |
diff -u -r1.191 -r1.192 |
23 |
--- ChangeLog 3 Aug 2014 16:31:49 -0000 1.191 |
24 |
+++ ChangeLog 2 Sep 2014 14:29:10 -0000 1.192 |
25 |
@@ -1,6 +1,12 @@ |
26 |
# ChangeLog for net-analyzer/nagios-core |
27 |
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/ChangeLog,v 1.191 2014/08/03 16:31:49 tgall Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/ChangeLog,v 1.192 2014/09/02 14:29:10 creffett Exp $ |
30 |
+ |
31 |
+*nagios-core-3.5.1 (02 Sep 2014) |
32 |
+ |
33 |
+ 02 Sep 2014; Chris Reffett <creffett@g.o> |
34 |
+ +files/nagios-core-3.5.1-process_cgivars.patch, +nagios-core-3.5.1.ebuild: |
35 |
+ Bump to 3.5.1 and add patch wrt security bugs 501200, 495132, 447802 |
36 |
|
37 |
03 Aug 2014; <tgall@g.o> nagios-core-3.3.1.ebuild: |
38 |
arm64, initial support |
39 |
|
40 |
|
41 |
|
42 |
1.1 net-analyzer/nagios-core/nagios-core-3.5.1.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/nagios-core/nagios-core-3.5.1.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/nagios-core/nagios-core-3.5.1.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: nagios-core-3.5.1.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2014 Gentoo Foundation |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/nagios-core-3.5.1.ebuild,v 1.1 2014/09/02 14:29:10 creffett Exp $ |
52 |
|
53 |
EAPI=5 |
54 |
|
55 |
inherit depend.apache eutils multilib toolchain-funcs user |
56 |
|
57 |
MY_P=${PN/-core}-${PV} |
58 |
DESCRIPTION="Nagios Core - Check daemon, CGIs, docs" |
59 |
HOMEPAGE="http://www.nagios.org/" |
60 |
SRC_URI="mirror://sourceforge/nagios/${MY_P}.tar.gz" |
61 |
|
62 |
LICENSE="GPL-2" |
63 |
SLOT="0" |
64 |
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~sparc ~x86" |
65 |
IUSE="debug lighttpd perl +web vim-syntax" |
66 |
DEPEND="virtual/mailx |
67 |
web? ( |
68 |
>=media-libs/gd-1.8.3-r5[jpeg,png] |
69 |
lighttpd? ( www-servers/lighttpd dev-lang/php[cgi] ) |
70 |
apache2? ( || ( dev-lang/php[apache2] dev-lang/php[cgi] ) ) |
71 |
) |
72 |
perl? ( >=dev-lang/perl-5.6.1-r7 )" |
73 |
RDEPEND="${DEPEND} |
74 |
!net-analyzer/nagios-imagepack |
75 |
vim-syntax? ( app-vim/nagios-syntax )" |
76 |
|
77 |
want_apache2 |
78 |
|
79 |
S="${WORKDIR}/${PN/-core}" |
80 |
|
81 |
pkg_setup() { |
82 |
depend.apache_pkg_setup |
83 |
|
84 |
enewgroup nagios |
85 |
enewuser nagios -1 /bin/bash /var/nagios/home nagios |
86 |
} |
87 |
|
88 |
src_prepare() { |
89 |
epatch "${FILESDIR}/${PN}-3.5.1-process_cgivars.patch" |
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 |
} |
130 |
|
131 |
src_compile() { |
132 |
emake CC=$(tc-getCC) nagios |
133 |
|
134 |
if use web ; then |
135 |
# Only compile the CGI's if "web" useflag is set. |
136 |
emake CC=$(tc-getCC) DESTDIR="${D}" cgis |
137 |
fi |
138 |
} |
139 |
|
140 |
src_install() { |
141 |
dodoc Changelog INSTALLING LEGAL README UPGRADING |
142 |
|
143 |
if ! use web ; then |
144 |
sed -i -e 's/cd $(SRC_CGI) && $(MAKE) $@/# line removed due missing web use flag/' \ |
145 |
-e 's/cd $(SRC_HTM) && $(MAKE) $@/# line removed due missing web use flag/' \ |
146 |
Makefile |
147 |
fi |
148 |
|
149 |
sed -i -e 's/^contactgroups$//g' Makefile |
150 |
|
151 |
emake DESTDIR="${D}" install |
152 |
emake DESTDIR="${D}" install-config |
153 |
emake DESTDIR="${D}" install-commandmode |
154 |
emake DESTDIR="${D}" install-classicui |
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 |
dosbin p1.pl |
180 |
|
181 |
chown -R root:root "${D}"/usr/$(get_libdir)/nagios |
182 |
find "${D}"/usr/$(get_libdir)/nagios -type d -print0 | xargs -0 chmod 755 |
183 |
find "${D}"/usr/$(get_libdir)/nagios/cgi-bin -type f -print0 | xargs -0 chmod 755 |
184 |
|
185 |
keepdir /etc/nagios |
186 |
keepdir /var/nagios |
187 |
keepdir /var/nagios/archives |
188 |
keepdir /var/nagios/rw |
189 |
keepdir /var/nagios/spool/checkresults |
190 |
|
191 |
if use !apache2 && use !lighttpd; then |
192 |
chown -R nagios:nagios "${D}"/var/nagios/rw || die "Failed chown of ${D}/var/nagios/rw" |
193 |
else |
194 |
if use apache2 ; then |
195 |
chown -R nagios:apache "${D}"/var/nagios/rw || die "Failed chown of ${D}/var/nagios/rw" |
196 |
elif use lighttpd ; then |
197 |
chown -R nagios:lighttpd "${D}"/var/nagios/rw || die "Failed chown of ${D}/var/nagios/rw" |
198 |
fi |
199 |
fi |
200 |
|
201 |
chmod ug+s "${D}"/var/nagios/rw || die "Failed Chmod of ${D}/var/nagios/rw" |
202 |
chmod 0750 "${D}"/etc/nagios || die "Failed chmod of ${D}/etc/nagios" |
203 |
} |
204 |
|
205 |
pkg_postinst() { |
206 |
elog "If you want nagios to start at boot time" |
207 |
elog "remember to execute:" |
208 |
elog " rc-update add nagios default" |
209 |
elog |
210 |
|
211 |
if use web ; then |
212 |
elog "This does not include cgis that are perl-dependent" |
213 |
elog "Currently traceroute.cgi is perl-dependent" |
214 |
elog "To have ministatus.cgi requires copying of ministatus.c" |
215 |
elog "to cgi directory for compiling." |
216 |
|
217 |
elog "Note that the user your webserver is running at needs" |
218 |
elog "read-access to /etc/nagios." |
219 |
elog |
220 |
|
221 |
if use apache2 || use lighttpd ; then |
222 |
elog "There are several possible solutions to accomplish this," |
223 |
elog "choose the one you are most comfortable with:" |
224 |
elog |
225 |
if use apache2 ; then |
226 |
elog " usermod -G nagios apache" |
227 |
elog "or" |
228 |
elog " chown nagios:apache /etc/nagios" |
229 |
elog |
230 |
elog "Also edit /etc/conf.d/apache2 and add \"-D NAGIOS\"" |
231 |
elif use lighttpd ; then |
232 |
elog " usermod -G nagios lighttpd " |
233 |
elog "or" |
234 |
elog " chown nagios:lighttpd /etc/nagios" |
235 |
fi |
236 |
elog |
237 |
elog "That will make nagios's web front end visable via" |
238 |
elog "http://localhost/nagios/" |
239 |
elog |
240 |
else |
241 |
elog "IMPORTANT: Do not forget to add the user your webserver" |
242 |
elog "is running as to the nagios group!" |
243 |
fi |
244 |
|
245 |
else |
246 |
elog "Please note that you have installed Nagios without web interface." |
247 |
elog "Please don't file any bugs about having no web interface when you do this." |
248 |
elog "Thank you!" |
249 |
fi |
250 |
|
251 |
elog |
252 |
elog "If your kernel has /proc protection, nagios" |
253 |
elog "will not be happy as it relies on accessing the proc" |
254 |
elog "filesystem. You can fix this by adding nagios into" |
255 |
elog "the group wheel, but this is not recomended." |
256 |
elog |
257 |
} |
258 |
|
259 |
pkg_postinst() { |
260 |
einfo "Fixing permissions" |
261 |
chown nagios:nagios "${ROOT}"var/nagios |
262 |
} |