From 0c5d58467374edb635f1e00d9ed76bf578a9d00e Mon Sep 17 00:00:00 2001 From: Dingli Zhang Date: Tue, 9 Dec 2025 06:24:57 +0000 Subject: [PATCH] Fix hbase shell error on riscv64 --- hbase.spec | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/hbase.spec b/hbase.spec index 158e776..29ee5cf 100644 --- a/hbase.spec +++ b/hbase.spec @@ -8,7 +8,7 @@ Name: hbase Version: 2.5.0 -Release: 5 +Release: 6 Summary: A database for Apache Hadoop License: Apache-2.0 and BSD and CPL-1.0 and EPL-1.0 and MIT URL: http://hbase.apache.org/ @@ -30,6 +30,7 @@ BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: gradle-local xmvn xmvn-install BuildRequires: systemd +BuildRequires: jffi-native BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: java-1.8.0-openjdk-devel maven hostname maven-local protobuf2-devel protobuf2-compiler protobuf2 Requires: java-1.8.0-openjdk @@ -86,12 +87,14 @@ pushd ${HOME}/%{name}-prep_dir/protobuf-3.21.1 mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.21.1 -Dclassifier=linux-riscv64 -Dpackaging=exe -Dfile=protoc-artifacts/target/linux/riscv64/protoc.exe popd mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=2.5.0 -Dclassifier=linux-riscv64 -Dpackaging=exe -Dfile=/usr/bin/protoc +sed -i 's#9.2.13.0#9.3.15.0#g' pom.xml %endif %build %if "%{_arch}" == "riscv64" export MAVEN_OPTS="-Xms2048M -Xmx8000M" %endif +export CMAKE_POLICY_VERSION_MINIMUM=3.5 mvn -Pnative clean install -DskipTests assembly:single -Prelease -Dmaven.javadoc.skip=true -Drat.skip=true %if %{with tests} @@ -170,6 +173,12 @@ pushd %{name}-assembly/target/%{name}-%{version} cp -arf lib/client-facing-thirdparty %{buildroot}/%{_datadir}/%{name}/lib cp -arf lib/shaded-clients %{buildroot}/%{_datadir}/%{name}/lib + %if "%{_arch}" == "riscv64" + jar xf /usr/lib/java/jffi-native.jar jni/riscv64-Linux + jar uf %{buildroot}/%{_datadir}/%{name}/lib/ruby/jruby-complete-9.3.15.0.jar jni/riscv64-Linux + rm -rf jni + %endif + %if 0 # Native libraries cp -arf lib/native/* %{buildroot}/%{_libdir}/%{name} @@ -287,6 +296,9 @@ fi %endif %changelog +* Tue Dec 9 2025 Dingli Zhang - 2.5.0-6 +- Fix hbase shell error on riscv64 + * Mon Dec 16 2024 litian - 2.5.0-5 - fix %patchN is deprecated warning -- Gitee