diff --git a/.cvsignore b/.cvsignore index 20be2b7..fe295bb 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -awstats-6.7.tar.gz +awstats-6.8.tar.gz diff --git a/awstats-6.7-xmlhistory.patch b/awstats-6.7-xmlhistory.patch deleted file mode 100644 index a73750c..0000000 --- a/awstats-6.7-xmlhistory.patch +++ /dev/null @@ -1,325 +0,0 @@ ---- wwwroot/cgi-bin/awstats.pl 2007/07/07 11:00:05 1.892 -+++ wwwroot/cgi-bin/awstats.pl 2007/07/12 21:38:20 1.894 -@@ -2211,7 +2211,7 @@ - } - - # Analyze fields -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); - if (! $field[0]) { next; } - - # Here version MUST be defined -@@ -2282,7 +2282,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq 'END_MISC' || $field[0] eq "${xmleb}END_MISC" || ! $_); - if ($field[0] ne 'END_MISC' && $field[0] ne "${xmleb}END_MISC") { error("History file \"$filetoread\" is corrupted (End of section MISC not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -2313,7 +2313,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq 'END_CLUSTER' || $field[0] eq "${xmleb}END_CLUSTER" || ! $_); - if ($field[0] ne 'END_CLUSTER' && $field[0] ne "${xmleb}END_CLUSTER") { error("History file \"$filetoread\" is corrupted (End of section CLUSTER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -2357,7 +2357,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq 'END_TIME' || $field[0] eq "${xmleb}END_TIME" || ! $_); - if ($field[0] ne 'END_TIME' && $field[0] ne "${xmleb}END_TIME") { error("History file \"$filetoread\" is corrupted (End of section TIME not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -2396,7 +2396,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq 'END_ORIGIN' || $field[0] eq "${xmleb}END_ORIGIN" || ! $_); - if ($field[0] ne 'END_ORIGIN' && $field[0] ne "${xmleb}END_ORIGIN") { error("History file \"$filetoread\" is corrupted (End of section ORIGIN not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -2427,7 +2427,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq 'END_DAY' || $field[0] eq "${xmleb}END_DAY" || ! $_); - if ($field[0] ne 'END_DAY' && $field[0] ne "${xmleb}END_DAY") { error("History file \"$filetoread\" is corrupted (End of section DAY not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -2534,7 +2534,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq 'END_VISITOR' || $field[0] eq "${xmleb}END_VISITOR" || ! $_); - if ($field[0] ne 'END_VISITOR' && $field[0] ne "${xmleb}END_VISITOR") { error("History file \"$filetoread\" is corrupted (End of section VISITOR not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -2564,7 +2564,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq 'END_UNKNOWNIP' || $field[0] eq "${xmleb}END_UNKNOWNIP" || ! $_); - if ($field[0] ne 'END_UNKNOWNIP' && $field[0] ne "${xmleb}END_UNKNOWNIP") { error("History file \"$filetoread\" is corrupted (End of section UNKOWNIP not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -2602,7 +2602,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq 'END_LOGIN' || $field[0] eq "${xmleb}END_LOGIN" || ! $_); - if ($field[0] ne 'END_LOGIN' && $field[0] ne "${xmleb}END_LOGIN") { error("History file \"$filetoread\" is corrupted (End of section LOGIN not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -2632,7 +2632,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq 'END_DOMAIN' || $field[0] eq "${xmleb}END_DOMAIN" || ! $_); - if ($field[0] ne 'END_DOMAIN' && $field[0] ne "${xmleb}END_DOMAIN") { error("History file \"$filetoread\" is corrupted (End of section DOMAIN not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -2660,7 +2660,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq 'END_SESSION' || $field[0] eq "${xmleb}END_SESSION" || ! $_); - if ($field[0] ne 'END_SESSION' && $field[0] ne "${xmleb}END_SESSION") { error("History file \"$filetoread\" is corrupted (End of section SESSION not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -2689,7 +2689,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq 'END_OS' || $field[0] eq "${xmleb}END_OS" || ! $_); - if ($field[0] ne 'END_OS' && $field[0] ne "${xmleb}END_OS") { error("History file \"$filetoread\" is corrupted (End of section OS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -2717,7 +2717,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq 'END_BROWSER' || $field[0] eq "${xmleb}END_BROWSER" || ! $_); - if ($field[0] ne 'END_BROWSER' && $field[0] ne "${xmleb}END_BROWSER") { error("History file \"$filetoread\" is corrupted (End of section BROWSER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -2745,7 +2745,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq 'END_UNKNOWNREFERER' || $field[0] eq "${xmleb}END_UNKNOWNREFERER" || ! $_); - if ($field[0] ne 'END_UNKNOWNREFERER' && $field[0] ne "${xmleb}END_UNKNOWNREFERER") { error("History file \"$filetoread\" is corrupted (End of section UNKNOWNREFERER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -2773,7 +2773,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq 'END_UNKNOWNREFERERBROWSER' || $field[0] eq "${xmleb}END_UNKNOWNREFERERBROWSER" || ! $_); - if ($field[0] ne 'END_UNKNOWNREFERERBROWSER' && $field[0] ne "${xmleb}END_UNKNOWNREFERERBROWSER") { error("History file \"$filetoread\" is corrupted (End of section UNKNOWNREFERERBROWSER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -2801,7 +2801,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq 'END_SCREENSIZE' || $field[0] eq "${xmleb}END_SCREENSIZE" || ! $_); - if ($field[0] ne 'END_SCREENSIZE' && $field[0] ne "${xmleb}END_SCREENSIZE") { error("History file \"$filetoread\" is corrupted (End of section SCREENSIZE not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -2832,7 +2832,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq 'END_ROBOT' || $field[0] eq "${xmleb}END_ROBOT" || ! $_); - if ($field[0] ne 'END_ROBOT' && $field[0] ne "${xmleb}END_ROBOT") { error("History file \"$filetoread\" is corrupted (End of section ROBOT not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -2862,7 +2862,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq 'END_WORMS' || $field[0] eq "${xmleb}END_WORMS" || ! $_); - if ($field[0] ne 'END_WORMS' && $field[0] ne "${xmleb}END_WORMS") { error("History file \"$filetoread\" is corrupted (End of section WORMS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -2892,7 +2892,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq 'END_EMAILSENDER' || $field[0] eq "${xmleb}END_EMAILSENDER" || ! $_); - if ($field[0] ne 'END_EMAILSENDER' && $field[0] ne "${xmleb}END_EMAILSENDER") { error("History file \"$filetoread\" is corrupted (End of section EMAILSENDER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -2922,7 +2922,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq 'END_EMAILRECEIVER' || $field[0] eq "${xmleb}END_EMAILRECEIVER" || ! $_); - if ($field[0] ne 'END_EMAILRECEIVER' && $field[0] ne "${xmleb}END_EMAILRECEIVER") { error("History file \"$filetoread\" is corrupted (End of section EMAILRECEIVER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -2984,7 +2984,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq 'END_SIDER' || $field[0] eq "${xmleb}END_SIDER" || ! $_); - if ($field[0] ne 'END_SIDER' && $field[0] ne "${xmleb}END_SIDER") { error("History file \"$filetoread\" is corrupted (End of section SIDER not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -3016,7 +3016,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq 'END_FILETYPES' || $field[0] eq "${xmleb}END_FILETYPES" || ! $_); - if ($field[0] ne 'END_FILETYPES' && $field[0] ne "${xmleb}END_FILETYPES") { error("History file \"$filetoread\" is corrupted (End of section FILETYPES not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -3066,7 +3066,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq 'END_SEREFERRALS' || $field[0] eq "${xmleb}END_SEREFERRALS" || ! $_); - if ($field[0] ne 'END_SEREFERRALS' && $field[0] ne "${xmleb}END_SEREFERRALS") { error("History file \"$filetoread\" is corrupted (End of section SEREFERRALS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -3109,7 +3109,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq 'END_PAGEREFS' || $field[0] eq "${xmleb}END_PAGEREFS" || ! $_); - if ($field[0] ne 'END_PAGEREFS' && $field[0] ne "${xmleb}END_PAGEREFS") { error("History file \"$filetoread\" is corrupted (End of section PAGEREFS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -3173,7 +3173,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq 'END_SEARCHWORDS' || $field[0] eq "${xmleb}END_SEARCHWORDS" || ! $_); - if ($field[0] ne 'END_SEARCHWORDS' && $field[0] ne "${xmleb}END_SEARCHWORDS") { error("History file \"$filetoread\" is corrupted (End of section SEARCHWORDS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -3210,7 +3210,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq 'END_KEYWORDS' || $field[0] eq "${xmleb}END_KEYWORDS" || ! $_); - if ($field[0] ne 'END_KEYWORDS' && $field[0] ne "${xmleb}END_KEYWORDS") { error("History file \"$filetoread\" is corrupted (End of section KEYWORDS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -3239,7 +3239,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq 'END_ERRORS' || $field[0] eq "${xmleb}END_ERRORS" || ! $_); - if ($field[0] ne 'END_ERRORS' && $field[0] ne "${xmleb}END_ERRORS") { error("History file \"$filetoread\" is corrupted (End of section ERRORS not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -3271,7 +3271,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq "END_SIDER_$code" || $field[0] eq "${xmleb}END_SIDER_$code" || ! $_); - if ($field[0] ne "END_SIDER_$code" && $field[0] ne "${xmleb}END_SIDER_$code") { error("History file \"$filetoread\" is corrupted (End of section SIDER_$code not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -3304,7 +3304,7 @@ - } - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq "END_EXTRA_$extranum" || $field[0] eq "${xmleb}END_EXTRA_$extranum" || ! $_); - if ($field[0] ne "END_EXTRA_$extranum" && $field[0] ne "${xmleb}END_EXTRA_$extranum") { error("History file \"$filetoread\" is corrupted (End of section EXTRA_$extranum not found).\nRestore a recent backup of this file (data for this month will be restored to backup date), remove it (data for month will be lost), or remove the corrupted section in file (data for at least this section will be lost).","","",1); } -@@ -3352,7 +3352,7 @@ - do { - $_=; - chomp $_; s/\r//; -- @field=split(/\s+/,($readxml?CleanFromTags($_):$_)); $countlines++; -+ @field=split(/\s+/,($readxml?XMLDecodeFromHisto($_):$_)); $countlines++; - } - until ($field[0] eq "END_PLUGIN_$pluginname" || $field[0] eq "${xmleb}END_PLUGIN_$pluginname" || ! $_); - } -@@ -3811,13 +3811,13 @@ - $keysinkeylist{$_}=1; - my $newkey=$_; - $newkey =~ s/([^:])\/\//$1\//g; # Because some targeted url were taped with 2 / (Ex: //rep//file.htm). We must keep http://rep/file.htm -- print HISTORYTMP "${xmlrb}$newkey${xmlrs}".int($_url_p{$_}||0)."${xmlrs}".int($_url_k{$_}||0)."${xmlrs}".int($_url_e{$_}||0)."${xmlrs}".int($_url_x{$_}||0)."${xmlre}\n"; -+ print HISTORYTMP "${xmlrb}".XMLEncodeForHisto($newkey)."${xmlrs}".int($_url_p{$_}||0)."${xmlrs}".int($_url_k{$_}||0)."${xmlrs}".int($_url_e{$_}||0)."${xmlrs}".int($_url_x{$_}||0)."${xmlre}\n"; - } - foreach (keys %_url_p) { - if ($keysinkeylist{$_}) { next; } - my $newkey=$_; - $newkey =~ s/([^:])\/\//$1\//g; # Because some targeted url were taped with 2 / (Ex: //rep//file.htm). We must keep http://rep/file.htm -- print HISTORYTMP "${xmlrb}$newkey ".int($_url_p{$_}||0)."${xmlrs}".int($_url_k{$_}||0)."${xmlrs}".int($_url_e{$_}||0)."${xmlrs}".int($_url_x{$_}||0)."${xmlre}\n"; -+ print HISTORYTMP "${xmlrb}".XMLEncodeForHisto($newkey)."${xmlrs}".int($_url_p{$_}||0)."${xmlrs}".int($_url_k{$_}||0)."${xmlrs}".int($_url_e{$_}||0)."${xmlrs}".int($_url_x{$_}||0)."${xmlre}\n"; - } - print HISTORYTMP "${xmleb}END_SIDER${xmlee}\n"; - } -@@ -4340,7 +4340,8 @@ - } - - #------------------------------------------------------------------------------ --# Function: Transforms spaces into %20 and special chars by entities as needed in XML/XHTML -+# Function: Transforms spaces into %20 and special chars by HTML entities as needed in XML/XHTML -+# Decoding is done by XMLDecodeFromHisto - # Parameters: stringtoencode - # Return: encodedstring - #------------------------------------------------------------------------------ -@@ -4348,6 +4349,7 @@ - my $string = shift; - $string =~ s/\s/%20/g; - if ($BuildHistoryFormat ne 'xml') { return $string; } -+ $string =~ s/=/%3d/g; - $string =~ s/&/&/g; - $string =~ s//>/g; -@@ -4445,10 +4447,16 @@ - # Output: None - # Return: decodedstring - #------------------------------------------------------------------------------ --sub CleanFromTags { -+sub XMLDecodeFromHisto { - my $stringtoclean=shift; - $stringtoclean =~ s/$regclean1/ /g; # Replace or with space -- $stringtoclean =~ s/$regclean2//g; # Remove -+ $stringtoclean =~ s/$regclean2//g; # Remove others -+ $stringtoclean =~ s/%3d/=/g; -+ $stringtoclean =~ s/&/&/g; -+ $stringtoclean =~ s/<//g; -+ $stringtoclean =~ s/"/\"/g; -+ $stringtoclean =~ s/'/\'/g; - return $stringtoclean; - } - diff --git a/awstats.README.SELinux b/awstats.README.SELinux deleted file mode 100644 index efb6ff4..0000000 --- a/awstats.README.SELinux +++ /dev/null @@ -1,8 +0,0 @@ -========================== -SELinux support in AWStats -========================== - -SELinux support for AWStats used to be provided by this package, but is now -included in the main SELinux policy. This package is only there to help you -move to the upstream module. -You can now safely remove it diff --git a/awstats.spec b/awstats.spec index 83c1d4e..e49be77 100644 --- a/awstats.spec +++ b/awstats.spec @@ -1,27 +1,23 @@ Name: awstats -Version: 6.7 -Release: 3%{?dist} +Version: 6.8 +Release: 1%{?dist} Summary: Advanced Web Statistics License: GPLv2 Group: Applications/Internet URL: http://awstats.sourceforge.net Source0: http://dl.sf.net/awstats/awstats-%{version}.tar.gz #Source0: http://awstats.sourceforge.net/files/awstats-6.6.tar.gz -Source1: awstats.README.SELinux - -# Fix pb in xml output for history files -# http://awstats.cvs.sourceforge.net/awstats/awstats/wwwroot/cgi-bin/awstats.pl?r1=1.892&r2=1.894&view=patch -Patch0: awstats-6.7-xmlhistory.patch BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildRequires: recode Requires: perl Requires(post): perl Requires(postun): /sbin/service ## SELinux policy is now included upstream -#Obsoletes: awstats-selinux <= 6.7-2 -#Provides: awstats-selinux = %{version}-%{release} +Obsoletes: awstats-selinux < 6.8-1 +Provides: awstats-selinux = %{version}-%{release} %description @@ -41,30 +37,17 @@ With the default configuration, the statistics are available: http://localhost/awstats/awstats.pl -%package selinux -Summary: SELinux support for Awstats -Group: Applications/Internet -Requires: %{name} = %{version} -Requires(postun): policycoreutils, selinux-policy - -%description selinux -This package helps moving to the upstream SELinux module. - - %prep %setup -q -# No backup or it will be installed -#%%patch0 -p0 -b .xmlhistory -%patch0 -p0 # Fix style sheets. perl -pi -e 's,/icon,/awstatsicons,g' wwwroot/css/* # Fix some bad file permissions here for convenience. chmod -x tools/httpd_conf find tools/xslt -type f | xargs chmod -x # Remove \r in conf file (file written on MS Windows) -perl -pi -e 's/\r//g' tools/httpd_conf tools/logresolvemerge.pl -# SELinux README -cp -a %{SOURCE1} README.SELinux +perl -pi -e 's/\r//g' docs/COPYING.TXT docs/LICENSE.TXT docs/pad_awstats.xml docs/awstats_changelog.txt docs/styles.css tools/httpd_conf tools/logresolvemerge.pl tools/awstats_exportlib.pl tools/awstats_buildstaticpages.pl tools/maillogconvert.pl tools/urlaliasbuilder.pl wwwroot/cgi-bin/awredir.pl +# Encoding +recode ISO-8859-1..UTF-8 docs/awstats_changelog.txt %install @@ -150,17 +133,6 @@ if [ $1 -ne 0 ]; then /sbin/service httpd condrestart >/dev/null 2>&1 fi -%post selinux -if selinuxenabled; then - # Replace the module by the upstream one - . /etc/selinux/config 2>/dev/null || : - semodule -i %{_datadir}/selinux/$SELINUXTYPE/%{name}.pp 2>/dev/null || : - # relabel files - fixfiles -R %{name} restore || : - # relabel data - restorecon -R %{_localstatedir}/lib/%{name} || : -fi - %files %defattr(-,root,root,755) @@ -184,12 +156,11 @@ fi %{_datadir}/%{name}/wwwroot/icon %{_datadir}/%{name}/wwwroot/js -%files selinux -%defattr(644, root, root, 755) -%doc README.SELinux - %changelog +* Mon Jul 21 2008 Aurelien Bompard 6.8-1 +- version 6.8 + * Fri Mar 14 2008 Aurelien Bompard 6.7-3 - SELinux policy is included upstream - Fix cron job (bug 435101) diff --git a/sources b/sources index 89dc12a..bb02ebc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -512cd146247eb178ef023c924f7bb766 awstats-6.7.tar.gz +1a35d5a2ca29b31dabd650f3e5f173e9 awstats-6.8.tar.gz