Projects
Eulaceura:Factory
hive
_service:obs_scm:hive.spec
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:hive.spec of Package hive
%define __os_install_post %{nil} Name: hive Version: 3.1.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 URL: http://hive.apache.org/ Source0: https://github.com/apache/%{name}/archive/refs/tags/rel/release-%{version}.tar.gz Source1: xmvn-reactor Source2: pentaho-aggdesigner-algorithm-5.1.5-jhyde.jar Source3: guava-27.0-jre.jar Source4: mysql-connector-java.jar 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 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 provides a mechanism to project structure onto this data and query the data using a SQL-like language called HiveQL. %prep %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 %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 absolute_prefix=`head -n 1 absolute_prefix.log` sed -i 's/absolute-prefix/'"$absolute_prefix"'/g' .xmvn-reactor find -name "*.jar" -delete # missing shebang 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 mvn package -DskipTests -Pdist -Dtar %install %mvn_install -J build/dist/docs install -d -m 0755 %{buildroot}%{_datadir}/%{name}/bin install -d -m 0755 %{buildroot}%{_datadir}/%{name}/conf install -d -m 0755 %{buildroot}%{_datadir}/%{name}/lib install -d -m 0755 %{buildroot}%{_datadir}/%{name}/scripts cp -f packaging/target/apache-%{name}-%{version}-bin/apache-%{name}-%{version}-bin/lib/hive-storage-api-2.7.0.jar %{buildroot}%{_datadir}/java/%{name}/ tar -C packaging/target -zxf packaging/target/apache-%{name}-%{version}-bin.tar.gz chmod 644 packaging/target/apache-%{name}-%{version}-bin/apache-%{name}-%{version}-bin/scripts/llap/sql/serviceCheckScript.sql pushd packaging/target/apache-%{name}-%{version}-bin/apache-%{name}-%{version}-bin cp -arf bin/* %{buildroot}%{_datadir}/%{name}/bin cp -arf conf/* %{buildroot}%{_datadir}/%{name}/conf rm -rf lib/guava-19.0.jar cp %{SOURCE3} lib/ cp %{SOURCE4} lib/ cp -arf lib/* %{buildroot}%{_datadir}/%{name}/lib cp -arf scripts/* %{buildroot}%{_datadir}/%{name}/scripts popd # create the root from here install -d -m 0755 %{buildroot}%{_datadir}/%{name}/bin/ext install -d -m 0755 %{buildroot}%{_datadir}/%{name}/bin/ext/util install -d -m 0755 %{buildroot}%{_sysconfdir}/%{name} # bin install -dm 0755 %{buildroot}%{_bindir} for f in %{name} hive-config.sh init-hive-dfs.sh metatool schematool; do install -p bin/${f} %{buildroot}%{_datadir}/%{name}/bin ln -s %{_datadir}/%{name}/bin/${f} %{buildroot}%{_bindir}/${f} done # bin/ext/util cp -pr bin/ext/* %{buildroot}%{_datadir}/%{name}/bin/ext chmod 0755 %{buildroot}%{_datadir}/%{name}/bin/ext/* ln -s %{_datadir}/%{name}/bin/ext %{buildroot}%{_bindir}/ext # conf for f in hive-default.xml hive-env.sh hive-exec-log4j2.properties hive-log4j2.properties; do cp -p packaging/target/apache-hive-%{version}-bin/conf/${f}.template %{buildroot}%{_datadir}/%{name}/conf/${f} ln -s %{_datadir}/%{name}/conf/${f} %{buildroot}%{_sysconfdir}/%{name}/${f} done # manually replace the hive jars with their links rm %{buildroot}%{_datadir}/%{name}/lib/hive-*.jar for m in accumulo-handler beeline classification cli common contrib druid-handler exec hbase-handler hplsql jdbc jdbc-handler kryo-registrator llap-client llap-common llap-ext-client llap-server llap-tez metastore serde service service-rpc shims shims-0.23 shims-common shims-scheduler standalone-metastore streaming testutils upgrade-acid vector-code-gen; do ln -s %{_javadir}/%{name}/%{name}-${m}.jar %{buildroot}%{_datadir}/%{name}/lib/%{name}-${m}-%{version}.jar done ln -s %{_javadir}/%{name}/hcatalog-core.jar %{buildroot}%{_datadir}/%{name}/lib/%{name}-hcatalog-core-%{version}.jar ln -s %{_javadir}/%{name}/hcatalog-server-extensions.jar %{buildroot}%{_datadir}/%{name}/lib/%{name}-hcatalog-server-extensions-%{version}.jar ln -s %{_javadir}/%{name}/hive-storage-api-2.7.0.jar %{buildroot}%{_datadir}/%{name}/lib/hive-storage-api-2.7.0.jar # MR needs the shims and thrift jars in it's classpath mkdir -p -m0755 %{buildroot}/%{_datadir}/hadoop/mapreduce/lib ln -s %{_javadir}/%{name}/%{name}-shims.jar %{buildroot}%{_datadir}/hadoop/mapreduce/lib/%{name}-shims.jar %check # tests are not run due to dependency on hive hbase support # which is currently unavailable %files -f .mfiles %doc LICENSE NOTICE %{_bindir}/* %{_datadir}/%{name} %{_sysconfdir}/%{name} %dir %{_javadir}/%{name} %{_datadir}/hadoop/mapreduce/lib/%{name}-shims.jar %{_datadir}/java/%{name}/hive-storage-api-2.7.0.jar %changelog * Tue Jun 25 2024 Dingli Zhang <dingli@iscas.ac.cn> - 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 <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 * Tue Sep 13 2022 Zhao Yang <yangzhao1@kylinos.cn> 3.1.3-1 - update to version 3.1.3 * Wed Jul 14 2021 Ge Wang <wangge20@huawei.com> 3.1.2-3 - Modify sql script's privilege * Wed Jun 09 2021 Ge Wang <wangge20@huawei.com> 3.1.2-2 - Add soft link ext to directory /usr/bin due to hive's shell starting info * Tue Apr 13 2021 Ge Wang <wangge20@huawei.com> 3.1.2-1 - Init package
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2