From ab26de74b119ee67983590dcd1d9d589c84b86ca Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 01 2017 03:39:40 +0000 Subject: import python-configshell-1.1.fb23-3.el7 --- diff --git a/.gitignore b/.gitignore index 010c50c..0d93b2e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/configshell-fb-1.1.fb18.tar.gz +SOURCES/configshell-fb-1.1.fb23.tar.gz diff --git a/.python-configshell.metadata b/.python-configshell.metadata index c5197c5..bdbef90 100644 --- a/.python-configshell.metadata +++ b/.python-configshell.metadata @@ -1 +1 @@ -25fe5cb693ecee890007c692fc79b28a0c5b6483 SOURCES/configshell-fb-1.1.fb18.tar.gz +4ad900763c31c1e8bcb5fec45aa5cbbf90bf5a74 SOURCES/configshell-fb-1.1.fb23.tar.gz diff --git a/SOURCES/0001-Handle-if-TERM-is-not-set.patch b/SOURCES/0001-Handle-if-TERM-is-not-set.patch new file mode 100644 index 0000000..114fe82 --- /dev/null +++ b/SOURCES/0001-Handle-if-TERM-is-not-set.patch @@ -0,0 +1,33 @@ +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 new file mode 100644 index 0000000..101cfe8 --- /dev/null +++ b/SOURCES/0002-Fix-path-regex-for-and.patch @@ -0,0 +1,27 @@ +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/SPECS/python-configshell.spec b/SPECS/python-configshell.spec index a5adf4a..afb67fd 100644 --- a/SPECS/python-configshell.spec +++ b/SPECS/python-configshell.spec @@ -7,10 +7,12 @@ License: ASL 2.0 Group: System Environment/Libraries Summary: A framework to implement simple but nice CLIs Epoch: 1 -Version: 1.1.fb18 -Release: 1%{?dist} +Version: 1.1.fb23 +Release: 3%{?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 BuildArch: noarch BuildRequires: python-devel python-setuptools Requires: pyparsing python-urwid python-six @@ -21,6 +23,8 @@ command-line interfaces. %prep %setup -q -n %{oname}-%{version} +%patch0 -p1 +%patch1 -p1 %build %{__python} setup.py build @@ -34,6 +38,16 @@ rm -rf %{buildroot} %doc COPYING README.md %changelog +* Tue May 30 2017 Andy Grover - 1:1.1.fb23-3 +- Rename configshell-fix-term.patch to 0001* +- Add 0002-Fix-path-regex-for-and.patch + +* Tue May 23 2017 Andy Grover - 1:1.1.fb23-2 +- Add configshell-fix-term.patch + +* Thu Mar 2 2017 Andy Grover - 1:1.1.fb23-1 +- Update to latest in Fedora + * Wed Jul 15 2015 Andy Grover - 1:1.1.fb18-1 - Update to latest in Fedora