rpms/awstats/F-7 awstats-6.7-xmlhistory.patch, NONE, 1.1 .cvsignore, 1.6, 1.7 awstats.spec, 1.18, 1.19 sources, 1.10, 1.11

Aurelien Bompard (abompard) fedora-extras-commits at redhat.com
Mon Aug 13 11:47:36 UTC 2007


Author: abompard

Update of /cvs/pkgs/rpms/awstats/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28638/F-7

Modified Files:
	.cvsignore awstats.spec sources 
Added Files:
	awstats-6.7-xmlhistory.patch 
Log Message:
* Mon Aug 13 2007 Aurelien Bompard <abompard at fedoraproject.org> 6.7-1
- split SElinux bits in the -selinux package (bug 250637)
- use an SElinux module instead of semanage
- update to version 6.7


awstats-6.7-xmlhistory.patch:

--- NEW FILE awstats-6.7-xmlhistory.patch ---
--- 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 @@
 					}
 					$_=<HISTORY>;
 					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 @@
 					}
 					$_=<HISTORY>;
 					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 @@
 					}
 					$_=<HISTORY>;
 					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 @@
 					}
 					$_=<HISTORY>;
 					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 @@
 					}
 					$_=<HISTORY>;
 					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 @@
 					}
 					$_=<HISTORY>;
 					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 @@
 					}
 					$_=<HISTORY>;
 					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 @@
 					}
 					$_=<HISTORY>;
 					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 @@
 					}
 					$_=<HISTORY>;
 					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 @@
 					}
 					$_=<HISTORY>;
 					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 @@
 					}
 					$_=<HISTORY>;
 					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 @@
 					}
 					$_=<HISTORY>;
 					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 @@
 					}
 					$_=<HISTORY>;
 					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 @@
 					}
 					$_=<HISTORY>;
 					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 @@
 					}
 					$_=<HISTORY>;
 					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 @@
 					}
 					$_=<HISTORY>;
 					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 @@
 					}
 					$_=<HISTORY>;
 					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 @@
 					}
 					$_=<HISTORY>;
 					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 @@
 					}
 					$_=<HISTORY>;
 					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 @@
 					}
 					$_=<HISTORY>;
 					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 @@
 					}
 					$_=<HISTORY>;
 					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 @@
 					}
 					$_=<HISTORY>;
 					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 @@
 					}
 					$_=<HISTORY>;
 					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 @@
 					}
 					$_=<HISTORY>;
 					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 @@
 					}
 					$_=<HISTORY>;
 					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 @@
 					}
 					$_=<HISTORY>;
 					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 @@
 						}
 						$_=<HISTORY>;
 						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 @@
 						}
 						$_=<HISTORY>;
 						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 {
 						$_=<HISTORY>;
 						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;
 	$string =~ s/>/>/g;
@@ -4445,10 +4447,16 @@
 # Output:       None
 # Return:		decodedstring
 #------------------------------------------------------------------------------
-sub CleanFromTags {
+sub XMLDecodeFromHisto {
 	my $stringtoclean=shift;
 	$stringtoclean =~ s/$regclean1/ /g;	# Replace <recnb> or </td> with space
-	$stringtoclean =~ s/$regclean2//g;	# Remove <xxx>
+	$stringtoclean =~ s/$regclean2//g;	# Remove others <xxx>
+	$stringtoclean =~ s/%3d/=/g;
+	$stringtoclean =~ s/&/&/g;
+	$stringtoclean =~ s/</</g;
+	$stringtoclean =~ s/>/>/g;
+    $stringtoclean =~ s/"/\"/g;
+    $stringtoclean =~ s/'/\'/g;
 	return $stringtoclean;
 }
 


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/awstats/F-7/.cvsignore,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- .cvsignore	7 May 2006 08:17:10 -0000	1.6
+++ .cvsignore	13 Aug 2007 11:47:04 -0000	1.7
@@ -1 +1 @@
-awstats-6.6.tar.gz
+awstats-6.7.tar.gz


Index: awstats.spec
===================================================================
RCS file: /cvs/pkgs/rpms/awstats/F-7/awstats.spec,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- awstats.spec	7 Jan 2007 21:24:42 -0000	1.18
+++ awstats.spec	13 Aug 2007 11:47:04 -0000	1.19
@@ -1,19 +1,25 @@
 Name:       awstats
-Version:    6.6
+Version:    6.7
 Release:    1%{?dist}
 Summary:    Advanced Web Statistics
 License:    GPL
 Group:      Applications/Internet
 URL:        http://awstats.sourceforge.net
-Source0:    http://dl.sf.net/awstats/awstats-6.6.tar.gz
+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: checkpolicy, selinux-policy-devel
 Requires:   httpd
 Requires:   perl
-Requires(post): perl, policycoreutils
-Requires(postun): /sbin/service, policycoreutils
+Requires(post): perl
+Requires(postun): /sbin/service
 
 %description
 Advanced Web Statistics is a powerful and featureful tool that generates
@@ -31,9 +37,23 @@
 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(post): policycoreutils
+Requires(preun): policycoreutils
+Requires(postun): policycoreutils
+
+%description selinux
+This package adds SELinux enforcement to AWstats.
+
 
 %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.
@@ -43,6 +63,7 @@
 perl -pi -e 's/\r//g' tools/httpd_conf tools/logresolvemerge.pl
 # SELinux README
 cp -a %{SOURCE1} README.SELinux
+mkdir selinux
 
 
 %install
@@ -111,6 +132,15 @@
 # Cron job
 install -m 0755 awstats.cron $RPM_BUILD_ROOT%{_sysconfdir}/cron.hourly/%{name}
 
+# SELinux support
+cd selinux
+echo 'policy_module(%{name}, 1.0)' > %{name}.te
+echo '%{_datadir}/awstats/wwwroot/cgi-bin(/.*)? system_u:object_r:httpd_sys_script_exec_t:s0' > %{name}.fc
+echo '%{_localstatedir}/lib/awstats(/.*)? system_u:object_r:httpd_sys_script_rw_t:s0' >> %{name}.fc
+touch %{name}.if
+make -f %{_datadir}/selinux/devel/Makefile
+install -p -m 644 -D %{name}.pp $RPM_BUILD_ROOT%{_datadir}/selinux/packages/%{name}/%{name}.pp
+
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -125,27 +155,29 @@
                       ' > %{_sysconfdir}/%{name}/%{name}.`hostname`.conf || :
   fi
 fi
-### SELinux support ###
-# Set SELinux file_context
-semanage fcontext -a -t httpd_sys_script_exec_t \
-    '%{_datadir}/awstats/wwwroot/cgi-bin(/.*)?' 2>/dev/null || :
-semanage fcontext -a -t httpd_sys_script_rw_t '%{_localstatedir}/lib/awstats(/.*)?' 2>/dev/null || :
-# Actually change the context
-chcon -R -t httpd_sys_script_exec_t %{_datadir}/awstats/wwwroot/cgi-bin || :
-chcon -R -t httpd_sys_script_rw_t %{_localstatedir}/lib/awstats || :
-
 
 %postun
 if [ $1 -ne 0 ]; then
   /sbin/service httpd condrestart >/dev/null 2>&1
 fi
-# SELinux support
-if [ $1 -eq 0 ]; then
-  semanage fcontext -d -t httpd_sys_script_exec_t \
-    '%{_datadir}/awstats/wwwroot/cgi-bin(/.*)?' 2>/dev/null || :
-  semanage fcontext -d -t httpd_sys_script_rw_t '%{_localstatedir}/lib/awstats(/.*)?' 2>/dev/null || :
+
+%post selinux
+if [ "$1" -le "1" ]; then # Fist install
+    semodule -i %{_datadir}/selinux/packages/%{name}/%{name}.pp 2>/dev/null || :
+    fixfiles -R %{name} restore
 fi
 
+%preun selinux
+if [ "$1" -lt "1" ]; then # Final removal
+    semodule -r %{name} 2>/dev/null || :
+    fixfiles -R %{name} restore
+fi
+
+%postun selinux
+if [ "$1" -ge "1" ]; then # Upgrade
+    # Replaces the module if it is already loaded
+    semodule -i %{_datadir}/selinux/packages/%{name}/%{name}.pp 2>/dev/null || :
+fi
 
 
 %files
@@ -161,7 +193,7 @@
 %{_datadir}/%{name}/wwwroot/cgi-bin
 # Different defattr to fix lots of files which should not be +x.
 %defattr(644,root,root,755)
-%doc README.TXT docs/* README.SELinux
+%doc README.TXT docs/*
 %{_datadir}/%{name}/lang
 %{_datadir}/%{name}/lib
 %{_datadir}/%{name}/plugins
@@ -171,8 +203,18 @@
 %{_datadir}/%{name}/wwwroot/js
 
 
+%files selinux
+%defattr(644, root, root, 755)
+%doc README.SELinux
+%{_datadir}/selinux/packages/%{name}/%{name}.pp
+
 
 %changelog
+* Mon Aug 13 2007 Aurelien Bompard <abompard at fedoraproject.org> 6.7-1
+- split SElinux bits in the -selinux package (bug 250637)
+- use an SElinux module instead of semanage
+- update to version 6.7
+
 * Sun Jan 07 2007 Aurelien Bompard <abompard at fedoraproject.org> 6.6-1
 - version 6.6 final
 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/awstats/F-7/sources,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- sources	7 Jan 2007 21:24:42 -0000	1.10
+++ sources	13 Aug 2007 11:47:04 -0000	1.11
@@ -1 +1 @@
-38e393edb530d409fdf7f79127a7548e  awstats-6.6.tar.gz
+512cd146247eb178ef023c924f7bb766  awstats-6.7.tar.gz




More information about the fedora-extras-commits mailing list