[vhffs-dev] [1658] added awstats 7.0 patchs (SID), removed awstats 6.7 patchs (Lenny)

[ Thread Index | Date Index | More vhffs.org/vhffs-dev Archives ]


Revision: 1658
Author:   gradator
Date:     2011-04-17 01:26:39 +0200 (Sun, 17 Apr 2011)
Log Message:
-----------
added awstats 7.0 patchs (SID), removed awstats 6.7 patchs (Lenny)

Added Paths:
-----------
    trunk/vhffs-robots/misc/awstats_7.0_vhffs.patch
    trunk/vhffs-robots/misc/repository.awstats_7.0_vhffs.patch

Removed Paths:
-------------
    trunk/vhffs-robots/misc/awstats_6.7_vhffs.patch
    trunk/vhffs-robots/misc/repository.awstats_6.7_vhffs.patch

Deleted: trunk/vhffs-robots/misc/awstats_6.7_vhffs.patch
===================================================================
--- trunk/vhffs-robots/misc/awstats_6.7_vhffs.patch	2011-04-16 22:13:31 UTC (rev 1657)
+++ trunk/vhffs-robots/misc/awstats_6.7_vhffs.patch	2011-04-16 23:26:39 UTC (rev 1658)
@@ -1,36 +0,0 @@
---- awstats.pl_	2008-12-04 13:26:08.000000000 +0100
-+++ awstats.pl	2008-12-04 13:26:23.000000000 +0100
-@@ -1141,19 +1141,11 @@
- 	my $configdir=shift;
- 	my @PossibleConfigDir=();
- 
--	if ($configdir)
--	{
--		# If from CGI, overwriting of configdir is only possible if AWSTATS_ENABLE_CONFIG_DIR defined
--		if ($ENV{'GATEWAY_INTERFACE'} && ! $ENV{"AWSTATS_ENABLE_CONFIG_DIR"})
--		{
--			error("Sorry, to allow overwriting of configdir parameter from an AWStats CGI usage, environment variable AWSTATS_ENABLE_CONFIG_DIR must be set to 1");
--		}
--		else
--		{
--			@PossibleConfigDir=("$configdir");
--		}
--	}
--	else { @PossibleConfigDir=("$DIR","/etc/awstats","/usr/local/etc/awstats","/etc","/etc/opt/awstats"); }
-+	error("Wrong config name") unless( $SiteConfig =~ /^[0-9a-z\.\-]+$/ );
-+       use Digest::MD5 qw(md5 md5_hex md5_base64);
-+       my $vhffssitehash = md5_hex( $SiteConfig );
-+       my $vhffsconfigdir = '/data/web/'.substr( $vhffssitehash, 0, 2 ).'/'.substr( $vhffssitehash, 2, 2 ).'/'.substr( $vhffssitehash, 4, 2 ).'/'.$SiteConfig.'/awstats';
-+       @PossibleConfigDir=("$vhffsconfigdir");
- 
- 	# Open config file
- 	$FileConfig=$FileSuffix='';
-@@ -5881,7 +5873,7 @@
- else { @DOWIndex = (0,1,2,3,4,5,6); }
- 
- # Should we link to ourselves or to a wrapper script
--$AWScript=($WrapperScript?"$WrapperScript":"$DirCgi$PROG.$Extension");
-+$AWScript=($WrapperScript?"$WrapperScript":"/$DirCgi$PROG.$Extension");
- 
- # Print html header (Need HTMLOutput,Expires,Lang,StyleSheet,HTMLHeadSectionExpires defined by Read_Config, PageCode defined by Read_Language_Data)
- if (! $HeaderHTMLSent) { &html_head; }

Added: trunk/vhffs-robots/misc/awstats_7.0_vhffs.patch
===================================================================
--- trunk/vhffs-robots/misc/awstats_7.0_vhffs.patch	                        (rev 0)
+++ trunk/vhffs-robots/misc/awstats_7.0_vhffs.patch	2011-04-16 23:26:39 UTC (rev 1658)
@@ -0,0 +1,46 @@
+--- awstats.pl	2011-04-17 01:03:15.000000000 +0200
++++ awstats.pl.web	2011-04-17 01:02:56.000000000 +0200
+@@ -1710,29 +1710,12 @@
+ 	# Other possible directories :				"/usr/local/etc/awstats", "/etc"
+ 	# FHS standard, Suse package : 				"/etc/opt/awstats"
+ 	my $configdir         = shift;
+-	my @PossibleConfigDir = (
+-			"$DIR",
+-			"/etc/awstats",
+-			"/usr/local/etc/awstats", "/etc",
+-			"/etc/opt/awstats"
+-		); 
+ 
+-	if ($configdir) {
+-		# Check if configdir is outside default values.
+-		my $outsidedefaultvalue=1;
+-		foreach (@PossibleConfigDir) {
+-			if ($_ eq $configdir) { $outsidedefaultvalue=0; last; }
+-		}
+-
+-		# If from CGI, overwriting of configdir with a value that differs from a defautl value
+-		# is only possible if AWSTATS_ENABLE_CONFIG_DIR defined
+-		if ($ENV{'GATEWAY_INTERFACE'} && $outsidedefaultvalue && ! $ENV{"AWSTATS_ENABLE_CONFIG_DIR"})
+-		{
+-			error("Sorry, to allow overwriting of configdir parameter, from an AWStats CGI page, with a non default value, environment variable AWSTATS_ENABLE_CONFIG_DIR must be set to 1. For example, by adding the line 'SetEnv AWSTATS_ENABLE_CONFIG_DIR 1' in your Apache config file or into a .htaccess file.");
+-		}
+-
+-		@PossibleConfigDir = ("$configdir");
+-	}
++	error("Wrong config name") unless( $SiteConfig =~ /^[0-9a-z\.\-]+$/ );
++	use Digest::MD5;
++	my $vhffssitehash = Digest::MD5::md5_hex( $SiteConfig );
++	my $vhffsconfigdir = '/data/web/'.substr( $vhffssitehash, 0, 2 ).'/'.substr( $vhffssitehash, 2, 2 ).'/'.substr( $vhffssitehash, 4, 2 ).'/'.$SiteConfig.'/awstats';
++	my @PossibleConfigDir=("$vhffsconfigdir");
+ 
+ 	# Open config file
+ 	$FileConfig = $FileSuffix = '';
+@@ -16976,7 +16959,7 @@
+ else { @DOWIndex = ( 0, 1, 2, 3, 4, 5, 6 ); }
+ 
+ # Should we link to ourselves or to a wrapper script
+-$AWScript = ( $WrapperScript ? "$WrapperScript" : "$DirCgi$PROG.$Extension" );
++$AWScript = ( $WrapperScript ? "$WrapperScript" : "/$DirCgi$PROG.$Extension" );
+ if (index($AWScript,'?')>-1) 
+ {
+     $AWScript .= '&';   # $AWScript contains URL parameters

Deleted: trunk/vhffs-robots/misc/repository.awstats_6.7_vhffs.patch
===================================================================
--- trunk/vhffs-robots/misc/repository.awstats_6.7_vhffs.patch	2011-04-16 22:13:31 UTC (rev 1657)
+++ trunk/vhffs-robots/misc/repository.awstats_6.7_vhffs.patch	2011-04-16 23:26:39 UTC (rev 1658)
@@ -1,34 +0,0 @@
---- awstats.pl_	2008-12-04 13:26:08.000000000 +0100
-+++ awstats.pl	2008-12-04 13:30:52.000000000 +0100
-@@ -1141,19 +1141,9 @@
- 	my $configdir=shift;
- 	my @PossibleConfigDir=();
- 
--	if ($configdir)
--	{
--		# If from CGI, overwriting of configdir is only possible if AWSTATS_ENABLE_CONFIG_DIR defined
--		if ($ENV{'GATEWAY_INTERFACE'} && ! $ENV{"AWSTATS_ENABLE_CONFIG_DIR"})
--		{
--			error("Sorry, to allow overwriting of configdir parameter from an AWStats CGI usage, environment variable AWSTATS_ENABLE_CONFIG_DIR must be set to 1");
--		}
--		else
--		{
--			@PossibleConfigDir=("$configdir");
--		}
--	}
--	else { @PossibleConfigDir=("$DIR","/etc/awstats","/usr/local/etc/awstats","/etc","/etc/opt/awstats"); }
-+	error("Wrong config name") unless( $SiteConfig =~ /^[0-9a-z]+$/ );
-+	my $vhffsconfigdir = '/data/logs/repository/parsed/'.$SiteConfig.'/awstats';
-+	@PossibleConfigDir=("$vhffsconfigdir");
- 
- 	# Open config file
- 	$FileConfig=$FileSuffix='';
-@@ -5881,7 +5871,7 @@
- else { @DOWIndex = (0,1,2,3,4,5,6); }
- 
- # Should we link to ourselves or to a wrapper script
--$AWScript=($WrapperScript?"$WrapperScript":"$DirCgi$PROG.$Extension");
-+$AWScript=($WrapperScript?"$WrapperScript":"/$DirCgi$PROG.$Extension");
- 
- # Print html header (Need HTMLOutput,Expires,Lang,StyleSheet,HTMLHeadSectionExpires defined by Read_Config, PageCode defined by Read_Language_Data)
- if (! $HeaderHTMLSent) { &html_head; }

Added: trunk/vhffs-robots/misc/repository.awstats_7.0_vhffs.patch
===================================================================
--- trunk/vhffs-robots/misc/repository.awstats_7.0_vhffs.patch	                        (rev 0)
+++ trunk/vhffs-robots/misc/repository.awstats_7.0_vhffs.patch	2011-04-16 23:26:39 UTC (rev 1658)
@@ -0,0 +1,44 @@
+--- awstats.pl	2011-04-17 01:03:15.000000000 +0200
++++ awstats.pl.repo	2011-04-17 01:04:42.000000000 +0200
+@@ -1710,29 +1710,10 @@
+ 	# Other possible directories :				"/usr/local/etc/awstats", "/etc"
+ 	# FHS standard, Suse package : 				"/etc/opt/awstats"
+ 	my $configdir         = shift;
+-	my @PossibleConfigDir = (
+-			"$DIR",
+-			"/etc/awstats",
+-			"/usr/local/etc/awstats", "/etc",
+-			"/etc/opt/awstats"
+-		); 
+ 
+-	if ($configdir) {
+-		# Check if configdir is outside default values.
+-		my $outsidedefaultvalue=1;
+-		foreach (@PossibleConfigDir) {
+-			if ($_ eq $configdir) { $outsidedefaultvalue=0; last; }
+-		}
+-
+-		# If from CGI, overwriting of configdir with a value that differs from a defautl value
+-		# is only possible if AWSTATS_ENABLE_CONFIG_DIR defined
+-		if ($ENV{'GATEWAY_INTERFACE'} && $outsidedefaultvalue && ! $ENV{"AWSTATS_ENABLE_CONFIG_DIR"})
+-		{
+-			error("Sorry, to allow overwriting of configdir parameter, from an AWStats CGI page, with a non default value, environment variable AWSTATS_ENABLE_CONFIG_DIR must be set to 1. For example, by adding the line 'SetEnv AWSTATS_ENABLE_CONFIG_DIR 1' in your Apache config file or into a .htaccess file.");
+-		}
+-
+-		@PossibleConfigDir = ("$configdir");
+-	}
++	error("Wrong config name") unless( $SiteConfig =~ /^[0-9a-z]+$/ );
++	my $vhffsconfigdir = '/data/logs/repository/parsed/'.$SiteConfig.'/awstats';
++	my @PossibleConfigDir=("$vhffsconfigdir");
+ 
+ 	# Open config file
+ 	$FileConfig = $FileSuffix = '';
+@@ -16976,7 +16957,7 @@
+ else { @DOWIndex = ( 0, 1, 2, 3, 4, 5, 6 ); }
+ 
+ # Should we link to ourselves or to a wrapper script
+-$AWScript = ( $WrapperScript ? "$WrapperScript" : "$DirCgi$PROG.$Extension" );
++$AWScript = ( $WrapperScript ? "$WrapperScript" : "/$DirCgi$PROG.$Extension" );
+ if (index($AWScript,'?')>-1) 
+ {
+     $AWScript .= '&';   # $AWScript contains URL parameters


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/