#3 Miscellaneous packaging fixes
Merged 4 years ago by mlombard. Opened 4 years ago by ngompa.
rpms/ ngompa/python-rtslib misc-pkging-fixes  into  master

file modified
+31 -15
@@ -1,20 +1,22 @@ 

  %global oname rtslib-fb

  

+ # epydoc is gone, so disable for now

+ %bcond_with apidocs

+ 

  Name:             python-rtslib

  License:          ASL 2.0

  Summary:          API for Linux kernel LIO SCSI target

  Version:          2.1.fb69

- Release:          6%{?dist}

+ Release:          7%{?dist}

  URL:              https://github.com/open-iscsi/%{oname}

  Source:           %{url}/archive/v%{version}/%{oname}-%{version}.tar.gz

  Source1:          target.service

  Patch0:           0001-disable-xen_pvscsi.patch

  BuildArch:        noarch

+ %if %{with apidocs}

  BuildRequires:    epydoc

+ %endif

  BuildRequires:    systemd

- Requires(post):   systemd

- Requires(preun):  systemd

- Requires(postun): systemd

  

  

  %global _description\
@@ -24,6 +26,7 @@ 

  %description %_description

  

  

+ %if %{with apidocs}

  %package doc

  Summary:        Documentation for python-rtslib

  Requires:       python3-rtslib = %{version}-%{release}
@@ -31,7 +34,7 @@ 

  %description doc

  API documentation for rtslib, to configure the generic Linux SCSI

  multiprotocol kernel target.

- 

+ %endif

  

  %package -n python3-rtslib

  Summary:        API for Linux kernel LIO SCSI target
@@ -45,14 +48,20 @@ 

  Requires:       python3-kmod

  Requires:       python3-six

  Requires:       python3-pyudev

+ %if ! %{with apidocs}

+ Obsoletes:      %{name}-doc < %{version}-%{release}

+ %endif

  

  %description -n python3-rtslib

  API for generic Linux SCSI kernel target.

  

  

  %package -n target-restore

- Summary:        Systemd service for targetcli/rtslib

- Requires:       python3-rtslib = %{version}-%{release}

+ Summary:          Systemd service for targetcli/rtslib

+ Requires:         python3-rtslib = %{version}-%{release}

+ Requires(post):   systemd

+ Requires(preun):  systemd

+ Requires(postun): systemd

  

  %description -n target-restore

  Systemd service to restore the LIO kernel target settings
@@ -65,13 +74,12 @@ 

  

  

  %build

- gzip --stdout doc/targetctl.8 > doc/targetctl.8.gz

- gzip --stdout doc/saveconfig.json.5 > doc/saveconfig.json.5.gz

- 

  %py3_build

  

+ %if %{with apidocs}

  mkdir -p doc/html

  epydoc --no-sourcecode --html -n rtslib -o doc/html rtslib/*.py

+ %endif

  

  %install

  # remove py2 scripts if py3 enabled
@@ -84,8 +92,8 @@ 

  mkdir -p %{buildroot}%{_localstatedir}/target/pr

  mkdir -p %{buildroot}%{_localstatedir}/target/alua

  install -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/target.service

- install -m 644 doc/targetctl.8.gz %{buildroot}%{_mandir}/man8/

- install -m 644 doc/saveconfig.json.5.gz %{buildroot}%{_mandir}/man5/

+ install -m 644 doc/targetctl.8 %{buildroot}%{_mandir}/man8/

+ install -m 644 doc/saveconfig.json.5 %{buildroot}%{_mandir}/man5/

  

  %post -n target-restore

  %systemd_post target.service
@@ -99,7 +107,7 @@ 

  

  %files -n python3-rtslib

  %license COPYING

- %{python3_sitelib}/*

+ %{python3_sitelib}/rtslib*

  %doc README.md doc/getting_started.md

  

  %files -n target-restore
@@ -110,13 +118,21 @@ 

  %dir %{_localstatedir}/target

  %dir %{_localstatedir}/target/pr

  %dir %{_localstatedir}/target/alua

- %{_mandir}/man8/targetctl.8.gz

- %{_mandir}/man5/saveconfig.json.5.gz

+ %{_mandir}/man8/targetctl.8*

+ %{_mandir}/man5/saveconfig.json.5*

  

+ %if %{with apidocs}

  %files doc

  %doc doc/html

+ %endif

  

  %changelog

+ * Fri Nov 01 2019 Neal Gompa <ngompa13@gmail.com> - 2.1.fb69-7

+ - Fix file list for python3-rtslib subpackage

+ - Don't compress manpages in build phase, as rpm auto-compresses manpages

+ - Move systemd requires to the target-restore subpackage

+ - Disable building apidocs as epydoc is gone

+ 

  * Thu Oct 03 2019 Miro HronĨok <mhroncok@redhat.com> - 2.1.fb69-6

  - Rebuilt for Python 3.8.0rc1 (#1748018)

  

This PR contains some simple packaging fixes:

  • Fix file list for python3-rtslib subpackage
  • Don't compress manpages in build phase, as rpm auto-compresses manpages
  • Move systemd requires to the target-restore subpackage

If this isn't merged within a week, I'll merge and push a build out.

1 new commit added

  • Disable building apidocs as epydoc is gone
4 years ago

This will actually need to be merged sooner rather than later, as it also restores the ability for the package to build now that epydoc is gone.

Hello, ok for me to merge this but shouldn't you remove "BuildRequires: epydoc" too?

2 new commits added

  • Disable building apidocs as epydoc is gone
  • Miscellaneous packaging fixes
4 years ago

Pull-Request has been merged by mlombard

4 years ago