From 06140b9e8dd3d128ff3fd279aae144708a973203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0abata?= Date: Thu, 15 Oct 2020 16:58:01 +0200 Subject: [PATCH] RHEL 9.0.0 Alpha bootstrap The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/libpmemobj-cpp#8a5a0d9be0d8924be9ec7e1aa17ef9ea7bd32730 --- .gitignore | 3 + README.md | 3 + libpmemobj-cpp.rpmlintrc | 4 + libpmemobj-cpp.spec | 174 +++++++++++++++++++++++++++++++++++++++ radix-fix.patch | 29 +++++++ sources | 1 + 6 files changed, 214 insertions(+) create mode 100644 README.md create mode 100644 libpmemobj-cpp.rpmlintrc create mode 100644 libpmemobj-cpp.spec create mode 100644 radix-fix.patch create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..ae9b48c 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,3 @@ +/libpmemobj-cpp-1.9.tar.gz +/libpmemobj-cpp-1.10.tar.gz +/libpmemobj-cpp-1.11.tar.gz diff --git a/README.md b/README.md new file mode 100644 index 0000000..de92a0b --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# libpmemobj-cpp + +The libpmemobj-cpp package \ No newline at end of file diff --git a/libpmemobj-cpp.rpmlintrc b/libpmemobj-cpp.rpmlintrc new file mode 100644 index 0000000..77296d5 --- /dev/null +++ b/libpmemobj-cpp.rpmlintrc @@ -0,0 +1,4 @@ +# SPELLING ERRORS + +addFilter(r'spelling-error .* en_US (libpmemobj|transactional)') +addFilter(r'spelling-error .*\(en_US\) (libpmemobj|transactional)') diff --git a/libpmemobj-cpp.spec b/libpmemobj-cpp.spec new file mode 100644 index 0000000..e54d3f9 --- /dev/null +++ b/libpmemobj-cpp.spec @@ -0,0 +1,174 @@ +%global __cmake_in_source_build 1 +%global min_libpmemobj_ver 1.9 +%global upstreamversion 1.11 + +Name: libpmemobj-cpp +Version: 1.11 +Release: 1%{?dist} +Summary: C++ bindings for libpmemobj +# Note: tests/external/libcxx is dual licensed using University of Illinois "BSD-Like" license and the MIT license. It's used only during development/testing and is NOT part of the binary RPM. +License: BSD +URL: http://pmem.io/pmdk/cpp_obj/ + +Source0: https://github.com/pmem/%{name}/archive/%{upstreamversion}.tar.gz#/%{name}-%{upstreamversion}.tar.gz +Patch0: radix-fix.patch + +BuildRequires: libpmemobj-devel >= %{min_libpmemobj_ver} +BuildRequires: cmake >= 3.3 +BuildRequires: glibc-devel +BuildRequires: gcc-c++ +BuildRequires: pkgconfig +BuildRequires: doxygen +BuildRequires: perl-Encode +BuildRequires: gdb + +# optional dependencies, used only in tests +BuildRequires: ncurses-devel +BuildRequires: libunwind-devel +BuildRequires: valgrind-devel +BuildRequires: tbb-devel +BuildRequires: SFML-devel + +# There's nothing x86-64 specific in this package, but we have +# to duplicate what spec for pmdk/libpmemobj has at the moment. +# Relevant bug reports: +# https://bugzilla.redhat.com/show_bug.cgi?id=1340634 +# https://bugzilla.redhat.com/show_bug.cgi?id=1340635 +# https://bugzilla.redhat.com/show_bug.cgi?id=1340636 +# https://bugzilla.redhat.com/show_bug.cgi?id=1340637 +ExclusiveArch: x86_64 + +%description +This package contains header files for libpmemobj C++ bindings and C++ +containers built on top of them. + +# Specify a virtual Provide for libpmemobj++-static package, so the package +# usage can be tracked. +%package -n libpmemobj++-devel +Summary: C++ bindings for Persistent Memory Transactional Object Store library +Provides: libpmemobj++-static = %{version}-%{release} +Requires: libpmemobj-devel >= %{min_libpmemobj_ver} + +%description -n libpmemobj++-devel +This package contains header files for libpmemobj C++ bindings and C++ +containers built on top of them. + +The libpmemobj library provides a transactional object store, +providing memory allocation, transactions, and general facilities for +persistent memory programming. + +%files -n libpmemobj++-devel +%{_libdir}/pkgconfig/libpmemobj++.pc +%dir %{_includedir}/libpmemobj++ +%{_includedir}/libpmemobj++/*.hpp +%dir %{_includedir}/libpmemobj++/detail +%{_includedir}/libpmemobj++/detail/*.hpp +%dir %{_includedir}/libpmemobj++/container +%{_includedir}/libpmemobj++/container/*.hpp +%dir %{_includedir}/libpmemobj++/container/detail +%{_includedir}/libpmemobj++/container/detail/*.hpp +%dir %{_includedir}/libpmemobj++/experimental +%{_includedir}/libpmemobj++/experimental/*.hpp +%dir %{_libdir}/libpmemobj++ +%dir %{_libdir}/libpmemobj++/cmake +%{_libdir}/libpmemobj++/cmake/libpmemobj++-config-version.cmake +%{_libdir}/libpmemobj++/cmake/libpmemobj++-config.cmake + +%license LICENSE + +%doc ChangeLog README.md + +%package -n libpmemobj++-doc +Summary: HTML documentation for libpmemobj++ + +%description -n libpmemobj++-doc +HTML documentation for libpmemobj++. + +%files -n libpmemobj++-doc +%dir %{_docdir}/libpmemobj++ +%{_docdir}/libpmemobj++/* + +%license LICENSE + +%doc ChangeLog README.md + +%global debug_package %{nil} + +%prep +%setup -q -n libpmemobj-cpp-%{upstreamversion} +%patch0 -p1 + +%build +mkdir build +cd build +# CXX_STANDARD=17 matters only for tests, it can be safely disabled in distros without c++17-compliant compiler +%cmake .. -DCMAKE_INSTALL_DOCDIR=%{_docdir}/libpmemobj++ -DTESTS_USE_FORCED_PMEM=ON -DCXX_STANDARD=17 +%make_build + +%install +cd build +%make_install + +%check +cd build +# https://github.com/pmem/libpmemobj-cpp/issues/469 +#ctest -V %{?_smp_mflags} -E concurrent_hash_map_rehash_0_helgrind -E concurrent_hash_map_insert_lookup_0_helgrind +ctest -V -E concurrent_hash_map_rehash_0_helgrind -E concurrent_hash_map_insert_lookup_0_helgrind -E enumerable_thread_specific_access_0_drd + +%changelog +* Fri Oct 9 2020 Adam Borowski - 1.11-1 +- Update to version 1.11. +- Disable enumerable_thread_specific_access_0_drd +- Fix internal find in radix_tree + +* Mon Aug 31 2020 Adam Borowski - 1.10-1 +- Update to version 1.10. + +* Mon Aug 31 2020 Adam Borowski - 1.9-5 +- Fix FTBFS with new libunwind. + +* Sat Aug 01 2020 Fedora Release Engineering - 1.9-4 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue Jul 28 2020 Fedora Release Engineering - 1.9-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jul 24 2020 Jeff Law - 1.9-2 +- Use __cmake_in_source_build + +* Wed Feb 12 2020 Marcin Ślusarz - 1.9-1 +- Update to version 1.9. + +* Wed Jan 29 2020 Fedora Release Engineering - 1.8.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Mon Jan 27 2020 Marcin Ślusarz - 1.8.1-1 +- Update to version 1.8.1. + +* Fri Oct 04 2019 Marcin Ślusarz - 1.8-2 +- Work around https://github.com/pmem/libpmemobj-cpp/issues/469. + +* Fri Oct 04 2019 Marcin Ślusarz - 1.8-1 +- Update to version 1.8. + +* Thu Jul 25 2019 Fedora Release Engineering - 1.7-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Wed Jun 26 2019 Marcin Ślusarz - 1.7-1 +- Update to version 1.7. + +* Thu Mar 28 2019 Marcin Ślusarz - 1.6-2 +- Bump required PMDK version to 1.6. + +* Mon Mar 18 2019 Marcin Ślusarz - 1.6-1 +- Update to version 1.6 + +* Fri Mar 08 2019 Marcin Ślusarz - 1.5.1-1 +- Update to version 1.5.1 + +* Fri Feb 01 2019 Fedora Release Engineering - 1.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Dec 14 2018 Marcin Ślusarz - 1.5-1 +- Initial RPM release diff --git a/radix-fix.patch b/radix-fix.patch new file mode 100644 index 0000000..62e2b33 --- /dev/null +++ b/radix-fix.patch @@ -0,0 +1,29 @@ +From 51cb8afb804db8e71007fb238dab9f9ff0f09ec8 Mon Sep 17 00:00:00 2001 +From: Igor Chorążewicz +Date: Thu, 8 Oct 2020 12:27:12 +0200 +Subject: [PATCH] radix_tree: fix internal find + +Fix comparison between n->byte and key.size(). When using pmem::obj::string +or inline_string the behavior was ok (since we always have null terminator +at the end), but we technically access out-of-range memory which can cause +asserts in string_view operator[]. +--- + include/libpmemobj++/experimental/radix_tree.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/include/libpmemobj++/experimental/radix_tree.hpp b/include/libpmemobj++/experimental/radix_tree.hpp +index e55280c7..9fcc1a4b 100644 +--- a/include/libpmemobj++/experimental/radix_tree.hpp ++++ b/include/libpmemobj++/experimental/radix_tree.hpp +@@ -1744,7 +1744,7 @@ radix_tree::internal_find(const K &k) const + while (n && !n.is_leaf()) { + if (path_length_equal(key.size(), n)) + n = n->embedded_entry; +- else if (n->byte > key.size()) ++ else if (n->byte >= key.size()) + return nullptr; + else + n = n->child[slice_index(key[n->byte], n->bit)]; +-- +2.28.0 + diff --git a/sources b/sources new file mode 100644 index 0000000..7e96340 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (libpmemobj-cpp-1.11.tar.gz) = 79856e8e017d3f2371d21a74111faba8b7bfb4e9603595a833fd0191a79c32e17c781ec14824447818a78c01db1280130e655b26763d0ec880ee3dd6bc7544f5