Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 68856 Details for
Bug 100474
nagios install path
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
alpha version of improved (hopefully) nagios-core
nagios-core-2.0b_p2-r1.ebuild (text/plain), 6.91 KB, created by
Tomoyuki Sakurai (RETIRED)
on 2005-09-20 07:40:25 UTC
(
hide
)
Description:
alpha version of improved (hopefully) nagios-core
Filename:
MIME Type:
Creator:
Tomoyuki Sakurai (RETIRED)
Created:
2005-09-20 07:40:25 UTC
Size:
6.91 KB
patch
obsolete
># 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.2 2005/06/25 20:26:07 vanquirius Exp $ > >inherit eutils depend.apache toolchain-funcs > >MY_P=${PN/-core}-${PV/_p} >DESCRIPTION="Nagios Core - Check daemon, CGIs, docs" >HOMEPAGE="http://www.nagios.org/" >SRC_URI="mirror://sourceforge/nagios/${MY_P}.tar.gz" > >LICENSE="GPL-2" >SLOT="0" >KEYWORDS="~x86 ~sparc ~ppc ~amd64" >IUSE="perl debug apache2 jpeg png" ># add virtual/libc in !noweb () to make repoman happy >DEPEND="virtual/mailx > >=media-libs/gd-1.8.3-r5 > !noweb? ( > virtual/libc > ${APACHE_DEPEND} > ) > perl? ( >=dev-lang/perl-5.6.1-r7 )" > >S="${WORKDIR}/${MY_P}" > ># FIXED: ># this ebuild doesn't directly DEPEND on libpng or jpeg, gd does, see pkg_setup ># for more info ># ># 'USE="jpeg" emerge gd' doesn't work for csh users ># ># user nagios shouldn't have shell ># ># remove duplicated myconf ># ># drop "contrib", if you really need them, write nagios-contrib ebuild ># * http://bugs.gentoo.org/show_bug.cgi?id=24865 ># * the scripts in contrib is not that useful ># * nagios-2 doesn't have RDBMS support anymore ># ># remove "dodoc SAMPLE_FILES", install them into /etc/${PN} instead ># ># use doinitd instead of newexe ># ># sed needs to die() if failed > ># BUG: ># virtual/httpd or something is needed ># * Nagios should run on any CGI-enabled web server > ># TODO: ># proper migration step from older version should be considered ># make sure noweb USE works (it doesn't yet) ># with noweb, /usr/share/nagios/cgi-bin still gets installed >pkg_setup() { > # this ebuild doesn't directly DEPEND on libpng or jpeg, gd does > # TODO: > # make sure src_compile fails if ! built_with_use gd jpeg or png, if so, die instead of > # einfo > # * http://bugs.gentoo.org/show_bug.cgi?id=12483 > # * successfully compiled nagios-core with gd '-jpeg -png' > # make sure nagios can display GIF but not PNG or JPEG without +png +jpeg > if ! use noweb ; then > if ! built_with_use gd jpeg ; then > einfo "Your gd has been compiled without jpeg support." > einfo "If you want JPEG images in the CGI," > einfo "re-emerge gd with jpeg USE flag enabled." > fi > if ! built_with_use gd png ; then > einfo "Your gd has been compiled without png support." > einfo "If you want PNG images in the CGI," > einfo "re-emerge gd with png USE flag enabled." > fi > fi > > enewgroup nagios > # BUG: > # who needs nagios user with shell access? > # if you do, explain why > enewuser nagios -1 -1 /dev/null nagios > # BUG: > # docs/installing.html suggests group "nagcmd" > # * what should i do if USE=noweb > # * work on this later > usermod -G apache nagios >} > >src_unpack() { > unpack ${A} > cd ${S} > epatch ${FILESDIR}/2.x-series-nsca.patch > # BUG: > # consider to drop > gunzip -c ${FILESDIR}/nagios.cfg-sample.gz > ./nagios.cfg-sample >} > >src_compile() { > local myconf > > if use perl > then > myconf="${myconf} --enable-embedded-perl --with-perlcache" > fi > > if use debug; then > myconf="${myconf} --enable-DEBUG0" > myconf="${myconf} --enable-DEBUG1" > myconf="${myconf} --enable-DEBUG2" > myconf="${myconf} --enable-DEBUG3" > myconf="${myconf} --enable-DEBUG4" > myconf="${myconf} --enable-DEBUG5" > fi > > myconf="${myconf} --with-command-grp=apache" > > # strip cgi-related parts from Makefile.in > # CGI is not required in distributed monitoring environment > # i'm not for it but don't drop noweb USE flag, either > # BUG: > # ugly > if use noweb ; then > sed -i -e 's#^[[:space:]]*cd $(SRC_CGI) && $(MAKE)$##' Makefile.in \ > || die "sed failed" > sed -i -e 's#^[[:space:]]*cd $(SRC_HTM) && $(MAKE)$##' Makefile.in \ > || die "sed failed" > sed -i -e 's#^[[:space:]]*cd $(SRC_CGI) && $(MAKE) install$##' Makefile.in \ > || die "sed failed" > sed -i -e 's#^[[:space:]]*cd $(SRC_HTM) && $(MAKE)$##' Makefile.in \ > || die "sed failed" > sed -i -e 's#^[[:space:]]*cd $(SRC_HTM) && $(MAKE) install$##' Makefile.in \ > || die "sed failed" > sed -i -e 's#^[[:space:]]*cd $(SRC_HTM) && $(MAKE) $@$##' Makefile.in \ > || die "sed failed" > fi > # TODO: > # update apache conf accordingly > # BUG: > # is /usr/share/${PN} the right place for *.cgi and other files? if not, > # where should it be? > ./configure \ > --host=${CHOST} \ > --prefix=/usr \ > --sbindir=/usr/share/nagios/cgi-bin \ > --datadir=/usr/share/nagios \ > --libexecdir=/usr/libexec/nagios \ > --localstatedir=/var/lib/nagios \ > --sysconfdir=/etc/nagios \ > --infodir=/usr/share/info \ > --mandir=/usr/share/man \ > ${myconf} || die "./configure failed" > > emake all || die "emake failed" >} > >src_install() { > dodoc Changelog INSTALLING LEGAL LICENSE README UPGRADING > > sed -i -e 's/^contactgroups$//g' Makefile || die "sed failed" > > make DESTDIR=${D} install > make DESTDIR=${D} install-config > make DESTDIR=${D} install-commandmode > > # BUG: > # consider to drop > docinto sample-configs > #-------------------------------------------------- > # dodoc ${D}/etc/nagios/* > # rm ${D}/etc/nagios/* > #-------------------------------------------------- > > # dodoc ${S}/nagios.cfg-sample > > doinitd ${FILESDIR}/nagios > newconfd ${FILESDIR}/conf.d nagios > > > #-------------------------------------------------- > # # TODO: > # # we still need this? if so, upstream should fix > # for dir in etc/nagios usr/nagios var/nagios > # do > # chown -R nagios:nagios ${D}/${dir} || die "Failed chown of ${D}/${dir}" > # done > #-------------------------------------------------- > > # BUG: > # make sure it works in new apache environment, which i don't have (yet) > # change 99_nagios.conf accordingly > #Apache Module > if use apache2; then > insinto ${APACHE2_MODULES_CONFDIR} > doins ${FILESDIR}/99_nagios.conf > else > insinto ${APACHE1_MODULES_CONFDIR} > doins ${FILESDIR}/nagios.conf > fi >} > >pkg_preinst() { > # cfgpro takes care of this > # keepdir /etc/nagios > keepdir /var/lib/nagios > keepdir /var/lib/nagios/archives > if ! noweb ; then > # BUG: > # by default, nothing is installed in ssi > keepdir /usr/share/nagios/ssi > fi > keepdir /var/lib/nagios/rw > > # BUG: > # noweb is not taken into account (yet) > chown nagios:apache ${D}/var/lib/nagios/rw || die "Failed Chown of ${D}/var/lib/nagios/rw" > chmod ug+s ${D}/var/lib/nagios/rw || die "Failed Chmod of ${D}/var/lib/nagios/rw" >} > >pkg_postinst() { > einfo > einfo "The example config files are located at /usr/share/doc/${PF}/sample-configs/." > einfo > einfo "Also, if you want nagios to start at boot time" > einfo "remember to execute:" > einfo " rc-update add nagios default" > einfo > > if use apache2; then > einfo " Edit /etc/conf.d/apache2 and add \"-D NAGIOS\"" > else > einfo " Edit /etc/conf.d/apache and add \"-D NAGIOS\"" > fi > > einfo > einfo "That will make nagios's web front end visable via" > einfo "http://localhost/nagios/" > einfo > einfo > # BUG: > # what should users do, then? > 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 >} > >pkg_prerm() { > /etc/init.d/nagios stop >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 100474
:
68856
|
68916
|
68917
|
69003