diff --git a/net-mgmt/cacti/Makefile b/net-mgmt/cacti/Makefile index 9f56fa53c111..751da0ebffb7 100644 --- a/net-mgmt/cacti/Makefile +++ b/net-mgmt/cacti/Makefile @@ -1,61 +1,59 @@ PORTNAME= cacti DISTVERSION= 1.2.30 +PORTREVISION= 1 CATEGORIES= net-mgmt www MASTER_SITES= http://www.cacti.net/downloads/ \ ftp://ftpmirror.uk/freebsd-ports/cacti/ PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX} MAINTAINER= rodrigo@FreeBSD.org COMMENT= Web-driven graphing interface for RRDTool WWW= https://www.cacti.net/ LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/LICENSE -RUN_DEPENDS= rrdtool:databases/rrdtool +RUN_DEPENDS= rrdtool:databases/rrdtool \ + snmpwalk:net-mgmt/net-snmp -USES= cpe mysql php:flavors,web shebangfix +USES= cpe gettext mysql php:flavors,web shebangfix USE_PHP= ctype filter gd gettext gmp intl ldap mbstring pcntl pdo \ - pdo_mysql posix session simplexml sockets snmp xml zlib + pdo_mysql posix session simplexml sockets xml zlib NO_ARCH= yes NO_BUILD= yes SUB_FILES= pkg-message -SHEBANG_FILES= scripts/3com_cable_modem.pl \ - scripts/diskfree.pl \ - scripts/linux_memory.pl \ - scripts/loadavg.pl \ - scripts/loadavg_multi.pl \ - scripts/ping.pl \ - scripts/query_unix_partitions.pl \ - scripts/unix_processes.pl \ - scripts/unix_tcp_connections.pl \ - scripts/unix_users.pl \ - scripts/weatherbug.pl \ - scripts/webhits.pl +SHEBANG_FILES= scripts/3com_cable_modem.pl scripts/diskfree.pl \ + scripts/linux_memory.pl scripts/loadavg.pl \ + scripts/loadavg_multi.pl scripts/ping.pl \ + scripts/query_unix_partitions.pl scripts/unix_processes.pl \ + scripts/unix_tcp_connections.pl scripts/unix_users.pl \ + scripts/weatherbug.pl scripts/webhits.pl CACTIDIR?= share/cacti CACTIUSER?= cacti CACTIGROUP?= cacti USERS?= ${CACTIUSER} GROUPS?= ${CACTIGROUP} -PLIST_SUB= CACTIDIR=${CACTIDIR} CACTIUSER=${CACTIUSER} \ - CACTIGROUP=${CACTIGROUP} -SUB_LIST= CACTIDIR=${CACTIDIR} CACTIUSER=${CACTIUSER} \ - CACTIGROUP=${CACTIGROUP} +PLIST_SUB= CACTIDIR=${CACTIDIR} \ + CACTIGROUP=${CACTIGROUP} \ + CACTIUSER=${CACTIUSER} +SUB_LIST= CACTIDIR=${CACTIDIR} \ + CACTIGROUP=${CACTIGROUP} \ + CACTIUSER=${CACTIUSER} post-patch: @${FIND} ${WRKSRC} -name \*.orig -delete; \ ${MV} ${WRKSRC}/include/config.php.dist ${WRKSRC}/include/config.php.sample ${RM} -r ${WRKSRC}/log ${WRKSRC}/rra do-install: ${MKDIR} ${STAGEDIR}/${PREFIX}/${CACTIDIR} ${MKDIR} ${STAGEDIR}/var/log/cacti ${MKDIR} ${STAGEDIR}/var/db/cacti/rra ${MKDIR} ${STAGEDIR}/var/db/cacti/scripts cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${PREFIX}/${CACTIDIR} "! -name \.mdl*" .include diff --git a/net-mgmt/cacti/files/patch-include__config.php.dist b/net-mgmt/cacti/files/patch-include__config.php.dist new file mode 100644 index 000000000000..e76c7419cec0 --- /dev/null +++ b/net-mgmt/cacti/files/patch-include__config.php.dist @@ -0,0 +1,16 @@ +--- include/config.php.dist.orig 2026-04-25 14:32:30 UTC ++++ include/config.php.dist 2026-04-25 14:34:24 UTC +@@ -121,9 +121,12 @@ + /** + * Optional parameter to disable the PHP SNMP extension. If not set, defaults + * to class_exists('SNMP'). ++ * For FreeBSD due to the issue cased by php82-snmp: 8.2.29 -> 8.2.30 upgrade ++ * we disable this by default. New installation of cacti will use snmp binary ++ * but existing installs will kept their previous configuration. + */ + +-//$php_snmp_support = false; ++$php_snmp_support = false; + + /** + * Optional parameter to define the path of the csrf_secret.php path. This diff --git a/net-mgmt/cacti/files/patch-lib_installer.php b/net-mgmt/cacti/files/patch-lib_installer.php index 82b7cc4e9e3b..e856c4511735 100644 --- a/net-mgmt/cacti/files/patch-lib_installer.php +++ b/net-mgmt/cacti/files/patch-lib_installer.php @@ -1,11 +1,11 @@ ---- lib/installer.php.orig 2021-06-01 00:15:30.652736000 +0000 -+++ lib/installer.php 2021-06-01 00:16:32.509002000 +0000 +--- lib/installer.php.orig 2021-06-01 00:15:30 UTC ++++ lib/installer.php 2021-06-01 00:16:32 UTC @@ -3404,7 +3404,7 @@ $page_nr = 1; $total_rows = 500; - $logcontents = tail_file($config['base_path'] . '/log/cacti.log', 100, -1, ' INSTALL:' , $page_nr, $total_rows); + $logcontents = tail_file('/var/log/cacti/log', 100, -1, ' INSTALL:' , $page_nr, $total_rows); $output_log = ''; foreach ($logcontents as $logline) {