mc: update to 4.8.31.

Removed the mksh patch since it was purely adding a feature that isn't
related to void, hasn't been accepted by upstream (yet?), and that the
correctness of which is unclear. I also don't use mksh and have no way
to ensure the patch is still good or remains good in the future.
See: https://midnight-commander.org/ticket/3748
This commit is contained in:
0x5c 2024-02-12 04:29:41 -05:00 committed by classabbyamp
parent 4696974822
commit 9c58265122
5 changed files with 8 additions and 142 deletions

View File

@ -29,7 +29,7 @@ the mc package and must be installed manually for the backends to work properly.
| `unar` unar wrapper | `unar` |
| `urar` RAR archive support | `unrar` |
| `uwim` Windows WIM archive support | `wimlib` |
| `uzip` ZIP archive support | `perl zip unzip` |
| `uzip` ZIP archive support | `perl zip unzip` |
`[common_archivers]` refers to the following archivers/compressors: `bzip2 gzip lz4 lzip xz zstd`.

View File

@ -1,80 +1,13 @@
Taken from https://src.fedoraproject.org/rpms/mc/blob/rawhide/f/mc-python3.patch
Also see https://github.com/MidnightCommander/mc/pull/149
Fix interpreter line, which https://github.com/MidnightCommander/mc/commit/ea6bd1866e7de2f2db6291bed75e7c2398b9eda4
somehow didn't include
--
--- a/src/vfs/extfs/helpers/uc1541
+++ b/src/vfs/extfs/helpers/uc1541
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
"""
UC1541 Virtual filesystem
--- a/src/vfs/extfs/helpers/s3+.in
+++ b/src/vfs/extfs/helpers/s3+.in
@@ -1,4 +1,4 @@
-#! @PYTHON@
+#! /usr/bin/env python3
# -*- coding: utf-8 -*-
#
@@ -153,16 +153,16 @@
Propagates exception safely.
"""
from threading import Thread
- import Queue
+ import queue
items = list(iterable)
nitems = len(items)
if nitems < 2:
- return map(fun, items)
+ return list(map(fun, items))
# Create and fill input queue
- input = Queue.Queue()
- output = Queue.Queue()
+ input = queue.Queue()
+ output = queue.Queue()
for i,item in enumerate(items):
input.put( (i,item) )
@@ -181,7 +181,7 @@
output.put( (i,result) )
except:
output.put( (None,sys.exc_info()) )
- except Queue.Empty:
+ except queue.Empty:
return
# Start threads
@@ -196,8 +196,8 @@
try:
i,res = output.get()
if i == None:
- raise res[0],res[1],res[2]
- except Queue.Empty:
+ raise res[0](res[1]).with_traceback(res[2])
+ except queue.Empty:
break
ret.append(res)
@@ -241,7 +241,7 @@
b = s3.get_bucket(name, validate=False)
b.get_location() # just to raise an exception on error
return b
- except boto.exception.S3ResponseError, e:
+ except boto.exception.S3ResponseError as e:
# Seems this is the only proper way to switch to the bucket's region.
# Requesting of the default region for "?location" does not work unfortunately.
m = re.search(r'<Region>(.*?)</Region>', e.body)
@@ -340,7 +340,7 @@
expr = re.compile(r'^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})\.\d{3}Z$')
def convDate(awsdatetime):
m = expr.match(awsdatetime)
- ye,mo,da,ho,mi,se = map(int,m.groups())
+ ye,mo,da,ho,mi,se = list(map(int,m.groups()))
dt = datetime.datetime(ye,mo,da,ho,mi,se, tzinfo=pytz.utc)
return dt.astimezone(tz).strftime('%m-%d-%Y %H:%M')

View File

@ -1,67 +0,0 @@
--- a/lib/shell.c
+++ b/lib/shell.c
@@ -68,6 +68,8 @@ mc_shell_get_installed_in_system (void)
mc_shell->path = g_strdup ("/bin/bash");
else if (access ("/bin/ash", X_OK) == 0)
mc_shell->path = g_strdup ("/bin/ash");
+ else if (access ("/bin/mksh", X_OK) == 0)
+ mc_shell->path = g_strdup ("/bin/mksh");
else if (access ("/bin/dash", X_OK) == 0)
mc_shell->path = g_strdup ("/bin/dash");
else if (access ("/bin/busybox", X_OK) == 0)
@@ -149,6 +151,12 @@ mc_shell_recognize_real_path (mc_shell_t * mc_shell)
mc_shell->type = SHELL_ZSH;
mc_shell->name = "zsh";
}
+ else if (strstr (mc_shell->path, "/mksh") != NULL
+ || strstr (mc_shell->real_path, "/mksh") != NULL)
+ {
+ mc_shell->type = SHELL_MKSH;
+ mc_shell->name = "mksh";
+ }
else if (strstr (mc_shell->path, "/tcsh") != NULL
|| strstr (mc_shell->real_path, "/tcsh") != NULL)
{
--- a/lib/shell.h
+++ b/lib/shell.h
@@ -16,6 +16,7 @@ typedef enum
SHELL_BASH,
SHELL_ASH_BUSYBOX, /* BusyBox default shell (ash) */
SHELL_DASH, /* Debian variant of ash */
+ SHELL_MKSH,
SHELL_TCSH,
SHELL_ZSH,
SHELL_FISH
--- a/src/subshell/common.c
+++ b/src/subshell/common.c
@@ -378,6 +378,11 @@ init_subshell_child (const char *pty_name)
}
break;
+ case SHELL_MKSH:
+ init_file = g_strdup (".shrc");
+ g_setenv ("ENV", init_file, TRUE);
+ break;
+
/* TODO: Find a way to pass initfile to TCSH and FISH */
case SHELL_TCSH:
case SHELL_FISH:
@@ -427,6 +432,7 @@ init_subshell_child (const char *pty_name)
case SHELL_ASH_BUSYBOX:
case SHELL_DASH:
+ case SHELL_MKSH:
case SHELL_TCSH:
case SHELL_FISH:
execl (mc_global.shell->path, mc_global.shell->path, (char *) NULL);
@@ -1091,6 +1097,10 @@ init_subshell_precmd (char *precmd, size_t buff_size)
"PS1='\\u@\\h:\\w\\$ '\n", command_buffer_pipe[WRITE],
command_buffer_pipe[WRITE], subshell_pipe[WRITE]);
break;
+ case SHELL_MKSH:
+ g_snprintf (precmd, buff_size,
+ "PS1='$(pwd>&%d; kill -STOP $$)'\"$((( USER_ID )) && print '$ ' || print '# ')\"\n", subshell_pipe[WRITE]);
+ break;
case SHELL_ASH_BUSYBOX:
/* BusyBox ash needs a somewhat complicated precmd emulation via PS1, and it is vital

View File

@ -7,8 +7,8 @@
-# .tar.xz, .txz
+# .tar.xz, .txz, .xbps
[tar.xz]
-Regex=\.t(ar\.xz|xz)$
+Regex=\.(t(ar\.xz|xz)|xbps)$
-Regex=\\.t(ar\\.xz|xz)$
+Regex=\\.(t(ar\\.xz|xz)|xbps)$
Open=%cd %p/utar://
View=%view{ascii} @EXTHELPERSDIR@/archive.sh view tar.xz

View File

@ -1,6 +1,6 @@
# Template file for 'mc'
pkgname=mc
version=4.8.30
version=4.8.31
revision=1
build_style=gnu-configure
configure_args="--with-screen=slang --without-x"
@ -12,7 +12,7 @@ license="GPL-3.0-or-later"
homepage="https://midnight-commander.org/"
changelog="https://midnight-commander.org/wiki/NEWS-${version}"
distfiles="https://www.midnight-commander.org/downloads/mc-${version}.tar.xz"
checksum=5ebc3cb2144b970c5149fda556c4ad50b78780494696cdf2d14a53204c95c7df
checksum=24191cf8667675b8e31fc4a9d18a0a65bdc0598c2c5c4ea092494cd13ab4ab1a
conf_files="
/etc/mc/filehighlight.ini