nvme-cli/nvme-cli.spec

133 lines
4.6 KiB
RPMSpec
Raw Normal View History

#
# spec file for package nvme-cli
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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
Version: 1.7
Release: 0
Summary: NVM Express user space tools
License: GPL-2.0-only
Group: Hardware/Other
URL: https://github.com/linux-nvme/nvme-cli
Accepting request 642655 from Base:System - Update to version v1.6 (FATE#326139, FATE#326434, FATE#326558): * Release 1.6 * lightnvm: fix type coercion * fix reservation report 0's based dword count * nvme.c, list_ns: use le32_to_cpu in display * nvme-cli: adjust memset size for data buffer in submit_io * fabrics: omit newline character when reading nvme host nqn * fabrics: fail early if argconfig_parse failed * nvme-cli: print firmware activation notices support bit to id_ctrl * nvme-cli: add support of RAE * Add a single get-property command for NVMeOF. * nvme-ioctl.c : nvme_get_properties(): fix 64bit offset advance * nvme-cli: add support for DLFEAT * intel: fix latency stats printing * Update doc * nvme-cli: add changed-ns-list-log documentation * nvme-cli: add changed log ns support * NVMe-CLI Fix id-ns fpi field when Human Readable option selected. * Fix format specifier for 32-bit * Fix json output of 128-bit numbers * Replace host-gen telemetry short-option 'h' with 'g' * Add man pages for new device self test commands * Updating version to 1.1 * nvme-cli: Implement printing get NOPSC feature * nvme-cli: Implement printing the get Keep Alive Timer feature * nvme-cli: Implement printing the get host controlled thermal management feature. * nvme-cli: Implement printing the get timestamp feature. * Adding ppc big endian support * Revert "nvme-cli: Wait for device file if not present after successful add_ctrl" * Revert "nvme-cli: Add ioctl retry support for "connect-all"" (forwarded request 642268 from morbidrsa) OBS-URL: https://build.opensuse.org/request/show/642655 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/nvme-cli?expand=0&rev=27
2018-10-18 15:35:20 +02:00
Source: %{name}-%{version}.tar.gz
Source2: nvme-cli-rpmlintrc
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
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
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
Patch100: 0100-nvme_fc-auto-connect-scripts.patch
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
Patch104: 0104-nvme-cli-Fix-documentation-syntax-and-typo.patch
BuildRequires: libuuid-devel
BuildRequires: pkgconfig
BuildRequires: xmlto
BuildRequires: pkgconfig(libudev)
BuildRequires: rubygem(asciidoctor)
%description
NVM Express (NVMe) is a direct attached storage interface. The
nvme-cli package contains core management tools with minimal
dependencies.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch100 -p1
%patch101 -p1
%patch102 -p1
%patch103 -p1
%patch104 -p1
%build
echo %{version} > version
make CFLAGS="%{optflags} -I." PREFIX=%{_prefix} USE_ASCIIDOCTOR=YesPlease %{?_smp_mflags} all
%install
make PREFIX=%{_prefix} DESTDIR=%{buildroot} install-bin install-man %{?_smp_mflags}
install -m 644 -D /dev/null %{buildroot}%{_sysconfdir}/nvme/hostnqn
install -m 644 -D completions/bash-nvme-completion.sh %{buildroot}%{_datadir}/bash_completion/completions/nvme
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
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
%define services nvmefc-boot-connections.service nvmefc-connect.target
%pre
%service_add_pre %services nvmefc-connect@.service
%post
if [ ! -e %{_sysconfdir}/nvme/hostnqn ]; then
%{_sbindir}/nvme gen-hostnqn > %{_sysconfdir}/nvme/hostnqn
fi
if [ ! -e %{_sysconfdir}/nvme/hostid ]; then
%{_bindir}/uuidgen > %{_sysconfdir}/nvme/hostid
fi
%service_add_post %services nvmefc-connect@.service
%preun
%service_del_preun -f %services
%postun
%service_del_postun %services
%posttrans
/usr/bin/echo add 2>/dev/null >/sys/class/fc/fc_udev_device/nvme_discovery || true
%files
%license LICENSE
%doc README.md
%{_sbindir}/nvme
%{_mandir}/man1/nvme*.1*%{?ext_man}
%dir %{_datadir}/bash_completion
%dir %{_datadir}/bash_completion/completions/
%{_datadir}/bash_completion/completions/nvme
%{_udevrulesdir}/70-nvmefc-autoconnect.rules
%{_udevrulesdir}/71-nvme-iopolicy-netapp.rules
%{_unitdir}/nvmefc-boot-connections.service
%{_unitdir}/nvmefc-connect@.service
%{_unitdir}/nvmefc-connect.target
%dir %{_sysconfdir}/nvme/
%ghost %{_sysconfdir}/nvme/hostnqn
%ghost %{_sysconfdir}/nvme/hostid
%changelog