22490413 Midnight Commander should be updated
authorMilan Cermak <Milan.Cermak@oracle.com>
Fri, 29 Jan 2016 13:11:39 +0100
changeset 5369 f78fddfac74d
parent 5368 b55484323597
child 5372 0f0d5e50998d
22490413 Midnight Commander should be updated
components/mc/Makefile
components/mc/patches/infopanel-cant-statvfs.patch
components/mc/patches/infopanel-follow-symlinks.patch
--- a/components/mc/Makefile	Thu Jan 28 23:01:44 2016 -0800
+++ b/components/mc/Makefile	Fri Jan 29 13:11:39 2016 +0100
@@ -20,22 +20,22 @@
 #
 
 #
-# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 
 include ../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		mc
-COMPONENT_VERSION=	4.8.13
+COMPONENT_VERSION=	4.8.15
 COMPONENT_PROJECT_URL=	http://www.midnight-commander.org/
 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.bz2
 COMPONENT_ARCHIVE_HASH=	\
-    sha256:22e1b809edba957eb9a392138bf87fea3877f7ca0b7463b7cc2eb94afa6f3e49
+    sha256:f74e3da70410975cdeb27ee9a66d1dd812250b6d3ede364bca728dd5a48e5471
 COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)downloads/$(COMPONENT_ARCHIVE)
 COMPONENT_BUGDB=	utility/mc
 
-TPNO=			20604
+TPNO=			26430
 
 include $(WS_MAKE_RULES)/prep.mk
 include $(WS_MAKE_RULES)/configure.mk
@@ -49,7 +49,6 @@
 CONFIGURE_OPTIONS += --enable-charset
 CONFIGURE_OPTIONS += --without-ext2undel
 CONFIGURE_OPTIONS += --with-screen=slang
-CONFIGURE_OPTIONS += --enable-vfs-sftp=no
 CONFIGURE_OPTIONS += "mc_cv_nroff_tascii="
 CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
 
@@ -65,10 +64,11 @@
 
 test:		$(NO_TESTS)
 
-system-test:    $(NO_TESTS)
+system-test:	$(NO_TESTS)
 
 
 REQUIRED_PACKAGES += library/glib2
+REQUIRED_PACKAGES += library/libssh2
 REQUIRED_PACKAGES += library/slang
 REQUIRED_PACKAGES += runtime/perl-512
 REQUIRED_PACKAGES += runtime/perl-520
--- a/components/mc/patches/infopanel-cant-statvfs.patch	Thu Jan 28 23:01:44 2016 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-Upstream bugId: #3277
-Synopsis: Info panel can't obtain file system statistics
-Bug record: https://www.midnight-commander.org/ticket/3277
-
-diff -Naur mc-4.8.13.old/src/filemanager/mountlist.c mc-4.8.13.new/src/filemanager/mountlist.c
---- mc-4.8.13.old/src/filemanager/mountlist.c	2014-09-02 11:23:58.000000000 +0200
-+++ mc-4.8.13.new/src/filemanager/mountlist.c	2014-09-26 17:07:08.135044849 +0200
[email protected]@ -999,9 +999,9 @@
-         char *table = MNTTAB;
-         FILE *fp;
-         int ret;
--        int lockfd;
- 
- #if defined F_RDLCK && defined F_SETLKW
-+        int lockfd;
-         /* MNTTAB_LOCK is a macro name of our own invention; it's not present in
-            e.g. Solaris 2.6.  If the SVR4 folks ever define a macro
-            for this file name, we should use their macro name instead.
[email protected]@ -1056,8 +1056,10 @@
-             ret = fclose (fp) == EOF ? errno : 0 < ret ? 0 : -1;
-         }
- 
-+#if defined F_RDLCK && defined F_SETLKW
-         if (lockfd >= 0 && close (lockfd) != 0)
-             ret = errno;
-+#endif
- 
-         if (ret >= 0)
-         {
--- a/components/mc/patches/infopanel-follow-symlinks.patch	Thu Jan 28 23:01:44 2016 -0800
+++ b/components/mc/patches/infopanel-follow-symlinks.patch	Fri Jan 29 13:11:39 2016 +0100
@@ -2,36 +2,38 @@
 Synopsis: Info panel should follow symlinks
 Bug record: https://www.midnight-commander.org/ticket/3278
 
-diff -Naur mc-4.8.13.old/src/filemanager/mountlist.c mc-4.8.13.new/src/filemanager/mountlist.c
---- mc-4.8.13.old/src/filemanager/mountlist.c	2014-09-02 11:23:58.000000000 +0200
-+++ mc-4.8.13.new/src/filemanager/mountlist.c	2014-09-26 17:07:08.135044849 +0200
[email protected]@ -1598,18 +1600,22 @@
+diff -Naur mc-4.8.15.orig/src/filemanager/mountlist.c mc-4.8.15/src/filemanager/mountlist.c
+--- mc-4.8.15.orig/src/filemanager/mountlist.c	2015-11-06 10:11:09.000000000 +0100
++++ mc-4.8.15/src/filemanager/mountlist.c	2015-11-13 10:04:32.267994401 +0100
[email protected]@ -1704,11 +1704,15 @@
  my_statfs (struct my_statfs *myfs_stats, const char *path)
  {
  #ifdef HAVE_INFOMOUNT_LIST
 +    const char *rpath;
      size_t len = 0;
      struct mount_entry *entry = NULL;
-     struct mount_entry *temp = mc_mount_list;
+     GSList *temp;
      struct fs_usage fs_use;
  
 +    if ((rpath = realpath(path, NULL)) == NULL)
 +        rpath = path;
 +
-     while (temp)
+     for (temp = mc_mount_list; temp != NULL; temp = g_slist_next (temp))
      {
-         size_t i;
+         struct mount_entry *me;
[email protected]@ -1716,8 +1720,8 @@
  
-         i = strlen (temp->me_mountdir);
--        if (i > len && (strncmp (path, temp->me_mountdir, i) == 0))
--            if (!entry || (path[i] == PATH_SEP || path[i] == '\0'))
-+        if (i > len && (strncmp (rpath, temp->me_mountdir, i) == 0))
-+            if (!entry || (rpath[i] == PATH_SEP || rpath[i] == '\0'))
-             {
-                 len = i;
-                 entry = temp;
[email protected]@ -1620,7 +1626,7 @@
-     if (entry)
+         me = (struct mount_entry *) temp->data;
+         i = strlen (me->me_mountdir);
+-        if (i > len && (strncmp (path, me->me_mountdir, i) == 0) &&
+-            (entry == NULL || IS_PATH_SEP (path[i]) || path[i] == '\0'))
++        if (i > len && (strncmp (rpath, me->me_mountdir, i) == 0) &&
++            (entry == NULL || IS_PATH_SEP (rpath[i]) || rpath[i] == '\0'))
+         {
+             len = i;
+             entry = me;
[email protected]@ -1727,7 +1731,7 @@
+     if (entry != NULL)
      {
          memset (&fs_use, 0, sizeof (struct fs_usage));
 -        get_fs_usage (entry->me_mountdir, NULL, &fs_use);
@@ -39,7 +41,7 @@
  
          myfs_stats->type = entry->me_dev;
          myfs_stats->typename = entry->me_type;
[email protected]@ -1672,6 +1678,11 @@
[email protected]@ -1781,6 +1785,11 @@
          myfs_stats->nfree = 0;
          myfs_stats->nodes = 0;
      }