diff --git a/.gitignore b/.gitignore index 0d93b2e..9671da0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/configshell-fb-1.1.fb23.tar.gz +SOURCES/configshell-fb-1.1.fb25.tar.gz diff --git a/.python-configshell.metadata b/.python-configshell.metadata index bdbef90..4ab2ee0 100644 --- a/.python-configshell.metadata +++ b/.python-configshell.metadata @@ -1 +1 @@ -4ad900763c31c1e8bcb5fec45aa5cbbf90bf5a74 SOURCES/configshell-fb-1.1.fb23.tar.gz +ed1da92035703003368cf5c7141dd4faa09ce1b8 SOURCES/configshell-fb-1.1.fb25.tar.gz diff --git a/SOURCES/0001-Handle-if-TERM-is-not-set.patch b/SOURCES/0001-Handle-if-TERM-is-not-set.patch deleted file mode 100644 index 114fe82..0000000 --- a/SOURCES/0001-Handle-if-TERM-is-not-set.patch +++ /dev/null @@ -1,33 +0,0 @@ -From daa66bc6acd2430cdd05e9883dd1eab69b698252 Mon Sep 17 00:00:00 2001 -From: Andy Grover -Date: Tue, 23 May 2017 12:00:10 -0700 -Subject: [PATCH] Handle if TERM is not set - -Previous patch causes problems otherwise in some cases. - -Signed-off-by: Andy Grover ---- - configshell/shell.py | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/configshell/shell.py b/configshell/shell.py -index c916366..e029c76 100644 ---- a/configshell/shell.py -+++ b/configshell/shell.py -@@ -50,13 +50,14 @@ else: - tty=False - - # remember the original setting -- oldTerm = os.environ['TERM'] -+ oldTerm = os.environ.get('TERM') - os.environ['TERM'] = '' - - import readline - - # restore the orignal TERM setting -- os.environ['TERM'] = oldTerm -+ if oldTerm != None: -+ os.environ['TERM'] = oldTerm - del oldTerm - - # Pyparsing helper to group the location of a token and its value diff --git a/SOURCES/0002-Fix-path-regex-for-and.patch b/SOURCES/0002-Fix-path-regex-for-and.patch deleted file mode 100644 index 101cfe8..0000000 --- a/SOURCES/0002-Fix-path-regex-for-and.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 744da6cbfb69d7cca3f38a51be0de98e7fa585d9 Mon Sep 17 00:00:00 2001 -From: Andy Grover -Date: Tue, 30 May 2017 15:37:25 -0700 -Subject: [PATCH] Fix path regex for [ and ] - -When dealing with ipv6, we now have paths consisting of square -brackets. We need to add these characters to the path regex for -them to match properly. - -Signed-off-by: Andy Grover ---- - configshell/shell.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configshell/shell.py b/configshell/shell.py -index e029c76..3d0fce9 100644 ---- a/configshell/shell.py -+++ b/configshell/shell.py -@@ -126,7 +126,7 @@ class ConfigShell(object): - parameter = kparam | pparam - parameters = OneOrMore(parameter) - bookmark = Regex('@([A-Za-z0-9:_.]|-)+') -- pathstd = Regex('([A-Za-z0-9:_.]|-)*' + '/' + '([A-Za-z0-9:_./]|-)*') \ -+ pathstd = Regex('([A-Za-z0-9:_.\[\]]|-)*' + '/' + '([A-Za-z0-9:_.\[\]/]|-)*') \ - | '..' | '.' - path = locatedExpr(bookmark | pathstd | '*')('path') - parser = Optional(path) + Optional(command) + Optional(parameters) diff --git a/SOURCES/0003-Fix-failing-to-pasre-par-val-parameters.patch b/SOURCES/0003-Fix-failing-to-pasre-par-val-parameters.patch deleted file mode 100644 index f82e484..0000000 --- a/SOURCES/0003-Fix-failing-to-pasre-par-val-parameters.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 8970d90888657ae352a6a48ba1e63f746005a163 Mon Sep 17 00:00:00 2001 -From: Xiubo Li -Date: Wed, 6 Sep 2017 17:31:26 +0800 -Subject: [PATCH] Fix failing to pasre par=val parameters - -Through targetcli-fb to create LIO ceph target device like: -/backstores/user:rbd> create block0 10G pool/rbd1/osd_op_timeout=30 -the =30 will be ignored. - -Signed-off-by: Xiubo Li ---- - configshell/shell.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configshell/shell.py b/configshell/shell.py -index 3d0fce9..382d67b 100644 ---- a/configshell/shell.py -+++ b/configshell/shell.py -@@ -118,7 +118,7 @@ class ConfigShell(object): - - # Grammar of the command line - command = locatedExpr(Word(alphanums + '_'))('command') -- var = Word(alphanums + '_\+/.<>()~@:-%[]') -+ var = Word(alphanums + '=_\+/.<>()~@:-%[]') - value = var - keyword = Word(alphanums + '_\-') - kparam = locatedExpr(keyword + Suppress('=') + Optional(value, default=''))('kparams*') --- -1.8.3.1 - diff --git a/SOURCES/0004-Fix-failing-to-pasre-param-like-cfgstr-par-val.patch b/SOURCES/0004-Fix-failing-to-pasre-param-like-cfgstr-par-val.patch deleted file mode 100644 index 8b30987..0000000 --- a/SOURCES/0004-Fix-failing-to-pasre-param-like-cfgstr-par-val.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 341018797fcb47bdeda1a5c87266d4b14f51c945 Mon Sep 17 00:00:00 2001 -From: Xiubo Li -Date: Thu, 22 Feb 2018 01:46:20 -0500 -Subject: [PATCH] Fix failing to pasre param like "cfgstr,par=val" - -Through targetcli-fb to create LIO ceph target device like: -/backstores/user:rbd create block0 1G pool/blk,max_data_area_mb=16 -then the ",max_data_area_mb=16" string will be ignored. - -Signed-off-by: Xiubo Li ---- - configshell/shell.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configshell/shell.py b/configshell/shell.py -index 96c754a..3400f6d 100644 ---- a/configshell/shell.py -+++ b/configshell/shell.py -@@ -118,7 +118,7 @@ class ConfigShell(object): - - # Grammar of the command line - command = locatedExpr(Word(alphanums + '_'))('command') -- var = Word(alphanums + '=_\+/.<>()~@:-%[]') -+ var = Word(alphanums + ',=_\+/.<>()~@:-%[]') - value = var - keyword = Word(alphanums + '_\-') - kparam = locatedExpr(keyword + Suppress('=') + Optional(value, default=''))('kparams*') --- -1.8.3.1 - diff --git a/SPECS/python-configshell.spec b/SPECS/python-configshell.spec index dd51480..bdf1b1b 100644 --- a/SPECS/python-configshell.spec +++ b/SPECS/python-configshell.spec @@ -7,14 +7,10 @@ License: ASL 2.0 Group: System Environment/Libraries Summary: A framework to implement simple but nice CLIs Epoch: 1 -Version: 1.1.fb23 -Release: 5%{?dist} +Version: 1.1.fb25 +Release: 1%{?dist} URL: https://fedorahosted.org/targetcli-fb/ Source: https://fedorahosted.org/released/targetcli-fb/%{oname}-%{version}.tar.gz -Patch0: 0001-Handle-if-TERM-is-not-set.patch -Patch1: 0002-Fix-path-regex-for-and.patch -Patch2: 0003-Fix-failing-to-pasre-par-val-parameters.patch -Patch3: 0004-Fix-failing-to-pasre-param-like-cfgstr-par-val.patch BuildArch: noarch BuildRequires: python-devel python-setuptools Requires: pyparsing python-urwid python-six @@ -25,10 +21,6 @@ command-line interfaces. %prep %setup -q -n %{oname}-%{version} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 %build %{__python} setup.py build @@ -42,6 +34,9 @@ rm -rf %{buildroot} %doc COPYING README.md %changelog +* Wed Jan 30 2019 Maurizio Lombardi - 1:1.1.fb25-1 +- Rebase python-configshell to the latest upstream version + * Fri Aug 10 2018 Maurizio Lombardi - 1:1.1.fb23-5 - Respin a new release of python-configshell to avoid problems with TPS tests