forked from pool/python-configshell-fb
Accepting request 557437 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/557437 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-configshell-fb?expand=0&rev=5
This commit is contained in:
16
_service
Normal file
16
_service
Normal file
@@ -0,0 +1,16 @@
|
||||
<services>
|
||||
<service name="tar_scm" mode="disabled">
|
||||
<param name="scm">git</param>
|
||||
<param name="url">https://github.com/open-iscsi/configshell-fb.git</param>
|
||||
<param name="subdir"></param>
|
||||
<param name="filename">configshell-fb</param>
|
||||
<param name="versionformat">1.1.fb23</param>
|
||||
<param name="revision">v1.1.fb23</param>
|
||||
<param name="changesgenerate">enable</param>
|
||||
</service>
|
||||
<service name="recompress" mode="disabled">
|
||||
<param name="file">*configshell-fb*.tar</param>
|
||||
<param name="compression">xz</param>
|
||||
</service>
|
||||
<service name="set_version" mode="disabled"/>
|
||||
</services>
|
||||
4
_servicedata
Normal file
4
_servicedata
Normal file
@@ -0,0 +1,4 @@
|
||||
<servicedata>
|
||||
<service name="tar_scm">
|
||||
<param name="url">https://github.com/open-iscsi/configshell-fb.git</param>
|
||||
<param name="changesrevision">1299055734eeaf849cc7d3227731626bcf127e02</param></service></servicedata>
|
||||
3
configshell-fb-1.1.fb23.tar.xz
Normal file
3
configshell-fb-1.1.fb23.tar.xz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c4ddace5093088809d2fade0f99b217fb2736993a1fc0cc3497a9dd1c26377dd
|
||||
size 29632
|
||||
36
configshell-fb-Handle-if-TERM-is-not-set.patch
Normal file
36
configshell-fb-Handle-if-TERM-is-not-set.patch
Normal file
@@ -0,0 +1,36 @@
|
||||
From daa66bc6acd2430cdd05e9883dd1eab69b698252 Mon Sep 17 00:00:00 2001
|
||||
From: Andy Grover <agrover@redhat.com>
|
||||
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 <agrover@redhat.com>
|
||||
---
|
||||
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
|
||||
--
|
||||
2.15.1
|
||||
|
||||
19
configshell-fb-example-should-not-specify-path.patch
Normal file
19
configshell-fb-example-should-not-specify-path.patch
Normal file
@@ -0,0 +1,19 @@
|
||||
From: Lee Duncan <lduncan@suse.com>
|
||||
Date: Fri Dec 8 15:38:50 PST 2017
|
||||
Subject: remove example dependency on /usr/bin/python
|
||||
|
||||
All of the code works with python2 or python3, so remove
|
||||
the use of the full /usr/bin/python path in the example
|
||||
script so building is easier.
|
||||
|
||||
Signed-off-by: Lee Duncan <lduncan@suse.com>
|
||||
---
|
||||
diff -aurp a/examples/myshell b/examples/myshell
|
||||
--- a/examples/myshell 2017-03-01 15:21:57.000000000 -0800
|
||||
+++ b/examples/myshell 2017-12-08 15:33:29.672794872 -0800
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python
|
||||
+#!/usr/bin/env python
|
||||
'''
|
||||
This file is part of ConfigShell.
|
||||
Copyright (c) 2011-2013 by Datera, Inc
|
||||
@@ -1,3 +1,19 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 8 19:34:23 UTC 2017 - lduncan@suse.com
|
||||
|
||||
- Converting RPM SPEC file to singlespec format (bsc#1045332),
|
||||
adding patch:
|
||||
* configshell-fb-example-should-not-specify-path.patch
|
||||
- Fix targetcli.service problem when TERM not set (bsc#1071194),
|
||||
adding patch (from LSZhu):
|
||||
* configshell-fb-Handle-if-TERM-is-not-set.patch
|
||||
- Moved build requirement on urwid to runtime requirement,
|
||||
as suggested by scarabeus_iv
|
||||
- ran spec-cleaner to clean up SPEC file
|
||||
- Converted from manually-added configshell-fb tar file to
|
||||
tar_scm service-generated file by adding _service and
|
||||
_servicedata
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 17 06:11:22 UTC 2017 - lszhu@suse.com
|
||||
|
||||
|
||||
@@ -18,27 +18,30 @@
|
||||
|
||||
%define oname configshell-fb
|
||||
%define realver 1.1.fb23
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-%{oname}
|
||||
Version: 1.23
|
||||
Release: 1%{?dist}
|
||||
Url: http://github.com/open-iscsi/configshell-fb
|
||||
Version: 1.1.fb23
|
||||
Release: 0%{?dist}
|
||||
Summary: A Python library for building configuration shells
|
||||
License: Apache-2.0
|
||||
Group: Development/Libraries/Python
|
||||
Source: https://github.com/open-iscsi/%{oname}/archive/v%{realver}.tar.gz
|
||||
Requires: /usr/bin/python
|
||||
Url: http://github.com/open-iscsi/configshell-fb
|
||||
Source: %{oname}-%{realver}.tar.xz
|
||||
Patch1: %{oname}-example-should-not-specify-path.patch
|
||||
Patch2: %{oname}-Handle-if-TERM-is-not-set.patch
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module pyparsing}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module six}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: %{_bindir}/env
|
||||
Requires: python-pyparsing
|
||||
Requires: python-six
|
||||
BuildArch: noarch
|
||||
Requires: python-urwid
|
||||
Conflicts: python-configshell
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-pyparsing
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: python-six
|
||||
BuildRequires: python-urwid
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
configshell-fb is a Python library that provides a framework for building simple
|
||||
@@ -53,7 +56,6 @@ no longer strictly compatible.
|
||||
%package doc
|
||||
Summary: Documentation for Python configshell-fb
|
||||
Group: Documentation/HTML
|
||||
BuildArch: noarch
|
||||
BuildRequires: epydoc
|
||||
|
||||
%description doc
|
||||
@@ -67,28 +69,26 @@ rtslib, and configshell, or stick with all non-fb versions, since they are
|
||||
no longer strictly compatible.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{oname}-%{realver}%{?extraver}
|
||||
%setup -q -n %{oname}-%{realver}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
%__python setup.py build
|
||||
%__mkdir_p doc/
|
||||
%python_build
|
||||
mkdir -p doc/
|
||||
epydoc --no-sourcecode --html -n %{oname} --exclude configobj configshell/*.py
|
||||
%__mv html doc/
|
||||
%fdupes html/
|
||||
mv html doc/
|
||||
|
||||
%install
|
||||
%__python setup.py install --skip-build --prefix=%{_prefix} --root=%{buildroot}
|
||||
%fdupes %{buildroot}%{python_sitelib}
|
||||
%__install -d -m755 %{buildroot}%{_defaultdocdir}/python-configshell-doc-%{version}
|
||||
%__cp -r doc/* %{buildroot}%{_defaultdocdir}/python-configshell-doc-%{version}/
|
||||
%fdupes %{buildroot}%{_defaultdocdir}
|
||||
%python_install --skip-build
|
||||
%fdupes %{buildroot}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%files %{python_files}
|
||||
%{python_sitelib}/*
|
||||
%doc examples COPYING README.md
|
||||
|
||||
%files doc
|
||||
%defattr(-,root,root)
|
||||
%{_defaultdocdir}/python-configshell-doc-%{version}
|
||||
%files %{python_files doc}
|
||||
%doc doc/*
|
||||
|
||||
%changelog
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:63f7f814bf27d6dc5d6b3bbdd1da89a2a250f5662a67eaa781b9599779fdebb9
|
||||
size 34458
|
||||
Reference in New Issue
Block a user