From 0d7f5b1e097a75508df174ee0a061c9aeeb81a61 Mon Sep 17 00:00:00 2001 From: Jindrich Novy Date: Jan 21 2020 12:56:46 +0000 Subject: mc-4.8.24-2.fc30 - update to 4.8.24 - drop merged tmpdir patch Signed-off-by: Jindrich Novy --- diff --git a/mc-default_setup.patch b/mc-default_setup.patch new file mode 100644 index 0000000..b2d34b2 --- /dev/null +++ b/mc-default_setup.patch @@ -0,0 +1,13 @@ +--- mc-4.8.23.orig/src/setup.c 2019-06-16 18:49:31.000000000 +0100 ++++ mc-4.8.23/src/setup.c 2019-07-06 13:13:22.792243501 +0100 +@@ -138,8 +138,8 @@ + .fast_reload_msg_shown = FALSE, + .mark_moves_down = TRUE, + .reverse_files_only = TRUE, +- .auto_save_setup = FALSE, +- .navigate_with_arrows = FALSE, ++ .auto_save_setup = TRUE, ++ .navigate_with_arrows = TRUE, + .scroll_pages = TRUE, + .scroll_center = FALSE, + .mouse_move_pages = TRUE, diff --git a/mc-python3.patch b/mc-python3.patch new file mode 100644 index 0000000..8b74e0d --- /dev/null +++ b/mc-python3.patch @@ -0,0 +1,70 @@ +diff -up mc-4.8.24/src/vfs/extfs/helpers/uc1541.python3 mc-4.8.24/src/vfs/extfs/helpers/uc1541 +--- mc-4.8.24/src/vfs/extfs/helpers/uc1541.python3 2020-01-20 14:40:30.637996501 +0100 ++++ mc-4.8.24/src/vfs/extfs/helpers/uc1541 2020-01-20 14:37:55.253442507 +0100 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + """ + UC1541 Virtual filesystem + +--- a/src/vfs/extfs/helpers/s3+.in (original) ++++ b/src/vfs/extfs/helpers/s3+.in (refactored) +@@ -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'(.*?)', 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') diff --git a/mc-rpm.patch b/mc-rpm.patch new file mode 100644 index 0000000..eeb6b43 --- /dev/null +++ b/mc-rpm.patch @@ -0,0 +1,25 @@ +diff -purN a/src/vfs/extfs/helpers/rpm b/src/vfs/extfs/helpers/rpm +--- a/src/vfs/extfs/helpers/rpm 2017-02-24 21:25:57.000000000 +0100 ++++ b/src/vfs/extfs/helpers/rpm 2017-02-25 02:37:57.000000000 +0100 +@@ -162,6 +162,10 @@ mcrpmfs_list_fastRPM () + echo "$FILEPREF 0 $DATE INFO/REQUIRES" + echo "$FILEPREF 0 $DATE INFO/OBSOLETES" + echo "$FILEPREF 0 $DATE INFO/PROVIDES" ++ echo "$FILEPREF 0 $DATE INFO/ENHANCES" ++ echo "$FILEPREF 0 $DATE INFO/SUGGESTS" ++ echo "$FILEPREF 0 $DATE INFO/RECOMMENDS" ++ echo "$FILEPREF 0 $DATE INFO/SUPPLEMENTS" + echo "$FILEPREF 0 $DATE INFO/CONFLICTS" + echo "$FILEPREF 0 $DATE INFO/CHANGELOG" + } +@@ -301,6 +305,10 @@ mcrpmfs_copyout () + INFO/LICENSE) mcrpmfs_getOneTag "LICENSE" >"$2"; exit 0;; + INFO/RPMVERSION) mcrpmfs_getRawOneTag "%{RPMVERSION}\n" >"$2"; exit 0;; + INFO/REQUIRES) mcrpmfs_getRawOneTag "[%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]" >"$2"; exit 0;; ++ INFO/ENHANCES) mcrpmfs_getRawOneTag "[%|ENHANCESFLAGS:depflag_strong?{}:{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" "$f" >"$3"; exit 0;; ++ INFO/SUGGESTS) mcrpmfs_getRawOneTag "[%|SUGGESTSFLAGS:depflag_strong?{}:{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" "$f" >"$3"; exit 0;; ++ INFO/RECOMMENDS) mcrpmfs_getRawOneTag "[%|SUGGESTSFLAGS:depflag_strong?{%{SUGGESTSNAME} %{SUGGESTSFLAGS:depflags} %{SUGGESTSVERSION}\n}|]" "$f" >"$3"; exit 0;; ++ INFO/SUPPLEMENTS) mcrpmfs_getRawOneTag "[%|ENHANCESFLAGS:depflag_strong?{%{ENHANCESNAME} %{ENHANCESFLAGS:depflags} %{ENHANCESVERSION}\n}|]" "$f" >"$3"; exit 0;; + INFO/PROVIDES) mcrpmfs_getRawOneTag "[%{PROVIDES} %{PROVIDEFLAGS:depflags} %{PROVIDEVERSION}\n]" >"$2"; exit 0;; + INFO/SCRIPTS/PRETRANS) mcrpmfs_getRawOneTag "%{RPMTAG_PRETRANS}\n" >"$2"; exit 0;; + INFO/SCRIPTS/PRETRANSPROG) mcrpmfs_getRawOneTag "%{RPMTAG_PRETRANSPROG}\n" >"$2"; exit 0;; diff --git a/mc-spec.syntax.patch b/mc-spec.syntax.patch new file mode 100644 index 0000000..d2fefbb --- /dev/null +++ b/mc-spec.syntax.patch @@ -0,0 +1,54 @@ +--- mc-4.8.23/misc/syntax/spec.syntax~ 2019-06-16 18:49:31.000000000 +0100 ++++ mc-4.8.23/misc/syntax/spec.syntax 2019-04-18 06:02:53.000000000 +0100 +@@ -5,25 +5,24 @@ + keyword whole Build\{Aa\}rch: green + keyword whole Build\{Cc\}onflicts: green + keyword whole Build\{Pp\}re\{Rr\}eq: green +- keyword whole Build\{Rr\}oot: green ++ keyword whole Build\{Rr\}oot: blue + keyword whole Build\{Rr\}equires: green + keyword whole Conflicts: green +- keyword whole Copyright: white ++ keyword whole Copyright: blue + keyword whole Description: green +- keyword whole Distribution: green +- keyword whole Doc\{Dd\}ir: green ++ keyword whole Distribution: blue ++ keyword whole Doc\{Dd\}ir: blue + keyword whole Epoch: green +- keyword whole Enhances: green + keyword whole Exclude\{Aa\}rch: green + keyword whole Exclusive\{Aa\}rch: green + keyword whole Exclusive\{Oo\}\{Ss\}: green +- keyword whole Group: green ++ keyword whole Group: blue + keyword whole Icon: green + keyword whole License: green + keyword whole Name: green + keyword whole NoSource\[0123456789\]: green + keyword whole Obsoletes: green +- keyword whole Packager: green ++ keyword whole Packager: blue + keyword whole Patch\[0123456789\]: green + keyword whole Prefix: green + keyword whole Pre\{Rr\}eq: green +@@ -37,8 +36,8 @@ + keyword whole Source\[0123456789\]: green + keyword whole Suggests: green + keyword whole Summary: green +- keyword whole Supplements: green +- keyword whole Vendor: green ++ keyword whole VCS: green ++ keyword whole Vendor: blue + keyword whole Version: green + keyword whole U\{Rr\}\{Ll\}: green + +@@ -92,7 +91,7 @@ + keyword whole PATCH\[0123456789\] cyan + keyword whole SOURCE\[0123456789\] cyan + +-context Group( ): green ++context Group( ): blue + keyword whole af yellow + keyword whole az yellow + keyword whole bg yellow diff --git a/mc-tmpdir.patch b/mc-tmpdir.patch deleted file mode 100644 index e6a2505..0000000 --- a/mc-tmpdir.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- mc-4.8.21/lib/global.h~ -+++ mc-4.8.21/lib/global.h -@@ -131,7 +131,7 @@ - #define PATH_SEP_STR "/" - #define IS_PATH_SEP(c) ((c) == PATH_SEP) - #define PATH_ENV_SEP ':' --#define TMPDIR_DEFAULT "/tmp" -+#define TMPDIR_DEFAULT "/var/tmp" - #define SCRIPT_SUFFIX "" - #define get_default_editor() "vi" - #define OS_SORT_CASE_SENSITIVE_DEFAULT TRUE ---- mc-4.8.22/contrib/mc-wrapper.csh.in~ -+++ mc-4.8.22/contrib/mc-wrapper.csh.in -@@ -3,7 +3,7 @@ - if ($?TMPDIR) then - setenv MC_PWD_FILE $TMPDIR/mc-$MC_USER/mc.pwd.$$ - else -- setenv MC_PWD_FILE /tmp/mc-$MC_USER/mc.pwd.$$ -+ setenv MC_PWD_FILE /var/tmp/mc-$MC_USER/mc.pwd.$$ - endif - - @bindir@/mc -P "$MC_PWD_FILE" $* ---- mc-4.8.22/contrib/mc-wrapper.sh.in~ -+++ mc-4.8.22/contrib/mc-wrapper.sh.in -@@ -1,5 +1,5 @@ - MC_USER=`id | sed 's/[^(]*(//;s/).*//'` --MC_PWD_FILE="${TMPDIR-/tmp}/mc-$MC_USER/mc.pwd.$$" -+MC_PWD_FILE="${TMPDIR-/var/tmp}/mc-$MC_USER/mc.pwd.$$" - @bindir@/mc -P "$MC_PWD_FILE" "$@" - - if test -r "$MC_PWD_FILE"; then diff --git a/mc.spec b/mc.spec index 6f59811..ba2bece 100644 --- a/mc.spec +++ b/mc.spec @@ -2,23 +2,26 @@ Summary: User-friendly text console file manager and visual shell Name: mc -Version: 4.8.23 -Release: 1%{?dist} Epoch: 1 +Version: 4.8.24 +Release: 2%{?dist} License: GPLv3+ URL: http://www.midnight-commander.org/ Source0: http://www.midnight-commander.org/downloads/mc-%{version}.tar.xz -Patch0: %{name}-tmpdir.patch -BuildRequires: aspell-devel +Patch1: %{name}-spec.syntax.patch +Patch2: %{name}-rpm.patch +Patch3: %{name}-python3.patch +Patch4: %{name}-default_setup.patch BuildRequires: e2fsprogs-devel BuildRequires: gcc BuildRequires: glib2-devel BuildRequires: gpm-devel BuildRequires: groff-base -BuildRequires: libssh2-devel >= 1.2.5 +BuildRequires: libssh2-devel >= 1.2.5 BuildRequires: %{?with_slang:slang-devel}%{!?with_slang:ncurses-devel} -BuildRequires: perl-generators BuildRequires: pkgconfig +BuildRequires: perl-generators +Suggests: mc-python %description Midnight Commander is a visual shell much like a file manager, only with @@ -26,15 +29,22 @@ many more features. It is a text mode application, but it also includes mouse support. Midnight Commander's best features are its ability to FTP, view tar and zip files, and to poke into RPMs for specific files. +%package python +Summary: Midnight Commander s3+ and UC1541 EXTFS backend scripts +BuildArch: noarch +Requires: %{name} = %{epoch}:%{version}-%{release} +Requires: python3-boto + +%description python +Midnight Commander s3+ and UC1541 EXTFS backend scripts. + %prep %autosetup -p1 %build %configure \ - PYTHON=/usr/bin/python2 \ - CFLAGS="%{optflags} -Wno-strict-aliasing" \ + PYTHON=%{__python3} \ --disable-rpath \ - --enable-aspell \ --enable-charset \ --enable-largefile \ --enable-vfs-cpio \ @@ -52,11 +62,9 @@ view tar and zip files, and to poke into RPMs for specific files. %make_build %install -install -d %{buildroot}%{_sysconfdir}/profile.d - %make_install -install contrib/mc.{sh,csh} %{buildroot}%{_sysconfdir}/profile.d +%__install contrib/mc.{sh,csh} -Dt %{buildroot}%{_sysconfdir}/profile.d %find_lang %{name} --with-man @@ -65,10 +73,8 @@ install contrib/mc.{sh,csh} %{buildroot}%{_sysconfdir}/profile.d %doc doc/FAQ doc/NEWS doc/README /etc/profile.d/* %dir %{_sysconfdir}/mc -%config(noreplace) %{_sysconfdir}/mc/mc.ext -%config(noreplace) %{_sysconfdir}/mc/*edit* -%config(noreplace) %{_sysconfdir}/mc/mc*.keymap -%config(noreplace) %{_sysconfdir}/mc/mc.menu* +%{_sysconfdir}/mc/edit* +%config(noreplace) %{_sysconfdir}/mc/mc* %config(noreplace) %{_sysconfdir}/mc/*.ini %{_bindir}/* %dir %{_libexecdir}/mc @@ -79,8 +85,16 @@ install contrib/mc.{sh,csh} %{buildroot}%{_sysconfdir}/profile.d %{_libexecdir}/mc/fish %{_datadir}/mc %{_mandir}/man1/* +%exclude %{_libexecdir}/mc/extfs.d/{s3+,uc1541} + +%files python +%{_libexecdir}/mc/extfs.d/{s3+,uc1541} %changelog +* Tue Jan 21 2020 Jindrich Novy - 1:4.8.24-2 +- update to 4.8.24 +- drop merged tmpdir patch + * Thu Aug 22 2019 Jindrich Novy - 1:4.8.23-1 - update to 4.8.23 - set the Python path properly as env var, don't sed the configure directly diff --git a/sources b/sources index c4d411c..201c372 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (mc-4.8.23.tar.xz) = e51c7f926d296280a57a8ecb5f4b296a850022b7ab9beaba89f5cb7554d8fc3e13c73b8571f78c3162ee85df88f7f46d07c9c893156cda4d1377a01071cdd1c6 +SHA512 (mc-4.8.24.tar.xz) = ec9e40198455e7001bb1d06ea060b9b4c32ad3a3750d0cc9bac334b53eb666df1746335bfcd411213fa4386b23e516f6026fe3d74ad9119b2340b26c63ccd4fc