Miscellaneous 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
This commit is contained in:
Neal Gompa 2019-11-01 09:21:36 -04:00
parent 9712c7bdb7
commit 0677770d9b

View File

@ -4,7 +4,7 @@ Name: python-rtslib
License: ASL 2.0 License: ASL 2.0
Summary: API for Linux kernel LIO SCSI target Summary: API for Linux kernel LIO SCSI target
Version: 2.1.fb69 Version: 2.1.fb69
Release: 6%{?dist} Release: 7%{?dist}
URL: https://github.com/open-iscsi/%{oname} URL: https://github.com/open-iscsi/%{oname}
Source: %{url}/archive/v%{version}/%{oname}-%{version}.tar.gz Source: %{url}/archive/v%{version}/%{oname}-%{version}.tar.gz
Source1: target.service Source1: target.service
@ -12,9 +12,6 @@ Patch0: 0001-disable-xen_pvscsi.patch
BuildArch: noarch BuildArch: noarch
BuildRequires: epydoc BuildRequires: epydoc
BuildRequires: systemd BuildRequires: systemd
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
%global _description\ %global _description\
@ -51,8 +48,11 @@ API for generic Linux SCSI kernel target.
%package -n target-restore %package -n target-restore
Summary: Systemd service for targetcli/rtslib Summary: Systemd service for targetcli/rtslib
Requires: python3-rtslib = %{version}-%{release} Requires: python3-rtslib = %{version}-%{release}
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
%description -n target-restore %description -n target-restore
Systemd service to restore the LIO kernel target settings Systemd service to restore the LIO kernel target settings
@ -65,9 +65,6 @@ on system restart.
%build %build
gzip --stdout doc/targetctl.8 > doc/targetctl.8.gz
gzip --stdout doc/saveconfig.json.5 > doc/saveconfig.json.5.gz
%py3_build %py3_build
mkdir -p doc/html mkdir -p doc/html
@ -84,8 +81,8 @@ mkdir -p %{buildroot}%{_sysconfdir}/target/backup
mkdir -p %{buildroot}%{_localstatedir}/target/pr mkdir -p %{buildroot}%{_localstatedir}/target/pr
mkdir -p %{buildroot}%{_localstatedir}/target/alua mkdir -p %{buildroot}%{_localstatedir}/target/alua
install -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/target.service install -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/target.service
install -m 644 doc/targetctl.8.gz %{buildroot}%{_mandir}/man8/ install -m 644 doc/targetctl.8 %{buildroot}%{_mandir}/man8/
install -m 644 doc/saveconfig.json.5.gz %{buildroot}%{_mandir}/man5/ install -m 644 doc/saveconfig.json.5 %{buildroot}%{_mandir}/man5/
%post -n target-restore %post -n target-restore
%systemd_post target.service %systemd_post target.service
@ -99,7 +96,7 @@ install -m 644 doc/saveconfig.json.5.gz %{buildroot}%{_mandir}/man5/
%files -n python3-rtslib %files -n python3-rtslib
%license COPYING %license COPYING
%{python3_sitelib}/* %{python3_sitelib}/rtslib*
%doc README.md doc/getting_started.md %doc README.md doc/getting_started.md
%files -n target-restore %files -n target-restore
@ -110,13 +107,18 @@ install -m 644 doc/saveconfig.json.5.gz %{buildroot}%{_mandir}/man5/
%dir %{_localstatedir}/target %dir %{_localstatedir}/target
%dir %{_localstatedir}/target/pr %dir %{_localstatedir}/target/pr
%dir %{_localstatedir}/target/alua %dir %{_localstatedir}/target/alua
%{_mandir}/man8/targetctl.8.gz %{_mandir}/man8/targetctl.8*
%{_mandir}/man5/saveconfig.json.5.gz %{_mandir}/man5/saveconfig.json.5*
%files doc %files doc
%doc doc/html %doc doc/html
%changelog %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
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.1.fb69-6 * Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.1.fb69-6
- Rebuilt for Python 3.8.0rc1 (#1748018) - Rebuilt for Python 3.8.0rc1 (#1748018)