- release 3
- add python3 patch: port to python3 (added python3 patch) - added python subpackage with s3+ and uc1541 extfs backend scrips to minimise base package dependencies - added python3-boto to python subpackage dependencies - use -Wno-strict-aliasing in CFLAGS is no longer needed - added spec.syntax patch: improve rpm spec files syntax colouring - added default_setup patch: enable by default lynx navigate with arrows keys and auto save setup
This commit is contained in:
parent
6008b58bba
commit
08dede945b
13
mc-default_setup.patch
Normal file
13
mc-default_setup.patch
Normal file
@ -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,
|
61
mc-python3.patch
Normal file
61
mc-python3.patch
Normal file
@ -0,0 +1,61 @@
|
||||
--- 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'<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')
|
25
mc-rpm.patch
Normal file
25
mc-rpm.patch
Normal file
@ -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;;
|
54
mc-spec.syntax.patch
Normal file
54
mc-spec.syntax.patch
Normal file
@ -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
|
39
mc.spec
39
mc.spec
@ -2,13 +2,17 @@
|
||||
|
||||
Summary: User-friendly text console file manager and visual shell
|
||||
Name: mc
|
||||
Version: 4.8.23
|
||||
Release: 2%{?dist}
|
||||
Epoch: 1
|
||||
Version: 4.8.23
|
||||
Release: 3%{?dist}
|
||||
License: GPLv3+
|
||||
URL: http://www.midnight-commander.org/
|
||||
Source0: http://www.midnight-commander.org/downloads/mc-%{version}.tar.xz
|
||||
Patch0: %{name}-tmpdir.patch
|
||||
Patch0: %{name}-spec.syntax.patch
|
||||
Patch1: %{name}-rpm.patch
|
||||
Patch2: %{name}-python3.patch
|
||||
Patch3: %{name}-default_setup.patch
|
||||
BuildRequires: aspell-devel
|
||||
BuildRequires: e2fsprogs-devel
|
||||
BuildRequires: gcc
|
||||
@ -19,6 +23,7 @@ BuildRequires: libssh2-devel >= 1.2.5
|
||||
BuildRequires: %{?with_slang:slang-devel}%{!?with_slang:ncurses-devel}
|
||||
BuildRequires: perl-generators
|
||||
BuildRequires: pkgconfig
|
||||
Suggests: mc-python
|
||||
|
||||
%description
|
||||
Midnight Commander is a visual shell much like a file manager, only with
|
||||
@ -26,13 +31,21 @@ 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 \
|
||||
@ -52,11 +65,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} -D %{buildroot}%{_sysconfdir}/profile.d
|
||||
|
||||
%find_lang %{name} --with-man
|
||||
|
||||
@ -77,8 +88,22 @@ 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
|
||||
* Sat 28 Sep 2019 Tomasz Kłoczko <kloczek@fedoraproject.org> - 1:4.8.23-3
|
||||
- add python3 patch: port to python3 (added python3 patch)
|
||||
- added python subpackage with s3+ and uc1541 extfs backend scrips to minimise
|
||||
base package dependencies
|
||||
- added python3-boto to python subpackage dependencies
|
||||
- use -Wno-strict-aliasing in CFLAGS is no longer needed
|
||||
- added spec.syntax patch: improve rpm spec files syntax colouring
|
||||
- added default_setup patch: enable by default lynx navigate with arrows keys
|
||||
and auto save setup
|
||||
|
||||
* Tue Sep 24 2019 Jindrich Novy <jnovy@redhat.com> - 1:4.8.23-2
|
||||
- fix rpmlint warnings and simplify filelist
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user