Compare commits
2 Commits
c8
...
imports/c1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
735ac2cf7e | ||
| 7def422621 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/configshell-fb-1.1.28.tar.gz
|
configshell-fb-1.1.30.tar.gz
|
||||||
|
|||||||
@ -1 +0,0 @@
|
|||||||
c376cac2981a18581030a645d6bcf6ceeaed7523 SOURCES/configshell-fb-1.1.28.tar.gz
|
|
||||||
@ -1,35 +1,37 @@
|
|||||||
# Copyright 2011, Red Hat
|
# Copyright 2011, Red Hat
|
||||||
|
|
||||||
%global oname configshell-fb
|
%global oname configshell-fb
|
||||||
|
|
||||||
Name: python-configshell
|
Name: python-configshell
|
||||||
License: ASL 2.0
|
License: Apache-2.0
|
||||||
Group: System Environment/Libraries
|
|
||||||
Summary: A framework to implement simple but nice CLIs
|
Summary: A framework to implement simple but nice CLIs
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 1.1.28
|
Version: 1.1.30
|
||||||
Release: 1%{?dist}
|
Release: 9%{?dist}
|
||||||
URL: https://github.com/open-iscsi/%{oname}
|
URL: https://github.com/open-iscsi/configshell-fb
|
||||||
Source: %{url}/archive/v%{version}/%{oname}-%{version}.tar.gz
|
Source: %{url}/archive/v%{version}/%{oname}-%{version}.tar.gz
|
||||||
|
Patch0: regex.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: python3-devel python3-setuptools
|
BuildRequires: python3-devel python3-setuptools
|
||||||
|
|
||||||
%description
|
%global _description\
|
||||||
A framework to implement simple but nice configuration-oriented\
|
A framework to implement simple but nice configuration-oriented\
|
||||||
command-line interfaces.
|
command-line interfaces.
|
||||||
|
|
||||||
|
%description %_description
|
||||||
|
|
||||||
%package -n python3-configshell
|
%package -n python3-configshell
|
||||||
Summary: A framework to implement simple but nice CLIs
|
Summary: A framework to implement simple but nice CLIs
|
||||||
Group: System Environment/Libraries
|
|
||||||
Requires: python3-pyparsing python3-urwid
|
Requires: python3-pyparsing python3-urwid
|
||||||
|
%{?python_provide:%python_provide python3-configshell}
|
||||||
|
|
||||||
%description -n python3-configshell
|
%description -n python3-configshell %_description
|
||||||
A framework to implement simple but nice configuration-oriented
|
|
||||||
command-line interfaces.
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{oname}-%{version}
|
%setup -q -n %{oname}-%{version}
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
|
sed -r -i "s/'pyparsing.*'/'pyparsing'/" setup.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py3_build
|
%py3_build
|
||||||
@ -38,21 +40,108 @@ command-line interfaces.
|
|||||||
%py3_install
|
%py3_install
|
||||||
|
|
||||||
%files -n python3-configshell
|
%files -n python3-configshell
|
||||||
%{python3_sitelib}/*
|
%{python3_sitelib}/configshell*
|
||||||
%doc COPYING README.md
|
%doc COPYING README.md
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon May 11 2020 Maurizio Lombardi <mlombard@redhat.com> - 1:1.1.28-1
|
* Fri Oct 24 2025 Maurizio Lombardi <mlombard@redhat.com> - 1:1.1.30-9
|
||||||
- Update to a new upstream version
|
- Fix syntax warning when running in image mode (RHEL-123591)
|
||||||
|
|
||||||
* Mon Nov 18 2019 Maurizio Lombardi <mlombard@redhat.com> - 1:1.1.27-1
|
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1:1.1.30-8
|
||||||
- Update to new upstream version
|
- Bump release for October 2024 mass rebuild:
|
||||||
|
Resolves: RHEL-64018
|
||||||
|
|
||||||
* Thu Sep 06 2018 Maurizio Lombardi <mlombard@redhat.com> - 1:1.1.fb25-1
|
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1:1.1.30-7
|
||||||
- Update to new upstream version
|
- Bump release for June 2024 mass rebuild
|
||||||
|
|
||||||
* Wed May 30 2018 Petr Viktorin <pviktori@redhat.com> - 1:1.1.fb24-4
|
* Mon Feb 12 2024 Maurizio Lombardi <mlombard@redhat.com> - 1:1.1.30-6
|
||||||
- Drop the Python2 subpackage
|
- Migrated to SPDX License
|
||||||
|
|
||||||
|
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1.30-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1.30-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1.30-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 1:1.1.30-2
|
||||||
|
- Rebuilt for Python 3.12
|
||||||
|
|
||||||
|
* Tue Jun 06 2023 Maurizio Lombardi <mlombard@redhat.com> - 1:1.1.30-1
|
||||||
|
- Rebase to version v1.1.30
|
||||||
|
|
||||||
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1.29-10
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Aug 03 2022 Vojtech Trefny <vtrefny@redhat.com> - 1:1.1.29-9
|
||||||
|
- Python 3.11: replace getargspec() with getfullargspec()
|
||||||
|
|
||||||
|
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1.29-8
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jul 19 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1:1.1.29-7
|
||||||
|
- Rebuilt for pyparsing-3.0.9
|
||||||
|
|
||||||
|
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 1:1.1.29-5
|
||||||
|
- Rebuilt for Python 3.11
|
||||||
|
|
||||||
|
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1.29-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1.29-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1:1.1.29-2
|
||||||
|
- Rebuilt for Python 3.10
|
||||||
|
|
||||||
|
* Mon May 17 2021 Maurizio Lombardi <mlombard@redhat.com> - 1:1.1.29-1
|
||||||
|
- Update to version 1.1.29
|
||||||
|
|
||||||
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1.28-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1.28-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Jun 18 2020 Matt Coleman <matt@datto.com> - 1:1.1.28-1
|
||||||
|
- New upstream version
|
||||||
|
|
||||||
|
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1:1.1.fb25-9
|
||||||
|
- Rebuilt for Python 3.9
|
||||||
|
|
||||||
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1.fb25-8
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1:1.1.fb25-7
|
||||||
|
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
||||||
|
|
||||||
|
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1:1.1.fb25-6
|
||||||
|
- Rebuilt for Python 3.8
|
||||||
|
|
||||||
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1.fb25-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1.fb25-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Oct 11 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.1.fb25-3
|
||||||
|
- Python2 binary package has been removed
|
||||||
|
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
|
||||||
|
|
||||||
|
* Wed Oct 10 2018 Andy Grover <agrover@redhat.com> - 1:1.1.fb25-2
|
||||||
|
- Fix URL to point to open-iscsi org
|
||||||
|
|
||||||
|
* Wed Oct 10 2018 Andy Grover <agrover@redhat.com> - 1:1.1.fb25-1
|
||||||
|
- New upstream release
|
||||||
|
- Update URL so spectool -g works
|
||||||
|
|
||||||
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1.fb24-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1:1.1.fb24-4
|
||||||
|
- Rebuilt for Python 3.7
|
||||||
|
|
||||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1.fb24-3
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:1.1.fb24-3
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
44
regex.patch
Normal file
44
regex.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
diff --git a/configshell/console.py b/configshell/console.py
|
||||||
|
index 8f72fa0..e73a27a 100644
|
||||||
|
--- a/configshell/console.py
|
||||||
|
+++ b/configshell/console.py
|
||||||
|
@@ -36,7 +36,7 @@ class Console(object):
|
||||||
|
_escape = '\033['
|
||||||
|
_ansi_format = _escape + '%dm%s'
|
||||||
|
_ansi_reset = _escape + '0m'
|
||||||
|
- _re_ansi_seq = re.compile('(\033\[..?m)')
|
||||||
|
+ _re_ansi_seq = re.compile(r'(\033\[..?m)')
|
||||||
|
|
||||||
|
_ansi_styles = {'bold': 1,
|
||||||
|
'underline': 4,
|
||||||
|
diff --git a/configshell/shell.py b/configshell/shell.py
|
||||||
|
index 437186d..ec7a239 100644
|
||||||
|
--- a/configshell/shell.py
|
||||||
|
+++ b/configshell/shell.py
|
||||||
|
@@ -113,22 +113,22 @@ class ConfigShell(object):
|
||||||
|
|
||||||
|
# Grammar of the command line
|
||||||
|
command = locatedExpr(Word(alphanums + '_'))('command')
|
||||||
|
- var = Word(alphanums + '?;&*$!#,=_\+/.<>()~@:-%[]')
|
||||||
|
+ var = Word(alphanums + r'?;&*$!#,=_\+/.<>()~@:-%[]')
|
||||||
|
value = var
|
||||||
|
- keyword = Word(alphanums + '_\-')
|
||||||
|
+ keyword = Word(alphanums + r'_\-')
|
||||||
|
kparam = locatedExpr(keyword + Suppress('=') + Optional(value, default=''))('kparams*')
|
||||||
|
pparam = locatedExpr(var)('pparams*')
|
||||||
|
parameter = kparam | pparam
|
||||||
|
parameters = OneOrMore(parameter)
|
||||||
|
bookmark = Regex('@([A-Za-z0-9:_.]|-)+')
|
||||||
|
- pathstd = Regex('([A-Za-z0-9:_.\[\]]|-)*' + '/' + '([A-Za-z0-9:_.\[\]/]|-)*') \
|
||||||
|
+ pathstd = Regex(r'([A-Za-z0-9:_.\[\]]|-)*' + '/' + r'([A-Za-z0-9:_.\[\]/]|-)*') \
|
||||||
|
| '..' | '.'
|
||||||
|
path = locatedExpr(bookmark | pathstd | '*')('path')
|
||||||
|
parser = Optional(path) + Optional(command) + Optional(parameters)
|
||||||
|
self._parser = parser
|
||||||
|
|
||||||
|
if tty:
|
||||||
|
- readline.set_completer_delims('\t\n ~!#$^&(){}\|;\'",?')
|
||||||
|
+ readline.set_completer_delims('\t\n ~!#$^&(){}|;\'",?')
|
||||||
|
readline.set_completion_display_matches_hook(
|
||||||
|
self._display_completions)
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user