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