Date: Wednesday, February 19, 2014 @ 12:27:15 Author: bgyorgy Revision: 105928
upgpkg: xarchiver 0.5.3-1 Update to version 0.5.3 Added: xarchiver/trunk/xarchiver-0.5.3-add-mime-types.patch xarchiver/trunk/xarchiver-0.5.3-fix-double-escaping.patch xarchiver/trunk/xarchiver-0.5.3-fix-password-protected.patch xarchiver/trunk/xarchiver-0.5.3-fix-rpm-support.patch Modified: xarchiver/trunk/PKGBUILD ----------------------------------------------+ PKGBUILD | 74 ++++----------------- xarchiver-0.5.3-add-mime-types.patch | 9 ++ xarchiver-0.5.3-fix-double-escaping.patch | 32 +++++++++ xarchiver-0.5.3-fix-password-protected.patch | 42 ++++++++++++ xarchiver-0.5.3-fix-rpm-support.patch | 86 +++++++++++++++++++++++++ 5 files changed, 186 insertions(+), 57 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2014-02-19 11:00:34 UTC (rev 105927) +++ PKGBUILD 2014-02-19 11:27:15 UTC (rev 105928) @@ -4,8 +4,8 @@ # Contributor: Andrew Simmons <andrew.simm...@gmail.com> pkgname=xarchiver -pkgver=0.5.2 -pkgrel=6 +pkgver=0.5.3 +pkgrel=1 pkgdesc="GTK+ frontend to various command line archivers" arch=('i686' 'x86_64') url="http://xarchiver.sourceforge.net/" @@ -17,74 +17,34 @@ 'p7zip: 7z support' 'arj: ARJ support' 'lzop: LZOP support' - 'cpio: RPM support') + 'cpio: RPM support' + 'unrar: RAR support') install=xarchiver.install source=(http://downloads.sourceforge.net/xarchiver/xarchiver-$pkgver.tar.bz2 - xarchiver-0.5.2-no-donators-menu.patch - xarchiver-0.5.2-add_xz_support.patch - xarchiver-0.5.2-segfault-open-with.patch - xarchiver-0.5.2-fix_7z_support.patch - xarchiver-0.5.2-drag-n-drop_escaped_path.patch - xarchiver-0.5.2-fix-double-escaping.patch - xarchiver-0.5.2-fix-non-existent-archive.patch - xarchiver-0.5.2-segfault-delete-file.patch - xarchiver-0.5.2-segfault-password-protected.patch - xarchiver-0.5.2-disable-rar-support.patch - xarchiver-0.5.2-add_mime_types.patch) -md5sums=('2bc7f06403cc6582dd4a8029ec9d038d' - '7ef9fe9aee9f0fbc141ed9683e91ea1c' - '5d5ef8dd1b8b7790af4ece5fcedcd370' - 'f9036a44157b318cbc59ed012b04974b' - '782f55c1f1021dc02c7739bf8a47336e' - 'fcd9e04222c5e0ef459977bd7cd0ae4e' + xarchiver-0.5.3-fix-rpm-support.patch + xarchiver-0.5.3-fix-double-escaping.patch + xarchiver-0.5.3-fix-password-protected.patch + xarchiver-0.5.3-add-mime-types.patch) +md5sums=('fd390bbd2df76a5f8a007bdeae82d4aa' + '812b93339f5e3332621f3c5abebfe277' '6178d7ab679b761469c880a8db991907' - '22ed2783e72684a102243c5834bf5ca3' - 'e518b1e0bc4407383aae2783c0c19a04' - 'c46daf2ee9fce7ece608eca33174db6b' - '10f7f24b177d273dd3153785db8678a2' - '36a4c3181230aab1e0ce1596acc5ef88') + '35ab96d98521a0a36f3e9e9ec0969107' + 'f9119f5290caa195a56b7d3c63d9137d') prepare() { cd $pkgname-$pkgver - # Fix donators menu item (upstream patch) - patch -Np2 -i ../xarchiver-0.5.2-no-donators-menu.patch + # Fix RPM support + patch -Np1 -i ../xarchiver-0.5.3-fix-rpm-support.patch - # Add XZ support - # http://sourceforge.net/p/xarchiver/bugs/28/ - patch -Np1 -i ../xarchiver-0.5.2-add_xz_support.patch - - # Fix segfault on open with dialog - # http://sourceforge.net/p/xarchiver/bugs/52/ - patch -Np1 -i ../xarchiver-0.5.2-segfault-open-with.patch - - # Fix 7z support - # http://sourceforge.net/p/xarchiver/patches/5/ - patch -Np1 -i ../xarchiver-0.5.2-fix_7z_support.patch - - # Fix extraction when the Drag'n'Drop target path contains spaces - patch -Np1 -i ../xarchiver-0.5.2-drag-n-drop_escaped_path.patch - # Fix error when trying to create archives with spaces - patch -Np1 -i ../xarchiver-0.5.2-fix-double-escaping.patch + patch -Np1 -i ../xarchiver-0.5.3-fix-double-escaping.patch - # Fix segfault when non-existent archive specified - patch -Np1 -i ../xarchiver-0.5.2-fix-non-existent-archive.patch - - # Fix segfault when deleting a file - patch -Np1 -i ../xarchiver-0.5.2-segfault-delete-file.patch - # Fix segfault when handling password protected files - patch -Np1 -i ../xarchiver-0.5.2-segfault-password-protected.patch + patch -Np1 -i ../xarchiver-0.5.3-fix-password-protected.patch - # Tempolary disable rar support due to incompatiblity with rar 5.0 - patch -Np1 -i ../xarchiver-0.5.2-disable-rar-support.patch - # Add more MIME types in the desktop file - patch -Np1 -i ../xarchiver-0.5.2-add_mime_types.patch - - # Update upstream URL - find -type f | xargs sed -i 's|http://xarchiver.xfce.org|http://xarchiver.sf.net|' + patch -Np1 -i ../xarchiver-0.5.3-add-mime-types.patch } build() { Added: xarchiver-0.5.3-add-mime-types.patch =================================================================== --- xarchiver-0.5.3-add-mime-types.patch (rev 0) +++ xarchiver-0.5.3-add-mime-types.patch 2014-02-19 11:27:15 UTC (rev 105928) @@ -0,0 +1,9 @@ +diff -Naur xarchiver-0.5.3.orig/xarchiver.desktop.in xarchiver-0.5.2/xarchiver.desktop.in +--- xarchiver-0.5.3.orig/xarchiver.desktop.in 2014-01-24 04:05:33.438561000 +0100 ++++ xarchiver-0.5.3/xarchiver.desktop.in 2014-01-24 04:44:00.625750394 +0100 +@@ -11,4 +11,4 @@ + X-MultipleArgs=false + Categories=GTK;Archiving;Utility; + StartupNotify=true +-MimeType=application/x-arj;application/arj;application/x-bzip;application/x-bzip-compressed-tar;application/x-gzip;application/x-rar;application/x-rar-compressed;application/x-tar;application/x-zip;application/x-zip-compressed;application/zip;multipart/x-zip;application/x-7z-compressed;application/x-compressed-tar;application/x-bzip2;application/x-bzip2-compressed-tar; ++MimeType=application/x-arj;application/arj;application/x-bzip;application/x-bzip-compressed-tar;application/x-gzip;application/x-rar;application/x-rar-compressed;application/x-tar;application/x-zip;application/x-zip-compressed;application/zip;application/x-7z-compressed;application/x-compressed-tar;application/x-bzip2;application/x-bzip2-compressed-tar;application/x-lzma;application/x-lzma-compressed-tar;application/x-lzop;application/x-lzop-compressed-tar;application/x-xz;application/x-xz-compressed-tar;application/x-debian-package;application/x-rpm; Added: xarchiver-0.5.3-fix-double-escaping.patch =================================================================== --- xarchiver-0.5.3-fix-double-escaping.patch (rev 0) +++ xarchiver-0.5.3-fix-double-escaping.patch 2014-02-19 11:27:15 UTC (rev 105928) @@ -0,0 +1,32 @@ +From: =?UTF-8?q?Guido=20Berh=C3=B6rster?= <g...@opensuse.org> +Date: Sat, 19 Jan 2013 09:27:36 +0100 +Subject: fix-double-escaping + +Do not escape file names twice. Fixes an error when trying to create archives +with spaces. + +Bug: http://bugs.debian.org/697493. +--- + src/main.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/main.c b/src/main.c +index a13d737..a6a7f93 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -208,13 +208,13 @@ int main (int argc, char **argv) + g_free(_current_dir); + GSList *files = NULL; + _current_dir = g_path_get_basename(add_files); +- files = g_slist_append(files,xa_escape_filename(_current_dir,"$'`\"\\!?* ()[]&|:;<>#")); ++ files = g_slist_append(files,g_strdup(_current_dir)); + g_free(_current_dir); + g_free(add_files); + for (x = 1; x< argc; x++) + { + _current_dir = g_path_get_basename(argv[x]); +- files = g_slist_append(files,xa_escape_filename(_current_dir,"$'`\"\\!?* ()[]&|:;<>#")); ++ files = g_slist_append(files,g_strdup(_current_dir)); + g_free (_current_dir); + } + xa_execute_add_commands(archive,files,NULL); Added: xarchiver-0.5.3-fix-password-protected.patch =================================================================== --- xarchiver-0.5.3-fix-password-protected.patch (rev 0) +++ xarchiver-0.5.3-fix-password-protected.patch 2014-02-19 11:27:15 UTC (rev 105928) @@ -0,0 +1,42 @@ +diff -Naur xarchiver-0.5.3.orig/src/window.c xarchiver-0.5.2/src/window.c +--- xarchiver-0.5.3.orig/src/window.c 2014-01-24 08:10:09.305990000 +0100 ++++ xarchiver-0.5.3/src/window.c 2014-01-24 08:42:45.110729290 +0100 +@@ -1694,7 +1694,7 @@ + { + if (archive->passwd == NULL) + { +- archive->passwd = xa_create_password_dialog(NULL); ++ archive->passwd = xa_create_password_dialog(archive); + if ( archive->passwd == NULL) + { + gtk_drag_finish (dc,FALSE,FALSE,t); +@@ -2702,9 +2702,12 @@ + + if (entry->is_encrypted) + { +- archive[idx]->passwd = xa_create_password_dialog(archive[idx]); + if (archive[idx]->passwd == NULL) +- return; ++ { ++ archive[idx]->passwd = xa_create_password_dialog(archive[idx]); ++ if (archive[idx]->passwd == NULL) ++ return; ++ } + } + filename = g_strconcat(archive[idx]->tmp,"/",entry->filename,NULL); + if (g_file_test(filename,G_FILE_TEST_EXISTS)) +@@ -2768,8 +2771,12 @@ + { + if (entry->is_encrypted) + { +- if (archive->passwd == NULL) +- return; ++ if (archive->passwd == NULL) ++ { ++ archive->passwd = xa_create_password_dialog(archive); ++ if (archive->passwd == NULL) ++ return; ++ } + } + if (archive->extraction_path) + { Added: xarchiver-0.5.3-fix-rpm-support.patch =================================================================== --- xarchiver-0.5.3-fix-rpm-support.patch (rev 0) +++ xarchiver-0.5.3-fix-rpm-support.patch 2014-02-19 11:27:15 UTC (rev 105928) @@ -0,0 +1,86 @@ +diff -Naur xarchiver-0.5.3.orig/src/rpm.c xarchiver-0.5.3/src/rpm.c +--- xarchiver-0.5.3.orig/src/rpm.c 2014-02-09 16:26:24.000000000 +0100 ++++ xarchiver-0.5.3/src/rpm.c 2014-02-19 07:54:27.744136749 +0100 +@@ -23,8 +23,11 @@ + + void xa_open_rpm (XArchive *archive) + { ++ unsigned char bytes[8]; + unsigned short int i; +- int response; ++ int dl,il,sigsize,offset,response; ++ gchar *ibs,*executable; ++ gchar *gzip_tmp = NULL; + GSList *list = NULL; + FILE *stream; + gboolean result; +@@ -53,14 +56,68 @@ + archive->column_types[i] = types[i]; + + xa_create_liststore (archive,names); ++ if (fseek ( stream, 104 , SEEK_CUR ) ) ++ { ++ fclose (stream); ++ response = xa_show_message_dialog (GTK_WINDOW (xa_main_window),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Can't fseek to position 104:"),g_strerror(errno)); ++ return; ++ } ++ if ( fread ( bytes, 1, 8, stream ) == 0 ) ++ { ++ fclose ( stream ); ++ response = xa_show_message_dialog (GTK_WINDOW (xa_main_window),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Can't read data from file:"),g_strerror(errno)); ++ return; ++ } ++ il = 256 * ( 256 * ( 256 * bytes[0] + bytes[1]) + bytes[2] ) + bytes[3]; ++ dl = 256 * ( 256 * ( 256 * bytes[4] + bytes[5]) + bytes[6] ) + bytes[7]; ++ sigsize = 8 + 16 * il + dl; ++ offset = 104 + sigsize + ( 8 - ( sigsize % 8 ) ) % 8 + 8; ++ if (fseek ( stream, offset , SEEK_SET ) ) ++ { ++ fclose (stream); ++ response = xa_show_message_dialog (GTK_WINDOW (xa_main_window),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Can't fseek in file:"),g_strerror(errno)); ++ return; ++ } ++ if ( fread ( bytes, 1, 8, stream ) == 0 ) ++ { ++ fclose ( stream ); ++ response = xa_show_message_dialog (GTK_WINDOW (xa_main_window),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Can't read data from file:"),g_strerror(errno)); ++ return; ++ } ++ il = 256 * ( 256 * ( 256 * bytes[0] + bytes[1]) + bytes[2] ) + bytes[3]; ++ dl = 256 * ( 256 * ( 256 * bytes[4] + bytes[5]) + bytes[6] ) + bytes[7]; ++ sigsize = 8 + 16 * il + dl; ++ offset = offset + sigsize; ++ fclose (stream); + + /* Create a unique temp dir in /tmp */ + result = xa_create_temp_directory (archive); + if (!result) + return; + ++ gzip_tmp = g_strconcat (archive->tmp,"/file.gz_bz",NULL); ++ ibs = g_strdup_printf ( "%u" , offset ); ++ + /* Now I run dd to have the bzip2 / gzip compressed cpio archive in /tmp */ +- gchar *command = g_strconcat ( "sh -c \"rpm2cpio ",archive->escaped_path," > ",archive->tmp, "/file.cpio\"",NULL); ++ gchar *command = g_strconcat ( "dd if=",archive->escaped_path," ibs=",ibs," skip=1 of=",gzip_tmp,NULL); ++ g_free (ibs); ++ list = g_slist_append(list,command); ++ batch_mode = TRUE; ++ result = xa_run_command (archive,list); ++ if (result == FALSE) ++ { ++ g_free (gzip_tmp); ++ return; ++ } ++ if (xa_detect_archive_type (gzip_tmp) == XARCHIVETYPE_GZIP) ++ executable = "gzip -dc "; ++ else if (xa_detect_archive_type (gzip_tmp) == XARCHIVETYPE_BZIP2) ++ executable = "bzip2 -dc "; ++ else ++ executable = "xz -dc "; ++ ++ command = g_strconcat("sh -c \"",executable,gzip_tmp," > ",archive->tmp,"/file.cpio\"",NULL); ++ g_free(gzip_tmp); + list = NULL; + list = g_slist_append(list,command); + result = xa_run_command (archive,list);