diff --git a/fix-riscv64-support.patch b/fix-riscv64-support.patch new file mode 100644 index 0000000000000000000000000000000000000000..1a53bff684387156221c15be4d9ac75e021c1957 --- /dev/null +++ b/fix-riscv64-support.patch @@ -0,0 +1,13 @@ +diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/JVM.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/JVM.java +index fbad0da..4897e7f 100644 +--- a/hbase-common/src/main/java/org/apache/hadoop/hbase/util/JVM.java ++++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/util/JVM.java +@@ -54,6 +54,8 @@ public class JVM { + System.getProperty("os.arch") != null && System.getProperty("os.arch").contains("amd64"); + private static final boolean aarch64 = + System.getProperty("os.arch") != null && System.getProperty("os.arch").contains("aarch64"); ++ private static final boolean riscv64 = ++ System.getProperty("os.arch") != null && System.getProperty("os.arch").contains("riscv64"); + + private static final String JVMVersion = System.getProperty("java.version"); + diff --git a/hbase.spec b/hbase.spec index 709c27f707984dbbd1b7bb1983d12de2f06ab19b..1dc6d0a32d5566c8d6de6b345daf53dd7825693d 100644 --- a/hbase.spec +++ b/hbase.spec @@ -8,7 +8,7 @@ Name: hbase Version: 2.5.0 -Release: 2 +Release: 3 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/ @@ -17,7 +17,9 @@ Source1: %{name}.logrotate Source2: %{name}-site.xml Source3: %{name}.service.template Source4: xmvn-reactor -Source5: settings.xml +Source5: protoc-3.21.1-linux-riscv64.exe +Patch0: upgrade_os-maven_plugin_to_1.7.1.patch +Patch1: fix-riscv64-support.patch BuildArch: noarch BuildRequires: cmake @@ -59,6 +61,12 @@ This package contains the API documentation for %{name}. %prep %setup -qn %{name}-rel-%{version} +%patch0 -p1 +%if "%{_arch}" == "riscv64" +%patch1 -p1 +mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=2.5.0 -Dclassifier=linux-riscv64 -Dpackaging=exe -Dfile=/usr/bin/protoc +mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.21.1 -Dclassifier=linux-riscv64 -Dpackaging=exe -Dfile=%{SOURCE5} +%endif mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=2.5.0 -Dclassifier=linux-aarch_64 -Dpackaging=exe -Dfile=/usr/bin/protoc cp %{SOURCE4} ./.xmvn-reactor echo `pwd` > absolute_prefix.log @@ -67,6 +75,9 @@ absolute_prefix=`head -n 1 absolute_prefix.log` sed -i 's/absolute-prefix/'"$absolute_prefix"'/g' .xmvn-reactor %build +%if "%{_arch}" == "riscv64" +export MAVEN_OPTS="-Xms2048M -Xmx8000M" +%endif mvn -Pnative clean install -DskipTests assembly:single -Prelease -Dmaven.javadoc.skip=true -Drat.skip=true %if %{with tests} @@ -262,6 +273,11 @@ fi %endif %changelog +* Wed May 29 2024 Dingli Zhang - 2.5.0-3 +- Fix riscv64 support +- Upgrade os-maven-plugin to 1.7.1 +- Remove useless settings.xml + * Wed May 8 2024 xiexing - 2.5.0-2 - remove unnecessary require diff --git a/protoc-3.21.1-linux-riscv64.exe b/protoc-3.21.1-linux-riscv64.exe new file mode 100644 index 0000000000000000000000000000000000000000..14f98c760013682731e704d07c027fda40199eb9 Binary files /dev/null and b/protoc-3.21.1-linux-riscv64.exe differ diff --git a/settings.xml b/settings.xml deleted file mode 100644 index 47cf8bd4ee208b808c3b83912be5679e079ff5b8..0000000000000000000000000000000000000000 --- a/settings.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - big - * - huaweicloud - https://repo.huaweicloud.com/repository/maven/ - - - - - diff --git a/upgrade_os-maven_plugin_to_1.7.1.patch b/upgrade_os-maven_plugin_to_1.7.1.patch new file mode 100644 index 0000000000000000000000000000000000000000..e78b4c7e91781498e1d9ac9ed52c07e56b8eb648 --- /dev/null +++ b/upgrade_os-maven_plugin_to_1.7.1.patch @@ -0,0 +1,13 @@ +diff --git a/pom.xml b/pom.xml +index b603ca4..dcd21fd 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -621,7 +621,7 @@ + 3.4.0 + 1.1.0 + 3.1.2 +- 1.5.0.Final ++ 1.7.1 + 1.3.9-1 + 4.2.2 + 4.2.0