[xfburn] Fix crash when creating directory (#639804, #676086 and #851900)

Christoph Wickert cwickert at fedoraproject.org
Fri Sep 28 20:16:29 UTC 2012


commit b7febf09692e4c12e8c431dbea3804ae1c105b39
Author: Christoph Wickert <cwickert at fedoraproject.org>
Date:   Fri Sep 28 22:16:22 2012 +0200

    Fix crash when creating directory (#639804, #676086 and #851900)
    
    - Fix crash when adding lots of files (#669971)
    - Make sure desktop file validates

 xfburn-0.4.3-desktop-file.patch               |   19 +++++++++
 xfburn-0.4.3-if-with-several-statements.patch |   54 +++++++++++++++++++++++++
 xfburn-0.4.3-new-directory-bug.patch          |   50 +++++++++++++++++++++++
 xfburn.spec                                   |   22 ++++++++++
 4 files changed, 145 insertions(+), 0 deletions(-)
---
diff --git a/xfburn-0.4.3-desktop-file.patch b/xfburn-0.4.3-desktop-file.patch
new file mode 100644
index 0000000..7669b5f
--- /dev/null
+++ b/xfburn-0.4.3-desktop-file.patch
@@ -0,0 +1,19 @@
+--- xfburn-0.4.3.orig/xfburn.desktop.in	2009-08-13 01:12:26.000000000 +0200
++++ xfburn-0.4.3/xfburn.desktop.in	2012-09-28 22:12:14.840869423 +0200
+@@ -6,7 +6,7 @@
+ Exec=xfburn
+ TryExec=xfburn
+ Icon=media-cdrom
+-MimeType=application/x-cd-image
++MimeType=application/x-cd-image;
+ Terminal=false
+ Categories=X-XFCE;GTK;DiscBurning;Archiving;AudioVideo;
+ StartupNotify=true
+@@ -14,7 +14,6 @@
+ Actions=BurnImage;
+ 
+ [Desktop Action BurnImage]
+-MimeType=application/x-cd-image
+ Icon=media-cdrom
+ Exec=xfburn -i %f
+ _Name=Burn Image (xfburn)
diff --git a/xfburn-0.4.3-if-with-several-statements.patch b/xfburn-0.4.3-if-with-several-statements.patch
new file mode 100644
index 0000000..839e34f
--- /dev/null
+++ b/xfburn-0.4.3-if-with-several-statements.patch
@@ -0,0 +1,54 @@
+same as http://git.xfce.org/apps/xfburn/commit/?id=e1d6bfc2 but against 0.4.3
+
+
+diff -dur xfburn-0.4.3.orig/xfburn/xfburn-data-composition.c xfburn-0.4.3/xfburn/xfburn-data-composition.c
+--- xfburn-0.4.3.orig/xfburn/xfburn-data-composition.c	2009-12-04 08:46:43.000000000 +0100
++++ xfburn-0.4.3/xfburn/xfburn-data-composition.c	2012-09-28 21:59:01.975954901 +0200
+@@ -1075,7 +1075,9 @@
+     
+     /* ensure that we can only drop on top of folders, not files */
+     if (insertion) {
++      gdk_threads_enter ();
+       gtk_tree_model_get (model, insertion, DATA_COMPOSITION_COLUMN_TYPE, &parent_type, -1);
++      gdk_threads_leave ();
+ 
+       if (parent_type == DATA_COMPOSITION_TYPE_FILE) {
+         DBG ("Parent is file, and we're dropping into %d", position);
+@@ -1116,9 +1118,7 @@
+     } else {
+       tree_path = gtk_tree_path_new_first ();
+     }
+-    gdk_threads_leave ();
+     
+-    gdk_threads_enter ();
+     if (file_exists_on_same_level (model, tree_path, FALSE, name)) {
+       xfce_err (_("A file with the same name is already present in the composition."));
+ 
+@@ -1821,10 +1821,11 @@
+       
+       if (thread_add_file_to_list (composition, model, full_path, &iter, &iter_where_insert, position)) {
+         if (position == GTK_TREE_VIEW_DROP_INTO_OR_BEFORE 
+-            || position == GTK_TREE_VIEW_DROP_INTO_OR_AFTER)
++            || position == GTK_TREE_VIEW_DROP_INTO_OR_AFTER) {
+           gdk_threads_enter ();
+           gtk_tree_view_expand_row (GTK_TREE_VIEW (widget), priv->path_where_insert, FALSE);
+           gdk_threads_leave ();
++        }
+       }
+       
+     } else  {
+diff -dur xfburn-0.4.3.orig/xfburn/xfburn-utils.h xfburn-0.4.3/xfburn/xfburn-utils.h
+--- xfburn-0.4.3.orig/xfburn/xfburn-utils.h	2009-12-04 08:30:28.000000000 +0100
++++ xfburn-0.4.3/xfburn/xfburn-utils.h	2012-09-28 21:59:01.976954907 +0200
+@@ -27,6 +27,11 @@
+ 
+ #include "xfburn-global.h"
+ 
++/*
++#define XFBURN_GDK_ENTER() { DBG("gdk-thread-enter"); gdk_threads_enter(); }
++#define XFBURN_GDK_LEAVE() { DBG("gdk-thread-leave"); gdk_threads_leave(); }
++*/
++
+ void xfburn_busy_cursor (GtkWidget *);
+ void xfburn_default_cursor (GtkWidget *);
+ 
diff --git a/xfburn-0.4.3-new-directory-bug.patch b/xfburn-0.4.3-new-directory-bug.patch
new file mode 100644
index 0000000..a5fb82c
--- /dev/null
+++ b/xfburn-0.4.3-new-directory-bug.patch
@@ -0,0 +1,50 @@
+same as http://git.xfce.org/apps/xfburn/commit/?id=611d9158 but against 0.4.3
+
+--- xfburn-0.4.3/xfburn/xfburn-data-composition.c	2011-02-17 16:37:03.000000000 +0100
++++ xfburn-0.4.3/xfburn/xfburn-data-composition_patched.c	2011-02-17 16:40:40.000000000 +0100
+@@ -1874,26 +1874,29 @@
+           g_error ("Failed adding %s as a node to the image: code %X!", src, r);
+       }
+ 
+-      basename = g_path_get_basename (src);
++      /* Check names only for items not manually created (#613563) */
++      if (type != DATA_COMPOSITION_TYPE_DIRECTORY || src != NULL) {
++        basename = g_path_get_basename (src);
++
++        /* check if the file has been renamed */
++        if (strcmp (basename, name) != 0) {
++          /* rename the iso_node */
++          r = iso_node_set_name (node, name);
++
++          if (r == 0) {
++            /* The first string is the renamed name, the second one the original name */
++            xfce_warn (_("Duplicate filename '%s' for '%s'"), name, src);
++
++            g_free (basename);
++            g_free (name);
++            g_free (src);
+ 
+-      /* check if the file has been renamed */
+-      if (strcmp (basename, name) != 0) {
+-        /* rename the iso_node */
+-        r = iso_node_set_name (node, name);
+-
+-        if (r == 0) {
+-          /* The first string is the renamed name, the second one the original name */
+-          xfce_warn (_("Duplicate filename '%s' for '%s'"), name, src);
+-
+-          g_free (basename);
+-          g_free (name);
+-          g_free (src);
+-
+-          continue;
++            continue;
++          }
+         }
++        g_free (basename);
+       }
+ 
+-      g_free (basename);
+       g_free (name);
+       g_free (src);
+ 
diff --git a/xfburn.spec b/xfburn.spec
index 8867966..623c66a 100644
--- a/xfburn.spec
+++ b/xfburn.spec
@@ -13,6 +13,20 @@ URL:            http://goodies.xfce.org/projects/applications/%{name}
 #VCS: git:git://git.xfce.org/apps/xfburn
 Source0:        http://archive.xfce.org/src/apps/%{name}/%{majorversion}/%{name}-%{version}.tar.bz2
 Patch0:         xfburn-0.4.3-glib.patch
+
+# https://bugzilla.redhat.com/show_bug.cgi?id=639804
+# https://bugzilla.redhat.com/show_bug.cgi?id=676086
+# https://bugzilla.xfce.org/show_bug.cgi?id=6805
+# same as http://git.xfce.org/apps/xfburn/commit/?id=611d9158 but against 0.4.3
+Patch1:         xfburn-0.4.3-new-directory-bug.patch
+
+# https://bugzilla.redhat.com/show_bug.cgi?id=669971
+# https://bugzilla.xfce.org/show_bug.cgi?id=7103
+# http://git.xfce.org/apps/xfburn/commit/?id=e1d6bfc2
+Patch2:         xfburn-0.4.3-if-with-several-statements.patch
+
+# make sure xfburn.desktop can be validated with our version of desktop-file-utils
+Patch10:        xfburn-0.4.3-desktop-file.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  libxfcegui4-devel >= 4.4.0 
@@ -37,6 +51,9 @@ compositions of data to either CD or DVD.
 %prep
 %setup -q
 %patch0 -p1 -b .glib
+%patch1 -p1 -b .new-directory
+%patch2 -p1 -b .if
+%patch10 -p1
 
 
 %build
@@ -90,6 +107,11 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Fri Sep 28 2012 Christoph Wickert <cwickert at fedoraproject.org> - 0.4.3-10
+- Fix crash when creating directory (#639804, #676086 and #851900)
+- Fix crash when adding lots of files (#669971)
+- Make sure desktop file validates
+
 * Sun Jul 22 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.4.3-9
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
 


More information about the scm-commits mailing list