diff options
author | Lance Albertson <ramereth@gentoo.org> | 2005-11-19 23:07:46 +0000 |
---|---|---|
committer | Lance Albertson <ramereth@gentoo.org> | 2005-11-19 23:07:46 +0000 |
commit | fb66b2fa6e1e4542eef24d2d0e8c6db38a6a6e64 (patch) | |
tree | 069966a8ccb75fee0014f6ff9f8cd81e29bea87a /net-analyzer/nagios-core | |
parent | stable on amd64 (diff) | |
download | gentoo-2-fb66b2fa6e1e4542eef24d2d0e8c6db38a6a6e64.tar.gz gentoo-2-fb66b2fa6e1e4542eef24d2d0e8c6db38a6a6e64.tar.bz2 gentoo-2-fb66b2fa6e1e4542eef24d2d0e8c6db38a6a6e64.zip |
fixed a lot of stuff, please see changelog for all details, version bump
(Portage version: 2.0.51.22-r3)
Diffstat (limited to 'net-analyzer/nagios-core')
-rw-r--r-- | net-analyzer/nagios-core/ChangeLog | 18 | ||||
-rw-r--r-- | net-analyzer/nagios-core/Manifest | 16 | ||||
-rw-r--r-- | net-analyzer/nagios-core/files/digest-nagios-core-1.3 | 1 | ||||
-rw-r--r-- | net-analyzer/nagios-core/files/digest-nagios-core-2.0b_p5 | 1 | ||||
-rw-r--r-- | net-analyzer/nagios-core/files/nagios | 3 | ||||
-rw-r--r-- | net-analyzer/nagios-core/nagios-core-1.3.ebuild (renamed from net-analyzer/nagios-core/nagios-core-2.0b_p1.ebuild) | 163 | ||||
-rw-r--r-- | net-analyzer/nagios-core/nagios-core-2.0b_p5.ebuild (renamed from net-analyzer/nagios-core/nagios-core-2.0b_p2.ebuild) | 44 |
7 files changed, 162 insertions, 84 deletions
diff --git a/net-analyzer/nagios-core/ChangeLog b/net-analyzer/nagios-core/ChangeLog index 2b27abe482c1..799c09c4100f 100644 --- a/net-analyzer/nagios-core/ChangeLog +++ b/net-analyzer/nagios-core/ChangeLog @@ -1,6 +1,22 @@ # ChangeLog for net-analyzer/nagios-core # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/ChangeLog,v 1.60 2005/10/15 23:22:12 soulse Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/ChangeLog,v 1.61 2005/11/19 23:07:46 ramereth Exp $ + +*nagios-core-2.0b_p5 (19 Nov 2005) +*nagios-core-1.3 (19 Nov 2005) + + 19 Nov 2005; Lance Albertson <ramereth@gentoo.org> files/nagios, + +nagios-core-1.3.ebuild, -nagios-core-2.0b_p1.ebuild, + -nagios-core-2.0b_p2.ebuild, +nagios-core-2.0b_p5.ebuild: + * Fixed bug #77814 for 1.3 + * Fixed bug #97669 by adding a 'after mysql postgresql' in the init script + * Version bump for 1.3 and 2.0b5 + * Changed how we delt with contrib files + - Compile all contrib files + - Install them in the correct place + - Move misc contrib files to default share/docs location + * Added a chmod of /etc/nagios for security reasons + * Removed older 2.x ebuilds 15 Oct 2005; <soulse@gentoo.org> +files/nagios-2.0b.cfg-sample.gz, nagios-core-2.0b_p1.ebuild, nagios-core-2.0b_p2.ebuild, diff --git a/net-analyzer/nagios-core/Manifest b/net-analyzer/nagios-core/Manifest index 1b4132449d83..151d48d43ae7 100644 --- a/net-analyzer/nagios-core/Manifest +++ b/net-analyzer/nagios-core/Manifest @@ -1,19 +1,19 @@ MD5 37a348177b4d8deda4fd0eef01439781 ChangeLog 10669 MD5 bb0bc884a0383e5be0a4bae6cba836dc metadata.xml 1049 +MD5 17e28d38984ec0f0607956773bb806bd nagios-core-1.3.ebuild 7485 MD5 92fb214ff93f5f66c997ea1b00fab6c5 nagios-core-1.2-r4.ebuild 7183 -MD5 dbd0b333806191c66e82ecdc6803d2de nagios-core-2.0b_p1.ebuild 5835 -MD5 fb8d04b5d7ad9b1a9cb4e2b618e26c59 nagios-core-2.0b_p2.ebuild 5866 +MD5 d7deebaa8969bbf8cbac1913716b15b2 nagios-core-2.0b_p5.ebuild 5970 MD5 af171cb84450787a92481d9d3b7e132b nagios-core-2.0b_p4.ebuild 5866 -MD5 446906907cccdbf195442373c6f17f77 files/2.x-series-nsca.patch 767 MD5 673bda0ac6ab9230d23331e7f3846b7b files/99_nagios.conf 350 MD5 565ce2a690d50aeb542e7afe44b8c733 files/Makefile-distclean.diff.bz2 1133 +MD5 8d467fa6c4a599ce04a0f8b4f9f997b5 files/nagios 1413 +MD5 446906907cccdbf195442373c6f17f77 files/2.x-series-nsca.patch 767 +MD5 cd183719838dc2a8b9cafa8a639f4ad2 files/digest-nagios-core-1.2-r4 63 +MD5 dad3fb46e8f73ac54d9239a542bc82e0 files/nagios.conf 362 MD5 f2947dec6b9a839da79606bcc394036b files/conf.d 409 MD5 6b679390ce57974a0f69145e0918372f files/nagios-2.0b.cfg-sample.gz 8990 MD5 faad55511f21831997f9150547aa4e7d files/nagios.cfg-sample.gz 7224 -MD5 cd183719838dc2a8b9cafa8a639f4ad2 files/digest-nagios-core-1.2-r4 63 -MD5 aa5bb53aee1f5609395e8184f2eff4a6 files/digest-nagios-core-2.0b_p1 65 -MD5 19566d92e4989244216c7fb6d19d688c files/digest-nagios-core-2.0b_p2 65 -MD5 d062be8c632fbfa88dd1194e0bea2abf files/nagios 1389 -MD5 dad3fb46e8f73ac54d9239a542bc82e0 files/nagios.conf 362 MD5 cee7d66cc61be3558af44ab177d99e1f files/submit_check_result_via_nsca.patch 585 MD5 7a96e80dbe17f26441d3266662b58a51 files/digest-nagios-core-2.0b_p4 65 +MD5 484d128eff6e79cfcb09e37a92e1926f files/digest-nagios-core-1.3 63 +MD5 c6cc963b6a3cc45558ebbc5890908bb0 files/digest-nagios-core-2.0b_p5 65 diff --git a/net-analyzer/nagios-core/files/digest-nagios-core-1.3 b/net-analyzer/nagios-core/files/digest-nagios-core-1.3 new file mode 100644 index 000000000000..c4ec06d0492e --- /dev/null +++ b/net-analyzer/nagios-core/files/digest-nagios-core-1.3 @@ -0,0 +1 @@ +MD5 2011df334cb0206dbb054606c6a2dc84 nagios-1.3.tar.gz 1626430 diff --git a/net-analyzer/nagios-core/files/digest-nagios-core-2.0b_p5 b/net-analyzer/nagios-core/files/digest-nagios-core-2.0b_p5 new file mode 100644 index 000000000000..673be4f9d37d --- /dev/null +++ b/net-analyzer/nagios-core/files/digest-nagios-core-2.0b_p5 @@ -0,0 +1 @@ +MD5 52e05ac1a2d1ab1e6869183912c9d27f nagios-2.0b5.tar.gz 1729378 diff --git a/net-analyzer/nagios-core/files/nagios b/net-analyzer/nagios-core/files/nagios index 41bf62d5b481..ee67a3d2e234 100644 --- a/net-analyzer/nagios-core/files/nagios +++ b/net-analyzer/nagios-core/files/nagios @@ -1,13 +1,14 @@ #!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/files/nagios,v 1.7 2004/11/28 18:21:02 eldad Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/files/nagios,v 1.8 2005/11/19 23:07:46 ramereth Exp $ opts="${opts} reload checkconfig" depend() { need net use dns logger + after mysql postgresql } reload() diff --git a/net-analyzer/nagios-core/nagios-core-2.0b_p1.ebuild b/net-analyzer/nagios-core/nagios-core-1.3.ebuild index a3f6e1eff4a2..2ca1b69774e2 100644 --- a/net-analyzer/nagios-core/nagios-core-2.0b_p1.ebuild +++ b/net-analyzer/nagios-core/nagios-core-1.3.ebuild @@ -1,59 +1,112 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/nagios-core-2.0b_p1.ebuild,v 1.7 2005/10/15 23:22:12 soulse Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/nagios-core-1.3.ebuild,v 1.1 2005/11/19 23:07:46 ramereth Exp $ inherit eutils apache-module toolchain-funcs -MY_P=${PN/-core}-${PV/_p} +MY_P=${P/-core} DESCRIPTION="Nagios Core - Check daemon, CGIs, docs" HOMEPAGE="http://www.nagios.org/" SRC_URI="mirror://sourceforge/nagios/${MY_P}.tar.gz" +RESTRICT="nomirror" LICENSE="GPL-2" SLOT="0" -KEYWORDS="~x86 ~sparc ~ppc ~amd64" -IUSE="noweb perl debug apache2" -# mysql postgres +KEYWORDS="~amd64 ~ppc ~sparc ~x86" +IUSE="noweb mysql postgres perl debug apache2" + DEPEND="virtual/mailx !noweb? ( >=media-libs/jpeg-6b-r3 >=media-libs/libpng-1.2.5-r4 >=media-libs/gd-1.8.3-r5 ${NEED_APACHE_DEPEND} - perl? ( net-analyzer/traceroute ) ) - perl? ( >=dev-lang/perl-5.6.1-r7 )" + perl? ( >=dev-lang/perl-5.6.1-r7 ) + mysql? ( >=dev-db/mysql-3.23.56 ) + postgres? ( !mysql? ( >=dev-db/postgresql-7.3.2 ) )" S="${WORKDIR}/${MY_P}" pkg_setup() { # If there's a gd lib on the system, it will try to build with it. # check if gdlib-config is on, and then check its output. - if [[ -x ${ROOT}usr/bin/gdlib-config ]]; then - if [[ ! $(${ROOT}usr/bin/gdlib-config --libs | grep -- -ljpeg) ]]; then + if [[ -x /usr/bin/gdlib-config ]]; then + if [[ ! $(gdlib-config --libs | grep -- -ljpeg) ]]; then eerror "Your gd has been compiled without jpeg support." eerror "Please re-emerge gd:" eerror "# USE="jpeg" emerge gd" die "pkg_setup failed" fi fi + + enewgroup nagios + + if use noweb; then + enewuser nagios -1 /bin/bash /dev/null nagios + else + enewuser nagios -1 /bin/bash /dev/null apache + usermod -G apache nagios + fi } src_unpack() { unpack ${A} cd ${S} - epatch ${FILESDIR}/2.x-series-nsca.patch - gunzip -c ${FILESDIR}/nagios-2.0b.cfg-sample.gz > ./nagios.cfg-sample + + epatch ${FILESDIR}/Makefile-distclean.diff.bz2 + + # libpq-fe.h isnt in psgql/ + cd xdata/ + sed -i -e "s:pgsql/::" *.c + + cp ${FILESDIR}/nagios.cfg-sample.gz ./ + gunzip nagios.cfg-sample.gz } src_compile() { local myconf - if use perl - then - myconf="${myconf} --enable-embedded-perl --with-perlcache" + if use mysql && use postgres; then + ewarn "Unfortunatly you can't have both MySQL and PostgreSQL enabled at the same time." + ewarn "Using MySQL as default." + + has_version ">=sys-apps/portage-2.0.50" && ( + einfo "You can add -" + echo + einfo "net-analyzer/nagios-core [use flags]" + echo + einfo "to /etc/portage/package.use to permanently set this package's USE flags" + einfo "More info on package.use is available on:" + einfo " man 5 portage" + ) + elif use postgres ; then + myconf="${myconf} \ + --with-pgsql-xdata \ + --with-pgsql-status \ + --with-pgsql-comments \ + --with-pgsql-extinfo \ + --with-pgsql-retention \ + --with-pgsql-downtime" + + if [ -r /usr/include/postgresql/libpq-fe.h ] ; then + myconf="${myconf} --with-pgsql-inc=/usr/include/postgresql" + fi fi + use mysql && myconf="${myconf} \ + --with-file-perfdata \ + --with-template-extinfo \ + --with-mysql-xdata \ + --with-mysql-status \ + --with-mysql-comments \ + --with-mysql-retention \ + --with-mysql-downtime" + + use perl && myconf="${myconf} \ + --enable-embedded-perl \ + --with-perlcache" + if use debug; then myconf="${myconf} --enable-DEBUG0" myconf="${myconf} --enable-DEBUG1" @@ -78,29 +131,26 @@ src_compile() { --mandir=/usr/share/man \ ${myconf} || die "./configure failed" - emake CC=$(tc-getCC) nagios contrib || die "make failed" + make CC=$(tc-getCC) DESTDIR=${D} nagios contrib || die "make failed" if use !noweb ; then # Only compile the CGI's if "noweb" useflag is not set. make CC=$(tc-getCC) DESTDIR=${D} cgis || die fi - # convert config files - emake -C contrib convertcfg || "config convert died" - + emake -C contrib all || "contrib make filed" } src_install() { - dodoc Changelog INSTALLING LEGAL LICENSE README UPGRADING + dodoc Changelog INSTALLING LEGAL LICENSE README UPGRADING contrib/htaccess.sample + docinto contrib + dodoc contrib/README if use noweb; then - sed -i -e 's/cd $(SRC_CGI) && $(MAKE) $@/# line removed due to noweb use flag/' \ - -e 's/cd $(SRC_HTM) && $(MAKE) $@/# line removed due to noweb use flag/' \ - Makefile + sed -i -e 's/cd $(SRC_CGI) && $(MAKE) $@/# line removed due to noweb use flag/' Makefile + sed -i -e 's/cd $(SRC_HTM) && $(MAKE) $@/# line removed due to noweb use flag/' Makefile fi - sed -i -e 's/^contactgroups$//g' Makefile - make DESTDIR=${D} install make DESTDIR=${D} install-config make DESTDIR=${D} install-commandmode @@ -109,7 +159,14 @@ src_install() { dodoc ${D}/etc/nagios/* rm ${D}/etc/nagios/* - dodoc ${S}/nagios.cfg-sample + # contribs are not configured by the configure script, we'll configure them overselves... + find ${S}/contrib/ -type f | xargs sed -e 's:/usr/local/nagios/var/rw:/var/nagios/rw:; + s:/usr/local/nagios/libexec:/usr/nagios/libexec:; + s:/usr/local/nagios/etc:/etc/nagios:; + s:/usr/local/nagios/sbin:/usr/nagios/sbin:;' -i + + insinto /usr/share/doc/${PF}/contrib + doins -r contrib/database contrib/eventhandlers exeinto /etc/init.d doexe ${FILESDIR}/nagios @@ -117,23 +174,13 @@ src_install() { insinto /etc/conf.d newins ${FILESDIR}/conf.d nagios - - rm ${S}/contrib/Makefile* ${S}/contrib/*.c ${S}/contrib/*.h - - #contribs are not configured by the configure script, we'll configure them overselves... - find ${S}/contrib/ -type f | xargs sed -e 's:/usr/local/nagios/var/rw:/var/nagios/rw:; - s:/usr/local/nagios/libexec:/usr/nagios/libexec:; - s:/usr/local/nagios/etc:/etc/nagios:; - s:/usr/local/nagios/sbin:/usr/nagios/sbin:;' -i - - mv contrib/ ${D}usr/nagios - - for dir in etc/nagios usr/nagios var/nagios usr/nagios/contrib - do - chown -R nagios:nagios ${D}/${dir} || die "Failed chown of ${D}/${dir}" + chmod 644 ${S}/contrib/*.cgi + into /usr/nagios + for bin in `find contrib/ -type f -perm 0755 -maxdepth 1` ; do + dobin $bin done - #Apache Module + # Apache Module if use !noweb; then if use apache2; then insinto ${APACHE2_MODULES_CONFDIR} @@ -143,10 +190,17 @@ src_install() { doins ${FILESDIR}/nagios.conf fi if use perl; then - mv ${D}usr/nagios/contrib/traceroute.cgi ${D}usr/nagios/sbin - fperms a+x /usr/nagios/sbin/traceroute.cgi + into /usr/nagios + for cgi in `find contrib/ -name "*.cgi" -maxdepth 1` ; do + dosbin $cgi + done fi fi + + for dir in etc/nagios usr/nagios var/nagios ; do + chown -R nagios:nagios ${D}/${dir} || die "Failed chown of ${D}/${dir}" + done + } pkg_preinst() { @@ -156,18 +210,14 @@ pkg_preinst() { keepdir /usr/nagios/share/ssi keepdir /var/nagios/rw - enewgroup nagios - if use noweb; then - enewuser nagios -1 /bin/bash /dev/null nagios - chown -R nagios:nagios ${D}/var/nagios/rw || die "Failed Chown of ${D}/var/nagios/rw" + chown nagios:nagios ${D}/var/nagios/rw || die "Failed Chown of ${D}/var/nagios/rw" else - enewuser nagios -1 /bin/bash /dev/null apache - usermod -G apache nagios - chown -R nagios:apache ${D}/var/nagios/rw || die "Failed Chown of ${D}/var/nagios/rw" + chown nagios:apache ${D}/var/nagios/rw || die "Failed Chown of ${D}/var/nagios/rw" fi - chmod ug+s ${D}/var/nagios/rw || die "Failed Chmod of ${D}/var/nagios/rw" + chmod 2750 ${D}/var/nagios/rw || die "Failed Chmod of ${D}/var/nagios/rw" + chmod 0750 ${D}/etc/nagios || die "Failed chmod of ${D}/etc/nagios" } pkg_postinst() { @@ -202,16 +252,21 @@ pkg_postinst() { einfo "Thank you!" fi + if use mysql && use postgres; then + ewarn "Unfortunatly you can't have both MySQL and PostgreSQL enabled at the same time." + ewarn "as a default, MySQL support was built." + ewarn "To build nagios with PostgreSQL you'll have to emerge nagios without the mysql useflag." + fi + + einfo + einfo "If you are using distributed monitoring, check the contrib scripts." + einfo "configure the central nagios server for the nsca in /etc/conf.d/nagios." einfo einfo "If your kernel has /proc protection, nagios" einfo "will not be happy as it relies on accessing the proc" einfo "filesystem. You can fix this by adding nagios into" einfo "the group wheel, but this is not recomended." einfo - - einfo - ewarn "Use /usr/nagios/contrib/convertcfg for configuration file conversion" - einfo } pkg_prerm() { diff --git a/net-analyzer/nagios-core/nagios-core-2.0b_p2.ebuild b/net-analyzer/nagios-core/nagios-core-2.0b_p5.ebuild index b44537ecc2c9..a55cc06a9130 100644 --- a/net-analyzer/nagios-core/nagios-core-2.0b_p2.ebuild +++ b/net-analyzer/nagios-core/nagios-core-2.0b_p5.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/nagios-core-2.0b_p2.ebuild,v 1.7 2005/10/15 23:22:12 soulse Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/nagios-core/nagios-core-2.0b_p5.ebuild,v 1.1 2005/11/19 23:07:46 ramereth Exp $ inherit eutils apache-module toolchain-funcs @@ -87,20 +87,21 @@ src_compile() { --mandir=/usr/share/man \ ${myconf} || die "./configure failed" - emake CC=$(tc-getCC) nagios contrib || die "make failed" + emake CC=$(tc-getCC) nagios || die "make failed" if use !noweb ; then # Only compile the CGI's if "noweb" useflag is not set. make CC=$(tc-getCC) DESTDIR=${D} cgis || die fi - # convert config files - emake -C contrib convertcfg || "config convert died" + emake -C contrib all || "contrib make filed" } src_install() { dodoc Changelog INSTALLING LEGAL LICENSE README UPGRADING + docinto contrib + dodoc contrib/README if use noweb; then sed -i -e 's/cd $(SRC_CGI) && $(MAKE) $@/# line removed due to noweb use flag/' \ @@ -120,29 +121,28 @@ src_install() { dodoc ${S}/nagios.cfg-sample - exeinto /etc/init.d - doexe ${FILESDIR}/nagios - - insinto /etc/conf.d - newins ${FILESDIR}/conf.d nagios - - - rm ${S}/contrib/Makefile* ${S}/contrib/*.c ${S}/contrib/*.h - #contribs are not configured by the configure script, we'll configure them overselves... find ${S}/contrib/ -type f | xargs sed -e 's:/usr/local/nagios/var/rw:/var/nagios/rw:; s:/usr/local/nagios/libexec:/usr/nagios/libexec:; s:/usr/local/nagios/etc:/etc/nagios:; s:/usr/local/nagios/sbin:/usr/nagios/sbin:;' -i - mv contrib/ ${D}usr/nagios + insinto /usr/share/doc/${PF}/contrib + doins -r contrib/eventhandlers - for dir in etc/nagios usr/nagios var/nagios usr/nagios/contrib - do - chown -R nagios:nagios ${D}/${dir} || die "Failed chown of ${D}/${dir}" + exeinto /etc/init.d + doexe ${FILESDIR}/nagios + + insinto /etc/conf.d + newins ${FILESDIR}/conf.d nagios + + chmod 644 ${S}/contrib/*.cgi + into /usr/nagios + for bin in `find contrib/ -type f -perm 0755 -maxdepth 1` ; do + dobin $bin done - #Apache Module + # Apache Module if use !noweb; then if use apache2; then insinto ${APACHE2_MODULES_CONFDIR} @@ -152,10 +152,13 @@ src_install() { doins ${FILESDIR}/nagios.conf fi if use perl; then - mv ${D}usr/nagios/contrib/traceroute.cgi ${D}usr/nagios/sbin - fperms a+x /usr/nagios/sbin/traceroute.cgi + into /usr/nagios ; dosbin contrib/traceroute.cgi fi fi + + for dir in etc/nagios usr/nagios var/nagios ; do + chown -R nagios:nagios ${D}/${dir} || die "Failed chown of ${D}/${dir}" + done } pkg_preinst() { @@ -172,6 +175,7 @@ pkg_preinst() { fi chmod ug+s ${D}/var/nagios/rw || die "Failed Chmod of ${D}/var/nagios/rw" + chmod 0750 ${D}/etc/nagios || die "Failed chmod of ${D}/etc/nagios" } pkg_postinst() { |