From 2ecd9c6709db953b5b042b33b715ca34c98b41e4e012bb7f863984f6ccc1a114 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 10 Jun 2009 13:03:38 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/mc?expand=0&rev=15 --- mc-crash-bnc500516.patch | 11 ++++ mc-port-number-bnc483249.patch | 97 ++++++++++++++++++++++++++++++++++ mc.changes | 11 ++++ mc.spec | 18 +++++-- 4 files changed, 134 insertions(+), 3 deletions(-) create mode 100644 mc-crash-bnc500516.patch create mode 100644 mc-port-number-bnc483249.patch diff --git a/mc-crash-bnc500516.patch b/mc-crash-bnc500516.patch new file mode 100644 index 0000000..3c9dfc0 --- /dev/null +++ b/mc-crash-bnc500516.patch @@ -0,0 +1,11 @@ +--- edit/edit.c ++++ edit/edit.c +@@ -1808,6 +1808,8 @@ + c = '0'; + else if (iswspace (c)) + c = ' '; ++ else if (c > 0xff) ++ return 0xFFFFFFFFUL; + #endif /* UTF8 */ + q = strchr (option_chars_move_whole_word, c); + if (!q) diff --git a/mc-port-number-bnc483249.patch b/mc-port-number-bnc483249.patch new file mode 100644 index 0000000..c0e0b88 --- /dev/null +++ b/mc-port-number-bnc483249.patch @@ -0,0 +1,97 @@ +From 9769c0eeffbc48a029e7b572f17510ba30d730ac Mon Sep 17 00:00:00 2001 +From: Mikhail S. Pobolovets +Date: Mon, 26 Jan 2009 16:56:55 +0200 +Subject: [PATCH] Port number in shell link can be specified now + +vfs/ChangeLog: + + * fish.c: Iterpret SUP.flags as port number if SUP.flags is not in + * 0, FISH_FLAG_COMPRESSED and FISH_FLAG_RSH. Weakness: port number + +Originally by Andrew V. Samoilov + +Signed-off-by: Mikhail S. Pobolovets +--- + vfs/fish.c | 41 ++++++++++++++++++++++++++++------------- + 1 files changed, 28 insertions(+), 13 deletions(-) + +diff --git a/vfs/fish.c b/vfs/fish.c +index 63e4d60..a407e71 100644 +--- a/vfs/fish.c ++++ b/vfs/fish.c +@@ -213,13 +213,22 @@ static int + fish_open_archive_int (struct vfs_class *me, struct vfs_s_super *super) + { + { +- const char *argv[10]; ++ char gbuf[10]; ++ const char *argv[10]; /* All of 10 is used now */ + const char *xsh = (SUP.flags == FISH_FLAG_RSH ? "rsh" : "ssh"); + int i = 0; + + argv[i++] = xsh; + if (SUP.flags == FISH_FLAG_COMPRESSED) + argv[i++] = "-C"; ++ ++ if (SUP.flags > FISH_FLAG_RSH) ++ { ++ argv[i++] = "-p"; ++ g_snprintf (gbuf, sizeof (gbuf), "%d", SUP.flags); ++ argv[i++] = gbuf; ++ } ++ + argv[i++] = "-l"; + argv[i++] = SUP.user; + argv[i++] = SUP.host; +@@ -317,7 +326,7 @@ fish_open_archive (struct vfs_class *me, struct vfs_s_super *super, + SUP.user = user; + SUP.flags = flags; + if (!strncmp (op, "rsh:", 4)) +- SUP.flags |= FISH_FLAG_RSH; ++ SUP.flags = FISH_FLAG_RSH; + SUP.cwdir = NULL; + if (password) + SUP.password = password; +@@ -936,22 +945,28 @@ static void + fish_fill_names (struct vfs_class *me, fill_names_f func) + { + struct vfs_s_super *super = MEDATA->supers; +- const char *flags; + char *name; +- +- while (super){ +- switch (SUP.flags & (FISH_FLAG_RSH | FISH_FLAG_COMPRESSED)) { +- case FISH_FLAG_RSH: ++ ++ char gbuf[10]; ++ ++ while (super) ++ { ++ const char *flags = ""; ++ switch (SUP.flags) ++ { ++ case FISH_FLAG_RSH: + flags = ":r"; + break; +- case FISH_FLAG_COMPRESSED: ++ case FISH_FLAG_COMPRESSED: + flags = ":C"; + break; +- case FISH_FLAG_RSH | FISH_FLAG_COMPRESSED: +- flags = ""; +- break; +- default: +- flags = ""; ++ default: ++ if (SUP.flags > FISH_FLAG_RSH) ++ { ++ break; ++ g_snprintf (gbuf, sizeof (gbuf), ":%d", SUP.flags); ++ flags = gbuf; ++ } + break; + } + +-- +1.5.6.3 + diff --git a/mc.changes b/mc.changes index 5651459..b0070b6 100644 --- a/mc.changes +++ b/mc.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Wed May 20 14:47:14 CEST 2009 - nadvornik@suse.cz + +- really apply 05_add_lzma_xz_support.patch + +------------------------------------------------------------------- +Wed May 6 16:17:17 CEST 2009 - nadvornik@suse.cz + +- fixed crash in utf-8 patch [bnc#500516] +- allow to specify port number in the shell link [bnc#483249] + ------------------------------------------------------------------- Thu Mar 12 16:35:18 CET 2009 - prusnak@suse.cz diff --git a/mc.spec b/mc.spec index b2ee331..9aff7bb 100644 --- a/mc.spec +++ b/mc.spec @@ -26,7 +26,7 @@ Group: Productivity/File utilities PreReq: permissions AutoReqProv: on Version: 4.6.2 -Release: 3 +Release: 4 Summary: Midnight Commander Source: mc-4.6.2.tar.bz2 Source1: x11_browser @@ -66,6 +66,10 @@ Patch40: 99_regexp-replace-fixed.patch Patch41: mc-multi-press-f-keys.patch # PATCH-FIX-OPENSUSE mc-utf8-slang-codeset.patch sbrabec@suse.cz - Guess UTF-8 locale from codeset, not from locale variables (not needed for openSUSE, valuable for upstream). Patch42: mc-utf8-slang-codeset.patch +# PATCH-FIX-OPENSUSE mc-crash-bnc500516.patch nadvornik@suse.cz - fixes a bug in utf-8 patch +Patch43: mc-crash-bnc500516.patch +# PATCH-FIX-UPSTREAM mc-port-number-bnc483249.patch nadvornik@suse.cz - port number in shell link - midnight-commander.org/ticket/118 +Patch44: mc-port-number-bnc483249.patch # BuildRoot: %{_tmppath}/%{name}-%{version}-build Url: http://www.ibiblio.org/mc/ @@ -152,6 +156,7 @@ Authors: %patch22 -p1 %patch23 -p1 %patch24 -p1 +%patch28 -p1 %patch30 -p1 %patch32 -p1 %patch33 -p1 @@ -159,6 +164,8 @@ Authors: %patch40 -p1 %patch41 -p1 %patch42 -p1 +%patch43 +%patch44 -p1 pushd po rename no nb no.* popd @@ -277,6 +284,11 @@ rm -rf %{buildroot} %lang(sr) %doc %{_datadir}/mc/mc.*.sr %changelog +* Wed May 20 2009 nadvornik@suse.cz +- really apply 05_add_lzma_xz_support.patch +* Wed May 06 2009 nadvornik@suse.cz +- fixed crash in utf-8 patch [bnc#500516] +- allow to specify port number in the shell link [bnc#483249] * Thu Mar 12 2009 prusnak@suse.cz - added xz support (05_add_lzma_xz_support.patch) * Wed Feb 25 2009 sbrabec@suse.cz @@ -582,7 +594,7 @@ rm -rf %{buildroot} - added readline/readline-devel to neededforbuild (split from bash) * Tue Feb 20 2001 uli@suse.de - fixed for new glibc -* Tue Jan 30 2001 ro@suse.de +* Wed Jan 31 2001 ro@suse.de - changed neededforbuild to * Sun Jan 21 2001 violiet@suse.de - added eightbit-clean.patch to view/edit for Japanese and @@ -690,7 +702,7 @@ rm -rf %{buildroot} merged changes to mc.lib from mc-4.1.11-suse and current (+ibmpc3) * Wed Nov 19 1997 florian@suse.de - update to mc 4.1.11 -* Sun Nov 16 1997 florian@suse.de +* Mon Nov 17 1997 florian@suse.de - oops, forgot mc.lib-changes from Werner * Fri Oct 10 1997 florian@suse.de - update to version 4.1.4