From 6a03962c7d7863b6a8f9188c0277a16e98289ec5 Mon Sep 17 00:00:00 2001 From: Andy Grover Date: Feb 23 2017 22:32:59 +0000 Subject: initial import (#1425898) Signed-off-by: Andy Grover --- diff --git a/.gitignore b/.gitignore index e69de29..dcc62ca 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/nvmetcli-0.3.tar.gz diff --git a/fix-setup.patch b/fix-setup.patch new file mode 100644 index 0000000..e7d0d15 --- /dev/null +++ b/fix-setup.patch @@ -0,0 +1,10 @@ +iff --git a/setup.py b/setup.py +index 078020f..f62ce5b 100755 +--- a/setup.py ++++ b/setup.py +@@ -27,4 +27,5 @@ setup( + maintainer_email = 'hch@lst.de', + test_suite='nose2.collector.collector', + packages = ['nvmet'], ++ scripts = ['nvmetcli'], + ) diff --git a/nvmetcli.spec b/nvmetcli.spec new file mode 100644 index 0000000..1f7be1a --- /dev/null +++ b/nvmetcli.spec @@ -0,0 +1,63 @@ +Name: nvmetcli +License: ASL 2.0 +Group: Applications/System +Summary: An adminstration shell for NVMe storage targets +Version: 0.3 +Release: 1%{?dist} +URL: ftp://ftp.infradead.org/pub/nvmetcli/ +Source: ftp://ftp.infradead.org/pub/nvmetcli/%{name}-%{version}.tar.gz +Patch0: fix-setup.patch +BuildArch: noarch +BuildRequires: python3-devel python3-setuptools systemd-units asciidoc xmlto +Requires: python3-configshell python3-kmod +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd + +%description +This package contains the command line interface to the NVMe over Fabrics +nvmet in the Linux kernel. It allows configuring the nvmet interactively +as well as saving / restoring the configuration to / from a json file. + +%prep +%setup -q +%patch0 -p1 + +%build +%{__python3} setup.py build +cd Documentation +make +gzip --stdout nvmetcli.8 > nvmetcli.8.gz + +%install +%{__python3} setup.py install --skip-build --root %{buildroot} +mkdir -p %{buildroot}%{_unitdir} +mkdir -p %{buildroot}%{_sysconfdir}/nvmet +install -m 644 nvmet.service %{buildroot}%{_unitdir}/nvmet.service +mkdir -p %{buildroot}%{_mandir}/man8/ +install -m 644 Documentation/nvmetcli.8.gz %{buildroot}%{_mandir}/man8/ + +%post +%systemd_post nvmet.service + +%preun +%systemd_preun nvmet.service + +%postun +%systemd_postun_with_restart nvmet.service + +%files +%{python3_sitelib}/* +%dir %{_sysconfdir}/nvmet +%{_bindir}/nvmetcli +%{_unitdir}/nvmet.service +%doc README +%license COPYING +%{_mandir}/man8/nvmetcli.8.gz + +%changelog +* Tue Feb 21 2017 Andy Grover - 0.3-1 +- Update for new upstream release + +* Wed Oct 12 2016 Andy Grover - 0.2-1 +- Initial packaging diff --git a/sources b/sources index e69de29..7465074 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +SHA512 (nvmetcli-0.3.tar.gz) = 73361ed1c854ad7faa4885e2330d44cae18092c58bf553a86486b0c2b7e1c21d82f79d097c54ba2ece8452012c23d6dbed68a084e911fd133b072d0396883603