20c57d
Name:           nvmetcli
20c57d
License:        ASL 2.0
20c57d
Group:          Applications/System
20c57d
Summary:        An adminstration shell for NVMe storage targets
20c57d
Version:        0.7
20c57d
Release:        3%{?dist}
20c57d
URL:            ftp://ftp.infradead.org/pub/nvmetcli/
20c57d
Source:         ftp://ftp.infradead.org/pub/nvmetcli/%{name}-%{version}.tar.gz
20c57d
Patch0:         0001-Documentation-fix-typo.patch
20c57d
Patch1:         0002-nvmetcli-don-t-remove-ANA-Group-1-on-clear.patch
20c57d
BuildArch:      noarch
20c57d
BuildRequires:  python3-devel python3-setuptools systemd-units asciidoc xmlto
20c57d
Requires:       python3-configshell python3-kmod
20c57d
Requires(post): systemd
20c57d
Requires(preun): systemd
20c57d
Requires(postun): systemd
20c57d
20c57d
%description
20c57d
This package contains the command line interface to the NVMe over Fabrics
20c57d
nvmet in the Linux kernel.  It allows configuring the nvmet interactively
20c57d
as well as saving / restoring the configuration to / from a json file.
20c57d
20c57d
%prep
20c57d
%setup -q
20c57d
%patch0 -p1
20c57d
%patch1 -p1
20c57d
20c57d
%build
20c57d
%{__python3} setup.py build
20c57d
cd Documentation
20c57d
make
20c57d
gzip --stdout nvmetcli.8 > nvmetcli.8.gz
20c57d
20c57d
%install
20c57d
%{__python3} setup.py install --skip-build --root %{buildroot}
20c57d
mkdir -p %{buildroot}%{_unitdir}
20c57d
mkdir -p %{buildroot}%{_sysconfdir}/nvmet
20c57d
install -m 644 nvmet.service %{buildroot}%{_unitdir}/nvmet.service
20c57d
mkdir -p %{buildroot}%{_mandir}/man8/
20c57d
install -m 644 Documentation/nvmetcli.8.gz %{buildroot}%{_mandir}/man8/
20c57d
20c57d
%post
20c57d
%systemd_post nvmet.service
20c57d
20c57d
%preun
20c57d
%systemd_preun nvmet.service
20c57d
20c57d
%postun
20c57d
%systemd_postun_with_restart nvmet.service
20c57d
20c57d
%files
20c57d
%{python3_sitelib}/*
20c57d
%dir %{_sysconfdir}/nvmet
20c57d
%{_sbindir}/nvmetcli
20c57d
%{_unitdir}/nvmet.service
20c57d
%doc README
20c57d
%license COPYING
20c57d
%{_mandir}/man8/nvmetcli.8.gz
20c57d
20c57d
%changelog
20c57d
* Wed Apr 28 2021 Maurizio Lombardi <mlombard@redhat.com> - 0.7-3
20c57d
- Fix a failure when executing a clear command
20c57d
20c57d
* Thu Apr 22 2021 Maurizio Lombardi <mlombard@redhat.com> - 0.7-1
20c57d
- Fix typo in the documentation
20c57d
20c57d
* Thu Apr 22 2021 Maurizio Lombardi <mlombard@redhat.com> - 0.7-1
20c57d
- Update to the latest version
20c57d
20c57d
* Fri Sep 14 2018 Maurizio Lombardi <mlombard@redhat.com> - 0.6-2
20c57d
- Support python3 dictionary access.
20c57d
20c57d
* Fri Jul 06 2018 Maurizio Lombardi <mlombard@redhat.com> - 0.6-1
20c57d
- Update for new upstream release
20c57d
20c57d
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-2
20c57d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
20c57d
20c57d
* Tue May 9 2017 Andy Grover <agrover@redhat.com> - 0.4-1
20c57d
- Update for new upstream release
20c57d
- Remove fix-setup.patch
20c57d
20c57d
* Tue Feb 21 2017 Andy Grover <agrover@redhat.com> - 0.3-1
20c57d
- Update for new upstream release
20c57d
20c57d
* Wed Oct 12 2016 Andy Grover <agrover@redhat.com> - 0.2-1
20c57d
- Initial packaging