2016-02-11 14:11:43 +01:00
|
|
|
#
|
2016-02-19 10:15:02 +01:00
|
|
|
# spec file for package nvme-cli
|
2016-02-11 14:11:43 +01:00
|
|
|
#
|
2019-01-28 13:12:59 +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.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: nvme-cli
|
2019-01-28 13:12:59 +01:00
|
|
|
Version: 1.7
|
2016-02-11 14:11:43 +01:00
|
|
|
Release: 0
|
2017-10-24 15:04:20 +02:00
|
|
|
Summary: NVM Express user space tools
|
2018-04-04 14:16:27 +02:00
|
|
|
License: GPL-2.0-only
|
2016-02-11 14:11:43 +01:00
|
|
|
Group: Hardware/Other
|
|
|
|
Url: https://github.com/linux-nvme/nvme-cli
|
2018-10-17 15:52:08 +02:00
|
|
|
Source: %{name}-%{version}.tar.gz
|
2019-01-28 13:12:59 +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
|
|
|
|
Patch100: 0100-nvme_fc-auto-connect-scripts.patch
|
2017-06-16 12:21:29 +02:00
|
|
|
BuildRequires: asciidoc
|
2017-06-26 12:05:38 +02:00
|
|
|
BuildRequires: libuuid-devel
|
2017-06-16 12:21:29 +02:00
|
|
|
BuildRequires: xmlto
|
2016-02-19 10:15:02 +01:00
|
|
|
BuildRequires: pkgconfig(libudev)
|
2016-02-11 14:11:43 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
2017-10-24 15:04:20 +02:00
|
|
|
NVM Express (NVMe) is a direct attached storage interface. The
|
|
|
|
nvme-cli package contains core management tools with minimal
|
|
|
|
dependencies.
|
2016-02-11 14:11:43 +01:00
|
|
|
|
|
|
|
%prep
|
2018-10-17 15:52:08 +02:00
|
|
|
%setup -q -n %{name}-%{version}
|
2019-01-28 13:12:59 +01:00
|
|
|
%patch1 -p1
|
|
|
|
%patch2 -p1
|
|
|
|
%patch3 -p1
|
|
|
|
%patch4 -p1
|
|
|
|
%patch5 -p1
|
|
|
|
%patch6 -p1
|
|
|
|
%patch100 -p1
|
2016-02-11 14:11:43 +01:00
|
|
|
|
|
|
|
%build
|
2016-02-19 10:15:02 +01:00
|
|
|
echo %{version} > version
|
2019-01-28 13:12:59 +01:00
|
|
|
make CFLAGS="%{optflags} -I." PREFIX=%{_prefix} %{?_smp_mflags} all
|
2016-02-11 14:11:43 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
make PREFIX=%{_prefix} DESTDIR=%{buildroot} install-bin install-man %{?_smp_mflags}
|
2017-06-26 13:00:04 +02:00
|
|
|
install -m 644 -D /dev/null %{buildroot}%{_sysconfdir}/nvme/hostnqn
|
2016-02-19 10:15:02 +01:00
|
|
|
install -m 644 -D completions/bash-nvme-completion.sh %{buildroot}%{_sysconfdir}/bash_completion.d/nvme
|
2019-01-28 13:12:59 +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
|
|
|
|
|
|
|
|
%define services nvmefc-boot-connections.service
|
|
|
|
|
|
|
|
%pre
|
|
|
|
%service_add_pre %services
|
2016-02-11 14:11:43 +01:00
|
|
|
|
2017-06-26 10:36:13 +02:00
|
|
|
%post
|
2017-06-26 13:13:01 +02:00
|
|
|
if [ ! -e %{_sysconfdir}/nvme/hostnqn ]; then
|
|
|
|
%{_sbindir}/nvme gen-hostnqn > %{_sysconfdir}/nvme/hostnqn
|
2017-06-26 10:36:13 +02:00
|
|
|
fi
|
2017-06-30 15:43:19 +02:00
|
|
|
if [ ! -e %{_sysconfdir}/nvme/hostid ]; then
|
|
|
|
%{_bindir}/uuidgen > %{_sysconfdir}/nvme/hostid
|
|
|
|
fi
|
2019-01-28 13:12:59 +01:00
|
|
|
%service_add_post %services
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%service_del_preun %services nvmefc-connect@.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%service_del_postun %services nvmefc-connect@.service
|
2017-06-26 10:36:13 +02:00
|
|
|
|
2016-02-11 14:11:43 +01:00
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc README.md LICENSE
|
|
|
|
%{_sbindir}/nvme
|
|
|
|
%{_mandir}/man1/nvme*.1*
|
2016-02-19 10:15:02 +01:00
|
|
|
%dir %{_sysconfdir}/bash_completion.d/
|
|
|
|
%{_sysconfdir}/bash_completion.d/nvme
|
2019-01-28 13:12:59 +01:00
|
|
|
%{_udevrulesdir}/70-nvmefc-autoconnect.rules
|
|
|
|
%{_unitdir}/nvmefc-boot-connections.service
|
|
|
|
%{_unitdir}/nvmefc-connect@.service
|
2017-06-26 13:13:01 +02:00
|
|
|
%dir %{_sysconfdir}/nvme/
|
|
|
|
%ghost %{_sysconfdir}/nvme/hostnqn
|
2017-06-30 15:43:19 +02:00
|
|
|
%ghost %{_sysconfdir}/nvme/hostid
|
2016-02-11 14:11:43 +01:00
|
|
|
|
|
|
|
%changelog
|