[packages/rocksdb] - updated to 6.29.5 (new soname) - updated detect-flags patch - removed outdated libdir,make-program

qboosh qboosh at pld-linux.org
Mon Aug 22 17:25:40 CEST 2022


commit 578f0abcd6e11553dcf667feef5f75b07789772f
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Aug 22 17:25:24 2022 +0200

    - updated to 6.29.5 (new soname)
    - updated detect-flags patch
    - removed outdated libdir,make-programs,link patches
    - added pc patch (don't put build-time compiler/linker flags in .pc file)
    - disable google-benchmark by default

 make-programs.patch        | 11 -----------
 rocksdb-detect-flags.patch | 21 ++++++++++-----------
 rocksdb-libdir.patch       | 46 ----------------------------------------------
 rocksdb-link.patch         | 11 -----------
 rocksdb-pc.patch           | 14 ++++++++++++++
 rocksdb.spec               | 43 +++++++++++++++++++++++++++++--------------
 6 files changed, 53 insertions(+), 93 deletions(-)
---
diff --git a/rocksdb.spec b/rocksdb.spec
index 9b05667..05959f2 100644
--- a/rocksdb.spec
+++ b/rocksdb.spec
@@ -2,32 +2,33 @@
 #
 # Conditional build:
 %bcond_with	tests		# build with tests
+%bcond_with	benchmark	# enable Google Benchmark
 %bcond_without	static_libs	# don't build static libraries
 %bcond_without	tbb		# Threading Building Blocks support
 
 Summary:	RocksDB: A Persistent Key-Value Store for Flash and RAM Storage
 Summary(pl.UTF-8):	RocksDB - trwała baza danych klucz-wartość dla pamięci Flash i RAM
 Name:		rocksdb
-Version:	6.8.1
-Release:	2
+Version:	6.29.5
+Release:	1
 License:	BSD
 Group:		Libraries
 #Source0Download: https://github.com/facebook/rocksdb/releases
 Source0:	https://github.com/facebook/rocksdb/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5:	8648dbe2589748b9dff3c1fe725f210b
-Patch0:		%{name}-libdir.patch
-Patch1:		make-programs.patch
-Patch2:		%{name}-detect-flags.patch
-Patch3:		%{name}-link.patch
+# Source0-md5:	be498cd7125f2a38059609469adf147f
+Patch0:		%{name}-detect-flags.patch
+Patch1:		%{name}-pc.patch
 URL:		https://rocksdb.org/
 BuildRequires:	bzip2-devel >= 1.0.8
 BuildRequires:	gflags-devel
+%{?with_benchmark:BuildRequires:	google-benchmark-devel}
 # libtcmalloc also supported, but jemalloc is preferred
 BuildRequires:	jemalloc-devel
 %ifarch i386 i486
 BuildRequires:	libatomic-devel
 %endif
 BuildRequires:	libstdc++-devel >= 6:4.7
+BuildRequires:	liburing-devel
 BuildRequires:	lz4-devel >= 1:1.9.2
 BuildRequires:	numactl-devel
 BuildRequires:	rpmbuild(macros) >= 1.734
@@ -77,14 +78,19 @@ Statyczna biblioteka RocksDB.
 %setup -q
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
-%patch3 -p1
 
 %build
+%if %{without benchmark}
+export ROCKSDB_DISABLE_BENCHMARK=1
+%endif
+%if %{without tbb}
+export ROCKSDB_DISABLE_TBB=1
+%endif
+
 %ifarch i386 i486
 PLATFORM_LDFLAGS="-latomic" \
 %endif
-%{__make} shared_lib %{?with_static_libs:static_lib} programs %{?with_tests:check} \
+%{__make} shared_lib %{?with_static_libs:static_lib} tools tools_lib %{?with_tests:check} \
 	AM_DEFAULT_VERBOSITY=1 \
 	CC="%{__cc}" \
 	CXX="%{__cxx}" \
@@ -92,17 +98,25 @@ PLATFORM_LDFLAGS="-latomic" \
 	EXTRA_CFLAGS="$(pkg-config --cflags liblz4)" \
 	OPT="%{rpmcflags} %{!?debug:-DNDEBUG}" \
 	PORTABLE=1 \
-	%{!?with_tbb:ROCKSDB_DISABLE_TBB=1} \
 	USE_RTTI=1 \
 	WARNING_FLAGS="%{rpmcppflags} -Wall"
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
+%if %{without benchmark}
+export ROCKSDB_DISABLE_BENCHMARK=1
+%endif
+%if %{without tbb}
+export ROCKSDB_DISABLE_TBB=1
+%endif
+
 %{__make} install \
 	%{!?with_debug:DEBUG_LEVEL=0} \
-	INSTALL_PATH=$RPM_BUILD_ROOT%{_prefix} \
-	INSTALL_LIBDIR=$RPM_BUILD_ROOT%{_libdir}
+	PORTABLE=1 \
+	DESTDIR=$RPM_BUILD_ROOT \
+	PREFIX=%{_prefix} \
+	LIBDIR=%{_libdir}
 
 # reduntant symlink
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/librocksdb.so.6
@@ -117,12 +131,13 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc AUTHORS DEFAULT_OPTIONS_HISTORY.md DUMP_FORMAT.md HISTORY.md LANGUAGE-BINDINGS.md LICENSE.leveldb README.md ROCKSDB_LITE.md USERS.md
 %attr(755,root,root) %{_libdir}/librocksdb.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/librocksdb.so.6.8
+%attr(755,root,root) %ghost %{_libdir}/librocksdb.so.6.29
 
 %files devel
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/librocksdb.so
 %{_includedir}/rocksdb
+%{_pkgconfigdir}/rocksdb.pc
 
 %if %{with static_libs}
 %files static
diff --git a/make-programs.patch b/make-programs.patch
deleted file mode 100644
index b93aa76..0000000
--- a/make-programs.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- rocksdb-rocksdb-3.10.2/Makefile~	2015-08-01 23:39:38.000000000 +0300
-+++ rocksdb-rocksdb-3.10.2/Makefile	2015-08-03 09:54:26.746538265 +0300
-@@ -316,6 +316,8 @@
- 
- all_but_some_tests: $(LIBRARY) $(BENCHMARKS) tools tools_lib test_libs $(SUBSET)
- 
-+programs: $(PROGRAMS)
-+
- static_lib: $(LIBRARY)
- 
- shared_lib: $(SHARED)
diff --git a/rocksdb-detect-flags.patch b/rocksdb-detect-flags.patch
index 8bcac1e..80d2b07 100644
--- a/rocksdb-detect-flags.patch
+++ b/rocksdb-detect-flags.patch
@@ -1,11 +1,10 @@
---- rocksdb-rocksdb-5.2.1/Makefile.orig	2017-04-28 19:57:40.787056551 +0200
-+++ rocksdb-rocksdb-5.2.1/Makefile	2017-04-28 19:58:43.773722499 +0200
-@@ -140,7 +140,7 @@
- 
- AM_LINK = $(AM_V_CCLD)$(CXX) $^ $(EXEC_LDFLAGS) -o $@ $(LDFLAGS) $(COVERAGEFLAGS)
- # detect what platform we're building on
--dummy := $(shell (export ROCKSDB_ROOT="$(CURDIR)"; export PORTABLE="$(PORTABLE)"; "$(CURDIR)/build_tools/build_detect_platform" "$(CURDIR)/make_config.mk"))
-+dummy := $(shell (export ROCKSDB_ROOT="$(CURDIR)" CFLAGS="$(CFLAGS)"; export PORTABLE="$(PORTABLE)"; "$(CURDIR)/build_tools/build_detect_platform" "$(CURDIR)/make_config.mk"))
- # this file is generated by the previous line to set build flags and sources
- include make_config.mk
- CLEAN_FILES += make_config.mk
+--- rocksdb-6.29.5/Makefile.orig	2022-08-21 07:58:56.118421883 +0200
++++ rocksdb-6.29.5/Makefile	2022-08-21 08:00:52.517791294 +0200
+@@ -227,6 +227,7 @@ AM_SHARE = $(AM_V_CCLD) $(CXX) $(PLATFOR
+ # Export some common variables that might have been passed as Make variables
+ # instead of environment variables.
+ dummy := $(shell (export ROCKSDB_ROOT="$(CURDIR)"; \
++                  export CFLAGS="$(EXTRA_CFLAGS)"; \
+                   export CXXFLAGS="$(EXTRA_CXXFLAGS)"; \
+                   export LDFLAGS="$(EXTRA_LDFLAGS)"; \
+                   export COMPILE_WITH_ASAN="$(COMPILE_WITH_ASAN)"; \
diff --git a/rocksdb-libdir.patch b/rocksdb-libdir.patch
deleted file mode 100644
index 6e26e96..0000000
--- a/rocksdb-libdir.patch
+++ /dev/null
@@ -1,46 +0,0 @@
---- rocksdb-6.0.2/Makefile.orig	2019-04-24 00:20:22.000000000 +0200
-+++ rocksdb-6.0.2/Makefile	2019-04-28 10:13:08.180185516 +0200
-@@ -1574,17 +1574,18 @@
- #-------------------------------------------------
- # make install related stuff
- INSTALL_PATH ?= /usr/local
-+INSTALL_LIBDIR ?= $(INSTALL_PATH)/lib
- 
- uninstall:
- 	rm -rf $(INSTALL_PATH)/include/rocksdb \
--	  $(INSTALL_PATH)/lib/$(LIBRARY) \
--	  $(INSTALL_PATH)/lib/$(SHARED4) \
--	  $(INSTALL_PATH)/lib/$(SHARED3) \
--	  $(INSTALL_PATH)/lib/$(SHARED2) \
--	  $(INSTALL_PATH)/lib/$(SHARED1)
-+	  $(INSTALL_LIBDIR)/$(LIBRARY) \
-+	  $(INSTALL_LIBDIR)/$(SHARED4) \
-+	  $(INSTALL_LIBDIR)/$(SHARED3) \
-+	  $(INSTALL_LIBDIR)/$(SHARED2) \
-+	  $(INSTALL_LIBDIR)/$(SHARED1)
- 
- install-headers:
--	install -d $(INSTALL_PATH)/lib
-+	install -d $(INSTALL_LIBDIR)
- 	for header_dir in `$(FIND) "include/rocksdb" -type d`; do \
- 		install -d $(INSTALL_PATH)/$$header_dir; \
- 	done
-@@ -1593,13 +1594,13 @@
- 	done
- 
- install-static: install-headers $(LIBRARY)
--	install -C -m 755 $(LIBRARY) $(INSTALL_PATH)/lib
-+	install -C -m 755 $(LIBRARY) $(INSTALL_LIBDIR)
- 
- install-shared: install-headers $(SHARED4)
--	install -C -m 755 $(SHARED4) $(INSTALL_PATH)/lib && \
--		ln -fs $(SHARED4) $(INSTALL_PATH)/lib/$(SHARED3) && \
--		ln -fs $(SHARED4) $(INSTALL_PATH)/lib/$(SHARED2) && \
--		ln -fs $(SHARED4) $(INSTALL_PATH)/lib/$(SHARED1)
-+	install -C -m 755 $(SHARED4) $(INSTALL_LIBDIR) && \
-+		ln -fs $(SHARED4) $(INSTALL_LIBDIR)/$(SHARED3) && \
-+		ln -fs $(SHARED4) $(INSTALL_LIBDIR)/$(SHARED2) && \
-+		ln -fs $(SHARED4) $(INSTALL_LIBDIR)/$(SHARED1)
- 
- # install static by default + install shared if it exists
- install: install-static
diff --git a/rocksdb-link.patch b/rocksdb-link.patch
deleted file mode 100644
index 5b8dc63..0000000
--- a/rocksdb-link.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- rocksdb-6.8.1/Makefile.orig	2020-05-22 08:04:05.899202286 +0200
-+++ rocksdb-6.8.1/Makefile	2020-05-22 08:41:19.037104339 +0200
-@@ -738,7 +738,7 @@
- shared_all_libobjects = $(shared_libobjects) $(shared-ppc-objects)
- endif
- $(SHARED4): $(shared_all_libobjects)
--	$(CXX) $(PLATFORM_SHARED_LDFLAGS)$(SHARED3) $(CXXFLAGS) $(PLATFORM_SHARED_CFLAGS) $(shared_all_libobjects) $(LDFLAGS) -o $@
-+	$(CXX) $(PLATFORM_SHARED_LDFLAGS)$(SHARED3) $(CXXFLAGS) $(PLATFORM_SHARED_CFLAGS) $(shared_all_libobjects) $(LDFLAGS) -o $@ -ldl
- 
- endif  # PLATFORM_SHARED_EXT
- 
diff --git a/rocksdb-pc.patch b/rocksdb-pc.patch
new file mode 100644
index 0000000..39b7fa2
--- /dev/null
+++ b/rocksdb-pc.patch
@@ -0,0 +1,14 @@
+--- rocksdb-6.29.5/Makefile.orig	2022-08-21 08:37:54.772418974 +0200
++++ rocksdb-6.29.5/Makefile	2022-08-21 09:29:36.882280068 +0200
+@@ -2038,9 +2038,9 @@ gen-pc:
+ 	-echo 'Name: rocksdb' >> rocksdb.pc
+ 	-echo 'Description: An embeddable persistent key-value store for fast storage' >> rocksdb.pc
+ 	-echo Version: $(shell ./build_tools/version.sh full) >> rocksdb.pc
+-	-echo 'Libs: -L$${libdir} $(EXEC_LDFLAGS) -lrocksdb' >> rocksdb.pc
++	-echo 'Libs: -L$${libdir} -lrocksdb' >> rocksdb.pc
+ 	-echo 'Libs.private: $(PLATFORM_LDFLAGS)' >> rocksdb.pc
+-	-echo 'Cflags: -I$${includedir} $(PLATFORM_CXXFLAGS)' >> rocksdb.pc
++	-echo 'Cflags: -I$${includedir}' >> rocksdb.pc
+ 	-echo 'Requires: $(subst ",,$(ROCKSDB_PLUGIN_PKGCONFIG_REQUIRES))' >> rocksdb.pc
+ 
+ #-------------------------------------------------
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rocksdb.git/commitdiff/578f0abcd6e11553dcf667feef5f75b07789772f



More information about the pld-cvs-commit mailing list