summaryrefslogtreecommitdiffstats
path: root/nvme.spec.in
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-07-02 20:40:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-07-02 20:40:30 +0000
commitdc597ce8df5ae6efd2728a2d7ba7d92486028f79 (patch)
tree55b9e9257eba4579667f9522368aa29f5be6754a /nvme.spec.in
parentInitial commit. (diff)
downloadnvme-cli-dc597ce8df5ae6efd2728a2d7ba7d92486028f79.tar.xz
nvme-cli-dc597ce8df5ae6efd2728a2d7ba7d92486028f79.zip
Adding upstream version 1.12.upstream/1.12
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'nvme.spec.in')
-rw-r--r--nvme.spec.in71
1 files changed, 71 insertions, 0 deletions
diff --git a/nvme.spec.in b/nvme.spec.in
new file mode 100644
index 0000000..74e681e
--- /dev/null
+++ b/nvme.spec.in
@@ -0,0 +1,71 @@
+Name: nvme
+Version: @@VERSION@@
+Release: 1%{?dist}
+Summary: Core nvme tools
+License: GPL
+Group: Development/Tools
+URL: https://github.com/linux-nvme/nvme-cli/
+Source: nvme-@@VERSION@@.tar.gz
+Provides: nvme
+Requires(post): util-linux
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+
+%description
+NVMe is a fast, scalable, direct attached storage interface. The nvme
+cli rpm installs core management tools with minimal dependencies.
+
+%prep
+%setup
+
+%build
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install-spec DESTDIR=%{buildroot} PREFIX=/usr
+
+%files
+%defattr(-,root,root)
+%doc Documentation/nvme*.1
+%{_sbindir}/nvme
+%{_mandir}/man1/nvme*.1*
+%{_datadir}/bash-completion/completions/nvme
+%{_datadir}/zsh/site-functions/_nvme
+%dir %{_sysconfdir}/nvme
+%{_sysconfdir}/nvme/hostnqn
+%{_sysconfdir}/nvme/hostid
+%{_sysconfdir}/nvme/discovery.conf
+%{_sysconfdir}/udev/rules.d/70-nvmf-autoconnect.rules
+%{_sysconfdir}/udev/rules.d/71-nvmf-iopolicy-netapp.rules
+%{_libdir}/dracut/dracut.conf.d/70-nvmf-autoconnect.conf
+%{_libdir}/systemd/system/nvmf-connect@.service
+%{_libdir}/systemd/system/nvmefc-boot-connections.service
+%{_libdir}/systemd/system/nvmf-connect.target
+%{_libdir}/systemd/system/nvmf-autoconnect.service
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+if [ $1 -eq 1 ]; then # 1 : This package is being installed for the first time
+ if [ ! -s %{_sysconfdir}/nvme/hostnqn ]; then
+ echo $(nvme gen-hostnqn) > %{_sysconfdir}/nvme/hostnqn
+ fi
+ if [ ! -s %{_sysconfdir}/nvme/hostid ]; then
+ uuidgen > %{_sysconfdir}/nvme/hostid
+ fi
+
+ # apply udev and systemd changes that we did
+ systemctl daemon-reload
+ udevadm control --reload-rules && udevadm trigger
+fi
+
+%changelog
+* Tue Dec 17 2019 Simon Schricker <sschricker@suse.de>
+ - Add new udev rules to set iopolicy for NetApp devices
+
+* Mon Oct 15 2018 Eyal Ben-David <eyalbe@il.ibm.com> - 1.6.81.g899a-2
+- bash-completion check
+
+* Thu Oct 15 2015 Keith Busch <keith.busch@intel.com>
+- Initial RPM spec