diff --git a/1000-Add-protoc-java-support-for-riscv64.patch b/1000-Add-protoc-java-support-for-riscv64.patch new file mode 100644 index 0000000000000000000000000000000000000000..3628aad37bbc6a8434cc4f46e2c5578f72f44800 --- /dev/null +++ b/1000-Add-protoc-java-support-for-riscv64.patch @@ -0,0 +1,23 @@ +From 2c52801962444baa444401b8fafd09bd6cfab92b Mon Sep 17 00:00:00 2001 +From: Dingli Zhang +Date: Thu, 9 May 2024 00:02:35 +0800 +Subject: [PATCH] Add support for riscv64 + +--- + src/main/java/com/github/os72/protocjar/PlatformDetector.java | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/src/main/java/com/github/os72/protocjar/PlatformDetector.java b/src/main/java/com/github/os72/protocjar/PlatformDetector.java +index 7a99348..b8f08e5 100644 +--- a/src/main/java/com/github/os72/protocjar/PlatformDetector.java ++++ b/src/main/java/com/github/os72/protocjar/PlatformDetector.java +@@ -211,6 +211,9 @@ private static String normalizeArch(String value) { + if ("ppc64le".equals(value)) { + return "ppcle_64"; + } ++ if ("riscv64".equals(value)) { ++ return "riscv64"; ++ } + if ("s390".equals(value)) { + return "s390_32"; + } diff --git a/hive.spec b/hive.spec index bd6f286f6b88875c34a13bb65abc281d566d3d4e..442b6d2e309ffe9bdaabe3937154add90f75d8a7 100644 --- a/hive.spec +++ b/hive.spec @@ -2,7 +2,7 @@ Name: hive Version: 3.1.3 -Release: 3 +Release: 4 Summary: The Apache Hadoop data warehouse License: Apache-2.0 and Python-2.0 and MPL-2.0 and BSD and ICU @@ -13,13 +13,16 @@ 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 +Source5: https://github.com/os72/protoc-jar/archive/refs/tags/v3.5.1.1.tar.gz +Source6: https://github.com/os72/protoc-jar-maven-plugin/archive/refs/tags/v3.5.1.1.zip + +BuildRequires: cmake java-1.8.0-openjdk-devel maven xmvn xmvn-install gradle-local maven-local protobuf2-devel protobuf2-compiler -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 BuildArch: noarch +Patch1000: 1000-Add-protoc-java-support-for-riscv64.patch + %description The Apache Hive data warehouse software facilitates querying and managing large datasets residing in distributed storage. Apache Hive @@ -27,16 +30,25 @@ provides a mechanism to project structure onto this data and query the data using a SQL-like language called HiveQL. %prep -%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" +mkdir -p ${HOME}/%{name}-prep_dir +# protoc-jar +tar -mxf %{SOURCE5} -C ${HOME}/%{name}-prep_dir +pushd ${HOME}/%{name}-prep_dir/protoc-jar-3.5.1.1 +%patch1000 -p1 +mvn clean install -Dmaven.test.skip=true -Dmaven.javadoc.skip=true +popd +# protoc-jar-maven-plugin +unzip %{SOURCE6} -d ${HOME}/%{name}-prep_dir +pushd ${HOME}/%{name}-prep_dir/protoc-jar-maven-plugin-3.5.1.1 +mvn clean install -Dmaven.test.skip=true -Dmaven.javadoc.skip=true +popd 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 + +%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} cp %{SOURCE1} ./.xmvn-reactor echo `pwd` > absolute_prefix.log sed -i 's/\//\\\//g' absolute_prefix.log @@ -49,7 +61,6 @@ find -name "*.jar" -delete sed -i -e '1d;2i#!/usr/bin/env bash' bin/hive-config.sh %build - %if "%{_arch}" == "riscv64" export MAVEN_OPTS="-Xms2048M -Xmx8000M" %endif @@ -132,6 +143,10 @@ ln -s %{_javadir}/%{name}/%{name}-shims.jar %{buildroot}%{_datadir}/hadoop/mapre %changelog +* Tue Jun 25 2024 Dingli Zhang - 3.1.3-4 +- Remove riscv64 prebuilded files +- Build protoc-jar and protoc-jar-maven-plugin in prep state for riscv64 + * Wed May 29 2024 Dingli Zhang - 3.1.3-3 - Fix riscv64 support diff --git a/protoc-jar-3.5.1.1.tar.gz b/protoc-jar-3.5.1.1.tar.gz deleted file mode 100644 index afd1f372203bde1b8054a5d42dff58fa0c605cd4..0000000000000000000000000000000000000000 Binary files a/protoc-jar-3.5.1.1.tar.gz and /dev/null differ diff --git a/protoc-jar-maven-plugin-3.5.1.1.tar.gz b/protoc-jar-maven-plugin-3.5.1.1.tar.gz deleted file mode 100644 index 3b69947b0afcdaf053f8b40f516cae72f8ccbd16..0000000000000000000000000000000000000000 Binary files a/protoc-jar-maven-plugin-3.5.1.1.tar.gz and /dev/null differ diff --git a/v3.5.1.1.tar.gz b/v3.5.1.1.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..e4f1dfe5cce856d4efc901d7e4e379b4e3b38a9d Binary files /dev/null and b/v3.5.1.1.tar.gz differ diff --git a/v3.5.1.1.zip b/v3.5.1.1.zip new file mode 100644 index 0000000000000000000000000000000000000000..ebc041913f1569738f82f3974df70a1687516b4c Binary files /dev/null and b/v3.5.1.1.zip differ