Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Aug 2014 14:47:43 +0200
From:      Lars Engels <lars.engels@0x20.net>
To:        Kurt Jaeger <pi@FreeBSD.org>
Cc:        svn-ports-head@freebsd.org, svn-ports-all@freebsd.org, ports-committers@freebsd.org
Subject:   Re: svn commit: r364957 - in head/net-mgmt/cacti: . files
Message-ID:  <20140815124742.GO98029@e-new.0x20.net>
In-Reply-To: <201408151043.s7FAhfv6086083@svn.freebsd.org>
References:  <201408151043.s7FAhfv6086083@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--lLR1BQqf7txDtYcF
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Aug 15, 2014 at 10:43:41AM +0000, Kurt Jaeger wrote:
> Author: pi
> Date: Fri Aug 15 10:43:41 2014
> New Revision: 364957
> URL: http://svnweb.freebsd.org/changeset/ports/364957
> QAT: https://qat.redports.org/buildarchive/r364957/
>=20
> Log:
>   net-mgmt/cacti: add stage support
>  =20
>   PR:		192618
>   Submitted by:	Dennis Glatting <freebsd@pki2.com>
>=20
> Added:
>   head/net-mgmt/cacti/files/patch-include__global.php   (contents, props =
changed)
>   head/net-mgmt/cacti/files/patch-include__global_settings.php   (content=
s, props changed)
>   head/net-mgmt/cacti/files/patch-install__index.php   (contents, props c=
hanged)
>   head/net-mgmt/cacti/files/patch-lib__rrd.php   (contents, props changed)
>   head/net-mgmt/cacti/files/patch-scripts__3com_cable_modem.pl   (content=
s, props changed)
>   head/net-mgmt/cacti/files/patch-scripts__diskfree.pl   (contents, props=
 changed)
>   head/net-mgmt/cacti/files/patch-scripts__linux_memory.pl   (contents, p=
rops changed)
>   head/net-mgmt/cacti/files/patch-scripts__loadavg.pl   (contents, props =
changed)
>   head/net-mgmt/cacti/files/patch-scripts__loadavg_multi.pl   (contents, =
props changed)
>   head/net-mgmt/cacti/files/patch-scripts__ping.pl   (contents, props cha=
nged)
>   head/net-mgmt/cacti/files/patch-scripts__query_unix_partitions.pl   (co=
ntents, props changed)
>   head/net-mgmt/cacti/files/patch-scripts__unix_processes.pl   (contents,=
 props changed)
>   head/net-mgmt/cacti/files/patch-scripts__unix_tcp_connections.pl   (con=
tents, props changed)
>   head/net-mgmt/cacti/files/patch-scripts__unix_users.pl   (contents, pro=
ps changed)
>   head/net-mgmt/cacti/files/patch-scripts__weatherbug.pl   (contents, pro=
ps changed)
>   head/net-mgmt/cacti/files/patch-scripts__webhits.pl   (contents, props =
changed)
> Deleted:
>   head/net-mgmt/cacti/files/patch-lib-rrd.php
>   head/net-mgmt/cacti/files/patch-scripts-diskfree.pl
>   head/net-mgmt/cacti/files/patch-scripts-ping.pl
>   head/net-mgmt/cacti/files/pkg-install.in
> Modified:
>   head/net-mgmt/cacti/Makefile
>   head/net-mgmt/cacti/distinfo
>   head/net-mgmt/cacti/files/pkg-message.in
>   head/net-mgmt/cacti/pkg-plist
>=20
> Modified: head/net-mgmt/cacti/Makefile
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/net-mgmt/cacti/Makefile	Fri Aug 15 10:11:10 2014	(r364956)
> +++ head/net-mgmt/cacti/Makefile	Fri Aug 15 10:43:41 2014	(r364957)
> @@ -1,18 +1,15 @@
> -# Created by: Vincent Tantardini <vinc@freebsd-fr.org>
>  # $FreeBSD$
> =20
>  PORTNAME=3D	cacti
>  PORTVERSION=3D	0.8.8b${PATCHLEVEL}
> -PORTREVISION=3D	2
> +PORTREVISION=3D	3
>  CATEGORIES=3D	net-mgmt www
>  MASTER_SITES=3D	http://www.cacti.net/downloads/
> -DISTNAME=3D	${PORTNAME}-${SITEDISTVERSION}
> =20
>  # Vendor's patches
>  PATCH_SITES=3D	http://www.cacti.net/downloads/patches/${SITEDISTVERSION}/
> -PATCHFILES=3D
> +PATCHFILES=3D	security.patch
>  PATCH_DIST_STRIP=3D	-p1
> -PATCHLEVEL=3D
> =20
>  MAINTAINER=3D	ports@FreeBSD.org
>  COMMENT=3D	Web-driven graphing interface for RRDTool
> @@ -28,35 +25,35 @@ USE_PHP=3D	mysql pcre session sockets snmp
>  WANT_PHP_WEB=3D	yes
>  NO_BUILD=3D	yes
>  PKGMESSAGE=3D	${WRKDIR}/pkg-message
> -PKGINSTALL=3D	${WRKDIR}/pkg-install
> -SUB_FILES=3D	pkg-message pkg-install
> +SUB_FILES=3D	pkg-message
> =20
>  CACTIDIR?=3D	share/cacti
>  CACTIUSER?=3D	cacti
> -CACTIGROUP?=3D	${CACTIUSER}
> +CACTIGROUP?=3D	cacti
> +
> +USERS?=3D		${CACTIUSER}
> +GROUPS?=3D	${CACTIGROUP}
> +
>  WRKSRC=3D		${WRKDIR}/${PORTNAME}-${SITEDISTVERSION}
> =20
>  SITEDISTVERSION=3D	${PORTVERSION:S/${PATCHLEVEL}$//}
> =20
> -PLIST_SUB+=3D	CACTIDIR=3D${CACTIDIR}
> +PLIST_SUB+=3D	CACTIDIR=3D${CACTIDIR}  CACTIUSER=3D${CACTIUSER} \
> +		CACTIGROUP=3D${CACTIGROUP}
>  SUB_LIST+=3D	CACTIDIR=3D${CACTIDIR} CACTIUSER=3D${CACTIUSER} \
>  		CACTIGROUP=3D${CACTIGROUP}
> =20
> -NO_STAGE=3D	yes
>  post-patch:
>  	@${FIND} ${WRKSRC} -name \*.orig -delete; \
> -	${MV} ${WRKSRC}/include/config.php ${WRKSRC}/include/config.php.orig
> -
> -pre-install:
> -	@${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
> +	${MV} ${WRKSRC}/include/config.php ${WRKSRC}/include/config.php.sample
> +	${RM} -r ${WRKSRC}/log ${WRKSRC}/rra
> =20
>  do-install:
> -	@${MKDIR} ${PREFIX}/${CACTIDIR}; \
> -	${CP} -R ${WRKSRC}/* ${PREFIX}/${CACTIDIR}/; \
> -	if [ ! -f ${PREFIX}/${CACTIDIR}/include/config.php ]; then \
> -		${CP} ${PREFIX}/${CACTIDIR}/include/config.php.orig \
> -			${PREFIX}/${CACTIDIR}/include/config.php; \
> -	fi; \
> +	${MKDIR} ${STAGEDIR}/${PREFIX}/${CACTIDIR}
> +	${MKDIR} ${STAGEDIR}/var/log/cacti
> +	${MKDIR} ${STAGEDIR}/var/db/cacti/rra
> +	${MKDIR} ${STAGEDIR}/var/db/cacti/scripts
> +	${CP} -R ${WRKSRC}/* ${STAGEDIR}/${PREFIX}/${CACTIDIR}
>  	if [ -f ${PREFIX}/${CACTIDIR}/include/db-settings.php ]; then \
>  		${ECHO_CMD} "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D"; \
>  		${ECHO_CMD} "WARNING! You have to move DB settings from"; \
> @@ -64,8 +61,4 @@ do-install:
>  		${ECHO_CMD} "${PREFIX}/${CACTIDIR}/include/config.php and remove db-se=
ttings.php"; \
>  	fi
> =20
> -post-install:
> -	@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
> -	@${CAT} ${PKGMESSAGE}
> -
>  .include <bsd.port.mk>
>=20
> Modified: head/net-mgmt/cacti/distinfo
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- head/net-mgmt/cacti/distinfo	Fri Aug 15 10:11:10 2014	(r364956)
> +++ head/net-mgmt/cacti/distinfo	Fri Aug 15 10:43:41 2014	(r364957)
> @@ -1,2 +1,4 @@
>  SHA256 (cacti-0.8.8b.tar.gz) =3D ef0e2a813139e0b4c2e066f0fdae1f4ad086bef=
0aa23446055df6331cb1af98c
>  SIZE (cacti-0.8.8b.tar.gz) =3D 2272130
> +SHA256 (security.patch) =3D 73758bdf3f7846875f1620c35d1d982fa27366b053d8=
bd87363c618e7747c163
> +SIZE (security.patch) =3D 6909
>=20
> Added: head/net-mgmt/cacti/files/patch-include__global.php
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> +++ head/net-mgmt/cacti/files/patch-include__global.php	Fri Aug 15 10:43:=
41 2014	(r364957)
> @@ -0,0 +1,11 @@
> +--- ./include/global.php.orig	2013-08-06 19:31:19.000000000 -0700
> ++++ ./include/global.php	2014-08-11 18:37:08.000000000 -0700
> +@@ -113,7 +113,7 @@
> + 	$config["library_path"] =3D preg_replace("/(.*[\/])include/", "\\1lib"=
, dirname(__FILE__));
> + }
> + $config["include_path"] =3D dirname(__FILE__);
> +-$config["rra_path"] =3D $config["base_path"] . '/rra';
> ++$config["rra_path"] =3D '/var/db/cacti/rra';
> +=20
> + /* colors */
> + $colors["dark_outline"] =3D "454E53";
>=20
> Added: head/net-mgmt/cacti/files/patch-include__global_settings.php
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> +++ head/net-mgmt/cacti/files/patch-include__global_settings.php	Fri Aug =
15 10:43:41 2014	(r364957)
> @@ -0,0 +1,14 @@
> +--- ./include/global_settings.php.orig	2013-08-06 19:31:19.000000000 -07=
00
> ++++ ./include/global_settings.php	2014-08-11 18:37:08.000000000 -0700
> +@@ -96,9 +96,9 @@
> + 			),
> + 		"path_cactilog" =3D> array(
> + 			"friendly_name" =3D> "Cacti Log File Path",
> +-			"description" =3D> "The path to your Cacti log file (if blank, defau=
lts to <path_cacti>/log/cacti.log)",
> ++			"description" =3D> "The path to your Cacti log file (if blank, defau=
lts to /var/log/cacti.log)",
> + 			"method" =3D> "filepath",
> +-			"default" =3D> $config["base_path"] . "/log/cacti.log",
> ++			"default" =3D> "/var/log/cacti/cacti.log",
> + 			"max_length" =3D> "255"
> + 			),
> + 		"pollerpaths_header" =3D> array(
>=20
> Added: head/net-mgmt/cacti/files/patch-install__index.php
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> +++ head/net-mgmt/cacti/files/patch-install__index.php	Fri Aug 15 10:43:4=
1 2014	(r364957)
> @@ -0,0 +1,11 @@
> +--- ./install/index.php.orig	2013-08-06 19:31:19.000000000 -0700
> ++++ ./install/index.php	2014-08-11 18:45:19.000000000 -0700
> +@@ -267,7 +267,7 @@
> + if (config_value_exists("path_cactilog")) {
> + 	$input["path_cactilog"]["default"] =3D read_config_option("path_cactil=
og");
> + } else {
> +-	$input["path_cactilog"]["default"] =3D $config["base_path"] . "/log/ca=
cti.log";
> ++	$input["path_cactilog"]["default"] =3D "/var/log/cacti/cacti.log";
> + }
> +=20
> + /* SNMP Version */
>=20
> Added: head/net-mgmt/cacti/files/patch-lib__rrd.php
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> +++ head/net-mgmt/cacti/files/patch-lib__rrd.php	Fri Aug 15 10:43:41 2014=
	(r364957)
> @@ -0,0 +1,35 @@
> +--- ./lib/rrd.php.orig	2014-08-11 17:34:23.000000000 -0700
> ++++ ./lib/rrd.php	2014-08-11 17:34:23.000000000 -0700
> +@@ -1343,20 +1343,20 @@
> + 		$need_rrd_nl =3D TRUE;
> +=20
> + 		if ($graph_item_types{$graph_item["graph_type_id"]} =3D=3D "COMMENT")=
 {
> ++			# perform variable substitution first (in case this will yield an em=
pty results or brings command injection problems)
> ++			$comment_arg =3D rrd_substitute_host_query_data($graph_variables["te=
xt_format"][$graph_item_id], $graph, $graph_item);
> ++			# next, compute the argument of the COMMENT statement and perform in=
jection counter measures
> ++			if (trim($comment_arg) =3D=3D '') { # an empty COMMENT must be treat=
ed with care
> ++				$comment_arg =3D cacti_escapeshellarg(' ' . $hardreturn[$graph_item=
_id]);
> ++			} else {
> ++				$comment_arg =3D cacti_escapeshellarg($comment_arg . $hardreturn[$g=
raph_item_id]);
> ++			}
> ++
> ++			# create rrdtool specific command line
> + 			if (read_config_option("rrdtool_version") !=3D "rrd-1.0.x") {
> +-				$comment_string =3D $graph_item_types{$graph_item["graph_type_id"]}=
 . ":" . str_replace(":", "\:", cacti_escapeshellarg($graph_variables["text=
_format"][$graph_item_id] . $hardreturn[$graph_item_id])) . " ";
> +-				if (trim($comment_string) =3D=3D 'COMMENT:"\n"') {
> +-					$txt_graph_items .=3D 'COMMENT:" \n"'; # rrdtool will skip a COMME=
NT that holds a NL only; so add a blank to make NL work
> +-				} else if (trim($comment_string) !=3D "COMMENT:\"\"") {
> +-					$txt_graph_items .=3D rrd_substitute_host_query_data($comment_stri=
ng, $graph, $graph_item);
> +-				}
> ++				$txt_graph_items .=3D $graph_item_types{$graph_item["graph_type_id"=
]} . ":" . str_replace(":", "\:", $comment_arg) . " ";
> + 			}else {
> +-				$comment_string =3D $graph_item_types{$graph_item["graph_type_id"]}=
 . ":" . cacti_escapeshellarg($graph_variables["text_format"][$graph_item_i=
d] . $hardreturn[$graph_item_id]) . " ";
> +-				if (trim($comment_string) =3D=3D 'COMMENT:"\n"') {
> +-					$txt_graph_items .=3D 'COMMENT:" \n"'; # rrdtool will skip a COMME=
NT that holds a NL only; so add a blank to make NL work
> +-				} else if (trim($comment_string) !=3D "COMMENT:\"\"") {
> +-					$txt_graph_items .=3D rrd_substitute_host_query_data($comment_stri=
ng, $graph, $graph_item);
> +-				}
> ++				$txt_graph_items .=3D $graph_item_types{$graph_item["graph_type_id"=
]} . ":" . $comment_arg . " ";
> + 			}
> + 		}elseif (($graph_item_types{$graph_item["graph_type_id"]} =3D=3D "GPR=
INT") && (!isset($graph_data_array["graph_nolegend"]))) {
> + 			$graph_variables["text_format"][$graph_item_id] =3D str_replace(":",=
 "\:", $graph_variables["text_format"][$graph_item_id]); /* escape colons */
>=20
> Added: head/net-mgmt/cacti/files/patch-scripts__3com_cable_modem.pl
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- /dev/null	00:00:00 1970	(empty, because file is newly added)
> +++ head/net-mgmt/cacti/files/patch-scripts__3com_cable_modem.pl	Fri Aug =
15 10:43:41 2014	(r364957)
> @@ -0,0 +1,8 @@
> +--- ./scripts/3com_cable_modem.pl.orig	2013-08-06 19:31:19.000000000 -07=
00
> ++++ ./scripts/3com_cable_modem.pl	2014-08-11 18:37:08.000000000 -0700
> +@@ -1,4 +1,4 @@
> +-#!/usr/bin/perl
> ++#!/usr/local/bin/perl
^^^^^^^^^^^^^^^^^^^^^^^^^^
This is better handled with USE=3D shebangfix

--lLR1BQqf7txDtYcF
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (FreeBSD)

iQF8BAEBCgBmBQJT7gFuXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4RjQwMDE3RTRERjUzMTI1N0FGRTUxNDlF
NTRDQjM3RDNBMDg5RDZEAAoJEOVMs306CJ1tM4sH/1m4EKspIQ8yszXQejCHqmdR
HKFHHDF3YsdslqCVJI3LttJ7cOA43W5WpeKlxHHpvAIdmmR5E/loQOKIcL7Q0K0w
B4R6GGEZpuLDJ93efTAF/GfybSvFHAR7Jrrd4JvVswBfihO5w86dl1NKvqgtB0IG
JQhOaGvWtPC2tKYZqh4sxksSKkuIYQLn4Z3TobMSKvGrfe83KudFSahlFTN1oGXG
hl/3quMIshgU3tviIFM+bR53FPAvn+pg3txf2OUMELMqZ+PPSm2CuTSKuY3ZKaS3
UUYe/+eanjdDgYU+wi6nv/U1oVYr/SKPJOmdm+0RcFXgLB/tNA0l1nfen60PZSU=
=VVEf
-----END PGP SIGNATURE-----

--lLR1BQqf7txDtYcF--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140815124742.GO98029>