2016-02-11 14:11:43 +01:00
|
|
|
#
|
2016-02-22 08:57:54 +01:00
|
|
|
# spec file for package nvme-cli
|
2016-02-11 14:11:43 +01:00
|
|
|
#
|
2019-01-28 20:50:03 +01:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2016-02-11 14:11:43 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2016-02-16 09:18:26 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
2016-02-11 14:11:43 +01:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: nvme-cli
|
2019-01-28 20:50:03 +01:00
|
|
|
Version: 1.7
|
2016-02-11 14:11:43 +01:00
|
|
|
Release: 0
|
2017-10-25 17:47:27 +02:00
|
|
|
Summary: NVM Express user space tools
|
2018-04-05 15:33:47 +02:00
|
|
|
License: GPL-2.0-only
|
2016-02-11 14:11:43 +01:00
|
|
|
Group: Hardware/Other
|
2019-04-02 09:18:12 +02:00
|
|
|
URL: https://github.com/linux-nvme/nvme-cli
|
2018-10-18 15:35:20 +02:00
|
|
|
Source: %{name}-%{version}.tar.gz
|
2019-04-02 09:18:12 +02:00
|
|
|
Source2: nvme-cli-rpmlintrc
|
2019-01-28 20:50:03 +01:00
|
|
|
Patch1: 0001-wdc-Change-device-capability-checking.patch
|
|
|
|
Patch2: 0002-wdc-Add-additional-device-for-vs-internal-log.patch
|
|
|
|
Patch3: 0003-generate-new-documentation.patch
|
|
|
|
Patch4: 0004-Fix-compilation-with-GCC-8.patch
|
|
|
|
Patch5: 0005-Fix-CFLAGS-parameter.patch
|
|
|
|
Patch6: 0006-nvme-cli-fix-compilation-with-uint64_t-cast.patch
|
2019-04-02 09:18:12 +02:00
|
|
|
Patch7: 0007-Regen-docs.patch
|
|
|
|
Patch8: 0008-nvme-cli-minor-cleanup-for-submit_io.patch
|
|
|
|
Patch9: 0009-Regen-documentation.patch
|
|
|
|
Patch10: 0010-nvme-cli-fix-fc-trtype-string.patch
|
2019-05-06 13:18:09 +02:00
|
|
|
Patch11: 0011-nvme-cli-add-netapp-ontapdevices-command.patch
|
|
|
|
Patch12: 0012-nvme-cli-add-netapp-ontapdevices-man-page.patch
|
|
|
|
Patch13: 0013-nvme-cli-Revert-stop-on-failure-with-connect-all.patch
|
2019-01-28 20:50:03 +01:00
|
|
|
Patch100: 0100-nvme_fc-auto-connect-scripts.patch
|
2019-04-02 09:18:12 +02:00
|
|
|
Patch101: 0101-71-nvme-iopolicy-netapp.rules-add-default-rules-for-.patch
|
|
|
|
Patch102: 0102-Add-nvmefc-connect.target.patch
|
|
|
|
Patch103: 0103-Change-service-to-type-simple.patch
|
2019-05-06 13:18:09 +02:00
|
|
|
Patch104: 0104-nvme-cli-Fix-documentation-syntax-and-typo.patch
|
2017-06-26 15:56:56 +02:00
|
|
|
BuildRequires: libuuid-devel
|
2019-04-02 09:18:12 +02:00
|
|
|
BuildRequires: pkgconfig
|
2017-06-20 09:39:37 +02:00
|
|
|
BuildRequires: xmlto
|
2016-02-22 08:57:54 +01:00
|
|
|
BuildRequires: pkgconfig(libudev)
|
2019-02-13 10:05:23 +01:00
|
|
|
BuildRequires: rubygem(asciidoctor)
|
2022-09-21 13:43:51 +02:00
|
|
|
|
2016-02-11 14:11:43 +01:00
|
|
|
%description
|
2017-10-25 17:47:27 +02:00
|
|
|
NVM Express (NVMe) is a direct attached storage interface. The
|
|
|
|
nvme-cli package contains core management tools with minimal
|
|
|
|
dependencies.
|
2022-01-17 10:11:39 +01:00
|
|
|
|
2016-02-11 14:11:43 +01:00
|
|
|
%prep
|
2019-04-02 09:18:12 +02:00
|
|
|
%setup -q
|
2019-01-28 20:50:03 +01:00
|
|
|
%patch1 -p1
|
|
|
|
%patch2 -p1
|
|
|
|
%patch3 -p1
|
|
|
|
%patch4 -p1
|
|
|
|
%patch5 -p1
|
|
|
|
%patch6 -p1
|
2019-04-02 09:18:12 +02:00
|
|
|
%patch7 -p1
|
|
|
|
%patch8 -p1
|
|
|
|
%patch9 -p1
|
|
|
|
%patch10 -p1
|
2019-05-06 13:18:09 +02:00
|
|
|
%patch11 -p1
|
|
|
|
%patch12 -p1
|
|
|
|
%patch13 -p1
|
2019-01-28 20:50:03 +01:00
|
|
|
%patch100 -p1
|
2019-04-02 09:18:12 +02:00
|
|
|
%patch101 -p1
|
|
|
|
%patch102 -p1
|
|
|
|
%patch103 -p1
|
2019-05-06 13:18:09 +02:00
|
|
|
%patch104 -p1
|
2016-02-11 14:11:43 +01:00
|
|
|
|
|
|
|
%build
|
2016-02-22 08:57:54 +01:00
|
|
|
echo %{version} > version
|
2019-02-13 10:05:23 +01:00
|
|
|
make CFLAGS="%{optflags} -I." PREFIX=%{_prefix} USE_ASCIIDOCTOR=YesPlease %{?_smp_mflags} all
|
2023-10-04 17:20:00 +02:00
|
|
|
|
2016-02-11 14:11:43 +01:00
|
|
|
%install
|
2016-02-16 09:18:26 +01:00
|
|
|
make PREFIX=%{_prefix} DESTDIR=%{buildroot} install-bin install-man %{?_smp_mflags}
|
2017-06-26 15:56:56 +02:00
|
|
|
install -m 644 -D /dev/null %{buildroot}%{_sysconfdir}/nvme/hostnqn
|
2019-04-02 09:18:12 +02:00
|
|
|
install -m 644 -D completions/bash-nvme-completion.sh %{buildroot}%{_datadir}/bash_completion/completions/nvme
|
2019-01-28 20:50:03 +01:00
|
|
|
install -m 644 -D nvme-fc-autoconnect/70-nvmefc-autoconnect.rules %{buildroot}%{_udevrulesdir}/70-nvmefc-autoconnect.rules
|
|
|
|
install -m 644 -D nvme-fc-autoconnect/nvmefc-boot-connections.service %{buildroot}%{_unitdir}/nvmefc-boot-connections.service
|
|
|
|
install -m 644 -D nvme-fc-autoconnect/nvmefc-connect@.service %{buildroot}%{_unitdir}/nvmefc-connect@.service
|
2019-04-02 09:18:12 +02:00
|
|
|
install -m 644 -D nvme-fc-autoconnect/nvmefc-connect.target %{buildroot}%{_unitdir}/nvmefc-connect.target
|
|
|
|
install -m 644 -D scripts/71-nvme-iopolicy-netapp.rules %{buildroot}%{_udevrulesdir}/71-nvme-iopolicy-netapp.rules
|
2019-01-28 20:50:03 +01:00
|
|
|
|
2019-04-02 09:18:12 +02:00
|
|
|
%define services nvmefc-boot-connections.service nvmefc-connect.target
|
2019-01-28 20:50:03 +01:00
|
|
|
|
|
|
|
%pre
|
2019-04-02 09:18:12 +02:00
|
|
|
%service_add_pre %services nvmefc-connect@.service
|
2022-03-22 15:12:54 +01:00
|
|
|
|
2017-06-26 15:56:56 +02:00
|
|
|
%post
|
|
|
|
if [ ! -e %{_sysconfdir}/nvme/hostnqn ]; then
|
|
|
|
%{_sbindir}/nvme gen-hostnqn > %{_sysconfdir}/nvme/hostnqn
|
|
|
|
fi
|
2017-07-02 13:38:19 +02:00
|
|
|
if [ ! -e %{_sysconfdir}/nvme/hostid ]; then
|
|
|
|
%{_bindir}/uuidgen > %{_sysconfdir}/nvme/hostid
|
|
|
|
fi
|
2019-04-02 09:18:12 +02:00
|
|
|
%service_add_post %services nvmefc-connect@.service
|
2019-01-28 20:50:03 +01:00
|
|
|
|
|
|
|
%preun
|
2019-04-02 09:18:12 +02:00
|
|
|
%service_del_preun -f %services
|
2019-01-28 20:50:03 +01:00
|
|
|
|
|
|
|
%postun
|
2019-04-02 09:18:12 +02:00
|
|
|
%service_del_postun %services
|
|
|
|
|
|
|
|
%posttrans
|
|
|
|
/usr/bin/echo add 2>/dev/null >/sys/class/fc/fc_udev_device/nvme_discovery || true
|
2017-06-26 15:56:56 +02:00
|
|
|
|
2016-02-11 14:11:43 +01:00
|
|
|
%files
|
2019-04-02 09:18:12 +02:00
|
|
|
%license LICENSE
|
|
|
|
%doc README.md
|
2016-02-11 14:11:43 +01:00
|
|
|
%{_sbindir}/nvme
|
2019-04-02 09:18:12 +02:00
|
|
|
%{_mandir}/man1/nvme*.1*%{?ext_man}
|
|
|
|
%dir %{_datadir}/bash_completion
|
|
|
|
%dir %{_datadir}/bash_completion/completions/
|
|
|
|
%{_datadir}/bash_completion/completions/nvme
|
2019-01-28 20:50:03 +01:00
|
|
|
%{_udevrulesdir}/70-nvmefc-autoconnect.rules
|
2019-04-02 09:18:12 +02:00
|
|
|
%{_udevrulesdir}/71-nvme-iopolicy-netapp.rules
|
2019-01-28 20:50:03 +01:00
|
|
|
%{_unitdir}/nvmefc-boot-connections.service
|
|
|
|
%{_unitdir}/nvmefc-connect@.service
|
2019-04-02 09:18:12 +02:00
|
|
|
%{_unitdir}/nvmefc-connect.target
|
2017-06-26 15:56:56 +02:00
|
|
|
%dir %{_sysconfdir}/nvme/
|
|
|
|
%ghost %{_sysconfdir}/nvme/hostnqn
|
2019-04-02 09:18:12 +02:00
|
|
|
%ghost %{_sysconfdir}/nvme/hostid
|
2022-01-17 10:11:39 +01:00
|
|
|
|
2016-02-11 14:11:43 +01:00
|
|
|
%changelog
|