Some jar packs should provides local in case of build error

This commit is contained in:
si-gui 2021-07-01 10:45:50 +08:00
parent 79be1f26f0
commit 685dee24da
5 changed files with 38 additions and 2 deletions

BIN
assertj-core-1.7.1.jar Normal file

Binary file not shown.

BIN
cglib-2.2.2.jar Normal file

Binary file not shown.

BIN
mockito-all-1.10.19.jar Normal file

Binary file not shown.

View File

@ -1,6 +1,6 @@
Name: rocksdb
Version: 6.8.1
Release: 2
Release: 3
Summary: A Persistent Key-Value Store for Flash and RAM Storage
License: GPLv2 and Apache 2.0 License
@ -17,7 +17,11 @@ BuildRequires: snappy snappy-devel zlib zlib-devel bzip2 bzip2-devel lz4 lz4-dev
Requires: snappy snappy-devel zlib zlib-devel bzip2 bzip2-devel lz4 lz4-devel zstd zstd-devel gflags gflags-devel
Source0: https://codeload.github.com/facebook/%{name}/tar.gz/v%{version}
Source1: https://repo1.maven.org/maven2/org/assertj/assertj-core/1.7.1/assertj-core-1.7.1.jar
Source2: https://repo1.maven.org/maven2/cglib/cglib/2.2.2/cglib-2.2.2.jar
Source3: https://repo1.maven.org/maven2/org/mockito/mockito-all/1.10.19/mockito-all-1.10.19.jar
Patch0: rocksdb-6.8.1-install_path.patch
Patch1: some-jar-packs-should-provides-local.patch
%description
Rocksdb is a library that forms the core building block for a fast key value
@ -44,11 +48,13 @@ RocksDB JNI gives you a Java interface to the RocksDB C++ library which is an
embeddable persistent key-value store for fast storage.
%prep
%autosetup
%autosetup -p1
rm -rf third-party/gtest-1.8.1
rm java/benchmark/src/main/java/org/rocksdb/benchmark/DbBenchmark.java
rm build_tools/gnu_parallel
mkdir -p java/test-libs
cp -p %{SOURCE1} %{SOURCE2} %{SOURCE3} java/test-libs
%build
export CFLAGS="%{optflags}"
@ -92,6 +98,9 @@ install -D -m 0644 java/target/%{name}jni-%{version}-linux$(getconf LONG_BIT).ja
%{_javadir}/%{name}jni/%{name}jni.jar
%changelog
* Thu 01 Jul 2021 sunguoshuai <sunguoshuai@huawei.com> - 6.8.1-3
- Some jar packs should provides local in case of build error
* Thu May 06 2021 herengui <herengui@uniontech.com> - 6.8.1-2
- add java-api: rocksdbjni
- fix undefined symbol issue for c++ API

View File

@ -0,0 +1,27 @@
From 3e387b07fd23960f566dee7209f0779791df4094 Mon Sep 17 00:00:00 2001
From: si-gui <sunguoshuai@huawei.com>
Date: Wed, 30 Jun 2021 17:16:28 +0800
Subject: [PATCH] some jar packs should provides local
---
java/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/java/Makefile b/java/Makefile
index 155db69..0c835ae 100644
--- a/java/Makefile
+++ b/java/Makefile
@@ -288,8 +288,8 @@ optimistic_transaction_sample: java
resolve_test_deps:
test -d "$(JAVA_TEST_LIBDIR)" || mkdir -p "$(JAVA_TEST_LIBDIR)"
- test -s "$(JAVA_JUNIT_JAR)" || cp $(MVN_LOCAL)/junit/junit/4.12/junit-4.12.jar $(JAVA_TEST_LIBDIR) || curl --fail --insecure --output $(JAVA_JUNIT_JAR) --location $(DEPS_URL)/junit-4.12.jar
- test -s "$(JAVA_HAMCR_JAR)" || cp $(MVN_LOCAL)/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar $(JAVA_TEST_LIBDIR) || curl --fail --insecure --output $(JAVA_HAMCR_JAR) --location $(DEPS_URL)/hamcrest-core-1.3.jar
+ test -s "$(JAVA_JUNIT_JAR)" || cp /usr/share/java/junit.jar $(JAVA_TEST_LIBDIR)/junit-4.12.jar || curl --fail --insecure --output $(JAVA_JUNIT_JAR) --location $(DEPS_URL)/junit-4.12.jar
+ test -s "$(JAVA_HAMCR_JAR)" || cp /usr/share/java/hamcrest/core.jar $(JAVA_TEST_LIBDIR)/hamcrest-core-1.3.jar || curl --fail --insecure --output $(JAVA_HAMCR_JAR) --location $(DEPS_URL)/hamcrest-core-1.3.jar
test -s "$(JAVA_MOCKITO_JAR)" || cp $(MVN_LOCAL)/org/mockito/mockito-all/1.10.19/mockito-all-1.10.19.jar $(JAVA_TEST_LIBDIR) || curl --fail --insecure --output "$(JAVA_MOCKITO_JAR)" --location $(DEPS_URL)/mockito-all-1.10.19.jar
test -s "$(JAVA_CGLIB_JAR)" || cp $(MVN_LOCAL)/cglib/cglib/2.2.2/cglib-2.2.2.jar $(JAVA_TEST_LIBDIR) || curl --fail --insecure --output "$(JAVA_CGLIB_JAR)" --location $(DEPS_URL)/cglib-2.2.2.jar
test -s "$(JAVA_ASSERTJ_JAR)" || cp $(MVN_LOCAL)/org/assertj/assertj-core/1.7.1/assertj-core-1.7.1.jar $(JAVA_TEST_LIBDIR) || curl --fail --insecure --output "$(JAVA_ASSERTJ_JAR)" --location $(DEPS_URL)/assertj-core-1.7.1.jar
--
2.30.0