Fix riscv64 support

(cherry picked from commit d3001d69131bb3f5edd9935926e145ea5e04638a)
This commit is contained in:
Dingli Zhang 2024-05-29 03:13:05 +00:00 committed by openeuler-sync-bot
parent 044c96f259
commit 5f0235428c
3 changed files with 16 additions and 1 deletions

View File

@ -2,7 +2,7 @@
Name: hive
Version: 3.1.3
Release: 2
Release: 3
Summary: The Apache Hadoop data warehouse
License: Apache-2.0 and Python-2.0 and MPL-2.0 and BSD and ICU
@ -13,6 +13,8 @@ Source1: xmvn-reactor
Source2: pentaho-aggdesigner-algorithm-5.1.5-jhyde.jar
Source3: guava-27.0-jre.jar
Source4: mysql-connector-java.jar
Source5: protoc-jar-3.5.1.1.tar.gz
Source6: protoc-jar-maven-plugin-3.5.1.1.tar.gz
BuildRequires: cmake java-1.8.0-openjdk-devel maven xmvn xmvn-install gradle-local maven-local protobuf2-devel protobuf2-compiler
Requires: java-1.8.0-openjdk
@ -28,6 +30,13 @@ the data using a SQL-like language called HiveQL.
%setup -q -n %{name}-rel-release-%{version}
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=org.pentaho -DartifactId=pentaho-aggdesigner-algorithm -Dversion=5.1.5-jhyde -Dpackaging=jar -Dfile=%{SOURCE2}
%if "%{_arch}" == "riscv64"
mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=2.5.0 -Dclassifier=linux-riscv64 -Dpackaging=exe -Dfile=/usr/bin/protoc
mkdir -p ${HOME}/.m2/repository/com/github/os72/protoc-jar/
tar -mxf %{SOURCE5} -C ${HOME}/.m2/repository/com/github/os72/protoc-jar/
mkdir -p ${HOME}/.m2/repository/com/github/os72/protoc-jar-maven-plugin/
tar -mxf %{SOURCE6} -C ${HOME}/.m2/repository/com/github/os72/protoc-jar-maven-plugin/
%endif
cp %{SOURCE1} ./.xmvn-reactor
echo `pwd` > absolute_prefix.log
sed -i 's/\//\\\//g' absolute_prefix.log
@ -41,6 +50,9 @@ sed -i -e '1d;2i#!/usr/bin/env bash' bin/hive-config.sh
%build
%if "%{_arch}" == "riscv64"
export MAVEN_OPTS="-Xms2048M -Xmx8000M"
%endif
# for javadoc encoding
export LC_ALL=en_US.UTF-8
@ -120,6 +132,9 @@ ln -s %{_javadir}/%{name}/%{name}-shims.jar %{buildroot}%{_datadir}/hadoop/mapre
%changelog
* Wed May 29 2024 Dingli Zhang <dingli@iscas.ac.cn> - 3.1.3-3
- Fix riscv64 support
* Fri Dec 1 2023 xiexing <xiexing4@h-partners.com> 3.1.3-2
- remove hadoop dependency mysql5-server
- fix hiveserver2 launch problem

BIN
protoc-jar-3.5.1.1.tar.gz Normal file

Binary file not shown.

Binary file not shown.