Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
Please unblock package 'mc'
This update will fix some regressions from previous versions as well as few
new bugs.
I'm particularly concerned about three bugs:
* "mcedit can't save file in safe mode" (Closes: #673252)
This one is a bit more serious than it looks -- "safe mode" is saving
to new file and then delete/rename old file on successful save.
Without "safe save" the only option is to use "quick save" which
is overwriting data in-place. This is known to cause data loss on full
partition (i.e. not just when new data is not saved but when unmodified
part of edited file is lost as well).
This was working in Squeeze but 4.8.3 introduced this regression that is
now fixed.
* "can't create or enter directory ~"
This ridiculous bug is pretty much self-explanatory: file manager can't
enter directory '~' (it goes to home directory instead) or even create
it because it tries to create $HOME. I'm not sure if bug was present in
Squeeze (probably not) but I believe this alone is serious enough for
unblock.
* "refresh problem in directory tree view" (Closes: #675692)
Our users noticed regression in tree view panel (was working in Squeeze).
Full changelog:
mc (3:4.8.3-8) unstable; urgency=low
* New backported patches:
+ to fix "cannot Copy/Move files with filename encoding change".
+ to fix "can't create or enter directory ~".
-- Dmitry Smirnov <onlyjob@member.fsf.org> Mon, 10 Sep 2012 12:32:50 +1000
mc (3:4.8.3-7) unstable; urgency=low
* New backported patches:
+ to fix bug in shell link history.
+ to fix incomplete sand256 skin.
* Minor update to 2862.patch as per upstream merge.
-- Dmitry Smirnov <onlyjob@member.fsf.org> Thu, 30 Aug 2012 18:53:22 +1000
mc (3:4.8.3-6) unstable; urgency=low
* xz compression for binary packages.
* new backported patches:
+ to fix "refresh problem in directory tree view" (Closes: #675692).
+ to fix "mcedit can't save file in safe mode" (Closes: #673252).
-- Dmitry Smirnov <onlyjob@member.fsf.org> Sat, 25 Aug 2012 12:19:25 +1000
All fixes are implemented using backported patches from newer releases.
See all the changes in the attached diff.
unblock mc/3:4.8.3-8
Thank you.
Regards,
Dmitry.
diff --git a/debian/changelog b/debian/changelog
index 472cfc4..4d3b026 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,30 @@
+mc (3:4.8.3-8) unstable; urgency=low
+
+ * New backported patches:
+ + to fix "cannot Copy/Move files with filename encoding change".
+ + to fix "can't create or enter directory ~".
+
+ -- Dmitry Smirnov <onlyjob@member.fsf.org> Mon, 10 Sep 2012 12:32:50 +1000
+
+mc (3:4.8.3-7) unstable; urgency=low
+
+ * New backported patches:
+ + to fix bug in shell link history.
+ + to fix incomplete sand256 skin.
+ * Minor update to 2862.patch as per upstream merge.
+
+ -- Dmitry Smirnov <onlyjob@member.fsf.org> Thu, 30 Aug 2012 18:53:22 +1000
+
+mc (3:4.8.3-6) unstable; urgency=low
+
+ * xz compression for binary packages.
+ * new backported patches:
+ + to fix "refresh problem in directory tree view" (Closes: #675692).
+ + to fix "mcedit can't save file in safe mode" (Closes: #673252).
+
+ -- Dmitry Smirnov <onlyjob@member.fsf.org> Sat, 25 Aug 2012 12:19:25 +1000
+
mc (3:4.8.3-5) unstable; urgency=low
* 2800.patch is corrected to avoid crash on entering archives.
diff --git a/debian/patches/.fish_abort_file_transfer_fix.patch b/debian/patches/.fish_abort_file_transfer_fix.patch
deleted file mode 100644
index 75f0150..0000000
--- a/debian/patches/.fish_abort_file_transfer_fix.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Last-Update: 2012-03-01
-Author: Dmitry Smirnov <onlyjob@member.fsf.org>
-Forwarded: not-needed
-#Bug-Debian: http://bugs.debian.org/XXXXXX
-Bug-MC: https://www.midnight-commander.org/ticket/68
-Description: quick abort for FISH file transfers
- Aborting a FISH file transfer still causes the FISH layer
- to consume the whole file
- .
- https://www.midnight-commander.org/changeset/68_fish_abort_file_transfer_fix
-
---- a/src/vfs/fish/helpers/send
-+++ b/src/vfs/fish/helpers/send
-@@ -1,6 +1,10 @@
- #STOR $FISH_FILESIZE $FISH_FILENAME
- FILENAME="/${FISH_FILENAME}"
- echo "### 001"
-+if [ $FISH_FILESIZE -eq 0 ]; then
-+ > "${FILENAME}"
-+ echo "### 200"
-+else
- {
- > "${FILENAME}"
- bss=4096
-@@ -15,3 +19,4 @@
- FISH_FILESIZE=`expr $FISH_FILESIZE - $n`
- done
- }; echo "### 200"
-+fi
diff --git a/debian/patches/2791.patch b/debian/patches/2791.patch
new file mode 100644
index 0000000..79b2d9e
--- /dev/null
+++ b/debian/patches/2791.patch
@@ -0,0 +1,205 @@
+Last-Update: 2012-09-10
+Author: Dmitry Smirnov <onlyjob@member.fsf.org>
+Applied-Upstream: 4.8.5
+Forwarded: not-needed
+Bug-MC: https://www.midnight-commander.org/ticket/2791
+Description: backported fix for q{cannot Copy/Move files with filename encoding change}
+
+--- a/lib/vfs/path.c
++++ b/lib/vfs/path.c
+@@ -142,17 +142,27 @@
+ {
+ char *result, *local;
+
+- local = tilde_expand (path);
+- if (*local != PATH_SEP)
++ if (g_str_has_prefix (path, VFS_ENCODING_PREFIX))
+ {
+- char *curr_dir;
+-
+- g_free (local);
+- curr_dir = vfs_get_current_dir ();
+- local = mc_build_filename (curr_dir, path, NULL);
+- g_free (curr_dir);
++ /*
++ encoding prefix placed at start of string without the leading slash
++ should be autofixed by adding the leading slash
++ */
++ local = mc_build_filename (PATH_SEP_STR, path, NULL);
+ }
++ else
++ {
++ local = tilde_expand (path);
++ if (*local != PATH_SEP)
++ {
++ char *curr_dir;
+
++ g_free (local);
++ curr_dir = vfs_get_current_dir ();
++ local = mc_build_filename (curr_dir, path, NULL);
++ g_free (curr_dir);
++ }
++ }
+ result = vfs_canon (local);
+ g_free (local);
+ return result;
+@@ -416,6 +426,7 @@
+ /** Split path string to path elements by URL algorithm.
+ *
+ * @param path_str VFS-path
++ * @param flags flags for converter
+ *
+ * @return pointer to newly created vfs_path_t object with filled path elements array.
+ */
+--- a/tests/lib/vfs/path_recode.c
++++ b/tests/lib/vfs/path_recode.c
+@@ -64,6 +64,31 @@
+
+ /* --------------------------------------------------------------------------------------------- */
+
++static void test_init_vfs(const char *encoding)
++{
++ str_init_strings (encoding);
++
++ vfs_init ();
++ init_localfs ();
++ vfs_setup_work_dir ();
++
++ mc_global.sysconfig_dir = (char *) TEST_SHARE_DIR;
++
++ mc_global.sysconfig_dir = (char *) TEST_SHARE_DIR;
++ load_codepages_list ();
++}
++
++/* --------------------------------------------------------------------------------------------- */
++
++static void test_deinit_vfs()
++{
++ free_codepages_list ();
++ str_uninit_strings ();
++ vfs_shut ();
++}
++
++/* --------------------------------------------------------------------------------------------- */
++
+ #define path_recode_one_check(input, etalon1, etalon2) {\
+ vpath = vfs_path_from_str (input);\
+ element = vfs_path_get_by_index(vpath, -1);\
+@@ -80,25 +105,13 @@
+ char *result;
+ const vfs_path_element_t *element;
+
+- str_init_strings ("UTF-8");
+-
+- vfs_init ();
+- init_localfs ();
+- vfs_setup_work_dir ();
+-
+- mc_global.sysconfig_dir = (char *) TEST_SHARE_DIR;
+-
+- mc_global.sysconfig_dir = (char *) TEST_SHARE_DIR;
+- load_codepages_list ();
++ test_init_vfs("UTF-8");
+
+ path_recode_one_check("/����/��", "/����/��", "/����/��");
+
+ path_recode_one_check("/#enc:KOI8-R/тестовый/путь", "/����/��", "/#enc:KOI8-R/тестовый/путь");
+
+- free_codepages_list ();
+- str_uninit_strings ();
+- vfs_shut ();
+-
++ test_deinit_vfs();
+ }
+ END_TEST
+
+@@ -110,25 +123,13 @@
+ char *result;
+ const vfs_path_element_t *element;
+
+- str_init_strings ("KOI8-R");
+-
+- vfs_init ();
+- init_localfs ();
+- vfs_setup_work_dir ();
+-
+- mc_global.sysconfig_dir = (char *) TEST_SHARE_DIR;
+-
+- mc_global.sysconfig_dir = (char *) TEST_SHARE_DIR;
+- load_codepages_list ();
++ test_init_vfs("KOI8-R");
+
+ path_recode_one_check("/тестовый/путь", "/тестовый/путь", "/тестовый/путь");
+
+ path_recode_one_check("/#enc:UTF-8/����/��", "/тестовый/путь", "/#enc:UTF-8/����/��");
+
+- free_codepages_list ();
+- str_uninit_strings ();
+- vfs_shut ();
+-
++ test_deinit_vfs();
+ }
+ END_TEST
+
+@@ -142,15 +143,7 @@
+ vfs_path_t *vpath;
+ char *str_path;
+
+- str_init_strings ("UTF-8");
+-
+- vfs_init ();
+- init_localfs ();
+-
+- vfs_setup_work_dir ();
+- mc_global.sysconfig_dir = (char *) TEST_SHARE_DIR;
+- mc_global.sysconfig_dir = (char *) TEST_SHARE_DIR;
+- load_codepages_list ();
++ test_init_vfs("UTF-8");
+
+ test_subclass1.flags = VFS_S_REMOTE;
+ vfs_s_init_class (&vfs_test_ops1, &test_subclass1);
+@@ -201,10 +194,33 @@
+ g_free (str_path);
+ vfs_path_free (vpath);
+
+- free_codepages_list ();
+- str_uninit_strings ();
+- vfs_shut ();
++ test_deinit_vfs();
++}
++END_TEST
++
++/* --------------------------------------------------------------------------------------------- */
++
++START_TEST(test_encode_info_at_start)
++{
++ vfs_path_t *vpath;
++ char *actual;
++ const vfs_path_element_t *vpath_element;
++
++ test_init_vfs("UTF-8");
++
++ vpath = vfs_path_from_str ("#enc:KOI8-R/bla-bla/some/path");
++ actual = vfs_path_to_str (vpath);
++
++ fail_unless (strcmp ("/#enc:KOI8-R/bla-bla/some/path", actual) == 0, "\nactual=%s\n", actual);
++
++ vpath_element = vfs_path_get_by_index (vpath, -1);
++
++ fail_unless (strcmp ("/bla-bla/some/path", vpath_element->path) == 0, "\nvpath_element->path=%s\n", vpath_element->path);
++
++ g_free (actual);
++ vfs_path_free (vpath);
+
++ test_deinit_vfs();
+ }
+ END_TEST
+
+@@ -226,6 +242,7 @@
+ tcase_add_test (tc_core, test_path_recode_base_utf8);
+ tcase_add_test (tc_core, test_path_recode_base_koi8r);
+ tcase_add_test (tc_core, test_path_to_str_flags);
++ tcase_add_test (tc_core, test_encode_info_at_start);
+ /* *********************************** */
+
+ suite_add_tcase (s, tc_core);
diff --git a/debian/patches/2807.patch b/debian/patches/2807.patch
new file mode 100644
index 0000000..1c6d8ec
--- /dev/null
+++ b/debian/patches/2807.patch
@@ -0,0 +1,21 @@
+Last-Update: 2012-08-30
+Author: Dmitry Smirnov <onlyjob@member.fsf.org>
+Applied-Upstream: 4.8.4
+Forwarded: not-needed
+Bug-MC: https://www.midnight-commander.org/ticket/2807
+Description: backported fix for q{Incomplete sand256 skin}
+
+--- a/misc/skins/sand256.ini
++++ b/misc/skins/sand256.ini
+@@ -131,6 +131,11 @@
+ menuhotsel=;rgb551;underline
+ menuinactive=
+
++[popupmenu]
++ _default_=black;rgb553
++ menusel=;rgb452;underline
++ menutitle=;;underline
++
+ [buttonbar]
+ hotkey=black;rgb554
+ button=black;rgb452
diff --git a/debian/patches/2832.patch b/debian/patches/2832.patch
new file mode 100644
index 0000000..ead5f0f
--- /dev/null
+++ b/debian/patches/2832.patch
@@ -0,0 +1,47 @@
+Last-Update: 2012-08-24
+Author: Dmitry Smirnov <onlyjob@member.fsf.org>
+Applied-Upstream: 4.8.5
+Forwarded: not-needed
+Bug-MC: https://www.midnight-commander.org/ticket/2832
+Bug-Debian: http://bugs.debian.org/673252
+Description: backported fix for q{mcedit can't save file in safe mode}
+
+--- a/src/editor/editcmd.c
++++ b/src/editor/editcmd.c
+@@ -212,7 +212,8 @@
+ if (savedir == NULL)
+ savedir = g_strdup (".");
+
+- saveprefix = mc_build_filename (savedir, "cooledit", NULL);
++ /* Token-related function never return leading slash, so we need add it manually */
++ saveprefix = mc_build_filename ("/", savedir, "cooledit", NULL);
+ g_free (savedir);
+ fd = mc_mkstemps (&savename_vpath, saveprefix, NULL);
+ g_free (saveprefix);
+@@ -355,13 +356,25 @@
+
+ if (this_save_mode == EDIT_DO_BACKUP)
+ {
++ char *tmp_store_filename;
++ vfs_path_element_t *last_vpath_element;
+ vfs_path_t *tmp_vpath;
+ gboolean ok;
+
+ #ifdef HAVE_ASSERT_H
+ assert (option_backup_ext != NULL);
+ #endif
+- tmp_vpath = vfs_path_append_new (real_filename_vpath, option_backup_ext, (char *) NULL);
++ /* making a copy of path */
++ tmp_vpath = vfs_path_clone (real_filename_vpath);
++ /* getting the latest element of vpath */
++ last_vpath_element = (vfs_path_element_t *) vfs_path_get_by_index (tmp_vpath, -1);
++ /* Storing path in last element to temporary variable */
++ tmp_store_filename = last_vpath_element->path;
++ /* creating new path with backup extention in last element of vpath object */
++ last_vpath_element->path = g_strdup_printf ("%s%s", tmp_store_filename, option_backup_ext);
++ /* freeing temporary variable to avoid memory leaks */
++ g_free (tmp_store_filename);
++
+ ok = (mc_rename (real_filename_vpath, tmp_vpath) != -1);
+ vfs_path_free (tmp_vpath);
+ if (!ok)
diff --git a/debian/patches/2833.patch b/debian/patches/2833.patch
new file mode 100644
index 0000000..d95b4fd
--- /dev/null
+++ b/debian/patches/2833.patch
@@ -0,0 +1,21 @@
+Last-Update: 2012-08-30
+Author: Dmitry Smirnov <onlyjob@member.fsf.org>
+Applied-Upstream: 4.8.4
+Forwarded: not-needed
+Bug-MC: https://www.midnight-commander.org/ticket/2833
+Description: backported fix for q{Wrong shell link history}
+
+--- a/lib/widget/input.c
++++ b/lib/widget/input.c
+@@ -227,6 +227,11 @@
+ else
+ colon = strchr (url, ':');
+
++ /* if 'colon' before 'at', 'colon' delimits user and password: user:password@host */
++ /* if 'colon' after 'at', 'colon' delimits host and port: user@host:port */
++ if (colon != NULL && colon > at)
++ colon = NULL;
++
+ if (colon == NULL)
+ return g_strdup (url);
+ *colon = '\0';
diff --git a/debian/patches/2835.patch b/debian/patches/2835.patch
new file mode 100644
index 0000000..e9856ed
--- /dev/null
+++ b/debian/patches/2835.patch
@@ -0,0 +1,47 @@
+Last-Update: 2012-08-24
+Author: Dmitry Smirnov <onlyjob@member.fsf.org>
+Applied-Upstream: 4.8.5
+Forwarded: not-needed
+Bug-MC: https://www.midnight-commander.org/ticket/2835
+Description: backported fix for q{duplicate entities in panel with 'tree view' mode}
+ this patch is needed for 2862.patch
+
+--- a/src/filemanager/treestore.c
++++ b/src/filemanager/treestore.c
+@@ -457,7 +457,7 @@
+
+ /* Calculate attributes */
+ new->name = vfs_path_clone (name);
+- new->sublevel = vfs_path_tokens_count (new->name) + 1;
++ new->sublevel = vfs_path_tokens_count (new->name);
+ {
+ const char *new_name;
+
+@@ -465,6 +465,8 @@
+ new->subname = strrchr (new_name, '/');
+ if (new->subname == NULL)
+ new->subname = new_name;
++ else
++ new->subname++;
+ }
+ if (new->next)
+ submask = new->next->submask;
+@@ -483,18 +485,6 @@
+ current = current->prev;
+ }
+
+- /* The entry has now been added */
+-
+- if (new->sublevel > 1)
+- {
+- /* Let's check if the parent directory is in the tree */
+- vfs_path_t *tmp_vpath;
+-
+- tmp_vpath = vfs_path_vtokens_get (new->name, 0, new->sublevel - 1);
+- tree_store_add_entry (tmp_vpath);
+- vfs_path_free (tmp_vpath);
+- }
+-
+ tree_store_dirty (TRUE);
+ return new;
+ }
diff --git a/debian/patches/2862.patch b/debian/patches/2862.patch
new file mode 100644
index 0000000..3ca81f1
--- /dev/null
+++ b/debian/patches/2862.patch
@@ -0,0 +1,36 @@
+Last-Update: 2012-08-30
+Author: Dmitry Smirnov <onlyjob@member.fsf.org>
+Applied-Upstream: 4.8.5
+Forwarded: not-needed
+Bug-MC: https://www.midnight-commander.org/ticket/2862
+Bug-Debian: http://bugs.debian.org/675692
+Description: backported fix for q{Directory tree view refresh problem}
+ this patch require 2835.patch
+
+--- a/src/filemanager/treestore.c
++++ b/src/filemanager/treestore.c
+@@ -850,13 +850,13 @@
+ len = vfs_path_len (ts.check_name);
+
+ current = ts.check_start;
+- while (current != NULL && vfs_path_cmp (current->name, ts.check_name) == 0)
++ while (current != NULL && vfs_path_ncmp (current->name, ts.check_name, len) == 0)
+ {
+ char *current_name;
+ gboolean ok;
+
+ current_name = vfs_path_to_str (current->name);
+- ok = (current_name[len] == '\0' || (current_name[len] == PATH_SEP || len == 1));
++ ok = (current_name[len] == '\0' || current_name[len] == PATH_SEP || len == 1);
+ g_free (current_name);
+ if (!ok)
+ break;
+@@ -907,7 +907,7 @@
+ ts.add_queue_vpath = g_list_reverse (ts.add_queue_vpath);
+ the_queue = ts.add_queue_vpath;
+ ts.add_queue_vpath = NULL;
+- g_free (ts.check_name);
++ vfs_path_free (ts.check_name);
+ ts.check_name = NULL;
+
+ g_list_foreach (the_queue, (GFunc) vfs_path_free, NULL);
diff --git a/debian/patches/2874.patch b/debian/patches/2874.patch
new file mode 100644
index 0000000..499f309
--- /dev/null
+++ b/debian/patches/2874.patch
@@ -0,0 +1,82 @@
+Last-Update: 2012-09-10
+Author: Dmitry Smirnov <onlyjob@member.fsf.org>
+Applied-Upstream: 4.8.5
+Forwarded: not-needed
+Bug-MC: https://www.midnight-commander.org/ticket/2874
+Description: backported fix for q{Can't create or enter directory "~"}
+ requires 2791.patch
+
+--- a/lib/vfs/path.c
++++ b/lib/vfs/path.c
+@@ -152,16 +152,11 @@
+ }
+ else
+ {
+- local = tilde_expand (path);
+- if (*local != PATH_SEP)
+- {
+- char *curr_dir;
++ char *curr_dir;
+
+- g_free (local);
+- curr_dir = vfs_get_current_dir ();
+- local = mc_build_filename (curr_dir, path, NULL);
+- g_free (curr_dir);
+- }
++ curr_dir = vfs_get_current_dir ();
++ local = mc_build_filename (curr_dir, path, NULL);
++ g_free (curr_dir);
+ }
+ result = vfs_canon (local);
+ g_free (local);
+--- a/src/filemanager/cmd.c
++++ b/src/filemanager/cmd.c
+@@ -952,16 +952,23 @@
+ input_expand_dialog (_("Create a new Directory"),
+ _("Enter directory name:"), MC_HISTORY_FM_MKDIR, name);
+
+- if (!dir)
+- return;
+-
+- if (*dir)
++ if (dir != NULL && dir != '\0')
+ {
+ vfs_path_t *absdir;
++
+ if (dir[0] == '/' || dir[0] == '~')
+ absdir = vfs_path_from_str (dir);
+ else
+- absdir = vfs_path_append_new (current_panel->cwd_vpath, dir, NULL);
++ {
++ /* possible escaped '~' */
++ /* allow create directory with name '~' */
++ char *tmpdir = dir;
++
++ if (dir[0] == '\\' && dir[1] == '~')
++ tmpdir = dir + 1;
++
++ absdir = vfs_path_append_new (current_panel->cwd_vpath, tmpdir, NULL);
++ }
+
+ save_cwds_stat ();
+ if (my_mkdir (absdir, 0777) == 0)
+--- a/src/filemanager/hotlist.c
++++ b/src/filemanager/hotlist.c
+@@ -1437,7 +1437,7 @@
+ label = g_strdup (tkn_buf->str);
+ CHECK_TOKEN (TKN_URL);
+ CHECK_TOKEN (TKN_STRING);
+- url = g_strdup (tkn_buf->str);
++ url = tilde_expand (tkn_buf->str);
+ add2hotlist (label, url, HL_TYPE_ENTRY, LISTBOX_APPEND_AT_END);
+ SKIP_TO_EOL;
+ }
+@@ -1491,7 +1491,7 @@
+ label = g_strdup (tkn_buf->str);
+ CHECK_TOKEN (TKN_URL);
+ CHECK_TOKEN (TKN_STRING);
+- url = g_strdup (tkn_buf->str);
++ url = tilde_expand (tkn_buf->str);
+ add2hotlist (label, url, HL_TYPE_ENTRY, LISTBOX_APPEND_AT_END);
+ SKIP_TO_EOL;
+ }
diff --git a/debian/patches/series b/debian/patches/series
index b198108..b55fa04 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -15,12 +15,19 @@ ext_use_dvicat_instead_of_dvi2tty.patch
## FORWARDED:
ext_gem_extension.patch
ext_cpio-xz.patch
man_spelling.patch
-## BACKPORTED: from 4.8.4
+## BACKPORTED: from 4.8.4/4.8.5
fix_rel_symlink.patch
fix_open_archive.patch
fix_broken_test.patch
fix_chown.patch
fix_nospace.patch
+2791.patch
2795.patch
2800.patch
+2835.patch
+2862.patch
+2832.patch
+2833.patch
+2807.patch
+2874.patch
diff --git a/debian/rules b/debian/rules
index 3b40b9d..cfaddbe 100755
--- a/debian/rules
+++ b/debian/rules
@@ -49,6 +49,9 @@ override_dh_installchangelogs:
override_dh_strip:
dh_strip --dbg-package=mc-dbg
+override_dh_builddeb:
+ dh_builddeb -- -Zxz
+
get-orig-source:
uscan --noconf --destdir=. --download-current-version --rename --verbose
Attachment:
signature.asc
Description: This is a digitally signed message part.