diff --git a/.gitignore b/.gitignore index 051b0de..94fe180 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/nvml-1.3.tar.gz +SOURCES/pmdk-1.4.tar.gz diff --git a/.nvml.metadata b/.nvml.metadata index 26b0e48..300f8f2 100644 --- a/.nvml.metadata +++ b/.nvml.metadata @@ -1 +1 @@ -6a6313ed627a27f5ca04d29c027b4f8a48bcb987 SOURCES/nvml-1.3.tar.gz +d876cf64f635546f63033bb6201bf9998fd81993 SOURCES/pmdk-1.4.tar.gz diff --git a/SOURCES/14a76ef-rpmem_fip-return-failure-for-a-failed-allocation.patch b/SOURCES/14a76ef-rpmem_fip-return-failure-for-a-failed-allocation.patch deleted file mode 100644 index 8f34718..0000000 --- a/SOURCES/14a76ef-rpmem_fip-return-failure-for-a-failed-allocation.patch +++ /dev/null @@ -1,29 +0,0 @@ -rpmem_fip: return failure for a failed allocation - -BZ: - -commit 14a76ef815d6bd22919b9c9351778ddc42d28212 -Author: Jeff Moyer -Date: Thu Oct 19 17:21:35 2017 -0400 - - rpmem_fip: return failure for a failed allocation - - rpmem_fip_getinfo will return 0 (success) when it fails to - allocate space. This can result in a NULL pointer dereference - later on in callers. - - Signed-off-by: Jeff Moyer - -diff --git a/src/librpmem/rpmem_fip.c b/src/librpmem/rpmem_fip.c -index 87ffcaf..0993213 100644 ---- a/src/librpmem/rpmem_fip.c -+++ b/src/librpmem/rpmem_fip.c -@@ -368,7 +368,7 @@ static int - rpmem_fip_getinfo(struct rpmem_fip *fip, const char *node, const char *service, - enum rpmem_provider provider, enum rpmem_persist_method pm) - { -- int ret = 0; -+ int ret = -1; - struct fi_info *hints = rpmem_fip_get_hints(provider); - if (!hints) { - RPMEM_LOG(ERR, "!getting fabric interface information hints"); diff --git a/SOURCES/fbef3ef-rpmemd-fix-potential-memory-leak.patch b/SOURCES/fbef3ef-rpmemd-fix-potential-memory-leak.patch deleted file mode 100644 index 3bd7c8f..0000000 --- a/SOURCES/fbef3ef-rpmemd-fix-potential-memory-leak.patch +++ /dev/null @@ -1,35 +0,0 @@ -rpmemd: fix potential memory leak - -BZ: - -commit fbef3efa8c874ec71cb69455603a03ba9023641f -Author: Jeff Moyer -Date: Thu Oct 19 17:20:12 2017 -0400 - - rpmemd: fix potential memory leak - - If realloc fails, the original buffer is leaked. Fix it. - - Signed-off-by: Jeff Moyer - -diff --git a/src/tools/rpmemd/rpmemd_config.c b/src/tools/rpmemd/rpmemd_config.c -index 17720b6..7cd4505 100644 ---- a/src/tools/rpmemd/rpmemd_config.c -+++ b/src/tools/rpmemd/rpmemd_config.c -@@ -389,12 +389,13 @@ parse_config_file(const char *filename, struct rpmemd_config *config, - goto error; - - if (line_max_increased) { -- line_copy = (char *)realloc(line_copy, -+ char *new = (char *)realloc(line_copy, - sizeof(char) * line_max); -- if (line_copy == NULL) { -+ if (new == NULL) { - RPMEMD_LOG(ERR, "!malloc"); -- goto error_malloc_line_copy; -+ goto error; - } -+ line_copy = new; - line_max_increased = 0; - } - diff --git a/SPECS/nvml.spec b/SPECS/nvml.spec index 56b318a..a14497a 100644 --- a/SPECS/nvml.spec +++ b/SPECS/nvml.spec @@ -1,12 +1,10 @@ Name: nvml -Version: 1.3 +Version: 1.4 Release: 3%{?dist} Summary: Non-Volatile Memory Library License: BSD -URL: http://pmem.io/nvml -Source0: https://github.com/pmem/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz -Patch0: fbef3ef-rpmemd-fix-potential-memory-leak.patch -Patch1: 14a76ef-rpmem_fip-return-failure-for-a-failed-allocation.patch +URL: http://pmem.io/pmdk +Source0: https://github.com/pmem/pmdk/archive/%{version}.tar.gz#/pmdk-%{version}.tar.gz BuildRequires: glibc-devel BuildRequires: autoconf @@ -15,12 +13,14 @@ BuildRequires: man BuildRequires: pkgconfig BuildRequires: doxygen BuildRequires: gdb +BuildRequires: ndctl-devel >= 59.2-1 +BuildRequires: daxctl-devel >= 59.2-1 %define min_libfabric_ver 1.4.2 BuildRequires: libfabric-devel >= %{min_libfabric_ver} # Debug variants of the libraries should be filtered out of the provides. -%global __provides_exclude_from ^%{_libdir}/nvml_debug/.*\\.so.*$ +%global __provides_exclude_from ^%{_libdir}/pmdk_debug/.*\\.so.*$ # By design, NVML does not support any 32-bit architecture. # Due to dependency on xmmintrin.h and some inline assembly, it can be @@ -50,9 +50,9 @@ to pmem is provided. %files -n libpmem %defattr(-,root,root,-) -%dir %{_datadir}/nvml +%dir %{_datadir}/pmdk %{_libdir}/libpmem.so.* -%{_datadir}/nvml/nvml.magic +%{_datadir}/pmdk/pmdk.magic %license LICENSE %doc ChangeLog CONTRIBUTING.md README.md @@ -76,7 +76,8 @@ convenient. %{_libdir}/libpmem.so %{_libdir}/pkgconfig/libpmem.pc %{_includedir}/libpmem.h -%{_mandir}/man3/libpmem.3.gz +%{_mandir}/man7/libpmem.7.gz +%{_mandir}/man3/pmem_*.3.gz %license LICENSE %doc ChangeLog CONTRIBUTING.md README.md @@ -93,13 +94,13 @@ to pmem is provided. This sub-package contains debug variant of the library, providing run-time assertions and trace points. The typical way to access the debug version is to set the environment variable LD_LIBRARY_PATH to -/usr/lib64/nvml_debug. +/usr/lib64/pmdk_debug. %files -n libpmem-debug %defattr(-,root,root,-) -%dir %{_libdir}/nvml_debug -%{_libdir}/nvml_debug/libpmem.so -%{_libdir}/nvml_debug/libpmem.so.* +%dir %{_libdir}/pmdk_debug +%{_libdir}/pmdk_debug/libpmem.so +%{_libdir}/pmdk_debug/libpmem.so.* %license LICENSE %doc ChangeLog CONTRIBUTING.md README.md @@ -141,7 +142,9 @@ more generally useful. %{_libdir}/libpmemblk.so %{_libdir}/pkgconfig/libpmemblk.pc %{_includedir}/libpmemblk.h -%{_mandir}/man3/libpmemblk.3.gz +%{_mandir}/man7/libpmemblk.7.gz +%{_mandir}/man5/poolset.5.gz +%{_mandir}/man3/pmemblk_*.3.gz %license LICENSE %doc ChangeLog CONTRIBUTING.md README.md @@ -159,13 +162,13 @@ failure or program interruption (no torn blocks). This sub-package contains debug variant of the library, providing run-time assertions and trace points. The typical way to access the debug version is to set the environment variable LD_LIBRARY_PATH to -/usr/lib64/nvml_debug. +/usr/lib64/pmdk_debug. %files -n libpmemblk-debug %defattr(-,root,root,-) -%dir %{_libdir}/nvml_debug -%{_libdir}/nvml_debug/libpmemblk.so -%{_libdir}/nvml_debug/libpmemblk.so.* +%dir %{_libdir}/pmdk_debug +%{_libdir}/pmdk_debug/libpmemblk.so +%{_libdir}/pmdk_debug/libpmemblk.so.* %license LICENSE %doc ChangeLog CONTRIBUTING.md README.md @@ -202,7 +205,9 @@ level libraries like libpmemobj to be more generally useful. %{_libdir}/libpmemlog.so %{_libdir}/pkgconfig/libpmemlog.pc %{_includedir}/libpmemlog.h -%{_mandir}/man3/libpmemlog.3.gz +%{_mandir}/man7/libpmemlog.7.gz +%{_mandir}/man5/poolset.5.gz +%{_mandir}/man3/pmemlog_*.3.gz %license LICENSE %doc ChangeLog CONTRIBUTING.md README.md @@ -221,13 +226,13 @@ level libraries like libpmemobj to be more generally useful. This sub-package contains debug variant of the library, providing run-time assertions and trace points. The typical way to access the debug version is to set the environment variable LD_LIBRARY_PATH to -/usr/lib64/nvml_debug. +/usr/lib64/pmdk_debug. %files -n libpmemlog-debug %defattr(-,root,root,-) -%dir %{_libdir}/nvml_debug -%{_libdir}/nvml_debug/libpmemlog.so -%{_libdir}/nvml_debug/libpmemlog.so.* +%dir %{_libdir}/pmdk_debug +%{_libdir}/pmdk_debug/libpmemlog.so +%{_libdir}/pmdk_debug/libpmemlog.so.* %license LICENSE %doc ChangeLog CONTRIBUTING.md README.md @@ -265,7 +270,15 @@ probably want to start with this library. %{_libdir}/pkgconfig/libpmemobj.pc %{_includedir}/libpmemobj.h %{_includedir}/libpmemobj/*.h -%{_mandir}/man3/libpmemobj.3.gz +%{_mandir}/man7/libpmemobj.7.gz +%{_mandir}/man5/poolset.5.gz +%{_mandir}/man3/pmemobj_*.3.gz +%{_mandir}/man3/pobj_*.3.gz +%{_mandir}/man3/oid_*.3.gz +%{_mandir}/man3/toid*.3.gz +%{_mandir}/man3/direct_*.3.gz +%{_mandir}/man3/d_r*.3.gz +%{_mandir}/man3/tx_*.3.gz %license LICENSE %doc ChangeLog CONTRIBUTING.md README.md @@ -284,13 +297,13 @@ probably want to start with this library. This sub-package contains debug variant of the library, providing run-time assertions and trace points. The typical way to access the debug version is to set the environment variable LD_LIBRARY_PATH to -/usr/lib64/nvml_debug. +/usr/lib64/pmdk_debug. %files -n libpmemobj-debug %defattr(-,root,root,-) -%dir %{_libdir}/nvml_debug -%{_libdir}/nvml_debug/libpmemobj.so -%{_libdir}/nvml_debug/libpmemobj.so.* +%dir %{_libdir}/pmdk_debug +%{_libdir}/pmdk_debug/libpmemobj.so +%{_libdir}/pmdk_debug/libpmemobj.so.* %license LICENSE %doc ChangeLog CONTRIBUTING.md README.md @@ -327,7 +340,8 @@ applications that want to make use of libvmem. %{_libdir}/libvmem.so %{_libdir}/pkgconfig/libvmem.pc %{_includedir}/libvmem.h -%{_mandir}/man3/libvmem.3.gz +%{_mandir}/man7/libvmem.7.gz +%{_mandir}/man3/vmem_*.3.gz %license LICENSE %doc ChangeLog CONTRIBUTING.md README.md @@ -344,13 +358,13 @@ its own malloc-style API. This sub-package contains debug variant of the library, providing run-time assertions and trace points. The typical way to access the debug version is to set the environment variable LD_LIBRARY_PATH to -/usr/lib64/nvml_debug. +/usr/lib64/pmdk_debug. %files -n libvmem-debug %defattr(-,root,root,-) -%dir %{_libdir}/nvml_debug -%{_libdir}/nvml_debug/libvmem.so -%{_libdir}/nvml_debug/libvmem.so.* +%dir %{_libdir}/pmdk_debug +%{_libdir}/pmdk_debug/libvmem.so +%{_libdir}/pmdk_debug/libvmem.so.* %license LICENSE %doc ChangeLog CONTRIBUTING.md README.md @@ -392,7 +406,7 @@ applications that want to specifically make use of libvmmalloc. %{_libdir}/libvmmalloc.so %{_libdir}/pkgconfig/libvmmalloc.pc %{_includedir}/libvmmalloc.h -%{_mandir}/man3/libvmmalloc.3.gz +%{_mandir}/man7/libvmmalloc.7.gz %license LICENSE %doc ChangeLog CONTRIBUTING.md README.md @@ -410,13 +424,13 @@ application. This sub-package contains debug variant of the library, providing run-time assertions and trace points. The typical way to access the debug version is to set the environment variable LD_LIBRARY_PATH to -/usr/lib64/nvml_debug. +/usr/lib64/pmdk_debug. %files -n libvmmalloc-debug %defattr(-,root,root,-) -%dir %{_libdir}/nvml_debug -%{_libdir}/nvml_debug/libvmmalloc.so -%{_libdir}/nvml_debug/libvmmalloc.so.* +%dir %{_libdir}/pmdk_debug +%{_libdir}/pmdk_debug/libvmmalloc.so +%{_libdir}/pmdk_debug/libvmmalloc.so.* %license LICENSE %doc ChangeLog CONTRIBUTING.md README.md @@ -476,7 +490,9 @@ pools created by libpmemlog, libpemblk and libpmemobj libraries. %{_libdir}/libpmempool.so %{_libdir}/pkgconfig/libpmempool.pc %{_includedir}/libpmempool.h -%{_mandir}/man3/libpmempool.3.gz +%{_mandir}/man7/libpmempool.7.gz +%{_mandir}/man5/poolset.5.gz +%{_mandir}/man3/pmempool_*.3.gz %license LICENSE %doc ChangeLog CONTRIBUTING.md README.md @@ -494,13 +510,13 @@ pools created by libpmemlog, libpemblk and libpmemobj libraries. This sub-package contains debug variant of the library, providing run-time assertions and trace points. The typical way to access the debug version is to set the environment variable LD_LIBRARY_PATH to -/usr/lib64/nvml_debug. +/usr/lib64/pmdk_debug. %files -n libpmempool-debug %defattr(-,root,root,-) -%dir %{_libdir}/nvml_debug -%{_libdir}/nvml_debug/libpmempool.so -%{_libdir}/nvml_debug/libpmempool.so.* +%dir %{_libdir}/pmdk_debug +%{_libdir}/pmdk_debug/libpmempool.so +%{_libdir}/pmdk_debug/libpmempool.so.* %license LICENSE %doc ChangeLog CONTRIBUTING.md README.md @@ -538,7 +554,8 @@ applications that want to specifically make use of librpmem. %{_libdir}/librpmem.so %{_libdir}/pkgconfig/librpmem.pc %{_includedir}/librpmem.h -%{_mandir}/man3/librpmem.3.gz +%{_mandir}/man7/librpmem.7.gz +%{_mandir}/man3/rpmem_*.3.gz %license LICENSE %doc ChangeLog CONTRIBUTING.md README.md @@ -555,13 +572,13 @@ to replicate peristent memory regions over RDMA protocol. This sub-package contains debug variant of the library, providing run-time assertions and trace points. The typical way to access the debug version is to set the environment variable LD_LIBRARY_PATH to -/usr/lib64/nvml_debug. +/usr/lib64/pmdk_debug. %files -n librpmem-debug %defattr(-,root,root,-) -%dir %{_libdir}/nvml_debug -%{_libdir}/nvml_debug/librpmem.so -%{_libdir}/nvml_debug/librpmem.so.* +%dir %{_libdir}/pmdk_debug +%{_libdir}/pmdk_debug/librpmem.so +%{_libdir}/pmdk_debug/librpmem.so.* %license LICENSE %doc ChangeLog CONTRIBUTING.md README.md @@ -569,7 +586,7 @@ debug version is to set the environment variable LD_LIBRARY_PATH to %package -n rpmemd Group: System Environment/Base Summary: Target node process executed by librpmem -Requires: libpmem >= %{version}-%{release} +Requires: libpmem = %{version}-%{release} Requires: libfabric >= %{min_libfabric_ver} %description -n rpmemd The rpmemd process is executed on a target node by librpmem library @@ -580,7 +597,64 @@ and facilitates access to persistent memory over RDMA. %{_mandir}/man1/rpmemd.1.gz -%package tools +%package -n libpmemcto +Summary: Close-to-Open Persistence library +Group: System Environment/Libraries +Requires: libpmem = %{version}-%{release} +%description -n libpmemcto +The libpmemcto library is a Persistent Memory allocator with no overhead +imposed by run-time flushing or transactional updates. + +%files -n libpmemcto +%defattr(-,root,root,-) +%{_libdir}/libpmemcto.so.* +%license LICENSE +%doc ChangeLog CONTRIBUTING.md README.md + + +%package -n libpmemcto-devel +Summary: Development files for Close-to-Open Persistence library +Group: Development/Libraries +Requires: libpmemcto = %{version}-%{release} +%description -n libpmemcto-devel +The libpmemcto library is a Persistent Memory allocator with no overhead +imposed by run-time flushing or transactional updates. + +%files -n libpmemcto-devel +%defattr(-,root,root,-) +%{_libdir}/libpmemcto.so +%{_libdir}/pkgconfig/libpmemcto.pc +%{_includedir}/libpmemcto.h +%{_mandir}/man7/libpmemcto.7.gz +%{_mandir}/man5/poolset.5.gz +%{_mandir}/man3/pmemcto*.3.gz +%license LICENSE +%doc ChangeLog CONTRIBUTING.md README.md + + +%package -n libpmemcto-debug +Summary: Debug variant of the Close-to-Open Persistence library +Group: Development/Libraries +Requires: libpmemcto = %{version}-%{release} +%description -n libpmemcto-debug +The libpmemcto library is a Persistent Memory allocator with no overhead +imposed by run-time flushing or transactional updates. + +This sub-package contains debug variant of the library, providing +run-time assertions and trace points. The typical way to access the +debug version is to set the environment variable LD_LIBRARY_PATH to +/usr/lib64/pmdk_debug. + +%files -n libpmemcto-debug +%defattr(-,root,root,-) +%dir %{_libdir}/pmdk_debug +%{_libdir}/pmdk_debug/libpmemcto.so +%{_libdir}/pmdk_debug/libpmemcto.so.* +%license LICENSE +%doc ChangeLog CONTRIBUTING.md README.md + + +%package -n pmempool Summary: Utilities for Persistent Memory Group: System Environment/Base Requires: libpmem = %{version}-%{release} @@ -588,29 +662,45 @@ Requires: libpmemlog = %{version}-%{release} Requires: libpmemblk = %{version}-%{release} Requires: libpmemobj = %{version}-%{release} Requires: libpmempool = %{version}-%{release} -%description tools -Useful applications for administration and diagnosis of persistent memory. - -%files tools +Requires: libpmemcto = %{version}-%{release} +Obsoletes: nvml-tools < %{version}-%{release} +%description -n pmempool +The pmempool is a standalone utility for management and off-line analysis +of Persistent Memory pools created by PMDK libraries. It provides a set +of utilities for administration and diagnostics of Persistent Memory pools. +The pmempool may be useful for troubleshooting by system administrators +and users of the applications based on PMDK libraries. + +%files -n pmempool %{_bindir}/pmempool %{_mandir}/man1/pmempool.1.gz -%{_mandir}/man1/pmempool-check.1.gz -%{_mandir}/man1/pmempool-convert.1.gz -%{_mandir}/man1/pmempool-create.1.gz -%{_mandir}/man1/pmempool-dump.1.gz -%{_mandir}/man1/pmempool-info.1.gz -%{_mandir}/man1/pmempool-rm.1.gz -%{_mandir}/man1/pmempool-sync.1.gz -%{_mandir}/man1/pmempool-transform.1.gz +%{_mandir}/man1/pmempool-*.1.gz %config(noreplace) %{_sysconfdir}/bash_completion.d/pmempool.sh %license LICENSE %doc ChangeLog CONTRIBUTING.md README.md +%package -n daxio +Summary: Perform I/O on Device DAX devices or zero a Device DAX device +Group: System Environment/Base +Requires: libpmem = %{version}-%{release} +%description -n daxio +The daxio utility performs I/O on Device DAX devices or zero +a Device DAX device. Since the standard I/O APIs (read/write) cannot be used +with Device DAX, data transfer is performed on a memory-mapped device. +The daxio may be used to dump Device DAX data to a file, restore data from +a backup copy, move/copy data to another device or to erase data from +a device. + +%files -n daxio +%{_bindir}/daxio +%{_mandir}/man1/daxio.1.gz +%license LICENSE +%doc ChangeLog CONTRIBUTING.md README.md + + %prep -%setup -q -n %{name}-%{version} -%patch0 -p1 -%patch1 -p1 +%setup -q -n pmdk-%{version} %build # Currently, NVML makefiles do not allow to easily override CFLAGS, @@ -619,12 +709,12 @@ Useful applications for administration and diagnosis of persistent memory. EXTRA_CFLAGS_RELEASE="%{optflags}" \ EXTRA_CFLAGS_DEBUG="%{optflags} -Wp,-U_FORTIFY_SOURCE -O0" \ EXTRA_CXXFLAGS="%{optflags}" \ -make %{?_smp_mflags} +NDCTL_ENABLE=y make %{?_smp_mflags} # Override LIB_AR with empty string to skip installation of static libraries %install -make install DESTDIR=%{buildroot} \ +NDCTL_ENABLE=y make install DESTDIR=%{buildroot} \ LIB_AR= \ prefix=%{_prefix} \ libdir=%{_libdir} \ @@ -634,14 +724,8 @@ make install DESTDIR=%{buildroot} \ sysconfdir=%{_sysconfdir} \ docdir=%{_docdir} \ CPP_DOC_DIR=libpmemobj++-devel -mkdir -p %{buildroot}%{_datadir}/nvml -cp utils/nvml.magic %{buildroot}%{_datadir}/nvml/ - - -%check -echo "PMEM_FS_DIR=/tmp" > src/test/testconfig.sh -echo "PMEM_FS_DIR_FORCE_PMEM=1" >> src/test/testconfig.sh -make check +mkdir -p %{buildroot}%{_datadir}/pmdk +cp utils/pmdk.magic %{buildroot}%{_datadir}/pmdk/pmdk.magic %post -n libpmem -p /sbin/ldconfig @@ -658,6 +742,8 @@ make check %postun -n libvmmalloc -p /sbin/ldconfig %post -n libpmempool -p /sbin/ldconfig %postun -n libpmempool -p /sbin/ldconfig +%post -n libpmemcto -p /sbin/ldconfig +%postun -n libpmemcto -p /sbin/ldconfig %post -n librpmem -p /sbin/ldconfig %postun -n librpmem -p /sbin/ldconfig @@ -667,6 +753,19 @@ make check %changelog +* Wed Jun 27 2018 Jeff Moyer - 1.4-3.el7 +- Fix up rpmemd dependency on libfabric +- Resolves: rhbz#1595671 + +* Fri Jun 22 2018 Jeff Moyer - 1.4-2.el7 +- Make library version dependencies more strict (Jeff Moyer) +- Related: rhbz#1487676 + +* Fri Jun 08 2018 Jeff Moyer - 1.4-1.el7 +- rebase to upstream 1.4 +- disable make check +- Resolves: rhbz#1487676 + * Thu Oct 19 2017 Jeff Moyer - 1.3-3.el7 - fix up issues found by the clang static checker - Related: rhbz#1455216