Fix riscv64 support
(cherry picked from commit 4f60bee17bbba279b4cacdd13721253298e9517d)
This commit is contained in:
parent
d5fe269b50
commit
e26347e2e7
13
fix-riscv64-support.patch
Normal file
13
fix-riscv64-support.patch
Normal file
@ -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");
|
||||||
|
|
||||||
20
hbase.spec
20
hbase.spec
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
Name: hbase
|
Name: hbase
|
||||||
Version: 2.5.0
|
Version: 2.5.0
|
||||||
Release: 2
|
Release: 3
|
||||||
Summary: A database for Apache Hadoop
|
Summary: A database for Apache Hadoop
|
||||||
License: Apache-2.0 and BSD and CPL-1.0 and EPL-1.0 and MIT
|
License: Apache-2.0 and BSD and CPL-1.0 and EPL-1.0 and MIT
|
||||||
URL: http://hbase.apache.org/
|
URL: http://hbase.apache.org/
|
||||||
@ -17,7 +17,9 @@ Source1: %{name}.logrotate
|
|||||||
Source2: %{name}-site.xml
|
Source2: %{name}-site.xml
|
||||||
Source3: %{name}.service.template
|
Source3: %{name}.service.template
|
||||||
Source4: xmvn-reactor
|
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
|
BuildArch: noarch
|
||||||
|
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
@ -59,6 +61,12 @@ This package contains the API documentation for %{name}.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -qn %{name}-rel-%{version}
|
%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
|
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
|
cp %{SOURCE4} ./.xmvn-reactor
|
||||||
echo `pwd` > absolute_prefix.log
|
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
|
sed -i 's/absolute-prefix/'"$absolute_prefix"'/g' .xmvn-reactor
|
||||||
|
|
||||||
%build
|
%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
|
mvn -Pnative clean install -DskipTests assembly:single -Prelease -Dmaven.javadoc.skip=true -Drat.skip=true
|
||||||
|
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
@ -262,6 +273,11 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed May 29 2024 Dingli Zhang <dingli@iscas.ac.cn> - 2.5.0-3
|
||||||
|
- Fix riscv64 support
|
||||||
|
- Upgrade os-maven-plugin to 1.7.1
|
||||||
|
- Remove useless settings.xml
|
||||||
|
|
||||||
* Wed May 8 2024 xiexing <xiexing4@hisilicon.com> - 2.5.0-2
|
* Wed May 8 2024 xiexing <xiexing4@hisilicon.com> - 2.5.0-2
|
||||||
- remove unnecessary require
|
- remove unnecessary require
|
||||||
|
|
||||||
|
|||||||
BIN
protoc-3.21.1-linux-riscv64.exe
Normal file
BIN
protoc-3.21.1-linux-riscv64.exe
Normal file
Binary file not shown.
21
settings.xml
21
settings.xml
@ -1,21 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd">
|
|
||||||
<pluginGroups>
|
|
||||||
</pluginGroups>
|
|
||||||
<proxies>
|
|
||||||
</proxies>
|
|
||||||
<servers>
|
|
||||||
</servers>
|
|
||||||
<mirrors>
|
|
||||||
<mirror>
|
|
||||||
<id>big</id>
|
|
||||||
<mirrorOf>*</mirrorOf>
|
|
||||||
<name>huaweicloud</name>
|
|
||||||
<url>https://repo.huaweicloud.com/repository/maven/</url>
|
|
||||||
</mirror>
|
|
||||||
</mirrors>
|
|
||||||
<profiles>
|
|
||||||
</profiles>
|
|
||||||
</settings>
|
|
||||||
13
upgrade_os-maven_plugin_to_1.7.1.patch
Normal file
13
upgrade_os-maven_plugin_to_1.7.1.patch
Normal file
@ -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 @@
|
||||||
|
<maven.javadoc.version>3.4.0</maven.javadoc.version>
|
||||||
|
<maven.warbucks.version>1.1.0</maven.warbucks.version>
|
||||||
|
<maven.project.info.report.version>3.1.2</maven.project.info.report.version>
|
||||||
|
- <os.maven.version>1.5.0.Final</os.maven.version>
|
||||||
|
+ <os.maven.version>1.7.1</os.maven.version>
|
||||||
|
<findbugs-annotations.version>1.3.9-1</findbugs-annotations.version>
|
||||||
|
<spotbugs.version>4.2.2</spotbugs.version>
|
||||||
|
<spotbugs.maven.version>4.2.0</spotbugs.maven.version>
|
||||||
Loading…
x
Reference in New Issue
Block a user