Initial import (#1329188).
This commit is contained in:
parent
8446d4d468
commit
9c77c139fb
1
.gitignore
vendored
1
.gitignore
vendored
@ -0,0 +1 @@
|
||||
/1.0.tar.gz
|
||||
221
1.0-0001-test-fix-timeouting-obj_tx_add_range-test.patch
Normal file
221
1.0-0001-test-fix-timeouting-obj_tx_add_range-test.patch
Normal file
@ -0,0 +1,221 @@
|
||||
From 6396c898e191db0f5998b3713f7a6b65553abe51 Mon Sep 17 00:00:00 2001
|
||||
From: Pawel Lebioda <pawel.lebioda@intel.com>
|
||||
Date: Fri, 1 Apr 2016 19:13:25 +0200
|
||||
Subject: [PATCH] test: fix timeouting obj_tx_add_range test
|
||||
|
||||
The obj_tx_add_range was timeouting sometimes because of new scenario
|
||||
which checks for persistent memory leaks (pmem/issues#162)
|
||||
---
|
||||
src/test/obj_tx_add_range/TEST0 | 4 +-
|
||||
src/test/obj_tx_add_range/TEST1 | 2 +-
|
||||
src/test/obj_tx_add_range/TEST2 | 50 ++++++++++++++++++++++++
|
||||
src/test/obj_tx_add_range/err0.log.match | 0
|
||||
src/test/obj_tx_add_range/err1.log.match | 0
|
||||
src/test/obj_tx_add_range/obj_tx_add_range.c | 56 ++++++++++++++-------------
|
||||
src/test/obj_tx_add_range/out0.log.match | 3 --
|
||||
src/test/obj_tx_add_range/out1.log.match | 3 --
|
||||
src/test/obj_tx_add_range/valgrind1.log.match | 2 +-
|
||||
9 files changed, 83 insertions(+), 37 deletions(-)
|
||||
create mode 100755 src/test/obj_tx_add_range/TEST2
|
||||
delete mode 100644 src/test/obj_tx_add_range/err0.log.match
|
||||
delete mode 100644 src/test/obj_tx_add_range/err1.log.match
|
||||
delete mode 100644 src/test/obj_tx_add_range/out0.log.match
|
||||
delete mode 100644 src/test/obj_tx_add_range/out1.log.match
|
||||
|
||||
diff --git a/src/test/obj_tx_add_range/TEST0 b/src/test/obj_tx_add_range/TEST0
|
||||
index 2e1526c..b1812cb 100755
|
||||
--- a/src/test/obj_tx_add_range/TEST0
|
||||
+++ b/src/test/obj_tx_add_range/TEST0
|
||||
@@ -42,8 +42,6 @@ export UNITTEST_NUM=0
|
||||
|
||||
setup
|
||||
|
||||
-expect_normal_exit ./obj_tx_add_range$EXESUFFIX $DIR/testfile1
|
||||
-
|
||||
-check
|
||||
+expect_normal_exit ./obj_tx_add_range$EXESUFFIX $DIR/testfile1 0
|
||||
|
||||
pass
|
||||
diff --git a/src/test/obj_tx_add_range/TEST1 b/src/test/obj_tx_add_range/TEST1
|
||||
index 09e306d..7d76156 100755
|
||||
--- a/src/test/obj_tx_add_range/TEST1
|
||||
+++ b/src/test/obj_tx_add_range/TEST1
|
||||
@@ -49,7 +49,7 @@ setup
|
||||
expect_normal_exit valgrind --tool=pmemcheck\
|
||||
--log-file=valgrind$UNITTEST_NUM.log\
|
||||
--mult-stores=no\
|
||||
- ./obj_tx_add_range$EXESUFFIX $DIR/testfile1 $i
|
||||
+ ./obj_tx_add_range$EXESUFFIX $DIR/testfile1 0
|
||||
|
||||
check
|
||||
|
||||
diff --git a/src/test/obj_tx_add_range/TEST2 b/src/test/obj_tx_add_range/TEST2
|
||||
new file mode 100755
|
||||
index 0000000..afee81e
|
||||
--- /dev/null
|
||||
+++ b/src/test/obj_tx_add_range/TEST2
|
||||
@@ -0,0 +1,50 @@
|
||||
+#!/bin/bash -e
|
||||
+#
|
||||
+# Copyright 2015-2016, Intel Corporation
|
||||
+#
|
||||
+# Redistribution and use in source and binary forms, with or without
|
||||
+# modification, are permitted provided that the following conditions
|
||||
+# are met:
|
||||
+#
|
||||
+# * Redistributions of source code must retain the above copyright
|
||||
+# notice, this list of conditions and the following disclaimer.
|
||||
+#
|
||||
+# * Redistributions in binary form must reproduce the above copyright
|
||||
+# notice, this list of conditions and the following disclaimer in
|
||||
+# the documentation and/or other materials provided with the
|
||||
+# distribution.
|
||||
+#
|
||||
+# * Neither the name of the copyright holder nor the names of its
|
||||
+# contributors may be used to endorse or promote products derived
|
||||
+# from this software without specific prior written permission.
|
||||
+#
|
||||
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
+#
|
||||
+
|
||||
+#
|
||||
+# src/test/obj_tx_add_range/TEST2 -- unit test for pmemobj_tx_add_range
|
||||
+#
|
||||
+export UNITTEST_NAME=obj_tx_add_range/TEST2
|
||||
+export UNITTEST_NUM=2
|
||||
+
|
||||
+# standard unit test setup
|
||||
+. ../unittest/unittest.sh
|
||||
+
|
||||
+memcheck force-disable
|
||||
+require_fs_type pmem
|
||||
+
|
||||
+setup
|
||||
+
|
||||
+expect_normal_exit ./obj_tx_add_range$EXESUFFIX $DIR/testfile1 1
|
||||
+
|
||||
+pass
|
||||
diff --git a/src/test/obj_tx_add_range/err0.log.match b/src/test/obj_tx_add_range/err0.log.match
|
||||
deleted file mode 100644
|
||||
index e69de29..0000000
|
||||
diff --git a/src/test/obj_tx_add_range/err1.log.match b/src/test/obj_tx_add_range/err1.log.match
|
||||
deleted file mode 100644
|
||||
index e69de29..0000000
|
||||
diff --git a/src/test/obj_tx_add_range/obj_tx_add_range.c b/src/test/obj_tx_add_range/obj_tx_add_range.c
|
||||
index 9c1e41d..472fc0e 100644
|
||||
--- a/src/test/obj_tx_add_range/obj_tx_add_range.c
|
||||
+++ b/src/test/obj_tx_add_range/obj_tx_add_range.c
|
||||
@@ -566,39 +566,43 @@ main(int argc, char *argv[])
|
||||
START(argc, argv, "obj_tx_add_range");
|
||||
util_init();
|
||||
|
||||
- if (argc != 2)
|
||||
- UT_FATAL("usage: %s [file]", argv[0]);
|
||||
+ if (argc != 3)
|
||||
+ UT_FATAL("usage: %s [file] [0|1]", argv[0]);
|
||||
+
|
||||
+ int do_reopen = atoi(argv[2]);
|
||||
|
||||
PMEMobjpool *pop;
|
||||
if ((pop = pmemobj_create(argv[1], LAYOUT_NAME, PMEMOBJ_MIN_POOL,
|
||||
S_IWUSR | S_IRUSR)) == NULL)
|
||||
UT_FATAL("!pmemobj_create");
|
||||
|
||||
- do_tx_add_range_commit(pop);
|
||||
- VALGRIND_WRITE_STATS;
|
||||
- do_tx_add_range_abort(pop);
|
||||
- VALGRIND_WRITE_STATS;
|
||||
- do_tx_add_range_commit_nested(pop);
|
||||
- VALGRIND_WRITE_STATS;
|
||||
- do_tx_add_range_abort_nested(pop);
|
||||
- VALGRIND_WRITE_STATS;
|
||||
- do_tx_add_range_abort_after_nested(pop);
|
||||
- VALGRIND_WRITE_STATS;
|
||||
- do_tx_add_range_twice_commit(pop);
|
||||
- VALGRIND_WRITE_STATS;
|
||||
- do_tx_add_range_twice_abort(pop);
|
||||
- VALGRIND_WRITE_STATS;
|
||||
- do_tx_add_range_alloc_commit(pop);
|
||||
- VALGRIND_WRITE_STATS;
|
||||
- do_tx_add_range_alloc_abort(pop);
|
||||
- VALGRIND_WRITE_STATS;
|
||||
- do_tx_add_range_overlapping(pop);
|
||||
- VALGRIND_WRITE_STATS;
|
||||
- pmemobj_close(pop);
|
||||
-
|
||||
- /* do not run this on valgrind because it takes too long */
|
||||
- if (!On_valgrind)
|
||||
+ if (do_reopen) {
|
||||
+ pmemobj_close(pop);
|
||||
do_tx_add_range_reopen(argv[1]);
|
||||
+ } else {
|
||||
+ do_tx_add_range_commit(pop);
|
||||
+ VALGRIND_WRITE_STATS;
|
||||
+ do_tx_add_range_abort(pop);
|
||||
+ VALGRIND_WRITE_STATS;
|
||||
+ do_tx_add_range_commit_nested(pop);
|
||||
+ VALGRIND_WRITE_STATS;
|
||||
+ do_tx_add_range_abort_nested(pop);
|
||||
+ VALGRIND_WRITE_STATS;
|
||||
+ do_tx_add_range_abort_after_nested(pop);
|
||||
+ VALGRIND_WRITE_STATS;
|
||||
+ do_tx_add_range_twice_commit(pop);
|
||||
+ VALGRIND_WRITE_STATS;
|
||||
+ do_tx_add_range_twice_abort(pop);
|
||||
+ VALGRIND_WRITE_STATS;
|
||||
+ do_tx_add_range_alloc_commit(pop);
|
||||
+ VALGRIND_WRITE_STATS;
|
||||
+ do_tx_add_range_alloc_abort(pop);
|
||||
+ VALGRIND_WRITE_STATS;
|
||||
+ do_tx_add_range_overlapping(pop);
|
||||
+ VALGRIND_WRITE_STATS;
|
||||
+ pmemobj_close(pop);
|
||||
+ }
|
||||
+
|
||||
|
||||
DONE(NULL);
|
||||
}
|
||||
diff --git a/src/test/obj_tx_add_range/out0.log.match b/src/test/obj_tx_add_range/out0.log.match
|
||||
deleted file mode 100644
|
||||
index f3d6392..0000000
|
||||
--- a/src/test/obj_tx_add_range/out0.log.match
|
||||
+++ /dev/null
|
||||
@@ -1,3 +0,0 @@
|
||||
-obj_tx_add_range/TEST0: START: obj_tx_add_range
|
||||
- ./obj_tx_add_range$(nW) $(nW)testfile1
|
||||
-obj_tx_add_range/TEST0: Done
|
||||
diff --git a/src/test/obj_tx_add_range/out1.log.match b/src/test/obj_tx_add_range/out1.log.match
|
||||
deleted file mode 100644
|
||||
index 82beb3a..0000000
|
||||
--- a/src/test/obj_tx_add_range/out1.log.match
|
||||
+++ /dev/null
|
||||
@@ -1,3 +0,0 @@
|
||||
-obj_tx_add_range/TEST1: START: obj_tx_add_range
|
||||
- ./obj_tx_add_range$(nW) $(nW)testfile1
|
||||
-obj_tx_add_range/TEST1: Done
|
||||
diff --git a/src/test/obj_tx_add_range/valgrind1.log.match b/src/test/obj_tx_add_range/valgrind1.log.match
|
||||
index 17e9c72..b612e9e 100644
|
||||
--- a/src/test/obj_tx_add_range/valgrind1.log.match
|
||||
+++ b/src/test/obj_tx_add_range/valgrind1.log.match
|
||||
@@ -1,7 +1,7 @@
|
||||
==$(nW)== pmemcheck-$(nW), a simple persistent store checker
|
||||
==$(nW)== Copyright (c) $(nW), Intel Corporation
|
||||
==$(nW)== Using Valgrind-$(nW) and LibVEX; rerun with -h for copyright info
|
||||
-==$(nW)== Command: ./obj_tx_add_range$(nW) $(nW)testfile1
|
||||
+==$(nW)== Command: ./obj_tx_add_range$(nW) $(nW)testfile1 0
|
||||
==$(nW)== Parent PID: $(nW)
|
||||
==$(nW)==
|
||||
==$(nW)== Number of stores not made persistent: 0
|
||||
--
|
||||
2.5.0
|
||||
|
||||
139
1.0-0002-all-always-append-EXTRA_CFLAGS-after-our-CFLAGS.patch
Normal file
139
1.0-0002-all-always-append-EXTRA_CFLAGS-after-our-CFLAGS.patch
Normal file
@ -0,0 +1,139 @@
|
||||
From 5c5f1c05522ab9b6e7906c1f03fcb0905c7edbaa Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Marcin=20=C5=9Alusarz?= <marcin.slusarz@gmail.com>
|
||||
Date: Sat, 9 Apr 2016 14:27:21 +0200
|
||||
Subject: [PATCH] all: always append EXTRA_CFLAGS after our CFLAGS
|
||||
|
||||
...and add support for EXTRA_CFLAGS_DEBUG and EXTRA_CFLAGS_RELEASE.
|
||||
---
|
||||
src/Makefile.inc | 23 ++++++++++++-----------
|
||||
src/benchmarks/Makefile | 3 ++-
|
||||
src/test/unittest/Makefile | 3 ++-
|
||||
src/tools/Makefile.inc | 15 ++++++++-------
|
||||
4 files changed, 24 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/src/Makefile.inc b/src/Makefile.inc
|
||||
index 798f514..efe7db7 100644
|
||||
--- a/src/Makefile.inc
|
||||
+++ b/src/Makefile.inc
|
||||
@@ -55,7 +55,6 @@ CFLAGS += -Wconversion
|
||||
endif
|
||||
CFLAGS += -pthread
|
||||
CFLAGS += -fno-common
|
||||
-CFLAGS += $(EXTRA_CFLAGS)
|
||||
CFLAGS += -DSRCVERSION=\"$(SRCVERSION)\"
|
||||
ifeq ($(call check_flag, -Wunreachable-code-return), y)
|
||||
CFLAGS += -Wunreachable-code-return
|
||||
@@ -64,6 +63,18 @@ ifeq ($(call check_flag, -Wmissing-variable-declarations), y)
|
||||
CFLAGS += -Wmissing-variable-declarations
|
||||
endif
|
||||
|
||||
+ifeq ($(DEBUG),1)
|
||||
+CFLAGS += -O0 -ggdb -DDEBUG $(EXTRA_CFLAGS_DEBUG)
|
||||
+LIB_SUBDIR = /nvml_debug
|
||||
+OBJDIR = debug
|
||||
+else
|
||||
+CFLAGS += -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $(EXTRA_CFLAGS_RELEASE)
|
||||
+LIB_SUBDIR =
|
||||
+OBJDIR = nondebug
|
||||
+endif
|
||||
+
|
||||
+CFLAGS += $(EXTRA_CFLAGS)
|
||||
+
|
||||
LDFLAGS += -Wl,-z,relro -Wl,--fatal-warnings -Wl,--warn-common $(EXTRA_LDFLAGS)
|
||||
|
||||
define arch32_error_msg
|
||||
@@ -86,16 +97,6 @@ ifneq ($(LP64), 2)
|
||||
$(error $(arch32_error_msg))
|
||||
endif
|
||||
|
||||
-ifeq ($(DEBUG),1)
|
||||
-CFLAGS += -O0 -ggdb -DDEBUG
|
||||
-LIB_SUBDIR = /nvml_debug
|
||||
-OBJDIR = debug
|
||||
-else
|
||||
-CFLAGS += -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
|
||||
-LIB_SUBDIR =
|
||||
-OBJDIR = nondebug
|
||||
-endif
|
||||
-
|
||||
LIBS_DESTDIR = $(DESTDIR)$(libdir)$(LIB_SUBDIR)
|
||||
|
||||
DIRNAME = $(shell basename $(CURDIR))
|
||||
diff --git a/src/benchmarks/Makefile b/src/benchmarks/Makefile
|
||||
index a10f23a..6e5d1c9 100644
|
||||
--- a/src/benchmarks/Makefile
|
||||
+++ b/src/benchmarks/Makefile
|
||||
@@ -108,7 +108,6 @@ CFLAGS += -Wmissing-prototypes
|
||||
CFLAGS += -Wpointer-arith
|
||||
CFLAGS += -Wunused-macros
|
||||
CFLAGS += -pthread
|
||||
-CFLAGS += $(EXTRA_CFLAGS)
|
||||
CFLAGS += -I../include
|
||||
CFLAGS += -I../libpmemobj
|
||||
CFLAGS += -I../common
|
||||
@@ -140,6 +139,8 @@ ifeq ($(GLIB_SILENCE), y)
|
||||
CFLAGS += -Wno-unknown-attributes
|
||||
endif
|
||||
|
||||
+CFLAGS += $(EXTRA_CFLAGS)
|
||||
+
|
||||
objdir=.
|
||||
|
||||
%.o: %.c
|
||||
diff --git a/src/test/unittest/Makefile b/src/test/unittest/Makefile
|
||||
index 6b5f7bb..dc7ebd2 100644
|
||||
--- a/src/test/unittest/Makefile
|
||||
+++ b/src/test/unittest/Makefile
|
||||
@@ -55,7 +55,6 @@ CFLAGS += -Wconversion
|
||||
endif
|
||||
CFLAGS += -pthread
|
||||
CFLAGS += -fno-common
|
||||
-CFLAGS += $(EXTRA_CFLAGS)
|
||||
ifeq ($(call check_flag, -Wunreachable-code-return), y)
|
||||
CFLAGS += -Wunreachable-code-return
|
||||
endif
|
||||
@@ -72,6 +71,8 @@ endif
|
||||
CFLAGS += -DUSE_LIBUNWIND
|
||||
endif
|
||||
|
||||
+CFLAGS += $(EXTRA_CFLAGS)
|
||||
+
|
||||
all test: $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJS)
|
||||
diff --git a/src/tools/Makefile.inc b/src/tools/Makefile.inc
|
||||
index f3559d1..e036ef5 100644
|
||||
--- a/src/tools/Makefile.inc
|
||||
+++ b/src/tools/Makefile.inc
|
||||
@@ -51,13 +51,6 @@ ifeq ($(call check_Wconversion), y)
|
||||
CFLAGS += -Wconversion
|
||||
endif
|
||||
CFLAGS += -fno-common
|
||||
-CFLAGS += $(EXTRA_CFLAGS)
|
||||
-
|
||||
-ifeq ($(DEBUG),)
|
||||
-CFLAGS += -O2 -D_FORTIFY_SOURCE=2
|
||||
-else
|
||||
-CFLAGS += -ggdb
|
||||
-endif
|
||||
|
||||
CFLAGS += -DSRCVERSION='"$(SRCVERSION)"'
|
||||
ifeq ($(call check_flag, -Wunreachable-code-return), y)
|
||||
@@ -67,6 +60,14 @@ ifeq ($(call check_flag, -Wmissing-variable-declarations), y)
|
||||
CFLAGS += -Wmissing-variable-declarations
|
||||
endif
|
||||
|
||||
+ifeq ($(DEBUG),1)
|
||||
+CFLAGS += -ggdb $(EXTRA_CFLAGS_DEBUG)
|
||||
+else
|
||||
+CFLAGS += -O2 -D_FORTIFY_SOURCE=2 $(EXTRA_CFLAGS_RELEASE)
|
||||
+endif
|
||||
+
|
||||
+CFLAGS += $(EXTRA_CFLAGS)
|
||||
+
|
||||
LDFLAGS += -Wl,-z,relro -Wl,--warn-common -Wl,--fatal-warnings $(EXTRA_LDFLAGS) -L$(TOP)/src/nondebug
|
||||
TARGET_DIR=$(DESTDIR)$(bindir)
|
||||
BASH_COMP_FILES ?=
|
||||
--
|
||||
2.5.0
|
||||
|
||||
360
nvml.spec
Normal file
360
nvml.spec
Normal file
@ -0,0 +1,360 @@
|
||||
|
||||
Name: nvml
|
||||
Version: 1.0
|
||||
Release: 1%{?dist}
|
||||
Summary: Non-Volatile Memory Library
|
||||
License: BSD
|
||||
URL: http://pmem.io/nvml
|
||||
Source0: https://github.com/pmem/nvml/archive/%{version}.tar.gz
|
||||
Patch0: 1.0-0001-test-fix-timeouting-obj_tx_add_range-test.patch
|
||||
Patch1: 1.0-0002-all-always-append-EXTRA_CFLAGS-after-our-CFLAGS.patch
|
||||
|
||||
BuildRequires: glibc-devel
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
BuildRequires: man
|
||||
|
||||
# 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.
|
||||
ExcludeArch: %{ix86}
|
||||
ExcludeArch: %{arm}
|
||||
ExcludeArch: s390x
|
||||
|
||||
%description
|
||||
The NVM Library is a collection of libraries for using memory-mapped
|
||||
persistence, optimized specifically for persistent memory.
|
||||
|
||||
|
||||
%package -n libpmem
|
||||
Summary: Low-level persistent memory support library
|
||||
Group: System Environment/Libraries
|
||||
%description -n libpmem
|
||||
The libpmem provides low level persistent memory support. In particular,
|
||||
support for the persistent memory instructions for flushing changes
|
||||
to pmem is provided.
|
||||
|
||||
%files -n libpmem
|
||||
%defattr(644,root,root,-)
|
||||
%dir %{_datadir}/nvml
|
||||
%{_libdir}/libpmem.so.*
|
||||
%{_datadir}/nvml/nvml.magic
|
||||
%license LICENSE
|
||||
%doc ChangeLog CONTRIBUTING.md README.md
|
||||
|
||||
|
||||
%package -n libpmem-devel
|
||||
Summary: Development files for the low-level persistent memory library
|
||||
Group: Development/Libraries
|
||||
Requires: libpmem = %{version}-%{release}
|
||||
%description -n libpmem-devel
|
||||
The 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.
|
||||
|
||||
%files -n libpmem-devel
|
||||
%defattr(644,root,root,-)
|
||||
%dir %{_libdir}/nvml_debug
|
||||
%{_libdir}/libpmem.so
|
||||
%{_libdir}/pkgconfig/libpmem.pc
|
||||
%{_libdir}/nvml_debug/libpmem.so
|
||||
%{_libdir}/nvml_debug/libpmem.so.*
|
||||
%{_includedir}/libpmem.h
|
||||
%{_mandir}/man3/libpmem.3.gz
|
||||
%license LICENSE
|
||||
%doc ChangeLog CONTRIBUTING.md README.md
|
||||
|
||||
|
||||
%package -n libpmemblk
|
||||
Summary: Persistent Memory Resident Array of Blocks library
|
||||
Group: System Environment/Libraries
|
||||
%description -n libpmemblk
|
||||
The 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).
|
||||
|
||||
%files -n libpmemblk
|
||||
%defattr(644,root,root,-)
|
||||
%{_libdir}/libpmemblk.so.*
|
||||
%license LICENSE
|
||||
%doc ChangeLog CONTRIBUTING.md README.md
|
||||
|
||||
|
||||
%package -n libpmemblk-devel
|
||||
Summary: Development files for the Persistent Memory Resident Array of Blocks library
|
||||
Group: Development/Libraries
|
||||
Requires: libpmemblk = %{version}-%{release}
|
||||
Requires: libpmem-devel = %{version}-%{release}
|
||||
%description -n libpmemblk-devel
|
||||
The 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.
|
||||
|
||||
%files -n libpmemblk-devel
|
||||
%defattr(644,root,root,-)
|
||||
%dir %{_libdir}/nvml_debug
|
||||
%{_libdir}/libpmemblk.so
|
||||
%{_libdir}/pkgconfig/libpmemblk.pc
|
||||
%{_libdir}/nvml_debug/libpmemblk.so
|
||||
%{_libdir}/nvml_debug/libpmemblk.so.*
|
||||
%{_includedir}/libpmemblk.h
|
||||
%{_mandir}/man3/libpmemblk.3.gz
|
||||
%license LICENSE
|
||||
%doc ChangeLog CONTRIBUTING.md README.md
|
||||
|
||||
|
||||
%package -n libpmemlog
|
||||
Summary: Persistent Memory Resident Log File library
|
||||
Group: System Environment/Libraries
|
||||
%description -n libpmemlog
|
||||
The libpmemlog library provides a pmem-resident log file. This is
|
||||
useful for programs like databases that append frequently to a log
|
||||
file.
|
||||
|
||||
%files -n libpmemlog
|
||||
%defattr(644,root,root,-)
|
||||
%{_libdir}/libpmemlog.so.*
|
||||
%license LICENSE
|
||||
%doc ChangeLog CONTRIBUTING.md README.md
|
||||
|
||||
|
||||
%package -n libpmemlog-devel
|
||||
Summary: Development files for the Persistent Memory Resident Log File library
|
||||
Group: Development/Libraries
|
||||
Requires: libpmemlog = %{version}-%{release}
|
||||
Requires: libpmem-devel = %{version}-%{release}
|
||||
%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.
|
||||
|
||||
%files -n libpmemlog-devel
|
||||
%defattr(644,root,root,-)
|
||||
%dir %{_libdir}/nvml_debug
|
||||
%{_libdir}/libpmemlog.so
|
||||
%{_libdir}/pkgconfig/libpmemlog.pc
|
||||
%{_libdir}/nvml_debug/libpmemlog.so
|
||||
%{_libdir}/nvml_debug/libpmemlog.so.*
|
||||
%{_includedir}/libpmemlog.h
|
||||
%{_mandir}/man3/libpmemlog.3.gz
|
||||
%license LICENSE
|
||||
%doc ChangeLog CONTRIBUTING.md README.md
|
||||
|
||||
|
||||
%package -n libpmemobj
|
||||
Summary: Persistent Memory Transactional Object Store library
|
||||
Group: System Environment/Libraries
|
||||
%description -n libpmemobj
|
||||
The libpmemobj library provides a transactional object store,
|
||||
providing memory allocation, transactions, and general facilities for
|
||||
persistent memory programming.
|
||||
|
||||
%files -n libpmemobj
|
||||
%defattr(644,root,root,-)
|
||||
%{_libdir}/libpmemobj.so.*
|
||||
%license LICENSE
|
||||
%doc ChangeLog CONTRIBUTING.md README.md
|
||||
|
||||
|
||||
%package -n libpmemobj-devel
|
||||
Summary: Development files for the Persistent Memory Transactional Object Store library
|
||||
Group: Development/Libraries
|
||||
Requires: libpmemobj = %{version}-%{release}
|
||||
Requires: libpmem-devel = %{version}-%{release}
|
||||
%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.
|
||||
|
||||
%files -n libpmemobj-devel
|
||||
%defattr(644,root,root,-)
|
||||
%dir %{_libdir}/nvml_debug
|
||||
%{_libdir}/libpmemobj.so
|
||||
%{_libdir}/pkgconfig/libpmemobj.pc
|
||||
%{_libdir}/nvml_debug/libpmemobj.so
|
||||
%{_libdir}/nvml_debug/libpmemobj.so.*
|
||||
%{_includedir}/libpmemobj.h
|
||||
%{_mandir}/man3/libpmemobj.3.gz
|
||||
%license LICENSE
|
||||
%doc ChangeLog CONTRIBUTING.md README.md
|
||||
|
||||
|
||||
%package -n libvmem
|
||||
Summary: Volatile Memory allocation library
|
||||
Group: System Environment/Libraries
|
||||
%description -n libvmem
|
||||
The libvmem library turns a pool of persistent memory into a volatile
|
||||
memory pool, similar to the system heap but kept separate and with
|
||||
its own malloc-style API.
|
||||
|
||||
%files -n libvmem
|
||||
%defattr(644,root,root,-)
|
||||
%{_libdir}/libvmem.so.*
|
||||
%license LICENSE
|
||||
%doc ChangeLog CONTRIBUTING.md README.md
|
||||
|
||||
|
||||
%package -n libvmem-devel
|
||||
Summary: Development files for the Volatile Memory allocation library
|
||||
Group: Development/Libraries
|
||||
Requires: libvmem = %{version}-%{release}
|
||||
%description -n libvmem-devel
|
||||
The libvmem library turns a pool of persistent memory into a volatile
|
||||
memory pool, similar to the system heap but kept separate and with
|
||||
its own malloc-style API.
|
||||
|
||||
This sub-package contains libraries and header files for developing
|
||||
applications that want to make use of libvmem.
|
||||
|
||||
%files -n libvmem-devel
|
||||
%defattr(644,root,root,-)
|
||||
%dir %{_libdir}/nvml_debug
|
||||
%{_libdir}/libvmem.so
|
||||
%{_libdir}/pkgconfig/libvmem.pc
|
||||
%{_libdir}/nvml_debug/libvmem.so
|
||||
%{_libdir}/nvml_debug/libvmem.so.*
|
||||
%{_includedir}/libvmem.h
|
||||
%{_mandir}/man3/libvmem.3.gz
|
||||
%license LICENSE
|
||||
%doc ChangeLog CONTRIBUTING.md README.md
|
||||
|
||||
|
||||
%package -n libvmmalloc
|
||||
Summary: Dynamic to Persistent Memory allocation translation library
|
||||
Group: System Environment/Libraries
|
||||
%description -n libvmmalloc
|
||||
The libvmmalloc library transparently converts all the dynamic memory
|
||||
allocations into persistent memory allocations. This allows the use
|
||||
of persistent memory as volatile memory without modifying the target
|
||||
application.
|
||||
|
||||
The typical usage of libvmmalloc is to load it via the LD_PRELOAD
|
||||
environment variable.
|
||||
|
||||
%files -n libvmmalloc
|
||||
%defattr(644,root,root,-)
|
||||
%{_libdir}/libvmmalloc.so.*
|
||||
%license LICENSE
|
||||
%doc ChangeLog CONTRIBUTING.md README.md
|
||||
|
||||
|
||||
%package -n libvmmalloc-devel
|
||||
Summary: Development files for the Dynamic-to-Persistent allocation library
|
||||
Group: Development/Libraries
|
||||
Requires: libvmmalloc = %{version}-%{release}
|
||||
%description -n libvmmalloc-devel
|
||||
The libvmmalloc library transparently converts all the dynamic memory
|
||||
allocations into persistent memory allocations. This allows the use
|
||||
of persistent memory as volatile memory without modifying the target
|
||||
application.
|
||||
|
||||
This sub-package contains libraries and header files for developing
|
||||
applications that want to specifically make use of libvmmalloc.
|
||||
|
||||
%files -n libvmmalloc-devel
|
||||
%defattr(644,root,root,-)
|
||||
%dir %{_libdir}/nvml_debug
|
||||
%{_libdir}/libvmmalloc.so
|
||||
%{_libdir}/pkgconfig/libvmmalloc.pc
|
||||
%{_libdir}/nvml_debug/libvmmalloc.so
|
||||
%{_libdir}/nvml_debug/libvmmalloc.so.*
|
||||
%{_includedir}/libvmmalloc.h
|
||||
%{_mandir}/man3/libvmmalloc.3.gz
|
||||
%license LICENSE
|
||||
%doc ChangeLog CONTRIBUTING.md README.md
|
||||
|
||||
|
||||
%package tools
|
||||
Summary: Utilities for Persistent Memory
|
||||
Group: System Environment/Base
|
||||
%description tools
|
||||
Useful applications for administration and diagnosis of persistent memory.
|
||||
|
||||
%files tools
|
||||
%{_bindir}/pmempool
|
||||
%{_mandir}/man1/pmempool.1.gz
|
||||
%{_mandir}/man1/pmempool-info.1.gz
|
||||
%{_mandir}/man1/pmempool-create.1.gz
|
||||
%{_mandir}/man1/pmempool-dump.1.gz
|
||||
%{_mandir}/man1/pmempool-check.1.gz
|
||||
%{_mandir}/man1/pmempool-rm.1.gz
|
||||
%config(noreplace) %{_sysconfdir}/bash_completion.d/pmempool.sh
|
||||
%license LICENSE
|
||||
%doc ChangeLog CONTRIBUTING.md README.md
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
%patch0 -p1
|
||||
chmod +x src/test/obj_tx_add_range/TEST2
|
||||
%patch1 -p1
|
||||
|
||||
|
||||
%build
|
||||
# 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.
|
||||
EXTRA_CFLAGS_RELEASE="%{optflags}" \
|
||||
EXTRA_CFLAGS_DEBUG="%{optflags} -Wp,-U_FORTIFY_SOURCE -O0" \
|
||||
EXTRA_CXXFLAGS="%{optflags}" \
|
||||
make %{?_smp_mflags}
|
||||
|
||||
|
||||
# Override LIB_AR with empty string to skip installation of static libraries
|
||||
%install
|
||||
make install DESTDIR=%{buildroot} \
|
||||
LIB_AR= \
|
||||
prefix=%{_prefix} \
|
||||
libdir=%{_libdir} \
|
||||
includedir=%{_includedir} \
|
||||
mandir=%{_mandir} \
|
||||
bindir=%{_bindir} \
|
||||
sysconfdir=%{_sysconfdir}
|
||||
mkdir -p %{buildroot}%{_datadir}/nvml
|
||||
cp utils/nvml.magic %{buildroot}%{_datadir}/nvml/
|
||||
|
||||
|
||||
%check
|
||||
cp src/test/testconfig.sh.example src/test/testconfig.sh
|
||||
make check
|
||||
|
||||
|
||||
%post -n libpmem -p /sbin/ldconfig
|
||||
%postun -n libpmem -p /sbin/ldconfig
|
||||
%post -n libpmemblk -p /sbin/ldconfig
|
||||
%postun -n libpmemblk -p /sbin/ldconfig
|
||||
%post -n libpmemlog -p /sbin/ldconfig
|
||||
%postun -n libpmemlog -p /sbin/ldconfig
|
||||
%post -n libpmemobj -p /sbin/ldconfig
|
||||
%postun -n libpmemobj -p /sbin/ldconfig
|
||||
%post -n libvmem -p /sbin/ldconfig
|
||||
%postun -n libvmem -p /sbin/ldconfig
|
||||
%post -n libvmmalloc -p /sbin/ldconfig
|
||||
%postun -n libvmmalloc -p /sbin/ldconfig
|
||||
|
||||
|
||||
%if 0%{?__debug_package} == 0
|
||||
%debug_package
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue May 24 2016 Krzysztof Czurylo <krzysztof.czurylo@intel.com> - 1.0-1
|
||||
- Initial RPM release
|
||||
Loading…
Reference in New Issue
Block a user