commit a3116871d350e94954327f0f0a6806e3086798328d7e26f9287b0b91c08768f5 Author: Adrian Schröter Date: Fri May 3 19:29:30 2024 +0200 Sync from SUSE:SLFO:Main pmdk revision f8a69f4499cad914e3d296c94e5fbf5f diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/1.11.1.tar.gz b/1.11.1.tar.gz new file mode 100644 index 0000000..c291ba9 --- /dev/null +++ b/1.11.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f8d04ef274e3f5b21423b78a1231dd86612f8c183359accf537c992a5e54f349 +size 2185473 diff --git a/examples-rpmem-add-missing-lfabric-flag.patch b/examples-rpmem-add-missing-lfabric-flag.patch new file mode 100644 index 0000000..29da39a --- /dev/null +++ b/examples-rpmem-add-missing-lfabric-flag.patch @@ -0,0 +1,34 @@ +commit 96ef671e0653571e1c189ad58db9cdca72efb7a8 +Author: Nicolas Morey-Chaisemartin +Date: Wed Jul 22 10:13:36 2020 +0200 + + examples: rpmem: add missing -lfabric flag + + Signed-off-by: Nicolas Morey-Chaisemartin + +diff --git src/examples/librpmem/Makefile src/examples/librpmem/Makefile +index fe88c819aa3c..c0302befcf7b 100644 +--- src/examples/librpmem/Makefile ++++ src/examples/librpmem/Makefile +@@ -11,7 +11,7 @@ ifeq ($(BUILD_RPMEM), y) + PROGS = basic hello manpage + DIRS = fibonacci + +-LIBS = -lrpmem -pthread ++LIBS = -lrpmem -pthread -lfabric + else + $(info NOTE: Skipping librpmem examples because $(BUILD_RPMEM_INFO)) + endif +diff --git src/examples/librpmem/fibonacci/Makefile src/examples/librpmem/fibonacci/Makefile +index f320ce0ba753..73789a22d7ba 100644 +--- src/examples/librpmem/fibonacci/Makefile ++++ src/examples/librpmem/fibonacci/Makefile +@@ -6,7 +6,7 @@ + # + PROGS = fibonacci + +-LIBS = -lrpmem -lpmem -pthread ++LIBS = -lrpmem -lpmem -pthread -lfabric + + include ../../Makefile.inc + diff --git a/gen-doc.sh b/gen-doc.sh new file mode 100644 index 0000000..78e210c --- /dev/null +++ b/gen-doc.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# Run this script after updating the source tarball and changing the version number in the spec file. +# If you get errors about missing files in ./doc/librpmem/ and ./doc/rpmemd you are probably missing +# libfabric + +TARBALL=$(rpmspec --parse pmdk.spec| grep "Source:" | awk '{ print $NF'} | xargs basename) +DIR=$(tar tvf $TARBALL | head -n 1 | awk '{ print $NF}') + +rm -Rf $DIR +tar xf $TARBALL +cd $DIR +make -C doc all +FILES=$(find . -name "*\.[1357].md" | sed -e 's/\.md$//') +tar czf ../pregen-doc.tgz $FILES diff --git a/pmdk.changes b/pmdk.changes new file mode 100644 index 0000000..042d6f4 --- /dev/null +++ b/pmdk.changes @@ -0,0 +1,479 @@ +------------------------------------------------------------------- +Wed Oct 6 08:54:51 UTC 2021 - Christian Vögl + +- Update to PMDK 1.11.1 + * Bugfixes: + * doc: remove exprimental moniker from libpmem2(7) + * common: fix missing sfence in non-temporal memcpy + * common: fix a mismatch between prototype and body + * common: fix mismatched function args + * obj: rename vars clashing with those of a containing block + * pmem2: don't force smaller alignment for fsdax mappings + * pool: don't trample upon users of localtime() + * rpmem: Fix RPMEM_RAW_BUFF_SIZE and LANE_ALIGN_SIZE for powerpc64le + +------------------------------------------------------------------- +Tue Sep 21 20:21:42 UTC 2021 - Jan Engelhardt + +- Trim old specfile constructs like defattr. + +------------------------------------------------------------------- +Wed Sep 15 08:36:35 UTC 2021 - Christian Vögl + +- Renamed libpmem2-1-devel to libpmem2-devel + +------------------------------------------------------------------- +Wed Sep 8 14:42:34 UTC 2021 - Christian Vögl + +- Update to PMDK 1.11.0 + * Version 1.11.0 + - Adds new APIs for libpmem2, most notably there are new functions + to shrink and extend an existing reservation and a new iterator API + for mappings contained within an existing reservation. There's also + a new function to retrieve a numa node for a source. + - Makes the pmemobj_open() and pmemobj_close() functions from libpmemobj + thread-safe. It's now easier to correctly manage persistent memory + pools in a parallel environment. + - Introduces a new API in libpmemobj to globally change the method of + assigning arenas to threads. The default is to rely on a OS per-thread + key to store arena information. This release introduces an option + to avoid the use of thread-local keys by simply using one global + arena for all threads in a pool. + - pmem2: don't force smaller alignment for fsdax mappings + - rpmem: various fixes for powerpc64le + - doc: fix documentation of pmem_is_pmem() + - common: fix various minor problems found by static analysis + - pmem2: arm64: fix possible data loss on ARMv8.2+ (improper flushing) + This release introduces no changes to the on-media layout and is + fully compatible with the previous version of PMDK. + + * Version 1.10 + - This release introduces a new stable PMDK library, libpmem2, which + is the next major release of libpmem. + This library has an entirely new, but familiar, API that addresses many + shortcomings of the previous version, while retaining all of its + functionality. To learn more, see https://pmem.io/pmdk/libpmem2/ or + libpmem2(7). + The old library, libpmem, is still going to be maintained for the + foreseeable future, but we'd like to encourage any new applications to + leverage libpmem2. + +------------------------------------------------------------------- +Wed Sep 8 10:06:57 UTC 2021 - Christian Vögl + +- Update to PMDK 1.9.2 + * Version 1.9.2 + - This release reverts an incorrect change in SDS handling + "pool: disable SDS check if not supported", and introduces + a proper fix for the issues that patch attempted to correct. + * Version 1.9.1 + - common: fix LIBFABRIC flags + - common: Add runtime SDS check and disable + - pool: disable SDS check if not supported + - obj: fix failure atomicity bug in huge allocs + - obj: add missing drain after ulog processing + - Drop common-fix-LIBFABRIC-flags.patch (now in upstream) + - Add a comment to gen-doc.sh + +------------------------------------------------------------------- +Fri Jan 22 09:25:21 UTC 2021 - Guillaume GARDET + +- Enable aarch64 build + +------------------------------------------------------------------- +Wed Jul 22 07:34:47 UTC 2020 - Nicolas Morey-Chaisemartin + +- Update to PMDK 1.9 + - Switches the default instruction set for memcpy, memmove and memset + implementations on x86 to AVX512, and introduces numerous performance + improvements for those operations on AVX and SSE2 fallback paths. + - Optimizes transactional allocations in libpmemobj by avoiding one + extraneous cache miss and reducing the amount of work required to perform + a reservation. + - Introduces a new API in libpmemobj, pmemobj_tx_set_failure_behavior, + that enables the application to control the behavior of aborting + transactions. + - Stabilizes support for ppc64. + - pmem: mem[cpy|set] optimization when eADR is available + - obj: detect msync failures in non-pmem variants of mem[cpy|move|set] +- Add patches to fix compilation against libfabric: + - examples-rpmem-add-missing-lfabric-flag.patch to fix examples linkage errors + - common-fix-LIBFABRIC-flags.patch to fix daemons/tools linkage errors + +------------------------------------------------------------------- +Thu Feb 13 08:49:37 UTC 2020 - Nicolas Morey-Chaisemartin + +- Update to PMDK 1.8 + - Introduces new API in libpmemobj for user-assisted defragmentation + (see pmemobj_defrag man page for details). + - Introduces experimental support for PPC64LE architecture. + - Introduces new flag in libpmemobj for opting-out of transaction aborts on failure + (POBJ_TX_NO_ABORT), along with new variants of existing APIs that didn't accept + flags (pmemobj_tx_xfree, pmemobj_tx_xpublish, + - pmemobj_tx_xlock, pmemobj_tx_xlog_append_buffer, pmemobj_tx_xstrdup, pmemobj_tx_xwcsdup). + - Moves out libvmem and libvmmalloc to the new repository (https://github.com/pmem/vmem). + - obj: introduce new statistics useful for defrag + - obj: introduce transient/persistent statistics enabling + - obj: introduce pmemobj_tx_(set/get)_user_data funcs + - obj: introduce pmemobj_(set/get)_user_data funcs + - obj: disable workaround for offsetof() since VS 15.5 in public header + - common: drop support for libndctl < 63 on Linux + - pool: rename -N --no-exec to -d --dry-run +- Add gen-doc.sh to pregenerate documentation in pregen-doc.tgz and avoid adding a + build dependency to pandoc + + +------------------------------------------------------------------- +Fri Oct 11 14:19:47 UTC 2019 - Nicolas Morey-Chaisemartin + +- Update to PMDK 1.7 (jsc#SLE-9886) + - Introduces new APIs in libpmemobj for managing space used by transactions. + (see pmemobj_tx_log_append_buffer man page for details) + - Introduces new APIs in librpmem, splitting rpmem_persist into rpmem_flush + and rpmem_drain, allowing applications to use the flush + drain model + already known from libpmem. (libpmemobj does not use this feature yet) + - Optimizes large libpmemobj transactions by significantly reducing + the amount of memory modified at the commit phase. + - Optimizes tracking of libpmemobj reservations. + - Adds new flags for libpmemobj's pmemobj_tx_xadd_range[_direct] API: + POBJ_XADD_NO_SNAPSHOT and POBJ_XADD_ASSUME_INITIALIZED, allowing + applications to optimize how memory is tracked by the library. +- To support some of the above changes the libpmemobj on-media layout had + to be changed, which means that old pools have to be converted using + pmdk-convert >= 1.7. + +------------------------------------------------------------------- +Wed May 15 05:59:44 UTC 2019 - Nicolas Morey-Chaisemartin + +- Disable Werror to deal with a new GCC 9 warning. + +------------------------------------------------------------------- +Mon May 13 08:03:31 UTC 2019 - Nicolas Morey-Chaisemartin + +- Update to PMDK 1.6 (jsc#SLE-5400) + - See ChangeLog for details + +------------------------------------------------------------------- +Wed Apr 24 17:31:35 UTC 2019 - Martin Liška + +- Disable LTO (boo#1133276). + +------------------------------------------------------------------- +Tue Nov 6 11:49:43 UTC 2018 - Jan Engelhardt + +- Restore pmdk-tools package + +------------------------------------------------------------------- +Mon Oct 29 14:46:07 UTC 2018 - nmoreychaisemartin@suse.com + +- Update to PMDK 1.5 (FATE#326234) + * New features: + * common: unsafe shutdown detection (SDS) + * common: detection and repair of uncorrectable memory errors + (bad blocks) + * pool: new "feature" subcommand for enabling and disabling + detection of unsafe shutdown and uncorrectable memory errors + * common: auto flush detection on Windows (on Linux since 1.4) + * pmreorder: new tool for verification of persistent memory + algorithms + * obj: new on media layout + * pmem/obj: new flexible memcpy|memmove|memset API + * obj: new flushing APIs: pmemobj_xpersist, pmemobj_xflush + (PMEMOBJ_F_RELAXED) + * rpmem: new flag RPMEM_PERSIST_RELAXED for rpmem_persist + * obj: lazily initialized volatile variables (pmemobj_volatile) + (EXPERIMENTAL) + * obj: allocation classes with alignment + * obj: new action APIs: pmemobj_defer_free, POBJ_XRESERVE_NEW, + POBJ_XRESERVE_ALLOC + * blk/log: new "ctl" API + * Optimizations: + * obj: major performance improvements for AEP NVDIMMs + * obj: better space utilization for small allocations + * common: call msync only on one page for deep drain + * Other changes: + * The libpmemcto library has been removed + * obj: remove actions limit + * common: new dependency on libndctl + * pmempool: the "convert" subcommand is now a wrapper around + pmdk-convert + * C++ bindings have been split off to a separate project + (libpmemobj-cpp) + * Bug fixes: + * obj: fix type numbers for pmemobj_list_insert_new + * pmem: fix inconsistency in pmem_is_pmem + * daxio: fix checking and adjusting length + +------------------------------------------------------------------- +Tue Sep 4 15:16:31 UTC 2018 - Jan Engelhardt + +- Update to new upstream release 1.4.2 + * common: support for concatenated Device-DAX devices + with 2M/1G alignment + * pmem: add support for "deep flush" operation + * common: add experimental support for aarch64 +- Split development documentation into its own package so it does + not always get installed for the build service. + +------------------------------------------------------------------- +Wed Jun 06 09:52:03 UTC 2018 - opensuse-packaging@opensuse.org + +- Update to version 1.4 (FATE#325145): + - build-fix.patch + * doc: update ChangeLog for 1.4 release + * common: SRCVERSION for out of git tree builds + * doc: mark experimental APIs in man pages + * doc: rephrase paragraphs mentioning eADR + * doc: update man page version numbers + * doc: automatic master docs update + * doc: update README + +------------------------------------------------------------------- +Sat Jan 20 09:11:21 UTC 2018 - jengelh@inai.de + +- Update descriptions from NVML to PMDK. + +------------------------------------------------------------------- +Tue Dec 26 10:59:10 UTC 2017 - jengelh@inai.de + +- Adjust Obsoletes/Provides to exact version + +------------------------------------------------------------------- +Tue Dec 26 10:17:28 UTC 2017 - nmoreychaisemartin@suse.com + +- Upstream project was renamed to PMDK. + - Rename nvml and nvml-tools RPMs to pmdk and pmdk-tools +- Update to version 1.3.1 + - Bug fixes: + - rpmem: fix issues reported by Coverity + - rpmem: fix read error handling + - rpmem: add fip monitor + - test: add rpmemd termination handling test + - cpp: fix pop.persist function in obj_cpp_ptr + - rpmem: return failure for a failed allocation + - rpmem: fix potential memory leak + - common: fix available rm options msg + - pool: fix pmempool_get_max_size + - obj: fix potential deadlock during realloc + - obj: initialize TLS data + - rpmem: fix cleanup if fork() failed + - obj: fix bogus OOM after exhausting first zone + +------------------------------------------------------------------- +Tue Aug 8 11:05:26 UTC 2017 - jengelh@inai.de + +- Fix RPM groups + +------------------------------------------------------------------- +Tue Jul 18 13:58:55 UTC 2017 - nmoreychaisemartin@suse.com + +- Update to upstream version 1.3 (FATE#322653) + This release introduces some useful features and optimizations + in libpmemobj. Most of them are experimental and controlled by + the new pmemobj_ctl APIs. For details, please check the feature + requests identified by the issue numbers listed next to the items below. + + Other important changes are related to performance tuning and + stabilization of librpmem library, which is used by libpmemobj to get + remote access to persistent memory and to provide basic data replication + over RDMA. The librpmem is still considered experimental. + + New features: + - common: add support for concatenated DAX Devices + - common: add Unicode support on Windows + - common: add long path support on Windows + - common: add NVML installer for Windows + - pmem: make pmem_is_pmem() true for Device DAX only + - obj: add pmemobj_wcsdup()/pmemobj_tx_wcsdup() APIs + - obj: export non-inlined pmemobj_direct() + - obj: add PMEMOBJ_NLANES env variable + - cpp: introduce the allocator + - cpp: add wstring version of C++ entry points + - vmem: add vmem_wcsdup() API entry + - pool: add pmempool_rm() function (#307) + - pool: add --force flag for create command (#529) + - benchmark: add a minimal execution time option + - benchmark: add thread affinity option + - benchmark: print 99% and 99.9% percentiles + - doc: separate Linux/Windows version of web-based man pages + + Optimizations: + - obj: cache _pobj_cached_pool in pmemobj_direct() + - obj: optimize thread utilization of buckets + - obj: stop grabbing a lock when querying pool ptr + - rpmem: use multiple endpoints + + Bug fixes: + - common: fix issues reported by static code analyzers + - pmem: fix mmap() implementation on Windows + - pmem: fix mapping addr/length alignment on Windows + - pmem: fix PMEM_MMAP_HINT implementation on Windows + - pmem: fix pmem_is_pmem() on invalid memory ranges + - pmem: fix wrong is_pmem returned by pmem_map_file() + - pmem: fix mprotect() for private mappings on Windows + - pmem: modify pmem_is_pmem() behavior for len==0 + - obj: add failsafe to prevent allocs in constructor + - cpp: fix swap implementation + - cpp: fix sync primitives' constructors + - cpp: fix wrong pointer type in the allocator + - cpp: return persistent_ptr::swap to being public + - pool: treat invalid answer as 'n' + - pool: unify flags value for dry run + - pool: transform for remote replicas + - rpmem: persistency method detection + - benchmark: fix time measurement +- Prevent debug libraries from providing symbols + +------------------------------------------------------------------- +Thu Jun 29 19:49:50 UTC 2017 - jengelh@inai.de + +- Update to new upstream release 1.2.3 + * pmempool: fix mapping type in pool_params_parse + +------------------------------------------------------------------- +Fri Mar 31 11:32:37 UTC 2017 - jengelh@inai.de + +- Manpages do not belong into the shlib package + +------------------------------------------------------------------- +Thu Mar 16 08:46:24 UTC 2017 - jengelh@inai.de + +- Run fdupes + +------------------------------------------------------------------- +Thu Mar 16 08:32:02 UTC 2017 - jthumshirn@suse.com + +- Update to upstream version 1.2.1 (FATE#321727) + This NVML release changes the behavior of pmem_is_pmem() on Linux. + The pmem_is_pmem() function will now return true only if the entire + range is mapped directly from Device DAX (/dev/daxX.Y) without an + intervening file system, and only if the corresponding file mapping + was created with pmem_map_file(). See libpmem(3) for details. + +------------------------------------------------------------------- +Thu Mar 9 09:01:10 UTC 2017 - jthumshirn@suse.com + +- Update to upstream version 1.2 (FATE#321727) ++ build-fix.patch +- 0001-libpmemblk-cast-translation-entry-to-uint64_t-when-calculating-data-offset.patch +* Add Device DAX support, providing that "optimized flush" mechanism + defined in SNIA NVM Programming Model can safely be used, even + if PMEM-aware file system supporting that model is not available, + or if the user does not want to use the file system for some reason. +* Add a package for libpmemobj C++ bindings. + C++ API is no longer considered experimental. + Web-based documentation for C++ API is available on http://pmem.io. +* Add "sync" and "transform" commands to pmempool utility. + The "sync" command allows to recover missing or corrupted part(s) + of a pool set from a healthy replica, while the "transform" command + is a convenient way for modifying the structure of an existing + pool set, i.e. by adding or removing replicas. +* Add experimental support for remote access to persistent memory and + basic remote data replication over RDMA (librpmem). Experimental + support for remote replicas is also provided by libpmemobj library. + Note: This is one not packaged for SUSE yet. + +------------------------------------------------------------------- +Thu Jul 7 08:37:13 UTC 2016 - jthumshirn@suse.com + +- Fix 32 Bit overflow in resulting in flying writes (bsc#986657) + + 0001-libpmemblk-cast-translation-entry-to-uint64_t-when-calculating-data-offset.patch + +------------------------------------------------------------------- +Sun Jun 26 22:58:04 UTC 2016 - krzysztof.czurylo@intel.com + +- Update to upstream version 1.1 (FATE#319673) +* A new version of libpmemobj pool layout is introduced. +* Internal undo log structure has been modified to improve + performance of pmemobj transactions. +* Memory pools created with older versions of the libpmemobj + library must be converted to the new format using "pmempool + convert" command. See pmempool-convert(1) for details. +* A new "libpmempool" library is available, providing support for + off-line pool management and diagnostics. Initially, it + provides only "check" and "repair" operations for log and blk + memory pools, and for BTT devices. +* pmem: deprecate PCOMMIT +* blk: match BTT Flog initialization with Linux NVDIMM BTT +* pmem: defer pmem_is_pmem() initialization +* cpp: clarify polymorphism in persistent_ptr +* obj: let the "before" flag be any non-zero value +* obj: fix compare array pptr to nullptr +* log/blk: set errno if replica section is specified +- Remove libuuid dependency +- Update link to source tarball (x.y.tar.gz => nvml-x.y.tar.gz) +- Add libpmempool subpackage +- Add new BuildRequires: pkg-config, glibc-devel + +------------------------------------------------------------------- +Thu Apr 7 13:38:57 UTC 2016 - jthumshirn@suse.com + +- Version 1.0 + The API of six libraries (libpmem, libpmemblk, libpmemlog, + libpmemobj, libvmem, libvmmalloc) is complete and stable. + The on-media layout of persistent memory pools will be maintained + from this point, and if changed it will be backward compatible. + Man pages are all complete. + This release has been validated to "Production quality". + + For the purpose of new features planned for next releases of NVML + there have been some API modifications made: + - pmem: pmem_map replaced with pmem_map_file + - log/blk: 'off_t' substituted with 'long long' + - obj: type numbers extended to 64-bit + - obj: new entry points and macros added: + pmemobj_tx_errno, pmemobj_tx_lock, pmemobj_mutex_timedlock, + TX_ADD_DIRECT, TX_ADD_FIELD_DIRECT, TX_SET_DIRECT + + Other key changes since version 0.4 include: + - common: updated/fixed installation scripts + - common: eliminated dependency on libuuid + - pmem: CPU features/ISA detection using CPUID + - obj: improved error handling + - obj: atomic allocation fails if constructor returns error + - obj: multiple performance optimizations + - obj: object store refactoring + - obj: additional examples and benchmarks + + This release also introduces a prototype implementation + of C++ bindings for libpmemobj. Note that C++ API is still + experimental and should not be used in production environments. + +------------------------------------------------------------------- +Fri Jan 22 09:16:47 UTC 2016 - jthumshirn@suse.com + +- Update to upstream version 0.4 + This NVML version primarily focuses on improving code quality + and reliability. In addition to a couple of bug fixes, + the changes include: + - benchmarks for libpmemobj, libpmemblk and libvmem + - additional pmemobj tests and examples + - pool mapping address randomization + - added pmempool "rm" command + - eliminated libpmem dependency on libpthread + - enabled extra warnings + - minor performance improvements + Man pages are all complete. + This release is considered "Beta quality" by the team, having + been thoroughly validated, including significant performance analysis. + The pmempool command does not yet support "check" and "repair" + operations for pmemobj type pools. + +------------------------------------------------------------------- +Mon Oct 19 09:51:06 UTC 2015 - jthumshirn@suse.com + +- Update to upstream version 0.3 + NVML is now feature complete, adding support for: + - pool sets + - pmemobj local replication (active/passive) + - experimental valgrind support + - pmempool support for all pool types + Man pages are all complete. + This release is considered "Alpha quality" by the team, having + gone through significant validation but only some performance + analysis at this point. + +------------------------------------------------------------------- +Fri Jul 10 13:16:19 UTC 2015 - jthumshirn@suse.com + +- Initial packaging for SUSE (version 0.2) diff --git a/pmdk.spec b/pmdk.spec new file mode 100644 index 0000000..2e9e9cc --- /dev/null +++ b/pmdk.spec @@ -0,0 +1,427 @@ +# +# spec file for package pmdk +# +# Copyright (c) 2021 SUSE LLC +# Copyright 2016, Intel Corporation +# +# 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 https://bugs.opensuse.org/ +# + + +%if 0%{?suse_version} > 1315 +%define with_fabric 1 +%endif + +%define min_libfabric_ver 1.4.2 +%define min_ndctl_ver 63.0 + +Name: pmdk +Version: 1.11.1 +Release: 0 +Summary: Persistent Memory Development Kit +License: BSD-3-Clause +Group: Development/Libraries/C and C++ +URL: http://pmem.io/pmdk/ + +Source: https://github.com/pmem/pmdk/archive/%version.tar.gz +Source1: pregen-doc.tgz +Source99: gen-doc.sh +Patch0: examples-rpmem-add-missing-lfabric-flag.patch + +BuildRequires: automake +BuildRequires: fdupes +BuildRequires: man +BuildRequires: pkg-config +%if 0%{?with_fabric} +BuildRequires: libfabric-devel >= %min_libfabric_ver +%endif +# NVML was renamed upstream to PMDK between 1.3 and 1.3.1 +Obsoletes: nvml < %version-%release +Provides: nvml = %version-%release +BuildRequires: libndctl-devel >= %min_ndctl_ver + +# By design, NVML does not support any 32-bit architecture. +# Due to dependency on xmmintrin.h and some inline assembly, it can be +# compiled only for x86_64 at the moment. +# Other 64-bit architectures could also be supported, if only there is +# a request for that, and if somebody provides the arch-specific +# implementation of the low-level routines for flushing to persistent +# memory. +ExclusiveArch: x86_64 aarch64 ppc64le + +# Debug variants of the libraries should be filtered out of the provides. +%global __provides_exclude_from ^%_libdir/pmdk_debug/.*\\.so.*$ + +%description +The Persistent Memory Development Kit (PMDK), formerly known as NVML +(Non-Volatile Memory Library), is a collection of libraries and tools +built on the DAX (Direct Access) feature of the Linux kernel which +allows applications to access persistent memory as memory-mapped +files, as described in the SNIA NVM Programming Model. + +%package tools +Summary: Utilities for Persistent Memory +Group: System/Base +Obsoletes: nvml-tools < %version-%release +Provides: nvml-tools = %version-%release +Requires: bash-completion + +%description tools +The Persistent Memory Development Kit (PMDK) is a collection of +libraries and tools built on the DAX (Direct Access) feature of the +Linux kernel which allows applications to access persistent memory as +memory-mapped files, as described in the SNIA NVM Programming Model. + +* pmempool: utility for administration and diagnosis of PMDK pools +* pmreorder: Python scripts to parse and replay operations logged by pmemcheck +* daxio: utility to perform I/O on DAX devices + +%package -n libpmem1 +Summary: Low-level persistent memory support library +Group: System/Libraries +Recommends: %name + +%description -n libpmem1 +libpmem provides low level persistent memory support, in particular, +support for the persistent memory instructions for flushing changes +to pmem. + +%package -n libpmem-devel +Summary: Development files for the low-level persistent memory library +Group: Development/Libraries/C and C++ +Requires: libpmem1 = %version + +%description -n libpmem-devel +libpmem provides low level persistent memory support. In particular, +support for the persistent memory instructions for flushing changes +to pmem is provided. + +This library is provided for software which tracks every store to +pmem and needs to flush those changes to durability. Most developers +will find higher level libraries like libpmemobj to be much more +convenient. + +%package -n libpmem2-1 +Summary: Low-level persistent memory support library +Group: System/Libraries +Recommends: %name + +%description -n libpmem2-1 +libpmem provides low level persistent memory support, in particular, +support for the persistent memory instructions for flushing changes +to pmem. libpmem2 has a new API that addresses many of the shortcommings +of libpmem1 + +%package -n libpmem2-devel +Summary: Development files for the low-level persistent memory library +Group: Development/Libraries/C and C++ +Requires: libpmem2-1 = %version + +%description -n libpmem2-devel +libpmem2 provides low level persistent memory support. In particular, +support for the persistent memory instructions for flushing changes +to pmem is provided. + +This library is provided for software which tracks every store to +pmem and needs to flush those changes to durability. Most developers +will find higher level libraries like libpmemobj to be much more +convenient. libpmem2 has a new API that addresses many of the shortcommings +of libpmem1 + +%package -n libpmemblk1 +Summary: Persistent Memory Resident Block library +Group: System/Libraries + +%description -n libpmemblk1 +libpmemblk implements a pmem-resident array of blocks, all the same +size, where a block is updated atomically with respect to power +failure or program interruption (no torn blocks). + +%package -n libpmemblk-devel +Summary: Development files for the Persistent Memory Resident Block library +Group: Development/Libraries/C and C++ +Requires: libpmemblk1 = %version + +%description -n libpmemblk-devel +libpmemblk implements a pmem-resident array of blocks, all the same +size, where a block is updated atomically with respect to power +failure or program interruption (no torn blocks). + +For example, a program keeping a cache of fixed-size objects in pmem +might find this library useful. This library is provided for cases +requiring large arrays of objects at least 512 bytes each. Most +developers will find higher level libraries like libpmemobj to be +more generally useful. + +%package -n libpmemlog1 +Summary: Persistent Memory Resident Log File library +Group: System/Libraries + +%description -n libpmemlog1 +The libpmemlog library provides a pmem-resident log file. This is +useful for programs like databases that append frequently to a log +file. + +%package -n libpmemlog-devel +Summary: Development files for the Persistent Memory Resident Log File library +Group: Development/Libraries/C and C++ +Requires: libpmemlog1 = %version + +%description -n libpmemlog-devel +The libpmemlog library provides a pmem-resident log file. This +library is provided for cases requiring an append-mostly file to +record variable length entries. Most developers will find higher +level libraries like libpmemobj to be more generally useful. + +%package -n libpmemobj1 +Summary: Persistent Memory Transactional Object Store library +Group: System/Libraries + +%description -n libpmemobj1 +The libpmemobj library provides a transactional object store, +providing memory allocation, transactions, and general facilities for +persistent memory programming. + +%package -n libpmemobj-devel +Summary: Development files for the Persistent Memory Transactional Object Store library +Group: Development/Libraries/C and C++ +Requires: libpmemobj1 = %version + +%description -n libpmemobj-devel +The libpmemobj library provides a transactional object store, +providing memory allocation, transactions, and general facilities for +persistent memory programming. Developers new to persistent memory +probably want to start with this library. + +%package -n libpmempool1 +Summary: Persistent Memory pool management library +Group: System/Libraries + +%description -n libpmempool1 +The libpmempool library provides a set of utilities for off-line administration, +analysis, diagnostics and repair of persistent memory pools created +by libpmemlog, libpemblk and libpmemobj libraries. + +%package -n libpmempool-devel +Summary: Development files for Persistent Memory pool management library +Group: Development/Libraries/C and C++ +Requires: libpmempool1 = %version + +%description -n libpmempool-devel +The libpmempool library provides a set of utilities for off-line administration, +analysis, diagnostics and repair of persistent memory pools created +by libpmemlog, libpemblk and libpmemobj libraries. + +%package -n librpmem1 +Summary: Remote Access to Persistent Memory library +#Manual dependency to make sure libfabric is at least in this version +Group: System/Libraries +Requires: libfabric >= %min_libfabric_ver +Requires: openssh + +%description -n librpmem1 +The librpmem library provides low-level support for remote access +to persistent memory utilizing RDMA-capable NICs. It can be used +to replicate persistent memory regions over RDMA protocol. + +%package -n librpmem-devel +Summary: Development files for the Remote Access to Persistent Memory library +Group: Development/Libraries/C and C++ +Requires: librpmem1 = %version + +%description -n librpmem-devel +The librpmem library provides low-level support for remote access +to persistent memory utilizing RDMA-capable NICs. It can be used +to replicate persistent memory regions over RDMA protocol. + +This sub-package contains libraries and header files for developing +applications that want to specifically make use of librpmem. + +%package -n rpmemd +Summary: Target node process executed by librpmem +#Manual dependency to make sure libfabric is at least in this version +Group: System/Base +Requires: libfabric >= %min_libfabric_ver + +%description -n rpmemd +The rpmemd process is executed on a target node by librpmem library +and facilitates access to persistent memory over RDMA. + +%package devel-doc +Summary: Man pages for the libpmem C API +Group: Documentation/Man + +%description devel-doc +Documentation for the pmem library interface. + +%prep +%autosetup -p0 -a1 + +%build +%define _lto_cflags %nil +# Currently, NVML makefiles do not allow to easily override CFLAGS, +# so the build flags are passed via EXTRA_CFLAGS. For debug build +# selected flags are overriden to disable compiler optimizations. +# +# remaining issues: +# * jemalloc attempts to use __builtin_clz, this might not always work +EXTRA_CFLAGS_RELEASE="%optflags" \ +EXTRA_CFLAGS_DEBUG="%optflags -Wp,-U_FORTIFY_SOURCE -O0" \ +EXTRA_CXXFLAGS="%optflags" \ +make %{?_smp_mflags} BINDIR="%_bindir" EXTRA_CFLAGS="-Wno-error" \ +%if 0%{?with_fabric} + BUILD_RPMEM=y \ +%endif + NORPATH=1 + +# Override LIB_AR with empty string to skip installation of static libraries +%install +b="%buildroot" +%make_install LIB_AR= \ + prefix="%_prefix" \ + libdir="%_libdir" \ + includedir="%_includedir" \ + mandir="%_mandir" \ + bindir="%_bindir" \ + sysconfdir="%_sysconfdir" \ + docdir="%_docdir" +mkdir -p "$b/%_datadir/pmdk" +cp utils/pmdk.magic "$b/%_datadir/pmdk/" + +#Fix installation dir for bash completion +mkdir -p %buildroot/%_datadir/bash-completion/completions +mv %buildroot/%_sysconfdir/bash_completion.d/* %buildroot/%_datadir/bash-completion/completions + +%fdupes %buildroot/%_prefix + +%check +cp src/test/testconfig.sh.example src/test/testconfig.sh +#make check + +%post -n libpmem1 -p /sbin/ldconfig +%postun -n libpmem1 -p /sbin/ldconfig +%post -n libpmem2-1 -p /sbin/ldconfig +%postun -n libpmem2-1 -p /sbin/ldconfig +%post -n libpmemblk1 -p /sbin/ldconfig +%postun -n libpmemblk1 -p /sbin/ldconfig +%post -n libpmemlog1 -p /sbin/ldconfig +%postun -n libpmemlog1 -p /sbin/ldconfig +%post -n libpmemobj1 -p /sbin/ldconfig +%postun -n libpmemobj1 -p /sbin/ldconfig +%post -n libpmempool1 -p /sbin/ldconfig +%postun -n libpmempool1 -p /sbin/ldconfig +%post -n librpmem1 -p /sbin/ldconfig +%postun -n librpmem1 -p /sbin/ldconfig + +%files +%_datadir/pmdk/ +%doc ChangeLog + +%files tools +%_datadir/bash-completion/completions/* +%_bindir/daxio +%_bindir/pmempool +%_bindir/pmreorder +%_datadir/pmreorder/ +%_mandir/man1/daxio.1* +%_mandir/man1/pmempool-*.1* +%_mandir/man1/pmempool.1* +%_mandir/man1/pmreorder.1* +%_mandir/man5/*.5* +%doc LICENSE + +%files -n libpmem1 +%_libdir/libpmem.so.1* + +%files -n libpmem-devel +%_libdir/libpmem.so +%_libdir/pkgconfig/libpmem.pc +%dir %_libdir/pmdk_debug/ +%_libdir/pmdk_debug/libpmem.so* +%_includedir/libpmem.h + +%files -n libpmem2-1 +%_libdir/libpmem2.so.1* + +%files -n libpmem2-devel +%_libdir/libpmem2.so +%_libdir/pkgconfig/libpmem2.pc +%dir %_libdir/pmdk_debug/ +%_libdir/pmdk_debug/libpmem2.so* +%_includedir/libpmem2.h + +%files -n libpmemblk1 +%_libdir/libpmemblk.so.1* + +%files -n libpmemblk-devel +%_libdir/libpmemblk.so +%_libdir/pkgconfig/libpmemblk.pc +%dir %_libdir/pmdk_debug/ +%_libdir/pmdk_debug/libpmemblk.so* +%_includedir/libpmemblk.h + +%files -n libpmemlog1 +%_libdir/libpmemlog.so.1* + +%files -n libpmemlog-devel +%_libdir/libpmemlog.so +%_libdir/pkgconfig/libpmemlog.pc +%dir %_libdir/pmdk_debug/ +%_libdir/pmdk_debug/libpmemlog.so* +%_includedir/libpmemlog.h + +%files -n libpmemobj1 +%_libdir/libpmemobj.so.1* + +%files -n libpmemobj-devel +%_libdir/libpmemobj.so +%dir %_libdir/pmdk_debug/ +%_libdir/pkgconfig/libpmemobj.pc +%_libdir/pmdk_debug/libpmemobj.so* +%_includedir/libpmemobj.h +%_includedir/libpmemobj/ + +%files -n libpmempool1 +%_libdir/libpmempool.so.1* + +%files -n libpmempool-devel +%_libdir/libpmempool.so +%_libdir/pkgconfig/libpmempool.pc +%dir %_libdir/pmdk_debug +%_libdir/pmdk_debug/libpmempool.so* +%_includedir/libpmempool.h + +%if 0%{?with_fabric} +%files -n librpmem1 +%_libdir/librpmem.so.* +%license LICENSE + +%files -n librpmem-devel +%_libdir/librpmem.so +%_libdir/pkgconfig/librpmem.pc +%dir %_libdir/pmdk_debug +%_libdir/pmdk_debug/librpmem.so* +%_includedir/librpmem.h +%license LICENSE + +%files -n rpmemd +%_bindir/rpmemd +%_mandir/man1/rpmemd.1* +#with_fabric +%endif + +%files devel-doc +%_mandir/man3/*.3* +%_mandir/man7/*.7* +%doc ChangeLog CONTRIBUTING.md README.md + +%changelog diff --git a/pregen-doc.tgz b/pregen-doc.tgz new file mode 100644 index 0000000..9ad630b --- /dev/null +++ b/pregen-doc.tgz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a41a0e8493dc584666bf7b425cf15863992c32d31c4d134a528424f2a5eccd6 +size 140679