NetBSD Problem Report #48707

From makoto@ki.nu  Fri Apr  4 14:00:42 2014
Return-Path: <makoto@ki.nu>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 27DBCA580A
	for <gnats-bugs@gnats.NetBSD.org>; Fri,  4 Apr 2014 14:00:42 +0000 (UTC)
Message-Id: <201404041400.s34E0Zdk001188@ki.nu>
Date: Fri, 4 Apr 2014 23:00:35 +0900 (JST)
From: makoto@ki.nu
Reply-To: makoto@ki.nu
To: gnats-bugs@gnats.NetBSD.org
Subject: (net/cacti) Installation Guide shows many non ${PREFIX} PATH
X-Send-Pr-Version: 3.95

>Number:         48707
>Category:       pkg
>Synopsis:       Third page of "Cacti Installation Guide" shows many non ${PREFIX} path
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 04 14:05:00 +0000 2014
>Originator:     Makoto Fujiwara
>Release:        NetBSD 6.1.2
>Organization:
KINU Corporation
>Environment:


System: NetBSD modena 6.1.2 NetBSD 6.1.2 (GENERIC) #1: Fri Jan 10 21:12:00 JST 2014 root@modena:/export/src-netbsd-6-1-2-RELEASE/sys/arch/amd64/compile/obj/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
Third page of "Cacti Installation Guide" shows many non ${PREFIX} path
and user (admin) should correct item one by one.

>How-To-Repeat:
- Install net/cacti, and then
- (AS MESSAGE instructs, but a little bit different):

 shell> sudo /usr/pkg/bin/mysql_secure_installation
 shell> mysql -u root -p (mysql)

 mysql> CREATE DATABASE cacti;
 mysql> GRANT ALL PRIVILEGES ON cacti.* TO 'cactiuser'@'localhost'
     -> IDENTIFIED BY 'cactipassword';
 mysql> FLUSH PRIVILEGES;
 mysql> USE cacti;
 mysql> SOURCE /usr/pkg/share/cacti/cacti.sql;
 mysql> quit

- Install & Configure an Apache webserver.

- If you have not already done so, add these lines to enable php extensions
  required by cacti in /usr/pkg/etc/php.ini
     (.. omitted ..)
- Append this to Apache webserver's "httpd.conf" and restart the server.
     (.. omitted ..)

THEN
... Browse Web page
     http://localhost/cacti/install/index.php

+ -------
| Cacti Installation Guide
| ...
| 	  Next >>
+ -------
+ -------
| Cacti Installation Guide
| (New Install)
| ...
| Database User: cactiuser
| Database Hostname: localhost
| Database: cacti
| Server Operating System Type: unix
| 	  Next >>
+ -------
+ -------
| Cacti Installation Guide
| 
| Make sure all of these values are correct before continuing.
| 
| [Not FOUND] RRDTool Binary Path: The path to the rrdtool binary.
| 
| ....
| ....
| ....
| 
+ --------
^ Above page, so many non ${PREFIX} path are shown.

>Fix:
Index: patches/patch-install_index.php
===================================================================
RCS file: /cvs/cvsroot/pkgsrc/net/cacti/patches/patch-install_index.php,v
retrieving revision 1.2
diff -u -r1.2 patch-install_index.php
--- patches/patch-install_index.php	8 Jan 2014 20:51:28 -0000	1.2
+++ patches/patch-install_index.php	4 Apr 2014 13:51:45 -0000
@@ -18,6 +18,60 @@
  	}

  	for ($i=0; $i<count($search_paths); $i++) {
+@@ -122,7 +122,7 @@
+ 	}else if (!empty($which_rrdtool)) {
+ 		$input["path_rrdtool"]["default"] = $which_rrdtool;
+ 	}else{
+-		$input["path_rrdtool"]["default"] = "/usr/local/bin/rrdtool";
++		$input["path_rrdtool"]["default"] = "@PREFIX@/bin/rrdtool";
+ 	}
+ }elseif ($config["cacti_server_os"] == "win32") {
+ 	$which_rrdtool = find_best_path("rrdtool.exe");
+@@ -147,7 +147,7 @@
+ 	}else if (!empty($which_php)) {
+ 		$input["path_php_binary"]["default"] = $which_php;
+ 	}else{
+-		$input["path_php_binary"]["default"] = "/usr/bin/php";
++		$input["path_php_binary"]["default"] = "@PREFIX@/bin/php";
+ 	}
+ }elseif ($config["cacti_server_os"] == "win32") {
+ 	$which_php = find_best_path("php.exe");
+@@ -172,7 +172,7 @@
+ 	}else if (!empty($which_snmpwalk)) {
+ 		$input["path_snmpwalk"]["default"] = $which_snmpwalk;
+ 	}else{
+-		$input["path_snmpwalk"]["default"] = "/usr/local/bin/snmpwalk";
++		$input["path_snmpwalk"]["default"] = "@PREFIX@/bin/snmpwalk";
+ 	}
+ }elseif ($config["cacti_server_os"] == "win32") {
+ 	$which_snmpwalk = find_best_path("snmpwalk.exe");
+@@ -197,7 +197,7 @@
+ 	}else if (!empty($which_snmpget)) {
+ 		$input["path_snmpget"]["default"] = $which_snmpget;
+ 	}else{
+-		$input["path_snmpget"]["default"] = "/usr/local/bin/snmpget";
++		$input["path_snmpget"]["default"] = "@PREFIX@/bin/snmpget";
+ 	}
+ }elseif ($config["cacti_server_os"] == "win32") {
+ 	$which_snmpget = find_best_path("snmpget.exe");
+@@ -222,7 +222,7 @@
+ 	}else if (!empty($which_snmpbulkwalk)) {
+ 		$input["path_snmpbulkwalk"]["default"] = $which_snmpbulkwalk;
+ 	}else{
+-		$input["path_snmpbulkwalk"]["default"] = "/usr/local/bin/snmpbulkwalk";
++		$input["path_snmpbulkwalk"]["default"] = "@PREFIX@/bin/snmpbulkwalk";
+ 	}
+ }elseif ($config["cacti_server_os"] == "win32") {
+ 	$which_snmpbulkwalk = find_best_path("snmpbulkwalk.exe");
+@@ -247,7 +247,7 @@
+ 	}else if (!empty($which_snmpgetnext)) {
+ 		$input["path_snmpgetnext"]["default"] = $which_snmpgetnext;
+ 	}else{
+-		$input["path_snmpgetnext"]["default"] = "/usr/local/bin/snmpgetnext";
++		$input["path_snmpgetnext"]["default"] = "@PREFIX@/bin/snmpgetnext";
+ 	}
+ }elseif ($config["cacti_server_os"] == "win32") {
+ 	$which_snmpgetnext = find_best_path("snmpgetnext.exe");
 @@ -267,7 +267,7 @@
  if (config_value_exists("path_cactilog")) {
  	$input["path_cactilog"]["default"] = read_config_option("path_cactilog");
Index: distinfo
===================================================================
RCS file: /cvs/cvsroot/pkgsrc/net/cacti/distinfo,v
retrieving revision 1.4
diff -u -r1.4 distinfo
--- distinfo	8 Jan 2014 20:51:28 -0000	1.4
+++ distinfo	4 Apr 2014 13:51:45 -0000
@@ -7,5 +7,5 @@
 SHA1 (patch-host.php) = 679fd76c81a719d949e023cecc4cc0c47ac6acf4
 SHA1 (patch-include_global.php) = fb0d2f15596b051c60ed6032ecb9038315b7c663
 SHA1 (patch-include_global__settings.php) = 54ffd0c3fc9d927595b1568a874c45a4a6033f7b
-SHA1 (patch-install_index.php) = e5ee36159968e1ca160aba953e02b9e80a2eb5d9
+SHA1 (patch-install_index.php) = 4c4452e6427c8409c71ead955665256f94748b5d
 SHA1 (patch-lib_api_device.php) = 0a2d495a0245c8957bfd5214a5e79dbb31f135c4

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.