19702624 Update Midnight Commander
authorMilan Cermak <Milan.Cermak@oracle.com>
Thu, 18 Dec 2014 13:47:34 +0100
changeset 3561 8806d147c2d5
parent 3558 2cec274f17fc
child 3563 a34ad418afb9
19702624 Update Midnight Commander
components/mc/Makefile
components/mc/patches/infopanel-cant-statvfs.patch
components/mc/patches/infopanel-follow-symlinks.patch
--- a/components/mc/Makefile	Wed Dec 17 15:33:37 2014 -0800
+++ b/components/mc/Makefile	Thu Dec 18 13:47:34 2014 +0100
@@ -26,16 +26,16 @@
 include ../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		mc
-COMPONENT_VERSION=	4.8.8
+COMPONENT_VERSION=	4.8.13
 COMPONENT_PROJECT_URL=	http://www.midnight-commander.org/
 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.bz2
 COMPONENT_ARCHIVE_HASH=	\
-    sha256:7b5e6f90e6709d1c1bcb4a2bf6d2a62b9494adef3ff4325ffdb3551c29e42a1c
+    sha256:22e1b809edba957eb9a392138bf87fea3877f7ca0b7463b7cc2eb94afa6f3e49
 COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)downloads/$(COMPONENT_ARCHIVE)
 COMPONENT_BUGDB=	utility/mc
 
-TPNO=			13150
+TPNO=			20604
 
 include ../../make-rules/prep.mk
 include ../../make-rules/configure.mk
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/mc/patches/infopanel-cant-statvfs.patch	Thu Dec 18 13:47:34 2014 +0100
@@ -0,0 +1,29 @@
+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)
+         {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/mc/patches/infopanel-follow-symlinks.patch	Thu Dec 18 13:47:34 2014 +0100
@@ -0,0 +1,53 @@
+Upstream bugID: #3278
+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 @@
+ 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;
+     struct fs_usage fs_use;
+ 
++    if ((rpath = realpath(path, NULL)) == NULL)
++        rpath = path;
++
+     while (temp)
+     {
+         size_t i;
+ 
+         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)
+     {
+         memset (&fs_use, 0, sizeof (struct fs_usage));
+-        get_fs_usage (entry->me_mountdir, NULL, &fs_use);
++        get_fs_usage (rpath, NULL, &fs_use);
+ 
+         myfs_stats->type = entry->me_dev;
+         myfs_stats->typename = entry->me_type;
[email protected]@ -1672,6 +1678,11 @@
+         myfs_stats->nfree = 0;
+         myfs_stats->nodes = 0;
+     }
++
++#ifdef HAVE_INFOMOUNT_LIST
++    if (rpath != path)
++        free((void *) rpath);
++#endif /* HAVE_INFOMOUNT_LIST */
+ }
+ 
+ /* --------------------------------------------------------------------------------------------- */