File sarg-2.2.3.1-config.patch of Package sarg
--- sarg-2.2.3.1/sarg-php/sarg-block-it.php.orig 2007-01-02 20:11:26.000000000 +0100
+++ sarg-2.2.3.1/sarg-php/sarg-block-it.php 2007-12-05 16:17:14.000000000 +0100
@@ -25,7 +25,7 @@
*
*/
-$filename = "/usr/local/squid/etc/block.txt";
+$filename = "/etc/squid/etc/block.txt";
$url = $_GET['url'];
$url = $url."\n";
--- sarg-2.2.3.1/sarg-php/sarg-squidguard-block.php.orig 2007-01-02 20:11:26.000000000 +0100
+++ sarg-2.2.3.1/sarg-php/sarg-squidguard-block.php 2007-12-05 16:16:14.000000000 +0100
@@ -26,8 +26,8 @@
*/
// Change to squidGuard and sarg config file paths
-$SargConf = "/usr/local/sarg/sarg.conf";
-$squidGuardConf = "/usr/local/squidGuard/squidGuard.conf";
+$SargConf = "/etc/sarg.conf";
+$squidGuardConf = "/etc/squidGuard.conf";
global $SargConf;
global $dbhome;
@@ -37,7 +37,7 @@
include_once("style.php");
$url = $_GET['url'];
-$squidGuard_conf = '/usr/local/squidGuard/squidGuard.conf';
+$squidGuard_conf = '/etc/squidGuard.conf';
function parse_config($line,$clave) {
if (preg_match("/dbhome/i", $line)) {
--- sarg-2.2.3.1/sarg.1.orig 2007-01-02 20:11:26.000000000 +0100
+++ sarg-2.2.3.1/sarg.1 2007-12-05 16:37:19.000000000 +0100
@@ -131,11 +131,11 @@
.B \-split
Split the log file by date in \fB-d\fP parameter.
.SH FILES
-.BR /usr/local/sarg/sarg.conf
+.BR /etc/sarg.conf
.br
-.B /usr/local/squid/logs/access.log
+.B /var/log/squid/access.log
.br
-.B /usr/local/squidGuard/logs/squidGuard.log
+.B /var/log/squidGuard/squidGuard.log
.SH SEE ALSO
squid(8)
.SH AUTHOR
--- sarg-2.2.3.1/log.c.orig 2007-01-02 20:11:26.000000000 +0100
+++ sarg-2.2.3.1/log.c 2007-12-05 16:38:33.000000000 +0100
@@ -145,7 +145,7 @@ int main(argc,argv)
SquidGuardLogAlternate[0]='\0';
arq[0]='\0';
- strcpy(AccessLog,"/usr/local/squid/var/logs/access.log");
+ strcpy(AccessLog,"/var/log/squid/access.log");
sprintf(ExcludeCodes,"%s/exclude_codes",SYSCONFDIR);
strcpy(GraphDaysBytesBarColor,"orange");
strcpy(BgColor,"#ffffff");
@@ -201,7 +201,7 @@ int main(argc,argv)
strcpy(DisplayedValues,"abbreviation");
strcpy(HeaderFontSize,"9px");
strcpy(TitleFontSize,"11px");
- strcpy(AuthUserFile,"/usr/local/sarg/passwd");
+ strcpy(AuthUserFile,"/usr/share/sarg/passwd");
strcpy(AuthName,"SARG, Restricted Access");
strcpy(AuthType,"basic");
strcpy(Require,"require user admin %u");
--- sarg-2.2.3.1/user_limit_block.orig 2007-01-02 20:13:14.000000000 +0100
+++ sarg-2.2.3.1/user_limit_block 2007-12-05 16:40:00.000000000 +0100
@@ -24,8 +24,8 @@
#
#
-conf="/usr/local/sarg/sarg.conf"
-squid_password_file="/usr/local/squid/etc/passwd"
+conf="/etc/sarg.conf"
+squid_password_file="/etc/squid/passwd"
tmp="/tmp/sarg_limit.$$"
limit_file=`grep "per_user_limit" $conf|grep -v "#"|awk '{print $2}'`
--- sarg-2.2.3.1/README.orig 2007-01-02 20:11:26.000000000 +0100
+++ sarg-2.2.3.1/README 2007-12-05 16:40:28.000000000 +0100
@@ -50,20 +50,20 @@ If you use native squid log format, the
default: /usr/bin
--enable-sysconfdir - where the configuration directory is
- default: /usr/local/sarg
+ default: /usr/share/sarg
--enable-htmldir - where the www html root dir is
default: /var/www/html
--enable-mandir - where the sarg man page will be saved
- default: /usr/local/man/man1
+ default: /usr/share/man/man1
3. make
4. make install
-5. Go to /usr/local/sarg (or file entered with --sysconfdir on configure)
+5. Go to /usr/share/sarg (or file entered with --sysconfdir on configure)
and change sarg.conf as you need.
6. Notes about sarg:
--- sarg-2.2.3.1/splitlog.c.orig 2007-01-02 20:11:26.000000000 +0100
+++ sarg-2.2.3.1/splitlog.c 2007-12-05 16:40:49.000000000 +0100
@@ -39,7 +39,7 @@ void splitlog(char *arq, char *df, int d
struct tm *t;
if(arq[0] == '\0')
- strcpy(arq,"/usr/local/squid/logs/access.log");
+ strcpy(arq,"/var/log/squid/access.log");
if((fp_in=fopen(arq,"r"))==NULL) {
fprintf(stderr, "SARG: (splitlog) %s: %s\n",text[8],arq);
--- sarg-2.2.3.1/htaccess.orig 2007-01-02 20:11:26.000000000 +0100
+++ sarg-2.2.3.1/htaccess 2007-12-05 16:41:20.000000000 +0100
@@ -1,4 +1,4 @@
-AuthUserFile /usr/local/sarg/passwd
+AuthUserFile /usr/share/sarg/passwd
AuthName "SARG, Squid Analysis Report Generator"
AuthType Basic
<Limit GET POST>
--- sarg-2.2.3.1/convlog.c.orig 2007-01-02 20:11:26.000000000 +0100
+++ sarg-2.2.3.1/convlog.c 2007-12-05 16:41:35.000000000 +0100
@@ -39,7 +39,7 @@ void convlog(char *arq, char *df, int df
struct tm *t;
if(arq[0] == '\0')
- strcpy(arq,"/usr/local/squid/logs/access.log");
+ strcpy(arq,"/usr/log/squid/access.log");
if((fp_in=fopen(arq,"r"))==NULL) {
fprintf(stderr, "SARG: (convlog) %s: %s\n",text[8],arq);
--- sarg-2.2.3.1/sarg-php/INSTALL.orig 2007-01-02 20:11:26.000000000 +0100
+++ sarg-2.2.3.1/sarg-php/INSTALL 2007-12-05 16:42:59.000000000 +0100
@@ -2,8 +2,8 @@
To use sarg-squidGuard you need to change:
1. These two variables on sarg-squidguard-block.php file:
-$SargConf = "/usr/local/sarg/sarg.conf";
-$squidGuardConf = "/usr/local/squidGuard/squidGuard.conf";
+$SargConf = "/etc/sarg.conf";
+$squidGuardConf = "/etc/squidGuard.conf";
2.change the squidGuard db file to the same httpd process owner:
-chown apache /var/www/html/sarg-php
+chown apache /srv/www/htdocs/sarg-php