diff options
author | Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org> | 2013-01-27 05:07:15 +0000 |
---|---|---|
committer | Jorge Manuel B. S. Vicetto (jmbsvicetto) <jmbsvicetto@gentoo.org> | 2013-01-27 05:07:15 +0000 |
commit | 63fcd5599885a416419147a4f3f2e653120b2b5f (patch) | |
tree | 1e437bae9d77224d00f6fe1856e4122de62bbb31 /net-analyzer | |
parent | Add adodb to the overlay. Revert to src_install from 5.14 to fix bug 420517. (diff) | |
download | jmbsvicetto-63fcd5599885a416419147a4f3f2e653120b2b5f.tar.gz jmbsvicetto-63fcd5599885a416419147a4f3f2e653120b2b5f.tar.bz2 jmbsvicetto-63fcd5599885a416419147a4f3f2e653120b2b5f.zip |
Add cacti to the overlay. Update to release 0.8.8a.
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/cacti/Manifest | 2 | ||||
-rw-r--r-- | net-analyzer/cacti/cacti-0.8.8a.ebuild | 82 | ||||
-rw-r--r-- | net-analyzer/cacti/files/postinstall-en.txt | 62 | ||||
-rw-r--r-- | net-analyzer/cacti/metadata.xml | 21 |
4 files changed, 167 insertions, 0 deletions
diff --git a/net-analyzer/cacti/Manifest b/net-analyzer/cacti/Manifest new file mode 100644 index 0000000..7e4cb83 --- /dev/null +++ b/net-analyzer/cacti/Manifest @@ -0,0 +1,2 @@ +DIST cacti-0.8.8a.tar.gz 2273280 SHA256 9fea2b6c438ebf2740b5982a6ff7cfd2816e48ea88a347ef0ef238c7b4875955 SHA512 186df9d208a7726f7cfa6f4d6fff6faf17235ccd5f365a92f064be550b2d8274fba1d269eca0f18c4e4617f75d714ac4cb1db9d5a23504a38173182b01b7d1dc WHIRLPOOL 651b2778fb44dabbce3b56a29a4a2754fabbc70e38382743cff81eddbccf60e3193a48ce1eda4dfd3f2bc7977bca5a5186bf4726831132f50741be549bca991d +DIST snmpv3_priv_proto_none.patch 1407 SHA256 8d48d9cf89f2ba47a6dbce884ab3f3c164b52ed4771b8b76c656a3ae967211f8 SHA512 d678dc0dcde509358fbe38fcf3649d5c4569b9b5b7d34b9e739664592060bbaa28f753c0de47548bbc169b4de42d097fb6338ac68465fe49b41bfad108bfc0f4 WHIRLPOOL 902282412047ddacde750ab553c65062e455a793f06d3f3190800edda6b860886207f32c9cb7b18377fd971f885ea8c6511b4fd489a3ac85bea9117bf681441a diff --git a/net-analyzer/cacti/cacti-0.8.8a.ebuild b/net-analyzer/cacti/cacti-0.8.8a.ebuild new file mode 100644 index 0000000..898b96e --- /dev/null +++ b/net-analyzer/cacti/cacti-0.8.8a.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI="4" + +inherit depend.php eutils webapp + +# Support for _p* in version. +MY_P=${P/_p*/} + +DESCRIPTION="Cacti is a complete frontend to rrdtool" +HOMEPAGE="http://www.cacti.net/" +SRC_URI="http://www.cacti.net/downloads/${MY_P}.tar.gz" + +# patches +UPSTREAM_PATCHES="snmpv3_priv_proto_none" +if [[ -n ${UPSTREAM_PATCHES} ]]; then + for i in ${UPSTREAM_PATCHES}; do + SRC_URI="${SRC_URI} http://www.cacti.net/downloads/patches/${PV/_p*}/${i}.patch" + done +fi + +LICENSE="GPL-2" +KEYWORDS="alpha amd64 hppa ~ppc ~ppc64 sparc x86" +IUSE="snmp doc" + +need_httpd + +DEPEND="" +RDEPEND=" + dev-lang/php[cli,mysql,session,sockets,xml] + dev-php/adodb + net-analyzer/rrdtool + virtual/cron + virtual/mysql + snmp? ( >=net-analyzer/net-snmp-5.1.2 ) +" + +src_unpack() { + unpack ${MY_P}.tar.gz + if [[ -n ${UPSTREAM_PATCHES} ]]; then + [ ! ${MY_P} == ${P} ] && mv ${MY_P} ${P} + fi +} + +src_prepare() { + if [[ -n ${UPSTREAM_PATCHES} ]]; then + for i in ${UPSTREAM_PATCHES} ; do + EPATCH_OPTS="-p1 -d ${S} -N" epatch "${DISTDIR}"/${i}.patch + done ; + fi + + sed -i -e \ + 's:$config\["library_path"\] . "/adodb/adodb.inc.php":"adodb/adodb.inc.php":' \ + "${S}"/include/global.php || die + + rm -rf lib/adodb || die # don't use bundled adodb +} + +src_compile() { :; } + +src_install() { + webapp_src_preinst + + rm LICENSE README || die + dodoc docs/{CHANGELOG,CONTRIB,README,txt/manual.txt} || die + use doc && dohtml -r docs/html/ + rm -rf docs + + edos2unix `find -type f -name '*.php'` + + dodir ${MY_HTDOCSDIR} + cp -r . "${D}"${MY_HTDOCSDIR} + + webapp_serverowned ${MY_HTDOCSDIR}/rra + webapp_serverowned ${MY_HTDOCSDIR}/log/cacti.log + webapp_configfile ${MY_HTDOCSDIR}/include/config.php + webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt + + webapp_src_install +} diff --git a/net-analyzer/cacti/files/postinstall-en.txt b/net-analyzer/cacti/files/postinstall-en.txt new file mode 100644 index 0000000..732c718 --- /dev/null +++ b/net-analyzer/cacti/files/postinstall-en.txt @@ -0,0 +1,62 @@ + +New Install + +1. Create the new cacti database + shell> mysqladmin -p --user=root create cacti +2. Import the default cacti database: + shell> mysql -p --user=root cacti < ${MY_INSTALLDIR}/cacti.sql +3. Create a MySQL username and password for cacti. + shell> mysql -p --user=root mysql + mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword'; + mysql> flush privileges; +4. Edit ${MY_INSTALLDIR}/include/config.php and modify the MySQL user, + password and database for your cacti configuration. + + Example: + \$database_default = "cacti"; + \$database_hostname = "localhost"; + \$database_username = "cactiuser"; + \$database_password = "somepassword"; + +5. Point your web browser to: http://${VHOST_HOSTNAME}/${VHOST_APPDIR}/ + Make sure to fill in all of the path variables carefully and + correctly on the following screen. +6. After you've gone through the setup wizard, go back to the main cacti page + and login as: + Username: admin + Password: admin + +Upgrading + +1. Backup DB in the case that something goes wrong. + shell> mysqldump -l --add-drop-table cacti > mysql.cacti +2. Backup your rra/ directory and any custom scripts in your scripts/ + directory. +3. Edit ${MY_INSTALLDIR}/include/config.php, and confirm that the MySQL user, + password and database is correct for your cacti configuration. + + Example: + \$database_default = "cacti"; + \$database_hostname = "localhost"; + \$database_username = "cactiuser"; + \$database_password = "somepassword"; +4. Point your web browser to: http://${VHOST_HOSTNAME}/${VHOST_APPDIR}/ + Select "Upgrade". + Make sure to fill in all of the path variables carefully and + correctly on the following screen. + +Cronjob + +Either new or upgrading, make sure you have a cron job - Add this line to +your /etc/crontab file: + + */5 * * * * ${VHOST_SERVER_GID} /usr/bin/php ${MY_INSTALLDIR}/poller.php > /dev/null 2>&1 + +Note that you should use poller.php as the cronjob instead of cmd.php (as it was with +earlier versions) to enable you to switch between cmd.php and cactid. + +Also make sure that the user poller.php runs as ( ${VHOST_SERVER_GID} ) has +permission to create new files in Cacti's 'rra/' directory which is +${MY_INSTALLDIR}/rra + + diff --git a/net-analyzer/cacti/metadata.xml b/net-analyzer/cacti/metadata.xml new file mode 100644 index 0000000..2ade181 --- /dev/null +++ b/net-analyzer/cacti/metadata.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>netmon</herd> + <maintainer> + <email>pva@gentoo.org</email> + <name>Peter Volkov</name> + </maintainer> + <longdescription lang="en"> + Cacti is a complete network graphing solution designed to harness the + power of RRDTool's data storage and graphing functionality. Cacti + provides a fast poller, advanced graph templating, multiple data + acquisition methods, and user management features out of the box. All of + this is wrapped in an intuitive, easy to use interface that makes sense + for LAN-sized installations up to complex networks with hundreds of + devices. + </longdescription> + <use> + <flag name='doc'>install html documentation</flag> + </use> +</pkgmetadata> |