retitle 692874 RFS: liferea/1.8.6-1.1 [NMU]
thanks

Updated nmudiff
diff -Nru liferea-1.8.6/debian/changelog liferea-1.8.6/debian/changelog
--- liferea-1.8.6/debian/changelog	2012-07-01 05:45:40.000000000 +0800
+++ liferea-1.8.6/debian/changelog	2012-11-10 21:06:13.000000000 +0800
@@ -1,3 +1,22 @@
+liferea (1.8.6-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fixed crash when dragging Google Reader feeds to parent node. 
+    (Closes: #692526)
+  * Fixed crash when removing folders in Google Reader feeds. (Closes: #692525)
+  * Fixed crash when opening empty links in feeds. (Closes: #692272)
+  * Fixed crash when network online status changes. (Closes: #692270)
+  * Fixed bug where web browser doesn't launch or the wrong web browser is 
+    launched. (Closes: #668197)
+  * Fixed bug where user's desktop was spammed with notifications about 
+    Google Reader feeds that have already been read. (Closes: #692007)
+  * Replaced build-depends on transitional package libwebkit-dev with 
+    libwebkitgtk-dev (Closes: #677749)
+  * Added hardening-wrapper since liferea has a parser and should be 
+    built with hardening.  (Closes: #692527)
+
+ -- David Smith <sidic...@gmail.com>  Sat, 10 Nov 2012 10:43:14 +0800
+
 liferea (1.8.6-1) unstable; urgency=low
 
   * Fixes ever growing temporary DB files. (patch by Sven Hartge)
diff -Nru liferea-1.8.6/debian/control liferea-1.8.6/debian/control
--- liferea-1.8.6/debian/control	2012-07-01 05:38:09.000000000 +0800
+++ liferea-1.8.6/debian/control	2012-11-10 21:04:41.000000000 +0800
@@ -15,14 +15,15 @@
                libglade2-dev,
                libgtk2.0-dev (>= 2.18.0),
                libglib2.0-dev (>= 2.24.0),
-               libwebkit-dev (>= 1.2.2),
+               libwebkitgtk-dev (>= 1.8.1),
                intltool,
                libicu-dev,
                libx11-dev,
                dh-autoreconf,
                libice-dev,
                libunique-dev,
-               libjson-glib-dev	      
+               libjson-glib-dev,
+	       hardening-wrapper	      
 Standards-Version: 3.9.3
 Homepage: http://liferea.sourceforge.net/
 Vcs-Browser: http://git.debian.org/?p=collab-maint/liferea.git
diff -Nru liferea-1.8.6/debian/patches/fix-browser-selections liferea-1.8.6/debian/patches/fix-browser-selections
--- liferea-1.8.6/debian/patches/fix-browser-selections	1970-01-01 08:00:00.000000000 +0800
+++ liferea-1.8.6/debian/patches/fix-browser-selections	2012-11-10 20:04:47.000000000 +0800
@@ -0,0 +1,35 @@
+Patch by David Smith <sidic...@gmail.com>
+Fixed a bug where web browser doesn't launch due to not 
+having gnome desktop installed, or the wrong web browser is 
+launched due to not having an appropriate fallback.
+Posted by him to #668197
+Last-Update 2012-11-07
+
+--- a/src/browser.c
++++ b/src/browser.c
+@@ -137,7 +137,7 @@
+ 		}
+ 
+ 		if (fallback && !cmd)	/* Last fallback: first browser default */
+-			cmd = browsers[0].defaultplace;
++			cmd = browsers[6].defaultplace;
+ 	}
+ 	g_free (libname);
+ 		
+@@ -244,6 +244,7 @@
+ 	struct browser	*browser;
+ 	gchar		*cmd = NULL;
+ 	gboolean	done = FALSE;	
++	gchar	*libname;
+ 	
+ 	g_assert (uri != NULL);
+ 	
+@@ -256,6 +257,8 @@
+ 			g_free (cmd);
+ 		} else {
+ 			/* the "default" browser has no command to use the GTK launch mechanism */
++			conf_get_str_value (BROWSER_ID, &libname);
++			if (g_str_equal (libname, "default"))
+ 			done = gtk_show_uri (NULL, uri, 0, NULL);
+ 		}
+ 	}
diff -Nru liferea-1.8.6/debian/patches/fix-crash-in-empty-launch-url liferea-1.8.6/debian/patches/fix-crash-in-empty-launch-url
--- liferea-1.8.6/debian/patches/fix-crash-in-empty-launch-url	1970-01-01 08:00:00.000000000 +0800
+++ liferea-1.8.6/debian/patches/fix-crash-in-empty-launch-url	2012-11-10 20:04:47.000000000 +0800
@@ -0,0 +1,36 @@
+From 31fced473a8351749405fae99872556059b308ae Mon Sep 17 00:00:00 2001
+From: Matthias Maennich <matth...@maennich.net>
+Date: Wed, 15 Aug 2012 00:06:29 +0200
+Subject: [PATCH] fix crash in liferea_webkit_launch_url(...) for empty links
+ in feeds
+
+in case of empty links in feeds liferea crashed with the
+following backtrace:
+  #0 in __strstr_sse42 () from /lib/libc.so.6
+  #1 in liferea_webkit_launch_url (scrollpane=<>, url=0x0) at webkit.c:515
+  #2 in itemlist_selection_changed (item=item@entry=<>) at itemlist.c:599
+
+this patch fixes the crash with showing the default itemview content
+instead of trying to launch the browser with the non-existing URL
+Reported-by: Matthias Maennich <matth...@maennich.net>
+
+--- a/src/itemlist.c
++++ b/src/itemlist.c
+@@ -599,8 +599,15 @@
+ 			if (node->loadItemLink) {
+ 				gchar* link = item_make_link (item);
+ 
+-				itemview_launch_URL (link, TRUE /* force internal */);
+-				g_free (link);
++				// in case of an empty link entry the above results in link==NULL
++				// so, only show the link if exists
++				if (link) {
++					itemview_launch_URL (link, TRUE /* force internal */);
++					g_free (link);
++				} else { // else show the normal itemview content
++					itemview_select_item(item);
++					itemview_update();
++				}
+ 			} else {
+ 				itemview_select_item (item);
+ 				itemview_update ();
diff -Nru liferea-1.8.6/debian/patches/fix-crash-when-dragging-feeds-outside-google-reader liferea-1.8.6/debian/patches/fix-crash-when-dragging-feeds-outside-google-reader
--- liferea-1.8.6/debian/patches/fix-crash-when-dragging-feeds-outside-google-reader	1970-01-01 08:00:00.000000000 +0800
+++ liferea-1.8.6/debian/patches/fix-crash-when-dragging-feeds-outside-google-reader	2012-11-10 20:04:47.000000000 +0800
@@ -0,0 +1,21 @@
+From 5f245fe87e8f32ff0e13c2e94addaf6032b806c4 Mon Sep 17 00:00:00 2001
+From: Lars Windolf <lars.lind...@gmail.com>
+Date: Mon, 30 Jul 2012 23:26:01 +0200
+Subject: [PATCH] Fixes SF #2855990: Crash when dragging Google Reader feeds outside Google Reader. This is now prevented. (reported by algnod)
+
+--- a/src/ui/ui_dnd.c
++++ b/src/ui/ui_dnd.c
+@@ -116,6 +116,13 @@
+ 	if (gtk_tree_model_get_iter (GTK_TREE_MODEL (model), &iter, src_path)) {
+ 		gtk_tree_model_get (GTK_TREE_MODEL (model), &iter, FS_PTR, &sourceNode, -1);
+ 
++		g_assert (sourceNode);
++
++		/* Never drop into another node source as this arises to many problems
++		   (e.g. remote sync, different subscription type, e.g. SF #2855990) */
++		if (NODE_SOURCE_TYPE (targetNode) != NODE_SOURCE_TYPE (sourceNode))
++			return FALSE;
++
+ 		if (IS_FOLDER(sourceNode) && !(NODE_SOURCE_TYPE (targetNode)->capabilities & NODE_SOURCE_CAPABILITY_HIERARCHIC_FEEDLIST))
+ 			return FALSE;
+ 	}
diff -Nru liferea-1.8.6/debian/patches/fix-crash-when-online-status-changes liferea-1.8.6/debian/patches/fix-crash-when-online-status-changes
--- liferea-1.8.6/debian/patches/fix-crash-when-online-status-changes	1970-01-01 08:00:00.000000000 +0800
+++ liferea-1.8.6/debian/patches/fix-crash-when-online-status-changes	2012-11-10 20:04:47.000000000 +0800
@@ -0,0 +1,25 @@
+From 41d21ec9d844ddf62b8e71b0476ab4cffca32654 Mon Sep 17 00:00:00 2001
+From: Yanko Kaneti <yan...@declera.com>
+Date: Fri, 14 Sep 2012 16:13:00 +0300
+Subject: [PATCH] Fix crash when network online status changes
+
+From Fedora bug https://bugzilla.redhat.com/show_bug.cgi?id=857348 :
+"liferea frequently crashes when manipulating htmlviews (opening/closing
+new tabs) while the network online status changes. This is caused
+because the signal notifying online status is not properly disconnected
+when the htmlview is removed."
+---
+ src/ui/liferea_htmlview.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/src/ui/liferea_htmlview.c
++++ b/src/ui/liferea_htmlview.c
+@@ -77,6 +77,8 @@
+ static void
+ liferea_htmlview_finalize (GObject *object)
+ {
++	g_signal_handlers_disconnect_by_data (network_monitor_get (), object);
++
+ 	G_OBJECT_CLASS (parent_class)->finalize (object);
+ }
+ 
diff -Nru liferea-1.8.6/debian/patches/fix-crash-when-removing-google-reader-folders liferea-1.8.6/debian/patches/fix-crash-when-removing-google-reader-folders
--- liferea-1.8.6/debian/patches/fix-crash-when-removing-google-reader-folders	1970-01-01 08:00:00.000000000 +0800
+++ liferea-1.8.6/debian/patches/fix-crash-when-removing-google-reader-folders	2012-11-11 00:16:07.000000000 +0800
@@ -0,0 +1,157 @@
+Debian Bug# 692525. Fixes crash when removing folders in Google Reader feeds.
+
+From 739a294f7c045c37e9dbce97455a71cb2357e068 Mon Sep 17 00:00:00 2001
+From: Lars Windolf <lars.lind...@gmail.com>
+Date: Fri, 5 Oct 2012 12:09:42 +0200
+Subject: [PATCH] Fixes SF #3572660: crash in google_source_remove_node (reported by Yanko Kaneti)
+
+--- a/src/fl_sources/default_source.c
++++ b/src/fl_sources/default_source.c
+@@ -210,6 +210,8 @@
+ 	.description		= "The default feed list source. Should never be added manually. If you see this then something went wrong!",
+ 	.capabilities		= NODE_SOURCE_CAPABILITY_IS_ROOT |
+ 				  NODE_SOURCE_CAPABILITY_HIERARCHIC_FEEDLIST |
++	                          NODE_SOURCE_CAPABILITY_ADD_FEED |
++	                          NODE_SOURCE_CAPABILITY_ADD_FOLDER |
+ 				  NODE_SOURCE_CAPABILITY_WRITABLE_FEEDLIST,
+ 	.source_type_init	= default_source_init,
+ 	.source_type_deinit	= default_source_deinit,
+--- a/src/fl_sources/node_source.h
++++ b/src/fl_sources/node_source.h
+@@ -50,11 +50,12 @@
+ 
+ enum {
+ 	NODE_SOURCE_CAPABILITY_IS_ROOT			= (1<<0),	/**< flag only for default feed list source */
+-	NODE_SOURCE_CAPABILITY_MULTI_INSTANCES		= (1<<1),	/**< allows multiple source instances */
+-	NODE_SOURCE_CAPABILITY_DYNAMIC_CREATION		= (1<<2),	/**< feed list source is user created */
+-	NODE_SOURCE_CAPABILITY_WRITABLE_FEEDLIST	= (1<<3),	/**< the feed list tree of the source can be changed */
+-	NODE_SOURCE_CAPABILITY_HIERARCHIC_FEEDLIST	= (1<<4),	/**< the feed list tree of the source can have hierarchic folders */
+-	NODE_SOURCE_CAPABILITY_ITEM_STATE_SYNC		= (1<<5)	/**< the item state can and should be sync'ed with remote */
++	NODE_SOURCE_CAPABILITY_DYNAMIC_CREATION		= (1<<1),	/**< feed list source is user created */
++	NODE_SOURCE_CAPABILITY_WRITABLE_FEEDLIST	= (1<<2),	/**< the feed list tree of the source can be changed */
++	NODE_SOURCE_CAPABILITY_ADD_FEED			= (1<<3),	/**< feeds can be added to the source */
++	NODE_SOURCE_CAPABILITY_ADD_FOLDER		= (1<<4),	/**< folders can be added to the source */
++	NODE_SOURCE_CAPABILITY_HIERARCHIC_FEEDLIST	= (1<<5),	/**< the feed list tree of the source can have hierarchic folders */
++	NODE_SOURCE_CAPABILITY_ITEM_STATE_SYNC		= (1<<6)	/**< the item state can and should be sync'ed with remote */
+ };
+ 
+ /** feed list node source type */
+--- a/src/node.c
++++ b/src/node.c
+@@ -494,6 +494,28 @@
+ 	return baseUrl;
+ }
+ 
++gboolean
++node_can_add_child_feed (nodePtr node)
++{
++	g_assert (node->source->root);
++
++	if (!(NODE_TYPE (node->source->root)->capabilities & NODE_CAPABILITY_ADD_CHILDS))
++		return FALSE;
++
++	return (NODE_SOURCE_TYPE (node)->capabilities & NODE_SOURCE_CAPABILITY_ADD_FEED);
++}
++
++gboolean
++node_can_add_child_folder (nodePtr node)
++{
++	g_assert (node->source->root);
++
++	if (!(NODE_TYPE (node->source->root)->capabilities & NODE_CAPABILITY_ADD_CHILDS))
++		return FALSE;
++
++	return (NODE_SOURCE_TYPE (node)->capabilities & NODE_SOURCE_CAPABILITY_ADD_FOLDER);
++}
++
+ /* node children iterating interface */
+ 
+ void
+--- a/src/node.h
++++ b/src/node.h
+@@ -355,6 +355,24 @@
+  */
+ const gchar * node_get_base_url(nodePtr node);
+ 
++/**
++ * Query wether a feed be added to the given node.
++ *
++ * @param node	the node
++ *
++ * @returns TRUE if a feed can be added
++ */
++gboolean node_can_add_child_feed (nodePtr node);
++
++/**
++ * Query wether a folder be added to the given node.
++ *
++ * @param node	the node
++ *
++ * @returns TRUE if a folder can be added
++ */
++gboolean node_can_add_child_folder (nodePtr node);
++
+ /* child nodes iterating interface */
+ 
+ typedef void 	(*nodeActionFunc)	(nodePtr node);
+--- a/src/ui/popup_menu.c
++++ b/src/ui/popup_menu.c
+@@ -262,14 +262,15 @@
+ ui_popup_node_menu (nodePtr node, gboolean validSelection, guint button, guint32 activate_time)
+ {
+ 	GtkWidget	*menu;
+-	gboolean	writeableFeedlist, isRoot, isHierarchic;
++	gboolean	writeableFeedlist, isRoot, isHierarchic, addChildren;
+ 
+ 	menu = gtk_menu_new ();
+ 	
+ 	if (node->parent) {
+ 		writeableFeedlist = NODE_SOURCE_TYPE (node->parent->source->root)->capabilities & NODE_SOURCE_CAPABILITY_WRITABLE_FEEDLIST;
+-		isRoot = NODE_SOURCE_TYPE (node->parent->source->root)->capabilities & NODE_SOURCE_CAPABILITY_IS_ROOT;
++		isRoot = NODE_SOURCE_TYPE (node->source->root)->capabilities & NODE_SOURCE_CAPABILITY_IS_ROOT;
+ 		isHierarchic = NODE_SOURCE_TYPE (node->parent->source->root)->capabilities & NODE_SOURCE_CAPABILITY_HIERARCHIC_FEEDLIST;
++		addChildren = NODE_TYPE (node->source->root)->capabilities & NODE_CAPABILITY_ADD_CHILDS;
+ 	} else {
+ 		/* if we have no parent then we have the root node... */
+ 		writeableFeedlist = TRUE;
+@@ -287,7 +288,7 @@
+ 	}
+ 
+ 	if (writeableFeedlist) {
+-		if (NODE_TYPE (node->source->root)->capabilities & NODE_CAPABILITY_ADD_CHILDS) {
++		if (addChildren) {
+ 			GtkWidget	*item;
+ 			GtkWidget	*submenu;
+ 
+@@ -295,9 +296,10 @@
+ 
+ 			item = ui_popup_add_menuitem (menu, _("_New"), NULL, NULL, NULL, 0);
+ 
+-			ui_popup_add_menuitem (submenu, _("New _Subscription..."), ui_popup_add_feed, NULL, NULL, 0);
++			if (node_can_add_child_feed (node))
++				ui_popup_add_menuitem (submenu, _("New _Subscription..."), ui_popup_add_feed, NULL, NULL, 0);
+ 			
+-			if (isHierarchic)
++			if (node_can_add_child_folder (node))
+ 				ui_popup_add_menuitem (submenu, _("New _Folder..."), ui_popup_add_folder, NULL, NULL, 0);
+ 				
+ 			if (isRoot) {
+@@ -309,7 +311,7 @@
+ 			gtk_menu_item_set_submenu (GTK_MENU_ITEM(item), submenu);
+ 		}
+ 		
+-		if (node->children) {
++		if (isRoot && node->children) {
+ 			gtk_menu_shell_append (GTK_MENU_SHELL(menu), gtk_separator_menu_item_new());
+ 			ui_popup_add_menuitem (menu, _("Sort Feeds"), ui_popup_sort_feeds, node, GTK_STOCK_SORT_ASCENDING, 0);
+ 		}
+--- a/src/fl_sources/google_source.c
++++ b/src/fl_sources/google_source.c
+@@ -360,6 +360,7 @@
+ 	   "present your Google Reader subscriptions, and will synchronize your feed list and reading lists."),
+ 	.capabilities        = NODE_SOURCE_CAPABILITY_DYNAMIC_CREATION | 
+ 	                       NODE_SOURCE_CAPABILITY_WRITABLE_FEEDLIST |
++	                       NODE_SOURCE_CAPABILITY_ADD_FEED |
+ 	                       NODE_SOURCE_CAPABILITY_ITEM_STATE_SYNC,
+ 	.source_type_init    = google_source_init,
+ 	.source_type_deinit  = google_source_deinit,
diff -Nru liferea-1.8.6/debian/patches/fix-google-reader-notifications liferea-1.8.6/debian/patches/fix-google-reader-notifications
--- liferea-1.8.6/debian/patches/fix-google-reader-notifications	1970-01-01 08:00:00.000000000 +0800
+++ liferea-1.8.6/debian/patches/fix-google-reader-notifications	2012-11-10 20:04:48.000000000 +0800
@@ -0,0 +1,18 @@
+Patch by David Smith <sidic...@gmail.com>
+Prevent Google Reader feeds from receiving "unread" status from 
+google reader if the local status is "read".  This fixes a bug 
+where user's desktop was spammed with notifications about 
+google reader feeds that have already been read. 
+Posted by him to: #692007
+Last-Update: 2012-11-05
+
+--- a/src/itemset.c
++++ b/src/itemset.c
+@@ -168,6 +168,7 @@
+ 				   which means online accounts we sync against, but not normal
+ 				   online feeds where items have no read status. */
+ 				if (allowStateChanges) {
++					if ((!oldItem->readStatus) && (newItem->readStatus))
+ 					oldItem->readStatus = newItem->readStatus;
+ 					oldItem->flagStatus = newItem->flagStatus;
+ 				}
diff -Nru liferea-1.8.6/debian/patches/series liferea-1.8.6/debian/patches/series
--- liferea-1.8.6/debian/patches/series	2012-02-27 09:54:47.000000000 +0800
+++ liferea-1.8.6/debian/patches/series	2012-11-10 20:04:48.000000000 +0800
@@ -1,3 +1,9 @@
 www-browser
 debian-example-feeds
 libtool-dont-rearange-as-needed
+fix-browser-selections
+fix-crash-in-empty-launch-url
+fix-crash-when-dragging-feeds-outside-google-reader
+fix-crash-when-online-status-changes
+fix-crash-when-removing-google-reader-folders
+fix-google-reader-notifications
diff -Nru liferea-1.8.6/debian/rules liferea-1.8.6/debian/rules
--- liferea-1.8.6/debian/rules	2012-02-27 09:54:47.000000000 +0800
+++ liferea-1.8.6/debian/rules	2012-11-10 21:04:04.000000000 +0800
@@ -5,6 +5,7 @@
 CFLAGS += -g -O$(if $(findstring noopt,$(DEB_BUILD_OPTIONS)),0,2)
 LDFLAGS += "-Wl,--as-needed"
 export LIBS=-lX11 -lICE
+export DEB_BUILD_HARDENING=1
 
 # These are used for cross-compiling and for saving the configure script
 # from having to guess our platform (since we know it already)

Reply via email to