diff --git a/xarchiver-0.5.2-fix_7z_support.patch b/xarchiver-0.5.2-fix_7z_support.patch new file mode 100644 index 0000000..f7ff098 --- /dev/null +++ b/xarchiver-0.5.2-fix_7z_support.patch @@ -0,0 +1,110 @@ +diff -Nur xarchiver-0.5.2.orig/src/7zip.c xarchiver-0.5.2/src/7zip.c +--- xarchiver-0.5.2.orig/src/7zip.c 2008-10-25 00:41:17.000000000 +1300 ++++ xarchiver-0.5.2/src/7zip.c 2010-12-15 11:24:26.000000000 +1300 +@@ -64,15 +64,14 @@ + XEntry *entry; + gchar *filename; + gpointer item[5]; +- gint linesize = 0,n = 0,a = 0; +- gboolean dir = FALSE; ++ gint linesize = 0,a = 0; + + if (last_line) + return; + + if (jump_header == FALSE) + { +- if (line[0] == '-') ++ if ((line[0] == '-') && (line[3] != NULL)) + { + jump_header = TRUE; + return; +@@ -93,71 +92,42 @@ + item[4] = line; + + /* Time */ +- for(n=13; n < linesize; ++n) +- if(line[n] == ' ') +- break; +- line[n] = '\0'; ++ line[19] = '\0'; + item[3] = line + 11; +- a = ++n; + + /* Permissions */ +- for(; n < linesize; n++) +- if(line[n] == ' ') +- break; +- line[n] = '\0'; +- if ((line+a)[0] == 'D') +- dir = TRUE; +- item[2] = line + a; ++ line[25] = '\0'; ++ item[2] = line + 20; + + /* Size */ +- for(++n; n < linesize; ++n) +- if(line[n] >= '0' && line[n] <= '9') ++ for(a=26; a < linesize; ++a) ++ if(line[a] >= '0' && line[a] <= '9') + break; +- a = n; + +- for(; n < linesize; ++n) +- if(line[n] == ' ') +- break; +- +- line[n] = '\0'; ++ line[38] = '\0'; + item[0] = line + a; + archive->dummy_size += g_ascii_strtoull(item[0],NULL,0); + + /* Compressed */ +- for(++n; n < linesize; ++n) +- if(line[n] >= '0' && line[n] <= '9') +- break; +- a = n; +- +- for(; n < linesize; ++n) +- if(line[n] == ' ') +- break; +- +- line[n] = '\0'; +- +- if (line[50] != ' ') ++ /* Is this item solid? */ ++ if (line[50] == ' ') + { +- n+=2; +- item[1] = line + a; + line[linesize-1] = '\0'; +- filename = g_strdup(line + n); ++ filename = g_strdup(line + 53); + } +- /* Is this a solid archive? */ ++ + else + { +- item[1] = "0"; +- line[n-1] = '\0'; ++ for(a=39; a < linesize; ++a) ++ if(line[a] >= '0' && line[a] <= '9') ++ break; ++ ++ line[51] = '\0'; ++ item[1] = line + a; ++ line[linesize-1] = '\0'; + filename = g_strdup(line + 53); + } + +- /* Work around for 7za which doesn't +- * output / with directories */ +- if (dir) +- { +- gchar *filename_with_slash = g_strconcat (filename,"/",NULL); +- g_free (filename); +- filename = filename_with_slash; +- } + entry = xa_set_archive_entries_for_each_row (archive,filename,item); + g_free(filename); + } diff --git a/xarchiver.spec b/xarchiver.spec index 482713c..c92b5c3 100644 --- a/xarchiver.spec +++ b/xarchiver.spec @@ -1,6 +1,6 @@ Name: xarchiver Version: 0.5.2 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Archive manager for Xfce Group: Applications/Archiving @@ -9,8 +9,24 @@ URL: http://xarchiver.xfce.org/ Source0: http://downloads.sourceforge.net/xarchiver/xarchiver-%{version}.tar.bz2 Patch0: xarchiver-0.5.2-no-donators-menu.patch Patch1: xarchiver-0.5.2-default-archive-format.patch -Patch2: xarchiver-0.5.2-rpm2cpio.patch -Patch3: xarchiver-0.5.2-segfault-open-with.patch +# add_xz_support.patch by Robby Workman taken from +# http://slackbuilds.org/slackbuilds/13.1/system/xarchiver/xarchiver-0.5.2-add_xz_support.patch +# sent upstream through +# https://sourceforge.net/tracker/?func=detail&aid=2847624&group_id=140153&atid=745600 +Patch2: xarchiver-0.5.2-add_xz_support.patch +# rpm2cpio.patch by Daniel Hokka Zakrisson +# taken from https://bugzilla.redhat.com/show_bug.cgi?id=577480 +# sent upstream through +# https://sourceforge.net/tracker/?func=detail&aid=3310768&group_id=140153&atid=745602 +Patch3: xarchiver-0.5.2-rpm2cpio.patch +# segfault-open-with.patch by Bastiaan Jacques +# taken from https://bugzilla.redhat.com/show_bug.cgi?id=690012 +# sent upstream through +# https://sourceforge.net/tracker/?func=detail&aid=3310778&group_id=140153&atid=745600 +Patch4: xarchiver-0.5.2-segfault-open-with.patch +# fix-7z-support.patch by taken from +# https://sourceforge.net/tracker/?func=detail&aid=3137589&group_id=140153&atid=745602 +Patch5: xarchiver-0.5.2-fix_7z_support.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: gtk2-devel, libxml2-devel, gettext, desktop-file-utils @@ -30,8 +46,10 @@ archives in the arj, 7z, rar, and zip formats are supported. chmod -x src/mime.* %patch0 -p2 -b .no-donators-menu %patch1 -p1 -b .default-archive-format -%patch2 -p1 -b .rpm2cpio -%patch3 -p1 -b .segfault-open-with +%patch2 -p1 -b .add_xz_support +%patch3 -p1 -b .rpm2cpio +%patch4 -p1 -b .segfault-open-with +%patch5 -p1 -b .fix_7z_support %build %configure @@ -101,10 +119,13 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Thu Jun 02 2011 Christoph Wickert - 0.5.2-8 +- Fix 7zip. Encrypted archives are still not supported. + * Thu Jun 02 2011 Christoph Wickert - 0.5.2-7 -- Add xz support (#577480) +- Add xz support. Thanks to Robby Workman and Daniel Hokka Zakrisson (#577480) - Remove mime-type multipart/x-zip (#666066) -- Fix crash in IA__gtk_tree_model_get_valist (#690012) +- Fix crash in IA__gtk_tree_model_get_valist. Thanks to Bastiaan Jacques (#690012) - Update icon-cache scriptlets * Mon Feb 07 2011 Fedora Release Engineering - 0.5.2-6