1 |
commit: a207f2677392c478a03369e6148aeab803b684e4 |
2 |
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Mar 8 12:25:07 2017 +0000 |
4 |
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Mar 8 12:48:28 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a207f267 |
7 |
|
8 |
net-analyzer/nagios-core: remove vulnerable 4.x versions. |
9 |
|
10 |
Gentoo-Bug: 585914 |
11 |
|
12 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
13 |
|
14 |
net-analyzer/nagios-core/Manifest | 1 - |
15 |
net-analyzer/nagios-core/nagios-core-4.2.4.ebuild | 247 ---------------------- |
16 |
2 files changed, 248 deletions(-) |
17 |
|
18 |
diff --git a/net-analyzer/nagios-core/Manifest b/net-analyzer/nagios-core/Manifest |
19 |
index d5f0efb170d..0a6a1130860 100644 |
20 |
--- a/net-analyzer/nagios-core/Manifest |
21 |
+++ b/net-analyzer/nagios-core/Manifest |
22 |
@@ -1,4 +1,3 @@ |
23 |
DIST nagios-3.5.1.tar.gz 1763584 SHA256 ca9dd68234fa090b3c35ecc8767b2c9eb743977eaf32612fa9b8341cc00a0f99 SHA512 48e2ecb91002b08203937b12a438c87c62cd3c5c401a0ed9e861cd6d79074c7017ed373e9379f013d87dea1fd7cb8e3d85112d55c87ac91aed96b256868c112d WHIRLPOOL 2c02584702c64dbb0e353e34b758fab079eee0dc7a401e7b5947a21733758d3596401e5519e2dd7f05c89ee4835c21965d2718157fd9d6d3d20af9c853d688ca |
24 |
-DIST nagios-4.2.4.tar.gz 11088206 SHA256 b0055c475683ce50d77b1536ff0cec9abf89139adecf771601fa021ef9a20b70 SHA512 1f060f3139db6f77f7ca218bb4befb631c08b0ccb1b2b85e4c06cfc94328b5d09cef9b547eb54617089334a1e36b881347dfbb98bcc88b9b38e878214f97883a WHIRLPOOL a3d5454c72ab38388e8071dca8a319c717bb22915cfd06243727eb33f7b8a93cc323531be1535d14e283335b9964762a2729f4605f76d9a01ff78bbe924053a7 |
25 |
DIST nagios-4.3.1.tar.gz 11095797 SHA256 dfc2f5f146eb508b2a28d28af7c338ef9eb604327efdc50142642026f7e79f82 SHA512 d5f1919e2b32b0b2f4c5766367f0992fcf9b1f6766f4d3386e15e318cc1f57cdae6bc07f09464fd8212bef1713948fcb25d233eab588438036f996b6c479c97e WHIRLPOOL 72032e93802fd28db71bb5a10bba703a9508c587de69ff24ce302ad4fbbd93996b4800ceb7dd4f5648e2717377409cd7a66591f177e775da1c69444d528be1a2 |
26 |
DIST nagios-core-gentoo-icons-20141125.tar 40960 SHA256 68b715f636eb291343cab3259862bbed8b6b898520b58df522438524de3d8761 SHA512 bf109879cddd6136b76baba55d0b60b2596e37431dcf5ce0905d34a9fa292ebf7e4bde82d9a084362c486e8fac344c76d88f9298b1b85541ed70ffd608493766 WHIRLPOOL 7ec3a944b2a659b456d3168818ca5b1af3a427436e6af2f3e5d6cba6fc7b1c7bad6f552301f064df31988865b3b32fd117d9e6f61c630d6d817a51cbbbcb331d |
27 |
|
28 |
diff --git a/net-analyzer/nagios-core/nagios-core-4.2.4.ebuild b/net-analyzer/nagios-core/nagios-core-4.2.4.ebuild |
29 |
deleted file mode 100644 |
30 |
index 70479fba17f..00000000000 |
31 |
--- a/net-analyzer/nagios-core/nagios-core-4.2.4.ebuild |
32 |
+++ /dev/null |
33 |
@@ -1,247 +0,0 @@ |
34 |
-# Copyright 1999-2017 Gentoo Foundation |
35 |
-# Distributed under the terms of the GNU General Public License v2 |
36 |
- |
37 |
-EAPI=6 |
38 |
- |
39 |
-inherit toolchain-funcs user |
40 |
- |
41 |
-MY_P=${PN/-core}-${PV} |
42 |
-DESCRIPTION="Nagios core - monitoring daemon, web GUI, and documentation" |
43 |
-HOMEPAGE="http://www.nagios.org/" |
44 |
- |
45 |
-# The name of the directory into which our Gentoo icons will be |
46 |
-# extracted, and also the basename of the archive containing it. |
47 |
-GENTOO_ICONS="${PN}-gentoo-icons-20141125" |
48 |
-SRC_URI="mirror://sourceforge/nagios/${MY_P}.tar.gz |
49 |
- web? ( https://dev.gentoo.org/~mjo/distfiles/${GENTOO_ICONS}.tar )" |
50 |
- |
51 |
-LICENSE="GPL-2" |
52 |
-SLOT="0" |
53 |
-KEYWORDS="alpha amd64 ~arm ~arm64 hppa ppc ppc64 sparc x86" |
54 |
-IUSE="apache2 classicui lighttpd perl +web vim-syntax" |
55 |
- |
56 |
-# In pkg_postinst(), we change the group of the Nagios configuration |
57 |
-# directory to that of the web server user. It can't belong to both |
58 |
-# apache/lighttpd groups at the same time, so we block this combination |
59 |
-# for our own sanity. |
60 |
-# |
61 |
-# This could be made to work, but we would need a better way to allow |
62 |
-# the web user read-only access to Nagios's configuration directory. |
63 |
-# |
64 |
-REQUIRED_USE="apache2? ( !lighttpd )" |
65 |
- |
66 |
-# sys-devel/libtool dependency is bug #401237. |
67 |
-# |
68 |
-# Note, we require one of the apache2 CGI modules: |
69 |
-# |
70 |
-# * mod_cgi |
71 |
-# * mod_cgid |
72 |
-# * mod_fcgid |
73 |
-# |
74 |
-# We just don't care /which/ one. And of course PHP supports both CGI |
75 |
-# (USE=cgi) and FastCGI (USE=fpm). We're pretty lenient with the |
76 |
-# dependencies, and expect the user not to do anything /too/ |
77 |
-# stupid. (For example, installing Apache with only FastCGI support, and |
78 |
-# PHP with only CGI support.) |
79 |
-# |
80 |
-# Another annoyance is that the upstream Makefile uses app-arch/unzip to |
81 |
-# extract a snapshot of AngularJS, but that's only needed when USE=web. |
82 |
-# |
83 |
-MOD_ALIAS=apache2_modules_alias |
84 |
-DEPEND="sys-devel/libtool |
85 |
- virtual/mailx |
86 |
- perl? ( dev-lang/perl:= ) |
87 |
- web? ( |
88 |
- app-arch/unzip |
89 |
- media-libs/gd[jpeg,png] |
90 |
- lighttpd? ( www-servers/lighttpd[php] ) |
91 |
- apache2? ( |
92 |
- || ( |
93 |
- >=www-servers/apache-2.4[${MOD_ALIAS},apache2_modules_cgi] |
94 |
- >=www-servers/apache-2.4[${MOD_ALIAS},apache2_modules_cgid] |
95 |
- >=www-servers/apache-2.4[${MOD_ALIAS},apache2_modules_fcgid] ) |
96 |
- || ( |
97 |
- dev-lang/php:*[apache2] |
98 |
- dev-lang/php:*[cgi] |
99 |
- dev-lang/php:*[fpm] ) |
100 |
- ) |
101 |
- )" |
102 |
-RDEPEND="${DEPEND} |
103 |
- vim-syntax? ( app-vim/nagios-syntax )" |
104 |
- |
105 |
-S="${WORKDIR}/${MY_P}" |
106 |
- |
107 |
-pkg_setup() { |
108 |
- enewgroup nagios |
109 |
- enewuser nagios -1 /bin/bash /var/nagios/home nagios |
110 |
-} |
111 |
- |
112 |
-src_configure() { |
113 |
- local myconf |
114 |
- |
115 |
- if use perl; then |
116 |
- myconf="${myconf} --enable-embedded-perl --with-perlcache" |
117 |
- fi |
118 |
- |
119 |
- if use !apache2 && use !lighttpd ; then |
120 |
- myconf="${myconf} --with-command-group=nagios" |
121 |
- else |
122 |
- if use apache2 ; then |
123 |
- myconf="${myconf} --with-command-group=apache" |
124 |
- myconf="${myconf} --with-httpd-conf=/etc/apache2/conf.d" |
125 |
- elif use lighttpd ; then |
126 |
- myconf="${myconf} --with-command-group=lighttpd" |
127 |
- fi |
128 |
- fi |
129 |
- |
130 |
- econf ${myconf} \ |
131 |
- --prefix=/usr \ |
132 |
- --bindir=/usr/sbin \ |
133 |
- --sbindir=/usr/$(get_libdir)/nagios/cgi-bin \ |
134 |
- --datadir=/usr/share/nagios/htdocs \ |
135 |
- --localstatedir=/var/nagios \ |
136 |
- --sysconfdir=/etc/nagios \ |
137 |
- --libexecdir=/usr/$(get_libdir)/nagios/plugins |
138 |
-} |
139 |
- |
140 |
-src_compile() { |
141 |
- emake CC=$(tc-getCC) nagios |
142 |
- |
143 |
- if use web; then |
144 |
- # Only compile the CGIs/HTML when USE=web is set. |
145 |
- emake CC=$(tc-getCC) DESTDIR="${D}" cgis html |
146 |
- fi |
147 |
-} |
148 |
- |
149 |
-src_install() { |
150 |
- dodoc Changelog INSTALLING LEGAL README.asciidoc UPGRADING |
151 |
- |
152 |
- emake DESTDIR="${D}" install-base |
153 |
- emake DESTDIR="${D}" install-basic |
154 |
- emake DESTDIR="${D}" install-config |
155 |
- emake DESTDIR="${D}" install-commandmode |
156 |
- |
157 |
- if use web; then |
158 |
- emake DESTDIR="${D}" install-cgis |
159 |
- |
160 |
- # install-html installs the new exfoliation theme |
161 |
- emake DESTDIR="${D}" install-html |
162 |
- |
163 |
- if use classicui; then |
164 |
- # This overwrites the already-installed exfoliation theme |
165 |
- emake DESTDIR="${D}" install-classicui |
166 |
- fi |
167 |
- |
168 |
- # Install cute Gentoo icons (bug #388323), setting their |
169 |
- # owner, group, and mode to match those of the rest of Nagios's |
170 |
- # images. |
171 |
- insopts --group=nagios --owner=nagios --mode=0664 |
172 |
- insinto /usr/share/nagios/htdocs/images/logos |
173 |
- doins "${WORKDIR}/${GENTOO_ICONS}"/*.* |
174 |
- insopts --mode=0644 # Back to the default... |
175 |
- fi |
176 |
- |
177 |
- newinitd "${FILESDIR}"/nagios4-r1 nagios |
178 |
- newconfd "${FILESDIR}"/conf.d nagios |
179 |
- |
180 |
- if use web ; then |
181 |
- if use apache2 ; then |
182 |
- # Install the Nagios configuration file for Apache. |
183 |
- insinto "/etc/apache2/modules.d" |
184 |
- doins "${FILESDIR}"/99_nagios4.conf |
185 |
- elif use lighttpd ; then |
186 |
- # Install the Nagios configuration file for Lighttpd. |
187 |
- insinto /etc/lighttpd |
188 |
- newins "${FILESDIR}/lighttpd_nagios4.conf" nagios.conf |
189 |
- else |
190 |
- ewarn "${CATEGORY}/${PF} only supports apache or lighttpd" |
191 |
- ewarn "out of the box. Since you are not using one of them, you" |
192 |
- ewarn "will have to configure your webserver yourself." |
193 |
- fi |
194 |
- fi |
195 |
- |
196 |
- for dir in etc/nagios var/nagios ; do |
197 |
- chown -R nagios:nagios "${D}/${dir}" \ |
198 |
- || die "failed chown of ${D}/${dir}" |
199 |
- done |
200 |
- |
201 |
- chown -R root:root "${D}/usr/$(get_libdir)/nagios" \ |
202 |
- || die "failed chown of ${D}/usr/$(get_libdir)/nagios" |
203 |
- |
204 |
- # The following two find...exec statements will die properly as long |
205 |
- # as chmod is only called once (that is, as long as the argument |
206 |
- # list is small enough). |
207 |
- find "${D}/usr/$(get_libdir)/nagios" -type d \ |
208 |
- -exec chmod 755 '{}' + || die 'failed to make nagios dirs traversable' |
209 |
- |
210 |
- if use web; then |
211 |
- find "${D}/usr/$(get_libdir)/nagios/cgi-bin" -type f \ |
212 |
- -exec chmod 755 '{}' + || die 'failed to make cgi-bins executable' |
213 |
- fi |
214 |
- |
215 |
- keepdir /etc/nagios |
216 |
- keepdir /var/nagios |
217 |
- keepdir /var/nagios/archives |
218 |
- keepdir /var/nagios/rw |
219 |
- keepdir /var/nagios/spool/checkresults |
220 |
- |
221 |
- if use !apache2 && use !lighttpd; then |
222 |
- chown -R nagios:nagios "${D}"/var/nagios/rw \ |
223 |
- || die "failed chown of ${D}/var/nagios/rw" |
224 |
- else |
225 |
- if use apache2 ; then |
226 |
- chown -R nagios:apache "${D}"/var/nagios/rw \ |
227 |
- || die "failed chown of ${D}/var/nagios/rw" |
228 |
- elif use lighttpd ; then |
229 |
- chown -R nagios:lighttpd "${D}"/var/nagios/rw \ |
230 |
- || die "failed chown of ${D}/var/nagios/rw" |
231 |
- fi |
232 |
- fi |
233 |
- |
234 |
- chmod ug+s "${D}"/var/nagios/rw || die "failed chmod of ${D}/var/nagios/rw" |
235 |
- chmod 0750 "${D}"/etc/nagios || die "failed chmod of ${D}/etc/nagios" |
236 |
-} |
237 |
- |
238 |
-pkg_postinst() { |
239 |
- |
240 |
- if use web; then |
241 |
- elog "Note that your web server user requires read-only access to" |
242 |
- elog "${ROOT}etc/nagios." |
243 |
- |
244 |
- if use apache2 || use lighttpd ; then |
245 |
- elog |
246 |
- elog "To that end, we have changed the group of ${ROOT}etc/nagios" |
247 |
- elog "to that of your web server user." |
248 |
- elog |
249 |
- if use apache2; then |
250 |
- chown nagios:apache "${ROOT}etc/nagios" \ |
251 |
- || die "failed to change group of ${ROOT}etc/nagios" |
252 |
- |
253 |
- elog "To enable the Nagios web front-end, please edit" |
254 |
- elog "${ROOT}etc/conf.d/apache2 and add \"-D NAGIOS -D PHP5\"" |
255 |
- elog "to APACHE2_OPTS. Then Nagios will be available at," |
256 |
- elog |
257 |
- elif use lighttpd; then |
258 |
- chown nagios:lighttpd "${ROOT}etc/nagios" \ |
259 |
- || die "failed to change group of ${ROOT}etc/nagios" |
260 |
- elog "To enable the Nagios web front-end, please add" |
261 |
- elog "'include \"nagios.conf\"' to the lighttpd configuration" |
262 |
- elog "file at ${ROOT}etc/lighttpd/lighttpd.conf. Then Nagios" |
263 |
- elog "will be available at," |
264 |
- elog |
265 |
- fi |
266 |
- |
267 |
- elog " http://localhost/nagios/" |
268 |
- else |
269 |
- elog "Since you're not using either Apache or Lighttpd, you" |
270 |
- elog "will have to grant the necessary permissions yourself." |
271 |
- fi |
272 |
- fi |
273 |
- |
274 |
- elog |
275 |
- elog "If your kernel has /proc protection, nagios" |
276 |
- elog "will not be happy as it relies on accessing the proc" |
277 |
- elog "filesystem. You can fix this by adding nagios into" |
278 |
- elog "the group wheel, but this is not recomended." |
279 |
- elog |
280 |
-} |