From 0c4e6e62b77c39475c328e096022e0ed3eb9e466a1d7c321b5d1809fe1b6feda Mon Sep 17 00:00:00 2001 From: David Haller Date: Tue, 12 Nov 2013 19:10:37 +0000 Subject: [PATCH 1/3] Accepting request 206680 from home:dnh:branches:Base:System - fix the fix (reimplement the mcrar5fs_list awk script) (bnc#849082) - Fix urar extfs failing on files with spaces (bnc#849082) OBS-URL: https://build.opensuse.org/request/show/206680 OBS-URL: https://build.opensuse.org/package/show/Base:System/mc?expand=0&rev=67 --- mc-extfs-helpers-urar.patch | 46 +++++++++++++++++++++++++++++++++++++ mc.changes | 10 ++++++++ mc.spec | 2 ++ 3 files changed, 58 insertions(+) create mode 100644 mc-extfs-helpers-urar.patch diff --git a/mc-extfs-helpers-urar.patch b/mc-extfs-helpers-urar.patch new file mode 100644 index 0000000..ba7e5e8 --- /dev/null +++ b/mc-extfs-helpers-urar.patch @@ -0,0 +1,46 @@ +--- src/vfs/extfs/helpers/urar.in.orig 2013-11-12 18:27:16.000000000 +0100 ++++ src/vfs/extfs/helpers/urar.in 2013-11-12 19:05:31.000000000 +0100 +@@ -42,14 +42,35 @@ + $UNRAR v -c- -cfg- "$1" | @AWK@ -v uid=`id -u` -v gid=`id -g` ' + BEGIN { flag=0 } + /^-----------/ { flag++; if (flag > 1) exit 0; next } +-flag==1 { +- split($5, a, "-") +- if (index($1, "D") != 0) +- $1="drwxr-xr-x" +- else +- if (index($1, ".") != 0) +- $1="-rw-r--r--" +- printf "%s 1 %s %s %d %02d/%02d/%02d %s ./%s\n", $1, uid, gid, $2, a[2], a[1], a[3], $6, $8 ++flag == 1 { ++ name=""; ++ ++ ### split line and save seperators in 'seps' ++ split($0, fields, " ", seps); ++ ### split date for reformatting ++ split(fields[5], date, "-"); ++ ++ ### check/adjust rights ++ if (index(fields[1], "D") != 0) { ++ fields[1] = "drwxr-xr-x"; ++ } else { ++ if (index(fields[1], ".") != 0) { ++ fields[1] = "-rw-r--r--"; ++ } ++ } ++ ++ ### join filename from fields 8 .. NR ++ for(i=8; i<=NR; i++) { ++ name=name fields[i] seps[i]; ++ } ++ ### remove padding blanks from short names ++ if (length(name)<13) { ++ sub(" *$", "", name); ++ } ++ ++ printf("%s 1 %s %s %d %02d/%02d/%02d %s ./%s\n", ++ fields[1], uid, gid, fields[2], date[2], ++ date[1], date[3], fields[6], name); + }' + } + diff --git a/mc.changes b/mc.changes index 974f444..66e5127 100644 --- a/mc.changes +++ b/mc.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Nov 12 18:11:19 UTC 2013 - dnh@opensuse.org + +- fix the fix (reimplement the mcrar5fs_list awk script) (bnc#849082) + +------------------------------------------------------------------- +Tue Nov 12 14:50:57 UTC 2013 - dnh@opensuse.org + +- Fix urar extfs failing on files with spaces (bnc#849082) + ------------------------------------------------------------------- Mon Sep 30 17:23:48 CEST 2013 - sbrabec@suse.cz diff --git a/mc.spec b/mc.spec index e358d6a..33dde7d 100644 --- a/mc.spec +++ b/mc.spec @@ -42,6 +42,7 @@ Patch16: mc-esc-seq.patch Patch17: mc-rpm.patch Patch20: mc-f-keys.patch Patch21: mc-extfs-helpers-deb.patch +Patch22: mc-extfs-helpers-urar.patch #debian fixes for vfs Patch24: 02_ignore_ftp_chmod_error.patch #Debian fixes @@ -118,6 +119,7 @@ target directory. %patch18 %patch20 %patch21 +%patch22 %patch24 %patch31 %patch32 From 544da03b11cc54d70196a7fea2360dbfe0fe3c3b62ae7c0c1ccde7c22a48ca6f Mon Sep 17 00:00:00 2001 From: David Haller Date: Tue, 12 Nov 2013 21:18:22 +0000 Subject: [PATCH 2/3] Accepting request 206689 from home:dnh:branches:Base:System fix urar extfs some more (thanks to D. Werner for finding the problem and proposing the fix) OBS-URL: https://build.opensuse.org/request/show/206689 OBS-URL: https://build.opensuse.org/package/show/Base:System/mc?expand=0&rev=68 --- mc-extfs-helpers-urar.patch | 11 ++++++----- mc.changes | 6 ++++++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/mc-extfs-helpers-urar.patch b/mc-extfs-helpers-urar.patch index ba7e5e8..ad12a52 100644 --- a/mc-extfs-helpers-urar.patch +++ b/mc-extfs-helpers-urar.patch @@ -1,6 +1,6 @@ --- src/vfs/extfs/helpers/urar.in.orig 2013-11-12 18:27:16.000000000 +0100 +++ src/vfs/extfs/helpers/urar.in 2013-11-12 19:05:31.000000000 +0100 -@@ -42,14 +42,35 @@ +@@ -42,14 +42,36 @@ $UNRAR v -c- -cfg- "$1" | @AWK@ -v uid=`id -u` -v gid=`id -g` ' BEGIN { flag=0 } /^-----------/ { flag++; if (flag > 1) exit 0; next } @@ -15,8 +15,9 @@ +flag == 1 { + name=""; + -+ ### split line and save seperators in 'seps' -+ split($0, fields, " ", seps); ++ ### split line, save n-fields and save seperators in 'seps' ++ nf = split($0, fields, " ", seps); ++ + ### split date for reformatting + split(fields[5], date, "-"); + @@ -29,8 +30,8 @@ + } + } + -+ ### join filename from fields 8 .. NR -+ for(i=8; i<=NR; i++) { ++ ### join filename from fields 8 .. nf (saved above) ++ for(i = 8; i <= nf; i++) { + name=name fields[i] seps[i]; + } + ### remove padding blanks from short names diff --git a/mc.changes b/mc.changes index 66e5127..58adaaf 100644 --- a/mc.changes +++ b/mc.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Nov 12 21:09:36 UTC 2013 - dnh@opensuse.org + +- fix urar extfs some more (thanks to D. Werner for finding the problem + and proposing the fix) + ------------------------------------------------------------------- Tue Nov 12 18:11:19 UTC 2013 - dnh@opensuse.org From 5972d603d521b16ad714bd846e11e88722b644035885ab821347c541b4ffb7ab Mon Sep 17 00:00:00 2001 From: David Haller Date: Thu, 14 Nov 2013 20:02:59 +0000 Subject: [PATCH 3/3] - add mc-extfs-helpers-urar.patch to fix urar extfs failing on files with spaces when unrar5 is used (bnc#849082). Thanks to D. Werner for finding the problem and proposing the fix. OBS-URL: https://build.opensuse.org/package/show/Base:System/mc?expand=0&rev=69 --- mc.changes | 15 +++------------ mc.spec | 1 + 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/mc.changes b/mc.changes index 58adaaf..2d586ff 100644 --- a/mc.changes +++ b/mc.changes @@ -1,18 +1,9 @@ ------------------------------------------------------------------- Tue Nov 12 21:09:36 UTC 2013 - dnh@opensuse.org -- fix urar extfs some more (thanks to D. Werner for finding the problem - and proposing the fix) - -------------------------------------------------------------------- -Tue Nov 12 18:11:19 UTC 2013 - dnh@opensuse.org - -- fix the fix (reimplement the mcrar5fs_list awk script) (bnc#849082) - -------------------------------------------------------------------- -Tue Nov 12 14:50:57 UTC 2013 - dnh@opensuse.org - -- Fix urar extfs failing on files with spaces (bnc#849082) +- add mc-extfs-helpers-urar.patch to fix urar extfs failing on files + with spaces when unrar5 is used (bnc#849082). Thanks to D. Werner + for finding the problem and proposing the fix. ------------------------------------------------------------------- Mon Sep 30 17:23:48 CEST 2013 - sbrabec@suse.cz diff --git a/mc.spec b/mc.spec index 33dde7d..c55e530 100644 --- a/mc.spec +++ b/mc.spec @@ -42,6 +42,7 @@ Patch16: mc-esc-seq.patch Patch17: mc-rpm.patch Patch20: mc-f-keys.patch Patch21: mc-extfs-helpers-deb.patch +# mc-extfs-helpers-urar.patch dnh@opensuse.org - Fix urar extfs failing on files with spaces (bnc#849082) Patch22: mc-extfs-helpers-urar.patch #debian fixes for vfs Patch24: 02_ignore_ftp_chmod_error.patch