rpms/epiphany-extensions/F-7 epiphany-extensions-fix-adblock-filtersetg-updater.patch, NONE, 1.1 epiphany-extensions.spec, 1.30, 1.31

Peter Gordon (pgordon) fedora-extras-commits at redhat.com
Mon Jul 30 08:14:17 UTC 2007


Author: pgordon

Update of /cvs/extras/rpms/epiphany-extensions/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15763

Modified Files:
	epiphany-extensions.spec 
Added Files:
	epiphany-extensions-fix-adblock-filtersetg-updater.patch 
Log Message:
Fix GNOME.org bug 452119 (crash in the filterset.g updater tool from the AdBlocker extension) via a patch from upstream SVN.

epiphany-extensions-fix-adblock-filtersetg-updater.patch:

--- NEW FILE epiphany-extensions-fix-adblock-filtersetg-updater.patch ---
--- extensions/adblock/adblock-pattern.c	2006/12/17 21:37:02	1407
+++ extensions/adblock/adblock-pattern.c	2007/07/08 09:32:03	1538
@@ -231,7 +231,7 @@
 	int size;
 	char *contents = NULL, *url = NULL;
 
-	url = g_strdup_printf ("http://www.pierceive.com/filtersetg/%s.txt", date);
+	url = g_strdup_printf ("http://www.pierceive.com/filtersetg/%s", date);
 
 	/* First, get the changelog so we can build the url pointing to the last rules */
 	if (gnome_vfs_read_entire_file (url, &size, &contents) != GNOME_VFS_OK)
@@ -246,16 +246,15 @@
 static char *
 adblock_pattern_get_filterg_date (void)
 {
-	const char *url = "http://www.pierceive.com/filtersetg/changelog.txt";
+	const char *url = "http://www.pierceive.com/filtersetg/latest.txt";
 	int size;
-	char *contents;
+	char *contents, *date;
 	char **lines;
-	char *date;
 
 	/* First, get the changelog so we can build the url pointing to the last rules */
 	if (gnome_vfs_read_entire_file (url, &size, &contents) != GNOME_VFS_OK)
 	{
-		g_warning ("Could not get changelog from filterg site");
+		g_warning ("Could not get latest.txt from filterg site");
 		return NULL;
 	}
 	lines = g_strsplit (contents, "\n", 0);
@@ -308,13 +307,22 @@
 void 
 adblock_pattern_get_filtersetg_patterns (void)
 {
-	char *date;
-	char *patterns;
+	char *date, *patterns;
 
 	date = adblock_pattern_get_filterg_date ();
+	if (date == NULL)
+	{
+		g_warning ("Could not get the last update");
+		return;
+	}	
 
 	patterns = adblock_pattern_get_filterg_patterns (date);
-
+	if (patterns == NULL)
+	{
+		g_warning ("Could not get content from last update");
+		return;
+	}
+	
 	adblock_pattern_rewrite_patterns (patterns);
 
 	g_free (date);


Index: epiphany-extensions.spec
===================================================================
RCS file: /cvs/extras/rpms/epiphany-extensions/F-7/epiphany-extensions.spec,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- epiphany-extensions.spec	18 Jul 2007 08:51:32 -0000	1.30
+++ epiphany-extensions.spec	30 Jul 2007 08:13:44 -0000	1.31
@@ -4,7 +4,7 @@
 
 Name:		epiphany-extensions
 Version:	%{ephy_major}.3
-Release:	2
+Release:	3
 Summary:	Extensions for Epiphany, the GNOME web browser
 
 License:	GPL
@@ -12,6 +12,7 @@
 URL:		http://www.gnome.org/projects/epiphany/extensions
 
 Source0:	http://ftp.gnome.org/pub/GNOME/sources/epiphany-extensions/%{ephy_major}/%{name}-%{version}.tar.bz2
+Patch0:		%{name}-fix-adblock-filtersetg-updater.patch
 
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -44,6 +45,7 @@
 
 %prep
 %setup -q
+%patch0 -p0 -b .fix-adblock-filtersetg-updater
 
 
 %build
@@ -105,6 +107,11 @@
 
 
 %changelog
+* Mon Jul 30 2007 Peter Gordon <peter at thecodergeek.com> - 2.18.3-3
+- Add a patch from upstream SVN to fix GNOME bug 452119 (crash in the
+  filterset.g updater tool from the AdBlocker extension):
+  + fix-adblock-filtersetg-updater.patch
+
 * Wed Jul 18 2007 Peter Gordon <peter at thecodergeek.com> - 2.18.3-2
 - Rebuild against new Gecko release (Firefox 2.0.0.5).
 




More information about the scm-commits mailing list