From e0a7ec0bea50b5dabca3f34b4c6e1d2099c49e182f492c7d3d533e06eefd3291 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Mon, 11 Dec 2017 22:16:48 +0000 Subject: [PATCH 1/3] Accepting request 556305 from home:lee_duncan:branches:devel:languages:python - Converting RPM SPEC file to singlespec format (bsc#1045332), updating SPEC file only. - ran 'spec-cleaner' on SPEC file to clean it up. - Converted from manually-added rtslib-fb-2.1.fb64.tar.gz to tar_scm service-retrieved rtslib-fb-2.1.fb64.tar.xz OBS-URL: https://build.opensuse.org/request/show/556305 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rtslib-fb?expand=0&rev=25 --- _service | 4 +- _servicedata | 2 +- python-rtslib-fb.changes | 9 +++++ python-rtslib-fb.spec | 83 ++++++++++++++++++++------------------- rtslib-fb-2.1.fb64.tar.gz | 3 -- rtslib-fb-2.1.fb64.tar.xz | 3 ++ 6 files changed, 57 insertions(+), 47 deletions(-) delete mode 100644 rtslib-fb-2.1.fb64.tar.gz create mode 100644 rtslib-fb-2.1.fb64.tar.xz diff --git a/_service b/_service index 63bde75..8443e7b 100644 --- a/_service +++ b/_service @@ -4,8 +4,8 @@ https://github.com/open-iscsi/rtslib-fb.git rtslib-fb - 2.1.fb63 - v2.1.fb63 + 2.1.fb64 + v2.1.fb64 enable diff --git a/_servicedata b/_servicedata index 70d8c46..0dec81e 100644 --- a/_servicedata +++ b/_servicedata @@ -1,4 +1,4 @@ https://github.com/open-iscsi/rtslib-fb.git - 3637171a68889e340f553943f25d6a5ca20ad1ca \ No newline at end of file + 737496e24ede21effc807a553cebe88ed5660a2b \ No newline at end of file diff --git a/python-rtslib-fb.changes b/python-rtslib-fb.changes index ef2ae8e..fb325a6 100644 --- a/python-rtslib-fb.changes +++ b/python-rtslib-fb.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Sun Dec 10 21:14:08 UTC 2017 - lduncan@suse.com + +- Converting RPM SPEC file to singlespec format (bsc#1045332), + updating SPEC file only. +- ran 'spec-cleaner' on SPEC file to clean it up. +- Converted from manually-added rtslib-fb-2.1.fb64.tar.gz to + tar_scm service-retrieved rtslib-fb-2.1.fb64.tar.xz + ------------------------------------------------------------------- Thu Aug 17 08:03:10 UTC 2017 - lszhu@suse.com diff --git a/python-rtslib-fb.spec b/python-rtslib-fb.spec index e0d19b2..35625b6 100644 --- a/python-rtslib-fb.spec +++ b/python-rtslib-fb.spec @@ -18,23 +18,29 @@ %define oname rtslib-fb %define realver 2.1.fb64 -%define dbdir /etc/target - +%define dbdir %{_sysconfdir}/target +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-%{oname} Version: 2.1.64 Release: 0%{?dist} -Url: http://github.com/open-iscsi/rtslib-fb.git Summary: API for Linux kernel SCSI target (aka LIO) License: Apache-2.0 Group: Development/Languages/Python -Source: %{oname}-%{realver}.tar.gz -Conflicts: python-rtslib +Url: http://github.com/open-iscsi/rtslib-fb.git +Source: %{oname}-%{realver}.tar.xz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module pyudev} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module six} +BuildRequires: epydoc BuildRequires: fdupes -BuildRequires: python-devel -BuildRequires: python-setuptools -BuildRequires: python-six -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Requires: pyudev +BuildRequires: python-rpm-macros +Requires: python-pyudev +Requires(post): update-alternatives +Requires(postun): update-alternatives +Conflicts: python-rtslib +BuildArch: noarch +%python_subpackages %description rtslib-fb is an object-based Python library for configuring the LIO generic @@ -44,9 +50,6 @@ the Apache 2.0 license. Contributions are welcome %package doc Summary: Documentatoin for Python rtslib-fb Group: Documentation/HTML -BuildArch: noarch -BuildRequires: epydoc -BuildRequires: pyudev %description doc rtslib-fb is an object-based Python library for configuring the LIO generic @@ -57,44 +60,42 @@ the Apache 2.0 license. Contributions are welcome %setup -q -n %{oname}-%{realver} %build -%__python setup.py build -%__mkdir_p doc/ +%python_build +mkdir -p doc/ epydoc --no-sourcecode --html -n %{oname} --exclude configobj rtslib_fb/*.py -%__mv html doc/ +mv html doc/ %install -[ "%{buildroot}" != "/" ] && %__rm -rf %{buildroot} -%__python setup.py install --skip-build --prefix=%{_prefix} --root=%{buildroot} -%fdupes %{buildroot}%{python_sitelib} -%__install -d -m755 %{buildroot}%{_defaultdocdir}/python-rtslib-doc-%{version} -%__cp -r doc/* %{buildroot}%{_defaultdocdir}/python-rtslib-doc-%{version}/ -%fdupes %{buildroot}%{_defaultdocdir} -%__install -d -m755 %{buildroot}%{_sysconfdir}/target -%__install -d -m755 %{buildroot}%{_mandir}/man5 -%__install -m644 doc/saveconfig.json.5 %{buildroot}%{_mandir}/man5 -%__install -d -m755 %{buildroot}%{_mandir}/man8 -%__install -m644 doc/targetctl.8 %{buildroot}%{_mandir}/man8 -%__install -d -m755 %{buildroot}/%{dbdir} -%__install -d -m755 %{buildroot}/%{dbdir}/pr -%__install -d -m755 %{buildroot}/%{dbdir}/alua +%python_install +%python_clone -a %{buildroot}/%{_bindir}/targetctl +%fdupes %{buildroot} +install -d -m755 %{buildroot}%{_mandir}/man5 +install -m644 doc/saveconfig.json.5 %{buildroot}%{_mandir}/man5 +%python_clone -a %{buildroot}%{_mandir}/man5/saveconfig.json.5 +install -d -m755 %{buildroot}%{_mandir}/man8 +install -m644 doc/targetctl.8 %{buildroot}%{_mandir}/man8 +%python_clone -a %{buildroot}%{_mandir}/man8/targetctl.8 +install -d -m755 %{buildroot}/%{dbdir} +install -d -m755 %{buildroot}/%{dbdir}/pr +install -d -m755 %{buildroot}/%{dbdir}/alua -%clean -[ "%{buildroot}" != "/" ] && %__rm -rf %{buildroot} +%post +%python_install_alternative targetctl targetctl.8 saveconfig.json.5 -%files -%defattr(-,root,root,-) -%{_bindir}/targetctl +%postun +%python_uninstall_alternative targetctl + +%files %{python_files} +%python_alternative %{_bindir}/targetctl %{python_sitelib}/* %doc COPYING README.md -%dir %{_sysconfdir}/target -%doc %{_mandir}/man5/saveconfig.json.5.gz -%doc %{_mandir}/man8/targetctl.8.gz +%doc %python_alternative %{_mandir}/man5/saveconfig.json.5.gz +%doc %python_alternative %{_mandir}/man8/targetctl.8.gz %dir %{dbdir} %dir %{dbdir}/pr %dir %{dbdir}/alua -%files doc -%defattr(-,root,root,-) -%{_defaultdocdir}/python-rtslib-doc-%{version} +%files %{python_files doc} +%doc doc/* %changelog diff --git a/rtslib-fb-2.1.fb64.tar.gz b/rtslib-fb-2.1.fb64.tar.gz deleted file mode 100644 index b804fd9..0000000 --- a/rtslib-fb-2.1.fb64.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9dd1ce5a6d0797529a19eb08725ac0b92a9fc4b7f82e5a8929e61d48993bd426 -size 46387 diff --git a/rtslib-fb-2.1.fb64.tar.xz b/rtslib-fb-2.1.fb64.tar.xz new file mode 100644 index 0000000..3b85501 --- /dev/null +++ b/rtslib-fb-2.1.fb64.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d33d12557f0089f684953f6ee5cdcdd2d476335be4ce508620b0b5f829a6b17c +size 39900 From 47fed20b1053fb5b9987d4c4343818d9d95136872b1bfbeb5f00f5301d939d4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 3 Jan 2018 16:11:34 +0000 Subject: [PATCH 2/3] - Drop the epydoc dependency/documentation generating from the package to allow building in py3 only enviroment OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rtslib-fb?expand=0&rev=26 --- python-rtslib-fb.changes | 6 ++++++ python-rtslib-fb.spec | 18 +----------------- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/python-rtslib-fb.changes b/python-rtslib-fb.changes index fb325a6..821199c 100644 --- a/python-rtslib-fb.changes +++ b/python-rtslib-fb.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jan 3 16:13:57 UTC 2018 - tchvatal@suse.com + +- Drop the epydoc dependency/documentation generating from the package + to allow building in py3 only enviroment + ------------------------------------------------------------------- Sun Dec 10 21:14:08 UTC 2017 - lduncan@suse.com diff --git a/python-rtslib-fb.spec b/python-rtslib-fb.spec index 35625b6..f742c8c 100644 --- a/python-rtslib-fb.spec +++ b/python-rtslib-fb.spec @@ -1,7 +1,7 @@ # # spec file for package python-rtslib-fb # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -32,7 +32,6 @@ BuildRequires: %{python_module devel} BuildRequires: %{python_module pyudev} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} -BuildRequires: epydoc BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-pyudev @@ -47,23 +46,11 @@ rtslib-fb is an object-based Python library for configuring the LIO generic SCSI target, present in 3.x Linux kernel versions. rtslib-fb is licensed under the Apache 2.0 license. Contributions are welcome -%package doc -Summary: Documentatoin for Python rtslib-fb -Group: Documentation/HTML - -%description doc -rtslib-fb is an object-based Python library for configuring the LIO generic -SCSI target, present in 3.x Linux kernel versions. rtslib-fb is licensed under -the Apache 2.0 license. Contributions are welcome - %prep %setup -q -n %{oname}-%{realver} %build %python_build -mkdir -p doc/ -epydoc --no-sourcecode --html -n %{oname} --exclude configobj rtslib_fb/*.py -mv html doc/ %install %python_install @@ -95,7 +82,4 @@ install -d -m755 %{buildroot}/%{dbdir}/alua %dir %{dbdir}/pr %dir %{dbdir}/alua -%files %{python_files doc} -%doc doc/* - %changelog From 784245ce5a9ac6c3ce6f2d29a2596e009fa0478cc0da95088c1fe6b98e0c2fa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 9 Jan 2018 14:34:06 +0000 Subject: [PATCH 3/3] - Fix the conflict to the rtslib properly OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rtslib-fb?expand=0&rev=27 --- python-rtslib-fb.changes | 5 +++++ python-rtslib-fb.spec | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/python-rtslib-fb.changes b/python-rtslib-fb.changes index 821199c..45bd3b6 100644 --- a/python-rtslib-fb.changes +++ b/python-rtslib-fb.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jan 9 14:37:15 UTC 2018 - tchvatal@suse.com + +- Fix the conflict to the rtslib properly + ------------------------------------------------------------------- Wed Jan 3 16:13:57 UTC 2018 - tchvatal@suse.com diff --git a/python-rtslib-fb.spec b/python-rtslib-fb.spec index f742c8c..2feffc9 100644 --- a/python-rtslib-fb.spec +++ b/python-rtslib-fb.spec @@ -19,6 +19,7 @@ %define oname rtslib-fb %define realver 2.1.fb64 %define dbdir %{_sysconfdir}/target +%define oldpython python %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-%{oname} Version: 2.1.64 @@ -37,7 +38,7 @@ BuildRequires: python-rpm-macros Requires: python-pyudev Requires(post): update-alternatives Requires(postun): update-alternatives -Conflicts: python-rtslib +Conflicts: %{oldpython}-rtslib BuildArch: noarch %python_subpackages