* Mon Feb 28 2022 Tomas Bzatek <tbzatek@redhat.com> - 1.0~rc4-1
- Upstream v1.0 Release Candidate 4
This commit is contained in:
parent
9b2e65df79
commit
7b2638413d
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/libnvme-1.0-rc4.tar.gz
|
49
libnvme-1.0-rc5-ccan_headers.patch
Normal file
49
libnvme-1.0-rc5-ccan_headers.patch
Normal file
@ -0,0 +1,49 @@
|
||||
From d43a9f73ae4980606a6cbfa1777486d9dcc495b2 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Belanger <martin.belanger@dell.com>
|
||||
Date: Mon, 28 Feb 2022 11:26:07 -0500
|
||||
Subject: [PATCH] Move ccan definitions out of public headers.
|
||||
|
||||
Signed-off-by: Martin Belanger <martin.belanger@dell.com>
|
||||
---
|
||||
src/nvme/util.c | 6 ++++++
|
||||
src/nvme/util.h | 7 +------
|
||||
2 files changed, 7 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/nvme/util.c b/src/nvme/util.c
|
||||
index 7d8a40b2..c95f16b3 100644
|
||||
--- a/src/nvme/util.c
|
||||
+++ b/src/nvme/util.c
|
||||
@@ -759,3 +759,9 @@ size_t get_entity_version(char *buffer, size_t bufsz)
|
||||
|
||||
return num_bytes;
|
||||
}
|
||||
+
|
||||
+struct nvmf_ext_attr *nvmf_exat_ptr_next(struct nvmf_ext_attr *p)
|
||||
+{
|
||||
+ return (struct nvmf_ext_attr *)
|
||||
+ ((uintptr_t)p + (ptrdiff_t)nvmf_exat_size(le16_to_cpu(p->exatlen)));
|
||||
+}
|
||||
diff --git a/src/nvme/util.h b/src/nvme/util.h
|
||||
index f1f6fcb6..f034c1b7 100644
|
||||
--- a/src/nvme/util.h
|
||||
+++ b/src/nvme/util.h
|
||||
@@ -10,7 +10,6 @@
|
||||
#define _LIBNVME_UTIL_H
|
||||
|
||||
#include "types.h"
|
||||
-#include <ccan/endian/endian.h>
|
||||
|
||||
/**
|
||||
* DOC: util.h
|
||||
@@ -548,10 +547,6 @@ static inline __u16 nvmf_exat_size(size_t val_len)
|
||||
*
|
||||
* Return: Pointer to the next element in the array.
|
||||
*/
|
||||
-static inline struct nvmf_ext_attr *nvmf_exat_ptr_next(struct nvmf_ext_attr *p)
|
||||
-{
|
||||
- return (struct nvmf_ext_attr *)
|
||||
- ((uintptr_t)p + (ptrdiff_t)nvmf_exat_size(le16_to_cpu(p->exatlen)));
|
||||
-}
|
||||
+struct nvmf_ext_attr *nvmf_exat_ptr_next(struct nvmf_ext_attr *p);
|
||||
|
||||
#endif /* _LIBNVME_UTIL_H */
|
108
libnvme.spec
Normal file
108
libnvme.spec
Normal file
@ -0,0 +1,108 @@
|
||||
# RHEL 8 compatibility
|
||||
%{!?version_no_tilde: %define version_no_tilde %{shrink:%(echo '%{version}' | tr '~' '-')}}
|
||||
|
||||
Name: libnvme
|
||||
Summary: Linux-native nvme device management library
|
||||
Version: 1.0~rc4
|
||||
Release: 1%{?dist}
|
||||
License: LGPLv2+
|
||||
URL: https://github.com/linux-nvme/libnvme
|
||||
Source0: %{url}/archive/v%{version_no_tilde}/%{name}-%{version_no_tilde}.tar.gz
|
||||
|
||||
# https://github.com/linux-nvme/libnvme/pull/261
|
||||
Patch1: libnvme-1.0-rc5-ccan_headers.patch
|
||||
|
||||
BuildRequires: gcc gcc-c++
|
||||
BuildRequires: swig
|
||||
BuildRequires: python3-devel
|
||||
|
||||
BuildRequires: meson >= 0.47.0
|
||||
BuildRequires: libuuid-devel
|
||||
BuildRequires: json-c-devel >= 0.13
|
||||
BuildRequires: openssl-devel
|
||||
|
||||
%description
|
||||
Provides type definitions for NVMe specification structures,
|
||||
enumerations, and bit fields, helper functions to construct,
|
||||
dispatch, and decode commands and payloads, and utilities to connect,
|
||||
scan, and manage nvme devices on a Linux system.
|
||||
|
||||
%package devel
|
||||
Summary: Development files for %{name}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
This package provides header files to include and libraries to link with
|
||||
for Linux-native nvme device management.
|
||||
%package doc
|
||||
Summary: Reference manual for libnvme
|
||||
BuildArch: noarch
|
||||
BuildRequires: perl-interpreter
|
||||
BuildRequires: python3-sphinx
|
||||
BuildRequires: python3-sphinx_rtd_theme
|
||||
|
||||
%description doc
|
||||
This package contains the reference manual for %{name}.
|
||||
|
||||
%package -n python3-nvme
|
||||
Summary: Python3 bindings for libnvme
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
%{?python_provide:%python_provide python3-nvme}
|
||||
|
||||
%description -n python3-nvme
|
||||
This package contains Python bindings for libnvme.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n %{name}-%{version_no_tilde}
|
||||
|
||||
%build
|
||||
%meson -Dpython=true -Ddocs=all -Ddocs-build=true -Dhtmldir=%{_pkgdocdir}
|
||||
%meson_build
|
||||
|
||||
%install
|
||||
%meson_install
|
||||
%{__install} -pm 644 README.md %{buildroot}%{_pkgdocdir}
|
||||
%{__install} -pm 644 doc/config-schema.json %{buildroot}%{_pkgdocdir}
|
||||
mv %{buildroot}%{_pkgdocdir}/nvme/html %{buildroot}%{_pkgdocdir}/html
|
||||
rm -rf %{buildroot}%{_pkgdocdir}/nvme
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%files
|
||||
%license COPYING ccan/licenses/*
|
||||
%{_libdir}/libnvme.so.1
|
||||
%{_libdir}/libnvme.so.1.0.0
|
||||
|
||||
%files devel
|
||||
%{_libdir}/libnvme.so
|
||||
%{_includedir}/libnvme.h
|
||||
%dir %{_includedir}/nvme
|
||||
%{_includedir}/nvme/*.h
|
||||
%{_libdir}/pkgconfig/*.pc
|
||||
|
||||
%files doc
|
||||
%doc %{_pkgdocdir}
|
||||
%{_mandir}/man2/*.2*
|
||||
|
||||
%files -n python3-nvme
|
||||
%dir %{python3_sitearch}/libnvme
|
||||
%{python3_sitearch}/libnvme/*
|
||||
|
||||
%changelog
|
||||
* Mon Feb 28 2022 Tomas Bzatek <tbzatek@redhat.com> - 1.0~rc4-1
|
||||
- Upstream v1.0 Release Candidate 4
|
||||
|
||||
* Fri Feb 11 2022 Tomas Bzatek <tbzatek@redhat.com> - 1.0~rc3-1
|
||||
- Upstream v1.0 Release Candidate 3
|
||||
|
||||
* Tue Feb 01 2022 Tomas Bzatek <tbzatek@redhat.com> - 1.0~rc2-1
|
||||
- Upstream v1.0 Release Candidate 2
|
||||
|
||||
* Thu Jan 27 2022 Tomas Bzatek <tbzatek@redhat.com> - 1.0~rc1-1
|
||||
- Upstream v1.0 Release Candidate 1
|
||||
|
||||
* Mon Jan 17 2022 Tomas Bzatek <tbzatek@redhat.com> - 1.0~rc0-1
|
||||
- Upstream v1.0 Release Candidate 0
|
||||
|
||||
* Wed Oct 20 2021 Tomas Bzatek <tbzatek@redhat.com> - 0.0.1-1.git1fe38d6
|
||||
- Initial packaging
|
Loading…
Reference in New Issue
Block a user